38template <
typename BMatricesType,
typename ShapeMatrixType,
int DisplacementDim>
50 typename ShapeMatrixType::NodalRowVectorType
N;
51 typename ShapeMatrixType::GlobalDimNodalMatrixType
dNdx;
61 DisplacementDim>::MaterialStateVariables>
77 template <
typename DisplacementVectorType>
81 DisplacementVectorType
const& ,
82 double const degradation,
85 auto linear_elastic_mp =
88 .getMaterialProperties();
90 auto const bulk_modulus = linear_elastic_mp.bulk_modulus(t, x);
91 auto const mu = linear_elastic_mp.mu(t, x);
93 switch (energy_split_model)
101 degradation, bulk_modulus, mu,
eps);
110 degradation, bulk_modulus, mu,
eps);
118 calculateIsotropicDegradedStressWithRankineEnergy<
119 DisplacementDim>(degradation, bulk_modulus, mu,
eps);
124 double temperature = 0.;
126 C_ortho =
static_cast<
129 .getElasticTensor(t, x, temperature);
135 degradation,
eps, C_ortho);
140 double temperature = 0.;
142 C_ortho =
static_cast<
145 .getElasticTensor(t, x, temperature);
151 degradation,
eps, C_ortho);
163template <
typename ShapeMatrixType>
166 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N;
169template <
typename ShapeFunction,
int DisplacementDim>
175 ShapeFunction::NPOINTS * DisplacementDim;
191 typename ShapeMatricesType::template VectorType<displacement_size>;
193 typename ShapeMatricesType::template VectorType<phasefield_size>;
209 bool const is_axially_symmetric,
216 unsigned const n_integration_points =
219 _ip_data.reserve(n_integration_points);
222 auto& solid_material =
228 auto const shape_matrices =
230 DisplacementDim>(e, is_axially_symmetric,
236 for (
unsigned ip = 0; ip < n_integration_points; ip++)
238 _ip_data.emplace_back(solid_material);
240 ip_data.integration_weight =
242 shape_matrices[ip].integralMeasure * shape_matrices[ip].detJ;
244 static const int kelvin_vector_size =
247 ip_data.eps_tensile.setZero(kelvin_vector_size);
248 ip_data.eps.setZero(kelvin_vector_size);
249 ip_data.eps_prev.resize(kelvin_vector_size);
250 ip_data.D.setZero(kelvin_vector_size, kelvin_vector_size);
252 ip_data.sigma_tensile.setZero(kelvin_vector_size);
253 ip_data.sigma_compressive.setZero(kelvin_vector_size);
254 ip_data.sigma.setZero(kelvin_vector_size);
255 ip_data.strain_energy_tensile = 0.0;
256 ip_data.elastic_energy = 0.0;
258 ip_data.N = shape_matrices[ip].N;
259 ip_data.dNdx = shape_matrices[ip].dNdx;
267 std::string_view
const name,
268 double const* values,
269 int const integration_order)
override;
272 std::vector<double>
const& ,
273 std::vector<double>
const& ,
274 std::vector<double>& ,
275 std::vector<double>& ,
276 std::vector<double>& )
override
279 "PhaseFieldLocalAssembler: assembly without jacobian is not "
284 double const t,
double const dt, Eigen::VectorXd
const& local_x,
285 Eigen::VectorXd
const& local_x_prev,
int const process_id,
286 std::vector<double>& local_b_data,
287 std::vector<double>& local_Jac_data)
override;
291 unsigned const n_integration_points =
294 for (
unsigned ip = 0; ip < n_integration_points; ip++)
312 double>::quiet_NaN() ,
316 ip_data.pushBackState();
321 Eigen::VectorXd
const& ,
322 double const ,
double const ,
325 unsigned const n_integration_points =
328 for (
unsigned ip = 0; ip < n_integration_points; ip++)
335 std::size_t mesh_item_id,
336 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
337 std::vector<GlobalVector*>
const& x,
double const t,
338 double& crack_volume)
override;
341 std::size_t mesh_item_id,
342 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_tables,
343 std::vector<GlobalVector*>
const& x,
double const t,
344 double& elastic_energy,
double& surface_energy,
345 double& pressure_work)
override;
348 const unsigned integration_point)
const override
353 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
359 std::vector<double>
getSigma()
const override;
361 std::vector<double>
getEpsilon()
const override;
366 std::vector<GlobalVector*>
const& ,
367 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
368 std::vector<double>& cache)
const override
376 std::vector<GlobalVector*>
const& ,
377 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
378 std::vector<double>& cache)
const override
386 std::vector<GlobalVector*>
const& ,
387 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
388 std::vector<double>& cache)
const override
396 std::vector<GlobalVector*>
const& ,
397 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
398 std::vector<double>& cache)
const override
406 std::vector<GlobalVector*>
const& ,
407 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
408 std::vector<double>& cache)
const override
415 double const t,
double const dt, Eigen::VectorXd
const& local_x,
416 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
419 double const t,
double const dt, Eigen::VectorXd
const& local_x,
420 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data);
424 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
std::size_t getID() const
Returns the ID of the element.
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
unsigned getNumberOfPoints() const
void setElementID(std::size_t element_id)
VectorType< _number_of_dof > NodalForceVectorType
Rhs residual.
typename ShapeMatricesType::ShapeMatrices ShapeMatrices
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) override
static constexpr int phasefield_size
static const int phase_process_id
typename ShapeMatricesType::template VectorType< phasefield_size > PhaseFieldVector
PhaseFieldProcessData< DisplacementDim > & _process_data
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 constexpr int displacement_index
void assembleWithJacobianForDeformationEquations(double const t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
void assembleWithJacobianPhaseFieldEquations(double const t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
std::vector< double > const & getIntPtSigmaCompressive(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
MeshLib::Element const & _element
SecondaryData< typename ShapeMatrices::ShapeType > _secondary_data
std::size_t setIPDataInitialConditions(std::string_view const name, double const *values, int const integration_order) override
Returns number of read integration points.
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
typename BMatricesType::NodalForceVectorType NodalForceVectorType
NumLib::GenericIntegrationMethod const & _integration_method
static const int mechanics_process_id
static constexpr int displacement_size
PhaseFieldLocalAssembler(PhaseFieldLocalAssembler const &)=delete
void initializeConcrete() override
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
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 & getIntPtEpsilonTensile(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
static constexpr int phasefield_index
typename ShapeMatricesType::template VectorType< displacement_size > DeformationVector
typename ShapeMatricesType::template MatrixType< phasefield_size, phasefield_size > PhaseFieldMatrix
bool const _is_axially_symmetric
PhaseFieldLocalAssembler(MeshLib::Element const &e, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, PhaseFieldProcessData< DisplacementDim > &process_data)
void computeCrackIntegral(std::size_t mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, double &crack_volume) override
PhaseFieldLocalAssembler(PhaseFieldLocalAssembler &&)=delete
void computeEnergy(std::size_t mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, double &elastic_energy, double &surface_energy, double &pressure_work) override
std::vector< double > const & getIntPtSigma(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
void postTimestepConcrete(Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const) override
std::vector< double > getSigma() const override
typename ShapeMatricesType::NodalMatrixType NodalMatrixType
ShapeMatrixPolicyType< ShapeFunction, DisplacementDim > ShapeMatricesType
std::vector< double > const & getIntPtSigmaTensile(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > getEpsilon() const override
typename ShapeMatricesType::NodalVectorType NodalVectorType
std::tuple< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, double, double, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > calculateOrthoVolDevDegradedStress(double const degradation, MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > const &C_ortho)
std::tuple< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, double, double, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > calculateIsotropicDegradedStress(double const degradation, double const bulk_modulus, double const mu, MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps)
std::tuple< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, double, double, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > calculateVolDevDegradedStress(double const degradation, double const bulk_modulus, double const mu, MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps)
std::tuple< MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinVectorType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, double, double, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim >, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > > calculateOrthoMasonryDegradedStress(double const degradation, MathLib::KelvinVector::KelvinVectorType< DisplacementDim > const &eps, MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > const &C_ortho)
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, Eigen::MatrixBase< Derived >::RowsAtCompileTime, 1 > symmetricTensorToKelvinVector(Eigen::MatrixBase< Derived > const &v)
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
std::vector< double > const & getIntegrationPointKelvinVectorData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
BMatricesType::KelvinVectorType sigma_tensile
MaterialLib::Solids::MechanicsBase< DisplacementDim > const & solid_material
double integration_weight
ShapeMatrixType::NodalRowVectorType N
BMatricesType::KelvinVectorType eps_prev
double strain_energy_tensile
BMatricesType::KelvinMatrixType C_compressive
BMatricesType::KelvinVectorType sigma_compressive
ShapeMatrixType::GlobalDimNodalMatrixType dNdx
BMatricesType::KelvinVectorType eps_tensile
BMatricesType::KelvinVectorType eps
BMatricesType::KelvinVectorType sigma
void updateConstitutiveRelation(double const t, ParameterLib::SpatialPosition const &x, double const, DisplacementVectorType const &, double const degradation, EnergySplitModel const energy_split_model)
BMatricesType::KelvinMatrixType D
IntegrationPointData(MaterialLib::Solids::MechanicsBase< DisplacementDim > const &solid_material)
BMatricesType::KelvinMatrixType C_tensile
double history_variable_prev
std::unique_ptr< typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables > material_state_variables
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N