OGS
ProcessLib::ThermalTwoPhaseFlowWithPP Namespace Reference

Classes

struct  IntegrationPointData
class  ThermalTwoPhaseFlowWithPPLocalAssembler
class  ThermalTwoPhaseFlowWithPPLocalAssemblerInterface
class  ThermalTwoPhaseFlowWithPPProcess
struct  ThermalTwoPhaseFlowWithPPProcessData

Functions

void checkMPLProperties (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< ProcesscreateThermalTwoPhaseFlowWithPPProcess (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)

Variables

const unsigned NUM_NODAL_DOF = 4

Function Documentation

◆ checkMPLProperties()

void ProcessLib::ThermalTwoPhaseFlowWithPP::checkMPLProperties ( std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media)

Definition at line 21 of file CreateThermalTwoPhaseFlowWithPPProcess.cpp.

23{
24 std::array const required_property_medium = {
29 MaterialPropertyLib::PropertyType::
30 relative_permeability_nonwetting_phase,
33
34 std::array const required_property_solid_phase = {
37
38 std::array const required_property_liquid_phase = {
42
43 std::array const required_property_gas_phase = {
45
46 std::array const required_property_vapour_component = {
51
52 std::array const required_property_dry_air_component = {
55
56 std::array const required_property_contaminant_vapour_component = {
61
62 std::array const required_property_dissolved_contaminant_component = {
64
65 for (auto const& m : media)
66 {
67 auto const& gas_phase = m.second->phase("Gas");
68 auto const& liquid_phase = m.second->phase("AqueousLiquid");
69 checkRequiredProperties(*m.second, required_property_medium);
70 checkRequiredProperties(gas_phase, required_property_gas_phase);
71 checkRequiredProperties(liquid_phase, required_property_liquid_phase);
72 checkRequiredProperties(m.second->phase("Solid"),
73 required_property_solid_phase);
74
75 // TODO (BM): should use index to identify components (same for impl.h)
76 checkRequiredProperties(gas_phase.component("w"),
77 required_property_vapour_component);
78 checkRequiredProperties(gas_phase.component("a"),
79 required_property_dry_air_component);
80 checkRequiredProperties(gas_phase.component("c"),
81 required_property_contaminant_vapour_component);
83 liquid_phase.component("c"),
84 required_property_dissolved_contaminant_component);
85 }
86}
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
Definition Component.cpp:51
@ longitudinal_dispersivity
used to compute the hydrodynamic dispersion tensor.
@ transversal_dispersivity
used to compute the hydrodynamic dispersion tensor.

References MaterialPropertyLib::density, MaterialPropertyLib::henry_coefficient, MaterialPropertyLib::longitudinal_dispersivity, MaterialPropertyLib::molar_mass, MaterialPropertyLib::permeability, MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::relative_permeability, MaterialPropertyLib::saturation, MaterialPropertyLib::specific_heat_capacity, MaterialPropertyLib::specific_latent_heat, MaterialPropertyLib::transversal_dispersivity, MaterialPropertyLib::vapour_pressure, and MaterialPropertyLib::viscosity.

Referenced by createThermalTwoPhaseFlowWithPPProcess().

◆ createThermalTwoPhaseFlowWithPPProcess()

std::unique_ptr< Process > ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPProcess ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )
Input File Parameter
prj__processes__process__type

Process Variables

Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__process_variables

Primary process variables as they appear in the global component vector:

Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__process_variables__gas_pressure
Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__process_variables__capillary_pressure
Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__process_variables__total_molar_fraction_contaminant
Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__process_variables__temperature

Process Parameters

Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__specific_body_force
Input File Parameter
prj__processes__process__TWOPHASE_FLOW_THERMAL__mass_lumping

Definition at line 88 of file CreateThermalTwoPhaseFlowWithPPProcess.cpp.

97{
99 config.checkConfigParameter("type", "THERMAL_TWOPHASE_WITH_PP");
100
102 DBUG("Create nonisothermal two-phase flow model.");
104 auto const pv_config = config.getConfigSubtree("process_variables");
105
107 auto per_process_variables = findProcessVariables(
108 variables, pv_config,
109 {
110 "gas_pressure",
112 "capillary_pressure",
114 "total_molar_fraction_contaminant",
116 "temperature"});
117 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
118 process_variables;
119 process_variables.push_back(std::move(per_process_variables));
120
121 SecondaryVariableCollection secondary_variables;
122
123 ProcessLib::createSecondaryVariables(config, secondary_variables);
125 // Specific body force
126 std::vector<double> const b =
128 config.getConfigParameter<std::vector<double>>("specific_body_force");
129 assert(!b.empty() && b.size() < 4);
130 Eigen::VectorXd specific_body_force(b.size());
131 bool const has_gravity = MathLib::toVector(b).norm() > 0;
132 if (has_gravity)
133 {
134 std::copy_n(b.data(), b.size(), specific_body_force.data());
135 }
136
138 auto mass_lumping = config.getConfigParameter<bool>("mass_lumping");
139
140 auto media_map =
142
143 DBUG("Check the media properties of ThermalTwoPhaseFlowWithPP process ...");
144 checkMPLProperties(media);
145 DBUG("Media properties verified.");
146
147 ThermalTwoPhaseFlowWithPPProcessData process_data{
148 std::move(media_map), specific_body_force, has_gravity, mass_lumping};
149
150 return std::make_unique<ThermalTwoPhaseFlowWithPPProcess>(
151 std::move(name), mesh, std::move(jacobian_assembler), parameters,
152 integration_order, std::move(process_variables),
153 std::move(process_data), std::move(secondary_variables));
154}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
Handles configuration of several secondary variables from the project file.
MaterialSpatialDistributionMap createMaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium > > const &media, MeshLib::Mesh const &mesh)
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
void checkMPLProperties(std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), checkMPLProperties(), MaterialPropertyLib::createMaterialSpatialDistributionMap(), ProcessLib::createSecondaryVariables(), DBUG(), ProcessLib::findProcessVariables(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), and MathLib::toVector().

Referenced by ProjectData::parseProcesses().

Variable Documentation

◆ NUM_NODAL_DOF

const unsigned ProcessLib::ThermalTwoPhaseFlowWithPP::NUM_NODAL_DOF = 4