OGS
ProcessLib::TH2M::ConstitutiveRelations::NoPhaseTransition Struct Reference

Detailed Description

Definition at line 21 of file NoPhaseTransition.h.

#include <NoPhaseTransition.h>

Inheritance diagram for ProcessLib::TH2M::ConstitutiveRelations::NoPhaseTransition:
[legend]
Collaboration diagram for ProcessLib::TH2M::ConstitutiveRelations::NoPhaseTransition:
[legend]

Public Member Functions

 NoPhaseTransition (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
void eval (SpaceTimeData const &x_t, MediaData const &media_data, GasPressureData const &p_GR, CapillaryPressureData const &p_cap, TemperatureData const &T_data, PureLiquidDensityData const &rho_W_LR, FluidEnthalpyData &fluid_enthalpy_data, MassMoleFractionsData &mass_mole_fractions_data, FluidDensityData &fluid_density_data, VapourPartialPressureData &vapour_pressure_data, ConstituentDensityData &constituent_density_data, PhaseTransitionData &cv) const override
 
- Public Member Functions inherited from ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionModel
 PhaseTransitionModel (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
virtual ~PhaseTransitionModel ()=default
 

Constructor & Destructor Documentation

◆ NoPhaseTransition()

ProcessLib::TH2M::ConstitutiveRelations::NoPhaseTransition::NoPhaseTransition ( std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media)
explicit

Definition at line 18 of file NoPhaseTransition.cpp.

21{
22 DBUG("Create NoPhaseTransition constitutive model.");
23
24 // check for minimum requirement definitions in media object
25 std::array const required_gas_properties = {
28 std::array const required_liquid_properties = {
30
31 for (auto const& m : media)
32 {
33 checkRequiredProperties(m.second->phase("Gas"),
34 required_gas_properties);
35 checkRequiredProperties(m.second->phase("AqueousLiquid"),
36 required_liquid_properties);
37 }
38}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
Definition Component.cpp:60
PhaseTransitionModel(std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)

References DBUG(), MaterialPropertyLib::molar_mass, and MaterialPropertyLib::specific_heat_capacity.

Member Function Documentation

◆ eval()

void ProcessLib::TH2M::ConstitutiveRelations::NoPhaseTransition::eval ( SpaceTimeData const & x_t,
MediaData const & media_data,
GasPressureData const & p_GR,
CapillaryPressureData const & p_cap,
TemperatureData const & T_data,
PureLiquidDensityData const & rho_W_LR,
FluidEnthalpyData & fluid_enthalpy_data,
MassMoleFractionsData & mass_mole_fractions_data,
FluidDensityData & fluid_density_data,
VapourPartialPressureData & vapour_pressure_data,
ConstituentDensityData & constituent_density_data,
PhaseTransitionData & cv ) const
overridevirtual

Implements ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionModel.

Definition at line 40 of file NoPhaseTransition.cpp.

52{
54
55 // primary variables
56 auto const pGR = p_GR();
57 auto const pCap = p_cap();
58 auto const T = T_data.T;
59 variables.gas_phase_pressure = pGR;
60 variables.temperature = T;
61
62 auto const& liquid_phase = media_data.liquid;
63 auto const& gas_phase = media_data.gas;
64
65 vapour_pressure_data.pWGR = 0;
66
67 // C-component is only component in the gas phase
68 cv.dxmWG_dpGR = 0.;
69 cv.dxmWG_dpCap = 0.;
70 cv.dxmWG_dT = 0.;
71 mass_mole_fractions_data.xnCG = 1.;
72 mass_mole_fractions_data.xmCG = 1.;
73
74 auto const M =
76 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
77
78 variables.molar_mass = M;
79
80 fluid_density_data.rho_GR =
82 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
83
84 constituent_density_data.rho_C_GR = fluid_density_data.rho_GR;
85 constituent_density_data.rho_W_GR = 0;
86 constituent_density_data.rho_C_LR = 0;
87
88 // W-component is only component in the liquid phase
89 mass_mole_fractions_data.xmWL = 1.;
90 cv.dxmWL_dpGR = 0;
91 cv.dxmWL_dpCap = 0;
92 cv.dxmWL_dT = 0;
93
94 auto const pLR = pGR - pCap;
95 variables.liquid_phase_pressure = pLR;
96 fluid_density_data.rho_LR = rho_W_LR();
97 variables.density = fluid_density_data.rho_LR;
98
99 // specific heat capacities
100 auto const cpG =
101 gas_phase
103 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
104
105 auto const cpL =
106 liquid_phase
108 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
109
110 // specific phase enthalpies
111 fluid_enthalpy_data.h_G = cpG * T;
112 fluid_enthalpy_data.h_L = cpL * T;
113 cv.dh_G_dT = cpG;
114 cv.dh_L_dT = cpL;
115
116 // specific inner energies
117 cv.uG = fluid_enthalpy_data.h_G - pGR / fluid_density_data.rho_GR;
118 cv.uL = fluid_enthalpy_data.h_L;
119
120 cv.drho_GR_dT =
122 .template dValue<double>(variables,
124 x_t.x, x_t.t, x_t.dt);
125 cv.du_G_dT = cpG + pGR * cv.drho_GR_dT / fluid_density_data.rho_GR /
126 fluid_density_data.rho_GR;
127
128 cv.du_L_dT = cpL;
129
130 cv.drho_GR_dp_cap = 0;
131
132 cv.drho_GR_dp_GR =
134 .template dValue<double>(
136 x_t.x, x_t.t, x_t.dt);
137 cv.drho_LR_dp_LR =
139 .template dValue<double>(
141 x_t.x, x_t.t, x_t.dt);
142
143 cv.du_G_dp_GR = -1 / fluid_density_data.rho_GR +
144 pGR * cv.drho_GR_dp_GR / fluid_density_data.rho_GR /
145 fluid_density_data.rho_GR;
146
147 cv.drho_C_GR_dp_GR = cv.drho_GR_dp_GR;
148 cv.drho_C_GR_dp_cap = 0;
149 cv.drho_C_GR_dT = cv.drho_GR_dT;
150
151 cv.drho_LR_dT =
153 .template dValue<double>(variables,
155 x_t.x, x_t.t, x_t.dt);
156
157 cv.drho_W_LR_dp_LR = cv.drho_LR_dp_LR;
158 cv.drho_W_LR_dp_GR = cv.drho_LR_dp_LR;
159 cv.drho_W_LR_dT = cv.drho_LR_dT;
160 cv.drho_W_GR_dT = 0;
161 cv.drho_W_GR_dp_GR = 0;
162 cv.drho_W_GR_dp_cap = 0;
163
164 cv.diffusion_coefficient_vapour = 0.;
165 cv.diffusion_coefficient_solute = 0.;
166
167 cv.hCG = 0;
168 cv.hWG = 0;
169}

References MaterialPropertyLib::density, MaterialPropertyLib::VariableArray::density, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dh_G_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dh_L_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::diffusion_coefficient_solute, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::diffusion_coefficient_vapour, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_C_GR_dp_cap, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_C_GR_dp_GR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_C_GR_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_GR_dp_cap, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_GR_dp_GR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_GR_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_LR_dp_LR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_LR_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_W_GR_dp_cap, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_W_GR_dp_GR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_W_GR_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_W_LR_dp_GR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_W_LR_dp_LR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::drho_W_LR_dT, ProcessLib::ConstitutiveRelations::SpaceTimeData::dt, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::du_G_dp_GR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::du_G_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::du_L_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dxmWG_dpCap, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dxmWG_dpGR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dxmWG_dT, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dxmWL_dpCap, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dxmWL_dpGR, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::dxmWL_dT, ProcessLib::TH2M::ConstitutiveRelations::MediaData::gas, MaterialPropertyLib::gas_phase_pressure, MaterialPropertyLib::VariableArray::gas_phase_pressure, ProcessLib::TH2M::ConstitutiveRelations::FluidEnthalpyData::h_G, ProcessLib::TH2M::ConstitutiveRelations::FluidEnthalpyData::h_L, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::hCG, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::hWG, ProcessLib::TH2M::ConstitutiveRelations::MediaData::liquid, MaterialPropertyLib::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::molar_mass, MaterialPropertyLib::VariableArray::molar_mass, ProcessLib::TH2M::ConstitutiveRelations::VapourPartialPressureData::pWGR, ProcessLib::TH2M::ConstitutiveRelations::ConstituentDensityData::rho_C_GR, ProcessLib::TH2M::ConstitutiveRelations::ConstituentDensityData::rho_C_LR, ProcessLib::TH2M::ConstitutiveRelations::FluidDensityData::rho_GR, ProcessLib::TH2M::ConstitutiveRelations::FluidDensityData::rho_LR, ProcessLib::TH2M::ConstitutiveRelations::ConstituentDensityData::rho_W_GR, MaterialPropertyLib::specific_heat_capacity, ProcessLib::TH2M::ConstitutiveRelations::TemperatureData::T, ProcessLib::ConstitutiveRelations::SpaceTimeData::t, MaterialPropertyLib::temperature, MaterialPropertyLib::VariableArray::temperature, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::uG, ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionData::uL, ProcessLib::ConstitutiveRelations::SpaceTimeData::x, ProcessLib::TH2M::ConstitutiveRelations::MassMoleFractionsData::xmCG, ProcessLib::TH2M::ConstitutiveRelations::MassMoleFractionsData::xmWL, and ProcessLib::TH2M::ConstitutiveRelations::MassMoleFractionsData::xnCG.


The documentation for this struct was generated from the following files: