diff --git a/test/implicit/co2ni/heterogeneousproblemni.hh b/test/implicit/co2ni/heterogeneousproblemni.hh index f884ae0513e7b1b71f119be8c619e6329614352a..59ee38a3ade32c80447468c49c2d873303077134 100644 --- a/test/implicit/co2ni/heterogeneousproblemni.hh +++ b/test/implicit/co2ni/heterogeneousproblemni.hh @@ -88,6 +88,8 @@ SET_BOOL_PROP(HeterogeneousNIProblem, ProblemEnableGravity, true); SET_BOOL_PROP(HeterogeneousNIProblem, ImplicitEnableJacobianRecycling, false); SET_BOOL_PROP(HeterogeneousNIProblem, VtkAddVelocity, false); + +SET_BOOL_PROP(HeterogeneousNIProblem, UseMoles, false); } @@ -108,6 +110,9 @@ SET_BOOL_PROP(HeterogeneousNIProblem, VtkAddVelocity, false); * between different parts of the boundary. * These boundary ids can be imported into the problem where the boundary conditions can then be assigned accordingly. * + * The model is able to use either mole or mass fractions. The property useMoles can be set to either true or false in the + * problem file. Make sure that the according units are used in the problem setup. The default setting for useMoles is false. + * * To run the simulation execute the following line in shell (works with the box and cell centered spatial discretization method): * <tt>./test_ccco2ni </tt> or <tt>./test_boxco2ni </tt> */ @@ -123,6 +128,8 @@ class HeterogeneousNIProblem : public ImplicitPorousMediaProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; + static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); + enum { // Grid and world dimension dim = GridView::dimension, @@ -232,6 +239,16 @@ public: /*pmin=*/pressureLow_, /*pmax=*/pressureHigh_, /*np=*/nPressure_); + + //stateing in the console whether mole or mass fractions are used + if(!useMoles) + { + std::cout<<"problem uses mass-fractions"<<std::endl; + } + else + { + std::cout<<"problem uses mole-fractions"<<std::endl; + } } /*! @@ -340,6 +357,12 @@ public: * * \param values Stores the source values, acts as return value * \param globalPos The global position + * + * Depending on whether useMoles is set on true or false, the flux has to be given either in + * kg/(m^3*s) or mole/(m^3*s) in the input file!! + * + * Note that the energy balance is always calculated in terms of specific enthalpies [J/kg] + * and that the Neumann fluxes have to be specified accordingly. */ void sourceAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const @@ -413,6 +436,11 @@ public: * * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. + * + * Depending on whether useMoles is set on true or false, the flux has to be given either in + * kg/(m^2*s) or mole/(m^2*s) in the input file!! + * Note that the energy balance is always calculated in terms of specific enthalpies [J/kg] + * and that the Neumann fluxes have to be specified accordingly. */ void neumann(PrimaryVariables &values, const Element &element, @@ -426,10 +454,10 @@ public: values = 0; if (boundaryId == injectionBottom_) { - values[contiCO2EqIdx] = -injectionRate_; // kg/(s*m^2) + values[contiCO2EqIdx] = -injectionRate_; ///FluidSystem::molarMass(CO2Idx); // kg/(s*m^2) or mole/(m^2*s) !! #if !ISOTHERMAL - values[energyEqIdx] = -injectionRate_*CO2::gasEnthalpy( - injectionTemperature_, injectionPressure_); // W/(m^2) + values[energyEqIdx] = -injectionRate_/*kg/(m^2 s)*/*CO2::gasEnthalpy( + injectionTemperature_, injectionPressure_)/*J/kg*/; // W/(m^2) #endif } } diff --git a/test/implicit/co2ni/test_boxco2ni.input b/test/implicit/co2ni/test_boxco2ni.input index 039327c805bd75c042b63b74bfafbe78ed8044ce..e8bdbed4b2ed2728f2ea489e41fa10096c483553 100644 --- a/test/implicit/co2ni/test_boxco2ni.input +++ b/test/implicit/co2ni/test_boxco2ni.input @@ -27,9 +27,9 @@ TemperatureHigh = 330.15 # [Pa] high end for tabularization of fluid propert #################################################################### [Problem] -Name = heterogeneousboxni # [-] toe name of the output files +Name = heterogeneousboxni # [-] the name of the output files DepthBOR = 1200 # [m] depth below ground surface -InjectionRate = 1e-4 # [kg/sq/s] +InjectionRate = 1e-4 # always given as [kg/(m^2/s)] InjectionPressure = 16e6 #[Pa] InjectionTemperature = 305 # [K] #################################################################### diff --git a/test/implicit/co2ni/test_ccco2ni.input b/test/implicit/co2ni/test_ccco2ni.input index f92cbba3730031175829943c35b32c192df68cd8..88f1a5622053780ab55d475be7350240166c0add 100644 --- a/test/implicit/co2ni/test_ccco2ni.input +++ b/test/implicit/co2ni/test_ccco2ni.input @@ -27,9 +27,9 @@ TemperatureHigh = 330.15 # [Pa] high end for tabularization of fluid propert #################################################################### [Problem] -Name = heterogeneousccni # [-] toe name of the output files +Name = heterogeneousccni # [-] the name of the output files DepthBOR = 1200 # [m] depth below ground surface -InjectionRate = 1e-4 # [kg/sq/s] +InjectionRate = 1e-4 # always given as [kg/(m^2/s)] InjectionPressure = 16e6 #[Pa] InjectionTemperature = 305 # [K] ####################################################################