Go to the documentation of this file.
11 #include "libmesh/utility.h"
28 _dsliprate_dgss(_nss),
30 _dsliprate_dsliprate(_nss, _nss)
54 Real rnorm, rnorm0, rnorm_prev;
55 unsigned int iter = 0;
68 rnormst[iter] = rnorm;
69 Real slipratemax = 0.0;
70 for (
unsigned int i = 0; i <
_nss; ++i)
73 slipratest[iter] = slipratemax;
80 DenseVector<Real> update =
_resid;
93 mooseWarning(
"FiniteStrainCrystalPLasticity: Failed with line search");
107 for (
unsigned int i = 0; i <
_nss; ++i)
110 rnormst[iter] = rnorm;
111 slipratest[iter] = slipratemax;
118 mooseWarning(
"FiniteStrainCPSlipRateRes: NR exceeds maximum iteration ", iter,
" ", rnorm);
143 for (
unsigned int i = 0; i <
_nss; ++i)
146 eqv_slip_incr = iden - eqv_slip_incr;
151 ce =
_fe.transpose() *
_fe;
157 for (
unsigned int i = 0; i <
_nss; ++i)
166 for (
unsigned int i = 0; i <
_nss; ++i)
177 for (
unsigned int i = 0; i <
_nss; ++i)
178 for (
unsigned int j = 0; j <
_nss; ++j)
191 std::vector<RankTwoTensor> dtaudpk2(
_nss), dfpinvdsliprate(
_nss);
193 for (
unsigned int i = 0; i <
_nss; ++i)
195 dtaudpk2[i] =
_s0[i];
199 for (
unsigned int i = 0; i < LIBMESH_DIM; ++i)
200 for (
unsigned int j = 0; j < LIBMESH_DIM; ++j)
201 for (
unsigned int k = 0; k < LIBMESH_DIM; ++k)
204 for (
unsigned int i = 0; i < LIBMESH_DIM; ++i)
205 for (
unsigned int j = 0; j < LIBMESH_DIM; ++j)
206 for (
unsigned int k = 0; k < LIBMESH_DIM; ++k)
208 deedfe(i, j, k, i) = deedfe(i, j, k, i) +
_fe(k, j) * 0.5;
209 deedfe(i, j, k, j) = deedfe(i, j, k, j) +
_fe(k, i) * 0.5;
216 for (
unsigned int i = 0; i <
_nss; ++i)
217 for (
unsigned int j = 0; j <
_nss; ++j)
219 _dslipdtau(i) * dtaudpk2[i].doubleContraction(dpk2dfpinv * dfpinvdsliprate[j]);
225 for (
unsigned int i = 0; i <
_nss; ++i)
226 for (
unsigned int j = 0; j <
_nss; ++j)
240 for (
unsigned int i = 0; i <
_nss; ++i)
249 DenseMatrix<Real> A =
_jacob;
250 DenseVector<Real> r(
_nss);
251 DenseVector<Real> x(
_nss);
264 for (
unsigned int i = 0; i <
_nss; ++i)
265 rnorm += Utility::pow<2>(
_resid(i));
266 rnorm = std::sqrt(rnorm) /
_nss;
273 const DenseVector<Real> & update)
281 for (
unsigned int i = 0; i < update.size(); ++i)
286 for (
unsigned int i = 0; i < update.size(); ++i)
302 unsigned int count = 0;
312 for (
unsigned int i = 0; i < update.size(); ++i)
319 for (
unsigned int i = 0; i < update.size(); ++i)
322 if ((rnorm1 / rnorm0) <
_lsrch_tol || s_a * s_b > 0)
331 for (
unsigned int i = 0; i < update.size(); ++i)
334 step = 0.5 * (step_a + step_b);
336 for (
unsigned int i = 0; i < update.size(); ++i)
363 mooseError(
"Line search meothod is not provided.");
372 for (
unsigned int i = 0; i <
_nss; ++i)
373 dotprod +=
_resid(i) * update(i);
Real _min_lsrch_step
Minimum line search step size.
DenseVector< Real > _slip_rate
DenseVector< Real > _resid
virtual void calcDtauDsliprate()
This function calculates partial derivative of resolved shear stress with respect to split rate.
registerMooseObject("TensorMechanicsApp", FiniteStrainCPSlipRateRes)
virtual void getSlipIncrements()
This function updates the slip increments.
virtual void calcResidualSlipRate()
This function calculates residual of slip rate.
virtual void update_slip_system_resistance()
This function updates the slip system resistances.
FiniteStrainCPSlipRateRes(const InputParameters ¶meters)
bool lineSearchUpdateSlipRate(const Real, const DenseVector< Real > &)
This function performs the line search update.
FiniteStrainCrystalPlasticity uses the multiplicative decomposition of deformation gradient and solve...
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
DenseMatrix< Real > _jacob
virtual void calcJacobianSlipRate()
This function calculates jacobian of slip rate.
virtual void solveStatevar()
This function solves internal variables.
Real _rtol
Stress residual equation relative tolerance.
virtual void solveStress()
This function solves for stress, updates plastic deformation gradient.
virtual void preSolveStress()
This function sets variable for internal variable solve.
bool _use_line_search
Flag to activate line serach.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
void calcUpdate()
This function calculates and updates the residual of slip rate.
static InputParameters validParams()
static InputParameters validParams()
DenseVector< Real > _dsliprate_dgss
unsigned int _maxiter
Maximum number of iterations for stress update.
const unsigned int _nss
Number of slip system resistance.
virtual void preSolveStress()
This function set variables for stress solve.
unsigned int _lsrch_max_iter
Line search bisection method maximum iteration number.
DenseMatrix< Real > _dsliprate_dsliprate
std::vector< RankTwoTensor > _s0
Real calcResidDotProdUpdate(const DenseVector< Real > &)
This function calculates the dot product of residual and update.
DenseVector< Real > _dslipdtau
virtual void postSolveStress()
This function update stress and plastic deformation gradient after solve.
virtual Real calcResidNorm()
This function calculates the residual norm.
virtual void calcResidJacobSlipRate()
This function calculates residual and jacobian of slip rate.
Real _lsrch_tol
Line search bisection method tolerance.
defineLegacyParams(FiniteStrainCPSlipRateRes)
DenseMatrix< Real > _dgss_dsliprate
std::vector< Real > _gss_tmp
DenseVector< Real > _slip_incr
virtual void calcDgssDsliprate()
This function calculates partial derivative of slip system resistances with respect to split rate.
virtual void getSlipIncrements()
This function updates the slip system resistances.
Real _abs_tol
Stress residual equation absolute tolerance.
RankTwoTensor _fp_old_inv