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 43 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)
int getNumberOfVectorElementsForDeformation () 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

◆ GlobalDimMatrixType

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

Definition at line 60 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 63 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 74 of file TH2MFEM.h.

◆ IpData

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

Definition at line 243 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:57

Definition at line 57 of file TH2MFEM.h.

◆ ShapeMatricesTypeDisplacement

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
using ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::ShapeMatricesTypeDisplacement
Initial value:
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType

Definition at line 46 of file TH2MFEM.h.

◆ 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 68 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 ShapeMatrixPolicyType< ShapeFunction, DisplacementDim >::template VectorType< N > VectorType
Reusing the ShapeMatrixPolicy vector type.

Definition at line 53 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

References TH2MLocalAssembler().

◆ 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 30 of file TH2MFEM-impl.h.

39{
40 unsigned const n_integration_points =
41 this->integration_method_.getNumberOfPoints();
42
45
46 auto const shape_matrices_u =
51
52 auto const shape_matrices_p =
56
57 for (unsigned ip = 0; ip < n_integration_points; ip++)
58 {
59 auto& ip_data = _ip_data[ip];
60 auto const& sm_u = shape_matrices_u[ip];
61 ip_data.integration_weight =
62 this->integration_method_.getWeightedPoint(ip).getWeight() *
63 sm_u.integralMeasure * sm_u.detJ;
64
65 ip_data.N_u = sm_u.N;
66 ip_data.dNdx_u = sm_u.dNdx;
67
69 ip_data.dNdx_p = shape_matrices_p[ip].dNdx;
70
72 }
73}
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
Definition TH2MFEM.h:46
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
Definition TH2MFEM.h:249
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
Definition TH2MFEM.h:49
std::vector< IpData > _ip_data
Definition TH2MFEM.h:245
NumLib::GenericIntegrationMethod const & integration_method_
LocalAssemblerInterface(MeshLib::Element const &e, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, TH2MProcessData< DisplacementDim > &process_data)

References ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::LocalAssemblerInterface(), _ip_data, _secondary_data, NumLib::initShapeMatrices(), and ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_.

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 976 of file TH2MFEM-impl.h.

982{
985 assert(local_x.size() == matrix_size);
986
987 auto const capillary_pressure =
990
991 auto const capillary_pressure_prev =
995
996 // pointer to local_M_data vector
997 auto local_M =
1000
1001 // pointer to local_K_data vector
1002 auto local_K =
1005
1006 // pointer to local_rhs_data vector
1009
1010 // component-formulation
1011 // W - liquid phase main component
1012 // C - gas phase main component
1013 // pointer-matrices to the mass matrix - C component equation
1022
1023 // pointer-matrices to the stiffness matrix - C component equation
1030
1031 // pointer-matrices to the mass matrix - W component equation
1040
1041 // pointer-matrices to the stiffness matrix - W component equation
1048
1049 // pointer-matrices to the mass matrix - temperature equation
1052
1053 // pointer-matrices to the stiffness matrix - temperature equation
1056
1057 // pointer-matrices to the stiffness matrix - displacement equation
1060 auto KUpC =
1063
1066
1067 // pointer-vectors to the right hand side terms - C-component equation
1068 auto fC = local_f.template segment<C_size>(C_index);
1069 // pointer-vectors to the right hand side terms - W-component equation
1070 auto fW = local_f.template segment<W_size>(W_index);
1071 // pointer-vectors to the right hand side terms - temperature equation
1073 // pointer-vectors to the right hand side terms - displacement equation
1075
1076 unsigned const n_integration_points =
1077 this->integration_method_.getNumberOfPoints();
1078
1080 this->solid_material_, *this->process_data_.phase_transition_model_};
1081
1086 local_x_prev.size()),
1087 t, dt, models);
1088
1089 for (unsigned int_point = 0; int_point < n_integration_points; int_point++)
1090 {
1091 auto& ip = _ip_data[int_point];
1094
1096 auto const& prev_state = this->prev_states_[int_point];
1097
1098 auto const& Np = ip.N_p;
1099 auto const& Nu = ip.N_u;
1101 std::nullopt, this->element_.getID(),
1105 this->element_, Nu))};
1106
1107 auto const& NpT = Np.transpose().eval();
1108 auto const& NTT = NpT;
1109
1110 auto const& gradNp = ip.dNdx_p;
1111 auto const& gradNT = gradNp;
1112 auto const& gradNu = ip.dNdx_u;
1113
1114 auto const& gradNpT = gradNp.transpose().eval();
1115 auto const& gradNTT = gradNpT;
1116
1117 auto const& w = ip.integration_weight;
1118
1119 auto const x_coord =
1120 pos.getCoordinates().value()[0]; // r for axisymetric
1121 auto const Bu =
1126
1127 auto const NTN = (Np.transpose() * Np).eval();
1128 auto const BTI2N = (Bu.transpose() * Invariants::identity2 * Np).eval();
1129
1130 double const pCap = Np.dot(capillary_pressure);
1131 double const pCap_prev = Np.dot(capillary_pressure_prev);
1132
1133 auto const s_L = current_state.S_L_data.S_L;
1134 auto const s_L_dot = (s_L - prev_state.S_L_data->S_L) / dt;
1135
1136 auto const& b = this->process_data_.specific_body_force;
1137
1138 // ---------------------------------------------------------------------
1139 // C-component equation
1140 // ---------------------------------------------------------------------
1141
1142 MCpG.noalias() += NTN * (ip_cv.fC_4_MCpG.m * w);
1143 MCpC.noalias() += NTN * (ip_cv.fC_4_MCpC.m * w);
1144
1145 if (this->process_data_.apply_mass_lumping)
1146 {
1147 if (pCap - pCap_prev != 0.) // avoid division by Zero
1148 {
1149 MCpC.noalias() +=
1150 NTN * (ip_cv.fC_4_MCpC.ml / (pCap - pCap_prev) * w);
1151 }
1152 }
1153
1154 MCT.noalias() += NTN * (ip_cv.fC_4_MCT.m * w);
1155 MCu.noalias() += BTI2N.transpose() * (ip_cv.fC_4_MCu.m * w);
1156
1157 LCpG.noalias() += gradNpT * ip_cv.fC_4_LCpG.L * gradNp * w;
1158
1159 LCpC.noalias() += gradNpT * ip_cv.fC_4_LCpC.L * gradNp * w;
1160
1161 LCT.noalias() += gradNpT * ip_cv.fC_4_LCT.L * gradNp * w;
1162
1163 fC.noalias() += gradNpT * ip_cv.fC_1.A * b * w;
1164
1165 if (!this->process_data_.apply_mass_lumping)
1166 {
1167 fC.noalias() -= NpT * (ip_cv.fC_2a.a * s_L_dot * w);
1168 }
1169 // fC_III
1170 fC.noalias() -=
1171 NpT * (current_state.porosity_data.phi * ip_cv.fC_3a.a * w);
1172
1173 // ---------------------------------------------------------------------
1174 // W-component equation
1175 // ---------------------------------------------------------------------
1176
1177 MWpG.noalias() += NTN * (ip_cv.fW_4_MWpG.m * w);
1178 MWpC.noalias() += NTN * (ip_cv.fW_4_MWpC.m * w);
1179
1180 if (this->process_data_.apply_mass_lumping)
1181 {
1182 if (pCap - pCap_prev != 0.) // avoid division by Zero
1183 {
1184 MWpC.noalias() +=
1185 NTN * (ip_cv.fW_4_MWpC.ml / (pCap - pCap_prev) * w);
1186 }
1187 }
1188
1189 MWT.noalias() += NTN * (ip_cv.fW_4_MWT.m * w);
1190
1191 MWu.noalias() += BTI2N.transpose() * (ip_cv.fW_4_MWu.m * w);
1192
1193 LWpG.noalias() += gradNpT * ip_cv.fW_4_LWpG.L * gradNp * w;
1194
1195 LWpC.noalias() += gradNpT * ip_cv.fW_4_LWpC.L * gradNp * w;
1196
1197 LWT.noalias() += gradNpT * ip_cv.fW_4_LWT.L * gradNp * w;
1198
1199 fW.noalias() += gradNpT * ip_cv.fW_1.A * b * w;
1200
1201 if (!this->process_data_.apply_mass_lumping)
1202 {
1203 fW.noalias() -= NpT * (ip_cv.fW_2.a * s_L_dot * w);
1204 }
1205
1206 fW.noalias() -=
1207 NpT * (current_state.porosity_data.phi * ip_cv.fW_3a.a * w);
1208
1209 // ---------------------------------------------------------------------
1210 // - temperature equation
1211 // ---------------------------------------------------------------------
1212
1213 MTu.noalias() +=
1214 BTI2N.transpose() *
1215 (ip_cv.effective_volumetric_enthalpy_data.rho_h_eff * w);
1216
1217 KTT.noalias() +=
1218 gradNTT * ip_cv.thermal_conductivity_data.lambda * gradNT * w;
1219
1220 fT.noalias() -= NTT * (ip_cv.fT_1.m * w);
1221
1222 fT.noalias() += gradNTT * ip_cv.fT_2.A * w;
1223
1224 fT.noalias() += gradNTT * ip_cv.fT_3.gradN * w;
1225
1226 fT.noalias() += NTT * (ip_cv.fT_3.N * w);
1227
1228 // ---------------------------------------------------------------------
1229 // - displacement equation
1230 // ---------------------------------------------------------------------
1231
1232 KUpG.noalias() -= BTI2N * (ip_cv.biot_data() * w);
1233
1234 KUpC.noalias() += BTI2N * (ip_cv.fu_2_KupC.m * w);
1235
1236 auto const BuTC =
1237 (Bu.transpose() * ip_cd.s_mech_data.stiffness_tensor).eval();
1238 KUU.noalias() += BuTC * Bu * w;
1239
1240 fU.noalias() -=
1241 (Bu.transpose() * current_state.eff_stress_data.sigma_eff -
1242 N_u_op(Nu).transpose() * ip_cv.volumetric_body_force()) *
1243 w;
1244
1245 if (this->process_data_.apply_mass_lumping)
1246 {
1247 MCpG = MCpG.colwise().sum().eval().asDiagonal();
1248 MCpC = MCpC.colwise().sum().eval().asDiagonal();
1249 MWpG = MWpG.colwise().sum().eval().asDiagonal();
1250 MWpC = MWpC.colwise().sum().eval().asDiagonal();
1251 }
1252 } // int_point-loop
1253}
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
static constexpr auto & N_u_op
Definition TH2MFEM.h:70
static const int capillary_pressure_index
Definition TH2MFEM.h:255
static const int capillary_pressure_size
Definition TH2MFEM.h:256
static const int gas_pressure_index
Definition TH2MFEM.h:253
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:259
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 _ip_data, assemble(), C_index, capillary_pressure_index, capillary_pressure_size, ProcessLib::LinearBMatrix::computeBMatrix(), MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, displacement_index, displacement_size, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, gas_pressure_index, gas_pressure_size, ParameterLib::SpatialPosition::getCoordinates(), MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, NumLib::interpolateCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::is_axially_symmetric_, N_u_op, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::solid_material_, temperature_index, temperature_size, updateConstitutiveVariables(), and W_index.

Referenced by assemble().

◆ 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 1260 of file TH2MFEM-impl.h.

1266{
1269 assert(local_x.size() == matrix_size);
1270
1273
1276
1277 auto const capillary_pressure =
1280
1283
1284 auto const gas_pressure_prev =
1287
1288 auto const capillary_pressure_prev =
1292
1293 auto const temperature_prev =
1296
1297 auto const displacement_prev =
1300
1301 auto local_Jac =
1304
1307
1308 // component-formulation
1309 // W - liquid phase main component
1310 // C - gas phase main component
1311
1312 // C component equation matrices
1322
1330
1331 // mass matrix - W component equation
1341
1342 // stiffness matrix - W component equation
1350
1351 // mass matrix - temperature equation
1355
1356 // stiffness matrix - temperature equation
1360
1361 // stiffness matrices - displacement equation coupling into pressures
1368
1369 // pointer-vectors to the right hand side terms - C-component equation
1370 auto fC = local_f.template segment<C_size>(C_index);
1371 // pointer-vectors to the right hand side terms - W-component equation
1372 auto fW = local_f.template segment<W_size>(W_index);
1373 // pointer-vectors to the right hand side terms - temperature equation
1375 // pointer-vectors to the right hand side terms - displacement equation
1377
1378 unsigned const n_integration_points =
1379 this->integration_method_.getNumberOfPoints();
1380
1382 this->solid_material_, *this->process_data_.phase_transition_model_};
1383
1388 local_x_prev.size()),
1389 t, dt, models);
1390
1394 local_x_prev.size()),
1396
1397 for (unsigned int_point = 0; int_point < n_integration_points; int_point++)
1398 {
1399 auto& ip = _ip_data[int_point];
1401 auto& ip_dd = ip_d_data[int_point];
1404 auto& prev_state = this->prev_states_[int_point];
1405
1406 auto const& Np = ip.N_p;
1407 auto const& NT = Np;
1408 auto const& Nu = ip.N_u;
1410 std::nullopt, this->element_.getID(),
1414 this->element_, Nu))};
1415
1416 auto const& NpT = Np.transpose().eval();
1417 auto const& NTT = NpT;
1418
1419 auto const& gradNp = ip.dNdx_p;
1420 auto const& gradNT = gradNp;
1421 auto const& gradNu = ip.dNdx_u;
1422
1423 auto const& gradNpT = gradNp.transpose().eval();
1424 auto const& gradNTT = gradNpT;
1425
1426 auto const& w = ip.integration_weight;
1427
1428 auto const x_coord =
1429 pos.getCoordinates().value()[0]; // r for axisymetric
1430 auto const Bu =
1435
1436 auto const NTN = (Np.transpose() * Np).eval();
1437 auto const BTI2N = (Bu.transpose() * Invariants::identity2 * Np).eval();
1438
1439 double const div_u_dot =
1441
1442 double const pGR = Np.dot(gas_pressure);
1443 double const pCap = Np.dot(capillary_pressure);
1444 double const T = NT.dot(temperature);
1445
1449
1450 double const pGR_prev = Np.dot(gas_pressure_prev);
1451 double const pCap_prev = Np.dot(capillary_pressure_prev);
1452 double const T_prev = NT.dot(temperature_prev);
1453
1454 auto const& s_L = current_state.S_L_data.S_L;
1455 auto const s_L_dot = (s_L - prev_state.S_L_data->S_L) / dt;
1456
1457 auto const& b = this->process_data_.specific_body_force;
1458
1459 // ---------------------------------------------------------------------
1460 // C-component equation
1461 // ---------------------------------------------------------------------
1462
1463 MCpG.noalias() += NTN * (ip_cv.fC_4_MCpG.m * w);
1464 MCpC.noalias() += NTN * (ip_cv.fC_4_MCpC.m * w);
1465
1466 if (this->process_data_.apply_mass_lumping)
1467 {
1468 if (pCap - pCap_prev != 0.) // avoid division by Zero
1469 {
1470 MCpC.noalias() +=
1471 NTN * (ip_cv.fC_4_MCpC.ml / (pCap - pCap_prev) * w);
1472 }
1473 }
1474
1475 MCT.noalias() += NTN * (ip_cv.fC_4_MCT.m * w);
1476 // d (fC_4_MCT * T_dot)/d T
1477 local_Jac
1480 .noalias() += NTN * (ip_dd.dfC_4_MCT.dT * (T - T_prev) / dt * w);
1481
1482 MCu.noalias() += BTI2N.transpose() * (ip_cv.fC_4_MCu.m * w);
1483 // d (fC_4_MCu * u_dot)/d T
1484 local_Jac
1487 .noalias() += NTN * (ip_dd.dfC_4_MCu.dT * div_u_dot * w);
1488
1489 LCpG.noalias() += gradNpT * ip_cv.fC_4_LCpG.L * gradNp * w;
1490
1491 // d (fC_4_LCpG * grad p_GR)/d p_GR
1492 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1493 gradNpT * ip_dd.dfC_4_LCpG.dp_GR * gradpGR * Np * w;
1494
1495 // d (fC_4_LCpG * grad p_GR)/d p_cap
1496 local_Jac.template block<C_size, W_size>(C_index, W_index).noalias() +=
1497 gradNpT * ip_dd.dfC_4_LCpG.dp_cap * gradpGR * Np * w;
1498
1499 // d (fC_4_LCpG * grad p_GR)/d T
1500 local_Jac
1503 .noalias() += gradNpT * ip_dd.dfC_4_LCpG.dT * gradpGR * NT * w;
1504
1505 // d (fC_4_MCpG * p_GR_dot)/d p_GR
1506 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1507 NTN * (ip_dd.dfC_4_MCpG.dp_GR * (pGR - pGR_prev) / dt * w);
1508
1509 // d (fC_4_MCpG * p_GR_dot)/d T
1510 local_Jac
1513 .noalias() +=
1514 NTN * (ip_dd.dfC_4_MCpG.dT * (pGR - pGR_prev) / dt * w);
1515
1516 LCpC.noalias() -= gradNpT * ip_cv.fC_4_LCpC.L * gradNp * w;
1517
1518 /* TODO (naumov) This part is not tested by any of the current ctests.
1519 // d (fC_4_LCpC * grad p_cap)/d p_GR
1520 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1521 gradNpT * ip_dd.dfC_4_LCpC.dp_GR * gradpCap * Np * w;
1522 // d (fC_4_LCpC * grad p_cap)/d p_cap
1523 local_Jac.template block<C_size, W_size>(C_index, W_index).noalias() +=
1524 gradNpT * ip_dd.dfC_4_LCpC.dp_cap * gradpCap * Np * w;
1525
1526 local_Jac
1527 .template block<C_size, temperature_size>(C_index,
1528 temperature_index)
1529 .noalias() += gradNpT * ip_dd.dfC_4_LCpC.dT * gradpCap * Np * w;
1530 */
1531
1532 LCT.noalias() += gradNpT * ip_cv.fC_4_LCT.L * gradNp * w;
1533
1534 // fC_1
1535 fC.noalias() += gradNpT * ip_cv.fC_1.A * b * w;
1536
1537 if (!this->process_data_.apply_mass_lumping)
1538 {
1539 // fC_2 = \int a * s_L_dot
1540 fC.noalias() -= NpT * (ip_cv.fC_2a.a * s_L_dot * w);
1541
1543 .noalias() +=
1544 NTN * ((ip_dd.dfC_2a.dp_GR * s_L_dot
1545 /*- ip_cv.fC_2a.a * (ds_L_dp_GR = 0) / dt*/) *
1546 w);
1547
1549 .noalias() +=
1550 NTN * ((ip_dd.dfC_2a.dp_cap * s_L_dot +
1551 ip_cv.fC_2a.a * ip_dd.dS_L_dp_cap() / dt) *
1552 w);
1553
1554 local_Jac
1557 .noalias() += NTN * (ip_dd.dfC_2a.dT * s_L_dot * w);
1558 }
1559 {
1560 // fC_3 = \int phi * a
1561 fC.noalias() -=
1562 NpT * (current_state.porosity_data.phi * ip_cv.fC_3a.a * w);
1563
1565 .noalias() += NTN * (current_state.porosity_data.phi *
1566 ip_dd.dfC_3a.dp_GR * w);
1567
1569 .noalias() += NTN * (current_state.porosity_data.phi *
1570 ip_dd.dfC_3a.dp_cap * w);
1571
1572 local_Jac
1575 .noalias() +=
1576 NTN * ((ip_dd.porosity_d_data.dphi_dT * ip_cv.fC_3a.a +
1577 current_state.porosity_data.phi * ip_dd.dfC_3a.dT) *
1578 w);
1579 }
1580 // ---------------------------------------------------------------------
1581 // W-component equation
1582 // ---------------------------------------------------------------------
1583
1584 MWpG.noalias() += NTN * (ip_cv.fW_4_MWpG.m * w);
1585 MWpC.noalias() += NTN * (ip_cv.fW_4_MWpC.m * w);
1586
1587 if (this->process_data_.apply_mass_lumping)
1588 {
1589 if (pCap - pCap_prev != 0.) // avoid division by Zero
1590 {
1591 MWpC.noalias() +=
1592 NTN * (ip_cv.fW_4_MWpC.ml / (pCap - pCap_prev) * w);
1593 }
1594 }
1595
1596 MWT.noalias() += NTN * (ip_cv.fW_4_MWT.m * w);
1597
1598 MWu.noalias() += BTI2N.transpose() * (ip_cv.fW_4_MWu.m * w);
1599
1600 LWpG.noalias() += gradNpT * ip_cv.fW_4_LWpG.L * gradNp * w;
1601
1602 // fW_4 LWpG' parts; LWpG = \int grad (a + d) grad
1603 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() +=
1604 gradNpT * ip_dd.dfW_4_LWpG.dp_GR * gradpGR * Np * w;
1605
1606 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() +=
1607 gradNpT * ip_dd.dfW_4_LWpG.dp_cap * gradpGR * Np * w;
1608
1609 local_Jac
1612 .noalias() += gradNpT * ip_dd.dfW_4_LWpG.dT * gradpGR * NT * w;
1613
1614 LWpC.noalias() += gradNpT * ip_cv.fW_4_LWpC.L * gradNp * w;
1615
1616 // fW_4 LWp_cap' parts; LWpC = \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_LWpC.dp_GR * gradpCap * Np * w;
1619
1620 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() -=
1621 gradNpT * ip_dd.dfW_4_LWpC.dp_cap * gradpCap * Np * w;
1622
1623 local_Jac
1626 .noalias() -= gradNpT * ip_dd.dfW_4_LWpC.dT * gradpCap * NT * w;
1627
1628 LWT.noalias() += gradNpT * ip_cv.fW_4_LWT.L * gradNp * w;
1629
1630 // fW_1
1631 fW.noalias() += gradNpT * ip_cv.fW_1.A * b * w;
1632
1633 // fW_2 = \int a * s_L_dot
1634 if (!this->process_data_.apply_mass_lumping)
1635 {
1636 fW.noalias() -= NpT * (ip_cv.fW_2.a * s_L_dot * w);
1637
1639 .noalias() += NTN * (ip_dd.dfW_2.dp_GR * s_L_dot * w);
1640
1641 // sign negated because of dp_cap = -dp_LR
1642 // TODO (naumov) Had to change the sign to get equal Jacobian WW
1643 // blocks in A2 Test. Where is the error?
1645 .noalias() += NTN * ((ip_dd.dfW_2.dp_cap * s_L_dot +
1646 ip_cv.fW_2.a * ip_dd.dS_L_dp_cap() / dt) *
1647 w);
1648
1649 local_Jac
1652 .noalias() += NTN * (ip_dd.dfW_2.dT * s_L_dot * w);
1653 }
1654
1655 // fW_3 = \int phi * a
1656 fW.noalias() -=
1657 NpT * (current_state.porosity_data.phi * ip_cv.fW_3a.a * w);
1658
1659 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() +=
1660 NTN * (current_state.porosity_data.phi * ip_dd.dfW_3a.dp_GR * w);
1661
1662 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() +=
1663 NTN * (current_state.porosity_data.phi * ip_dd.dfW_3a.dp_cap * w);
1664
1665 local_Jac
1668 .noalias() +=
1669 NTN * ((ip_dd.porosity_d_data.dphi_dT * ip_cv.fW_3a.a +
1670 current_state.porosity_data.phi * ip_dd.dfW_3a.dT) *
1671 w);
1672
1673 // ---------------------------------------------------------------------
1674 // - temperature equation
1675 // ---------------------------------------------------------------------
1676
1677 MTu.noalias() +=
1678 BTI2N.transpose() *
1679 (ip_cv.effective_volumetric_enthalpy_data.rho_h_eff * w);
1680
1681 // dfT_4/dp_GR
1682 // d (MTu * u_dot)/dp_GR
1683 local_Jac
1685 C_index)
1686 .noalias() +=
1687 NTN * (ip_dd.effective_volumetric_enthalpy_d_data.drho_h_eff_dp_GR *
1688 div_u_dot * w);
1689
1690 // dfT_4/dp_cap
1691 // d (MTu * u_dot)/dp_cap
1692 local_Jac
1694 W_index)
1695 .noalias() -=
1696 NTN *
1697 (ip_dd.effective_volumetric_enthalpy_d_data.drho_h_eff_dp_cap *
1698 div_u_dot * w);
1699
1700 // dfT_4/dT
1701 // d (MTu * u_dot)/dT
1702 local_Jac
1705 .noalias() +=
1706 NTN * (ip_dd.effective_volumetric_enthalpy_d_data.drho_h_eff_dT *
1707 div_u_dot * w);
1708
1709 KTT.noalias() +=
1710 gradNTT * ip_cv.thermal_conductivity_data.lambda * gradNT * w;
1711
1712 // d KTT/dp_GR * T
1713 // TODO (naumov) always zero if lambda_xR have no derivatives wrt. p_GR.
1714 // dlambda_dp_GR =
1715 // (dphi_G_dp_GR = 0) * lambdaGR + phi_G * dlambda_GR_dp_GR +
1716 // (dphi_L_dp_GR = 0) * lambdaLR + phi_L * dlambda_LR_dp_GR +
1717 // (dphi_S_dp_GR = 0) * lambdaSR + phi_S * dlambda_SR_dp_GR +
1718 // = 0
1719 //
1720 // Since dlambda/dp_GR is 0 the derivative is omitted:
1721 // local_Jac
1722 // .template block<temperature_size, C_size>(temperature_index,
1723 // C_index)
1724 // .noalias() += gradNTT * dlambda_dp_GR * gradT * Np * w;
1725
1726 // d KTT/dp_cap * T
1727 local_Jac
1729 W_index)
1730 .noalias() += gradNTT *
1731 ip_dd.thermal_conductivity_d_data.dlambda_dp_cap *
1732 gradT * Np * w;
1733
1734 // d KTT/dT * T
1735 local_Jac
1738 .noalias() += gradNTT *
1739 ip_dd.thermal_conductivity_d_data.dlambda_dT * gradT *
1740 NT * w;
1741
1742 // fT_1
1743 fT.noalias() -= NTT * (ip_cv.fT_1.m * w);
1744
1745 // dfT_1/dp_GR
1746 local_Jac
1748 C_index)
1749 .noalias() += NTN * (ip_dd.dfT_1.dp_GR * w);
1750
1751 // dfT_1/dp_cap
1752 local_Jac
1754 W_index)
1755 .noalias() += NTN * (ip_dd.dfT_1.dp_cap * w);
1756
1757 // dfT_1/dT
1758 // MTT
1759 local_Jac
1762 .noalias() += NTN * (ip_dd.dfT_1.dT * w);
1763
1764 // fT_2
1765 fT.noalias() += gradNTT * ip_cv.fT_2.A * w;
1766
1767 // dfT_2/dp_GR
1768 local_Jac
1770 C_index)
1771 .noalias() -=
1772 // dfT_2/dp_GR first part
1773 gradNTT * ip_dd.dfT_2.dp_GR_Npart * Np * w +
1774 // dfT_2/dp_GR second part
1775 gradNTT * ip_dd.dfT_2.dp_GR_gradNpart * gradNp * w;
1776
1777 // dfT_2/dp_cap
1778 local_Jac
1780 W_index)
1781 .noalias() -=
1782 // first part of dfT_2/dp_cap
1783 gradNTT * (-ip_dd.dfT_2.dp_cap_Npart) * Np * w +
1784 // second part of dfT_2/dp_cap
1785 gradNTT * (-ip_dd.dfT_2.dp_cap_gradNpart) * gradNp * w;
1786
1787 // dfT_2/dT
1788 local_Jac
1791 .noalias() -= gradNTT * ip_dd.dfT_2.dT * NT * w;
1792
1793 // fT_3
1794 fT.noalias() += NTT * (ip_cv.fT_3.N * w);
1795
1796 fT.noalias() += gradNTT * ip_cv.fT_3.gradN * w;
1797
1798 // ---------------------------------------------------------------------
1799 // - displacement equation
1800 // ---------------------------------------------------------------------
1801
1802 KUpG.noalias() -= BTI2N * (ip_cv.biot_data() * w);
1803
1804 // dfU_2/dp_GR = dKUpG/dp_GR * p_GR + KUpG. The former is zero, the
1805 // latter is handled below.
1806
1807 KUpC.noalias() += BTI2N * (ip_cv.fu_2_KupC.m * w);
1808
1809 // dfU_2/dp_cap = dKUpC/dp_cap * p_cap + KUpC. The former is handled
1810 // here, the latter below.
1811 local_Jac
1813 W_index)
1814 .noalias() += BTI2N * (ip_dd.dfu_2_KupC.dp_cap * w);
1815
1816 auto const BuTC =
1817 (Bu.transpose() * ip_cd.s_mech_data.stiffness_tensor).eval();
1818 local_Jac
1821 .noalias() += BuTC * Bu * w;
1822
1823 // fU_1
1824 fU.noalias() -=
1825 (Bu.transpose() * current_state.eff_stress_data.sigma_eff -
1826 N_u_op(Nu).transpose() * ip_cv.volumetric_body_force()) *
1827 w;
1828
1829 // KuT
1830 local_Jac
1833 .noalias() -= Bu.transpose() * ip_dd.dfu_1_KuT.dT * NT * w;
1834
1835 /* TODO (naumov) Test with gravity needed to check this Jacobian part.
1836 local_Jac
1837 .template block<displacement_size, temperature_size>(
1838 displacement_index, temperature_index)
1839 .noalias() += N_u_op(Nu).transpose() * ip_cv.drho_dT * b *
1840 N_u_op(Nu).transpose() * w;
1841 */
1842
1843 if (this->process_data_.apply_mass_lumping)
1844 {
1845 MCpG = MCpG.colwise().sum().eval().asDiagonal();
1846 MCpC = MCpC.colwise().sum().eval().asDiagonal();
1847 MWpG = MWpG.colwise().sum().eval().asDiagonal();
1848 MWpC = MWpC.colwise().sum().eval().asDiagonal();
1849 }
1850 } // int_point-loop
1851
1852 // --- Gas ---
1853 // fC_4
1854 fC.noalias() -= LCpG * gas_pressure + LCpC * capillary_pressure +
1855 LCT * temperature +
1860
1861 local_Jac.template block<C_size, C_size>(C_index, C_index).noalias() +=
1862 LCpG + MCpG / dt;
1863 local_Jac.template block<C_size, W_size>(C_index, W_index).noalias() +=
1864 LCpC + MCpC / dt;
1865 local_Jac
1867 .noalias() += LCT + MCT / dt;
1868 local_Jac
1870 .noalias() += MCu / dt;
1871
1872 // --- Capillary pressure ---
1873 // fW_4
1874 fW.noalias() -= LWpG * gas_pressure + LWpC * capillary_pressure +
1875 LWT * temperature +
1880
1881 local_Jac.template block<W_size, W_size>(W_index, W_index).noalias() +=
1882 LWpC + MWpC / dt;
1883 local_Jac.template block<W_size, C_size>(W_index, C_index).noalias() +=
1884 LWpG + MWpG / dt;
1885 local_Jac
1887 .noalias() += LWT + MWT / dt;
1888 local_Jac
1890 .noalias() += MWu / dt;
1891
1892 // --- Temperature ---
1893 // fT_4
1894 fT.noalias() -=
1896
1897 local_Jac
1900 .noalias() += KTT;
1901 local_Jac
1904 .noalias() += MTu / dt;
1905
1906 // --- Displacement ---
1907 // fU_2
1908 fU.noalias() -= KUpG * gas_pressure + KUpC * capillary_pressure;
1909
1910 local_Jac
1912 .noalias() += KUpG;
1913 local_Jac
1915 .noalias() += KUpC;
1916}
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:63
static double trace(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Trace of the corresponding tensor.

References _ip_data, C_index, C_size, capillary_pressure_index, capillary_pressure_size, ProcessLib::LinearBMatrix::computeBMatrix(), MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, displacement_index, displacement_size, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, gas_pressure_index, gas_pressure_size, ParameterLib::SpatialPosition::getCoordinates(), MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, NumLib::interpolateCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::is_axially_symmetric_, N_u_op, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::solid_material_, temperature_index, temperature_size, MathLib::KelvinVector::Invariants< KelvinVectorSize >::trace(), updateConstitutiveVariables(), updateConstitutiveVariablesDerivatives(), W_index, and W_size.

◆ 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 1921 of file TH2MFEM-impl.h.

1925{
1926 auto const gas_pressure =
1928 auto const capillary_pressure =
1932
1937 *this->process_data_.gas_pressure_interpolated);
1938
1943 *this->process_data_.capillary_pressure_interpolated);
1944
1949 *this->process_data_.liquid_pressure_interpolated);
1950
1951 auto const temperature =
1953
1958 *this->process_data_.temperature_interpolated);
1959
1961 this->solid_material_, *this->process_data_.phase_transition_model_};
1962
1964}

References capillary_pressure_index, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, gas_pressure_index, NumLib::interpolateToHigherOrderNodes(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::is_axially_symmetric_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::solid_material_, temperature_index, and updateConstitutiveVariables().

◆ getNumberOfVectorElementsForDeformation()

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

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 235 of file TH2MFEM.h.

236 {
237 return displacement_size;
238 }

References displacement_size.

◆ 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 203 of file TH2MFEM.h.

205 {
206 auto const& N_u = _secondary_data.N_u[integration_point];
207
208 // assumes N is stored contiguously in memory
209 return Eigen::Map<const Eigen::RowVectorXd>(N_u.data(), N_u.size());
210 }

References _secondary_data.

◆ 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 110 of file TH2MFEM.h.

111 {
112 unsigned const n_integration_points =
113 this->integration_method_.getNumberOfPoints();
115 auto const& medium =
116 *this->process_data_.media_map.getMedium(this->element_.getID());
117
118 for (unsigned ip = 0; ip < n_integration_points; ip++)
119 {
120 auto& ip_data = _ip_data[ip];
121
123 std::nullopt, this->element_.getID(),
127 ip_data.N_u))};
128 auto& current_state = this->current_states_[ip];
129
131 if (this->process_data_.initial_stress.value)
132 {
133 current_state.eff_stress_data.sigma_eff.noalias() =
136 (*this->process_data_.initial_stress.value)(
138 double>::quiet_NaN() /* time independent */,
139 x_position));
140 }
141
142 if (*this->process_data_.initialize_porosity_from_medium_property)
143 {
144 // Initial porosity. Could be read from integration point data
145 // or mesh.
146 current_state.porosity_data.phi =
150
151 if (medium.hasProperty(
153 {
154 current_state.transport_porosity_data.phi =
158 }
159 else
160 {
161 current_state.transport_porosity_data.phi =
162 current_state.porosity_data.phi;
163 }
164 }
165
166 double const t = 0; // TODO (naumov) pass t from top
167 auto& material_state = this->material_states_[ip];
168 this->solid_material_.initializeInternalStateVariables(
169 t, x_position, *material_state.material_state_variables);
170
171 material_state.pushBackState();
172 }
173
174 for (unsigned ip = 0; ip < n_integration_points; ip++)
175 {
176 this->prev_states_[ip] = this->current_states_[ip];
177 }
178 }
std::vector< ConstitutiveRelations::MaterialStateData< DisplacementDim > > material_states_

References _ip_data, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, 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

◆ 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 840 of file TH2MFEM-impl.h.

844{
845 [[maybe_unused]] auto const matrix_size =
848
849 assert(local_x.size() == matrix_size);
850
851 auto const capillary_pressure =
854
855 auto const p_GR =
857
858 auto const temperature =
860
861 auto const displacement =
863
864 auto const& medium =
865 *this->process_data_.media_map.getMedium(this->element_.getID());
866 auto const& solid_phase =
868
870 this->solid_material_, *this->process_data_.phase_transition_model_};
871
872 unsigned const n_integration_points =
873 this->integration_method_.getNumberOfPoints();
874
875 for (unsigned ip = 0; ip < n_integration_points; ip++)
876 {
878
879 auto& ip_data = _ip_data[ip];
880 auto& ip_out = this->output_data_[ip];
881 auto& prev_state = this->prev_states_[ip];
882 auto const& Np = ip_data.N_p;
883 auto const& NT = Np;
884 auto const& Nu = ip_data.N_u;
885 auto const& gradNu = ip_data.dNdx_u;
886
888 std::nullopt, this->element_.getID(),
892 this->element_, ip_data.N_u))};
893
894 auto const x_coord = pos.getCoordinates().value()[0];
895
896 double const pCap = Np.dot(capillary_pressure);
897 vars.capillary_pressure = pCap;
898
899 double const T = NT.dot(temperature);
901 T, T}; // T_prev = T in initialization.
902 vars.temperature = T;
903
904 auto const Bu =
909
910 auto& eps = ip_out.eps_data.eps;
911 eps.noalias() = Bu * displacement;
912
913 // Set volumetric strain rate for the general case without swelling.
914 vars.volumetric_strain = Invariants::trace(eps);
915
916 double const S_L =
918 .template value<double>(
920 this->prev_states_[ip].S_L_data->S_L = S_L;
921
922 // TODO (naumov) Double computation of C_el might be avoided if
923 // updateConstitutiveVariables is called before. But it might interfere
924 // with eps_m initialization.
926 C_el_data;
927 // dt = 0 at initialization: there is no time step yet, which yields
928 // the elastic tangent. Other property evaluations at initialization
929 // pass NaN for dt to keep initialization and integration strictly
930 // separated.
931 models.elastic_tangent_stiffness_model.eval({pos, t, 0.0 /*dt*/},
933 auto const& C_el = C_el_data.stiffness_tensor;
934
935 // Set eps_m_prev from potentially non-zero eps and sigma_sw from
936 // restart.
937 auto const& sigma_sw = this->current_states_[ip].swelling_data.sigma_sw;
938 prev_state.mechanical_strain_data->eps_m.noalias() =
940 ? eps + C_el.inverse() * sigma_sw
941 : eps;
942
943 if (this->process_data_.initial_stress.isTotalStress())
944 {
945 auto const alpha_b =
947 .template value<double>(vars, pos, t, 0.0 /*dt*/);
948
949 vars.liquid_saturation = S_L;
950 double const bishop =
952 .template value<double>(vars, pos, t, 0.0 /*dt*/);
953
954 this->current_states_[ip].eff_stress_data.sigma_eff.noalias() +=
957 this->prev_states_[ip].eff_stress_data =
958 this->current_states_[ip].eff_stress_data;
959 }
960 }
961
962 // local_x_prev equal to local_x s.t. the local_x_dot is zero.
964
965 for (unsigned ip = 0; ip < n_integration_points; ip++)
966 {
967 this->material_states_[ip].pushBackState();
968 this->prev_states_[ip] = this->current_states_[ip];
969 }
970}
std::vector< ConstitutiveRelations::OutputData< DisplacementDim > > output_data_

References _ip_data, MaterialPropertyLib::biot_coefficient, MaterialPropertyLib::bishops_effective_stress, MaterialPropertyLib::VariableArray::capillary_pressure, capillary_pressure_index, capillary_pressure_size, ProcessLib::LinearBMatrix::computeBMatrix(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, displacement_index, displacement_size, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::elastic_tangent_stiffness_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, gas_pressure_index, gas_pressure_size, ParameterLib::SpatialPosition::getCoordinates(), MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, NumLib::interpolateCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::is_axially_symmetric_, MaterialPropertyLib::VariableArray::liquid_saturation, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::material_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::output_data_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, MaterialPropertyLib::saturation, MaterialPropertyLib::Solid, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::solid_material_, ProcessLib::TH2M::ConstitutiveRelations::ElasticTangentStiffnessData< DisplacementDim >::stiffness_tensor, MaterialPropertyLib::swelling_stress_rate, MaterialPropertyLib::VariableArray::temperature, temperature_index, temperature_size, MathLib::KelvinVector::Invariants< KelvinVectorSize >::trace(), updateConstitutiveVariables(), 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 780 of file TH2MFEM-impl.h.

783{
784 if (integration_order !=
785 static_cast<int>(this->integration_method_.getIntegrationOrder()))
786 {
787 OGS_FATAL(
788 "Setting integration point initial conditions; The integration "
789 "order of the local assembler for element {:d} is different "
790 "from the integration order in the initial condition.",
791 this->element_.getID());
792 }
793
794 if (name == "sigma" && this->process_data_.initial_stress.value)
795 {
796 OGS_FATAL(
797 "Setting initial conditions for stress from integration "
798 "point data and from a parameter '{:s}' is not possible "
799 "simultaneously.",
800 this->process_data_.initial_stress.value->name);
801 }
802
803 if (name.starts_with("material_state_variable_"))
804 {
805 name.remove_prefix(24);
806 DBUG("Setting material state variable '{:s}'", name);
807
808 auto const& internal_variables =
809 this->solid_material_.getInternalVariables();
810 if (auto const iv = std::find_if(
812 [&name](auto const& iv) { return iv.name == name; });
814 {
815 DBUG("Setting material state variable '{:s}'", name);
820 iv->reference);
821 }
822
823 WARN(
824 "Could not find variable {:s} in solid material model's "
825 "internal variables.",
826 name);
827 return 0;
828 }
829
830 // TODO this logic could be pulled out of the local assembler into the
831 // process. That might lead to a slightly better performance due to less
832 // string comparisons.
834 name, values, this->current_states_);
835}
#define OGS_FATAL(...)
Definition Error.h:10
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:34
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 ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, DBUG(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::material_states_, OGS_FATAL, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, ProcessLib::Reflection::reflectSetIPData(), ProcessLib::setIntegrationPointDataMaterialStateVariables(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::solid_material_, 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 81 of file TH2MFEM-impl.h.

87{
88 [[maybe_unused]] auto const matrix_size =
91
92 assert(local_x.size() == matrix_size);
93
94 auto const gas_pressure =
96 auto const gas_pressure_prev =
98 auto const capillary_pressure =
101 auto const capillary_pressure_prev =
104
105 auto const temperature =
107 auto const temperature_prev =
109
110 auto const displacement =
112 auto const displacement_prev =
114
115 auto const& medium =
116 *this->process_data_.media_map.getMedium(this->element_.getID());
118
119 unsigned const n_integration_points =
120 this->integration_method_.getNumberOfPoints();
121
126
127 for (unsigned ip = 0; ip < n_integration_points; ip++)
128 {
129 auto& ip_data = _ip_data[ip];
132 auto& ip_out = this->output_data_[ip];
133 auto& current_state = this->current_states_[ip];
134 auto& prev_state = this->prev_states_[ip];
135
136 auto const& Np = ip_data.N_p;
137 auto const& NT = Np;
138 auto const& Nu = ip_data.N_u;
139 auto const& gradNu = ip_data.dNdx_u;
140 auto const& gradNp = ip_data.dNdx_p;
142 std::nullopt, this->element_.getID(),
146 this->element_, Nu))};
147
148 auto const x_coord =
149 pos.getCoordinates().value()[0]; // r for axisymmetry
150
151 double const T = NT.dot(temperature);
152 double const T_prev = NT.dot(temperature_prev);
153 double const pG = Np.dot(gas_pressure);
154 double const pG_prev = Np.dot(gas_pressure_prev);
155 double const pCap = Np.dot(capillary_pressure);
156 double const pCap_prev = Np.dot(capillary_pressure_prev);
160 pCap_prev};
167
168 // medium properties
169 models.elastic_tangent_stiffness_model.eval({pos, t, dt}, T_data,
170 ip_cv.C_el_data);
171
172 models.biot_model.eval({pos, t, dt}, media_data, ip_cv.biot_data);
173
174 auto const Bu =
179
180 ip_out.eps_data.eps.noalias() = Bu * displacement;
181 models.S_L_model.eval({pos, t, dt}, media_data, pCap_data,
182 current_state.S_L_data);
183
184 models.chi_S_L_model.eval({pos, t, dt}, media_data,
185 current_state.S_L_data,
186 current_state.chi_S_L);
187
188 models.chi_S_L_prev_model.eval({pos, t, dt}, media_data,
189 prev_state.S_L_data, prev_state.chi_S_L);
190
191 // solid phase compressibility
192 models.beta_p_SR_model.eval({pos, t, dt}, ip_cv.biot_data,
193 ip_cv.C_el_data, ip_cv.beta_p_SR);
194
195 // If there is swelling stress rate, compute swelling stress.
196 models.swelling_model.eval(
197 {pos, t, dt}, media_data, ip_cv.C_el_data, current_state.S_L_data,
198 prev_state.S_L_data, prev_state.swelling_data,
199 current_state.swelling_data, ip_cv.swelling_data);
200
201 // solid phase linear thermal expansion coefficient
202 models.s_therm_exp_model.eval({pos, t, dt}, media_data,
203 ip_cv.s_therm_exp_data);
204
205 models.mechanical_strain_model.eval(
206 T_data, ip_cv.s_therm_exp_data, ip_out.eps_data,
207 Bu * displacement_prev, prev_state.mechanical_strain_data,
208 ip_cv.swelling_data, current_state.mechanical_strain_data);
209
210 models.s_mech_model.eval(
211 {pos, t, dt}, T_data, current_state.mechanical_strain_data,
212 prev_state.mechanical_strain_data, prev_state.eff_stress_data,
213 current_state.eff_stress_data, this->material_states_[ip],
214 ip_cd.s_mech_data, ip_cv.equivalent_plastic_strain_data);
215
216 models.total_stress_model.eval(current_state.eff_stress_data,
217 ip_cv.biot_data, current_state.chi_S_L,
219 ip_out.total_stress_data);
220
221 models.pure_liquid_density_model.eval({pos, t, dt}, media_data,
223 current_state.rho_W_LR);
224
225 models.phase_transition_model.eval(
227 current_state.rho_W_LR, ip_out.fluid_enthalpy_data,
228 ip_out.mass_mole_fractions_data, ip_out.fluid_density_data,
229 ip_out.vapour_pressure_data, current_state.constituent_density_data,
230 ip_cv.phase_transition_data);
231
232 models.viscosity_model.eval({pos, t, dt}, media_data, T_data,
233 ip_out.mass_mole_fractions_data,
234 ip_cv.viscosity_data);
235
236 models.porosity_model.eval(
237 {pos, t, dt}, media_data, current_state.S_L_data,
238 prev_state.S_L_data, pCap_data, pGR_data, current_state.chi_S_L,
239 prev_state.chi_S_L, ip_cv.beta_p_SR, ip_out.eps_data,
240 Bu * displacement_prev, prev_state.porosity_data,
241 current_state.porosity_data);
242
244 {
245 models.transport_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,
249 current_state.mechanical_strain_data,
250 prev_state.mechanical_strain_data,
251 prev_state.transport_porosity_data, current_state.porosity_data,
252 current_state.transport_porosity_data);
253 }
254 else
255 {
256 current_state.transport_porosity_data.phi =
257 current_state.porosity_data.phi;
258 }
259
260 models.permeability_model.eval(
261 {pos, t, dt}, media_data, current_state.S_L_data, pGR_data,
262 pCap_data, T_data, current_state.transport_porosity_data,
263 ip_out.total_stress_data, current_state.mechanical_strain_data,
264 ip_out.eps_data, ip_cv.equivalent_plastic_strain_data,
265 ip_out.permeability_data);
266
267 models.solid_density_model.eval(
268 {pos, t, dt}, media_data, T_data, current_state.eff_stress_data,
270 current_state.porosity_data, ip_out.solid_density_data);
271
272 models.solid_heat_capacity_model.eval({pos, t, dt}, media_data, T_data,
273 ip_cv.solid_heat_capacity_data);
274
275 models.thermal_conductivity_model.eval(
276 {pos, t, dt}, media_data, T_data, current_state.porosity_data,
277 current_state.S_L_data, ip_cv.thermal_conductivity_data);
278
279 models.advection_model.eval(current_state.constituent_density_data,
280 ip_out.permeability_data,
281 current_state.rho_W_LR,
282 ip_cv.viscosity_data,
283 ip_cv.advection_data);
284
285 models.gravity_model.eval(
286 ip_out.fluid_density_data,
287 current_state.porosity_data,
288 current_state.S_L_data,
289 ip_out.solid_density_data,
291 this->process_data_.specific_body_force),
292 ip_cv.volumetric_body_force);
293
294 models.diffusion_velocity_model.eval(grad_p_cap,
295 grad_p_GR,
296 ip_out.mass_mole_fractions_data,
297 ip_cv.phase_transition_data,
298 current_state.porosity_data,
299 current_state.S_L_data,
300 grad_T,
301 ip_out.diffusion_velocity_data);
302
303 models.solid_enthalpy_model.eval(ip_cv.solid_heat_capacity_data, T_data,
304 ip_out.solid_enthalpy_data);
305
306 models.internal_energy_model.eval(ip_out.fluid_density_data,
307 ip_cv.phase_transition_data,
308 current_state.porosity_data,
309 current_state.S_L_data,
310 ip_out.solid_density_data,
311 ip_out.solid_enthalpy_data,
312 current_state.internal_energy_data);
313
314 models.effective_volumetric_enthalpy_model.eval(
315 ip_out.fluid_density_data,
316 ip_out.fluid_enthalpy_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 ip_cv.effective_volumetric_enthalpy_data);
322
323 models.fC_1_model.eval(ip_cv.advection_data, ip_out.fluid_density_data,
324 ip_cv.fC_1);
325
326 if (!this->process_data_.apply_mass_lumping)
327 {
328 models.fC_2a_model.eval(ip_cv.biot_data,
329 pCap_data,
330 current_state.constituent_density_data,
331 current_state.porosity_data,
332 current_state.S_L_data,
333 ip_cv.beta_p_SR,
334 ip_cv.fC_2a);
335 }
336 models.fC_3a_model.eval(dt,
337 current_state.constituent_density_data,
338 prev_state.constituent_density_data,
339 current_state.S_L_data,
340 ip_cv.fC_3a);
341
342 models.fC_4_LCpG_model.eval(ip_cv.advection_data,
343 ip_out.fluid_density_data,
344 ip_cv.phase_transition_data,
345 current_state.porosity_data,
346 current_state.S_L_data,
347 ip_cv.fC_4_LCpG);
348
349 models.fC_4_LCpC_model.eval(ip_cv.advection_data,
350 ip_out.fluid_density_data,
351 ip_cv.phase_transition_data,
352 current_state.porosity_data,
353 current_state.S_L_data,
354 ip_cv.fC_4_LCpC);
355
356 models.fC_4_LCT_model.eval(ip_out.fluid_density_data,
357 ip_cv.phase_transition_data,
358 current_state.porosity_data,
359 current_state.S_L_data,
360 ip_cv.fC_4_LCT);
361
362 models.fC_4_MCpG_model.eval(ip_cv.biot_data,
363 current_state.constituent_density_data,
364 current_state.porosity_data,
365 current_state.S_L_data,
366 ip_cv.beta_p_SR,
367 ip_cv.fC_4_MCpG);
368
369 models.fC_4_MCpC_model.eval(ip_cv.biot_data,
370 pCap_data,
371 current_state.constituent_density_data,
372 current_state.porosity_data,
373 prev_state.S_L_data,
374 current_state.S_L_data,
375 ip_cv.beta_p_SR,
376 ip_cv.fC_4_MCpC);
377
378 models.fC_4_MCT_model.eval(ip_cv.biot_data,
379 current_state.constituent_density_data,
380 current_state.porosity_data,
381 current_state.S_L_data,
382 ip_cv.s_therm_exp_data,
383 ip_cv.fC_4_MCT);
384
385 models.fC_4_MCu_model.eval(ip_cv.biot_data,
386 current_state.constituent_density_data,
387 current_state.S_L_data,
388 ip_cv.fC_4_MCu);
389
390 models.fW_1_model.eval(ip_cv.advection_data, ip_out.fluid_density_data,
391 ip_cv.fW_1);
392
393 if (!this->process_data_.apply_mass_lumping)
394 {
395 models.fW_2_model.eval(ip_cv.biot_data,
396 pCap_data,
397 current_state.constituent_density_data,
398 current_state.porosity_data,
399 current_state.rho_W_LR,
400 current_state.S_L_data,
401 ip_cv.beta_p_SR,
402 ip_cv.fW_2);
403 }
404 models.fW_3a_model.eval(dt,
405 current_state.constituent_density_data,
406 prev_state.constituent_density_data,
407 prev_state.rho_W_LR,
408 current_state.rho_W_LR,
409 current_state.S_L_data,
410 ip_cv.fW_3a);
411
412 models.fW_4_LWpG_model.eval(ip_cv.advection_data,
413 ip_out.fluid_density_data,
414 ip_cv.phase_transition_data,
415 current_state.porosity_data,
416 current_state.S_L_data,
417 ip_cv.fW_4_LWpG);
418
419 models.fW_4_LWpC_model.eval(ip_cv.advection_data,
420 ip_out.fluid_density_data,
421 ip_cv.phase_transition_data,
422 current_state.porosity_data,
423 current_state.S_L_data,
424 ip_cv.fW_4_LWpC);
425
426 models.fW_4_LWT_model.eval(ip_out.fluid_density_data,
427 ip_cv.phase_transition_data,
428 current_state.porosity_data,
429 current_state.S_L_data,
430 ip_cv.fW_4_LWT);
431
432 models.fW_4_MWpG_model.eval(ip_cv.biot_data,
433 current_state.constituent_density_data,
434 current_state.porosity_data,
435 current_state.rho_W_LR,
436 current_state.S_L_data,
437 ip_cv.beta_p_SR,
438 ip_cv.fW_4_MWpG);
439
440 models.fW_4_MWpC_model.eval(ip_cv.biot_data,
441 pCap_data,
442 current_state.constituent_density_data,
443 current_state.porosity_data,
444 prev_state.S_L_data,
445 current_state.rho_W_LR,
446 current_state.S_L_data,
447 ip_cv.beta_p_SR,
448 ip_cv.fW_4_MWpC);
449
450 models.fW_4_MWT_model.eval(ip_cv.biot_data,
451 current_state.constituent_density_data,
452 current_state.porosity_data,
453 current_state.rho_W_LR,
454 current_state.S_L_data,
455 ip_cv.s_therm_exp_data,
456 ip_cv.fW_4_MWT);
457
458 models.fW_4_MWu_model.eval(ip_cv.biot_data,
459 current_state.constituent_density_data,
460 current_state.rho_W_LR,
461 current_state.S_L_data,
462 ip_cv.fW_4_MWu);
463
464 models.fT_1_model.eval(dt,
465 current_state.internal_energy_data,
466 prev_state.internal_energy_data,
467 ip_cv.fT_1);
468
469 // ---------------------------------------------------------------------
470 // Derivatives for Jacobian
471 // ---------------------------------------------------------------------
472
473 models.darcy_velocity_model.eval(
475 ip_out.fluid_density_data,
476 grad_p_GR,
477 ip_out.permeability_data,
479 this->process_data_.specific_body_force),
480 ip_cv.viscosity_data,
481 ip_out.darcy_velocity_data);
482
483 models.fT_2_model.eval(ip_out.darcy_velocity_data,
484 ip_out.fluid_density_data,
485 ip_out.fluid_enthalpy_data,
486 ip_cv.fT_2);
487
488 models.fT_3_model.eval(
489 current_state.constituent_density_data,
490 ip_out.darcy_velocity_data,
491 ip_out.diffusion_velocity_data,
492 ip_out.fluid_density_data,
493 ip_cv.phase_transition_data,
495 this->process_data_.specific_body_force),
496 ip_cv.fT_3);
497
498 models.fu_2_KupC_model.eval(ip_cv.biot_data, current_state.chi_S_L,
499 ip_cv.fu_2_KupC);
500 }
501
503}

References _ip_data, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::advection_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::beta_p_SR_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::biot_model, capillary_pressure_index, capillary_pressure_size, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::chi_S_L_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::chi_S_L_prev_model, ProcessLib::LinearBMatrix::computeBMatrix(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::darcy_velocity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::diffusion_velocity_model, displacement_index, displacement_size, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::effective_volumetric_enthalpy_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::elastic_tangent_stiffness_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, 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, gas_pressure_index, gas_pressure_size, ParameterLib::SpatialPosition::getCoordinates(), ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::gravity_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::internal_energy_model, NumLib::interpolateCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::is_axially_symmetric_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::material_states_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::mechanical_strain_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::output_data_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::permeability_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::phase_transition_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::porosity_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, 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, temperature_index, temperature_size, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::thermal_conductivity_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::total_stress_model, MaterialPropertyLib::transport_porosity, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::transport_porosity_model, and ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::viscosity_model.

Referenced by assemble(), assembleWithJacobian(), computeSecondaryVariableConcrete(), and setInitialConditionsConcrete().

◆ 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 509 of file TH2MFEM-impl.h.

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

References _ip_data, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::advection_model, capillary_pressure_index, capillary_pressure_size, ProcessLib::LinearBMatrix::computeBMatrix(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::current_states_, 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(), displacement_index, displacement_size, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::effective_volumetric_enthalpy_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::element_, 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, gas_pressure_index, gas_pressure_size, ParameterLib::SpatialPosition::getCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::integration_method_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::internal_energy_model, NumLib::interpolateCoordinates(), ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::is_axially_symmetric_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::output_data_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::porosity_model, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::prev_states_, ProcessLib::TH2M::LocalAssemblerInterface< DisplacementDim >::process_data_, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::S_L_model, ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::solid_density_model, temperature_index, temperature_size, and ProcessLib::TH2M::ConstitutiveRelations::ConstitutiveModels< DisplacementDim >::thermal_conductivity_model.

Referenced by assembleWithJacobian().

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

Definition at line 249 of file TH2MFEM.h.

Referenced by TH2MLocalAssembler(), and getShapeMatrix().

◆ C_index

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

Definition at line 263 of file TH2MFEM.h.

Referenced by assemble(), and assembleWithJacobian().

◆ 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 264 of file TH2MFEM.h.

Referenced by assembleWithJacobian().

◆ capillary_pressure_index

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

◆ capillary_pressure_size

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

◆ 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 260 of file TH2MFEM.h.

Referenced by assemble(), assembleWithJacobian(), getNumberOfVectorElementsForDeformation(), setInitialConditionsConcrete(), updateConstitutiveVariables(), and updateConstitutiveVariablesDerivatives().

◆ gas_pressure_index

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

◆ gas_pressure_size

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

◆ 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 66 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 70 of file TH2MFEM.h.

Referenced by assemble(), and assembleWithJacobian().

◆ temperature_index

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

◆ temperature_size

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

◆ 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 265 of file TH2MFEM.h.

Referenced by assemble(), and assembleWithJacobian().

◆ 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 266 of file TH2MFEM.h.

Referenced by assembleWithJacobian().


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