OGS
ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim > Class Template Reference

Detailed Description

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
class ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >

Definition at line 45 of file ThermoHydroMechanicsFEM.h.

#include <ThermoHydroMechanicsFEM.h>

Inheritance diagram for ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >:
[legend]
Collaboration diagram for ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >:
[legend]

Public Types

using ShapeMatricesTypeDisplacement
using ShapeMatricesTypePressure
using GlobalDimMatrixType
using GlobalDimVectorType
using Invariants = MathLib::KelvinVector::Invariants<KelvinVectorSize>
using SymmetricTensor = Eigen::Matrix<double, KelvinVectorSize, 1>

Public Member Functions

 ThermoHydroMechanicsLocalAssembler (ThermoHydroMechanicsLocalAssembler const &)=delete
 ThermoHydroMechanicsLocalAssembler (ThermoHydroMechanicsLocalAssembler &&)=delete
 ThermoHydroMechanicsLocalAssembler (MeshLib::Element const &e, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, ThermoHydroMechanicsProcessData< DisplacementDim > &process_data)
std::size_t setIPDataInitialConditions (std::string_view const name, double const *values, int const integration_order) override
 Returns number of read integration points.
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 setInitialConditionsConcrete (Eigen::VectorXd const local_x, double const t, int const process_id) override
void preTimestepConcrete (std::vector< double > const &, double const, double const) override
void postTimestepConcrete (Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, 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::vector< double > const & getIntPtDarcyVelocity (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
std::vector< double > getSigma () const override
std::vector< double > getSigmaIce () const override
std::vector< double > getIceVolumeFraction () const override
std::vector< double > const & getIntPtFluidDensity (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
std::vector< double > const & getIntPtViscosity (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
int getNumberOfVectorElementsForDeformation () const override
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

ConstitutiveRelationsValues< DisplacementDim > updateConstitutiveRelations (Eigen::Ref< Eigen::VectorXd const > const local_x, Eigen::Ref< Eigen::VectorXd const > const local_x_prev, ParameterLib::SpatialPosition const &x_position, double const t, double const dt, IpData &ip_data, IntegrationPointDataForOutput< DisplacementDim > &ip_data_output) const
std::size_t setSigma (double const *values)
std::vector< double > const & getIntPtSigma (const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > const & getIntPtSigmaIce (const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > getEpsilon0 () const override
virtual std::vector< double > const & getIntPtEpsilon0 (const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > getEpsilonM () const override
virtual std::vector< double > const & getIntPtEpsilonM (const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > getEpsilon () const override
virtual std::vector< double > const & getIntPtEpsilon (const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > const & getIntPtIceVolume (const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
unsigned getNumberOfIntegrationPoints () const override
int getMaterialID () const override
std::vector< double > getMaterialStateVariableInternalState (std::function< std::span< double >(typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables &)> const &get_values_span, int const &n_components) const override
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & getMaterialStateVariablesAt (unsigned integration_point) const override

Static Private Member Functions

template<typename SolutionVector>
static constexpr auto localDOF (SolutionVector const &x)

Private Attributes

ThermoHydroMechanicsProcessData< DisplacementDim > & _process_data
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
std::vector< IntegrationPointDataForOutput< DisplacementDim >, Eigen::aligned_allocator< IntegrationPointDataForOutput< DisplacementDim > > > _ip_data_output
NumLib::GenericIntegrationMethod const & _integration_method
MeshLib::Element const & _element
bool const _is_axially_symmetric
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data

Static Private Attributes

static const int temperature_index = 0
static const int temperature_size = ShapeFunctionPressure::NPOINTS
static const int pressure_index = ShapeFunctionPressure::NPOINTS
static const int pressure_size = ShapeFunctionPressure::NPOINTS
static const int displacement_index = ShapeFunctionPressure::NPOINTS * 2
static const int displacement_size

Member Typedef Documentation

◆ BMatricesType

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
using ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::BMatricesType
private

◆ GlobalDimMatrixType

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
using ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::GlobalDimMatrixType
Initial value:

Definition at line 56 of file ThermoHydroMechanicsFEM.h.

◆ GlobalDimVectorType

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
using ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::GlobalDimVectorType
Initial value:

Definition at line 59 of file ThermoHydroMechanicsFEM.h.

◆ Invariants

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

Definition at line 64 of file ThermoHydroMechanicsFEM.h.

◆ IpData

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
using ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::IpData
private
Initial value:
ShapeMatricesTypePressure, DisplacementDim,
ShapeFunctionDisplacement::NPOINTS>
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
BMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > BMatricesType

Definition at line 275 of file ThermoHydroMechanicsFEM.h.

◆ ShapeMatricesTypeDisplacement

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

Definition at line 49 of file ThermoHydroMechanicsFEM.h.

◆ ShapeMatricesTypePressure

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
using ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::ShapeMatricesTypePressure

◆ SymmetricTensor

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

Definition at line 66 of file ThermoHydroMechanicsFEM.h.

Constructor & Destructor Documentation

◆ ThermoHydroMechanicsLocalAssembler() [1/3]

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

◆ ThermoHydroMechanicsLocalAssembler() [2/3]

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::ThermoHydroMechanicsLocalAssembler ( ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim > && )
delete

◆ ThermoHydroMechanicsLocalAssembler() [3/3]

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

Definition at line 30 of file ThermoHydroMechanicsFEM-impl.h.

39 _element(e),
41{
42 unsigned const n_integration_points =
43 _integration_method.getNumberOfPoints();
44
48
49 auto const shape_matrices_u =
54
55 auto const shape_matrices_p =
59
60 auto const& solid_material =
62 _process_data.solid_materials, _process_data.material_ids,
63 e.getID());
64
65 // Consistency check: if frozen liquid phase is given, then the constitutive
66 // relation for ice must also be given, and vice versa.
67 auto const& medium = _process_data.media_map.getMedium(_element.getID());
69 (_process_data.ice_constitutive_relation != nullptr))
70 {
72 "Frozen liquid phase is {:s} and the solid material constitutive "
73 "relation for ice is {:s}. But both must be given (or both "
74 "omitted).",
76 ? "specified"
77 : "not specified",
78 _process_data.ice_constitutive_relation != nullptr
79 ? "specified"
80 : "not specified");
81 }
82 for (unsigned ip = 0; ip < n_integration_points; ip++)
83 {
84 _ip_data.emplace_back(solid_material);
85 auto& ip_data = _ip_data[ip];
86 auto const& sm_u = shape_matrices_u[ip];
87 ip_data.integration_weight =
88 _integration_method.getWeightedPoint(ip).getWeight() *
89 sm_u.integralMeasure * sm_u.detJ;
90
91 ip_data.N_u = sm_u.N;
92 ip_data.dNdx_u = sm_u.dNdx;
93
95 ip_data.dNdx = shape_matrices_p[ip].dNdx;
96
98 }
99}
#define OGS_FATAL(...)
Definition Error.h:19
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
ThermoHydroMechanicsProcessData< DisplacementDim > & _process_data
std::vector< IntegrationPointDataForOutput< DisplacementDim >, Eigen::aligned_allocator< IntegrationPointDataForOutput< DisplacementDim > > > _ip_data_output
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)

References _element, _integration_method, _ip_data, _ip_data_output, _is_axially_symmetric, _process_data, _secondary_data, MaterialPropertyLib::FrozenLiquid, MeshLib::Element::getID(), NumLib::initShapeMatrices(), OGS_FATAL, and MaterialLib::Solids::selectSolidConstitutiveRelation().

Member Function Documentation

◆ assemble()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assemble ( double const ,
double const ,
std::vector< double > const & ,
std::vector< double > const & ,
std::vector< double > & ,
std::vector< double > & ,
std::vector< double > &  )
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 90 of file ThermoHydroMechanicsFEM.h.

96 {
98 "ThermoHydroMechanicsLocalAssembler: assembly without Jacobian is "
99 "not implemented.");
100 }

References OGS_FATAL.

◆ assembleWithJacobian()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< 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 )
overridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 678 of file ThermoHydroMechanicsFEM-impl.h.

684{
685 assert(local_x.size() ==
687
688 auto const x =
691 local_x_prev.size());
692
693 auto const [T, p, u] = localDOF(local_x);
694 auto const [T_prev, p_prev, u_prev] = localDOF(local_x_prev);
695
702
707
710
713
716
719
722
725
728
731
734
737 Kup;
739
742 Kpu;
743 if (!_process_data.is_volume_balance_equation_type)
744 {
746 }
747
748 auto const& medium = _process_data.media_map.getMedium(_element.getID());
749 bool const has_frozen_liquid_phase =
751
752 unsigned const n_integration_points =
753 _integration_method.getNumberOfPoints();
754
756 double average_velocity_norm = 0.0;
758
759 for (unsigned ip = 0; ip < n_integration_points; ip++)
760 {
761 auto& ip_data = _ip_data[ip];
762 auto const& N_u = ip_data.N_u;
764 std::nullopt, _element.getID(),
768 _element, N_u))};
769
770 auto const crv = updateConstitutiveRelations(
772
773 auto const& w = ip_data.integration_weight;
774
775 auto const& dNdx_u = ip_data.dNdx_u;
776
777 auto const& N = ip_data.N;
778 auto const& dNdx = ip_data.dNdx;
779
780 auto const T_int_pt = N.dot(T);
781
782 auto const x_coord =
783 x_position.getCoordinates().value()[0]; // r for axisymmetry
784 auto const B =
789
790 auto const& b = _process_data.specific_body_force;
791 auto const velocity = _ip_data_output[ip].velocity;
792
793 //
794 // displacement equation, displacement part
795 //
796
797 auto const C_eff = has_frozen_liquid_phase
798 ? (crv.C + crv.J_uu_fr).eval()
799 : crv.C.eval();
803 .noalias() += B.transpose() * C_eff * B * w;
804
805 auto const uT_coeff =
807 ? (crv.J_uT_fr +
808 crv.C * crv.solid_linear_thermal_expansion_coefficient)
809 .eval()
811 .eval();
812
814 {
816 .noalias() -= B.transpose() * crv.r_u_fr * w;
817 }
818
822 .noalias() -= B.transpose() * uT_coeff * N * w;
823
825 .noalias() -= (B.transpose() * ip_data.sigma_eff -
826 N_u_op(N_u).transpose() * crv.rho * b) *
827 w;
828
829 //
830 // displacement equation, pressure part (K_up)
831 //
832 double const fluid_density = _ip_data_output[ip].fluid_density;
833 double const up_coeff =
835 ? crv.alpha_biot * ip_data.phi_fr / ip_data.porosity *
836 (_ip_data_output[ip].rho_fr / fluid_density - 1) +
837 crv.alpha_biot
838 : crv.alpha_biot;
839 Kup.noalias() +=
840 B.transpose() * Invariants::identity2 * N * (up_coeff * w);
841
842 //
843 // pressure equation, pressure part (K_pp and M_pp).
844 //
845 double const scaling_factor =
846 _process_data.is_volume_balance_equation_type ? 1.0 : fluid_density;
847
848 laplace_p.noalias() += dNdx.transpose() * crv.K_over_mu * dNdx *
849 (crv.k_rel * scaling_factor * w);
853 .noalias() += dNdx.transpose() * crv.K_over_mu * (dNdx * p) * N *
854 (crv.dk_rel_dT * scaling_factor * w);
855
856 double const storage_p_coeff_no_fr =
857 ip_data.porosity * crv.fluid_compressibility +
858 (crv.alpha_biot - ip_data.porosity) * crv.beta_SR;
859 double const storage_p_coeff =
862
863 storage_p.noalias() +=
864 N.transpose() * N * (storage_p_coeff * scaling_factor * w);
865
867 {
871 .noalias() +=
872 N.transpose() * crv.J_pT_fr * N * scaling_factor * w;
873 }
874
875 laplace_T.noalias() += dNdx.transpose() * crv.K_pT_thermal_osmosis *
877 //
878 // RHS, pressure part
879 //
880 local_rhs.template segment<pressure_size>(pressure_index).noalias() -=
881 N * (up_coeff * crv.eps_v_dot * scaling_factor * w);
882
883 local_rhs.template segment<pressure_size>(pressure_index).noalias() +=
884 dNdx.transpose() * crv.K_over_mu * b *
885 (fluid_density * crv.k_rel * scaling_factor * w);
889 .noalias() -= dNdx.transpose() * crv.K_over_mu * b * N *
890 (fluid_density * crv.dk_rel_dT * scaling_factor * w);
891
892 //
893 // pressure equation, temperature part (M_pT)
894 //
895
896 double const storage_T_coeff =
897 has_frozen_liquid_phase ? crv.storage_T_fr + crv.beta : crv.beta;
898
899 storage_T.noalias() +=
900 N.transpose() * storage_T_coeff * N * scaling_factor * w;
901
902 //
903 // pressure equation, displacement part.
904 //
905 // reusing Kup.transpose() if the equation balance type is not volume.
906
907 if (!_process_data.is_volume_balance_equation_type)
908 {
909 Kpu.noalias() += N.transpose() * Invariants::identity2.transpose() *
910 B * (up_coeff * scaling_factor * w);
911
912 //
913 // The contribution to Jacobian from d()/ drho
914 // drho/dp, d()/ drho drho/dT:
915 //
916 double const storage_p_solid_coeff =
917 (crv.alpha_biot - ip_data.porosity) * crv.beta_SR;
918
919 double const p_dot = N.dot(p - p_prev) / dt;
920 double const T_dot = N.dot(T - T_prev) / dt;
921 double const drho_dp_coeff = storage_p_solid_coeff * p_dot +
923 up_coeff * crv.eps_v_dot;
924
928 .noalias() +=
929 // TODO (WW) : Add ip_data.porosity * d2rho_LR_dp2 * w.
930 N.transpose() * N * (drho_dp_coeff * crv.drho_LR_dp * w);
934 .noalias() +=
935 // TODO (WW) : Add ip_data.porosity * d2rho_LR_dpdT * w.
936 N.transpose() * N * (drho_dp_coeff * crv.drho_LR_dT * w);
937
938 // The term from d (rho_L K(grad p - rho_L b)/dp:
939 // derivative of rhp_L * K_over_mu * k_rel (grad p + rho_l g) with
940 // respect to pressure and temperature.
941 auto const dlaplace_temporal_factor =
942 (-velocity - (fluid_density * crv.k_rel) * crv.K_over_mu * b);
946 .noalias() += dNdx.transpose() * dlaplace_temporal_factor * N *
947 (crv.drho_LR_dp * w);
951 .noalias() += dNdx.transpose() * dlaplace_temporal_factor * N *
952 (crv.drho_LR_dT * w);
953 }
954
955 //
956 // temperature equation, temperature part.
957 //
958 KTT.noalias() +=
959 dNdx.transpose() * crv.effective_thermal_conductivity * dNdx * w;
960 dKTT_dT_T.noalias() +=
961 dNdx.transpose() * crv.dlambda_eff_dT * dNdx * T * N * w;
962
963 ip_flux_vector.emplace_back(velocity * fluid_density * crv.c_f);
964 // Without any flux correction the flux derivative is as follows. The
965 // contribution to KTT is different if any stabilization scheme is used,
966 // but this is ignored for the moment.
968 crv.dvelocity_dT * fluid_density * crv.c_f +
969 velocity * crv.drho_LR_dT * crv.c_f;
970 dKTT_dT_T.noalias() +=
971 N.transpose() * dip_flux_vector_dT.transpose() * dNdx * T * N * w;
973
974 MTT.noalias() +=
975 N.transpose() * crv.effective_volumetric_heat_capacity * N * w;
979 .noalias() += N.transpose() * crv.J_TT * N * w;
980
981 //
982 // temperature equation, pressure part
983 //
984 KTp.noalias() +=
985 dNdx.transpose() * crv.K_pT_thermal_osmosis * dNdx * (T_int_pt * w);
986
987 // linearized darcy
988 dKTT_dp_T.noalias() -= N.transpose() * (dNdx * T).transpose() *
989 crv.K_over_mu * dNdx *
990 (fluid_density * crv.c_f * crv.k_rel * w);
991
992 /* TODO (Joerg) Temperature changes due to thermal dilatation of the
993 * fluid, which are usually discarded as being very small.
994 * Zhou et al. (10.1016/S0020-7683(98)00089-4) states that:
995 * "Biot (1956) neglected this term and it is included here for
996 * completeness"
997 * Keeping the code here in the case these are needed for the named
998 * effects in the future.
999 if (fluid_compressibility != 0)
1000 {
1001 auto const C_el = ip_data.computeElasticTangentStiffness(
1002 t, x_position, dt, static_cast<double>(T_int_pt));
1003 auto const solid_skeleton_compressibility =
1004 1 / solid_material.getBulkModulus(t, x_position, &C_el);
1005 double const fluid_volumetric_thermal_expansion_coefficient =
1006 MaterialPropertyLib::getLiquidThermalExpansivity(
1007 liquid_phase, vars, fluid_density, x_position, t, dt);
1008
1009 KTT.noalias() +=
1010 dNdx.transpose() *
1011 (-T_int_pt * fluid_volumetric_thermal_expansion_coefficient *
1012 K_pT_thermal_osmosis / fluid_compressibility) *
1013 dNdx * w;
1014
1015 local_rhs.template segment<temperature_size>(temperature_index)
1016 .noalias() +=
1017 dNdx.transpose() *
1018 (-T_int_pt * fluid_volumetric_thermal_expansion_coefficient /
1019 fluid_compressibility) *
1020 fluid_density * crv.k_rel * K_over_mu * b * w;
1021 MTu part for rhs and Jacobian:
1022 (-T_int_pt *
1023 Invariants::trace(solid_linear_thermal_expansion_coefficient) /
1024 solid_skeleton_compressibility) *
1025 N.transpose() * identity2.transpose() * B * w;
1026 KTp part for rhs and Jacobian:
1027 dNdx.transpose() *
1028 (T_int_pt * fluid_volumetric_thermal_expansion_coefficient *
1029 crv.k_rel * K_over_mu / fluid_compressibility) *
1030 dNdx * w;
1031 }
1032 */
1033 }
1034
1037 average_velocity_norm / static_cast<double>(n_integration_points), KTT);
1038
1039 // temperature equation, temperature part
1040 local_Jac
1043 .noalias() += KTT + dKTT_dT_T + MTT / dt;
1044
1045 // temperature equation, pressure part
1046 local_Jac
1049 .noalias() += KTp + dKTT_dp_T;
1050
1051 // displacement equation, pressure part
1052 local_Jac
1055 .noalias() -= Kup;
1056
1057 // pressure equation, temperature part.
1058 local_Jac
1061 .noalias() += -storage_T / dt + laplace_T;
1062
1063 // pressure equation, pressure part.
1064 local_Jac
1067 .noalias() += laplace_p + storage_p / dt;
1068
1069 // pressure equation, displacement part.
1070 if (_process_data.is_volume_balance_equation_type)
1071 {
1072 local_Jac
1075 .noalias() += Kup.transpose() / dt;
1076 }
1077 else
1078 {
1079 local_Jac
1082 .noalias() += Kpu / dt;
1083 }
1084
1085 // pressure equation (f_p)
1086 local_rhs.template segment<pressure_size>(pressure_index).noalias() -=
1087 laplace_p * p + laplace_T * T + storage_p * (p - p_prev) / dt -
1088 storage_T * (T - T_prev) / dt;
1089
1090 // displacement equation (f_u)
1092 .noalias() += Kup * p;
1093
1094 // temperature equation (f_T)
1096 KTT * T + MTT * (T - T_prev) / dt;
1097
1099 KTp * p;
1100}
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
ConstitutiveRelationsValues< DisplacementDim > updateConstitutiveRelations(Eigen::Ref< Eigen::VectorXd const > const local_x, Eigen::Ref< Eigen::VectorXd const > const local_x_prev, ParameterLib::SpatialPosition const &x_position, double const t, double const dt, IpData &ip_data, IntegrationPointDataForOutput< DisplacementDim > &ip_data_output) const
typename ShapeMatricesTypePressure::GlobalDimVectorType GlobalDimVectorType
void assembleAdvectionMatrix(IPData const &ip_data_vector, NumLib::ShapeMatrixCache const &shape_matrix_cache, std::vector< FluxVectorType > const &ip_flux_vector, Eigen::MatrixBase< Derived > &laplacian_matrix)
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
static Eigen::Matrix< double, KelvinVectorSize, 1 > const identity2
Kelvin mapping of 2nd order identity tensor.

References _element, _integration_method, _ip_data, _ip_data_output, _is_axially_symmetric, _process_data, NumLib::detail::assembleAdvectionMatrix(), assembleWithJacobian(), ProcessLib::LinearBMatrix::computeBMatrix(), MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), displacement_index, displacement_size, MaterialPropertyLib::FrozenLiquid, ParameterLib::SpatialPosition::getCoordinates(), MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2, NumLib::interpolateCoordinates(), localDOF(), N_u_op, pressure_index, pressure_size, temperature_index, temperature_size, and updateConstitutiveRelations().

Referenced by assembleWithJacobian().

◆ computeSecondaryVariableConcrete()

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

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1161 of file ThermoHydroMechanicsFEM-impl.h.

1165{
1166 auto const p = local_x.template segment<pressure_size>(pressure_index);
1167 auto const T =
1169
1170 unsigned const n_integration_points =
1171 _integration_method.getNumberOfPoints();
1172
1173 double phi_fr_avg = 0;
1174 double fluid_density_avg = 0;
1175 double viscosity_avg = 0;
1176
1178 KV sigma_avg = KV::Zero();
1180
1181 for (unsigned ip = 0; ip < n_integration_points; ip++)
1182 {
1183 auto& ip_data = _ip_data[ip];
1184
1185 phi_fr_avg += ip_data.phi_fr;
1186 fluid_density_avg += _ip_data_output[ip].fluid_density;
1187 viscosity_avg += _ip_data_output[ip].viscosity;
1188 sigma_avg += ip_data.sigma_eff;
1189 sigma_ice_avg += ip_data.sigma_eff_ice;
1190 }
1191
1197
1198 (*_process_data.element_phi_fr)[_element.getID()] = phi_fr_avg;
1199 (*_process_data.element_fluid_density)[_element.getID()] =
1201 (*_process_data.element_viscosity)[_element.getID()] = viscosity_avg;
1202
1203 Eigen::Map<KV>(&(*_process_data.element_stresses)[_element.getID() *
1206
1211
1215 *_process_data.pressure_interpolated);
1216
1220 *_process_data.temperature_interpolated);
1221}
Eigen::Matrix< double, 4, 1 > kelvinVectorToSymmetricTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)

References _element, _integration_method, _ip_data, _ip_data_output, _is_axially_symmetric, _process_data, NumLib::interpolateToHigherOrderNodes(), MathLib::KelvinVector::kelvinVectorToSymmetricTensor(), pressure_index, and temperature_index.

◆ getEpsilon()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getEpsilon ( ) const
inlineoverrideprivatevirtual

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

Definition at line 353 of file ThermoHydroMechanicsFEM.h.

354 {
355 constexpr int kelvin_vector_size =
357
360 { return getIntPtEpsilon(0, {}, {}, values); });
361 }
virtual std::vector< double > const & getIntPtEpsilon(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
std::vector< double > transposeInPlace(StoreValuesFunction const &store_values_function)

References getIntPtEpsilon(), MathLib::KelvinVector::kelvin_vector_dimensions(), and ProcessLib::transposeInPlace().

◆ getEpsilon0()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getEpsilon0 ( ) const
inlineoverrideprivatevirtual

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

Definition at line 314 of file ThermoHydroMechanicsFEM.h.

315 {
316 constexpr int kelvin_vector_size =
318
321 { return getIntPtEpsilon0(0, {}, {}, values); });
322 }
virtual std::vector< double > const & getIntPtEpsilon0(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override

References getIntPtEpsilon0(), MathLib::KelvinVector::kelvin_vector_dimensions(), and ProcessLib::transposeInPlace().

◆ getEpsilonM()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getEpsilonM ( ) const
inlineoverrideprivatevirtual

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

Definition at line 333 of file ThermoHydroMechanicsFEM.h.

334 {
335 constexpr int kelvin_vector_size =
337
340 { return getIntPtEpsilonM(0, {}, {}, values); });
341 }
virtual std::vector< double > const & getIntPtEpsilonM(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override

References getIntPtEpsilonM(), MathLib::KelvinVector::kelvin_vector_dimensions(), and ProcessLib::transposeInPlace().

◆ getIceVolumeFraction()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIceVolumeFraction ( ) const
inlineoverridevirtual

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

Definition at line 248 of file ThermoHydroMechanicsFEM.h.

249 {
251 getIntPtIceVolume(0, {}, {}, result);
252 return result;
253 }
std::vector< double > const & getIntPtIceVolume(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override

References getIntPtIceVolume().

◆ getIntPtDarcyVelocity()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIntPtDarcyVelocity ( const double t,
std::vector< GlobalVector * > const & x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_table,
std::vector< double > & cache ) const
overridevirtual

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

Definition at line 1105 of file ThermoHydroMechanicsFEM-impl.h.

1111{
1112 unsigned const n_integration_points =
1113 _integration_method.getNumberOfPoints();
1114
1115 cache.clear();
1119
1120 for (unsigned ip = 0; ip < n_integration_points; ip++)
1121 {
1122 cache_matrix.col(ip).noalias() = _ip_data_output[ip].velocity;
1123 }
1124
1125 return cache;
1126}

References _integration_method, _ip_data_output, and MathLib::createZeroedMatrix().

◆ getIntPtEpsilon()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
virtual std::vector< double > const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIntPtEpsilon ( const double ,
std::vector< GlobalVector * > const & ,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & ,
std::vector< double > & cache ) const
inlineoverrideprivatevirtual

◆ getIntPtEpsilon0()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
virtual std::vector< double > const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIntPtEpsilon0 ( const double ,
std::vector< GlobalVector * > const & ,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & ,
std::vector< double > & cache ) const
inlineoverrideprivatevirtual

◆ getIntPtEpsilonM()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
virtual std::vector< double > const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIntPtEpsilonM ( const double ,
std::vector< GlobalVector * > const & ,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & ,
std::vector< double > & cache ) const
inlineoverrideprivatevirtual

◆ getIntPtFluidDensity()

template<typename ShapeFunctionDisplacement, typename ShapeFunction, int DisplacementDim>
std::vector< double > const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, DisplacementDim >::getIntPtFluidDensity ( const double t,
std::vector< GlobalVector * > const & x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_table,
std::vector< double > & cache ) const
overridevirtual

◆ getIntPtIceVolume()

◆ getIntPtSigma()

◆ getIntPtSigmaIce()

◆ getIntPtViscosity()

template<typename ShapeFunctionDisplacement, typename ShapeFunction, int DisplacementDim>
std::vector< double > const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, DisplacementDim >::getIntPtViscosity ( const double t,
std::vector< GlobalVector * > const & x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_table,
std::vector< double > & cache ) const
overridevirtual

◆ getMaterialID()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
int ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getMaterialID ( ) const
inlineoverrideprivatevirtual

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

Definition at line 388 of file ThermoHydroMechanicsFEM.h.

389 {
390 return _process_data.material_ids == nullptr
391 ? 0
392 : (*_process_data.material_ids)[_element.getID()];
393 }

References _element, and _process_data.

◆ getMaterialStateVariableInternalState()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getMaterialStateVariableInternalState ( std::function< std::span< double >(typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables &)> const & get_values_span,
int const & n_components ) const
inlineoverrideprivatevirtual

◆ getMaterialStateVariablesAt()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getMaterialStateVariablesAt ( unsigned integration_point) const
inlineoverrideprivatevirtual

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

Definition at line 408 of file ThermoHydroMechanicsFEM.h.

409 {
410 return *_ip_data[integration_point].material_state_variables;
411 }

References _ip_data.

◆ getNumberOfIntegrationPoints()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
unsigned ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getNumberOfIntegrationPoints ( ) const
inlineoverrideprivatevirtual

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

Definition at line 383 of file ThermoHydroMechanicsFEM.h.

384 {
385 return _integration_method.getNumberOfPoints();
386 }

References _integration_method.

◆ getNumberOfVectorElementsForDeformation()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
int ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getNumberOfVectorElementsForDeformation ( ) const
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 267 of file ThermoHydroMechanicsFEM.h.

268 {
269 return displacement_size;
270 }

References displacement_size.

◆ getShapeMatrix()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
Eigen::Map< const Eigen::RowVectorXd > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getShapeMatrix ( const unsigned integration_point) const
inlineoverridevirtual

Provides the shape matrix at the given integration point.

Implements NumLib::ExtrapolatableElement.

Definition at line 210 of file ThermoHydroMechanicsFEM.h.

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

References _secondary_data.

◆ getSigma()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getSigma ( ) const
inlineoverridevirtual

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

Definition at line 228 of file ThermoHydroMechanicsFEM.h.

229 {
230 constexpr int kelvin_vector_size =
232
235 { return getIntPtSigma(0, {}, {}, values); });
236 }
std::vector< double > const & getIntPtSigma(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override

References getIntPtSigma(), MathLib::KelvinVector::kelvin_vector_dimensions(), and ProcessLib::transposeInPlace().

◆ getSigmaIce()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector< double > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getSigmaIce ( ) const
inlineoverridevirtual

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

Definition at line 238 of file ThermoHydroMechanicsFEM.h.

239 {
240 constexpr int kelvin_vector_size =
242
245 { return getIntPtSigmaIce(0, {}, {}, values); });
246 }
std::vector< double > const & getIntPtSigmaIce(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override

References getIntPtSigmaIce(), MathLib::KelvinVector::kelvin_vector_dimensions(), and ProcessLib::transposeInPlace().

◆ initializeConcrete()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::initializeConcrete ( )
inlineoverridevirtual

Set initial stress from parameter.

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 108 of file ThermoHydroMechanicsFEM.h.

109 {
110 unsigned const n_integration_points =
111 _integration_method.getNumberOfPoints();
112
113 for (unsigned ip = 0; ip < n_integration_points; ip++)
114 {
115 auto& ip_data = _ip_data[ip];
116
118 std::nullopt, _element.getID(),
123
125 if (_process_data.initial_stress.value)
126 {
127 ip_data.sigma_eff =
129 DisplacementDim>((*_process_data.initial_stress.value)(
131 independent
132 */
133 ,
134 x_position));
135 }
136
137 double const t = 0; // TODO (naumov) pass t from top
138 ip_data.solid_material.initializeInternalStateVariables(
139 t, x_position, *ip_data.material_state_variables);
140
141 ip_data.pushBackState();
142 }
143 }

References _element, _integration_method, _ip_data, _process_data, NumLib::interpolateCoordinates(), and MathLib::KelvinVector::symmetricTensorToKelvinVector().

◆ localDOF()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
template<typename SolutionVector>
constexpr auto ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::localDOF ( SolutionVector const & x)
inlinestaticconstexprprivate

◆ postTimestepConcrete()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::postTimestepConcrete ( Eigen::VectorXd const & local_x,
Eigen::VectorXd const & local_x_prev,
double const t,
double const dt,
int const  )
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 162 of file ThermoHydroMechanicsFEM.h.

166 {
167 unsigned const n_integration_points =
168 _integration_method.getNumberOfPoints();
169
170 auto const [T_prev, p_prev, u_prev] = localDOF(local_x_prev);
171
172 for (unsigned ip = 0; ip < n_integration_points; ip++)
173 {
174 auto& ip_data = _ip_data[ip];
175 auto const& N_u = ip_data.N_u;
176 auto const& dNdx_u = ip_data.dNdx_u;
177
179 std::nullopt, _element.getID(),
184
187
188 auto const x_coord =
189 x_position.getCoordinates().value()[0]; // r for axisymmetry
190 auto const B = LinearBMatrix::computeBMatrix<
194
196 eps_prev = B * u_prev;
197
198 _ip_data[ip].eps0 =
199 _ip_data[ip].eps0_prev +
200 (1 - _ip_data[ip].phi_fr_prev / _ip_data[ip].porosity) *
202 _ip_data[ip].pushBackState();
203 }
204 }

References _element, _integration_method, _ip_data, _ip_data_output, _is_axially_symmetric, ProcessLib::LinearBMatrix::computeBMatrix(), ParameterLib::SpatialPosition::getCoordinates(), NumLib::interpolateCoordinates(), localDOF(), and updateConstitutiveRelations().

◆ preTimestepConcrete()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::preTimestepConcrete ( std::vector< double > const & ,
double const ,
double const  )
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 149 of file ThermoHydroMechanicsFEM.h.

151 {
152 unsigned const n_integration_points =
153 _integration_method.getNumberOfPoints();
154
155 for (unsigned ip = 0; ip < n_integration_points; ip++)
156 {
157 _ip_data_output[ip].velocity.setConstant(
159 }
160 }

References _integration_method, and _ip_data_output.

◆ setInitialConditionsConcrete()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
void ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setInitialConditionsConcrete ( Eigen::VectorXd const local_x,
double const t,
int const process_id )
overridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 175 of file ThermoHydroMechanicsFEM-impl.h.

179{
180 // TODO: For staggered scheme, overload
181 // LocalAssemblerInterface::setInitialConditions to enable local_x contains
182 // the primary variables from all coupled processes.
183 auto const [T, p, u] = localDOF(local_x);
184
185 double const dt = 0.0;
186
188 auto const& medium = _process_data.media_map.getMedium(_element.getID());
189 auto* const frozen_liquid_phase =
192 : nullptr;
193
194 int const n_integration_points = _integration_method.getNumberOfPoints();
195 for (int ip = 0; ip < n_integration_points; ip++)
196 {
197 auto& ip_data = _ip_data[ip];
198 auto const& N = ip_data.N;
199 auto const& N_u = ip_data.N_u;
201 std::nullopt, _element.getID(),
205 _element, N_u))};
206
207 auto& sigma_eff = ip_data.sigma_eff;
208 if (_process_data.initial_stress.isTotalStress())
209 {
210 auto const alpha_b =
212 .template value<double>(vars, x_position, t, dt);
213
214 sigma_eff.noalias() += alpha_b * N.dot(p) * Invariants::identity2;
215 }
216 ip_data.sigma_eff_prev.noalias() = sigma_eff;
217
218 vars.temperature = N.dot(T);
220 {
221 ip_data.phi_fr =
223 .template value<double>(vars, x_position, t, dt);
224 }
225 }
226}

References _element, _integration_method, _ip_data, _process_data, MaterialPropertyLib::biot_coefficient, MaterialPropertyLib::FrozenLiquid, MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2, NumLib::interpolateCoordinates(), localDOF(), setInitialConditionsConcrete(), MaterialPropertyLib::VariableArray::temperature, and MaterialPropertyLib::volume_fraction.

Referenced by setInitialConditionsConcrete().

◆ setIPDataInitialConditions()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::size_t ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setIPDataInitialConditions ( std::string_view const name,
double const * values,
int const integration_order )
overridevirtual

Returns number of read integration points.

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

Definition at line 105 of file ThermoHydroMechanicsFEM-impl.h.

108{
109 if (integration_order !=
110 static_cast<int>(_integration_method.getIntegrationOrder()))
111 {
112 OGS_FATAL(
113 "Setting integration point initial conditions; The integration "
114 "order of the local assembler for element {:d} is different from "
115 "the integration order in the initial condition.",
116 _element.getID());
117 }
118
119 if (name == "sigma")
120 {
121 if (_process_data.initial_stress.value)
122 {
123 OGS_FATAL(
124 "Setting initial conditions for stress from integration "
125 "point data and from a parameter '{:s}' is not possible "
126 "simultaneously.",
127 _process_data.initial_stress.value->name);
128 }
129
132 }
133 if (name == "epsilon_m")
134 {
137 }
138 if (name == "epsilon")
139 {
142 }
143 if (name.starts_with("material_state_variable_"))
144 {
145 name.remove_prefix(24);
146
147 // Using first ip data for solid material. TODO (naumov) move solid
148 // material into element, store only material state in IPs.
149 auto const& internal_variables =
150 _ip_data[0].solid_material.getInternalVariables();
151 if (auto const iv = std::find_if(
153 [&name](auto const& iv) { return iv.name == name; });
155 {
156 DBUG("Setting material state variable '{:s}'", name);
159 iv->reference);
160 }
161
162 int const element_id = _element.getID();
163 DBUG(
164 "The solid material of element {:d} (material ID {:d}) does not "
165 "have an internal state variable called {:s}.",
166 element_id, (*_process_data.material_ids)[element_id], name);
167 }
168
169 return 0;
170}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
std::size_t setIntegrationPointDataMaterialStateVariables(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType member, std::function< std::span< double >(MaterialStateVariables &)> get_values_span)
std::size_t setIntegrationPointKelvinVectorData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)

References _element, _integration_method, _ip_data, _process_data, DBUG(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatricesTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, ShapeFunctionDisplacement::NPOINTS >::eps, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatricesTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, ShapeFunctionDisplacement::NPOINTS >::eps_m, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatricesTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, ShapeFunctionDisplacement::NPOINTS >::material_state_variables, OGS_FATAL, ProcessLib::setIntegrationPointDataMaterialStateVariables(), ProcessLib::setIntegrationPointKelvinVectorData(), and ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatricesTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, ShapeFunctionDisplacement::NPOINTS >::sigma_eff.

◆ setSigma()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::size_t ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::setSigma ( double const * values)
inlineprivate

◆ updateConstitutiveRelations()

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
ConstitutiveRelationsValues< DisplacementDim > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveRelations ( Eigen::Ref< Eigen::VectorXd const > const local_x,
Eigen::Ref< Eigen::VectorXd const > const local_x_prev,
ParameterLib::SpatialPosition const & x_position,
double const t,
double const dt,
IpData & ip_data,
IntegrationPointDataForOutput< DisplacementDim > & ip_data_output ) const
private

Definition at line 231 of file ThermoHydroMechanicsFEM-impl.h.

238{
239 assert(local_x.size() ==
241
242 auto const [T, p, u] = localDOF(local_x);
243 auto const [T_prev, p_prev, u_prev] = localDOF(local_x_prev);
244
245 auto const& solid_material =
247 _process_data.solid_materials, _process_data.material_ids,
248 _element.getID());
249
250 auto const& medium = _process_data.media_map.getMedium(_element.getID());
251 auto const& liquid_phase =
253 auto const& solid_phase =
255 auto* const frozen_liquid_phase =
258 : nullptr;
260
261 auto const& N_u = ip_data.N_u;
262 auto const& dNdx_u = ip_data.dNdx_u;
263
264 auto const& N = ip_data.N;
265 auto const& dNdx = ip_data.dNdx;
266
267 auto const T_int_pt = N.dot(T);
268 auto const T_prev_int_pt = N.dot(T_prev);
269 double const dT_int_pt = T_int_pt - T_prev_int_pt;
270
271 auto const x_coord =
272 x_position.getCoordinates().value()[0]; // r for axisymmetry
273 auto const B =
278
280
281 auto& eps = ip_data.eps;
282 eps.noalias() = B * u;
284 B * u_prev;
285
286 vars.temperature = T_int_pt;
287 double const p_int_pt = N.dot(p);
288 vars.liquid_phase_pressure = p_int_pt;
289 double const p_prev_int_pt = N.dot(p_prev);
290 double const dp_int_pt = p_int_pt - p_prev_int_pt;
291 vars.liquid_saturation = 1.0;
292
293 auto const solid_density =
295 .template value<double>(vars, x_position, t, dt);
296
297 auto const drho_SR_dT =
299 .template dValue<double>(vars,
301 x_position, t, dt);
302
303 auto const porosity =
305 .template value<double>(vars, x_position, t, dt);
306 vars.porosity = porosity;
307 ip_data.porosity = porosity;
308
309 crv.alpha_biot =
311 .template value<double>(vars, x_position, t, dt);
312 auto const& alpha = crv.alpha_biot;
313
314 auto const C_el = ip_data.computeElasticTangentStiffness(
315 t, x_position, dt, static_cast<double>(T_int_pt));
317 1 / solid_material.getBulkModulus(t, x_position, &C_el);
318
319 crv.beta_SR = (1 - alpha) * solid_skeleton_compressibility;
320
321 // Set mechanical variables for the intrinsic permeability model
322 // For stress dependent permeability.
323 {
324 auto const& identity2 = Invariants::identity2;
325 auto const sigma_total =
326 (ip_data.sigma_eff - alpha * p_int_pt * identity2).eval();
327 vars.total_stress.emplace<SymmetricTensor>(
329 }
330 // For strain dependent permeability
331 vars.volumetric_strain = Invariants::trace(ip_data.eps);
332 vars.equivalent_plastic_strain =
333 ip_data.material_state_variables->getEquivalentPlasticStrain();
334
335 auto const intrinsic_permeability =
338 .value(vars, x_position, t, dt));
339
340 auto const fluid_density =
342 .template value<double>(vars, x_position, t, dt);
343 ip_data_output.fluid_density = fluid_density;
344 vars.density = fluid_density;
345
346 auto const drho_dp =
348 .template dValue<double>(
350 x_position, t, dt);
351 crv.drho_LR_dp = drho_dp;
352
353 crv.fluid_compressibility = 1 / fluid_density * drho_dp;
354
355 crv.drho_LR_dT =
357 .template dValue<double>(vars,
359 x_position, t, dt);
360
364
365 // Use the viscosity model to compute the viscosity
366 ip_data_output.viscosity =
368 .template value<double>(vars, x_position, t, dt);
369 crv.K_over_mu = intrinsic_permeability / ip_data_output.viscosity;
370
371 crv.k_rel = 1.;
372 crv.dk_rel_dT = 0;
374 {
375 ip_data.phi_fr =
377 .template value<double>(vars, x_position, t, dt);
378
379 double const dphi_fr_dT =
381 .template dValue<double>(
383 x_position, t, dt);
384
385 // Set ice_volume_fraction variable for relative permeability
386 // calculation ice_volume_fraction = fraction of pore space occupied by
387 // ice
388 vars.ice_volume_fraction = ip_data.phi_fr / porosity;
389
390 crv.k_rel =
392 .property(
394 .template value<double>(vars, x_position, t, dt);
395
396 // dk_rel/dT = (dk_rel/dphi_ice) * (dphi_ice/dT)
397 // where dphi_ice/dT = dphi_fr_dT / porosity
398 auto const dk_rel_dphi_ice =
400 .property(
402 .template dValue<double>(
404 x_position, t, dt);
405 crv.dk_rel_dT = dk_rel_dphi_ice * dphi_fr_dT / porosity;
406 }
407
408 auto const& b = _process_data.specific_body_force;
409
410 // Consider also anisotropic thermal expansion.
411 crv.solid_linear_thermal_expansion_coefficient =
414 .property(
416 .value(vars, x_position, t, dt));
417
420 crv.solid_linear_thermal_expansion_coefficient * dT_int_pt;
421
422 crv.K_pT_thermal_osmosis =
423 (solid_phase.hasProperty(
429 .value(vars, x_position, t, dt))
431
433 -crv.k_rel * crv.K_over_mu * dNdx * p -
434 crv.K_pT_thermal_osmosis * dNdx * T +
435 (fluid_density * crv.k_rel) * crv.K_over_mu * b;
436 ip_data_output.velocity = velocity;
437 crv.dvelocity_dT =
438 -crv.dk_rel_dT * crv.K_over_mu * dNdx * p +
439 // TODO(naumov): - crv.K_pT_thermal_osmosis * dNdx * dT_dT +
440 (crv.dk_rel_dT * fluid_density + crv.k_rel * crv.drho_LR_dT) *
441 crv.K_over_mu * b;
442
443 //
444 // displacement equation, displacement part
445 //
446 auto& eps_m = ip_data.eps_m;
447 auto& eps_m_prev = ip_data.eps_m_prev;
448 eps_m.noalias() = eps_m_prev + eps - eps_prev - dthermal_strain;
449
450 crv.eps_v_dot = (vars.volumetric_strain - Invariants::trace(eps_prev)) / dt;
451
452 vars.mechanical_strain
454 eps_m);
455
456 crv.C = ip_data.updateConstitutiveRelation(vars, t, x_position, dt,
458
460
461 crv.beta =
463 (alpha - porosity) *
464 Invariants::trace(crv.solid_linear_thermal_expansion_coefficient);
465
466 //
467 // pressure equation, displacement part.
468 //
469 // Reusing Kup.transpose().
470
471 //
472 // temperature equation, temperature part.
473 //
474 crv.c_f =
477 .template value<double>(vars, x_position, t, dt);
478 crv.effective_thermal_conductivity =
480 medium
481 ->property(
483 .value(vars, x_position, t, dt));
484
486 medium
489 x_position, t, dt));
490
491 // Thermal conductivity is moved outside and zero matrix is passed instead
492 // due to multiplication with fluid's density times specific heat capacity.
493 crv.effective_thermal_conductivity.noalias() +=
494 fluid_density * crv.c_f *
496 _process_data.stabilizer, _element.getID(),
498 velocity, 0. /* phi */, 0. /* dispersivity_transversal */,
499 0. /*dispersivity_longitudinal*/);
500
501 double const c_s =
504 .template value<double>(vars, x_position, t, dt);
505
506 // Also modified by freezing terms.
507 crv.effective_volumetric_heat_capacity =
508 porosity * fluid_density * crv.c_f +
509 (1.0 - porosity) * solid_density * c_s;
510 double dC_eff_dT = porosity * crv.drho_LR_dT * crv.c_f +
511 (1.0 - porosity) * drho_SR_dT * c_s;
512
514 {
516 double const phi_fr = ip_data.phi_fr;
517
518 auto const frozen_liquid_value =
520 {
521 return (*frozen_liquid_phase)[p].template value<double>(
522 vars, x_position, t, dt);
523 };
524
525 double const c_fr = frozen_liquid_value(
527
528 double const l_fr = frozen_liquid_value(
530
531 double const dphi_fr_dT =
533 .template dValue<double>(
535 x_position, t, dt);
536
537 double const d2phi_fr_dT2 =
539 .template d2Value<double>(
542 dt);
543
544 double const phi_fr_prev = [&]()
545 {
547 vars_prev.temperature = T_prev_int_pt;
549 .template value<double>(vars_prev, x_position, t, dt);
550 }();
551 ip_data.phi_fr_prev = phi_fr_prev;
552
553 double const rho_fr =
555 ip_data_output.rho_fr = rho_fr;
556
557 crv.rho += ip_data.phi_fr * rho_fr - ip_data.phi_fr * fluid_density;
558 crv.mass_exchange =
560 double const dmass_exchange_dT =
562 dphi_fr_dT * porosity * rho_fr * crv.drho_LR_dT /
564
565 // alpha_T^I
570 ->property(
572 .value(vars, x_position, t, dt));
573
577
578 crv.beta_T_SI =
579 porosity *
581 (alpha - porosity) *
583 crv.solid_linear_thermal_expansion_coefficient);
584
585 // alpha_{phi_I} -- linear expansion coeff. due to water-to-ice
586 // transition (phase change), and related phase_change_strain term
593 .value(vars, x_position, t, dt));
594
598
599 // eps0 ia a 'history variable' -- a solid matrix strain accrued
600 // prior to the onset of ice forming
601 auto& eps0 = ip_data.eps0;
602 auto const& eps0_prev = ip_data.eps0_prev;
603
604 // definition of eps_m_ice
605 auto& eps_m_ice = ip_data.eps_m_ice;
606 auto const& eps_m_ice_prev = ip_data.eps_m_ice_prev;
607
608 eps_m_ice.noalias() = eps_m_ice_prev + eps - eps_prev -
611
612 vars_ice.mechanical_strain
614 eps_m_ice);
615 auto const C_IR = ip_data.updateConstitutiveRelationIce(
616 *_process_data.ice_constitutive_relation, vars_ice, t, x_position,
618
619 auto const C_el_ice = ip_data.computeElasticTangentStiffnessIce(
620 *_process_data.ice_constitutive_relation, t, x_position, dt,
621 static_cast<double>(T_int_pt));
622 crv.beta_IR =
623 1. / _process_data.ice_constitutive_relation->getBulkModulus(
625
626 crv.effective_volumetric_heat_capacity +=
627 -phi_fr * fluid_density * crv.c_f + phi_fr * rho_fr * c_fr -
629
630 crv.J_uu_fr = phi_fr * C_IR;
631
632 auto const& sigma_eff_ice = ip_data.sigma_eff_ice;
633 crv.r_u_fr = phi_fr * sigma_eff_ice;
634
636
637 // part of dMTT_dT derivative for freezing
639 phi_fr * crv.drho_LR_dT * crv.c_f +
641 double const storage_p_fr_coeff =
642 (porosity * crv.beta_IR + (alpha - porosity) * crv.beta_SR) *
644 (porosity * crv.fluid_compressibility +
645 (alpha - porosity) * crv.beta_SR);
646 crv.storage_p_fr = phi_fr / porosity * storage_p_fr_coeff;
647
648 double const dstorage_p_fr_coeff_dT =
649 (porosity * crv.beta_IR + (alpha - porosity) * crv.beta_SR) *
650 crv.drho_LR_dT / (fluid_density * fluid_density);
651
652 crv.J_pT_fr = (dphi_fr_dT * storage_p_fr_coeff +
655
656 crv.storage_T_fr =
657 phi_fr / porosity *
658 (crv.beta_T_SI * rho_fr / fluid_density - crv.beta) -
659 crv.mass_exchange;
660 double const dstorage_T_fr_dT =
662 (crv.beta_T_SI * rho_fr / fluid_density - crv.beta) +
663 phi_fr / porosity * crv.beta_T_SI * rho_fr * crv.drho_LR_dT /
666 crv.J_pT_fr += dstorage_T_fr_dT * dT_int_pt / dt;
667 }
668 crv.J_TT = dC_eff_dT * dT_int_pt / dt;
669 return crv;
670}
constexpr Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
MathLib::KelvinVector::KelvinVectorType< GlobalDim > formKelvinVector(MaterialPropertyLib::PropertyDataType const &values)
A function to form a Kelvin vector from strain or stress alike property like thermal expansivity for ...
double getLiquidThermalExpansivity(Phase const &phase, VariableArray const &vars, const double density, ParameterLib::SpatialPosition const &pos, double const t, double const dt)
Eigen::MatrixXd computeHydrodynamicDispersion(NumericalStabilization const &stabilizer, std::size_t const element_id, Eigen::MatrixXd const &pore_diffusion_coefficient, Eigen::VectorXd const &velocity, double const porosity, double const solute_dispersivity_transverse, double const solute_dispersivity_longitudinal)
static double trace(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Trace of the corresponding tensor.

References _element, _is_axially_symmetric, _process_data, MaterialPropertyLib::AqueousLiquid, MaterialPropertyLib::biot_coefficient, ProcessLib::LinearBMatrix::computeBMatrix(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::computeElasticTangentStiffness(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::computeElasticTangentStiffnessIce(), NumLib::computeHydrodynamicDispersion(), MaterialPropertyLib::density, MaterialPropertyLib::VariableArray::density, displacement_size, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::dNdx, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::dNdx_u, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps0, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps0_prev, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps_m, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps_m_ice, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps_m_ice_prev, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::eps_m_prev, MaterialPropertyLib::VariableArray::equivalent_plastic_strain, ProcessLib::ThermoHydroMechanics::IntegrationPointDataForOutput< DisplacementDim >::fluid_density, MaterialPropertyLib::formEigenTensor(), MaterialPropertyLib::formKelvinVector(), MaterialPropertyLib::FrozenLiquid, ParameterLib::SpatialPosition::getCoordinates(), MaterialPropertyLib::getLiquidThermalExpansivity(), MaterialPropertyLib::ice_volume_fraction, MaterialPropertyLib::VariableArray::ice_volume_fraction, MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2, MathLib::KelvinVector::kelvinVectorToSymmetricTensor(), MaterialPropertyLib::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_saturation, localDOF(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::material_state_variables, MaterialPropertyLib::VariableArray::mechanical_strain, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::N, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::N_u, MaterialPropertyLib::permeability, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::phi_fr, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::phi_fr_prev, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::porosity, pressure_size, MaterialPropertyLib::relative_permeability, ProcessLib::ThermoHydroMechanics::IntegrationPointDataForOutput< DisplacementDim >::rho_fr, MaterialLib::Solids::selectSolidConstitutiveRelation(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::sigma_eff, ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::sigma_eff_ice, MaterialPropertyLib::Solid, MaterialPropertyLib::specific_heat_capacity, MaterialPropertyLib::specific_latent_heat, MaterialPropertyLib::temperature, MaterialPropertyLib::VariableArray::temperature, temperature_size, MaterialPropertyLib::thermal_conductivity, MaterialPropertyLib::thermal_expansivity, MaterialPropertyLib::thermal_osmosis_coefficient, MaterialPropertyLib::VariableArray::total_stress, MathLib::KelvinVector::Invariants< KelvinVectorSize >::trace(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::updateConstitutiveRelation(), ProcessLib::ThermoHydroMechanics::IntegrationPointData< BMatricesType, ShapeMatrixTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, NPoints >::updateConstitutiveRelationIce(), ProcessLib::ThermoHydroMechanics::IntegrationPointDataForOutput< DisplacementDim >::velocity, MaterialPropertyLib::viscosity, ProcessLib::ThermoHydroMechanics::IntegrationPointDataForOutput< DisplacementDim >::viscosity, MaterialPropertyLib::volume_fraction, and MaterialPropertyLib::VariableArray::volumetric_strain.

Referenced by assembleWithJacobian(), and postTimestepConcrete().

Member Data Documentation

◆ _element

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
MeshLib::Element const& ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_element
private

◆ _integration_method

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
NumLib::GenericIntegrationMethod const& ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_integration_method
private

◆ _ip_data

◆ _ip_data_output

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
std::vector<IntegrationPointDataForOutput<DisplacementDim>, Eigen::aligned_allocator< IntegrationPointDataForOutput<DisplacementDim> > > ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_ip_data_output
private

◆ _is_axially_symmetric

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
bool const ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_is_axially_symmetric
private

◆ _process_data

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
ThermoHydroMechanicsProcessData<DisplacementDim>& ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::_process_data
private

◆ _secondary_data

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

◆ displacement_index

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
const int ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::displacement_index = ShapeFunctionPressure::NPOINTS * 2
staticprivate

Definition at line 443 of file ThermoHydroMechanicsFEM.h.

Referenced by assembleWithJacobian().

◆ displacement_size

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

Definition at line 444 of file ThermoHydroMechanicsFEM.h.

Referenced by assembleWithJacobian(), getNumberOfVectorElementsForDeformation(), and updateConstitutiveRelations().

◆ KelvinVectorSize

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
int const ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::KelvinVectorSize
static
Initial value:

Definition at line 62 of file ThermoHydroMechanicsFEM.h.

◆ N_u_op

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
auto& ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< 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 68 of file ThermoHydroMechanicsFEM.h.

Referenced by assembleWithJacobian().

◆ pressure_index

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
const int ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::pressure_index = ShapeFunctionPressure::NPOINTS
staticprivate

◆ pressure_size

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
const int ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::pressure_size = ShapeFunctionPressure::NPOINTS
staticprivate

Definition at line 442 of file ThermoHydroMechanicsFEM.h.

Referenced by assembleWithJacobian(), and updateConstitutiveRelations().

◆ temperature_index

template<typename ShapeFunctionDisplacement, typename ShapeFunctionPressure, int DisplacementDim>
const int ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::temperature_index = 0
staticprivate

◆ temperature_size

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

Definition at line 440 of file ThermoHydroMechanicsFEM.h.

Referenced by assembleWithJacobian(), and updateConstitutiveRelations().


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