OGS
ProcessLib::ThermoRichardsMechanics Namespace Reference

Namespaces

namespace  ConstitutiveStress_StrainTemperature
 
namespace  ConstitutiveStressSaturation_StrainPressureTemperature
 
namespace  detail
 

Classes

struct  BiotModel
 
struct  BishopsData
 
struct  BishopsModel
 
struct  CapillaryPressureData
 
struct  DarcyLawData
 
struct  DarcyLawModel
 
struct  ElasticTangentStiffnessData
 
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  LiquidViscosityData
 
struct  LiquidViscosityModel
 
struct  LocalAssemblerInterface
 
class  MaterialStateData
 
struct  MediaData
 
struct  PermeabilityData
 
struct  PermeabilityModel
 
struct  PorosityData
 
struct  PorosityModel
 
struct  PrevState
 Represents a previous state of type T. More...
 
struct  SaturationData
 
struct  SaturationDataDeriv
 
struct  SaturationModel
 
struct  SolidCompressibilityData
 
struct  SolidCompressibilityModel
 
struct  SolidDensityData
 
struct  SolidDensityModel
 
struct  SolidThermalExpansionData
 
struct  SolidThermalExpansionModel
 
struct  SpaceTimeData
 
struct  StrainData
 
struct  SwellingDataStateful
 
struct  SwellingDataStateless
 
struct  SwellingModel
 
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 = MathLib::KelvinVector::KelvinVectorType< DisplacementDim >
 
template<int DisplacementDim>
using KelvinMatrix = MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >
 
template<int DisplacementDim>
using GlobalDimVector = Eigen::Vector< double, DisplacementDim >
 
template<int DisplacementDim>
using GlobalDimMatrix = Eigen::Matrix< double, DisplacementDim, DisplacementDim, Eigen::RowMajor >
 
using BiotData = BaseLib::StrongType< double, struct BiotTag >
 

Functions

template<int DisplacementDim>
constexpr KelvinVector< DisplacementDim > KVnan ()
 Used to set a Kelvin vector to all not-a-number.
 
template<int DisplacementDim>
constexpr KelvinMatrix< DisplacementDim > KMnan ()
 Used to set a Kelvin matrix to all not-a-number.
 
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.
 
template<int DisplacementDim>
constexpr KelvinVector< DisplacementDim > KVzero ()
 Used to set a Kelvin vector to all zero.
 
template<int DisplacementDim>
constexpr KelvinMatrix< DisplacementDim > KMzero ()
 Used to set a Kelvin matrix to all zero.
 
template<typename T >
constexpr bool areEvalArgumentTypesUnique ()
 
template<typename Model >
constexpr void assertEvalArgsUnique (Model const &)
 
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)
 
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)
 

Variables

static constexpr double nan = std::numeric_limits<double>::quiet_NaN()
 Convenience alias for not a number.
 

Typedef Documentation

◆ BiotData

using ProcessLib::ThermoRichardsMechanics::BiotData = typedef BaseLib::StrongType<double, struct BiotTag>

Definition at line 18 of file Biot.h.

◆ GlobalDimMatrix

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::GlobalDimMatrix = typedef Eigen::Matrix<double, DisplacementDim, DisplacementDim, Eigen::RowMajor>

Definition at line 30 of file Base.h.

◆ GlobalDimVector

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

Definition at line 27 of file Base.h.

◆ KelvinMatrix

template<int DisplacementDim>
using ProcessLib::ThermoRichardsMechanics::KelvinMatrix = typedef MathLib::KelvinVector::KelvinMatrixType<DisplacementDim>

Definition at line 24 of file Base.h.

◆ KelvinVector

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

Definition at line 21 of file Base.h.

Function Documentation

◆ areEvalArgumentTypesUnique()

template<typename T >
constexpr bool ProcessLib::ThermoRichardsMechanics::areEvalArgumentTypesUnique ( )
constexpr

Checks whether the argument types of the eval() method of the given type T are unique.

Argument types differing only in constness, reference or volatility are considered equal.

Definition at line 42 of file Invoke.h.

43{
44 return detail::areEvalArgumentTypesUnique(&T::eval);
45}

References ProcessLib::ThermoRichardsMechanics::detail::areEvalArgumentTypesUnique().

◆ assertEvalArgsUnique()

template<typename Model >
constexpr void ProcessLib::ThermoRichardsMechanics::assertEvalArgsUnique ( Model const &  )
constexpr

Statically asserts that the argument types of the passed Model's eval() method are unique.

Definition at line 50 of file Invoke.h.

51{
52 static_assert(areEvalArgumentTypesUnique<std::remove_cvref_t<Model>>());
53}

Referenced by ProcessLib::ThermoRichardsMechanics::ConstitutiveStress_StrainTemperature::ConstitutiveSetting< DisplacementDim >::eval(), and ProcessLib::ThermoRichardsMechanics::ConstitutiveStressSaturation_StrainPressureTemperature::ConstitutiveSetting< DisplacementDim >::eval().

◆ checkMPLProperties()

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

Definition at line 36 of file CreateThermoRichardsMechanicsProcess.cpp.

38{
39 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, MaterialPropertyLib::saturation, 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().

◆ 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 219 of file CreateThermoRichardsMechanicsProcess.cpp.

230{
232 config.checkConfigParameter("type", "THERMO_RICHARDS_MECHANICS");
233 DBUG("Create ThermoRichardsMechanicsProcess.");
234
235 auto const subtype =
237 config.getConfigParameter<std::string>("subtype",
238 "Stress_StrainTemperature");
239 INFO("TRM process subtype is '{}'", subtype);
240
241 if (subtype == "Stress_StrainTemperature")
242 {
244 DisplacementDim,
246 DisplacementDim>,
248 DisplacementDim>>(
249 name, mesh, std::move(jacobian_assembler), variables, parameters,
250 local_coordinate_system, integration_order, config, media);
251 }
252
253 if (subtype == "StressSaturation_StrainPressureTemperature")
254 {
255#ifdef OGS_USE_MFRONT
256 return createThermoRichardsMechanicsProcessStage2<
257 DisplacementDim,
258 ConstitutiveStressSaturation_StrainPressureTemperature::
259 ConstitutiveTraits<DisplacementDim>,
260 ConstitutiveStressSaturation_StrainPressureTemperature::
261 CreateConstitutiveSetting<DisplacementDim>>(
262 name, mesh, std::move(jacobian_assembler), variables, parameters,
263 local_coordinate_system, integration_order, config, media);
264#else
265 OGS_FATAL(
266 "TRM process subtype 'StressSaturation_StrainPressureTemperature' "
267 "is not supported, because OGS has not been built with MFront.");
268#endif
269 }
270
271 OGS_FATAL("Unknown TRM process subtype '{}'.", subtype);
272}
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)

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 
)
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__initial_stress
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

Definition at line 79 of file CreateThermoRichardsMechanicsProcess.cpp.

90{
91 auto const coupling_scheme =
93 config.getConfigParameterOptional<std::string>("coupling_scheme");
94 const bool use_monolithic_scheme =
95 !(coupling_scheme && (*coupling_scheme == "staggered"));
96
98
100 auto const pv_config = config.getConfigSubtree("process_variables");
101
102 ProcessVariable* variable_T;
103 ProcessVariable* variable_p;
104 ProcessVariable* variable_u;
105 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
106 process_variables;
107 if (use_monolithic_scheme) // monolithic scheme.
108 {
111 auto per_process_variables = findProcessVariables(
112 variables, pv_config,
113 {
114 "temperature",
116 "pressure",
118 "displacement"});
119 variable_T = &per_process_variables[0].get();
120 variable_p = &per_process_variables[1].get();
121 variable_u = &per_process_variables[2].get();
122 process_variables.push_back(std::move(per_process_variables));
123 }
124 else // staggered scheme.
125 {
126 OGS_FATAL(
127 "So far, only the monolithic scheme is implemented for "
128 "THERMO_RICHARDS_MECHANICS");
129 }
130
131 checkProcessVariableComponents(*variable_T, 1);
132 checkProcessVariableComponents(*variable_p, 1);
133 checkProcessVariableComponents(*variable_u, DisplacementDim);
134
136
137 auto solid_constitutive_relations =
138 CreateConstitutiveSetting::createSolidConstitutiveRelations(
139 parameters, local_coordinate_system, config);
140
141 // Specific body force
142 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
143 {
144 std::vector<double> const b =
146 config.getConfigParameter<std::vector<double>>(
147 "specific_body_force");
148 if (b.size() != DisplacementDim)
149 {
150 OGS_FATAL(
151 "The size of the specific body force vector does not match the "
152 "displacement dimension. Vector size is {:d}, displacement "
153 "dimension is {:d}",
154 b.size(), DisplacementDim);
155 }
156
157 std::copy_n(b.data(), b.size(), specific_body_force.data());
158 }
159
160 auto media_map =
162 DBUG(
163 "Check the media properties of ThermoRichardsMechanics process "
164 "...");
165 checkMPLProperties(media);
166 DBUG("Media properties verified.");
167
168 // Initial stress conditions
169 auto const initial_stress = ParameterLib::findOptionalTagParameter<double>(
171 config, "initial_stress", parameters,
172 // Symmetric tensor size, 4 or 6, not a Kelvin vector.
174 &mesh);
175
176 bool mass_lumping = false;
177 if (auto const mass_lumping_ptr =
179 config.getConfigParameterOptional<bool>("mass_lumping"))
180 {
181 DBUG("Using mass lumping for the Richards flow equation.");
182 mass_lumping = *mass_lumping_ptr;
183 }
184
185 bool const apply_body_force_for_deformation =
187 config.getConfigParameter<bool>("apply_body_force_for_deformation",
188 true);
189
190 const bool use_TaylorHood_elements =
191 variable_p->getShapeFunctionOrder() !=
192 variable_u->getShapeFunctionOrder()
193 ? true
194 : false;
195
196 ThermoRichardsMechanicsProcessData<DisplacementDim, ConstitutiveTraits>
197 process_data{materialIDs(mesh),
198 std::move(media_map),
199 std::move(solid_constitutive_relations),
200 initial_stress,
201 specific_body_force,
202 mass_lumping,
203 use_TaylorHood_elements,
204 apply_body_force_for_deformation};
205
206 SecondaryVariableCollection secondary_variables;
207
208 ProcessLib::createSecondaryVariables(config, secondary_variables);
209
210 return std::make_unique<
211 ThermoRichardsMechanicsProcess<DisplacementDim, ConstitutiveTraits>>(
212 name, mesh, std::move(jacobian_assembler), parameters,
213 integration_order, std::move(process_variables),
214 std::move(process_data), std::move(secondary_variables),
215 use_monolithic_scheme);
216}
unsigned getShapeFunctionOrder() const
MaterialSpatialDistributionMap createMaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium > > const &media, MeshLib::Mesh const &mesh)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Definition: KelvinVector.h:24
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition: Mesh.cpp:258
void checkMPLProperties(MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map)
void checkProcessVariableComponents(ProcessVariable const &variable)
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 checkMPLProperties(), checkProcessVariableComponents(), MaterialPropertyLib::createMaterialSpatialDistributionMap(), ProcessLib::createSecondaryVariables(), DBUG(), ProcessLib::findProcessVariables(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterOptional(), BaseLib::ConfigTree::getConfigSubtree(), ProcessLib::ProcessVariable::getShapeFunctionOrder(), MathLib::KelvinVector::kelvin_vector_dimensions(), and OGS_FATAL.

Referenced by createThermoRichardsMechanicsProcess().

◆ DMnan()

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

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

Definition at line 59 of file Base.h.

60{
62}
Eigen::Matrix< double, DisplacementDim, DisplacementDim, Eigen::RowMajor > GlobalDimMatrix
Definition: Base.h:31

References nan.

◆ DVnan()

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

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

Definition at line 52 of file Base.h.

53{
55}
Eigen::Vector< double, DisplacementDim > GlobalDimVector
Definition: Base.h:27

References nan.

◆ KMnan()

template<int DisplacementDim>
constexpr KelvinMatrix< DisplacementDim > ProcessLib::ThermoRichardsMechanics::KMnan ( )
constexpr

Used to set a Kelvin matrix to all not-a-number.

Definition at line 45 of file Base.h.

46{
48}
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > KelvinMatrix
Definition: Base.h:24

References nan.

◆ KMzero()

template<int DisplacementDim>
constexpr KelvinMatrix< DisplacementDim > ProcessLib::ThermoRichardsMechanics::KMzero ( )
constexpr

Used to set a Kelvin matrix to all zero.

Definition at line 73 of file Base.h.

◆ KVnan()

template<int DisplacementDim>
constexpr KelvinVector< DisplacementDim > ProcessLib::ThermoRichardsMechanics::KVnan ( )
constexpr

Used to set a Kelvin vector to all not-a-number.

Definition at line 38 of file Base.h.

39{
41}
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > KelvinVector
Definition: Base.h:21

References nan.

◆ KVzero()

template<int DisplacementDim>
constexpr KelvinVector< DisplacementDim > ProcessLib::ThermoRichardsMechanics::KVzero ( )
constexpr

Used to set a Kelvin vector to all zero.

Definition at line 66 of file Base.h.

Variable Documentation

◆ nan

constexpr double ProcessLib::ThermoRichardsMechanics::nan = std::numeric_limits<double>::quiet_NaN()
staticconstexpr

Convenience alias for not a number.

Definition at line 34 of file Base.h.

Referenced by DMnan(), DVnan(), KMnan(), and KVnan().