OGS
PureLiquidDensity.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include "Base.h"
8
9namespace ProcessLib::TH2M
10{
12{
15
17{
18 void eval(SpaceTimeData const& x_t,
19 MediaData const& media_data,
20 GasPressureData const& p_GR,
21 CapillaryPressureData const& p_cap,
22 TemperatureData const& T_data,
23 PureLiquidDensityData& out) const
24 {
26
27 // primary variables
28 auto const pGR = p_GR.pG;
29 auto const pCap = p_cap.pCap;
30 auto const T = T_data.T;
31 variables.gas_phase_pressure = pGR;
32 variables.capillary_pressure = pCap;
33 variables.temperature = T;
34
35 auto const& liquid_phase = media_data.liquid;
36
37 // Water pressure is passed to the VariableArray in order to calculate
38 // the water density.
39 auto const pLR = pGR - pCap;
40 variables.liquid_phase_pressure = pLR;
41
42 // Concentration is initially zero to calculate the density of the pure
43 // water phase, which is needed for the Kelvin-Laplace equation.
44 variables.concentration = 0.;
45 *out = liquid_phase.property(MaterialPropertyLib::PropertyType::density)
46 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
47 }
48};
49
50} // namespace ConstitutiveRelations
51} // namespace ProcessLib::TH2M
BaseLib::StrongType< double, struct PureLiquidDensityTag > PureLiquidDensityData
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