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 27 of file CreateThermalTwoPhaseFlowWithPPProcess.cpp.

29{
30 std::array const required_property_medium = {
39
40 std::array const required_property_solid_phase = {
43
44 std::array const required_property_liquid_phase = {
48
49 std::array const required_property_gas_phase = {
51
52 std::array const required_property_vapour_component = {
57
58 std::array const required_property_dry_air_component = {
61
62 std::array const required_property_contaminant_vapour_component = {
67
68 std::array const required_property_dissolved_contaminant_component = {
70
71 for (auto const& m : media)
72 {
73 auto const& gas_phase = m.second->phase("Gas");
74 auto const& liquid_phase = m.second->phase("AqueousLiquid");
75 checkRequiredProperties(*m.second, required_property_medium);
76 checkRequiredProperties(gas_phase, required_property_gas_phase);
77 checkRequiredProperties(liquid_phase, required_property_liquid_phase);
78 checkRequiredProperties(m.second->phase("Solid"),
79 required_property_solid_phase);
80
81 // TODO (BM): should use index to identify components (same for impl.h)
82 checkRequiredProperties(gas_phase.component("w"),
83 required_property_vapour_component);
84 checkRequiredProperties(gas_phase.component("a"),
85 required_property_dry_air_component);
86 checkRequiredProperties(gas_phase.component("c"),
87 required_property_contaminant_vapour_component);
89 liquid_phase.component("c"),
90 required_property_dissolved_contaminant_component);
91 }
92}
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
Definition Component.cpp:60
@ relative_permeability_nonwetting_phase
@ 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::relative_permeability_nonwetting_phase, 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 94 of file CreateThermalTwoPhaseFlowWithPPProcess.cpp.

103{
105 config.checkConfigParameter("type", "THERMAL_TWOPHASE_WITH_PP");
106
108 DBUG("Create nonisothermal two-phase flow model.");
110 auto const pv_config = config.getConfigSubtree("process_variables");
111
113 auto per_process_variables = findProcessVariables(
114 variables, pv_config,
115 {
116 "gas_pressure",
118 "capillary_pressure",
120 "total_molar_fraction_contaminant",
122 "temperature"});
123 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
124 process_variables;
125 process_variables.push_back(std::move(per_process_variables));
126
127 SecondaryVariableCollection secondary_variables;
128
129 ProcessLib::createSecondaryVariables(config, secondary_variables);
131 // Specific body force
132 std::vector<double> const b =
134 config.getConfigParameter<std::vector<double>>("specific_body_force");
135 assert(!b.empty() && b.size() < 4);
136 Eigen::VectorXd specific_body_force(b.size());
137 bool const has_gravity = MathLib::toVector(b).norm() > 0;
138 if (has_gravity)
139 {
140 std::copy_n(b.data(), b.size(), specific_body_force.data());
141 }
142
144 auto mass_lumping = config.getConfigParameter<bool>("mass_lumping");
145
146 auto media_map =
148
149 DBUG("Check the media properties of ThermalTwoPhaseFlowWithPP process ...");
150 checkMPLProperties(media);
151 DBUG("Media properties verified.");
152
153 ThermalTwoPhaseFlowWithPPProcessData process_data{
154 std::move(media_map), specific_body_force, has_gravity, mass_lumping};
155
156 return std::make_unique<ThermalTwoPhaseFlowWithPPProcess>(
157 std::move(name), mesh, std::move(jacobian_assembler), parameters,
158 integration_order, std::move(process_variables),
159 std::move(process_data), std::move(secondary_variables));
160}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
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.
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