6#include <Eigen/Eigenvalues>
24namespace MPL = MaterialPropertyLib;
26template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
30 HydroMechanicsLocalAssembler(
34 bool const is_axially_symmetric,
41 unsigned const n_integration_points =
44 _ip_data.reserve(n_integration_points);
47 auto const shape_matrices_u =
50 DisplacementDim>(e, is_axially_symmetric,
53 auto const shape_matrices_p =
58 auto const& solid_material =
63 for (
unsigned ip = 0; ip < n_integration_points; ip++)
65 _ip_data.emplace_back(solid_material);
67 auto const& sm_u = shape_matrices_u[ip];
68 ip_data.integration_weight =
70 sm_u.integralMeasure * sm_u.detJ;
73 static const int kelvin_vector_size =
75 ip_data.sigma_eff.setZero(kelvin_vector_size);
76 ip_data.eps.setZero(kelvin_vector_size);
79 ip_data.eps_prev.resize(kelvin_vector_size);
80 ip_data.sigma_eff_prev.resize(kelvin_vector_size);
83 ip_data.dNdx_u = sm_u.dNdx;
85 ip_data.N_p = shape_matrices_p[ip].N;
86 ip_data.dNdx_p = shape_matrices_p[ip].dNdx;
92template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
95 ShapeFunctionPressure, DisplacementDim>::
96 assembleWithJacobian(
double const t,
double const dt,
97 std::vector<double>
const& local_x,
98 std::vector<double>
const& local_x_prev,
99 std::vector<double>& local_rhs_data,
100 std::vector<double>& local_Jac_data)
104 auto p = Eigen::Map<
typename ShapeMatricesTypePressure::template VectorType<
108 Eigen::Map<
typename ShapeMatricesTypeDisplacement::template VectorType<
113 Eigen::Map<
typename ShapeMatricesTypePressure::template VectorType<
117 Eigen::Map<
typename ShapeMatricesTypeDisplacement::template VectorType<
122 typename ShapeMatricesTypeDisplacement::template MatrixType<
129 typename ShapeMatricesTypeDisplacement::template VectorType<
134 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
138 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
142 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
145 typename ShapeMatricesTypeDisplacement::template MatrixType<
147 Kup = ShapeMatricesTypeDisplacement::template MatrixType<
151 typename ShapeMatricesTypeDisplacement::template MatrixType<
153 Kpu = ShapeMatricesTypeDisplacement::template MatrixType<
157 typename ShapeMatricesTypeDisplacement::template MatrixType<
159 Kpu_k = ShapeMatricesTypeDisplacement::template MatrixType<
163 auto const& solid_material =
171 unsigned const n_integration_points =
176 auto const& solid = medium->phase(
"Solid");
177 auto const& fluid = fluidPhase(*medium);
184 .template value<double>(vars, x_position, t, dt);
189 for (
unsigned ip = 0; ip < n_integration_points; ip++)
191 auto const& w =
_ip_data[ip].integration_weight;
194 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
197 auto const& dNdx_p =
_ip_data[ip].dNdx_p;
210 ShapeFunctionDisplacement::NPOINTS,
215 eps.noalias() = B * u;
216 auto const& sigma_eff =
_ip_data[ip].sigma_eff;
218 double const p_int_pt = N_p.dot(p);
220 phase_pressure = p_int_pt;
222 auto const C_el =
_ip_data[ip].computeElasticTangentStiffness(
223 t, x_position, dt, T_ref);
224 auto const K_S = solid_material.getBulkModulus(t, x_position, &C_el);
227 .template value<double>(vars, x_position, t, dt);
231 .template value<double>(vars, x_position, t, dt);
232 auto const porosity =
234 .template value<double>(vars, x_position, t, dt);
236 auto const [rho_fr, mu] =
249 auto const sigma_total =
250 (
_ip_data[ip].sigma_eff - alpha * p_int_pt * identity2).eval();
259 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
266 .value(vars, x_position, t, dt));
272 auto const K_over_mu = K / mu;
274 auto C =
_ip_data[ip].updateConstitutiveRelation(vars, t, x_position,
281 .template block<displacement_size, displacement_size>(
283 .noalias() += B.transpose() * C * B * w;
285 double const rho = rho_sr * (1 - porosity) + porosity * rho_fr;
288 (B.transpose() * sigma_eff -
N_u_op(N_u).transpose() * rho * b) * w;
293 Kup.noalias() += B.transpose() * alpha * identity2 * N_p * w;
298 laplace_p.noalias() +=
299 rho_fr * dNdx_p.transpose() * K_over_mu * dNdx_p * w;
301 storage_p.noalias() +=
302 rho_fr * N_p.transpose() * N_p * w *
303 ((alpha - porosity) * (1.0 - alpha) / K_S + porosity * beta_p);
307 add_p_derivative.noalias() += rho_fr * beta_p * dNdx_p.transpose() *
309 (dNdx_p * p - 2.0 * rho_fr * b) * N_p * w;
311 local_rhs.template segment<pressure_size>(
pressure_index).noalias() +=
312 dNdx_p.transpose() * rho_fr * rho_fr * K_over_mu * b * w;
318 rho_fr * alpha * N_p.transpose() * identity2.transpose() * B * w;
323 dNdx_p * p - rho_fr * b) *
324 dkde * B * rho_fr / mu * w;
334 storage_p = storage_p.colwise().sum().eval().asDiagonal();
338 Kpu = Kpu.colwise().sum().eval().asDiagonal();
339 Kpu_k = Kpu_k.colwise().sum().eval().asDiagonal();
347 .noalias() += laplace_p + storage_p / dt + add_p_derivative;
353 .noalias() += Kpu / dt + Kpu_k;
356 local_rhs.template segment<pressure_size>(
pressure_index).noalias() -=
357 laplace_p * p + storage_p * (p - p_prev) / dt + Kpu * (u - u_prev) / dt;
361 .noalias() += Kup * p;
364template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
367 ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim>::
368 getIntPtDarcyVelocity(
370 std::vector<GlobalVector*>
const& x,
371 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
372 std::vector<double>& cache)
const
374 int const hydraulic_process_id =
_process_data.hydraulic_process_id;
377 assert(!indices.empty());
378 auto const local_x = x[hydraulic_process_id]->get(indices);
380 unsigned const n_integration_points =
384 double, DisplacementDim, Eigen::Dynamic, Eigen::RowMajor>>(
385 cache, DisplacementDim, n_integration_points);
387 auto p = Eigen::Map<
typename ShapeMatricesTypePressure::template VectorType<
394 auto const& fluid = fluidPhase(*medium);
401 double const dt = std::numeric_limits<double>::quiet_NaN();
404 .template value<double>(vars, x_position, t, dt);
408 for (
unsigned ip = 0; ip < n_integration_points; ip++)
417 double const p_int_pt =
_ip_data[ip].N_p.dot(p);
419 phase_pressure = p_int_pt;
422 .template value<double>(vars, x_position, t, dt);
426 auto const sigma_total =
427 (
_ip_data[ip].sigma_eff - alpha * p_int_pt * identity2).eval();
434 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
441 .value(vars, x_position, t, dt));
443 auto const [rho_fr, mu] =
447 auto const K_over_mu = K / mu;
452 auto const& dNdx_p =
_ip_data[ip].dNdx_p;
453 cache_matrix.col(ip).noalias() =
454 -K_over_mu * dNdx_p * p + K_over_mu * rho_fr * b;
460template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
463 ShapeFunctionPressure, DisplacementDim>::
464 assembleWithJacobianForPressureEquations(
465 const double t,
double const dt, Eigen::VectorXd
const& local_x,
466 Eigen::VectorXd
const& local_x_prev, std::vector<double>& local_b_data,
467 std::vector<double>& local_Jac_data)
471 template VectorType<pressure_size>>(
477 auto const p = local_x.template segment<pressure_size>(
pressure_index);
483 typename ShapeMatricesTypeDisplacement::template MatrixType<
488 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
492 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
496 ShapeMatricesTypePressure::NodalMatrixType::Zero(
pressure_size,
499 auto const& solid_material =
508 auto const& fluid = fluidPhase(*medium);
515 .template value<double>(vars, x_position, t, dt);
520 auto const staggered_scheme =
522 auto const fixed_stress_stabilization_parameter =
523 staggered_scheme.fixed_stress_stabilization_parameter;
524 auto const fixed_stress_over_time_step =
525 staggered_scheme.fixed_stress_over_time_step;
528 for (
int ip = 0; ip < n_integration_points; ip++)
530 auto const& w =
_ip_data[ip].integration_weight;
533 auto const& dNdx_p =
_ip_data[ip].dNdx_p;
542 double const p_int_pt = N_p.dot(p);
544 phase_pressure = p_int_pt;
546 auto const C_el =
_ip_data[ip].computeElasticTangentStiffness(
547 t, x_position, dt, T_ref);
548 auto const K_S = solid_material.getBulkModulus(t, x_position, &C_el);
552 .template value<double>(vars, x_position, t, dt);
556 auto const sigma_total =
557 (
_ip_data[ip].sigma_eff - alpha_b * p_int_pt * identity2).eval();
564 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
571 .value(vars, x_position, t, dt));
572 auto const porosity =
574 .template value<double>(vars, x_position, t, dt);
576 auto const [rho_fr, mu] =
586 auto const K_over_mu = K / mu;
589 rho_fr * dNdx_p.transpose() * K_over_mu * dNdx_p * w;
593 fixed_stress_stabilization_parameter * alpha_b * alpha_b / K_S;
595 storage.noalias() += rho_fr * N_p.transpose() * N_p * w *
596 ((alpha_b - porosity) * (1.0 - alpha_b) / K_S +
597 porosity * beta_p + beta_FS);
602 local_rhs.noalias() +=
603 dNdx_p.transpose() * rho_fr * rho_fr * K_over_mu * b * w;
608 add_p_derivative.noalias() += rho_fr * beta_p * dNdx_p.transpose() *
610 (dNdx_p * p - 2.0 * rho_fr * b) * N_p * w;
612 if (!fixed_stress_over_time_step)
615 auto const& eps_prev =
_ip_data[ip].eps_prev;
616 const double eps_v_dot =
620 double const strain_rate_b =
621 alpha_b * eps_v_dot -
622 beta_FS *
_ip_data[ip].strain_rate_variable;
624 local_rhs.noalias() -= strain_rate_b * rho_fr * N_p * w;
629 local_rhs.noalias() -=
630 alpha_b *
_ip_data[ip].strain_rate_variable * rho_fr * N_p * w;
633 local_Jac.noalias() = laplace + storage / dt + add_p_derivative;
635 local_rhs.noalias() -= laplace * p + storage * (p - p_prev) / dt;
638template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
641 ShapeFunctionPressure, DisplacementDim>::
642 assembleWithJacobianForDeformationEquations(
643 const double t,
double const dt, Eigen::VectorXd
const& local_x,
644 std::vector<double>& local_b_data, std::vector<double>& local_Jac_data)
646 auto const p = local_x.template segment<pressure_size>(
pressure_index);
651 typename ShapeMatricesTypeDisplacement::template MatrixType<
657 template VectorType<displacement_size>>(
664 auto const& solid = medium->phase(
"Solid");
665 auto const& fluid = fluidPhase(*medium);
672 .template value<double>(vars, x_position, t, dt);
676 for (
int ip = 0; ip < n_integration_points; ip++)
678 auto const& w =
_ip_data[ip].integration_weight;
681 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
692 auto const x_coord = x_position.getCoordinates().value()[0];
695 ShapeFunctionDisplacement::NPOINTS,
700 auto const& sigma_eff =
_ip_data[ip].sigma_eff;
702 phase_pressure = N_p.dot(p);
705 .template value<double>(vars, x_position, t, dt);
708 .template value<double>(vars, x_position, t, dt);
709 auto const porosity =
711 .template value<double>(vars, x_position, t, dt);
714 t, dt, x_position, fluid, vars);
719 DisplacementDim)>::identity2;
721 eps.noalias() = B * u;
726 auto C =
_ip_data[ip].updateConstitutiveRelation(vars, t, x_position,
729 local_Jac.noalias() += B.transpose() * C * B * w;
734 double const rho = rho_sr * (1 - porosity) + porosity * rho_fr;
735 local_rhs.noalias() -=
736 (B.transpose() * (sigma_eff - alpha * identity2 * p_at_xi) -
737 N_u_op(N_u).transpose() * rho * b) *
742template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
745 ShapeFunctionPressure, DisplacementDim>::
746 assembleWithJacobianForStaggeredScheme(
const double t,
double const dt,
747 Eigen::VectorXd
const& local_x,
748 Eigen::VectorXd
const& local_x_prev,
749 int const process_id,
750 std::vector<double>& local_b_data,
751 std::vector<double>& local_Jac_data)
757 local_b_data, local_Jac_data);
766template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
769 ShapeFunctionPressure, DisplacementDim>::
770 setInitialConditionsConcrete(Eigen::VectorXd
const local_x,
779 auto const p = local_x.template segment<pressure_size>(
pressure_index);
784 const double dt = 0.0;
789 for (
int ip = 0; ip < n_integration_points; ip++)
792 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
804 ShapeFunctionDisplacement::NPOINTS,
809 eps.noalias() = B * u;
819 .template value<double>(vars, x_position, t, dt);
821 auto& sigma_eff =
_ip_data[ip].sigma_eff;
822 sigma_eff.noalias() += alpha_b * N_p.dot(p) * identity2;
823 _ip_data[ip].sigma_eff_prev.noalias() = sigma_eff;
828template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
831 ShapeFunctionPressure, DisplacementDim>::
832 postNonLinearSolverConcrete(Eigen::VectorXd
const& local_x,
833 Eigen::VectorXd
const& local_x_prev,
834 double const t,
double const dt,
835 int const process_id)
843 auto const staggered_scheme_ptr =
846 if (staggered_scheme_ptr &&
849 if (!staggered_scheme_ptr->fixed_stress_over_time_step)
856 for (
int ip = 0; ip < n_integration_points; ip++)
860 auto const& N_p = ip_data.N_p;
862 ip_data.strain_rate_variable = N_p.dot(p - p_prev) / dt;
867 if (!staggered_scheme_ptr ||
887 for (
int ip = 0; ip < n_integration_points; ip++)
890 auto const& dNdx_u =
_ip_data[ip].dNdx_u;
892 x_position = {std::nullopt,
_element.getID(),
894 ShapeFunctionDisplacement,
900 DisplacementDim, ShapeFunctionDisplacement::NPOINTS,
905 eps.noalias() = B * u;
909 _ip_data[ip].updateConstitutiveRelation(vars, t, x_position, dt, u,
915template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
918 ShapeFunctionDisplacement, ShapeFunctionPressure,
920 Eigen::VectorXd
const& local_x_prev,
921 double const t,
double const dt,
922 int const process_id)
924 auto const staggered_scheme_ptr =
927 if (staggered_scheme_ptr &&
930 if (staggered_scheme_ptr->fixed_stress_over_time_step)
932 auto const fixed_stress_stabilization_parameter =
933 staggered_scheme_ptr->fixed_stress_stabilization_parameter;
943 auto const& solid_material =
954 .template value<double>(vars, x_position, t, dt);
957 int const n_integration_points =
959 for (
int ip = 0; ip < n_integration_points; ip++)
963 auto const& N_p = ip_data.N_p;
972 auto const& eps = ip_data.eps;
973 auto const& eps_prev = ip_data.eps_prev;
974 const double eps_v_dot =
977 auto const C_el = ip_data.computeElasticTangentStiffness(
978 t, x_position, dt, T_ref);
980 solid_material.getBulkModulus(t, x_position, &C_el);
984 .template value<double>(vars, x_position, t, dt);
986 ip_data.strain_rate_variable =
987 eps_v_dot - fixed_stress_stabilization_parameter * alpha_b *
988 N_p.dot(p - p_prev) / dt / K_S;
993 unsigned const n_integration_points =
996 for (
unsigned ip = 0; ip < n_integration_points; ip++)
1002template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1003 int DisplacementDim>
1005 ShapeFunctionDisplacement, ShapeFunctionPressure,
1007 double const* values,
1008 int const integration_order)
1010 if (integration_order !=
1014 "Setting integration point initial conditions; The integration "
1015 "order of the local assembler for element {:d} is different from "
1016 "the integration order in the initial condition.",
1020 if (name ==
"sigma")
1025 "Setting initial conditions for stress from integration "
1026 "point data and from a parameter '{:s}' is not possible "
1035 if (name ==
"epsilon")
1041 if (name ==
"strain_rate_variable")
1050template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1051 int DisplacementDim>
1060template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1061 int DisplacementDim>
1066 auto const kelvin_vector_size =
1068 unsigned const n_integration_points =
1071 std::vector<double> ip_epsilon_values;
1073 double, Eigen::Dynamic, kelvin_vector_size, Eigen::RowMajor>>(
1074 ip_epsilon_values, n_integration_points, kelvin_vector_size);
1076 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
1078 auto const& eps =
_ip_data[ip].eps;
1083 return ip_epsilon_values;
1086template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1087 int DisplacementDim>
1092 unsigned const n_integration_points =
1095 std::vector<double> ip_strain_rate_variables(n_integration_points);
1097 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
1099 ip_strain_rate_variables[ip] =
_ip_data[ip].strain_rate_variable;
1102 return ip_strain_rate_variables;
1105template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1106 int DisplacementDim>
1108 ShapeFunctionPressure, DisplacementDim>::
1109 computeSecondaryVariableConcrete(
double const t,
double const dt,
1110 Eigen::VectorXd
const& local_x,
1111 Eigen::VectorXd
const& )
1113 auto const p = local_x.template segment<pressure_size>(
pressure_index);
1116 ShapeFunctionPressure,
typename ShapeFunctionDisplacement::MeshElement,
1120 int const elem_id =
_element.getID();
1122 unsigned const n_integration_points =
1125 auto const& medium =
_process_data.media_map.getMedium(elem_id);
1132 Eigen::Matrix<double, 3, 3>::Zero());
1136 for (
unsigned ip = 0; ip < n_integration_points; ip++)
1138 auto const& eps =
_ip_data[ip].eps;
1139 sigma_eff_sum +=
_ip_data[ip].sigma_eff;
1149 .template value<double>(vars, x_position, t, dt);
1150 double const p_int_pt =
_ip_data[ip].N_p.dot(p);
1152 phase_pressure = p_int_pt;
1157 auto const sigma_total =
1158 (
_ip_data[ip].sigma_eff - alpha * p_int_pt * identity2).eval();
1166 _ip_data[ip].material_state_variables->getEquivalentPlasticStrain();
1173 .value(vars, x_position, t, dt));
1176 Eigen::Map<Eigen::VectorXd>(
1180 Eigen::Matrix<double, 3, 3, 0, 3, 3>
const sigma_avg =
1182 n_integration_points;
1184 Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double, 3, 3>> e_s(sigma_avg);
1186 Eigen::Map<Eigen::Vector3d>(
1187 &(*
_process_data.principal_stress_values)[elem_id * 3], 3) =
1190 auto eigen_vectors = e_s.eigenvectors();
1192 for (
auto i = 0; i < 3; i++)
1194 Eigen::Map<Eigen::Vector3d>(
1195 &(*
_process_data.principal_stress_vector[i])[elem_id * 3], 3) =
1196 eigen_vectors.col(i);
1200template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1201 int DisplacementDim>
1203 ShapeFunctionDisplacement, ShapeFunctionPressure,
1209template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1210 int DisplacementDim>
1212 ShapeFunctionPressure,
1220template <
typename ShapeFunctionDisplacement,
typename ShapeFunctionPressure,
1221 int DisplacementDim>
1223 DisplacementDim>::MaterialStateVariables
const&
1226 getMaterialStateVariablesAt(
unsigned integration_point)
const
1228 return *
_ip_data[integration_point].material_state_variables;
KelvinVector mechanical_strain
KelvinVector total_stress
double gas_phase_pressure
double equivalent_plastic_strain
double liquid_phase_pressure
std::size_t getID() const
Returns the ID of the element.
void setElementID(std::size_t element_id)
std::optional< MathLib::Point3d > const getCoordinates() const
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
static const int displacement_size
bool const _is_axially_symmetric
unsigned getNumberOfIntegrationPoints() const override
NumLib::GenericIntegrationMethod const & _integration_method
Eigen::Matrix< double, KelvinVectorSize, 1 > SymmetricTensor
void postTimestepConcrete(Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, double const t, double const dt, int const process_id) override
void assembleWithJacobianForPressureEquations(const double t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
ShapeMatrixPolicyType< ShapeFunctionDisplacement, DisplacementDim > ShapeMatricesTypeDisplacement
ShapeMatrixPolicyType< ShapeFunctionPressure, DisplacementDim > ShapeMatricesTypePressure
std::vector< double > getSigma() const override
void assembleWithJacobianForDeformationEquations(const double t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
static const int displacement_index
static const int pressure_index
MeshLib::Element const & _element
HydroMechanicsProcessData< DisplacementDim > & _process_data
SecondaryData< typename ShapeMatricesTypeDisplacement::ShapeMatrices::ShapeType > _secondary_data
int getMaterialID() const override
static constexpr auto & N_u_op
std::vector< double > getEpsilon() const override
static int const KelvinVectorSize
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
static const int pressure_size
std::vector< double > getStrainRateVariable() const override
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
std::tuple< double, double > getFluidDensityAndViscosity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::Phase const &fluid_phase, MaterialPropertyLib::VariableArray &vars)
It computes fluid density and viscosity for single phase flow model.
constexpr Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
double getFluidDensity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, Phase const &fluid_phase, VariableArray &vars)
It computes fluid density for single phase flow model.
static const VariableArray EmptyVariableArray
SymmetricTensor< GlobalDim > getSymmetricTensor(MaterialPropertyLib::PropertyDataType const &values)
Eigen::Matrix< double, 4, 1 > kelvinVectorToSymmetricTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
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, 3, 3 > kelvinVectorToTensor(Eigen::Matrix< double, 4, 1, Eigen::ColMajor, 4, 1 > const &v)
Eigen::Matrix< double, DisplacementDim, kelvin_vector_dimensions(DisplacementDim)> liftVectorToKelvin(Eigen::Matrix< double, DisplacementDim, 1 > const &v)
KelvinVectorType< DisplacementDim > tensorToKelvin(Eigen::Matrix< double, 3, 3 > const &m)
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
void interpolateToHigherOrderNodes(MeshLib::Element const &element, bool const is_axially_symmetric, Eigen::MatrixBase< EigenMatrixType > const &node_values, MeshLib::PropertyVector< double > &interpolated_values_global_vector)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
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)
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 & 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)
void setIPDataInitialConditions(std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const &_integration_point_writer, MeshLib::Properties const &mesh_properties, LocalAssemblersVector &local_assemblers)
std::size_t setIntegrationPointScalarData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
static Eigen::Matrix< double, KelvinVectorSize, 1 > const identity2
Kelvin mapping of 2nd order identity tensor.
static double trace(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Trace of the corresponding tensor.
double strain_rate_variable
BMatricesType::KelvinVectorType eps
BMatricesType::KelvinVectorType sigma_eff