Skip to content
Snippets Groups Projects
Commit e0fdfe89 authored by Timo Koch's avatar Timo Koch
Browse files

[binarycoeff] Use getParam in h2o_constatnt

parent 6a8957d4
No related branches found
No related tags found
Loading
...@@ -35,21 +35,6 @@ ...@@ -35,21 +35,6 @@
namespace Dumux namespace Dumux
{ {
namespace Properties
{
// forward declaration of the needed properties
NEW_PROP_TAG(ComponentHenryComponentInWater);
NEW_PROP_TAG(ComponentHenryWaterInComponent);
NEW_PROP_TAG(ComponentGasDiffusionCoefficient);
NEW_PROP_TAG(ComponentLiquidDiffusionCoefficient);
// set default values
SET_SCALAR_PROP(NumericModel, ComponentHenryComponentInWater, 1.0);
SET_SCALAR_PROP(NumericModel, ComponentHenryWaterInComponent, 1.0);
SET_SCALAR_PROP(NumericModel, ComponentGasDiffusionCoefficient, 1.0);
SET_SCALAR_PROP(NumericModel, ComponentLiquidDiffusionCoefficient, 1.0);
} // end namespace Properties
namespace BinaryCoeff namespace BinaryCoeff
{ {
...@@ -70,8 +55,8 @@ class H2O_Component ...@@ -70,8 +55,8 @@ class H2O_Component
/*! /*!
* \brief Binary coefficients for water and a constant component * \brief Binary coefficients for water and a constant component
*/ */
template<class TypeTag> template<class TypeTag, int id>
class H2O_Component<TypeTag, Constant<TypeTag, typename GET_PROP_TYPE(TypeTag, Scalar)>> class H2O_Component<TypeTag, Components::Constant<id, typename GET_PROP_TYPE(TypeTag, Scalar)>>
{ {
public: public:
/*! /*!
...@@ -84,7 +69,7 @@ public: ...@@ -84,7 +69,7 @@ public:
template <class Scalar> template <class Scalar>
static Scalar henryCompInWater(Scalar temperature) static Scalar henryCompInWater(Scalar temperature)
{ {
static const Scalar h = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Component, HenryComponentInWater); static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryComponentInWater", 1.0);
return h; return h;
} }
...@@ -98,7 +83,7 @@ public: ...@@ -98,7 +83,7 @@ public:
template <class Scalar> template <class Scalar>
static Scalar henryWaterInComp(Scalar temperature) static Scalar henryWaterInComp(Scalar temperature)
{ {
static const Scalar h = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Component, HenryWaterInComponent); static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryWaterInComponent", 1.0);
return h; return h;
} }
...@@ -110,7 +95,7 @@ public: ...@@ -110,7 +95,7 @@ public:
template <class Scalar> template <class Scalar>
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure) static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
{ {
static const Scalar D = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Component, GasDiffusionCoefficient); static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.GasDiffusionCoefficient", 1.0);
return D; return D;
} }
...@@ -122,7 +107,7 @@ public: ...@@ -122,7 +107,7 @@ public:
template <class Scalar> template <class Scalar>
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure) static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
{ {
static const Scalar D = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Component, LiquidDiffusionCoefficient); static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.LiquidDiffusionCoefficient", 1.0);
return D; return D;
} }
}; };
......
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