OGS
GetLiquidThermalExpansivity.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
7
9{
10class Phase;
11
13 VariableArray const& vars,
14 const double density,
16 double const t, double const dt)
17{
18 // The thermal expansivity is explicitly given in the project file.
19 if (phase.hasProperty(
21 {
22 return phase
24 .template value<double>(vars, pos, t, dt);
25 }
26
27 // The thermal expansivity calculated by the density model directly.
28 return (density == 0.0)
29 ? 0.0
31 .template dValue<double>(
33 pos, t, dt) /
34 density;
35}
36} // namespace MaterialPropertyLib
Property const & property(PropertyType const &p) const
Definition Phase.cpp:44
bool hasProperty(PropertyType const &p) const
Definition Phase.cpp:60
double getLiquidThermalExpansivity(Phase const &phase, VariableArray const &vars, const double density, ParameterLib::SpatialPosition const &pos, double const t, double const dt)