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,
196 eps_prev = B * u_prev;
201 (eps_prev -
_ip_data[ip].eps0_prev);
207 double const t,
double const dt, Eigen::VectorXd
const& local_x,
208 Eigen::VectorXd
const& local_x_prev)
override;
211 const unsigned integration_point)
const override
216 return Eigen::Map<const Eigen::RowVectorXd>(N_u.data(), N_u.size());
221 std::vector<GlobalVector*>
const& x,
222 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
223 std::vector<double>& cache)
const override;
230 constexpr int kelvin_vector_size =
234 [
this](std::vector<double>& values)
240 constexpr int kelvin_vector_size =
244 [
this](std::vector<double>& values)
250 std::vector<double> result;
257 std::vector<GlobalVector*>
const& x,
258 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
259 std::vector<double>& cache)
const override;
263 std::vector<GlobalVector*>
const& x,
264 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
265 std::vector<double>& cache)
const override;
278 ShapeFunctionDisplacement::NPOINTS>;
282 Eigen::Ref<Eigen::VectorXd const>
const local_x,
283 Eigen::Ref<Eigen::VectorXd const>
const local_x_prev,
285 double const dt,
IpData& ip_data,
296 std::vector<GlobalVector*>
const& ,
297 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
298 std::vector<double>& cache)
const override
306 std::vector<GlobalVector*>
const& ,
307 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
308 std::vector<double>& cache)
const override
316 constexpr int kelvin_vector_size =
320 [
this](std::vector<double>& values)
326 std::vector<GlobalVector*>
const& ,
327 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
328 std::vector<double>& cache)
const override
335 constexpr int kelvin_vector_size =
339 [
this](std::vector<double>& values)
345 std::vector<GlobalVector*>
const& ,
346 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
347 std::vector<double>& cache)
const override
355 constexpr int kelvin_vector_size =
359 [
this](std::vector<double>& values)
365 std::vector<GlobalVector*>
const& ,
366 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
367 std::vector<double>& cache)
const override
375 std::vector<GlobalVector*>
const& ,
376 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
377 std::vector<double>& cache)
const override
396 std::function<std::span<double>(
398 MaterialStateVariables&)>
const& get_values_span,
399 int const& n_components)
const override
407 DisplacementDim>::MaterialStateVariables
const&
410 return *
_ip_data[integration_point].material_state_variables;
414 template <
typename SolutionVector>
415 static constexpr auto localDOF(SolutionVector
const& x)
418 ShapeFunctionPressure, ShapeFunctionPressure,
424 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
425 std::vector<IntegrationPointDataForOutput<DisplacementDim>,
426 Eigen::aligned_allocator<
434 typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType>
445 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)
std::vector< double > getSigmaIce() const override
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
std::vector< double > getIceVolumeFraction() const override
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