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 =
69 auto const& liquid_phase =
71 checkRequiredProperties(*m.second, required_property_medium);
72 checkRequiredProperties(gas_phase, required_property_gas_phase);
73 checkRequiredProperties(liquid_phase, required_property_liquid_phase);
76 required_property_solid_phase);
77
78 // TODO (BM): should use index to identify components (same for impl.h)
79 checkRequiredProperties(gas_phase.component("w"),
80 required_property_vapour_component);
81 checkRequiredProperties(gas_phase.component("a"),
82 required_property_dry_air_component);
83 checkRequiredProperties(gas_phase.component("c"),
84 required_property_contaminant_vapour_component);
86 liquid_phase.component("c"),
87 required_property_dissolved_contaminant_component);
88 }
89}
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::AqueousLiquid, MaterialPropertyLib::density, MaterialPropertyLib::Gas, MaterialPropertyLib::henry_coefficient, MaterialPropertyLib::longitudinal_dispersivity, MaterialPropertyLib::molar_mass, MaterialPropertyLib::permeability, MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::relative_permeability, MaterialPropertyLib::saturation, MaterialPropertyLib::Solid, 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 91 of file CreateThermalTwoPhaseFlowWithPPProcess.cpp.

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