Skip to content
Snippets Groups Projects
Commit b87dcad4 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Merge branch 'fixing_getLiquidThermalExpansivity' into 'master'

Some changes in MPL::getThermalExpansivity

See merge request ogs/ogs!3128
parents f83fe630 da10f8a7
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@
* Created on August 16, 2019, 3:40 PM
*/
#include "GetThermalExpansivity.h"
#include "GetLiquidThermalExpansivity.h"
#include "MaterialLib/MPL/Phase.h"
......@@ -18,18 +18,18 @@ namespace MaterialPropertyLib
{
class Phase;
double getThermalExpansivity(Phase const& phase, VariableArray const& vars,
const double density,
ParameterLib::SpatialPosition const& pos,
double const t, double const dt)
double getLiquidThermalExpansivity(Phase const& phase,
VariableArray const& vars,
const double density,
ParameterLib::SpatialPosition const& pos,
double const t, double const dt)
{
auto const thermal_expansivity_ptr =
&phase.property(MaterialPropertyLib::PropertyType::thermal_expansivity);
// The thermal expansivity is explicitly given in the project file.
if (thermal_expansivity_ptr)
if (phase.hasProperty(
MaterialPropertyLib::PropertyType::thermal_expansivity))
{
return (*thermal_expansivity_ptr)
return phase
.property(MaterialPropertyLib::PropertyType::thermal_expansivity)
.template value<double>(vars, pos, t, dt);
}
......
......@@ -38,8 +38,9 @@ class Phase;
* \f]
* where \f$\rho\f$ is the density, \f$T\f$ is the temperature.
*/
double getThermalExpansivity(Phase const& phase, VariableArray const& vars,
const double density,
ParameterLib::SpatialPosition const& pos,
double const t, double const dt);
double getLiquidThermalExpansivity(Phase const& phase,
VariableArray const& vars,
const double density,
ParameterLib::SpatialPosition const& pos,
double const t, double const dt);
} // namespace MaterialPropertyLib
......@@ -14,7 +14,7 @@
#include "MaterialLib/SolidModels/SelectSolidConstitutiveRelation.h"
#include "MaterialLib/MPL/Components/GetThermalExpansivity.h"
#include "MaterialLib/MPL/Utils/GetLiquidThermalExpansivity.h"
#include "MaterialLib/MPL/Medium.h"
#include "MaterialLib/MPL/Property.h"
#include "MaterialLib/MPL/Utils/FormEffectiveThermalConductivity.h"
......@@ -273,7 +273,7 @@ void ThermoHydroMechanicsLocalAssembler<ShapeFunctionDisplacement,
.template value<double>(vars, x_position, t, dt);
double const fluid_volumetric_thermal_expansion_coefficient =
MaterialPropertyLib::getThermalExpansivity(
MaterialPropertyLib::getLiquidThermalExpansivity(
liquid_phase, vars, fluid_density, x_position, t, dt);
// Use the viscosity model to compute the viscosity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment