OGS
ProcessLib::ThermoRichardsMechanics Namespace Reference

Namespaces

namespace  ConstitutiveStress_StrainTemperature
 
namespace  ConstitutiveStressSaturation_StrainPressureTemperature
 

Classes

struct  BiotModel
 
struct  BishopsData
 
struct  BishopsModel
 
struct  BishopsPrevModel
 
struct  CapillaryPressureData
 
struct  DarcyLawModel
 
struct  EqPData
 
struct  EqPModel
 
struct  EqTData
 
struct  EqTModel
 
struct  EquivalentPlasticStrainData
 
struct  FluidThermalExpansionData
 
struct  FluidThermalExpansionModel
 
struct  GravityData
 
struct  GravityModel
 
struct  IntegrationPointData
 
struct  LiquidDensityData
 
struct  LiquidDensityModel
 
struct  LiquidViscosityModel
 
struct  LocalAssemblerInterface
 
class  MaterialStateData
 
struct  MediaData
 
struct  PermeabilityData
 
struct  PermeabilityModel
 
struct  PorosityData
 
struct  PorosityModel
 
struct  SaturationData
 
struct  SaturationDataDeriv
 
struct  SaturationModel
 
struct  SolidCompressibilityData
 
struct  SolidDensityData
 
struct  SolidDensityModel
 
struct  SolidMechanicsDataStateless
 
struct  SolidThermalExpansionData
 
struct  SolidThermalExpansionModel
 
struct  SpecificBodyForceData
 
struct  TemperatureData
 
struct  ThermoOsmosisData
 
struct  ThermoOsmosisModel
 
class  ThermoRichardsMechanicsLocalAssembler
 
struct  ThermoRichardsMechanicsLocalAssembler3Args
 
class  ThermoRichardsMechanicsProcess
 Global assembler for the monolithic scheme of the non-isothermal Richards flow coupled with mechanics. More...
 
struct  ThermoRichardsMechanicsProcessData
 
struct  TotalStressData
 
struct  TransportPorosityData
 
struct  TransportPorosityModel
 
struct  TRMHeatStorageAndFluxData
 
struct  TRMHeatStorageAndFluxModel
 
struct  TRMStorageData
 
struct  TRMStorageModel
 
struct  TRMVaporDiffusionData
 
struct  TRMVaporDiffusionModel
 

Typedefs

template<int DisplacementDim>
using KelvinVector = KV::KelvinVectorType<DisplacementDim>
 
template<int DisplacementDim>
using KelvinMatrix = KV::KelvinMatrixType<DisplacementDim>
 
template<int DisplacementDim>
using GlobalDimVector = Eigen::Vector<double, DisplacementDim>
 
template<int DisplacementDim>
using GlobalDimMatrix
 
using BiotData = BaseLib::StrongType<double, struct BiotTag>
 
template<int DisplacementDim>
using DarcyLawData
 
using LiquidViscosityData
 
using InitializePorosityFromMediumProperty
 A type helping to avoid confusion of different boolean values.
 

Functions

template<int D>
constexpr GlobalDimVector< D > DVnan ()
 Used to set a D dimensional vector to all not-a-number.
 
template<int D>
constexpr GlobalDimMatrix< D > DMnan ()
 Used to set a D x D matrix to all not-a-number.
 
static void bishopsModelEvalImpl (SpaceTimeData const &x_t, MediaData const &media_data, SaturationData const &S_L_data, BishopsData &out)
 
constexpr std::string_view ioName (struct DarcyLawDataTag *)
 
constexpr std::string_view ioName (struct LiquidViscosityDataTag *)
 
template<int DisplacementDim, typename ConstitutiveTraits >
void createLocalAssemblers (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface< DisplacementDim, ConstitutiveTraits > > > &local_assemblers, NumLib::IntegrationOrder const integration_order, bool const is_axially_symmetric, ThermoRichardsMechanicsProcessData< DisplacementDim, ConstitutiveTraits > &process_data)
 
template void createLocalAssemblers< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > > (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > > > > &local_assemblers, NumLib::IntegrationOrder const integration_order, bool const is_axially_symmetric, ThermoRichardsMechanicsProcessData< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > > &process_data)
 
template void createLocalAssemblers< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > > (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > > > > &local_assemblers, NumLib::IntegrationOrder const integration_order, bool const is_axially_symmetric, ThermoRichardsMechanicsProcessData< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > > &process_data)
 
template void createLocalAssemblers< 2, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 2 > > (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface< 2, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 2 > > > > &local_assemblers, NumLib::IntegrationOrder const integration_order, bool const is_axially_symmetric, ThermoRichardsMechanicsProcessData< 2, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 2 > > &process_data)
 
template void createLocalAssemblers< 3, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 3 > > (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface< 3, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 3 > > > > &local_assemblers, NumLib::IntegrationOrder const integration_order, bool const is_axially_symmetric, ThermoRichardsMechanicsProcessData< 3, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 3 > > &process_data)
 
void checkMPLProperties (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
void checkProcessVariableComponents (ProcessVariable const &variable, const int dim)
 
template<int DisplacementDim, typename ConstitutiveTraits , typename CreateConstitutiveSetting >
std::unique_ptr< ProcesscreateThermoRichardsMechanicsProcessStage2 (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, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media, bool const mandatory_stress0_type)
 
template<int DisplacementDim>
std::unique_ptr< ProcesscreateThermoRichardsMechanicsProcess (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, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
template std::unique_ptr< ProcesscreateThermoRichardsMechanicsProcess< 2 > (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, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
template std::unique_ptr< ProcesscreateThermoRichardsMechanicsProcess< 3 > (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, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 

Typedef Documentation

◆ BiotData

Definition at line 18 of file Biot.h.

◆ DarcyLawData

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::DarcyLawData
Initial value:

Definition at line 23 of file DarcyLaw.h.

◆ GlobalDimMatrix

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::GlobalDimMatrix
Initial value:
Eigen::Matrix<double, DisplacementDim, DisplacementDim, Eigen::RowMajor>

Definition at line 35 of file Base.h.

◆ GlobalDimVector

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::GlobalDimVector = Eigen::Vector<double, DisplacementDim>

Definition at line 32 of file Base.h.

◆ InitializePorosityFromMediumProperty

◆ KelvinMatrix

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::KelvinMatrix = KV::KelvinMatrixType<DisplacementDim>

Definition at line 29 of file Base.h.

◆ KelvinVector

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::KelvinVector = KV::KelvinVectorType<DisplacementDim>

Definition at line 26 of file Base.h.

◆ LiquidViscosityData

Function Documentation

◆ bishopsModelEvalImpl()

static void ProcessLib::ThermoRichardsMechanics::bishopsModelEvalImpl ( SpaceTimeData const & x_t,
MediaData const & media_data,
SaturationData const & S_L_data,
BishopsData & out )
static

Definition at line 15 of file Bishops.cpp.

19{
20 namespace MPL = MaterialPropertyLib;
21 MPL::VariableArray variables;
22 variables.liquid_saturation = S_L_data.S_L;
23
24 auto const& medium = media_data.medium;
25
26 out.chi_S_L = medium.property(MPL::PropertyType::bishops_effective_stress)
27 .template value<double>(variables, x_t.x, x_t.t, x_t.dt);
28
29 out.dchi_dS_L = medium.property(MPL::PropertyType::bishops_effective_stress)
30 .template dValue<double>(
31 variables, MPL::Variable::liquid_saturation, x_t.x,
32 x_t.t, x_t.dt);
33}

References ProcessLib::ThermoRichardsMechanics::BishopsData::chi_S_L, ProcessLib::ThermoRichardsMechanics::BishopsData::dchi_dS_L, ProcessLib::ConstitutiveRelations::SpaceTimeData::dt, MaterialPropertyLib::VariableArray::liquid_saturation, ProcessLib::ThermoRichardsMechanics::MediaData::medium, ProcessLib::ThermoRichardsMechanics::SaturationData::S_L, ProcessLib::ConstitutiveRelations::SpaceTimeData::t, and ProcessLib::ConstitutiveRelations::SpaceTimeData::x.

Referenced by ProcessLib::ThermoRichardsMechanics::BishopsModel::eval(), and ProcessLib::ThermoRichardsMechanics::BishopsPrevModel::eval().

◆ checkMPLProperties()

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

Definition at line 37 of file CreateThermoRichardsMechanicsProcess.cpp.

39{
40 std::array const required_medium_properties = {
44 std::array const required_liquid_properties = {
46 std::array const required_solid_properties = {MaterialPropertyLib::density};
47
48 // Thermal properties are not checked because they can be phase property or
49 // medium property (will be enabled later).
50 for (auto const& m : media)
51 {
52 checkRequiredProperties(*m.second, required_medium_properties);
53 checkRequiredProperties(m.second->phase("AqueousLiquid"),
54 required_liquid_properties);
55 checkRequiredProperties(m.second->phase("Solid"),
56 required_solid_properties);
57 }
58}
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
Definition Component.cpp:60

References MaterialPropertyLib::biot_coefficient, MaterialPropertyLib::bishops_effective_stress, MaterialPropertyLib::density, MaterialPropertyLib::porosity, MaterialPropertyLib::relative_permeability, and MaterialPropertyLib::viscosity.

Referenced by createThermoRichardsMechanicsProcessStage2().

◆ checkProcessVariableComponents()

void ProcessLib::ThermoRichardsMechanics::checkProcessVariableComponents ( ProcessVariable const & variable,
const int dim )

Definition at line 60 of file CreateThermoRichardsMechanicsProcess.cpp.

62{
63 DBUG("Associate displacement with process variable '{:s}'.",
64 variable.getName());
65
66 if (variable.getNumberOfGlobalComponents() != dim)
67 {
69 "Number of components of the process variable '{:s}' is different "
70 "from the displacement dimension: got {:d}, expected {:d}",
71 variable.getName(),
72 variable.getNumberOfGlobalComponents(),
73 dim);
74 }
75}
#define OGS_FATAL(...)
Definition Error.h:26
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

References DBUG(), ProcessLib::ProcessVariable::getName(), ProcessLib::ProcessVariable::getNumberOfGlobalComponents(), and OGS_FATAL.

Referenced by createThermoRichardsMechanicsProcessStage2().

◆ createLocalAssemblers()

template<int DisplacementDim, typename ConstitutiveTraits >
void ProcessLib::ThermoRichardsMechanics::createLocalAssemblers ( std::vector< MeshLib::Element * > const & mesh_elements,
NumLib::LocalToGlobalIndexMap const & dof_table,
std::vector< std::unique_ptr< LocalAssemblerInterface< DisplacementDim, ConstitutiveTraits > > > & local_assemblers,
NumLib::IntegrationOrder const integration_order,
bool const is_axially_symmetric,
ThermoRichardsMechanicsProcessData< DisplacementDim, ConstitutiveTraits > & process_data )

Definition at line 35 of file CreateThermoRichardsMechanicsLocalAssemblers.cpp.

45{
47 DisplacementDim,
49 ConstitutiveTraits>::template LocalAssemblerImplementation>(
50 mesh_elements, dof_table, local_assemblers, integration_order,
51 is_axially_symmetric, process_data);
52}
void createLocalAssemblersHM(std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ProviderOrOrder const &provider_or_order, ExtraCtorArgs &&... extra_ctor_args)

References ProcessLib::createLocalAssemblersHM().

Referenced by ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsProcess< DisplacementDim, ConstitutiveTraits >::initializeConcreteProcess().

◆ createLocalAssemblers< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > >()

template void ProcessLib::ThermoRichardsMechanics::createLocalAssemblers< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > > ( std::vector< MeshLib::Element * > const & mesh_elements,
NumLib::LocalToGlobalIndexMap const & dof_table,
std::vector< std::unique_ptr< LocalAssemblerInterface< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > > > > & local_assemblers,
NumLib::IntegrationOrder const integration_order,
bool const is_axially_symmetric,
ThermoRichardsMechanicsProcessData< 2, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 2 > > & process_data )

◆ createLocalAssemblers< 2, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 2 > >()

◆ createLocalAssemblers< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > >()

template void ProcessLib::ThermoRichardsMechanics::createLocalAssemblers< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > > ( std::vector< MeshLib::Element * > const & mesh_elements,
NumLib::LocalToGlobalIndexMap const & dof_table,
std::vector< std::unique_ptr< LocalAssemblerInterface< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > > > > & local_assemblers,
NumLib::IntegrationOrder const integration_order,
bool const is_axially_symmetric,
ThermoRichardsMechanicsProcessData< 3, ConstitutiveStress_StrainTemperature::ConstitutiveTraits< 3 > > & process_data )

◆ createLocalAssemblers< 3, ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveTraits< 3 > >()

◆ createThermoRichardsMechanicsProcess()

template<int DisplacementDim>
std::unique_ptr< Process > ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess ( 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,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
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
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__subtype

Definition at line 220 of file CreateThermoRichardsMechanicsProcess.cpp.

231{
233 config.checkConfigParameter("type", "THERMO_RICHARDS_MECHANICS");
234 DBUG("Create ThermoRichardsMechanicsProcess.");
235
236 auto const subtype =
238 config.getConfigParameter<std::string>("subtype",
239 "Stress_StrainTemperature");
240 INFO("TRM process subtype is '{}'", subtype);
241
242 if (subtype == "Stress_StrainTemperature")
243 {
244 bool const mandatory_stress0_type = false;
246 DisplacementDim,
248 DisplacementDim>,
250 DisplacementDim>>(name, mesh, std::move(jacobian_assembler),
251 variables, parameters,
252 local_coordinate_system, integration_order,
253 config, media, mandatory_stress0_type);
254 }
255
256 if (subtype == "StressSaturation_StrainPressureTemperature")
257 {
258#ifdef OGS_USE_MFRONT
259 bool const mandatory_stress0_type = true;
260 return createThermoRichardsMechanicsProcessStage2<
261 DisplacementDim,
262 ConstitutiveStressSaturation_StrainPressureTemperature::
263 ConstitutiveTraits<DisplacementDim>,
264 ConstitutiveStressSaturation_StrainPressureTemperature::
265 CreateConstitutiveSetting<DisplacementDim>>(
266 name, mesh, std::move(jacobian_assembler), variables, parameters,
267 local_coordinate_system, integration_order, config, media,
268 mandatory_stress0_type);
269#else
270 OGS_FATAL(
271 "TRM process subtype 'StressSaturation_StrainPressureTemperature' "
272 "is not supported, because OGS has not been built with MFront.");
273#endif
274 }
275
276 OGS_FATAL("Unknown TRM process subtype '{}'.", subtype);
277}
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:35
std::unique_ptr< Process > createThermoRichardsMechanicsProcessStage2(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, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media, bool const mandatory_stress0_type)

References BaseLib::ConfigTree::checkConfigParameter(), createThermoRichardsMechanicsProcessStage2(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), INFO(), and OGS_FATAL.

◆ createThermoRichardsMechanicsProcess< 2 >()

template std::unique_ptr< Process > ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess< 2 > ( 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,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )

◆ createThermoRichardsMechanicsProcess< 3 >()

template std::unique_ptr< Process > ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess< 3 > ( 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,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )

◆ createThermoRichardsMechanicsProcessStage2()

template<int DisplacementDim, typename ConstitutiveTraits , typename CreateConstitutiveSetting >
std::unique_ptr< Process > ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcessStage2 ( 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,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media,
bool const mandatory_stress0_type )
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__coupling_scheme

Process Variables

Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables

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

Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables__temperature
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables__pressure
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__process_variables__displacement

Process Parameters

Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__specific_body_force
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__mass_lumping
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__apply_body_force_for_deformation
Input File Parameter
prj__processes__process__THERMO_RICHARDS_MECHANICS__initialize_porosity_from_medium_property

Definition at line 79 of file CreateThermoRichardsMechanicsProcess.cpp.

89{
90 auto const coupling_scheme =
92 config.getConfigParameterOptional<std::string>("coupling_scheme");
93 const bool use_monolithic_scheme =
94 !(coupling_scheme && (*coupling_scheme == "staggered"));
95
97
99 auto const pv_config = config.getConfigSubtree("process_variables");
100
101 ProcessVariable* variable_T;
102 ProcessVariable* variable_p;
103 ProcessVariable* variable_u;
104 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
105 process_variables;
106 if (use_monolithic_scheme) // monolithic scheme.
107 {
110 auto per_process_variables = findProcessVariables(
111 variables, pv_config,
112 {
113 "temperature",
115 "pressure",
117 "displacement"});
118 variable_T = &per_process_variables[0].get();
119 variable_p = &per_process_variables[1].get();
120 variable_u = &per_process_variables[2].get();
121 process_variables.push_back(std::move(per_process_variables));
122 }
123 else // staggered scheme.
124 {
125 OGS_FATAL(
126 "So far, only the monolithic scheme is implemented for "
127 "THERMO_RICHARDS_MECHANICS");
128 }
129
130 checkProcessVariableComponents(*variable_T, 1);
131 checkProcessVariableComponents(*variable_p, 1);
132 checkProcessVariableComponents(*variable_u, DisplacementDim);
133
135
136 auto solid_constitutive_relations =
137 CreateConstitutiveSetting::createSolidConstitutiveRelations(
138 parameters, local_coordinate_system, materialIDs(mesh), config);
139
140 // Specific body force
141 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
142 {
143 std::vector<double> const b =
145 config.getConfigParameter<std::vector<double>>(
146 "specific_body_force");
147 if (b.size() != DisplacementDim)
148 {
149 OGS_FATAL(
150 "The size of the specific body force vector does not match the "
151 "displacement dimension. Vector size is {:d}, displacement "
152 "dimension is {:d}",
153 b.size(), DisplacementDim);
154 }
155
156 std::copy_n(b.data(), b.size(), specific_body_force.data());
157 }
158
159 auto media_map =
161 DBUG(
162 "Check the media properties of ThermoRichardsMechanics process "
163 "...");
164 checkMPLProperties(media);
165 DBUG("Media properties verified.");
166
168 config, parameters, mesh, mandatory_stress0_type);
169
170 bool mass_lumping = false;
171 if (auto const mass_lumping_ptr =
173 config.getConfigParameterOptional<bool>("mass_lumping"))
174 {
175 DBUG("Using mass lumping for the Richards flow equation.");
176 mass_lumping = *mass_lumping_ptr;
177 }
178
179 bool const apply_body_force_for_deformation =
181 config.getConfigParameter<bool>("apply_body_force_for_deformation",
182 true);
183
184 bool const initialize_porosity_from_medium_property =
186 config.getConfigParameter("initialize_porosity_from_medium_property",
187 true);
188
189 const bool use_TaylorHood_elements =
190 variable_p->getShapeFunctionOrder() !=
191 variable_u->getShapeFunctionOrder()
192 ? true
193 : false;
194
195 ThermoRichardsMechanicsProcessData<DisplacementDim, ConstitutiveTraits>
196 process_data{materialIDs(mesh),
197 std::move(media_map),
198 std::move(solid_constitutive_relations),
199 std::move(initial_stress),
200 specific_body_force,
201 mass_lumping,
202 use_TaylorHood_elements,
203 apply_body_force_for_deformation,
205 initialize_porosity_from_medium_property}};
206
207 SecondaryVariableCollection secondary_variables;
208
209 ProcessLib::createSecondaryVariables(config, secondary_variables);
210
211 return std::make_unique<
212 ThermoRichardsMechanicsProcess<DisplacementDim, ConstitutiveTraits>>(
213 name, mesh, std::move(jacobian_assembler), parameters,
214 integration_order, std::move(process_variables),
215 std::move(process_data), std::move(secondary_variables),
216 use_monolithic_scheme);
217}
unsigned getShapeFunctionOrder() const
MaterialSpatialDistributionMap createMaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium > > const &media, MeshLib::Mesh const &mesh)
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition Mesh.cpp:268
void checkMPLProperties(MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map)
void checkProcessVariableComponents(ProcessVariable const &variable)
BaseLib::StrongType< bool, struct InitializePorosityFromMediumPropertyTag > InitializePorosityFromMediumProperty
A type helping to avoid confusion of different boolean values.
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
InitialStress createInitialStress(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, MeshLib::Mesh const &mesh, bool const mandatory_stress_type)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References checkMPLProperties(), checkProcessVariableComponents(), ProcessLib::createInitialStress(), MaterialPropertyLib::createMaterialSpatialDistributionMap(), ProcessLib::createSecondaryVariables(), DBUG(), ProcessLib::findProcessVariables(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterOptional(), BaseLib::ConfigTree::getConfigSubtree(), ProcessLib::ProcessVariable::getShapeFunctionOrder(), and OGS_FATAL.

Referenced by createThermoRichardsMechanicsProcess().

◆ DMnan()

template<int D>
GlobalDimMatrix< D > ProcessLib::ThermoRichardsMechanics::DMnan ( )
constexpr

Used to set a D x D matrix to all not-a-number.

Definition at line 47 of file Base.h.

48{
50}
Eigen::Matrix< double, DisplacementDim, DisplacementDim, Eigen::RowMajor > GlobalDimMatrix
Definition Base.h:35

References ProcessLib::ConstitutiveRelations::nan.

◆ DVnan()

template<int D>
GlobalDimVector< D > ProcessLib::ThermoRichardsMechanics::DVnan ( )
constexpr

Used to set a D dimensional vector to all not-a-number.

Definition at line 40 of file Base.h.

41{
43}
Eigen::Vector< double, DisplacementDim > GlobalDimVector
Definition Base.h:32

References ProcessLib::ConstitutiveRelations::nan.

◆ ioName() [1/2]

std::string_view ProcessLib::ThermoRichardsMechanics::ioName ( struct DarcyLawDataTag * )
constexpr

Definition at line 26 of file DarcyLaw.h.

27{
28 return "velocity";
29}

◆ ioName() [2/2]

std::string_view ProcessLib::ThermoRichardsMechanics::ioName ( struct LiquidViscosityDataTag * )
constexpr

Definition at line 22 of file LiquidViscosity.h.

23{
24 return "viscosity";
25}