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 "sigma_ice_ip",
59 static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/,
62
63 _integration_point_writer.emplace_back(
65 "ice_volume_fraction_ip", 1, integration_order, local_assemblers_,
67 _integration_point_writer.emplace_back(
69 "epsilon_m_ip",
70 static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/,
73
74 _integration_point_writer.emplace_back(
76 "epsilon_ip",
77 static_cast<int>(mesh.getDimension() == 2 ? 4 : 6) /*n components*/,
80}
#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 360 of file ThermoHydroMechanicsProcess.cpp.

364{
365 DBUG("Assemble the equations for ThermoHydroMechanics");
366
368 t, dt, x, x_prev, process_id, M, K, b);
369}
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 372 of file ThermoHydroMechanicsProcess.cpp.

377{
378 // For the monolithic scheme
380 {
381 DBUG(
382 "Assemble the Jacobian of ThermoHydroMechanics for the monolithic "
383 "scheme.");
384 }
385 else
386 {
387 // For the staggered scheme
388 if (process_id == 0)
389 {
390 DBUG(
391 "Assemble the Jacobian equations of heat transport process in "
392 "ThermoHydroMechanics for the staggered scheme.");
393 }
394 else if (process_id == 1)
395 {
396 DBUG(
397 "Assemble the Jacobian equations of liquid fluid process in "
398 "ThermoHydroMechanics for the staggered scheme.");
399 }
400 else
401 {
402 DBUG(
403 "Assemble the Jacobian equations of mechanical process in "
404 "ThermoHydroMechanics for the staggered scheme.");
405 }
406 }
407
410}
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 480 of file ThermoHydroMechanicsProcess.cpp.

485{
486 if (process_id != 0)
487 {
488 return;
489 }
490
491 DBUG("Compute the secondary variables for ThermoHydroMechanicsProcess.");
492
497}
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 110 of file ThermoHydroMechanicsProcess.cpp.

111{
112 // Create single component dof in every of the mesh's nodes.
115 // Create single component dof in the mesh's base nodes.
116 _base_nodes = MeshLib::getBaseNodes(_mesh.getElements());
119
120 // TODO move the two data members somewhere else.
121 // for extrapolation of secondary variables of stress or strain
127 // by location order is needed for output
129
131 {
132 // For temperature, which is the first
135
136 // For pressure, which is the second
138
139 // For displacement.
140 const int monolithic_process_id = 0;
143 .get()
145 [&]() { return *_mesh_subset_all_nodes; });
146
153 }
154 else
155 {
156 // For displacement equation.
157 const int process_id = 2;
161 .get()
163 [&]() { return *_mesh_subset_all_nodes; });
164
170
171 // For pressure equation or temperature equation.
172 // Collect the mesh subsets with base nodes in a vector.
178 // by location order is needed for output
180
183
186 }
187}
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 501 of file ThermoHydroMechanicsProcess.cpp.

502{
503 const bool manage_storage = false;
506}

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 91 of file ThermoHydroMechanicsProcess.cpp.

93{
94 // For the monolithic scheme or the M process (deformation) in the staggered
95 // scheme.
97 {
98 auto const& l = *_local_to_global_index_map;
99 return {l.dofSizeWithoutGhosts(), l.dofSizeWithoutGhosts(),
100 &l.getGhostIndices(), &this->_sparsity_pattern};
101 }
102
103 // For staggered scheme and T or H process (pressure).
105 return {l.dofSizeWithoutGhosts(), l.dofSizeWithoutGhosts(),
106 &l.getGhostIndices(), &_sparsity_pattern_with_linear_element};
107}
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 452 of file ThermoHydroMechanicsProcess.cpp.

454{
455 INFO("ThermoHydroMechanicsProcess process initializeSubmeshOutput().");
457
459 _process_data.is_volume_balance_equation_type ? "VolumetricFlowRate"
460 : "MassFlowRate";
461
462 if (_process_variables.size() == 1) // monolithic
463 {
465 {"HeatFlowRate", flow_rate_name, "NodalForces"}};
466 }
467 else // staggered
468 {
470 {"HeatFlowRate"}, {flow_rate_name}, {"NodalForces"}};
471 }
472
475
477}
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 _process_data, 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 316 of file ThermoHydroMechanicsProcess.cpp.

318{
320 {
324 media);
325 return;
326 }
327
328 // Staggered scheme:
329 // for the equations of heat transport
330 const int thermal_process_id = 0;
333
334 // for the equations of mass balance
335 const int hydraulic_process_id = 1;
338 media);
339
340 // for the equations of deformation.
341 const int mechanical_process_id = 2;
344}
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 190 of file ThermoHydroMechanicsProcess.cpp.

194{
197 mesh.getElements(), dof_table, local_assemblers_,
198 NumLib::IntegrationOrder{integration_order}, mesh.isAxiallySymmetric(),
200
201 auto add_secondary_variable = [&](std::string const& name,
202 int const num_components,
204 {
205 _secondary_variables.addSecondaryVariable(
206 name,
210 };
211
213 "sigma",
217
219 "sigma_ice",
223
225 "epsilon_0",
229
231 "epsilon_m",
235
237 "epsilon",
241
243 "ice_volume_fraction", 1,
245
247 "velocity", mesh.getDimension(),
249
251 "fluid_density", 1,
253
255 "viscosity", 1,
257
259 const_cast<MeshLib::Mesh&>(mesh), "ice_volume_fraction_avg",
261
262 _process_data.element_fluid_density =
264 const_cast<MeshLib::Mesh&>(mesh), "fluid_density_avg",
266
268 const_cast<MeshLib::Mesh&>(mesh), "viscosity_avg",
270
272 const_cast<MeshLib::Mesh&>(mesh), "stress_avg",
276
277 _process_data.element_ice_stresses =
279 const_cast<MeshLib::Mesh&>(mesh), "sigma_ice_avg",
283
284 _process_data.pressure_interpolated =
286 const_cast<MeshLib::Mesh&>(mesh), "pressure_interpolated",
288
289 _process_data.temperature_interpolated =
291 const_cast<MeshLib::Mesh&>(mesh), "temperature_interpolated",
293
294 //
295 // enable output of internal variables defined by material models
296 //
300
303 _process_data.solid_materials, local_assemblers_,
305
308
309 // Initialize local assemblers after all variables have been set.
313}
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 83 of file ThermoHydroMechanicsProcess.cpp.

84{
85 return AssemblyMixin<
87}
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

◆ _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: