From 7ed51637cf5e18a8ce8193d2793e77d471d9fd1d Mon Sep 17 00:00:00 2001
From: Katharina Heck <katharina.heck@iws.uni-stuttgart.de>
Date: Fri, 27 Apr 2018 14:34:30 +0200
Subject: [PATCH] [components] add solid properties in constant component

---
 dumux/material/components/constant.hh | 37 +++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/dumux/material/components/constant.hh b/dumux/material/components/constant.hh
index 48604da7f3..ce14c3f2ae 100644
--- a/dumux/material/components/constant.hh
+++ b/dumux/material/components/constant.hh
@@ -29,6 +29,7 @@
 #include <dumux/material/components/base.hh>
 #include <dumux/material/components/liquid.hh>
 #include <dumux/material/components/gas.hh>
+#include <dumux/material/components/solid.hh>
 
 namespace Dumux {
 namespace Components {
@@ -53,6 +54,7 @@ class Constant
 : public Components::Base<Scalar, Constant<id, Scalar> >
 , public Components::Liquid<Scalar, Constant<id, Scalar> >
 , public Components::Gas<Scalar, Constant<id, Scalar> >
+, public Components::Solid<Scalar, Constant<id, Scalar> >
 {
 
 public:
@@ -157,6 +159,41 @@ public:
         static const Scalar kinematicViscosity = getParamFromGroup<Scalar>(std::to_string(id), "Component.GasKinematicViscosity", 1.0);
         return kinematicViscosity * gasDensity(temperature, pressure);
     }
+
+        /*!
+     * \brief The density in \f$\mathrm{[kg/m^3]}\f$ of the component at a given pressure in
+     *          \f$\mathrm{[Pa]}\f$ and temperature in \f$\mathrm{[K]}\f$.
+     *
+     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
+     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
+     */
+    static Scalar solidDensity(Scalar temperature)
+    {
+        static const Scalar density = getParamFromGroup<Scalar>(std::to_string(id), "Component.SolidDensity", 1.0);
+        return density;
+    }
+
+    /*!
+     * \brief Thermal conductivity of the component \f$\mathrm{[W/(m*K)]}\f$ as a solid.
+     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
+     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
+     */
+    static Scalar solidThermalConductivity(Scalar temperature)
+    {
+        static const Scalar solidThermalConductivity = getParamFromGroup<Scalar>(std::to_string(id), "Component.SolidThermalConductivity", 1.0);
+        return solidThermalConductivity;
+    }
+
+    /*!
+     * \brief Specific isobaric heat capacity of the component \f$\mathrm{[J/(kg*K)]}\f$ as a solid.
+     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
+     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
+     */
+    static Scalar solidHeatCapacity(Scalar temperature)
+    {
+        static const Scalar solidHeatCapacity = getParamFromGroup<Scalar>(std::to_string(id), "Component.SolidHeatCapacity", 1.0);
+        return solidHeatCapacity;
+    }
 };
 
 } // end namespace Components
-- 
GitLab