53 double const aperture0,
54 Eigen::Ref<Eigen::VectorXd const>
56 Eigen::Ref<Eigen::VectorXd const>
58 Eigen::Ref<Eigen::VectorXd const>
60 Eigen::Ref<Eigen::VectorXd const>
62 Eigen::Ref<Eigen::VectorXd>
64 Eigen::Ref<Eigen::MatrixXd>
67 material_state_variables)
70 &material_state_variables) !=
nullptr);
77 const int index_ns = DisplacementDim - 1;
78 double const aperture = w[index_ns] + aperture0;
82 Ke = Eigen::MatrixXd::Zero(DisplacementDim, DisplacementDim);
83 for (
int i = 0; i < index_ns; i++)
88 Ke(index_ns, index_ns) = mat.Kn;
96 sigma.noalias() = Ke * (w - w_prev);
98 sigma.coeffRef(index_ns) *=
100 sigma.noalias() += sigma_prev;
104 if (_tension_cutoff && sigma[DisplacementDim - 1] >= 0)
113 auto yield_function = [&mat](Eigen::VectorXd
const& s)
115 double const sigma_n = s[DisplacementDim - 1];
116 Eigen::VectorXd
const sigma_s = s.head(DisplacementDim - 1);
117 double const mag_tau = sigma_s.norm();
118 return mag_tau + sigma_n * std::tan(mat.phi) - mat.c;
122 double const Fs = yield_function(sigma);
128 aperture0, aperture, _penalty_aperture_cutoff);
133 auto yield_function_derivative = [&mat](Eigen::VectorXd
const& s)
135 Eigen::Matrix<double, DisplacementDim, 1> dFs_dS;
136 dFs_dS.template head<DisplacementDim - 1>().noalias() =
137 s.template head<DisplacementDim - 1>().normalized();
138 dFs_dS.coeffRef(DisplacementDim - 1) = std::tan(mat.phi);
143 auto plastic_potential_derivative = [&mat](Eigen::VectorXd
const& s)
145 Eigen::Matrix<double, DisplacementDim, 1> dQs_dS;
146 dQs_dS.template head<DisplacementDim - 1>().noalias() =
147 s.template head<DisplacementDim - 1>().normalized();
148 dQs_dS.coeffRef(DisplacementDim - 1) = std::tan(mat.psi);
154 Eigen::FullPivLU<Eigen::Matrix<double, 1, 1, Eigen::RowMajor>>
156 using ResidualVectorType = Eigen::Matrix<double, 1, 1, Eigen::RowMajor>;
157 using JacobianMatrix = Eigen::Matrix<double, 1, 1, Eigen::RowMajor>;
159 JacobianMatrix jacobian;
160 ResidualVectorType solution;
163 auto const update_residual = [&](ResidualVectorType& residual)
164 { residual[0] = yield_function(sigma); };
166 auto const update_jacobian = [&](JacobianMatrix& jacobian)
168 jacobian(0, 0) = -yield_function_derivative(sigma).transpose() *
169 Ke * plastic_potential_derivative(sigma);
172 auto const update_solution = [&](ResidualVectorType
const& increment)
174 solution += increment;
179 solution[0] * plastic_potential_derivative(sigma);
181 sigma.noalias() = Ke * (w - w_prev - state.
w_p + state.
w_p_prev);
184 aperture0, aperture, _penalty_aperture_cutoff);
185 sigma.noalias() += sigma_prev;
189 linear_solver, update_jacobian, update_residual, update_solution,
190 _nonlinear_solver_parameters);
192 auto const success_iterations = newton_solver.solve(jacobian);
194 if (!success_iterations)
197 "FractureModel/Coulomb local nonlinear solver didn't "
206 double const Fs = yield_function(sigma);
210 Ke(index_ns, index_ns) *=
212 Eigen::RowVectorXd
const A = yield_function_derivative(sigma).transpose() *
214 (yield_function_derivative(sigma).transpose() *
215 Ke * plastic_potential_derivative(sigma));
216 Kep = Ke - Ke * plastic_potential_derivative(sigma) * A;