Skip to content
Snippets Groups Projects
Commit 1c37a6ea authored by Benjamin Faigle's avatar Benjamin Faigle
Browse files

Changes for the salinity model in the fluidsystem:

- Bugfix: Component Brine now uses the set salinity (for density calulation etc)
- Property Salinity now called ProblemSalinity, which can be set via the parameter tree (Group: Problem, Param: Salinity)

Co2 tests adapted accordingly.

reviewd by & developped with Alex

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9358 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 0f04f3b9
No related branches found
No related tags found
No related merge requests found
...@@ -63,11 +63,12 @@ namespace FluidSystems{ ...@@ -63,11 +63,12 @@ namespace FluidSystems{
template<class Scalar, template<class Scalar,
class CO2Table, class CO2Table,
class H2Otype = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar>>, class H2Otype = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar>>,
class Brinetype = Dumux::TabulatedComponent<Scalar, Dumux::Brine<Scalar, Dumux::H2O<Scalar> > > > class BrineRawComponent = Dumux::Brine<Scalar, Dumux::H2O<Scalar>>,
class Brinetype = Dumux::TabulatedComponent<Scalar, BrineRawComponent> >
class BrineCO2 class BrineCO2
: public BaseFluidSystem<Scalar, BrineCO2<Scalar, CO2Table, H2Otype, Brinetype>> : public BaseFluidSystem<Scalar, BrineCO2<Scalar, CO2Table, H2Otype, BrineRawComponent, Brinetype>>
{ {
typedef BrineCO2<Scalar, CO2Table, H2Otype, Brinetype> ThisType; typedef BrineCO2<Scalar, CO2Table, H2Otype, BrineRawComponent, Brinetype> ThisType;
typedef BaseFluidSystem <Scalar, ThisType> Base; typedef BaseFluidSystem <Scalar, ThisType> Base;
...@@ -76,7 +77,7 @@ class BrineCO2 ...@@ -76,7 +77,7 @@ class BrineCO2
public: public:
typedef Dumux::NullParameterCache ParameterCache; typedef Dumux::NullParameterCache ParameterCache;
typedef H2Otype H2O; typedef H2Otype H2O;
typedef Dumux::Brine<Scalar, H2O> BrineRawComponent; //salinity is stored into the raw brine component, wether tabulated or not. // typedef Dumux::Brine<Scalar, H2O> BrineRawComponent; //salinity is stored into the raw brine component, wether tabulated or not.
typedef Brinetype Brine; typedef Brinetype Brine;
typedef typename Dumux::CO2<Scalar, CO2Table> CO2; typedef typename Dumux::CO2<Scalar, CO2Table> CO2;
...@@ -723,11 +724,11 @@ namespace Properties ...@@ -723,11 +724,11 @@ namespace Properties
{ {
NEW_PROP_TAG(Scalar); NEW_PROP_TAG(Scalar);
NEW_PROP_TAG(CO2Table); NEW_PROP_TAG(CO2Table);
NEW_PROP_TAG(Salinity); NEW_PROP_TAG(ProblemSalinity);
// Set Co2 tables // Set Co2 tables
SET_TYPE_PROP(NumericModel, CO2Table, Dumux::CO2Tables); SET_TYPE_PROP(NumericModel, CO2Table, Dumux::CO2Tables);
// Set salinity defaults // Set salinity defaults
SET_SCALAR_PROP(NumericModel, Salinity, 1e-3); SET_SCALAR_PROP(NumericModel, ProblemSalinity, 1e-3);
} }
/*! /*!
...@@ -768,24 +769,26 @@ class BrineCO2FluidSystem ...@@ -768,24 +769,26 @@ class BrineCO2FluidSystem
: public FluidSystems::BrineCO2<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)), : public FluidSystems::BrineCO2<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)),
typename GET_PROP_TYPE(TypeTag, PTAG(CO2Table)), typename GET_PROP_TYPE(TypeTag, PTAG(CO2Table)),
typename GET_PROP(TypeTag, Components)::H2O, typename GET_PROP(TypeTag, Components)::H2O,
Dumux::Brine<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)), Dumux::H2O<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar))>>,
typename GET_PROP(TypeTag, Components)::Brine> typename GET_PROP(TypeTag, Components)::Brine>
{ {
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef typename FluidSystems::BrineCO2<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)), typedef typename FluidSystems::BrineCO2<typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)),
typename GET_PROP_TYPE(TypeTag, PTAG(CO2Table)), typename GET_PROP_TYPE(TypeTag, PTAG(CO2Table)),
typename GET_PROP(TypeTag, Components)::H2O, typename GET_PROP(TypeTag, Components)::H2O,
Dumux::Brine<Scalar, typename GET_PROP(TypeTag, Components)::H2O>,
typename GET_PROP(TypeTag, Components)::Brine> ParentType; typename GET_PROP(TypeTag, Components)::Brine> ParentType;
public: public:
static void init() static void init()
{ {
ParentType::init(GET_PROP_VALUE(TypeTag, Salinity)); ParentType::init(GET_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, Salinity));
} }
static void init(Scalar startTemp, Scalar endTemp, int tempSteps, static void init(Scalar startTemp, Scalar endTemp, int tempSteps,
Scalar startPressure, Scalar endPressure, int pressureSteps) Scalar startPressure, Scalar endPressure, int pressureSteps)
{ {
ParentType::init(startTemp, endTemp, tempSteps, ParentType::init(startTemp, endTemp, tempSteps,
startPressure, endPressure, pressureSteps, GET_PROP_VALUE(TypeTag, Salinity)); startPressure, endPressure, pressureSteps, GET_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, Salinity));
} }
}; };
#endif #endif
......
...@@ -86,7 +86,7 @@ SET_PROP(HeterogeneousProblem, FluidSystem) ...@@ -86,7 +86,7 @@ SET_PROP(HeterogeneousProblem, FluidSystem)
// Set the CO2 table to be used; in this case not the the default table // Set the CO2 table to be used; in this case not the the default table
SET_TYPE_PROP(HeterogeneousProblem, CO2Table, Dumux::HeterogeneousCO2Tables::CO2Tables); SET_TYPE_PROP(HeterogeneousProblem, CO2Table, Dumux::HeterogeneousCO2Tables::CO2Tables);
// Set the salinity mass fraction of the brine in the reservoir // Set the salinity mass fraction of the brine in the reservoir
SET_SCALAR_PROP(HeterogeneousProblem, Salinity, 1e-1); SET_SCALAR_PROP(HeterogeneousProblem, ProblemSalinity, 1e-1);
//! the CO2 Model and VolumeVariables properties //! the CO2 Model and VolumeVariables properties
SET_TYPE_PROP(HeterogeneousProblem, Model, CO2Model<TypeTag>); SET_TYPE_PROP(HeterogeneousProblem, Model, CO2Model<TypeTag>);
......
...@@ -77,7 +77,7 @@ SET_PROP(HeterogeneousProblem, FluidSystem) ...@@ -77,7 +77,7 @@ SET_PROP(HeterogeneousProblem, FluidSystem)
// Set the CO2 table to be used; in this case not the the default table // Set the CO2 table to be used; in this case not the the default table
SET_TYPE_PROP(HeterogeneousProblem, CO2Table, Dumux::Heterogeneous::CO2Tables); SET_TYPE_PROP(HeterogeneousProblem, CO2Table, Dumux::Heterogeneous::CO2Tables);
// Set the salinity mass fraction of the brine in the reservoir // Set the salinity mass fraction of the brine in the reservoir
SET_SCALAR_PROP(HeterogeneousProblem, Salinity, 1e-1); SET_SCALAR_PROP(HeterogeneousProblem, ProblemSalinity, 1e-1);
//! the CO2 Model and VolumeVariables properties //! the CO2 Model and VolumeVariables properties
SET_TYPE_PROP(HeterogeneousProblem, Model, CO2NIModel<TypeTag>); SET_TYPE_PROP(HeterogeneousProblem, Model, CO2NIModel<TypeTag>);
......
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