OGS
GetLiquidThermalExpansivity.cpp
Go to the documentation of this file.
1 
14 
15 #include "MaterialLib/MPL/Phase.h"
16 
17 namespace MaterialPropertyLib
18 {
19 class Phase;
20 
21 double getLiquidThermalExpansivity(Phase const& phase,
22  VariableArray const& vars,
23  const double density,
25  double const t, double const dt)
26 {
27  // The thermal expansivity is explicitly given in the project file.
28  if (phase.hasProperty(
30  {
31  return phase
33  .template value<double>(vars, pos, t, dt);
34  }
35 
36  // The thermal expansivity calculated by the density model directly.
37  return (density == 0.0)
38  ? 0.0
40  .template dValue<double>(
42  pos, t, dt) /
43  density;
44 }
45 } // namespace MaterialPropertyLib
Property const & property(PropertyType const &p) const
Definition: Phase.cpp:51
bool hasProperty(PropertyType const &p) const
Definition: Phase.cpp:67
double getLiquidThermalExpansivity(Phase const &phase, VariableArray const &vars, const double density, ParameterLib::SpatialPosition const &pos, double const t, double const dt)
std::array< VariableType, static_cast< int >(Variable::number_of_variables)> VariableArray
Definition: VariableType.h:108