OGS
PureLiquidDensity.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "Base.h"
13#include "BaseLib/StrongType.h"
14
15namespace ProcessLib::TH2M
16{
17namespace ConstitutiveRelations
18{
21
23{
24 void eval(SpaceTimeData const& x_t,
25 MediaData const& media_data,
26 GasPressureData const& p_GR,
27 CapillaryPressureData const& p_cap,
28 TemperatureData const& T_data,
29 PureLiquidDensityData& out) const
30 {
32
33 // primary variables
34 auto const pGR = p_GR();
35 auto const pCap = p_cap();
36 auto const T = T_data.T;
37 variables.gas_phase_pressure = pGR;
38 variables.capillary_pressure = pCap;
39 variables.temperature = T;
40
41 auto const& liquid_phase = media_data.liquid;
42
43 // Water pressure is passed to the VariableArray in order to calculate
44 // the water density.
45 auto const pLR = pGR - pCap;
46 variables.liquid_phase_pressure = pLR;
47
48 // Concentration is initially zero to calculate the density of the pure
49 // water phase, which is needed for the Kelvin-Laplace equation.
50 variables.concentration = 0.;
51 *out = liquid_phase.property(MaterialPropertyLib::PropertyType::density)
52 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
53 }
54};
55
56} // namespace ConstitutiveRelations
57} // namespace ProcessLib::TH2M
ParameterLib::SpatialPosition x
Definition Base.h:74
MaterialPropertyLib::Phase const & liquid
Definition Base.h:47
void eval(SpaceTimeData const &x_t, MediaData const &media_data, GasPressureData const &p_GR, CapillaryPressureData const &p_cap, TemperatureData const &T_data, PureLiquidDensityData &out) const