Loading [MathJax]/extensions/tex2jax.js
OGS
ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim > Class Template Reference

Detailed Description

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
class ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >

Definition at line 50 of file TH2MFEM.h.

#include <TH2MFEM.h>

Inheritance diagram for ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >:
[legend]
Collaboration diagram for ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >:
[legend]

Public Types

using ShapeMatricesTypeDisplacement
 
using ShapeMatricesTypePressure
 
template<int N>
using VectorType
 
template<int M, int N>
using MatrixType
 
using GlobalDimMatrixType
 
using GlobalDimVectorType
 
using SymmetricTensor = Eigen::Matrix<double, KelvinVectorSize, 1>
 
using Invariants = MathLib::KelvinVector::Invariants<KelvinVectorSize>
 

Public Member Functions

 TH2MLocalAssembler (TH2MLocalAssembler const &)=delete
 
 TH2MLocalAssembler (TH2MLocalAssembler &&)=delete
 
 TH2MLocalAssembler (MeshLib::Element const &e, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, TH2MProcessData< DisplacementDim > &process_data)
 
- Public Member Functions inherited from ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >
 LocalAssemblerInterface (MeshLib::Element const &e, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, TH2MProcessData< DisplacementDim > &process_data)
 
unsigned getNumberOfIntegrationPoints () const
 
int getMaterialID () const
 
std::vector< double > getMaterialStateVariableInternalState (std::function< std::span< double >(typename ConstitutiveRelations::SolidConstitutiveRelation< DisplacementDim >::MaterialStateVariables &)> const &get_values_span, int const &n_components) const
 
ConstitutiveRelations::SolidConstitutiveRelation< DisplacementDim >::MaterialStateVariables const & getMaterialStateVariablesAt (unsigned integration_point) const
 
- Public Member Functions inherited from ProcessLib::LocalAssemblerInterface
virtual ~LocalAssemblerInterface ()=default
 
virtual void setInitialConditions (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, int const process_id)
 
virtual void initialize (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
 
virtual void preAssemble (double const, double const, std::vector< double > const &)
 
virtual void assembleForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
virtual void assembleWithJacobianForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void computeSecondaryVariable (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
 
virtual void preTimestep (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, double const delta_t)
 
virtual void postTimestep (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
void postNonLinearSolver (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< double > const &) const
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< std::vector< double > > const &) const
 Fits to staggered scheme.
 
- Public Member Functions inherited from NumLib::ExtrapolatableElement
virtual ~ExtrapolatableElement ()=default
 

Static Public Attributes

static int const KelvinVectorSize
 
static constexpr auto & N_u_op
 

Private Types

using BMatricesType
 
using IpData
 

Private Member Functions

std::size_t setIPDataInitialConditions (std::string_view const name, double const *values, int const integration_order) override
 
void setInitialConditionsConcrete (Eigen::VectorXd const local_x, double const t, int const process_id) override
 
void assemble (double const, double const, std::vector< double > const &, std::vector< double > const &, std::vector< double > &, std::vector< double > &, std::vector< double > &) override
 
void assembleWithJacobian (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_rhs_data, std::vector< double > &local_Jac_data) override
 
void initializeConcrete () override
 
void postTimestepConcrete (Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const) override
 
void computeSecondaryVariableConcrete (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev) override
 
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix (const unsigned integration_point) const override
 Provides the shape matrix at the given integration point.
 
std::tuple< std::vector< ConstitutiveRelations::ConstitutiveData< DisplacementDim > >, std::vector< ConstitutiveRelations::ConstitutiveTempData< DisplacementDim > > > updateConstitutiveVariables (Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, ConstitutiveRelations::ConstitutiveModels< DisplacementDim > const &models)
 
std::vector< ConstitutiveRelations::DerivativesData< DisplacementDim > > updateConstitutiveVariablesDerivatives (Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, std::vector< ConstitutiveRelations::ConstitutiveData< DisplacementDim > > const &ip_constitutive_data, std::vector< ConstitutiveRelations::ConstitutiveTempData< DisplacementDim > > const &ip_constitutive_variables, ConstitutiveRelations::ConstitutiveModels< DisplacementDim > const &models)
 
virtual std::optional< VectorSegmentgetVectorDeformationSegment () const override
 

Private Attributes

std::vector< IpData_ip_data
 
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
 

Static Private Attributes

static const int gas_pressure_index = 0
 
static const int gas_pressure_size = ShapeFunctionPressure::NPOINTS
 
static const int capillary_pressure_index = ShapeFunctionPressure::NPOINTS
 
static const int capillary_pressure_size = ShapeFunctionPressure::NPOINTS
 
static const int temperature_index = 2 * ShapeFunctionPressure::NPOINTS
 
static const int temperature_size = ShapeFunctionPressure::NPOINTS
 
static const int displacement_index = ShapeFunctionPressure::NPOINTS * 3
 
static const int displacement_size
 
static const int C_index = 0
 
static const int C_size = ShapeFunctionPressure::NPOINTS
 
static const int W_index = ShapeFunctionPressure::NPOINTS
 
static const int W_size = ShapeFunctionPressure::NPOINTS
 

Additional Inherited Members

- Static Public Member Functions inherited from ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >
static auto getReflectionDataForOutput ()
 
- Public Attributes inherited from ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >
TH2MProcessData< DisplacementDim > & process_data_
 
std::vector< typename ConstitutiveRelations::StatefulData< DisplacementDim > > current_states_
 
std::vector< typename ConstitutiveRelations::StatefulDataPrev< DisplacementDim > > prev_states_
 
std::vector< ConstitutiveRelations::MaterialStateData< DisplacementDim > > material_states_
 
std::vector< ConstitutiveRelations::OutputData< DisplacementDim > > output_data_
 
NumLib::GenericIntegrationMethod const & integration_method_
 
MeshLib::Element const & element_
 
bool const is_axially_symmetric_
 
ConstitutiveRelations::SolidConstitutiveRelation< DisplacementDim > const & solid_material_
 

Member Typedef Documentation

◆ BMatricesType

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::BMatricesType
private
Initial value:
BMatrixPolicyType<ShapeFunctionDisplacement, DisplacementDim>

Definition at line 250 of file TH2MFEM.h.

◆ GlobalDimMatrixType

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::GlobalDimMatrixType
Initial value:

Definition at line 67 of file TH2MFEM.h.

◆ GlobalDimVectorType

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::GlobalDimVectorType
Initial value:

Definition at line 70 of file TH2MFEM.h.

◆ Invariants

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::Invariants = MathLib::KelvinVector::Invariants<KelvinVectorSize>

Definition at line 81 of file TH2MFEM.h.

◆ IpData

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::IpData
private
Initial value:
IntegrationPointData<ShapeMatricesTypeDisplacement,
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
Definition TH2MFEM.h:53
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
Definition TH2MFEM.h:56

Definition at line 252 of file TH2MFEM.h.

◆ MatrixType

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
template<int M, int N>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::MatrixType
Initial value:
typename ShapeMatricesTypePressure::template MatrixType<M, N>
typename ShapeMatricesTypePressure::template MatrixType< M, N > MatrixType
Definition TH2MFEM.h:64

Definition at line 64 of file TH2MFEM.h.

◆ ShapeMatricesTypeDisplacement

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::ShapeMatricesTypeDisplacement

◆ ShapeMatricesTypePressure

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::ShapeMatricesTypePressure

◆ SymmetricTensor

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::SymmetricTensor = Eigen::Matrix<double, KelvinVectorSize, 1>

Definition at line 75 of file TH2MFEM.h.

◆ VectorType

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
template<int N>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::VectorType
Initial value:
typename ShapeMatricesTypePressure::template VectorType<N>
typename ShapeMatricesTypePressure::template VectorType< N > VectorType
Definition TH2MFEM.h:60

Definition at line 60 of file TH2MFEM.h.

Constructor & Destructor Documentation

◆ TH2MLocalAssembler() [1/3]

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::TH2MLocalAssembler ( TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim > const & )
delete

◆ TH2MLocalAssembler() [2/3]

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::TH2MLocalAssembler ( TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim > && )
delete

◆ TH2MLocalAssembler() [3/3]

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::TH2MLocalAssembler ( MeshLib::Element const & e,
std::size_t const ,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
TH2MProcessData< DisplacementDim > & process_data )

Definition at line 36 of file TH2MFEM-impl.h.

44 e, integration_method, is_axially_symmetric, process_data)
45{
46 unsigned const n_integration_points =
48
49 _ip_data.resize(n_integration_points);
50 _secondary_data.N_u.resize(n_integration_points);
51
52 auto const shape_matrices_u =
53 NumLib::initShapeMatrices<ShapeFunctionDisplacement,
55 DisplacementDim>(e, is_axially_symmetric,
57
58 auto const shape_matrices_p =
59 NumLib::initShapeMatrices<ShapeFunctionPressure,
60 ShapeMatricesTypePressure, DisplacementDim>(
61 e, is_axially_symmetric, this->integration_method_);
62
63 for (unsigned ip = 0; ip < n_integration_points; ip++)
64 {
65 auto& ip_data = _ip_data[ip];
66 auto const& sm_u = shape_matrices_u[ip];
67 ip_data.integration_weight =
69 sm_u.integralMeasure * sm_u.detJ;
70
71 ip_data.N_u = sm_u.N;
72 ip_data.dNdx_u = sm_u.dNdx;
73
74 ip_data.N_p = shape_matrices_p[ip].N;
75 ip_data.dNdx_p = shape_matrices_p[ip].dNdx;
76
77 _secondary_data.N_u[ip] = shape_matrices_u[ip].N;
78 }
79}
constexpr double getWeight() const
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
Definition TH2MFEM.h:258
std::vector< IpData > _ip_data
Definition TH2MFEM.h:254
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
NumLib::GenericIntegrationMethod const & integration_method_
LocalAssemblerInterface(MeshLib::Element const &e, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, TH2MProcessData< DisplacementDim > &process_data)
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N_u
Definition TH2MFEM.h:45

References ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_ip_data, ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_secondary_data, NumLib::GenericIntegrationMethod::getNumberOfPoints(), MathLib::WeightedPoint::getWeight(), NumLib::GenericIntegrationMethod::getWeightedPoint(), NumLib::initShapeMatrices(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, and ProcessLib::TH2M::SecondaryData< ShapeMatrixType >::N_u.

Member Function Documentation

◆ assemble()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
void ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assemble ( double const t,
double const dt,
std::vector< double > const & local_x,
std::vector< double > const & local_x_prev,
std::vector< double > & local_M_data,
std::vector< double > & local_K_data,
std::vector< double > & local_rhs_data )
overrideprivatevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 984 of file TH2MFEM-impl.h.

990{
991 auto const matrix_size = gas_pressure_size + capillary_pressure_size +
993 assert(local_x.size() == matrix_size);
994
995 auto const capillary_pressure =
996 Eigen::Map<VectorType<capillary_pressure_size> const>(
998
999 auto const capillary_pressure_prev =
1000 Eigen::Map<VectorType<capillary_pressure_size> const>(
1001 local_x_prev.data() + capillary_pressure_index,
1003
1004 // pointer to local_M_data vector
1005 auto local_M =
1007 local_M_data, matrix_size, matrix_size);
1008
1009 // pointer to local_K_data vector
1010 auto local_K =
1012 local_K_data, matrix_size, matrix_size);
1013
1014 // pointer to local_rhs_data vector
1016 local_rhs_data, matrix_size);
1017
1018 // component-formulation
1019 // W - liquid phase main component
1020 // C - gas phase main component
1021 // pointer-matrices to the mass matrix - C component equation
1022 auto MCpG = local_M.template block<C_size, gas_pressure_size>(
1024 auto MCpC = local_M.template block<C_size, capillary_pressure_size>(
1026 auto MCT = local_M.template block<C_size, temperature_size>(
1028 auto MCu = local_M.template block<C_size, displacement_size>(
1030
1031 // pointer-matrices to the stiffness matrix - C component equation
1032 auto LCpG = local_K.template block<C_size, gas_pressure_size>(
1034 auto LCpC = local_K.template block<C_size, capillary_pressure_size>(
1036 auto LCT = local_K.template block<C_size, temperature_size>(
1038
1039 // pointer-matrices to the mass matrix - W component equation
1040 auto MWpG = local_M.template block<W_size, gas_pressure_size>(
1042 auto MWpC = local_M.template block<W_size, capillary_pressure_size>(
1044 auto MWT = local_M.template block<W_size, temperature_size>(
1046 auto MWu = local_M.template block<W_size, displacement_size>(
1048
1049 // pointer-matrices to the stiffness matrix - W component equation
1050 auto LWpG = local_K.template block<W_size, gas_pressure_size>(
1052 auto LWpC = local_K.template block<W_size, capillary_pressure_size>(
1054 auto LWT = local_K.template block<W_size, temperature_size>(
1056
1057 // pointer-matrices to the mass matrix - temperature equation
1058 auto MTu = local_M.template block<temperature_size, displacement_size>(
1060
1061 // pointer-matrices to the stiffness matrix - temperature equation
1062 auto KTT = local_K.template block<temperature_size, temperature_size>(
1064
1065 // pointer-matrices to the stiffness matrix - displacement equation
1066 auto KUpG = local_K.template block<displacement_size, gas_pressure_size>(
1068 auto KUpC =
1069 local_K.template block<displacement_size, capillary_pressure_size>(
1071
1072 auto KUU = local_K.template block<displacement_size, displacement_size>(
1074
1075 // pointer-vectors to the right hand side terms - C-component equation
1076 auto fC = local_f.template segment<C_size>(C_index);
1077 // pointer-vectors to the right hand side terms - W-component equation
1078 auto fW = local_f.template segment<W_size>(W_index);
1079 // pointer-vectors to the right hand side terms - temperature equation
1080 auto fT = local_f.template segment<temperature_size>(temperature_index);
1081 // pointer-vectors to the right hand side terms - displacement equation
1082 auto fU = local_f.template segment<displacement_size>(displacement_index);
1083
1084 unsigned const n_integration_points =
1086
1087 ConstitutiveRelations::ConstitutiveModels<DisplacementDim> const models{
1088 this->solid_material_, *this->process_data_.phase_transition_model_};
1089
1090 auto const [ip_constitutive_data, ip_constitutive_variables] =
1092 Eigen::Map<Eigen::VectorXd const>(local_x.data(), local_x.size()),
1093 Eigen::Map<Eigen::VectorXd const>(local_x_prev.data(),
1094 local_x_prev.size()),
1095 t, dt, models);
1096
1097 for (unsigned int_point = 0; int_point < n_integration_points; int_point++)
1098 {
1099 auto& ip = _ip_data[int_point];
1100 auto& ip_cv = ip_constitutive_variables[int_point];
1101 auto& ip_cd = ip_constitutive_data[int_point];
1102
1103 auto& current_state = this->current_states_[int_point];
1104 auto const& prev_state = this->prev_states_[int_point];
1105
1106 auto const& Np = ip.N_p;
1107 auto const& NT = Np;
1108 auto const& Nu = ip.N_u;
1110 std::nullopt, this->element_.getID(),
1112 NumLib::interpolateCoordinates<ShapeFunctionDisplacement,
1114 this->element_, Nu))};
1115
1116 auto const& NpT = Np.transpose().eval();
1117 auto const& NTT = NT.transpose().eval();
1118
1119 auto const& gradNp = ip.dNdx_p;
1120 auto const& gradNT = gradNp;
1121 auto const& gradNu = ip.dNdx_u;
1122
1123 auto const& gradNpT = gradNp.transpose().eval();
1124 auto const& gradNTT = gradNT.transpose().eval();
1125
1126 auto const& w = ip.integration_weight;
1127
1128 auto const x_coord =
1129 NumLib::interpolateXCoordinate<ShapeFunctionDisplacement,
1131 this->element_, Nu);
1132
1133 auto const Bu =
1134 LinearBMatrix::computeBMatrix<DisplacementDim,
1135 ShapeFunctionDisplacement::NPOINTS,
1137 gradNu, Nu, x_coord, this->is_axially_symmetric_);
1138
1139 auto const NTN = (Np.transpose() * Np).eval();
1140 auto const BTI2N = (Bu.transpose() * Invariants::identity2 * Np).eval();
1141
1142 double const pCap = Np.dot(capillary_pressure);
1143 double const pCap_prev = Np.dot(capillary_pressure_prev);
1144
1145 auto const s_L = current_state.S_L_data.S_L;
1146 auto const s_L_dot = (s_L - prev_state.S_L_data->S_L) / dt;
1147
1148 auto const& b = this->process_data_.specific_body_force;
1149
1150 // ---------------------------------------------------------------------
1151 // C-component equation
1152 // ---------------------------------------------------------------------
1153
1154 MCpG.noalias() += NTN * (ip_cv.fC_4_MCpG.m * w);
1155 MCpC.noalias() += NTN * (ip_cv.fC_4_MCpC.m * w);
1156
1157 if (this->process_data_.apply_mass_lumping)
1158 {
1159 if (pCap - pCap_prev != 0.) // avoid division by Zero
1160 {
1161 MCpC.noalias() +=
1162 NTN * (ip_cv.fC_4_MCpC.ml / (pCap - pCap_prev) * w);
1163 }
1164 }
1165
1166 MCT.noalias() += NTN * (ip_cv.fC_4_MCT.m * w);
1167 MCu.noalias() += BTI2N.transpose() * (ip_cv.fC_4_MCu.m * w);
1168
1169 LCpG.noalias() += gradNpT * ip_cv.fC_4_LCpG.L * gradNp * w;
1170
1171 LCpC.noalias() += gradNpT * ip_cv.fC_4_LCpC.L * gradNp * w;
1172
1173 LCT.noalias() += gradNpT * ip_cv.fC_4_LCT.L * gradNp * w;
1174
1175 fC.noalias() += gradNpT * ip_cv.fC_1.A * b * w;
1176
1177 if (!this->process_data_.apply_mass_lumping)
1178 {
1179 fC.noalias() -= NpT * (ip_cv.fC_2a.a * s_L_dot * w);
1180 }
1181 // fC_III
1182 fC.noalias() -=
1183 NpT * (current_state.porosity_data.phi * ip_cv.fC_3a.a * w);
1184
1185 // ---------------------------------------------------------------------
1186 // W-component equation
1187 // ---------------------------------------------------------------------
1188
1189 MWpG.noalias() += NTN * (ip_cv.fW_4_MWpG.m * w);
1190 MWpC.noalias() += NTN * (ip_cv.fW_4_MWpC.m * w);
1191
1192 if (this->process_data_.apply_mass_lumping)
1193 {
1194 if (pCap - pCap_prev != 0.) // avoid division by Zero
1195 {
1196 MWpC.noalias() +=
1197 NTN * (ip_cv.fW_4_MWpC.ml / (pCap - pCap_prev) * w);
1198 }
1199 }
1200
1201 MWT.noalias() += NTN * (ip_cv.fW_4_MWT.m * w);
1202
1203 MWu.noalias() += BTI2N.transpose() * (ip_cv.fW_4_MWu.m * w);
1204
1205 LWpG.noalias() += gradNpT * ip_cv.fW_4_LWpG.L * gradNp * w;
1206
1207 LWpC.noalias() += gradNpT * ip_cv.fW_4_LWpC.L * gradNp * w;
1208
1209 LWT.noalias() += gradNpT * ip_cv.fW_4_LWT.L * gradNp * w;
1210
1211 fW.noalias() += gradNpT * ip_cv.fW_1.A * b * w;
1212
1213 if (!this->process_data_.apply_mass_lumping)
1214 {
1215 fW.noalias() -= NpT * (ip_cv.fW_2.a * s_L_dot * w);
1216 }
1217
1218 fW.noalias() -=
1219 NpT * (current_state.porosity_data.phi * ip_cv.fW_3a.a * w);
1220
1221 // ---------------------------------------------------------------------
1222 // - temperature equation
1223 // ---------------------------------------------------------------------
1224
1225 MTu.noalias() +=
1226 BTI2N.transpose() *
1227 (ip_cv.effective_volumetric_enthalpy_data.rho_h_eff * w);
1228
1229 KTT.noalias() +=
1230 gradNTT * ip_cv.thermal_conductivity_data.lambda * gradNT * w;
1231
1232 fT.noalias() -= NTT * (ip_cv.fT_1.m * w);
1233
1234 fT.noalias() += gradNTT * ip_cv.fT_2.A * w;
1235
1236 fT.noalias() += gradNTT * ip_cv.fT_3.gradN * w;
1237
1238 fT.noalias() += NTT * (ip_cv.fT_3.N * w);
1239
1240 // ---------------------------------------------------------------------
1241 // - displacement equation
1242 // ---------------------------------------------------------------------
1243
1244 KUpG.noalias() -= BTI2N * (ip_cv.biot_data() * w);
1245
1246 KUpC.noalias() += BTI2N * (ip_cv.fu_2_KupC.m * w);
1247
1248 KUU.noalias() +=
1249 Bu.transpose() * ip_cd.s_mech_data.stiffness_tensor * Bu * w;
1250
1251 fU.noalias() -=
1252 (Bu.transpose() * current_state.eff_stress_data.sigma_eff -
1253 N_u_op(Nu).transpose() * ip_cv.volumetric_body_force()) *
1254 w;
1255
1256 if (this->process_data_.apply_mass_lumping)
1257 {
1258 MCpG = MCpG.colwise().sum().eval().asDiagonal();
1259 MCpC = MCpC.colwise().sum().eval().asDiagonal();
1260 MWpG = MWpG.colwise().sum().eval().asDiagonal();
1261 MWpC = MWpC.colwise().sum().eval().asDiagonal();
1262 }
1263 } // int_point-loop
1264}
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:91
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
static constexpr auto & N_u_op
Definition TH2MFEM.h:77
static const int capillary_pressure_index
Definition TH2MFEM.h:264
static const int capillary_pressure_size
Definition TH2MFEM.h:265
static const int gas_pressure_index
Definition TH2MFEM.h:262
std::tuple< std::vector< ConstitutiveRelations::ConstitutiveData< DisplacementDim > >, std::vector< ConstitutiveRelations::ConstitutiveTempData< DisplacementDim > > > updateConstitutiveVariables(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, ConstitutiveRelations::ConstitutiveModels< DisplacementDim > const &models)
static const int displacement_index
Definition TH2MFEM.h:268
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
double interpolateXCoordinate(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
BMatrixType computeBMatrix(DNDX_Type const &dNdx, N_Type const &N, const double radius, const bool is_axially_symmetric)
Fills a B-matrix based on given shape function dN/dx values.
static Eigen::Matrix< double, KelvinVectorSize, 1 > const identity2
Kelvin mapping of 2nd order identity tensor.
TH2MProcessData< DisplacementDim > & process_data_
ConstitutiveRelations::SolidConstitutiveRelation< DisplacementDim > const & solid_material_
std::vector< typename ConstitutiveRelations::StatefulData< DisplacementDim > > current_states_
std::vector< typename ConstitutiveRelations::StatefulDataPrev< DisplacementDim > > prev_states_

References ProcessLib::LinearBMatrix::computeBMatrix(), MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), NumLib::interpolateCoordinates(), and NumLib::interpolateXCoordinate().

◆ assembleWithJacobian()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
void ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian ( double const t,
double const dt,
std::vector< double > const & local_x,
std::vector< double > const & local_x_prev,
std::vector< double > & local_rhs_data,
std::vector< double > & local_Jac_data )
overrideprivatevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1271 of file TH2MFEM-impl.h.

1277{
1278 auto const matrix_size = gas_pressure_size + capillary_pressure_size +
1280 assert(local_x.size() == matrix_size);
1281
1282 auto const temperature = Eigen::Map<VectorType<temperature_size> const>(
1283 local_x.data() + temperature_index, temperature_size);
1284
1285 auto const gas_pressure = Eigen::Map<VectorType<gas_pressure_size> const>(
1286 local_x.data() + gas_pressure_index, gas_pressure_size);
1287
1288 auto const capillary_pressure =
1289 Eigen::Map<VectorType<capillary_pressure_size> const>(
1291
1292 auto const displacement = Eigen::Map<VectorType<displacement_size> const>(
1293 local_x.data() + displacement_index, displacement_size);
1294
1295 auto const gas_pressure_prev =
1296 Eigen::Map<VectorType<gas_pressure_size> const>(
1297 local_x_prev.data() + gas_pressure_index, gas_pressure_size);
1298
1299 auto const capillary_pressure_prev =
1300 Eigen::Map<VectorType<capillary_pressure_size> const>(
1301 local_x_prev.data() + capillary_pressure_index,
1303
1304 auto const temperature_prev =
1305 Eigen::Map<VectorType<temperature_size> const>(
1306 local_x_prev.data() + temperature_index, temperature_size);
1307
1308 auto const displacement_prev =
1309 Eigen::Map<VectorType<displacement_size> const>(
1310 local_x_prev.data() + displacement_index, displacement_size);
1311
1312 auto local_Jac =
1314 local_Jac_data, matrix_size, matrix_size);
1315
1317 local_rhs_data, matrix_size);
1318
1319 // component-formulation
1320 // W - liquid phase main component
1321 // C - gas phase main component
1322
1323 // C component equation matrices
1325 MatrixType<C_size, gas_pressure_size>::Zero(C_size, gas_pressure_size);
1327 MatrixType<C_size, capillary_pressure_size>::Zero(
1330 MatrixType<C_size, temperature_size>::Zero(C_size, temperature_size);
1332 MatrixType<C_size, displacement_size>::Zero(C_size, displacement_size);
1333
1335 MatrixType<C_size, gas_pressure_size>::Zero(C_size, gas_pressure_size);
1337 MatrixType<C_size, capillary_pressure_size>::Zero(
1340 MatrixType<C_size, temperature_size>::Zero(C_size, temperature_size);
1341
1342 // mass matrix - W component equation
1344 MatrixType<W_size, gas_pressure_size>::Zero(W_size, gas_pressure_size);
1346 MatrixType<W_size, capillary_pressure_size>::Zero(
1349 MatrixType<W_size, temperature_size>::Zero(W_size, temperature_size);
1351 MatrixType<W_size, displacement_size>::Zero(W_size, displacement_size);
1352
1353 // stiffness matrix - W component equation
1355 MatrixType<W_size, gas_pressure_size>::Zero(W_size, gas_pressure_size);
1357 MatrixType<W_size, capillary_pressure_size>::Zero(
1360 MatrixType<W_size, temperature_size>::Zero(W_size, temperature_size);
1361
1362 // mass matrix - temperature equation
1364 MatrixType<temperature_size, displacement_size>::Zero(
1366
1367 // stiffness matrix - temperature equation
1369 MatrixType<temperature_size, temperature_size>::Zero(temperature_size,
1371
1372 // stiffness matrices - displacement equation coupling into pressures
1374 MatrixType<displacement_size, gas_pressure_size>::Zero(
1377 MatrixType<displacement_size, capillary_pressure_size>::Zero(
1379
1380 // pointer-vectors to the right hand side terms - C-component equation
1381 auto fC = local_f.template segment<C_size>(C_index);
1382 // pointer-vectors to the right hand side terms - W-component equation
1383 auto fW = local_f.template segment<W_size>(W_index);
1384 // pointer-vectors to the right hand side terms - temperature equation
1385 auto fT = local_f.template segment<temperature_size>(temperature_index);
1386 // pointer-vectors to the right hand side terms - displacement equation
1387 auto fU = local_f.template segment<displacement_size>(displacement_index);
1388
1389 unsigned const n_integration_points =
1391
1392 ConstitutiveRelations::ConstitutiveModels<DisplacementDim> const models{
1393 this->solid_material_, *this->process_data_.phase_transition_model_};
1394
1395 auto const [ip_constitutive_data, ip_constitutive_variables] =
1397 Eigen::Map<Eigen::VectorXd const>(local_x.data(), local_x.size()),
1398 Eigen::Map<Eigen::VectorXd const>(local_x_prev.data(),
1399 local_x_prev.size()),
1400 t, dt, models);
1401
1402 auto const ip_d_data = updateConstitutiveVariablesDerivatives(
1403 Eigen::Map<Eigen::VectorXd const>(local_x.data(), local_x.size()),
1404 Eigen::Map<Eigen::VectorXd const>(local_x_prev.data(),
1405 local_x_prev.size()),
1406 t, dt, ip_constitutive_data, ip_constitutive_variables, models);
1407
1408 for (unsigned int_point = 0; int_point < n_integration_points; int_point++)
1409 {
1410 auto& ip = _ip_data[int_point];
1411 auto& ip_cd = ip_constitutive_data[int_point];
1412 auto& ip_dd = ip_d_data[int_point];
1413 auto& ip_cv = ip_constitutive_variables[int_point];
1414 auto& current_state = this->current_states_[int_point];
1415 auto& prev_state = this->prev_states_[int_point];
1416
1417 auto const& Np = ip.N_p;
1418 auto const& NT = Np;
1419 auto const& Nu = ip.N_u;
1421 std::nullopt, this->element_.getID(),
1423 NumLib::interpolateCoordinates<ShapeFunctionDisplacement,
1425 this->element_, Nu))};
1426
1427 auto const& NpT = Np.transpose().eval();
1428 auto const& NTT = NT.transpose().eval();
1429
1430 auto const& gradNp = ip.dNdx_p;
1431 auto const& gradNT = gradNp;
1432 auto const& gradNu = ip.dNdx_u;
1433
1434 auto const& gradNpT = gradNp.transpose().eval();
1435 auto const& gradNTT = gradNT.transpose().eval();
1436
1437 auto const& w = ip.integration_weight;
1438
1439 auto const x_coord =
1440 NumLib::interpolateXCoordinate<ShapeFunctionDisplacement,
1442 this->element_, Nu);
1443
1444 auto const Bu =
1445 LinearBMatrix::computeBMatrix<DisplacementDim,
1446 ShapeFunctionDisplacement::NPOINTS,
1448 gradNu, Nu, x_coord, this->is_axially_symmetric_);
1449
1450 auto const NTN = (Np.transpose() * Np).eval();
1451 auto const BTI2N = (Bu.transpose() * Invariants::identity2 * Np).eval();
1452
1453 double const div_u_dot =
1454 Invariants::trace(Bu * (displacement - displacement_prev) / dt);
1455
1456 double const pGR = Np.dot(gas_pressure);
1457 double const pCap = Np.dot(capillary_pressure);
1458 double const T = NT.dot(temperature);
1459
1460 GlobalDimVectorType const gradpGR = gradNp * gas_pressure;
1461 GlobalDimVectorType const gradpCap = gradNp * capillary_pressure;
1462 GlobalDimVectorType const gradT = gradNT * temperature;
1463
1464 double const pGR_prev = Np.dot(gas_pressure_prev);
1465 double const pCap_prev = Np.dot(capillary_pressure_prev);
1466 double const T_prev = NT.dot(temperature_prev);
1467
1468 auto const& s_L = current_state.S_L_data.S_L;
1469 auto const s_L_dot = (s_L - prev_state.S_L_data->S_L) / dt;
1470
1471 auto const& b = this->process_data_.specific_body_force;
1472
1473 // ---------------------------------------------------------------------
1474 // C-component equation
1475 // ---------------------------------------------------------------------
1476
1477 MCpG.noalias() += NTN * (ip_cv.fC_4_MCpG.m * w);
1478 MCpC.noalias() += NTN * (ip_cv.fC_4_MCpC.m * w);
1479
1480 if (this->process_data_.apply_mass_lumping)
1481 {
1482 if (pCap - pCap_prev != 0.) // avoid division by Zero
1483 {
1484 MCpC.noalias() +=
1485 NTN * (ip_cv.fC_4_MCpC.ml / (pCap - pCap_prev) * w);
1486 }
1487 }
1488
1489 MCT.noalias() += NTN * (ip_cv.fC_4_MCT.m * w);
1490 // d (fC_4_MCT * T_dot)/d T
1491 local_Jac
1492 .template block<C_size, temperature_size>(C_index,
1494 .noalias() += NTN * (ip_dd.dfC_4_MCT.dT * (T - T_prev) / dt * w);
1495
1496 MCu.noalias() += BTI2N.transpose() * (ip_cv.fC_4_MCu.m * w);
1497 // d (fC_4_MCu * u_dot)/d T
1498 local_Jac
1499 .template block<C_size, temperature_size>(C_index,
1501 .noalias() += NTN * (ip_dd.dfC_4_MCu.dT * div_u_dot * w);
1502
1503 LCpG.noalias() += gradNpT * ip_cv.fC_4_LCpG.L * gradNp * w;
1504
1505 // d (fC_4_LCpG * grad p_GR)/d p_GR
1506 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1507 gradNpT * ip_dd.dfC_4_LCpG.dp_GR * gradpGR * Np * w;
1508
1509 // d (fC_4_LCpG * grad p_GR)/d p_cap
1510 local_Jac.template block<C_size, W_size>(C_index, W_index).noalias() +=
1511 gradNpT * ip_dd.dfC_4_LCpG.dp_cap * gradpGR * Np * w;
1512
1513 // d (fC_4_LCpG * grad p_GR)/d T
1514 local_Jac
1515 .template block<C_size, temperature_size>(C_index,
1517 .noalias() += gradNpT * ip_dd.dfC_4_LCpG.dT * gradpGR * NT * w;
1518
1519 // d (fC_4_MCpG * p_GR_dot)/d p_GR
1520 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1521 NTN * (ip_dd.dfC_4_MCpG.dp_GR * (pGR - pGR_prev) / dt * w);
1522
1523 // d (fC_4_MCpG * p_GR_dot)/d T
1524 local_Jac
1525 .template block<C_size, temperature_size>(C_index,
1527 .noalias() +=
1528 NTN * (ip_dd.dfC_4_MCpG.dT * (pGR - pGR_prev) / dt * w);
1529
1530 LCpC.noalias() -= gradNpT * ip_cv.fC_4_LCpC.L * gradNp * w;
1531
1532 /* TODO (naumov) This part is not tested by any of the current ctests.
1533 // d (fC_4_LCpC * grad p_cap)/d p_GR
1534 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1535 gradNpT * ip_dd.dfC_4_LCpC.dp_GR * gradpCap * Np * w;
1536 // d (fC_4_LCpC * grad p_cap)/d p_cap
1537 local_Jac.template block<C_size, W_size>(C_index, W_index).noalias() +=
1538 gradNpT * ip_dd.dfC_4_LCpC.dp_cap * gradpCap * Np * w;
1539
1540 local_Jac
1541 .template block<C_size, temperature_size>(C_index,
1542 temperature_index)
1543 .noalias() += gradNpT * ip_dd.dfC_4_LCpC.dT * gradpCap * Np * w;
1544 */
1545
1546 LCT.noalias() += gradNpT * ip_cv.fC_4_LCT.L * gradNp * w;
1547
1548 // fC_1
1549 fC.noalias() += gradNpT * ip_cv.fC_1.A * b * w;
1550
1551 if (!this->process_data_.apply_mass_lumping)
1552 {
1553 // fC_2 = \int a * s_L_dot
1554 fC.noalias() -= NpT * (ip_cv.fC_2a.a * s_L_dot * w);
1555
1556 local_Jac.template block<C_size, C_size>(C_index, C_index)
1557 .noalias() +=
1558 NTN * ((ip_dd.dfC_2a.dp_GR * s_L_dot
1559 /*- ip_cv.fC_2a.a * (ds_L_dp_GR = 0) / dt*/) *
1560 w);
1561
1562 local_Jac.template block<C_size, W_size>(C_index, W_index)
1563 .noalias() +=
1564 NTN * ((ip_dd.dfC_2a.dp_cap * s_L_dot +
1565 ip_cv.fC_2a.a * ip_dd.dS_L_dp_cap() / dt) *
1566 w);
1567
1568 local_Jac
1569 .template block<C_size, temperature_size>(C_index,
1571 .noalias() += NTN * (ip_dd.dfC_2a.dT * s_L_dot * w);
1572 }
1573 {
1574 // fC_3 = \int phi * a
1575 fC.noalias() -=
1576 NpT * (current_state.porosity_data.phi * ip_cv.fC_3a.a * w);
1577
1578 local_Jac.template block<C_size, C_size>(C_index, C_index)
1579 .noalias() += NTN * (current_state.porosity_data.phi *
1580 ip_dd.dfC_3a.dp_GR * w);
1581
1582 local_Jac.template block<C_size, W_size>(C_index, W_index)
1583 .noalias() += NTN * (current_state.porosity_data.phi *
1584 ip_dd.dfC_3a.dp_cap * w);
1585
1586 local_Jac
1587 .template block<C_size, temperature_size>(C_index,
1589 .noalias() +=
1590 NTN * ((ip_dd.porosity_d_data.dphi_dT * ip_cv.fC_3a.a +
1591 current_state.porosity_data.phi * ip_dd.dfC_3a.dT) *
1592 w);
1593 }
1594 // ---------------------------------------------------------------------
1595 // W-component equation
1596 // ---------------------------------------------------------------------
1597
1598 MWpG.noalias() += NTN * (ip_cv.fW_4_MWpG.m * w);
1599 MWpC.noalias() += NTN * (ip_cv.fW_4_MWpC.m * w);
1600
1601 if (this->process_data_.apply_mass_lumping)
1602 {
1603 if (pCap - pCap_prev != 0.) // avoid division by Zero
1604 {
1605 MWpC.noalias() +=
1606 NTN * (ip_cv.fW_4_MWpC.ml / (pCap - pCap_prev) * w);
1607 }
1608 }
1609
1610 MWT.noalias() += NTN * (ip_cv.fW_4_MWT.m * w);
1611
1612 MWu.noalias() += BTI2N.transpose() * (ip_cv.fW_4_MWu.m * w);
1613
1614 LWpG.noalias() += gradNpT * ip_cv.fW_4_LWpG.L * gradNp * w;
1615
1616 // fW_4 LWpG' parts; LWpG = \int grad (a + d) grad
1617 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() +=
1618 gradNpT * ip_dd.dfW_4_LWpG.dp_GR * gradpGR * Np * w;
1619
1620 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() +=
1621 gradNpT * ip_dd.dfW_4_LWpG.dp_cap * gradpGR * Np * w;
1622
1623 local_Jac
1624 .template block<W_size, temperature_size>(W_index,
1626 .noalias() += gradNpT * ip_dd.dfW_4_LWpG.dT * gradpGR * NT * w;
1627
1628 LWpC.noalias() += gradNpT * ip_cv.fW_4_LWpC.L * gradNp * w;
1629
1630 // fW_4 LWp_cap' parts; LWpC = \int grad (a + d) grad
1631 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() -=
1632 gradNpT * ip_dd.dfW_4_LWpC.dp_GR * gradpCap * Np * w;
1633
1634 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() -=
1635 gradNpT * ip_dd.dfW_4_LWpC.dp_cap * gradpCap * Np * w;
1636
1637 local_Jac
1638 .template block<W_size, temperature_size>(W_index,
1640 .noalias() -= gradNpT * ip_dd.dfW_4_LWpC.dT * gradpCap * NT * w;
1641
1642 LWT.noalias() += gradNpT * ip_cv.fW_4_LWT.L * gradNp * w;
1643
1644 // fW_1
1645 fW.noalias() += gradNpT * ip_cv.fW_1.A * b * w;
1646
1647 // fW_2 = \int a * s_L_dot
1648 if (!this->process_data_.apply_mass_lumping)
1649 {
1650 fW.noalias() -= NpT * (ip_cv.fW_2.a * s_L_dot * w);
1651
1652 local_Jac.template block<W_size, C_size>(W_index, C_index)
1653 .noalias() += NTN * (ip_dd.dfW_2.dp_GR * s_L_dot * w);
1654
1655 // sign negated because of dp_cap = -dp_LR
1656 // TODO (naumov) Had to change the sign to get equal Jacobian WW
1657 // blocks in A2 Test. Where is the error?
1658 local_Jac.template block<W_size, W_size>(W_index, W_index)
1659 .noalias() += NTN * ((ip_dd.dfW_2.dp_cap * s_L_dot +
1660 ip_cv.fW_2.a * ip_dd.dS_L_dp_cap() / dt) *
1661 w);
1662
1663 local_Jac
1664 .template block<W_size, temperature_size>(W_index,
1666 .noalias() += NTN * (ip_dd.dfW_2.dT * s_L_dot * w);
1667 }
1668
1669 // fW_3 = \int phi * a
1670 fW.noalias() -=
1671 NpT * (current_state.porosity_data.phi * ip_cv.fW_3a.a * w);
1672
1673 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() +=
1674 NTN * (current_state.porosity_data.phi * ip_dd.dfW_3a.dp_GR * w);
1675
1676 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() +=
1677 NTN * (current_state.porosity_data.phi * ip_dd.dfW_3a.dp_cap * w);
1678
1679 local_Jac
1680 .template block<W_size, temperature_size>(W_index,
1682 .noalias() +=
1683 NTN * ((ip_dd.porosity_d_data.dphi_dT * ip_cv.fW_3a.a +
1684 current_state.porosity_data.phi * ip_dd.dfW_3a.dT) *
1685 w);
1686
1687 // ---------------------------------------------------------------------
1688 // - temperature equation
1689 // ---------------------------------------------------------------------
1690
1691 MTu.noalias() +=
1692 BTI2N.transpose() *
1693 (ip_cv.effective_volumetric_enthalpy_data.rho_h_eff * w);
1694
1695 // dfT_4/dp_GR
1696 // d (MTu * u_dot)/dp_GR
1697 local_Jac
1698 .template block<temperature_size, C_size>(temperature_index,
1699 C_index)
1700 .noalias() +=
1701 NTN * (ip_dd.effective_volumetric_enthalpy_d_data.drho_h_eff_dp_GR *
1702 div_u_dot * w);
1703
1704 // dfT_4/dp_cap
1705 // d (MTu * u_dot)/dp_cap
1706 local_Jac
1707 .template block<temperature_size, W_size>(temperature_index,
1708 W_index)
1709 .noalias() -=
1710 NTN *
1711 (ip_dd.effective_volumetric_enthalpy_d_data.drho_h_eff_dp_cap *
1712 div_u_dot * w);
1713
1714 // dfT_4/dT
1715 // d (MTu * u_dot)/dT
1716 local_Jac
1717 .template block<temperature_size, temperature_size>(
1719 .noalias() +=
1720 NTN * (ip_dd.effective_volumetric_enthalpy_d_data.drho_h_eff_dT *
1721 div_u_dot * w);
1722
1723 KTT.noalias() +=
1724 gradNTT * ip_cv.thermal_conductivity_data.lambda * gradNT * w;
1725
1726 // d KTT/dp_GR * T
1727 // TODO (naumov) always zero if lambda_xR have no derivatives wrt. p_GR.
1728 // dlambda_dp_GR =
1729 // (dphi_G_dp_GR = 0) * lambdaGR + phi_G * dlambda_GR_dp_GR +
1730 // (dphi_L_dp_GR = 0) * lambdaLR + phi_L * dlambda_LR_dp_GR +
1731 // (dphi_S_dp_GR = 0) * lambdaSR + phi_S * dlambda_SR_dp_GR +
1732 // = 0
1733 //
1734 // Since dlambda/dp_GR is 0 the derivative is omitted:
1735 // local_Jac
1736 // .template block<temperature_size, C_size>(temperature_index,
1737 // C_index)
1738 // .noalias() += gradNTT * dlambda_dp_GR * gradT * Np * w;
1739
1740 // d KTT/dp_cap * T
1741 local_Jac
1742 .template block<temperature_size, W_size>(temperature_index,
1743 W_index)
1744 .noalias() += gradNTT *
1745 ip_dd.thermal_conductivity_d_data.dlambda_dp_cap *
1746 gradT * Np * w;
1747
1748 // d KTT/dT * T
1749 local_Jac
1750 .template block<temperature_size, temperature_size>(
1752 .noalias() += gradNTT *
1753 ip_dd.thermal_conductivity_d_data.dlambda_dT * gradT *
1754 NT * w;
1755
1756 // fT_1
1757 fT.noalias() -= NTT * (ip_cv.fT_1.m * w);
1758
1759 // dfT_1/dp_GR
1760 local_Jac
1761 .template block<temperature_size, C_size>(temperature_index,
1762 C_index)
1763 .noalias() += NTN * (ip_dd.dfT_1.dp_GR * w);
1764
1765 // dfT_1/dp_cap
1766 local_Jac
1767 .template block<temperature_size, W_size>(temperature_index,
1768 W_index)
1769 .noalias() += NTN * (ip_dd.dfT_1.dp_cap * w);
1770
1771 // dfT_1/dT
1772 // MTT
1773 local_Jac
1774 .template block<temperature_size, temperature_size>(
1776 .noalias() += NTN * (ip_dd.dfT_1.dT * w);
1777
1778 // fT_2
1779 fT.noalias() += gradNTT * ip_cv.fT_2.A * w;
1780
1781 // dfT_2/dp_GR
1782 local_Jac
1783 .template block<temperature_size, C_size>(temperature_index,
1784 C_index)
1785 .noalias() -=
1786 // dfT_2/dp_GR first part
1787 gradNTT * ip_dd.dfT_2.dp_GR_Npart * Np * w +
1788 // dfT_2/dp_GR second part
1789 gradNTT * ip_dd.dfT_2.dp_GR_gradNpart * gradNp * w;
1790
1791 // dfT_2/dp_cap
1792 local_Jac
1793 .template block<temperature_size, W_size>(temperature_index,
1794 W_index)
1795 .noalias() -=
1796 // first part of dfT_2/dp_cap
1797 gradNTT * (-ip_dd.dfT_2.dp_cap_Npart) * Np * w +
1798 // second part of dfT_2/dp_cap
1799 gradNTT * (-ip_dd.dfT_2.dp_cap_gradNpart) * gradNp * w;
1800
1801 // dfT_2/dT
1802 local_Jac
1803 .template block<temperature_size, temperature_size>(
1805 .noalias() -= gradNTT * ip_dd.dfT_2.dT * NT * w;
1806
1807 // fT_3
1808 fT.noalias() += NTT * (ip_cv.fT_3.N * w);
1809
1810 fT.noalias() += gradNTT * ip_cv.fT_3.gradN * w;
1811
1812 // ---------------------------------------------------------------------
1813 // - displacement equation
1814 // ---------------------------------------------------------------------
1815
1816 KUpG.noalias() -= BTI2N * (ip_cv.biot_data() * w);
1817
1818 // dfU_2/dp_GR = dKUpG/dp_GR * p_GR + KUpG. The former is zero, the
1819 // latter is handled below.
1820
1821 KUpC.noalias() += BTI2N * (ip_cv.fu_2_KupC.m * w);
1822
1823 // dfU_2/dp_cap = dKUpC/dp_cap * p_cap + KUpC. The former is handled
1824 // here, the latter below.
1825 local_Jac
1826 .template block<displacement_size, W_size>(displacement_index,
1827 W_index)
1828 .noalias() += BTI2N * (ip_dd.dfu_2_KupC.dp_cap * w);
1829
1830 local_Jac
1831 .template block<displacement_size, displacement_size>(
1833 .noalias() +=
1834 Bu.transpose() * ip_cd.s_mech_data.stiffness_tensor * Bu * w;
1835
1836 // fU_1
1837 fU.noalias() -=
1838 (Bu.transpose() * current_state.eff_stress_data.sigma_eff -
1839 N_u_op(Nu).transpose() * ip_cv.volumetric_body_force()) *
1840 w;
1841
1842 // KuT
1843 local_Jac
1844 .template block<displacement_size, temperature_size>(
1846 .noalias() -= Bu.transpose() * ip_dd.dfu_1_KuT.dT * NT * w;
1847
1848 /* TODO (naumov) Test with gravity needed to check this Jacobian part.
1849 local_Jac
1850 .template block<displacement_size, temperature_size>(
1851 displacement_index, temperature_index)
1852 .noalias() += N_u_op(Nu).transpose() * ip_cv.drho_dT * b *
1853 N_u_op(Nu).transpose() * w;
1854 */
1855
1856 if (this->process_data_.apply_mass_lumping)
1857 {
1858 MCpG = MCpG.colwise().sum().eval().asDiagonal();
1859 MCpC = MCpC.colwise().sum().eval().asDiagonal();
1860 MWpG = MWpG.colwise().sum().eval().asDiagonal();
1861 MWpC = MWpC.colwise().sum().eval().asDiagonal();
1862 }
1863 } // int_point-loop
1864
1865 // --- Gas ---
1866 // fC_4
1867 fC.noalias() -= LCpG * gas_pressure + LCpC * capillary_pressure +
1868 LCT * temperature +
1869 MCpG * (gas_pressure - gas_pressure_prev) / dt +
1870 MCpC * (capillary_pressure - capillary_pressure_prev) / dt +
1871 MCT * (temperature - temperature_prev) / dt +
1872 MCu * (displacement - displacement_prev) / dt;
1873
1874 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1875 LCpG + MCpG / dt;
1876 local_Jac.template block<C_size, W_size>(C_index, W_index).noalias() +=
1877 LCpC + MCpC / dt;
1878 local_Jac
1879 .template block<C_size, temperature_size>(C_index, temperature_index)
1880 .noalias() += LCT + MCT / dt;
1881 local_Jac
1882 .template block<C_size, displacement_size>(C_index, displacement_index)
1883 .noalias() += MCu / dt;
1884
1885 // --- Capillary pressure ---
1886 // fW_4
1887 fW.noalias() -= LWpG * gas_pressure + LWpC * capillary_pressure +
1888 LWT * temperature +
1889 MWpG * (gas_pressure - gas_pressure_prev) / dt +
1890 MWpC * (capillary_pressure - capillary_pressure_prev) / dt +
1891 MWT * (temperature - temperature_prev) / dt +
1892 MWu * (displacement - displacement_prev) / dt;
1893
1894 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() +=
1895 LWpC + MWpC / dt;
1896 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() +=
1897 LWpG + MWpG / dt;
1898 local_Jac
1899 .template block<W_size, temperature_size>(W_index, temperature_index)
1900 .noalias() += LWT + MWT / dt;
1901 local_Jac
1902 .template block<W_size, displacement_size>(W_index, displacement_index)
1903 .noalias() += MWu / dt;
1904
1905 // --- Temperature ---
1906 // fT_4
1907 fT.noalias() -=
1908 KTT * temperature + MTu * (displacement - displacement_prev) / dt;
1909
1910 local_Jac
1911 .template block<temperature_size, temperature_size>(temperature_index,
1913 .noalias() += KTT;
1914 local_Jac
1915 .template block<temperature_size, displacement_size>(temperature_index,
1917 .noalias() += MTu / dt;
1918
1919 // --- Displacement ---
1920 // fU_2
1921 fU.noalias() -= KUpG * gas_pressure + KUpC * capillary_pressure;
1922
1923 local_Jac
1924 .template block<displacement_size, C_size>(displacement_index, C_index)
1925 .noalias() += KUpG;
1926 local_Jac
1927 .template block<displacement_size, W_size>(displacement_index, W_index)
1928 .noalias() += KUpC;
1929}
std::vector< ConstitutiveRelations::DerivativesData< DisplacementDim > > updateConstitutiveVariablesDerivatives(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, std::vector< ConstitutiveRelations::ConstitutiveData< DisplacementDim > > const &ip_constitutive_data, std::vector< ConstitutiveRelations::ConstitutiveTempData< DisplacementDim > > const &ip_constitutive_variables, ConstitutiveRelations::ConstitutiveModels< DisplacementDim > const &models)
typename ShapeMatricesTypePressure::GlobalDimVectorType GlobalDimVectorType
Definition TH2MFEM.h:70
static double trace(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Trace of the corresponding tensor.

References ProcessLib::LinearBMatrix::computeBMatrix(), MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), NumLib::interpolateCoordinates(), and NumLib::interpolateXCoordinate().

◆ computeSecondaryVariableConcrete()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
void ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::computeSecondaryVariableConcrete ( double const t,
double const dt,
Eigen::VectorXd const & local_x,
Eigen::VectorXd const & local_x_prev )
overrideprivatevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1934 of file TH2MFEM-impl.h.

1938{
1939 auto const gas_pressure =
1940 local_x.template segment<gas_pressure_size>(gas_pressure_index);
1941 auto const capillary_pressure =
1942 local_x.template segment<capillary_pressure_size>(
1944 auto const liquid_pressure = (gas_pressure - capillary_pressure).eval();
1945
1947 ShapeFunctionPressure, typename ShapeFunctionDisplacement::MeshElement,
1948 DisplacementDim>(this->element_, this->is_axially_symmetric_,
1949 gas_pressure,
1950 *this->process_data_.gas_pressure_interpolated);
1951
1953 ShapeFunctionPressure, typename ShapeFunctionDisplacement::MeshElement,
1954 DisplacementDim>(this->element_, this->is_axially_symmetric_,
1956 *this->process_data_.capillary_pressure_interpolated);
1957
1959 ShapeFunctionPressure, typename ShapeFunctionDisplacement::MeshElement,
1960 DisplacementDim>(this->element_, this->is_axially_symmetric_,
1961 liquid_pressure,
1962 *this->process_data_.liquid_pressure_interpolated);
1963
1964 auto const temperature =
1965 local_x.template segment<temperature_size>(temperature_index);
1966
1968 ShapeFunctionPressure, typename ShapeFunctionDisplacement::MeshElement,
1969 DisplacementDim>(this->element_, this->is_axially_symmetric_,
1970 temperature,
1971 *this->process_data_.temperature_interpolated);
1972
1973 ConstitutiveRelations::ConstitutiveModels<DisplacementDim> const models{
1974 this->solid_material_, *this->process_data_.phase_transition_model_};
1975
1976 updateConstitutiveVariables(local_x, local_x_prev, t, dt, models);
1977}
void interpolateToHigherOrderNodes(MeshLib::Element const &element, bool const is_axially_symmetric, Eigen::MatrixBase< EigenMatrixType > const &node_values, MeshLib::PropertyVector< double > &interpolated_values_global_vector)
auto eval(Function &f, Tuples &... ts) -> typename detail::GetFunctionReturnType< decltype(&Function::eval)>::type
Definition Apply.h:274

References NumLib::interpolateToHigherOrderNodes().

◆ getShapeMatrix()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
Eigen::Map< const Eigen::RowVectorXd > ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getShapeMatrix ( const unsigned integration_point) const
inlineoverrideprivatevirtual

Provides the shape matrix at the given integration point.

Implements NumLib::ExtrapolatableElement.

Definition at line 210 of file TH2MFEM.h.

212 {
213 auto const& N_u = _secondary_data.N_u[integration_point];
214
215 // assumes N is stored contiguously in memory
216 return Eigen::Map<const Eigen::RowVectorXd>(N_u.data(), N_u.size());
217 }

References ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_secondary_data, and ProcessLib::TH2M::SecondaryData< ShapeMatrixType >::N_u.

◆ getVectorDeformationSegment()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
virtual std::optional< VectorSegment > ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getVectorDeformationSegment ( ) const
inlineoverrideprivatevirtual

◆ initializeConcrete()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
void ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::initializeConcrete ( )
inlineoverrideprivatevirtual

Set initial stress from parameter.

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 117 of file TH2MFEM.h.

118 {
119 unsigned const n_integration_points =
121 auto const time_independent = std::numeric_limits<double>::quiet_NaN();
122 auto const& medium =
123 *this->process_data_.media_map.getMedium(this->element_.getID());
124
125 for (unsigned ip = 0; ip < n_integration_points; ip++)
126 {
127 auto& ip_data = _ip_data[ip];
128
129 ParameterLib::SpatialPosition const x_position{
130 std::nullopt, this->element_.getID(),
132 ShapeFunctionDisplacement,
134 ip_data.N_u))};
135 auto& current_state = this->current_states_[ip];
136
138 if (this->process_data_.initial_stress.value)
139 {
140 current_state.eff_stress_data.sigma_eff.noalias() =
142 DisplacementDim>(
143 (*this->process_data_.initial_stress.value)(
144 std::numeric_limits<
145 double>::quiet_NaN() /* time independent */,
146 x_position));
147 }
148
149 if (*this->process_data_.initialize_porosity_from_medium_property)
150 {
151 // Initial porosity. Could be read from integration point data
152 // or mesh.
153 current_state.porosity_data.phi =
154 medium.property(MaterialPropertyLib::porosity)
155 .template initialValue<double>(x_position,
156 time_independent);
157
158 if (medium.hasProperty(
160 {
161 current_state.transport_porosity_data.phi =
163 .template initialValue<double>(x_position,
164 time_independent);
165 }
166 else
167 {
168 current_state.transport_porosity_data.phi =
169 current_state.porosity_data.phi;
170 }
171 }
172
173 double const t = 0; // TODO (naumov) pass t from top
174 auto& material_state = this->material_states_[ip];
175 this->solid_material_.initializeInternalStateVariables(
176 t, x_position, *material_state.material_state_variables);
177
178 material_state.pushBackState();
179 }
180
181 for (unsigned ip = 0; ip < n_integration_points; ip++)
182 {
183 this->prev_states_[ip] = this->current_states_[ip];
184 }
185 }
Eigen::Matrix< double, Eigen::MatrixBase< Derived >::RowsAtCompileTime, 1 > symmetricTensorToKelvinVector(Eigen::MatrixBase< Derived > const &v)
std::vector< ConstitutiveRelations::MaterialStateData< DisplacementDim > > material_states_

References ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_ip_data, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, MeshLib::Element::getID(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, NumLib::interpolateCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::material_states_, MaterialPropertyLib::porosity, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::solid_material_, MathLib::KelvinVector::symmetricTensorToKelvinVector(), and MaterialPropertyLib::transport_porosity.

◆ postTimestepConcrete()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
void ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::postTimestepConcrete ( Eigen::VectorXd const & ,
Eigen::VectorXd const & ,
double const ,
double const ,
int const  )
inlineoverrideprivatevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 187 of file TH2MFEM.h.

191 {
192 unsigned const n_integration_points =
194
195 for (unsigned ip = 0; ip < n_integration_points; ip++)
196 {
197 this->material_states_[ip].pushBackState();
198 }
199
200 for (unsigned ip = 0; ip < n_integration_points; ip++)
201 {
202 this->prev_states_[ip] = this->current_states_[ip];
203 }
204 }

References ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::material_states_, and ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_.

◆ setInitialConditionsConcrete()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
void ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setInitialConditionsConcrete ( Eigen::VectorXd const local_x,
double const t,
int const process_id )
overrideprivatevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 851 of file TH2MFEM-impl.h.

855{
856 [[maybe_unused]] auto const matrix_size =
859
860 assert(local_x.size() == matrix_size);
861
862 auto const capillary_pressure =
863 local_x.template segment<capillary_pressure_size>(
865
866 auto const p_GR =
867 local_x.template segment<gas_pressure_size>(gas_pressure_index);
868
869 auto const temperature =
870 local_x.template segment<temperature_size>(temperature_index);
871
872 auto const displacement =
873 local_x.template segment<displacement_size>(displacement_index);
874
875 constexpr double dt = std::numeric_limits<double>::quiet_NaN();
876 auto const& medium =
877 *this->process_data_.media_map.getMedium(this->element_.getID());
878 auto const& solid_phase = medium.phase("Solid");
879
880 ConstitutiveRelations::ConstitutiveModels<DisplacementDim> const models{
881 this->solid_material_, *this->process_data_.phase_transition_model_};
882
883 unsigned const n_integration_points =
885
886 for (unsigned ip = 0; ip < n_integration_points; ip++)
887 {
889
890 auto& ip_data = _ip_data[ip];
891 auto& ip_out = this->output_data_[ip];
892 auto& prev_state = this->prev_states_[ip];
893 auto const& Np = ip_data.N_p;
894 auto const& NT = Np;
895 auto const& Nu = ip_data.N_u;
896 auto const& gradNu = ip_data.dNdx_u;
897 auto const x_coord =
898 NumLib::interpolateXCoordinate<ShapeFunctionDisplacement,
900 this->element_, Nu);
902 std::nullopt, this->element_.getID(),
904 NumLib::interpolateCoordinates<ShapeFunctionDisplacement,
906 this->element_, ip_data.N_u))};
907
908 double const pCap = Np.dot(capillary_pressure);
909 vars.capillary_pressure = pCap;
910
911 double const T = NT.dot(temperature);
912 ConstitutiveRelations::TemperatureData const T_data{
913 T, T}; // T_prev = T in initialization.
914 vars.temperature = T;
915
916 auto const Bu =
917 LinearBMatrix::computeBMatrix<DisplacementDim,
918 ShapeFunctionDisplacement::NPOINTS,
920 gradNu, Nu, x_coord, this->is_axially_symmetric_);
921
922 auto& eps = ip_out.eps_data.eps;
923 eps.noalias() = Bu * displacement;
924
925 // Set volumetric strain rate for the general case without swelling.
927
928 double const S_L =
929 medium.property(MPL::PropertyType::saturation)
930 .template value<double>(
931 vars, pos, t, std::numeric_limits<double>::quiet_NaN());
932 this->prev_states_[ip].S_L_data->S_L = S_L;
933
934 // TODO (naumov) Double computation of C_el might be avoided if
935 // updateConstitutiveVariables is called before. But it might interfere
936 // with eps_m initialization.
937 ConstitutiveRelations::ElasticTangentStiffnessData<DisplacementDim>
938 C_el_data;
939 models.elastic_tangent_stiffness_model.eval({pos, t, dt}, T_data,
940 C_el_data);
941 auto const& C_el = C_el_data.stiffness_tensor;
942
943 // Set eps_m_prev from potentially non-zero eps and sigma_sw from
944 // restart.
945 auto const& sigma_sw = this->current_states_[ip].swelling_data.sigma_sw;
946 prev_state.mechanical_strain_data->eps_m.noalias() =
947 solid_phase.hasProperty(MPL::PropertyType::swelling_stress_rate)
948 ? eps + C_el.inverse() * sigma_sw
949 : eps;
950
951 if (this->process_data_.initial_stress.isTotalStress())
952 {
953 auto const alpha_b =
954 medium.property(MPL::PropertyType::biot_coefficient)
955 .template value<double>(vars, pos, t, 0.0 /*dt*/);
956
957 vars.liquid_saturation = S_L;
958 double const bishop =
959 medium.property(MPL::PropertyType::bishops_effective_stress)
960 .template value<double>(vars, pos, t, 0.0 /*dt*/);
961
962 this->current_states_[ip].eff_stress_data.sigma_eff.noalias() +=
963 alpha_b * Np.dot(p_GR - bishop * capillary_pressure) *
965 this->prev_states_[ip].eff_stress_data =
966 this->current_states_[ip].eff_stress_data;
967 }
968 }
969
970 // local_x_prev equal to local_x s.t. the local_x_dot is zero.
971 updateConstitutiveVariables(local_x, local_x, t, 0, models);
972
973 for (unsigned ip = 0; ip < n_integration_points; ip++)
974 {
975 this->material_states_[ip].pushBackState();
976 this->prev_states_[ip] = this->current_states_[ip];
977 }
978}
std::vector< ConstitutiveRelations::OutputData< DisplacementDim > > output_data_

References MaterialPropertyLib::VariableArray::capillary_pressure, ProcessLib::LinearBMatrix::computeBMatrix(), NumLib::interpolateCoordinates(), NumLib::interpolateXCoordinate(), MaterialPropertyLib::VariableArray::liquid_saturation, ProcessLib::TH2M::ConstitutiveRelations::ElasticTangentStiffnessData< DisplacementDim >::stiffness_tensor, MaterialPropertyLib::VariableArray::temperature, and MaterialPropertyLib::VariableArray::volumetric_strain.

◆ setIPDataInitialConditions()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
std::size_t ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setIPDataInitialConditions ( std::string_view const name,
double const * values,
int const integration_order )
overrideprivatevirtual
Returns
the number of read integration points.

Implements ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >.

Definition at line 791 of file TH2MFEM-impl.h.

794{
795 if (integration_order !=
796 static_cast<int>(this->integration_method_.getIntegrationOrder()))
797 {
798 OGS_FATAL(
799 "Setting integration point initial conditions; The integration "
800 "order of the local assembler for element {:d} is different "
801 "from the integration order in the initial condition.",
802 this->element_.getID());
803 }
804
805 if (name == "sigma" && this->process_data_.initial_stress.value)
806 {
807 OGS_FATAL(
808 "Setting initial conditions for stress from integration "
809 "point data and from a parameter '{:s}' is not possible "
810 "simultaneously.",
811 this->process_data_.initial_stress.value->name);
812 }
813
814 if (name.starts_with("material_state_variable_"))
815 {
816 name.remove_prefix(24);
817 DBUG("Setting material state variable '{:s}'", name);
818
819 auto const& internal_variables =
820 this->solid_material_.getInternalVariables();
821 if (auto const iv = std::find_if(
822 begin(internal_variables), end(internal_variables),
823 [&name](auto const& iv) { return iv.name == name; });
824 iv != end(internal_variables))
825 {
826 DBUG("Setting material state variable '{:s}'", name);
828 values, this->material_states_,
829 &ConstitutiveRelations::MaterialStateData<
830 DisplacementDim>::material_state_variables,
831 iv->reference);
832 }
833
834 WARN(
835 "Could not find variable {:s} in solid material model's "
836 "internal variables.",
837 name);
838 return 0;
839 }
840
841 // TODO this logic could be pulled out of the local assembler into the
842 // process. That might lead to a slightly better performance due to less
843 // string comparisons.
845 name, values, this->current_states_);
846}
#define OGS_FATAL(...)
Definition Error.h:26
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
std::size_t reflectSetIPData(std::string_view const name, double const *values, std::vector< IPData > &ip_data_vector)
std::size_t setIntegrationPointDataMaterialStateVariables(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType member, std::function< std::span< double >(MaterialStateVariables &)> get_values_span)

References DBUG(), OGS_FATAL, ProcessLib::Reflection::reflectSetIPData(), ProcessLib::setIntegrationPointDataMaterialStateVariables(), and WARN().

◆ updateConstitutiveVariables()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
std::tuple< std::vector< ConstitutiveRelations::ConstitutiveData< DisplacementDim > >, std::vector< ConstitutiveRelations::ConstitutiveTempData< DisplacementDim > > > ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveVariables ( Eigen::VectorXd const & local_x,
Eigen::VectorXd const & local_x_prev,
double const t,
double const dt,
ConstitutiveRelations::ConstitutiveModels< DisplacementDim > const & models )
private

Definition at line 87 of file TH2MFEM-impl.h.

93{
94 [[maybe_unused]] auto const matrix_size =
97
98 assert(local_x.size() == matrix_size);
99
100 auto const gas_pressure =
101 local_x.template segment<gas_pressure_size>(gas_pressure_index);
102 auto const gas_pressure_prev =
103 local_x_prev.template segment<gas_pressure_size>(gas_pressure_index);
104 auto const capillary_pressure =
105 local_x.template segment<capillary_pressure_size>(
107 auto const capillary_pressure_prev =
108 local_x_prev.template segment<capillary_pressure_size>(
110
111 auto const temperature =
112 local_x.template segment<temperature_size>(temperature_index);
113 auto const temperature_prev =
114 local_x_prev.template segment<temperature_size>(temperature_index);
115
116 auto const displacement =
117 local_x.template segment<displacement_size>(displacement_index);
118 auto const displacement_prev =
119 local_x_prev.template segment<displacement_size>(displacement_index);
120
121 auto const& medium =
122 *this->process_data_.media_map.getMedium(this->element_.getID());
123 ConstitutiveRelations::MediaData media_data{medium};
124
125 unsigned const n_integration_points =
127
128 std::vector<ConstitutiveRelations::ConstitutiveData<DisplacementDim>>
129 ip_constitutive_data(n_integration_points);
130 std::vector<ConstitutiveRelations::ConstitutiveTempData<DisplacementDim>>
131 ip_constitutive_variables(n_integration_points);
132
133 for (unsigned ip = 0; ip < n_integration_points; ip++)
134 {
135 auto& ip_data = _ip_data[ip];
136 auto& ip_cv = ip_constitutive_variables[ip];
137 auto& ip_cd = ip_constitutive_data[ip];
138 auto& ip_out = this->output_data_[ip];
139 auto& current_state = this->current_states_[ip];
140 auto& prev_state = this->prev_states_[ip];
141
142 auto const& Np = ip_data.N_p;
143 auto const& NT = Np;
144 auto const& Nu = ip_data.N_u;
145 auto const& gradNu = ip_data.dNdx_u;
146 auto const& gradNp = ip_data.dNdx_p;
148 std::nullopt, this->element_.getID(),
150 NumLib::interpolateCoordinates<ShapeFunctionDisplacement,
152 this->element_, Nu))};
153 auto const x_coord =
154 NumLib::interpolateXCoordinate<ShapeFunctionDisplacement,
156 this->element_, Nu);
157
158 double const T = NT.dot(temperature);
159 double const T_prev = NT.dot(temperature_prev);
160 double const pG = Np.dot(gas_pressure);
161 double const pG_prev = Np.dot(gas_pressure_prev);
162 double const pCap = Np.dot(capillary_pressure);
163 double const pCap_prev = Np.dot(capillary_pressure_prev);
164 ConstitutiveRelations::TemperatureData const T_data{T, T_prev};
165 ConstitutiveRelations::GasPressureData const pGR_data{pG, pG_prev};
166 ConstitutiveRelations::CapillaryPressureData const pCap_data{pCap,
167 pCap_prev};
169 this->process_data_.reference_temperature(t, pos)[0]};
171 grad_p_GR{gradNp * gas_pressure};
173 DisplacementDim> const grad_p_cap{gradNp * capillary_pressure};
175 grad_T{gradNp * temperature};
176
177 // medium properties
178 models.elastic_tangent_stiffness_model.eval({pos, t, dt}, T_data,
179 ip_cv.C_el_data);
180
181 models.biot_model.eval({pos, t, dt}, media_data, ip_cv.biot_data);
182
183 auto const Bu =
184 LinearBMatrix::computeBMatrix<DisplacementDim,
185 ShapeFunctionDisplacement::NPOINTS,
187 gradNu, Nu, x_coord, this->is_axially_symmetric_);
188
189 ip_out.eps_data.eps.noalias() = Bu * displacement;
190 models.S_L_model.eval({pos, t, dt}, media_data, pCap_data,
191 current_state.S_L_data);
192
193 models.chi_S_L_model.eval({pos, t, dt}, media_data,
194 current_state.S_L_data,
195 current_state.chi_S_L);
196
197 models.chi_S_L_prev_model.eval({pos, t, dt}, media_data,
198 prev_state.S_L_data, prev_state.chi_S_L);
199
200 // solid phase compressibility
201 models.beta_p_SR_model.eval({pos, t, dt}, ip_cv.biot_data,
202 ip_cv.C_el_data, ip_cv.beta_p_SR);
203
204 // If there is swelling stress rate, compute swelling stress.
205 models.swelling_model.eval(
206 {pos, t, dt}, media_data, ip_cv.C_el_data, current_state.S_L_data,
207 prev_state.S_L_data, prev_state.swelling_data,
208 current_state.swelling_data, ip_cv.swelling_data);
209
210 // solid phase linear thermal expansion coefficient
211 models.s_therm_exp_model.eval({pos, t, dt}, media_data, T_data, T0,
212 ip_cv.s_therm_exp_data);
213
214 models.mechanical_strain_model.eval(
215 T_data, ip_cv.s_therm_exp_data, ip_out.eps_data,
216 Bu * displacement_prev, prev_state.mechanical_strain_data,
217 ip_cv.swelling_data, current_state.mechanical_strain_data);
218
219 models.s_mech_model.eval(
220 {pos, t, dt}, T_data, current_state.mechanical_strain_data,
221 prev_state.mechanical_strain_data, prev_state.eff_stress_data,
222 current_state.eff_stress_data, this->material_states_[ip],
223 ip_cd.s_mech_data, ip_cv.equivalent_plastic_strain_data);
224
225 models.total_stress_model.eval(current_state.eff_stress_data,
226 ip_cv.biot_data, current_state.chi_S_L,
227 pGR_data, pCap_data,
228 ip_cv.total_stress_data);
229
230 models.pure_liquid_density_model.eval({pos, t, dt}, media_data,
231 pGR_data, pCap_data, T_data,
232 current_state.rho_W_LR);
233
234 models.phase_transition_model.eval(
235 {pos, t, dt}, media_data, pGR_data, pCap_data, T_data,
236 current_state.rho_W_LR, ip_out.fluid_enthalpy_data,
237 ip_out.mass_mole_fractions_data, ip_out.fluid_density_data,
238 ip_out.vapour_pressure_data, current_state.constituent_density_data,
239 ip_cv.phase_transition_data);
240
241 models.viscosity_model.eval({pos, t, dt}, media_data, T_data,
242 ip_out.mass_mole_fractions_data,
243 ip_cv.viscosity_data);
244
245 models.porosity_model.eval(
246 {pos, t, dt}, media_data, current_state.S_L_data,
247 prev_state.S_L_data, pCap_data, pGR_data, current_state.chi_S_L,
248 prev_state.chi_S_L, ip_cv.beta_p_SR, ip_out.eps_data,
249 Bu * displacement_prev, prev_state.porosity_data,
250 current_state.porosity_data);
251
252 if (medium.hasProperty(MPL::PropertyType::transport_porosity))
253 {
254 models.transport_porosity_model.eval(
255 {pos, t, dt}, media_data, current_state.S_L_data,
256 prev_state.S_L_data, pCap_data, pGR_data, current_state.chi_S_L,
257 prev_state.chi_S_L, ip_cv.beta_p_SR,
258 current_state.mechanical_strain_data,
259 prev_state.mechanical_strain_data,
260 prev_state.transport_porosity_data, current_state.porosity_data,
261 current_state.transport_porosity_data);
262 }
263 else
264 {
265 current_state.transport_porosity_data.phi =
266 current_state.porosity_data.phi;
267 }
268
269 models.permeability_model.eval(
270 {pos, t, dt}, media_data, current_state.S_L_data, pGR_data,
271 pCap_data, T_data, current_state.transport_porosity_data,
272 ip_cv.total_stress_data, current_state.mechanical_strain_data,
273 ip_out.eps_data, ip_cv.equivalent_plastic_strain_data,
274 ip_out.permeability_data);
275
276 models.solid_density_model.eval(
277 {pos, t, dt}, media_data, T_data, current_state.eff_stress_data,
278 pCap_data, pGR_data, current_state.chi_S_L,
279 current_state.porosity_data, ip_out.solid_density_data);
280
281 models.solid_heat_capacity_model.eval({pos, t, dt}, media_data, T_data,
282 ip_cv.solid_heat_capacity_data);
283
284 models.thermal_conductivity_model.eval(
285 {pos, t, dt}, media_data, T_data, current_state.porosity_data,
286 current_state.S_L_data, ip_cv.thermal_conductivity_data);
287
288 models.advection_model.eval(current_state.constituent_density_data,
289 ip_out.permeability_data,
290 current_state.rho_W_LR,
291 ip_cv.viscosity_data,
292 ip_cv.advection_data);
293
294 models.gravity_model.eval(
295 ip_out.fluid_density_data,
296 current_state.porosity_data,
297 current_state.S_L_data,
298 ip_out.solid_density_data,
300 this->process_data_.specific_body_force},
301 ip_cv.volumetric_body_force);
302
303 models.diffusion_velocity_model.eval(grad_p_cap,
304 grad_p_GR,
305 ip_out.mass_mole_fractions_data,
306 ip_cv.phase_transition_data,
307 current_state.porosity_data,
308 current_state.S_L_data,
309 grad_T,
310 ip_out.diffusion_velocity_data);
311
312 models.solid_enthalpy_model.eval(ip_cv.solid_heat_capacity_data, T_data,
313 ip_out.solid_enthalpy_data);
314
315 models.internal_energy_model.eval(ip_out.fluid_density_data,
316 ip_cv.phase_transition_data,
317 current_state.porosity_data,
318 current_state.S_L_data,
319 ip_out.solid_density_data,
320 ip_out.solid_enthalpy_data,
321 current_state.internal_energy_data);
322
323 models.effective_volumetric_enthalpy_model.eval(
324 ip_out.fluid_density_data,
325 ip_out.fluid_enthalpy_data,
326 current_state.porosity_data,
327 current_state.S_L_data,
328 ip_out.solid_density_data,
329 ip_out.solid_enthalpy_data,
330 ip_cv.effective_volumetric_enthalpy_data);
331
332 models.fC_1_model.eval(ip_cv.advection_data, ip_out.fluid_density_data,
333 ip_cv.fC_1);
334
335 if (!this->process_data_.apply_mass_lumping)
336 {
337 models.fC_2a_model.eval(ip_cv.biot_data,
338 pCap_data,
339 current_state.constituent_density_data,
340 current_state.porosity_data,
341 current_state.S_L_data,
342 ip_cv.beta_p_SR,
343 ip_cv.fC_2a);
344 }
345 models.fC_3a_model.eval(dt,
346 current_state.constituent_density_data,
347 prev_state.constituent_density_data,
348 current_state.S_L_data,
349 ip_cv.fC_3a);
350
351 models.fC_4_LCpG_model.eval(ip_cv.advection_data,
352 ip_out.fluid_density_data,
353 ip_cv.phase_transition_data,
354 current_state.porosity_data,
355 current_state.S_L_data,
356 ip_cv.fC_4_LCpG);
357
358 models.fC_4_LCpC_model.eval(ip_cv.advection_data,
359 ip_out.fluid_density_data,
360 ip_cv.phase_transition_data,
361 current_state.porosity_data,
362 current_state.S_L_data,
363 ip_cv.fC_4_LCpC);
364
365 models.fC_4_LCT_model.eval(ip_out.fluid_density_data,
366 ip_cv.phase_transition_data,
367 current_state.porosity_data,
368 current_state.S_L_data,
369 ip_cv.fC_4_LCT);
370
371 models.fC_4_MCpG_model.eval(ip_cv.biot_data,
372 current_state.constituent_density_data,
373 current_state.porosity_data,
374 current_state.S_L_data,
375 ip_cv.beta_p_SR,
376 ip_cv.fC_4_MCpG);
377
378 models.fC_4_MCpC_model.eval(ip_cv.biot_data,
379 pCap_data,
380 current_state.constituent_density_data,
381 current_state.porosity_data,
382 prev_state.S_L_data,
383 current_state.S_L_data,
384 ip_cv.beta_p_SR,
385 ip_cv.fC_4_MCpC);
386
387 models.fC_4_MCT_model.eval(ip_cv.biot_data,
388 current_state.constituent_density_data,
389 current_state.porosity_data,
390 current_state.S_L_data,
391 ip_cv.s_therm_exp_data,
392 ip_cv.fC_4_MCT);
393
394 models.fC_4_MCu_model.eval(ip_cv.biot_data,
395 current_state.constituent_density_data,
396 current_state.S_L_data,
397 ip_cv.fC_4_MCu);
398
399 models.fW_1_model.eval(ip_cv.advection_data, ip_out.fluid_density_data,
400 ip_cv.fW_1);
401
402 if (!this->process_data_.apply_mass_lumping)
403 {
404 models.fW_2_model.eval(ip_cv.biot_data,
405 pCap_data,
406 current_state.constituent_density_data,
407 current_state.porosity_data,
408 current_state.rho_W_LR,
409 current_state.S_L_data,
410 ip_cv.beta_p_SR,
411 ip_cv.fW_2);
412 }
413 models.fW_3a_model.eval(dt,
414 current_state.constituent_density_data,
415 prev_state.constituent_density_data,
416 prev_state.rho_W_LR,
417 current_state.rho_W_LR,
418 current_state.S_L_data,
419 ip_cv.fW_3a);
420
421 models.fW_4_LWpG_model.eval(ip_cv.advection_data,
422 ip_out.fluid_density_data,
423 ip_cv.phase_transition_data,
424 current_state.porosity_data,
425 current_state.S_L_data,
426 ip_cv.fW_4_LWpG);
427
428 models.fW_4_LWpC_model.eval(ip_cv.advection_data,
429 ip_out.fluid_density_data,
430 ip_cv.phase_transition_data,
431 current_state.porosity_data,
432 current_state.S_L_data,
433 ip_cv.fW_4_LWpC);
434
435 models.fW_4_LWT_model.eval(ip_out.fluid_density_data,
436 ip_cv.phase_transition_data,
437 current_state.porosity_data,
438 current_state.S_L_data,
439 ip_cv.fW_4_LWT);
440
441 models.fW_4_MWpG_model.eval(ip_cv.biot_data,
442 current_state.constituent_density_data,
443 current_state.porosity_data,
444 current_state.rho_W_LR,
445 current_state.S_L_data,
446 ip_cv.beta_p_SR,
447 ip_cv.fW_4_MWpG);
448
449 models.fW_4_MWpC_model.eval(ip_cv.biot_data,
450 pCap_data,
451 current_state.constituent_density_data,
452 current_state.porosity_data,
453 prev_state.S_L_data,
454 current_state.rho_W_LR,
455 current_state.S_L_data,
456 ip_cv.beta_p_SR,
457 ip_cv.fW_4_MWpC);
458
459 models.fW_4_MWT_model.eval(ip_cv.biot_data,
460 current_state.constituent_density_data,
461 current_state.porosity_data,
462 current_state.rho_W_LR,
463 current_state.S_L_data,
464 ip_cv.s_therm_exp_data,
465 ip_cv.fW_4_MWT);
466
467 models.fW_4_MWu_model.eval(ip_cv.biot_data,
468 current_state.constituent_density_data,
469 current_state.rho_W_LR,
470 current_state.S_L_data,
471 ip_cv.fW_4_MWu);
472
473 models.fT_1_model.eval(dt,
474 current_state.internal_energy_data,
475 prev_state.internal_energy_data,
476 ip_cv.fT_1);
477
478 // ---------------------------------------------------------------------
479 // Derivatives for Jacobian
480 // ---------------------------------------------------------------------
481
482 models.darcy_velocity_model.eval(
483 grad_p_cap,
484 ip_out.fluid_density_data,
485 grad_p_GR,
486 ip_out.permeability_data,
488 this->process_data_.specific_body_force},
489 ip_cv.viscosity_data,
490 ip_out.darcy_velocity_data);
491
492 models.fT_2_model.eval(ip_out.darcy_velocity_data,
493 ip_out.fluid_density_data,
494 ip_out.fluid_enthalpy_data,
495 ip_cv.fT_2);
496
497 models.fT_3_model.eval(
498 current_state.constituent_density_data,
499 ip_out.darcy_velocity_data,
500 ip_out.diffusion_velocity_data,
501 ip_out.fluid_density_data,
502 ip_cv.phase_transition_data,
504 this->process_data_.specific_body_force},
505 ip_cv.fT_3);
506
507 models.fu_2_KupC_model.eval(ip_cv.biot_data, current_state.chi_S_L,
508 ip_cv.fu_2_KupC);
509 }
510
511 return {ip_constitutive_data, ip_constitutive_variables};
512}
BaseLib::StrongType< GlobalDimVector< DisplacementDim >, struct GasPressureGradientTag > GasPressureGradientData
Definition Base.h:73
BaseLib::StrongType< GlobalDimVector< DisplacementDim >, struct TemperatureGradientTag > TemperatureGradientData
Definition Base.h:81
BaseLib::StrongType< GlobalDimVector< DisplacementDim >, struct CapillaryPressureGradientTag > CapillaryPressureGradientData
Definition Base.h:77
BaseLib::StrongType< double, struct ReferenceTemperatureTag > ReferenceTemperatureData
Definition Base.h:69
BaseLib::StrongType< GlobalDimVector< DisplacementDim >, struct SpecificBodyForceTag > SpecificBodyForceData
Definition Base.h:86

References ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::advection_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::beta_p_SR_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::biot_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::chi_S_L_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::chi_S_L_prev_model, ProcessLib::LinearBMatrix::computeBMatrix(), ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::darcy_velocity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::diffusion_velocity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::effective_volumetric_enthalpy_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::elastic_tangent_stiffness_model, ProcessLib::TH2M::ConstitutiveRelations::BiotModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::BishopsModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::BishopsPrevModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::EffectiveVolumetricEnthalpyModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FC2aModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FC3aModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FC4MCpCModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FC4MCpGModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FC4MCuModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FT1Model::eval(), ProcessLib::TH2M::ConstitutiveRelations::FU2KUpCModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FW2Model::eval(), ProcessLib::TH2M::ConstitutiveRelations::FW3aModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FW4MWpCModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FW4MWpGModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::FW4MWuModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::InternalEnergyModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::PhaseTransitionModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::PureLiquidDensityModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::SaturationModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::SolidEnthalpyModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::SolidHeatCapacityModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::ViscosityModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_1_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_2a_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_3a_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_LCpC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_LCpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_LCT_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCpC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCT_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCu_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fT_1_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fT_2_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fT_3_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fu_2_KupC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_1_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_2_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_3a_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_LWpC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_LWpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_LWT_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_MWpC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_MWpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_MWT_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_MWu_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::gravity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::internal_energy_model, NumLib::interpolateCoordinates(), NumLib::interpolateXCoordinate(), ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::mechanical_strain_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::permeability_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::phase_transition_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::porosity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::pure_liquid_density_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::S_L_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::s_mech_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::s_therm_exp_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::solid_density_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::solid_enthalpy_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::solid_heat_capacity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::swelling_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::thermal_conductivity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::total_stress_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::transport_porosity_model, and ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::viscosity_model.

◆ updateConstitutiveVariablesDerivatives()

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
std::vector< ConstitutiveRelations::DerivativesData< DisplacementDim > > ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveVariablesDerivatives ( Eigen::VectorXd const & local_x,
Eigen::VectorXd const & local_x_prev,
double const t,
double const dt,
std::vector< ConstitutiveRelations::ConstitutiveData< DisplacementDim > > const & ip_constitutive_data,
std::vector< ConstitutiveRelations::ConstitutiveTempData< DisplacementDim > > const & ip_constitutive_variables,
ConstitutiveRelations::ConstitutiveModels< DisplacementDim > const & models )
private

Definition at line 518 of file TH2MFEM-impl.h.

530{
531 [[maybe_unused]] auto const matrix_size =
534
535 assert(local_x.size() == matrix_size);
536
537 auto const gas_pressure =
538 local_x.template segment<gas_pressure_size>(gas_pressure_index);
539 auto const gas_pressure_prev =
540 local_x_prev.template segment<gas_pressure_size>(gas_pressure_index);
541 auto const temperature =
542 local_x.template segment<temperature_size>(temperature_index);
543 auto const temperature_prev =
544 local_x_prev.template segment<temperature_size>(temperature_index);
545 auto const displacement_prev =
546 local_x_prev.template segment<displacement_size>(displacement_index);
547
548 auto const capillary_pressure =
549 local_x.template segment<capillary_pressure_size>(
551 auto const capillary_pressure_prev =
552 local_x_prev.template segment<capillary_pressure_size>(
554
555 auto const& medium =
556 *this->process_data_.media_map.getMedium(this->element_.getID());
557 ConstitutiveRelations::MediaData media_data{medium};
558
559 unsigned const n_integration_points =
561
562 std::vector<ConstitutiveRelations::DerivativesData<DisplacementDim>>
563 ip_d_data(n_integration_points);
564
565 for (unsigned ip = 0; ip < n_integration_points; ip++)
566 {
567 auto const& ip_data = _ip_data[ip];
568 auto& ip_dd = ip_d_data[ip];
569 auto const& ip_cd = ip_constitutive_data[ip];
570 auto const& ip_cv = ip_constitutive_variables[ip];
571 auto const& ip_out = this->output_data_[ip];
572 auto const& current_state = this->current_states_[ip];
573 auto const& prev_state = this->prev_states_[ip];
574
575 auto const& Nu = ip_data.N_u;
576 auto const& Np = ip_data.N_p;
577 auto const& NT = Np;
578 auto const& gradNu = ip_data.dNdx_u;
579 auto const x_coord =
580 NumLib::interpolateXCoordinate<ShapeFunctionDisplacement,
582 this->element_, Nu);
583
585 std::nullopt, this->element_.getID(),
587 NumLib::interpolateCoordinates<ShapeFunctionDisplacement,
589 this->element_, Nu))};
590
591 double const T = NT.dot(temperature);
592 double const T_prev = NT.dot(temperature_prev);
593 double const pG = Np.dot(gas_pressure);
594 double const pG_prev = Np.dot(gas_pressure_prev);
595 double const pCap = Np.dot(capillary_pressure);
596 double const pCap_prev = Np.dot(capillary_pressure_prev);
597 ConstitutiveRelations::TemperatureData const T_data{T, T_prev};
598 ConstitutiveRelations::GasPressureData const pGR_data{pG, pG_prev};
599 ConstitutiveRelations::CapillaryPressureData const pCap_data{pCap,
600 pCap_prev};
601
602 auto const Bu =
603 LinearBMatrix::computeBMatrix<DisplacementDim,
604 ShapeFunctionDisplacement::NPOINTS,
606 gradNu, Nu, x_coord, this->is_axially_symmetric_);
607
608 models.S_L_model.dEval({pos, t, dt}, media_data, pCap_data,
609 ip_dd.dS_L_dp_cap);
610
611 models.advection_model.dEval(current_state.constituent_density_data,
612 ip_out.permeability_data,
613 ip_cv.viscosity_data,
614 ip_dd.dS_L_dp_cap,
615 ip_cv.phase_transition_data,
616 ip_dd.advection_d_data);
617
618 models.porosity_model.dEval(
619 {pos, t, dt}, media_data, current_state.S_L_data,
620 prev_state.S_L_data, pCap_data, pGR_data, current_state.chi_S_L,
621 prev_state.chi_S_L, ip_cv.beta_p_SR, ip_out.eps_data,
622 Bu * displacement_prev, prev_state.porosity_data,
623 ip_dd.porosity_d_data);
624
625 models.thermal_conductivity_model.dEval(
626 {pos, t, dt}, media_data, T_data, current_state.porosity_data,
627 ip_dd.porosity_d_data, current_state.S_L_data,
628 ip_dd.thermal_conductivity_d_data);
629
630 models.solid_density_model.dEval(
631 {pos, t, dt}, media_data, T_data, current_state.eff_stress_data,
632 pCap_data, pGR_data, current_state.chi_S_L,
633 current_state.porosity_data, ip_dd.solid_density_d_data);
634
635 models.internal_energy_model.dEval(
636 ip_out.fluid_density_data,
637 ip_cv.phase_transition_data,
638 current_state.porosity_data,
639 ip_dd.porosity_d_data,
640 current_state.S_L_data,
641 ip_out.solid_density_data,
642 ip_dd.solid_density_d_data,
643 ip_out.solid_enthalpy_data,
644 ip_cv.solid_heat_capacity_data,
645 ip_dd.effective_volumetric_internal_energy_d_data);
646
647 models.effective_volumetric_enthalpy_model.dEval(
648 ip_out.fluid_density_data,
649 ip_out.fluid_enthalpy_data,
650 ip_cv.phase_transition_data,
651 current_state.porosity_data,
652 ip_dd.porosity_d_data,
653 current_state.S_L_data,
654 ip_out.solid_density_data,
655 ip_dd.solid_density_d_data,
656 ip_out.solid_enthalpy_data,
657 ip_cv.solid_heat_capacity_data,
658 ip_dd.effective_volumetric_enthalpy_d_data);
659 if (!this->process_data_.apply_mass_lumping)
660 {
661 models.fC_2a_model.dEval(ip_cv.biot_data,
662 pCap_data,
663 current_state.constituent_density_data,
664 ip_cv.phase_transition_data,
665 current_state.porosity_data,
666 ip_dd.porosity_d_data,
667 current_state.S_L_data,
668 ip_dd.dS_L_dp_cap,
669 ip_cv.beta_p_SR,
670 ip_dd.dfC_2a);
671 }
672 models.fC_3a_model.dEval(dt,
673 current_state.constituent_density_data,
674 prev_state.constituent_density_data,
675 ip_cv.phase_transition_data,
676 current_state.S_L_data,
677 ip_dd.dS_L_dp_cap,
678 ip_dd.dfC_3a);
679
680 models.fC_4_LCpG_model.dEval(ip_out.permeability_data,
681 ip_cv.viscosity_data,
682 ip_cv.phase_transition_data,
683 ip_dd.advection_d_data,
684 ip_dd.dfC_4_LCpG);
685
686 models.fC_4_LCpC_model.dEval(current_state.constituent_density_data,
687 ip_out.permeability_data,
688 ip_cv.phase_transition_data,
689 ip_dd.dS_L_dp_cap,
690 ip_cv.viscosity_data,
691 ip_dd.dfC_4_LCpC);
692
693 models.fC_4_MCpG_model.dEval(ip_cv.biot_data,
694 current_state.constituent_density_data,
695 ip_cv.phase_transition_data,
696 current_state.porosity_data,
697 ip_dd.porosity_d_data,
698 current_state.S_L_data,
699 ip_cv.beta_p_SR,
700 ip_dd.dfC_4_MCpG);
701
702 models.fC_4_MCT_model.dEval(ip_cv.biot_data,
703 current_state.constituent_density_data,
704 ip_cv.phase_transition_data,
705 current_state.porosity_data,
706 ip_dd.porosity_d_data,
707 current_state.S_L_data,
708 ip_cv.s_therm_exp_data,
709 ip_dd.dfC_4_MCT);
710
711 models.fC_4_MCu_model.dEval(ip_cv.biot_data,
712 ip_cv.phase_transition_data,
713 current_state.S_L_data,
714 ip_dd.dfC_4_MCu);
715
716 if (!this->process_data_.apply_mass_lumping)
717 {
718 models.fW_2_model.dEval(ip_cv.biot_data,
719 pCap_data,
720 current_state.constituent_density_data,
721 ip_cv.phase_transition_data,
722 current_state.porosity_data,
723 ip_dd.porosity_d_data,
724 current_state.rho_W_LR,
725 current_state.S_L_data,
726 ip_dd.dS_L_dp_cap,
727 ip_cv.beta_p_SR,
728 ip_dd.dfW_2);
729 }
730
731 models.fW_3a_model.dEval(dt,
732 current_state.constituent_density_data,
733 ip_cv.phase_transition_data,
734 prev_state.constituent_density_data,
735 prev_state.rho_W_LR,
736 current_state.rho_W_LR,
737 current_state.S_L_data,
738 ip_dd.dS_L_dp_cap,
739 ip_dd.dfW_3a);
740
741 models.fW_4_LWpG_model.dEval(current_state.constituent_density_data,
742 ip_out.permeability_data,
743 ip_cv.phase_transition_data,
744 current_state.rho_W_LR,
745 ip_dd.dS_L_dp_cap,
746 ip_cv.viscosity_data,
747 ip_dd.dfW_4_LWpG);
748
749 models.fW_4_LWpC_model.dEval(ip_cv.advection_data,
750 ip_out.fluid_density_data,
751 ip_out.permeability_data,
752 ip_cv.phase_transition_data,
753 current_state.porosity_data,
754 current_state.rho_W_LR,
755 current_state.S_L_data,
756 ip_dd.dS_L_dp_cap,
757 ip_cv.viscosity_data,
758 ip_dd.dfW_4_LWpC);
759
760 models.fT_1_model.dEval(
761 dt, ip_dd.effective_volumetric_internal_energy_d_data, ip_dd.dfT_1);
762
763 models.fT_2_model.dEval(
764 ip_out.darcy_velocity_data,
765 ip_out.fluid_density_data,
766 ip_out.fluid_enthalpy_data,
767 ip_out.permeability_data,
768 ip_cv.phase_transition_data,
770 this->process_data_.specific_body_force},
771 ip_cv.viscosity_data,
772 ip_dd.dfT_2);
773
774 models.fu_1_KuT_model.dEval(ip_cd.s_mech_data, ip_cv.s_therm_exp_data,
775 ip_dd.dfu_1_KuT);
776
777 models.fu_2_KupC_model.dEval(ip_cv.biot_data,
778 current_state.chi_S_L,
779 pCap_data,
780 ip_dd.dS_L_dp_cap,
781 ip_dd.dfu_2_KupC);
782 }
783
784 return ip_d_data;
785}

References ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::advection_model, ProcessLib::LinearBMatrix::computeBMatrix(), ProcessLib::TH2M::ConstitutiveRelations::EffectiveVolumetricEnthalpyModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FC2aModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FC3aModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FC4MCpGModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FC4MCuModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FT1Model::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FU2KUpCModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FW2Model::dEval(), ProcessLib::TH2M::ConstitutiveRelations::FW3aModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::InternalEnergyModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::SaturationModel::dEval(), ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::effective_volumetric_enthalpy_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_2a_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_3a_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_LCpC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_LCpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCT_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fC_4_MCu_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fT_1_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fT_2_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fu_1_KuT_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fu_2_KupC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_2_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_3a_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_LWpC_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::fW_4_LWpG_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::internal_energy_model, NumLib::interpolateCoordinates(), NumLib::interpolateXCoordinate(), ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::porosity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::S_L_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::solid_density_model, and ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::thermal_conductivity_model.

Member Data Documentation

◆ _ip_data

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
std::vector<IpData> ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_ip_data
private

◆ _secondary_data

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType> ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_secondary_data
private

◆ C_index

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::C_index = 0
staticprivate

Definition at line 272 of file TH2MFEM.h.

◆ C_size

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::C_size = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 273 of file TH2MFEM.h.

◆ capillary_pressure_index

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::capillary_pressure_index = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 264 of file TH2MFEM.h.

◆ capillary_pressure_size

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::capillary_pressure_size = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 265 of file TH2MFEM.h.

◆ displacement_index

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::displacement_index = ShapeFunctionPressure::NPOINTS * 3
staticprivate

◆ displacement_size

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::displacement_size
staticprivate
Initial value:
=
ShapeFunctionDisplacement::NPOINTS * DisplacementDim

Definition at line 269 of file TH2MFEM.h.

Referenced by ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getVectorDeformationSegment().

◆ gas_pressure_index

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::gas_pressure_index = 0
staticprivate

Definition at line 262 of file TH2MFEM.h.

◆ gas_pressure_size

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::gas_pressure_size = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 263 of file TH2MFEM.h.

◆ KelvinVectorSize

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
int const ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::KelvinVectorSize
static
Initial value:
=
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.

Definition at line 73 of file TH2MFEM.h.

◆ N_u_op

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
auto& ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::N_u_op
staticconstexpr
Initial value:
DisplacementDim,
constexpr Eigen::CwiseNullaryOp< EigenBlockMatrixViewFunctor< D, M >, typename EigenBlockMatrixViewFunctor< D, M >::Matrix > eigenBlockMatrixView(const Eigen::MatrixBase< M > &matrix)
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType

Definition at line 77 of file TH2MFEM.h.

◆ temperature_index

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::temperature_index = 2 * ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 266 of file TH2MFEM.h.

◆ temperature_size

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::temperature_size = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 267 of file TH2MFEM.h.

◆ W_index

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::W_index = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 274 of file TH2MFEM.h.

◆ W_size

template<typename ShapeFunctionDisplacement , typename ShapeFunctionPressure , int DisplacementDim>
const int ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::W_size = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 275 of file TH2MFEM.h.


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