From f368aa49404e8534fae4dd6d4ec1c22b0652837c Mon Sep 17 00:00:00 2001
From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de>
Date: Tue, 1 Sep 2015 06:43:30 +0000
Subject: [PATCH] [material] - added doxygen comments and cleanup of
 defaultcomponents.hh - improved documentation of constant.hh

[test]
- added units in test_navierstokes.input

reviewed by natalies



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@15420 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/material/components/constant.hh         | 14 +++++---
 .../fluidsystems/defaultcomponents.hh         | 34 ++++++++-----------
 .../navierstokes/test_navierstokes.input      |  4 +--
 3 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/dumux/material/components/constant.hh b/dumux/material/components/constant.hh
index 433f203540..c2c7c3006c 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 237a35de10..dba7af643f 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 c5d4d76890..d0a90c0fb1 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]
-- 
GitLab