diff --git a/dumux/material/components/constant.hh b/dumux/material/components/constant.hh index 433f20354043e0b2d953bebb9cd510ad8758d9c9..c2c7c3006c82119f9cc736b80bd1330cb100845c 100644 --- a/dumux/material/components/constant.hh +++ b/dumux/material/components/constant.hh @@ -71,14 +71,17 @@ public: /*! * \brief Sets the liquid dynamic viscosity in \f$\mathrm{[Pa*s]}\f$. * + * Although the dynamic viscosity \f$\mathrm{[Pa*s]} is returned, + * the kinematic viscosity \f$\mathrm{[m^2/s]} is requested from run time input. + * * \param temperature phase temperature in \f$\mathrm{[K]}\f$ * \param pressure phase pressure in \f$\mathrm{[Pa]}\f$ */ static Scalar liquidViscosity(Scalar temperature, Scalar pressure) { - static const Scalar viscosity + static const Scalar kinematicViscosity = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, LiquidKinematicViscosity); - return viscosity * liquidDensity(temperature, pressure); + return kinematicViscosity * liquidDensity(temperature, pressure); } @@ -104,14 +107,17 @@ public: /*! * \brief Sets the gas dynamic viscosity in \f$\mathrm{[Pa*s]}\f$. * + * Although the dynamic viscosity \f$\mathrm{[Pa*s]} is returned, + * the kinematic viscosity \f$\mathrm{[m^2/s]} is requested from run time input. + * * \param temperature phase temperature in \f$\mathrm{[K]}\f$ * \param pressure phase pressure in \f$\mathrm{[Pa]}\f$ */ static Scalar gasViscosity(Scalar temperature, Scalar pressure) { - static const Scalar viscosity + static const Scalar kinematicViscosity = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, GasKinematicViscosity); - return viscosity * gasDensity(temperature, pressure); + return kinematicViscosity * gasDensity(temperature, pressure); } }; diff --git a/dumux/material/fluidsystems/defaultcomponents.hh b/dumux/material/fluidsystems/defaultcomponents.hh index 237a35de10b90994634a75d2aa0465c0186b4efe..dba7af643f9cc22ee9a610b243e1b895642b011a 100644 --- a/dumux/material/fluidsystems/defaultcomponents.hh +++ b/dumux/material/fluidsystems/defaultcomponents.hh @@ -19,7 +19,7 @@ /*! * \file * - * \brief Provides defaults for all available components. + * \brief Provides defaults for the members of a fluidsystem. */ #ifndef DUMUX_DEFAULT_COMPONENTS_HH #define DUMUX_DEFAULT_COMPONENTS_HH @@ -44,19 +44,20 @@ namespace Dumux { namespace Properties { -//! defines the components which are being used by the fluid system by +//! Defines the components which are being used by the fluid system by //! default and how they are initialized NEW_PROP_TAG(DefaultComponents); -//! defines the components which are actually being used by the fluid -//! system -NEW_PROP_TAG(Components); - +//! Defines, if a detailed description for members of the fluidsystem is used NEW_PROP_TAG(EnableComplicatedFluidSystem); -NEW_PROP_TAG(Scalar); +//! Defines the components which are actually being used by the fluidsystem +NEW_PROP_TAG(Components); + +//! Specifies default component names and initializes the H2O fluid properties SET_PROP(NumericModel, DefaultComponents) -{ private: +{ +private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef Dumux::H2O<Scalar> H2O_IAPWS; @@ -82,23 +83,18 @@ public: } }; -SET_PROP(NumericModel, Components) - : public GET_PROP(TypeTag, DefaultComponents) -{}; +//! Initialize the components with default behavior +SET_PROP(NumericModel, Components) : public GET_PROP(TypeTag, DefaultComponents) {}; -//! Enables detailed description of fluidsystems -/* +/*! + * \brief Enables a detailed description of the fluidsystem + * * Complicated but detailed members of fluidsystems (e.g. phase viscosity, * phase density) can be simplified for efficiency reasons with this property. * Typically, such high demands on accuracy are not needed, so this property * is set to "false" as the default. - * - * To enable it, use - * SET_BOOL_PROP(MyTypeTag, EnableComplicatedFluidSystem, true); */ - -SET_PROP(NumericModel, EnableComplicatedFluidSystem) -{ static const bool value = false; }; +SET_BOOL_PROP(NumericModel, EnableComplicatedFluidSystem, false); } // namespace Properties } // namespace Dumux diff --git a/test/freeflow/navierstokes/test_navierstokes.input b/test/freeflow/navierstokes/test_navierstokes.input index c5d4d76890d31d5e156ebdb587e6335e2b360625..d0a90c0fb14f4888c837592e53d5ce1f244ec0ce 100644 --- a/test/freeflow/navierstokes/test_navierstokes.input +++ b/test/freeflow/navierstokes/test_navierstokes.input @@ -8,5 +8,5 @@ File = ./grids/test_navierstokes.dgf [Problem] EnableGravity = 0 # Disable gravity -GasDensity = 1.1903 -GasKinematicViscosity = 0.011903 +GasDensity = 1.1903 # [kg/m^3] +GasKinematicViscosity = 0.011903 # [m^2/s]