From 4c8151a8a298a267e821a31d4fb1d3448e2d6819 Mon Sep 17 00:00:00 2001 From: Holger Class <holger.class@iws.uni-stuttgart.de> Date: Thu, 11 Oct 2018 11:48:23 +0200 Subject: [PATCH] A new possibility to enter diffusion coefficients user-specific if desired --- .../material/binarycoefficients/brine_co2.hh | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/dumux/material/binarycoefficients/brine_co2.hh b/dumux/material/binarycoefficients/brine_co2.hh index 32deb98915..d901d65331 100644 --- a/dumux/material/binarycoefficients/brine_co2.hh +++ b/dumux/material/binarycoefficients/brine_co2.hh @@ -53,14 +53,17 @@ public: */ static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure) { - //Diffusion coefficient of water in the CO2 phase - Scalar const PI=3.141593; - Scalar const k = 1.3806504e-23; // Boltzmann constant - Scalar const c = 4; // slip parameter, can vary between 4 (slip condition) and 6 (stick condition) - Scalar const R_h = 1.72e-10; // hydrodynamic radius of the solute - Scalar mu = CO2::gasViscosity(temperature, pressure); // CO2 viscosity - Scalar D = k / (c * PI * R_h) * (temperature / mu); - return D; + if(!hasParam("BinaryCoefficients.GasDiffCoeff")) //in case one might set that user-specific as e.g. in dumux-lecture/mm/convectivemixing + { + //Diffusion coefficient of water in the CO2 phase + Scalar const PI=3.141593; + Scalar const k = 1.3806504e-23; // Boltzmann constant + Scalar const c = 4; // slip parameter, can vary between 4 (slip condition) and 6 (stick condition) + Scalar const R_h = 1.72e-10; // hydrodynamic radius of the solute + Scalar mu = CO2::gasViscosity(temperature, pressure); // CO2 viscosity + Scalar D = k / (c * PI * R_h) * (temperature / mu); + return D; + } else return getParam<Scalar>("BinaryCoefficients.GasDiffCoeff"); } /*! @@ -72,7 +75,10 @@ public: static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure) { //Diffusion coefficient of CO2 in the brine phase - return 2e-9; + if(!hasParam("BinaryCoefficients.LiquidDiffCoeff")) //in case one might set that user-specific as e.g. in dumux-lecture/mm/convectivemixing + { + return 2e-9; + } else return getParam<Scalar>("BinaryCoefficients.LiquidDiffCoeff"); } /*! -- GitLab