33namespace MPL = MaterialPropertyLib;
37template <
typename ShapeMatrixType>
40 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N_u;
43template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
81 bool const is_axially_symmetric,
86 std::string_view
const name,
88 int const integration_order)
override;
91 std::vector<double>
const& ,
92 std::vector<double>
const& ,
93 std::vector<double>& ,
94 std::vector<double>& ,
95 std::vector<double>& )
override
98 "ThermoHydroMechanicsLocalAssembler: assembly without Jacobian is "
103 std::vector<double>
const& local_x,
104 std::vector<double>
const& local_x_prev,
105 std::vector<double>& local_rhs_data,
106 std::vector<double>& local_Jac_data)
override;
110 unsigned const n_integration_points =
113 for (
unsigned ip = 0; ip < n_integration_points; ip++)
121 ShapeFunctionDisplacement,
130 std::numeric_limits<double>::quiet_NaN()
138 ip_data.solid_material.initializeInternalStateVariables(
139 t, x_position, *ip_data.material_state_variables);
141 ip_data.pushBackState();
147 int const process_id)
override;
150 double const ,
double const )
override
152 unsigned const n_integration_points =
155 for (
unsigned ip = 0; ip < n_integration_points; ip++)
158 DisplacementDim, std::numeric_limits<double>::quiet_NaN());
163 Eigen::VectorXd
const& local_x_prev,
164 double const t,
double const dt,
167 unsigned const n_integration_points =
170 auto const [T_prev, p_prev, u_prev] =
localDOF(local_x_prev);
172 for (
unsigned ip = 0; ip < n_integration_points; ip++)
175 auto const& N_u = ip_data.N_u;
176 auto const& dNdx_u = ip_data.dNdx_u;
182 ShapeFunctionDisplacement,
191 DisplacementDim, ShapeFunctionDisplacement::NPOINTS,
198 eps_prev = B * u_prev;
203 (eps_prev -
_ip_data[ip].eps0_prev);
209 double const t,
double const dt, Eigen::VectorXd
const& local_x,
210 Eigen::VectorXd
const& local_x_prev)
override;
213 const unsigned integration_point)
const override
218 return Eigen::Map<const Eigen::RowVectorXd>(N_u.data(), N_u.size());
223 std::vector<GlobalVector*>
const& x,
224 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
225 std::vector<double>& cache)
const override;
232 constexpr int kelvin_vector_size =
236 [
this](std::vector<double>& values)
242 std::vector<GlobalVector*>
const& x,
243 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
244 std::vector<double>& cache)
const override;
248 std::vector<GlobalVector*>
const& x,
249 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
250 std::vector<double>& cache)
const override;
263 ShapeFunctionDisplacement::NPOINTS>;
267 Eigen::Ref<Eigen::VectorXd const>
const local_x,
268 Eigen::Ref<Eigen::VectorXd const>
const local_x_prev,
270 double const dt,
IpData& ip_data,
281 std::vector<GlobalVector*>
const& ,
282 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
283 std::vector<double>& cache)
const override
291 std::vector<GlobalVector*>
const& ,
292 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
293 std::vector<double>& cache)
const override
301 constexpr int kelvin_vector_size =
305 [
this](std::vector<double>& values)
311 std::vector<GlobalVector*>
const& ,
312 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
313 std::vector<double>& cache)
const override
320 constexpr int kelvin_vector_size =
324 [
this](std::vector<double>& values)
330 std::vector<GlobalVector*>
const& ,
331 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
332 std::vector<double>& cache)
const override
340 constexpr int kelvin_vector_size =
344 [
this](std::vector<double>& values)
350 std::vector<GlobalVector*>
const& ,
351 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
352 std::vector<double>& cache)
const override
360 std::vector<GlobalVector*>
const& ,
361 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
362 std::vector<double>& cache)
const override
381 std::function<std::span<double>(
383 MaterialStateVariables&)>
const& get_values_span,
384 int const& n_components)
const override
392 DisplacementDim>::MaterialStateVariables
const&
395 return *
_ip_data[integration_point].material_state_variables;
399 template <
typename SolutionVector>
400 static constexpr auto localDOF(SolutionVector
const& x)
403 ShapeFunctionPressure, ShapeFunctionPressure,
409 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
410 std::vector<IntegrationPointDataForOutput<DisplacementDim>,
411 Eigen::aligned_allocator<
419 typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType>
430 ShapeFunctionDisplacement::NPOINTS * DisplacementDim;
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
std::optional< MathLib::Point3d > const getCoordinates() const
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
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
unsigned getNumberOfIntegrationPoints() 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 > getEpsilon0() const 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
static const int pressure_size
ThermoHydroMechanicsLocalAssembler(ThermoHydroMechanicsLocalAssembler const &)=delete
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
std::vector< double > const & getIntPtSigmaIce(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
static const int pressure_index
typename ShapeMatricesTypePressure::GlobalDimMatrixType GlobalDimMatrixType
static int const KelvinVectorSize
static const int displacement_size
std::size_t setSigma(double const *values)
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
int getMaterialID() const override
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
void preTimestepConcrete(std::vector< double > const &, double const, double const) override
BMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > BMatricesType
int getNumberOfVectorElementsForDeformation() const override
NumLib::GenericIntegrationMethod const & _integration_method
static const int temperature_size
typename ShapeMatricesTypePressure::GlobalDimVectorType GlobalDimVectorType
Eigen::Matrix< double, KelvinVectorSize, 1 > SymmetricTensor
virtual std::vector< double > const & getIntPtEpsilon(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const 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
IntegrationPointData< BMatricesType, ShapeMatricesTypeDisplacement, ShapeMatricesTypePressure, DisplacementDim, ShapeFunctionDisplacement::NPOINTS > IpData
ThermoHydroMechanicsProcessData< DisplacementDim > & _process_data
std::vector< IntegrationPointDataForOutput< DisplacementDim >, Eigen::aligned_allocator< IntegrationPointDataForOutput< DisplacementDim > > > _ip_data_output
bool const _is_axially_symmetric
void postTimestepConcrete(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, int const) override
void initializeConcrete() override
std::vector< double > getSigma() const override
static constexpr auto & N_u_op
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
MeshLib::Element const & _element
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
static const int temperature_index
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 > const & getIntPtIceVolume(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
MathLib::KelvinVector::Invariants< KelvinVectorSize > Invariants
std::vector< double > getEpsilonM() const override
std::vector< double > getEpsilon() const override
static constexpr auto localDOF(SolutionVector const &x)
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & getMaterialStateVariablesAt(unsigned integration_point) const override
std::size_t setIPDataInitialConditions(std::string_view const name, double const *values, int const integration_order) override
Returns number of read integration points.
virtual std::vector< double > const & getIntPtEpsilon0(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
ThermoHydroMechanicsLocalAssembler(ThermoHydroMechanicsLocalAssembler &&)=delete
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 > const & getIntPtSigma(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
static const int displacement_index
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Eigen::Matrix< double, Eigen::MatrixBase< Derived >::RowsAtCompileTime, 1 > symmetricTensorToKelvinVector(Eigen::MatrixBase< Derived > const &v)
constexpr Eigen::CwiseNullaryOp< EigenBlockMatrixViewFunctor< D, M >, typename EigenBlockMatrixViewFunctor< D, M >::Matrix > eigenBlockMatrixView(const Eigen::MatrixBase< M > &matrix)
auto localDOF(ElementDOFVector const &x)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
BMatrixType computeBMatrix(DNDX_Type const &dNdx, N_Type const &N, const double radius, const bool is_axially_symmetric)
Fills a B-matrix based on given shape function dN/dx values.
std::vector< double > const & getIntegrationPointScalarData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
std::vector< double > transposeInPlace(StoreValuesFunction const &store_values_function)
std::vector< double > getIntegrationPointDataMaterialStateVariables(IntegrationPointDataVector const &ip_data_vector, MemberType member, std::function< std::span< double >(MaterialStateVariables &)> get_values_span, int const n_components)
std::vector< double > const & getIntegrationPointKelvinVectorData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
std::size_t setIntegrationPointKelvinVectorData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)
MatrixType< GlobalDim, GlobalDim > GlobalDimMatrixType
VectorType< GlobalDim > GlobalDimVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
BMatricesType::KelvinVectorType eps_m
std::unique_ptr< typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables > material_state_variables
BMatricesType::KelvinVectorType eps0
BMatricesType::KelvinVectorType sigma_eff
BMatricesType::KelvinVectorType eps
BMatricesType::KelvinVectorType sigma_eff_ice
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N_u