OGS
ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim > Class Template Referencefinal

Detailed Description

template<int DisplacementDim>
class ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >

Thermally induced deformation process in linear kinematics poro-mechanical/biphasic model.

The mixture momentum balance, the mixture mass balance and the mixture energy balance are solved under fully saturated conditions.

Definition at line 23 of file ThermoHydroMechanicsProcess.h.

#include <ThermoHydroMechanicsProcess.h>

Inheritance diagram for ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >:
[legend]
Collaboration diagram for ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >:
[legend]

Public Member Functions

THERMOHYDROMECHANICS_EXPORT ThermoHydroMechanicsProcess (std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > &&process_variables, ThermoHydroMechanicsProcessData< DisplacementDim > &&process_data, SecondaryVariableCollection &&secondary_variables, bool const use_monolithic_scheme, bool const is_linear)
THERMOHYDROMECHANICS_EXPORT MathLib::MatrixSpecifications getMatrixSpecifications (const int process_id) const override
ODESystem interface
THERMOHYDROMECHANICS_EXPORT bool isLinear () const override
Public Member Functions inherited from ProcessLib::Process
 Process (std::string name_, MeshLib::Mesh &mesh, std::unique_ptr< AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > &&process_variables, SecondaryVariableCollection &&secondary_variables, const bool use_monolithic_scheme=true)
void preTimestep (std::vector< GlobalVector * > const &x, const double t, const double delta_t, const int process_id)
 Preprocessing before starting assembly for new timestep.
void postTimestep (std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, const double delta_t, int const process_id)
 Postprocessing after a complete timestep.
void postNonLinearSolver (std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, double const dt, int const process_id)
void preIteration (const unsigned iter, GlobalVector const &x) final
void computeSecondaryVariable (double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
 compute secondary variables for the coupled equations or for output.
NumLib::IterationResult postIteration (GlobalVector const &x) final
void initialize (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
void setInitialConditions (std::vector< GlobalVector * > &process_solutions, std::vector< GlobalVector * > const &process_solutions_prev, double const t, int const process_id)
MathLib::MatrixSpecifications getMatrixSpecifications (const int process_id) const override
void updateDeactivatedSubdomains (double const time, const int process_id)
virtual bool isMonolithicSchemeUsed () const
virtual void extrapolateIntegrationPointValuesToNodes (const double, std::vector< GlobalVector * > const &, std::vector< GlobalVector * > &)
void preAssemble (const double t, double const dt, GlobalVector const &x) final
void assemble (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) final
void assembleWithJacobian (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac) final
void preOutput (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id)
std::vector< NumLib::IndexValueVector< GlobalIndexType > > const * getKnownSolutions (double const t, GlobalVector const &x, int const process_id) const final
MeshLib::MeshgetMesh () const
std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > const & getProcessVariables () const
std::vector< std::reference_wrapper< ProcessVariable > > const & getProcessVariables (const int process_id) const
std::vector< std::size_t > const & getActiveElementIDs () const
SecondaryVariableCollection const & getSecondaryVariables () const
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const & getIntegrationPointWriters () const
virtual Eigen::Vector3d getFlux (std::size_t, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &) const
virtual void solveReactionEquation (std::vector< GlobalVector * > &, std::vector< GlobalVector * > const &, double const, double const, NumLib::EquationSystem &, int const)
bool requiresNormalization () const override
Public Member Functions inherited from ProcessLib::SubmeshAssemblySupport
virtual ~SubmeshAssemblySupport ()=default

Private Member Functions

void constructDofTable () override
void initializeConcreteProcess (NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
 Process specific initialization called by initialize().
void initializeBoundaryConditions (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media) override
void setInitialConditionsConcreteProcess (std::vector< GlobalVector * > &x, double const t, int const process_id) override
void assembleConcreteProcess (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
void assembleWithJacobianConcreteProcess (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac) override
void preTimestepConcreteProcess (std::vector< GlobalVector * > const &x, double const t, double const dt, const int process_id) override
void postTimestepConcreteProcess (std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, const double dt, int const process_id) override
std::vector< std::vector< std::string > > initializeAssemblyOnSubmeshes (std::vector< std::reference_wrapper< MeshLib::Mesh > > const &meshes) override
THERMOHYDROMECHANICS_EXPORT NumLib::LocalToGlobalIndexMap const & getDOFTable (const int process_id) const override
void computeSecondaryVariableConcrete (double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, const int process_id) override
std::tuple< NumLib::LocalToGlobalIndexMap *, bool > getDOFTableForExtrapolatorData () const override
bool hasMechanicalProcess (int const process_id) const
Private Member Functions inherited from ProcessLib::AssemblyMixin< ThermoHydroMechanicsProcess< DisplacementDim > >
void initializeAssemblyOnSubmeshes (std::vector< std::reference_wrapper< MeshLib::Mesh > > const &submeshes, std::vector< std::vector< std::string > > const &residuum_names)
void updateActiveElements ()
void assemble (double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, std::vector< std::size_t > const *const sorted_element_subset=nullptr, bool const copy_residua_to_mesh=false)
void assembleWithJacobian (double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac, std::vector< std::size_t > const *const sorted_element_subset=nullptr, bool const copy_residua_to_mesh=false)
void preOutput (double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id)

Private Attributes

std::vector< MeshLib::Node * > _base_nodes
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_base_nodes
ThermoHydroMechanicsProcessData< DisplacementDim > _process_data
std::vector< std::unique_ptr< LocalAssemblerInterface< DisplacementDim > > > local_assemblers_
std::unique_ptr< NumLib::LocalToGlobalIndexMap_local_to_global_index_map_single_component
std::unique_ptr< NumLib::LocalToGlobalIndexMap_local_to_global_index_map_with_base_nodes
GlobalSparsityPattern _sparsity_pattern_with_linear_element

Friends

class AssemblyMixin< ThermoHydroMechanicsProcess< DisplacementDim > >

Additional Inherited Members

Public Attributes inherited from ProcessLib::Process
std::string const name
Static Public Attributes inherited from ProcessLib::Process
static PROCESSLIB_EXPORT const std::string constant_one_parameter_name = "constant_one"
Protected Member Functions inherited from ProcessLib::Process
std::vector< NumLib::LocalToGlobalIndexMap const * > getDOFTables (int const number_of_processes) const
NumLib::ExtrapolatorgetExtrapolator () const
NumLib::LocalToGlobalIndexMap const & getSingleComponentDOFTable () const
void initializeProcessBoundaryConditionsAndSourceTerms (const NumLib::LocalToGlobalIndexMap &dof_table, const int process_id, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
void constructMonolithicProcessDofTable ()
void constructDofTableOfSpecifiedProcessStaggeredScheme (const int specified_process_id)
std::vector< GlobalIndexTypegetIndicesOfResiduumWithoutInitialCompensation () const override
void setReleaseNodalForces (GlobalVector const *r_neq, int const process_id) override
Protected Attributes inherited from ProcessLib::Process
MeshLib::Mesh_mesh
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_all_nodes
std::unique_ptr< NumLib::LocalToGlobalIndexMap_local_to_global_index_map
SecondaryVariableCollection _secondary_variables
CellAverageData cell_average_data_
std::unique_ptr< ProcessLib::AbstractJacobianAssembler_jacobian_assembler
VectorMatrixAssembler _global_assembler
const bool _use_monolithic_scheme
unsigned const _integration_order
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > _integration_point_writer
GlobalSparsityPattern _sparsity_pattern
std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > _process_variables
std::vector< BoundaryConditionCollection_boundary_conditions

Constructor & Destructor Documentation

◆ ThermoHydroMechanicsProcess()

template<int DisplacementDim>
ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::ThermoHydroMechanicsProcess ( std::string name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
unsigned const integration_order,
std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > && process_variables,
ThermoHydroMechanicsProcessData< DisplacementDim > && process_data,
SecondaryVariableCollection && secondary_variables,
bool const use_monolithic_scheme,
bool const is_linear )

Definition at line 23 of file ThermoHydroMechanicsProcess.cpp.

39
40{
41 // For numerical Jacobian
42 if (this->_jacobian_assembler->isPerturbationEnabled())
43 {
45 "Numerical Jacobian is not supported for the "
46 "ThermoHydroMechanicsProcess yet.");
47 }
48
49 _integration_point_writer.emplace_back(
51 "sigma_ip",
52 static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/,
55
56 _integration_point_writer.emplace_back(
58 "epsilon_m_ip",
59 static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/,
62
63 _integration_point_writer.emplace_back(
65 "epsilon_ip",
66 static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/,
69}
#define OGS_FATAL(...)
Definition Error.h:19
std::string const name
Definition Process.h:361
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > _integration_point_writer
Definition Process.h:389
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > _jacobian_assembler
Definition Process.h:375
std::vector< std::unique_ptr< LocalAssemblerInterface< DisplacementDim > > > local_assemblers_
ThermoHydroMechanicsProcessData< DisplacementDim > _process_data

References ProcessLib::Process::Process(), ThermoHydroMechanicsProcess(), ProcessLib::Process::_jacobian_assembler, and ProcessLib::Process::name.

Referenced by ThermoHydroMechanicsProcess(), AssemblyMixin< ThermoHydroMechanicsProcess< DisplacementDim > >, and isLinear().

Member Function Documentation

◆ assembleConcreteProcess()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::assembleConcreteProcess ( const double t,
double const dt,
std::vector< GlobalVector * > const & x,
std::vector< GlobalVector * > const & x_prev,
int const process_id,
GlobalMatrix & M,
GlobalMatrix & K,
GlobalVector & b )
overrideprivatevirtual

Implements ProcessLib::Process.

Definition at line 342 of file ThermoHydroMechanicsProcess.cpp.

346{
347 DBUG("Assemble the equations for ThermoHydroMechanics");
348
350 t, dt, x, x_prev, process_id, M, K, b);
351}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
void assemble(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) final
Definition Process.cpp:258

References ProcessLib::Process::assemble(), and DBUG().

◆ assembleWithJacobianConcreteProcess()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::assembleWithJacobianConcreteProcess ( const double t,
double const dt,
std::vector< GlobalVector * > const & x,
std::vector< GlobalVector * > const & x_prev,
int const process_id,
GlobalVector & b,
GlobalMatrix & Jac )
overrideprivatevirtual

Implements ProcessLib::Process.

Definition at line 354 of file ThermoHydroMechanicsProcess.cpp.

359{
360 // For the monolithic scheme
362 {
363 DBUG(
364 "Assemble the Jacobian of ThermoHydroMechanics for the monolithic "
365 "scheme.");
366 }
367 else
368 {
369 // For the staggered scheme
370 if (process_id == 0)
371 {
372 DBUG(
373 "Assemble the Jacobian equations of heat transport process in "
374 "ThermoHydroMechanics for the staggered scheme.");
375 }
376 else if (process_id == 1)
377 {
378 DBUG(
379 "Assemble the Jacobian equations of liquid fluid process in "
380 "ThermoHydroMechanics for the staggered scheme.");
381 }
382 else
383 {
384 DBUG(
385 "Assemble the Jacobian equations of mechanical process in "
386 "ThermoHydroMechanics for the staggered scheme.");
387 }
388 }
389
392}
void assembleWithJacobian(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac) final
Definition Process.cpp:279
const bool _use_monolithic_scheme
Definition Process.h:378

References ProcessLib::Process::_use_monolithic_scheme, and DBUG().

◆ computeSecondaryVariableConcrete()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::computeSecondaryVariableConcrete ( double const t,
double const dt,
std::vector< GlobalVector * > const & x,
GlobalVector const & x_prev,
const int process_id )
overrideprivatevirtual

Reimplemented from ProcessLib::Process.

Definition at line 457 of file ThermoHydroMechanicsProcess.cpp.

462{
463 if (process_id != 0)
464 {
465 return;
466 }
467
468 DBUG("Compute the secondary variables for ThermoHydroMechanicsProcess.");
469
474}
std::vector< NumLib::LocalToGlobalIndexMap const * > getDOFTables(int const number_of_processes) const
Definition Process.cpp:376
std::vector< std::size_t > const & getActiveElementIDs() const
Definition Process.h:160
static void executeSelectedMemberOnDereferenced(Method method, Container const &container, std::vector< std::size_t > const &active_container_ids, Args &&... args)

References ProcessLib::LocalAssemblerInterface::computeSecondaryVariable(), DBUG(), NumLib::SerialExecutor::executeSelectedMemberOnDereferenced(), ProcessLib::Process::getActiveElementIDs(), ProcessLib::Process::getDOFTables(), and local_assemblers_.

◆ constructDofTable()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::constructDofTable ( )
overrideprivatevirtual

This function is for general cases, in which all equations of the coupled processes have the same number of unknowns. For the general cases with the staggered scheme, all equations of the coupled processes share one DOF table hold by _local_to_global_index_map. Other cases can be considered by overloading this member function in the derived class.

Reimplemented from ProcessLib::Process.

Definition at line 99 of file ThermoHydroMechanicsProcess.cpp.

100{
101 // Create single component dof in every of the mesh's nodes.
104 // Create single component dof in the mesh's base nodes.
105 _base_nodes = MeshLib::getBaseNodes(_mesh.getElements());
108
109 // TODO move the two data members somewhere else.
110 // for extrapolation of secondary variables of stress or strain
116 // by location order is needed for output
118
120 {
121 // For temperature, which is the first
124
125 // For pressure, which is the second
127
128 // For displacement.
129 const int monolithic_process_id = 0;
132 .get()
134 [&]() { return *_mesh_subset_all_nodes; });
135
142 }
143 else
144 {
145 // For displacement equation.
146 const int process_id = 2;
150 .get()
152 [&]() { return *_mesh_subset_all_nodes; });
153
159
160 // For pressure equation or temperature equation.
161 // Collect the mesh subsets with base nodes in a vector.
167 // by location order is needed for output
169
172
175 }
176}
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_all_nodes
Definition Process.h:365
MeshLib::Mesh & _mesh
Definition Process.h:364
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map
Definition Process.h:367
std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > const & getProcessVariables() const
Definition Process.h:149
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_with_base_nodes
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_single_component
std::vector< Node * > getBaseNodes(std::vector< Element * > const &elements)
GlobalSparsityPattern computeSparsityPattern(LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh)
Computes a sparsity pattern for the given inputs.

References _base_nodes, ProcessLib::Process::_local_to_global_index_map, _local_to_global_index_map_single_component, _local_to_global_index_map_with_base_nodes, ProcessLib::Process::_mesh, ProcessLib::Process::_mesh_subset_all_nodes, _mesh_subset_base_nodes, _sparsity_pattern_with_linear_element, ProcessLib::Process::_use_monolithic_scheme, NumLib::BY_LOCATION, NumLib::computeSparsityPattern(), MeshLib::getBaseNodes(), and ProcessLib::Process::getProcessVariables().

◆ getDOFTable()

template<int DisplacementDim>
NumLib::LocalToGlobalIndexMap const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::getDOFTable ( const int process_id) const
overrideprivatevirtual

◆ getDOFTableForExtrapolatorData()

template<int DisplacementDim>
std::tuple< NumLib::LocalToGlobalIndexMap *, bool > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::getDOFTableForExtrapolatorData ( ) const
overrideprivatevirtual

Get the address of a LocalToGlobalIndexMap, and the status of its memory. If the LocalToGlobalIndexMap is created as new in this function, the function also returns a true boolean value to let Extrapolator manage the memory by the address returned by this function.

Returns
Address of a LocalToGlobalIndexMap and its memory status.

Reimplemented from ProcessLib::Process.

Definition at line 478 of file ThermoHydroMechanicsProcess.cpp.

479{
480 const bool manage_storage = false;
483}

References _local_to_global_index_map_single_component, and getDOFTableForExtrapolatorData().

Referenced by getDOFTableForExtrapolatorData().

◆ getMatrixSpecifications()

template<int DisplacementDim>
MathLib::MatrixSpecifications ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::getMatrixSpecifications ( const int process_id) const
override

Get the size and the sparse pattern of the global matrix in order to create the global matrices and vectors for the system equations of this process.

Parameters
process_idProcess ID. If the monolithic scheme is applied, process_id = 0. For the staggered scheme, process_id = 0 represents the hydraulic (H) process, while process_id = 1 represents the mechanical (M) process.
Returns
Matrix specifications including size and sparse pattern.

Definition at line 80 of file ThermoHydroMechanicsProcess.cpp.

82{
83 // For the monolithic scheme or the M process (deformation) in the staggered
84 // scheme.
86 {
87 auto const& l = *_local_to_global_index_map;
88 return {l.dofSizeWithoutGhosts(), l.dofSizeWithoutGhosts(),
89 &l.getGhostIndices(), &this->_sparsity_pattern};
90 }
91
92 // For staggered scheme and T or H process (pressure).
94 return {l.dofSizeWithoutGhosts(), l.dofSizeWithoutGhosts(),
95 &l.getGhostIndices(), &_sparsity_pattern_with_linear_element};
96}
GlobalSparsityPattern _sparsity_pattern
Definition Process.h:391

References ProcessLib::Process::_local_to_global_index_map, _local_to_global_index_map_with_base_nodes, ProcessLib::Process::_sparsity_pattern, _sparsity_pattern_with_linear_element, and ProcessLib::Process::_use_monolithic_scheme.

◆ hasMechanicalProcess()

template<int DisplacementDim>
bool ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::hasMechanicalProcess ( int const process_id) const
inlineprivate

Check whether the process represented by process_id is/has mechanical process. In the present implementation, the mechanical process has process_id == 1 in the staggered scheme.

Definition at line 140 of file ThermoHydroMechanicsProcess.h.

141 {
142 return _use_monolithic_scheme || process_id == 2;
143 }

References ProcessLib::Process::_use_monolithic_scheme.

Referenced by getDOFTable(), and preTimestepConcreteProcess().

◆ initializeAssemblyOnSubmeshes()

template<int DisplacementDim>
std::vector< std::vector< std::string > > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeAssemblyOnSubmeshes ( std::vector< std::reference_wrapper< MeshLib::Mesh > > const & meshes)
overrideprivatevirtual

Initializes the assembly on submeshes

Parameters
meshesthe submeshes on whom the assembly shall proceed.
Attention
meshes must be a must be a non-overlapping cover of the entire simulation domain (bulk mesh)!
Returns
The names of the residuum vectors that will be assembled for each process: outer vector of size 1 for monolithic schemes and greater for staggered schemes.

Reimplemented from ProcessLib::SubmeshAssemblySupport.

Definition at line 434 of file ThermoHydroMechanicsProcess.cpp.

436{
437 INFO("ThermoHydroMechanicsProcess process initializeSubmeshOutput().");
439 if (_process_variables.size() == 1) // monolithic
440 {
442 {"HeatFlowRate", "VolumetricFlowRate", "NodalForces"}};
443 }
444 else // staggered
445 {
447 {"HeatFlowRate"}, {"VolumetricFlowRate"}, {"NodalForces"}};
448 }
449
452
454}
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:28
std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > _process_variables
Definition Process.h:399
std::vector< std::vector< std::string > > initializeAssemblyOnSubmeshes(std::vector< std::reference_wrapper< MeshLib::Mesh > > const &meshes) override

References ProcessLib::Process::_process_variables, and INFO().

◆ initializeBoundaryConditions()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeBoundaryConditions ( std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media)
overrideprivatevirtual

Member function to initialize the boundary conditions for all coupled processes. It is called by initialize().

Reimplemented from ProcessLib::Process.

Definition at line 298 of file ThermoHydroMechanicsProcess.cpp.

300{
302 {
306 media);
307 return;
308 }
309
310 // Staggered scheme:
311 // for the equations of heat transport
312 const int thermal_process_id = 0;
315
316 // for the equations of mass balance
317 const int hydraulic_process_id = 1;
320 media);
321
322 // for the equations of deformation.
323 const int mechanical_process_id = 2;
326}
void initializeProcessBoundaryConditionsAndSourceTerms(const NumLib::LocalToGlobalIndexMap &dof_table, const int process_id, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
Definition Process.cpp:83

References ProcessLib::Process::_local_to_global_index_map, _local_to_global_index_map_with_base_nodes, ProcessLib::Process::_use_monolithic_scheme, and ProcessLib::Process::initializeProcessBoundaryConditionsAndSourceTerms().

◆ initializeConcreteProcess()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::initializeConcreteProcess ( NumLib::LocalToGlobalIndexMap const & dof_table,
MeshLib::Mesh const & mesh,
unsigned const integration_order )
overrideprivatevirtual

Process specific initialization called by initialize().

Implements ProcessLib::Process.

Definition at line 179 of file ThermoHydroMechanicsProcess.cpp.

183{
186 mesh.getElements(), dof_table, local_assemblers_,
187 NumLib::IntegrationOrder{integration_order}, mesh.isAxiallySymmetric(),
189
190 auto add_secondary_variable = [&](std::string const& name,
191 int const num_components,
193 {
194 _secondary_variables.addSecondaryVariable(
195 name,
199 };
200
202 "sigma",
206
208 "sigma_ice",
212
214 "epsilon_0",
218
220 "epsilon_m",
224
226 "epsilon",
230
232 "ice_volume_fraction", 1,
234
236 "velocity", mesh.getDimension(),
238
240 "fluid_density", 1,
242
244 "viscosity", 1,
246
248 const_cast<MeshLib::Mesh&>(mesh), "ice_volume_fraction_avg",
250
251 _process_data.element_fluid_density =
253 const_cast<MeshLib::Mesh&>(mesh), "fluid_density_avg",
255
257 const_cast<MeshLib::Mesh&>(mesh), "viscosity_avg",
259
261 const_cast<MeshLib::Mesh&>(mesh), "stress_avg",
265
266 _process_data.pressure_interpolated =
268 const_cast<MeshLib::Mesh&>(mesh), "pressure_interpolated",
270
271 _process_data.temperature_interpolated =
273 const_cast<MeshLib::Mesh&>(mesh), "temperature_interpolated",
275
276 //
277 // enable output of internal variables defined by material models
278 //
282
285 _process_data.solid_materials, local_assemblers_,
287
290
291 // Initialize local assemblers after all variables have been set.
295}
SecondaryVariableCollection _secondary_variables
Definition Process.h:369
NumLib::Extrapolator & getExtrapolator() const
Definition Process.h:201
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
void solidMaterialInternalVariablesToIntegrationPointWriter(std::map< int, std::shared_ptr< SolidMaterial > > const &solid_materials, std::vector< std::unique_ptr< LocalAssemblerInterface > > const &local_assemblers, std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > &integration_point_writer, int const integration_order)
SecondaryVariableFunctions makeExtrapolator(const unsigned num_components, NumLib::Extrapolator &extrapolator, LocalAssemblerCollection const &local_assemblers, typename NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::IntegrationPointValuesMethod integration_point_values_method)
void setIPDataInitialConditions(std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const &_integration_point_writer, MeshLib::Properties const &mesh_properties, LocalAssemblersVector &local_assemblers)
static void executeMemberOnDereferenced(Method method, Container const &container, Args &&... args)

References ProcessLib::Process::_integration_point_writer, ProcessLib::Process::_local_to_global_index_map, _process_data, ProcessLib::Process::_secondary_variables, MeshLib::Cell, ProcessLib::createLocalAssemblersHM(), NumLib::SerialExecutor::executeMemberOnDereferenced(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElements(), ProcessLib::Process::getExtrapolator(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtDarcyVelocity(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtEpsilon(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtEpsilon0(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtEpsilonM(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtFluidDensity(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtIceVolume(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtSigma(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtSigmaIce(), ProcessLib::ThermoHydroMechanics::LocalAssemblerInterface< DisplacementDim >::getIntPtViscosity(), MeshLib::getOrCreateMeshProperty(), MeshLib::Mesh::getProperties(), ProcessLib::LocalAssemblerInterface::initialize(), MeshLib::Mesh::isAxiallySymmetric(), local_assemblers_, ProcessLib::makeExtrapolator(), ProcessLib::Process::name, MeshLib::Node, ProcessLib::setIPDataInitialConditions(), ProcessLib::Deformation::solidMaterialInternalToSecondaryVariables(), and ProcessLib::Deformation::solidMaterialInternalVariablesToIntegrationPointWriter().

◆ isLinear()

template<int DisplacementDim>
bool ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::isLinear ( ) const
override

Definition at line 72 of file ThermoHydroMechanicsProcess.cpp.

73{
74 return AssemblyMixin<
76}
THERMOHYDROMECHANICS_EXPORT ThermoHydroMechanicsProcess(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > &&process_variables, ThermoHydroMechanicsProcessData< DisplacementDim > &&process_data, SecondaryVariableCollection &&secondary_variables, bool const use_monolithic_scheme, bool const is_linear)

References ThermoHydroMechanicsProcess(), and isLinear().

Referenced by isLinear().

◆ postTimestepConcreteProcess()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::postTimestepConcreteProcess ( std::vector< GlobalVector * > const & x,
std::vector< GlobalVector * > const & x_prev,
const double t,
const double dt,
int const process_id )
overrideprivatevirtual

◆ preTimestepConcreteProcess()

◆ setInitialConditionsConcreteProcess()

template<int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::setInitialConditionsConcreteProcess ( std::vector< GlobalVector * > & x,
double const t,
int const process_id )
overrideprivatevirtual

◆ AssemblyMixin< ThermoHydroMechanicsProcess< DisplacementDim > >

template<int DisplacementDim>
friend class AssemblyMixin< ThermoHydroMechanicsProcess< DisplacementDim > >
friend

Definition at line 147 of file ThermoHydroMechanicsProcess.h.

References ThermoHydroMechanicsProcess().

Member Data Documentation

◆ _base_nodes

template<int DisplacementDim>
std::vector<MeshLib::Node*> ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::_base_nodes
private

Definition at line 108 of file ThermoHydroMechanicsProcess.h.

Referenced by constructDofTable().

◆ _local_to_global_index_map_single_component

template<int DisplacementDim>
std::unique_ptr<NumLib::LocalToGlobalIndexMap> ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::_local_to_global_index_map_single_component
private

◆ _local_to_global_index_map_with_base_nodes

template<int DisplacementDim>
std::unique_ptr<NumLib::LocalToGlobalIndexMap> ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::_local_to_global_index_map_with_base_nodes
private

Local to global index mapping for base nodes, which is used for linear interpolation for pressure in the staggered scheme.

Definition at line 121 of file ThermoHydroMechanicsProcess.h.

Referenced by constructDofTable(), getDOFTable(), getMatrixSpecifications(), and initializeBoundaryConditions().

◆ _mesh_subset_base_nodes

template<int DisplacementDim>
std::unique_ptr<MeshLib::MeshSubset const> ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::_mesh_subset_base_nodes
private

Definition at line 109 of file ThermoHydroMechanicsProcess.h.

Referenced by constructDofTable().

◆ _process_data

template<int DisplacementDim>
ThermoHydroMechanicsProcessData<DisplacementDim> ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::_process_data
private

Definition at line 110 of file ThermoHydroMechanicsProcess.h.

Referenced by initializeConcreteProcess().

◆ _sparsity_pattern_with_linear_element

template<int DisplacementDim>
GlobalSparsityPattern ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::_sparsity_pattern_with_linear_element
private

Sparsity pattern for the flow equation, and it is initialized only if the staggered scheme is used.

Definition at line 125 of file ThermoHydroMechanicsProcess.h.

Referenced by constructDofTable(), and getMatrixSpecifications().

◆ local_assemblers_

template<int DisplacementDim>
std::vector<std::unique_ptr<LocalAssemblerInterface<DisplacementDim> > > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsProcess< DisplacementDim >::local_assemblers_
private

The documentation for this class was generated from the following files: