Skip to content
Snippets Groups Projects
Commit 92880541 authored by Dominik Riesterer's avatar Dominik Riesterer
Browse files

The model can be used with either mole or mass fractions. The property

useMoles has to be set in the problem file and the boundary conditions 
have to be choosen accordingly.

The model still uses MASS fractions by default.

The documentation is changed and extended accordingly.

reviewed by kathinka


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11529 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 75a46dcc
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
}
......
......@@ -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]
####################################################################
......
......@@ -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]
####################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment