OGS
GetLiquidThermalExpansivity.cpp
Go to the documentation of this file.
1
13
#include "
GetLiquidThermalExpansivity.h
"
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
,
24
ParameterLib::SpatialPosition
const
& pos,
25
double
const
t,
double
const
dt)
26
{
27
// The thermal expansivity is explicitly given in the project file.
28
if
(phase.
hasProperty
(
29
MaterialPropertyLib::PropertyType::thermal_expansivity
))
30
{
31
return
phase
32
.
property
(
MaterialPropertyLib::PropertyType::thermal_expansivity
)
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
39
: -phase.
property
(
MaterialPropertyLib::PropertyType::density
)
40
.template dValue<double>(
41
vars,
MaterialPropertyLib::Variable::temperature
,
42
pos, t, dt) /
43
density
;
44
}
45
}
// namespace MaterialPropertyLib
GetLiquidThermalExpansivity.h
Phase.h
MaterialPropertyLib::Phase
Definition
Phase.h:32
MaterialPropertyLib::Phase::property
Property const & property(PropertyType const &p) const
Definition
Phase.cpp:53
MaterialPropertyLib::Phase::hasProperty
bool hasProperty(PropertyType const &p) const
Definition
Phase.cpp:69
MaterialPropertyLib::VariableArray
Definition
VariableType.h:97
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:27
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::Variable::temperature
@ temperature
MaterialPropertyLib::getLiquidThermalExpansivity
double getLiquidThermalExpansivity(Phase const &phase, VariableArray const &vars, const double density, ParameterLib::SpatialPosition const &pos, double const t, double const dt)
Definition
GetLiquidThermalExpansivity.cpp:21
MaterialPropertyLib::density
@ density
Definition
PropertyType.h:48
MaterialPropertyLib::thermal_expansivity
@ thermal_expansivity
Definition
PropertyType.h:102
MaterialLib
MPL
Utils
GetLiquidThermalExpansivity.cpp
Generated by
1.10.0