https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
FiniteStrainCPSlipRateRes Class Reference

#include <FiniteStrainCPSlipRateRes.h>

Inheritance diagram for FiniteStrainCPSlipRateRes:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 FiniteStrainCPSlipRateRes (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void solveStatevar ()
 This function solves internal variables.
 
virtual void preSolveStress ()
 This function sets variable for internal variable solve.
 
virtual void solveStress ()
 This function solves for stress, updates plastic deformation gradient.
 
virtual void calcResidJacobSlipRate ()
 This function calculates residual and jacobian of slip rate.
 
virtual void calcResidualSlipRate ()
 This function calculates residual of slip rate.
 
virtual void calcJacobianSlipRate ()
 This function calculates jacobian of slip rate.
 
virtual void getSlipIncrements ()
 This function updates the slip system resistances.
 
virtual void calcDtauDsliprate ()
 This function calculates partial derivative of resolved shear stress with respect to split rate.
 
virtual void calcDgssDsliprate ()
 This function calculates partial derivative of slip system resistances with respect to split rate.
 
void calcUpdate ()
 This function calculates and updates the residual of slip rate.
 
virtual Real calcResidNorm ()
 This function calculates the residual norm.
 
bool lineSearchUpdateSlipRate (const Real, const DenseVector< Real > &)
 This function performs the line search update.
 
Real calcResidDotProdUpdate (const DenseVector< Real > &)
 This function calculates the dot product of residual and update.
 
virtual void computeQpStress ()
 This function updates the stress at a quadrature point.
 
virtual void computeQpElasticityTensor ()
 This function updates the elasticity tensor at a quadrature point.
 
virtual void initQpStatefulProperties ()
 This function initializes the stateful properties such as stress, plastic deformation gradient, slip system resistances, etc.
 
virtual void calc_resid_jacob (RankTwoTensor &, RankFourTensor &)
 This function calls the residual and jacobian functions used in the stress update algorithm.
 
virtual void update_slip_system_resistance ()
 This function updates the slip system resistances.
 
virtual void updateGss ()
 This function updates the slip system resistances.
 
virtual void getSlipSystems ()
 This function reads slip system from file - see test.
 
virtual void assignSlipSysRes ()
 This function assign initial values of slip system resistances/internal variables read from getSlipSystems().
 
virtual void readFileInitSlipSysRes ()
 This function read slip system resistances from file - see test.
 
virtual void getInitSlipSysRes ()
 This function assign slip system resistances - see test.
 
virtual void readFileFlowRateParams ()
 This function read flow rate parameters from file - see test.
 
virtual void getFlowRateParams ()
 This function assign flow rate parameters - see test.
 
virtual void readFileHardnessParams ()
 This function read hardness parameters from file.
 
virtual void getHardnessParams ()
 This function assign flow rate parameters from .i file - see test.
 
virtual void initSlipSysProps ()
 This function initializes slip system resistances.
 
virtual void initAdditionalProps ()
 This function initializes additional parameters.
 
virtual void preSolveQp ()
 This function set variables for stress and internal variable solve.
 
virtual void solveQp ()
 This function solves stress and internal variables.
 
virtual void postSolveQp ()
 This function update stress and internal variable after solve.
 
virtual void preSolveStatevar ()
 This function set variables for internal variable solve.
 
virtual void postSolveStatevar ()
 This function update internal variable after solve.
 
virtual void postSolveStress ()
 This function update stress and plastic deformation gradient after solve.
 
virtual void calcResidual (RankTwoTensor &)
 This function calculate stress residual.
 
virtual void calcJacobian (RankFourTensor &)
 This function calculate jacobian.
 
virtual RankFourTensor calcTangentModuli ()
 This function calculate the tangent moduli for preconditioner.
 
virtual RankFourTensor elasticTangentModuli ()
 This function calculate the elastic tangent moduli for preconditioner.
 
virtual RankFourTensor elastoPlasticTangentModuli ()
 This function calculate the exact tangent moduli for preconditioner.
 
RankTwoTensor get_current_rotation (const RankTwoTensor &a)
 This function perform RU decomposition to obtain the rotation tensor.
 
RankTwoTensor getMatRot (const RankTwoTensor &a)
 This function perform RU decomposition to obtain the rotation tensor.
 
void calc_schmid_tensor ()
 This function calculate the Schmid tensor.
 
bool line_search_update (const Real rnorm_prev, const RankTwoTensor)
 This function performs the line search update.
 
void internalVariableUpdateNRiteration ()
 This function updates internal variables after each NewTon Raphson iteration (_fp_inv)
 
virtual void computeQpProperties () override
 

Protected Attributes

DenseVector< Real > _resid
 
DenseVector< Real > _slip_rate
 
DenseVector< Real > _dsliprate_dgss
 
DenseMatrix< Real > _jacob
 
DenseMatrix< Real > _dsliprate_dsliprate
 
const unsigned int _nss
 Number of slip system resistance.
 
std::vector< Real > _gprops
 
std::vector< Real > _hprops
 
std::vector< Real > _flowprops
 
std::string _slip_sys_file_name
 File should contain slip plane normal and direction. See test.
 
std::string _slip_sys_res_prop_file_name
 File should contain initial values of the slip system resistances.
 
std::string _slip_sys_flow_prop_file_name
 File should contain values of the flow rate equation parameters.
 
std::string _slip_sys_hard_prop_file_name
 The hardening parameters in this class are read from .i file. The user can override to read from file.
 
Real _rtol
 Stress residual equation relative tolerance.
 
Real _abs_tol
 Stress residual equation absolute tolerance.
 
Real _gtol
 Internal variable update equation tolerance.
 
Real _slip_incr_tol
 Slip increment tolerance.
 
unsigned int _maxiter
 Maximum number of iterations for stress update.
 
unsigned int _maxiterg
 Maximum number of iterations for internal variable update.
 
unsigned int _num_slip_sys_flowrate_props
 Number of slip system flow rate parameters.
 
MooseEnum _tan_mod_type
 Type of tangent moduli calculation.
 
MooseEnum _intvar_read_type
 Read from options for initial values of internal variables.
 
unsigned int _num_slip_sys_props
 Number of slip system specific properties provided in the file containing slip system normals and directions.
 
bool _gen_rndm_stress_flag
 
bool _input_rndm_scale_var
 Input option for scaling variable to generate random stress when convergence fails.
 
Real _rndm_scale_var
 Scaling value.
 
unsigned int _rndm_seed
 Seed value.
 
unsigned int _max_substep_iter
 Maximum number of substep iterations.
 
bool _use_line_search
 Flag to activate line serach.
 
Real _min_lsrch_step
 Minimum line search step size.
 
Real _lsrch_tol
 Line search bisection method tolerance.
 
unsigned int _lsrch_max_iter
 Line search bisection method maximum iteration number.
 
MooseEnum _lsrch_method
 
MaterialProperty< RankTwoTensor > & _fp
 
const MaterialProperty< RankTwoTensor > & _fp_old
 
MaterialProperty< RankTwoTensor > & _pk2
 
const MaterialProperty< RankTwoTensor > & _pk2_old
 
MaterialProperty< RankTwoTensor > & _lag_e
 
const MaterialProperty< RankTwoTensor > & _lag_e_old
 
MaterialProperty< std::vector< Real > > & _gss
 
const MaterialProperty< std::vector< Real > > & _gss_old
 
MaterialProperty< Real > & _acc_slip
 
const MaterialProperty< Real > & _acc_slip_old
 
MaterialProperty< RankTwoTensor > & _update_rot
 
const MaterialProperty< RankTwoTensor > & _deformation_gradient
 
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
 
const std::string _elasticity_tensor_name
 Name of the elasticity tensor material property.
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 Elasticity tensor material property.
 
const MaterialProperty< RankTwoTensor > & _crysrot
 
DenseVector< Real > _mo
 
DenseVector< Real > _no
 
DenseVector< Real > _a0
 
DenseVector< Real > _xm
 
Real _h0
 
Real _tau_sat
 
Real _tau_init
 
Real _r
 
RankTwoTensor _dfgrd_tmp
 
RankTwoTensor _fe
 
RankTwoTensor _fp_old_inv
 
RankTwoTensor _fp_inv
 
RankTwoTensor _fp_prev_inv
 
DenseVector< Real > _slip_incr
 
DenseVector< Real > _tau
 
DenseVector< Real > _dslipdtau
 
std::vector< RankTwoTensor_s0
 
RankTwoTensor _pk2_tmp
 
RankTwoTensor _pk2_tmp_old
 
Real _accslip_tmp
 
Real _accslip_tmp_old
 
std::vector< Real > _gss_tmp
 
std::vector< Real > _gss_tmp_old
 
DenseVector< Real > _slip_sys_props
 
DenseMatrix< Real > _dgss_dsliprate
 
bool _read_from_slip_sys_file
 
bool _err_tol
 
RankTwoTensor _delta_dfgrd
 Flag to check whether convergence is achieved.
 
RankTwoTensor _dfgrd_tmp_old
 
Real _dfgrd_scale_factor
 Scales the substepping increment to obtain deformation gradient at a substep iteration.
 
bool _first_step_iter
 Flags to reset variables and reinitialize variables.
 
bool _last_step_iter
 
bool _first_substep
 
const std::string _base_name
 Base name prepended to all material property names to allow for multi-material systems.
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain
 Mechanical strain material property.
 
MaterialProperty< RankTwoTensor > & _stress
 Stress material property.
 
MaterialProperty< RankTwoTensor > & _elastic_strain
 Elastic strain material property.
 
const MaterialProperty< RankTwoTensor > & _extra_stress
 Extra stress tensor.
 
std::vector< const Function * > _initial_stress_fcn
 initial stress components
 
MaterialProperty< RankFourTensor > & _Jacobian_mult
 derivative of stress w.r.t. strain (_dstress_dstrain)
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

Detailed Description

Definition at line 14 of file FiniteStrainCPSlipRateRes.h.

Constructor & Destructor Documentation

◆ FiniteStrainCPSlipRateRes()

FiniteStrainCPSlipRateRes::FiniteStrainCPSlipRateRes ( const InputParameters parameters)

Definition at line 24 of file FiniteStrainCPSlipRateRes.C.

26 _resid(_nss),
31{
32}
FiniteStrainCrystalPlasticity uses the multiplicative decomposition of deformation gradient and solve...
const unsigned int _nss
Number of slip system resistance.

Member Function Documentation

◆ assignSlipSysRes()

void FiniteStrainCrystalPlasticity::assignSlipSysRes ( )
protectedvirtualinherited

This function assign initial values of slip system resistances/internal variables read from getSlipSystems().

Definition at line 234 of file FiniteStrainCrystalPlasticity.C.

235{
236 _gss[_qp].resize(_nss);
237
238 for (unsigned int i = 0; i < _nss; ++i)
239 _gss[_qp][i] = _slip_sys_props(i);
240}
MaterialProperty< std::vector< Real > > & _gss
virtual void resize(const std::size_t size) override final

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ calc_resid_jacob()

void FiniteStrainCrystalPlasticity::calc_resid_jacob ( RankTwoTensor resid,
RankFourTensor jac 
)
protectedvirtualinherited

This function calls the residual and jacobian functions used in the stress update algorithm.

Definition at line 881 of file FiniteStrainCrystalPlasticity.C.

882{
883 calcResidual(resid);
884 if (_err_tol)
885 return;
886 calcJacobian(jac);
887}
virtual void calcResidual(RankTwoTensor &)
This function calculate stress residual.
virtual void calcJacobian(RankFourTensor &)
This function calculate jacobian.

Referenced by FiniteStrainCrystalPlasticity::solveStress().

◆ calc_schmid_tensor()

void FiniteStrainCrystalPlasticity::calc_schmid_tensor ( )
protectedinherited

This function calculate the Schmid tensor.

Definition at line 1049 of file FiniteStrainCrystalPlasticity.C.

1050{
1051 DenseVector<Real> mo(LIBMESH_DIM * _nss), no(LIBMESH_DIM * _nss);
1052
1053 // Update slip direction and normal with crystal orientation
1054 for (unsigned int i = 0; i < _nss; ++i)
1055 {
1056 for (const auto j : make_range(Moose::dim))
1057 {
1058 mo(i * LIBMESH_DIM + j) = 0.0;
1059 for (const auto k : make_range(Moose::dim))
1060 mo(i * LIBMESH_DIM + j) =
1061 mo(i * LIBMESH_DIM + j) + _crysrot[_qp](j, k) * _mo(i * LIBMESH_DIM + k);
1062 }
1063
1064 for (const auto j : make_range(Moose::dim))
1065 {
1066 no(i * LIBMESH_DIM + j) = 0.0;
1067 for (const auto k : make_range(Moose::dim))
1068 no(i * LIBMESH_DIM + j) =
1069 no(i * LIBMESH_DIM + j) + _crysrot[_qp](j, k) * _no(i * LIBMESH_DIM + k);
1070 }
1071 }
1072
1073 // Calculate Schmid tensor and resolved shear stresses
1074 for (unsigned int i = 0; i < _nss; ++i)
1075 for (const auto j : make_range(Moose::dim))
1076 for (const auto k : make_range(Moose::dim))
1077 _s0[i](j, k) = mo(i * LIBMESH_DIM + j) * no(i * LIBMESH_DIM + k);
1078}
for(PetscInt i=0;i< nvars;++i)
unsigned int dim
const MaterialProperty< RankTwoTensor > & _crysrot
IntRange< T > make_range(T beg, T end)

Referenced by FiniteStrainCrystalPlasticity::preSolveQp().

◆ calcDgssDsliprate()

void FiniteStrainCPSlipRateRes::calcDgssDsliprate ( )
protectedvirtual

This function calculates partial derivative of slip system resistances with respect to split rate.

Definition at line 223 of file FiniteStrainCPSlipRateRes.C.

224{
225 for (unsigned int i = 0; i < _nss; ++i)
226 for (unsigned int j = 0; j < _nss; ++j)
228}

Referenced by calcJacobianSlipRate().

◆ calcDtauDsliprate()

void FiniteStrainCPSlipRateRes::calcDtauDsliprate ( )
protectedvirtual

This function calculates partial derivative of resolved shear stress with respect to split rate.

Definition at line 188 of file FiniteStrainCPSlipRateRes.C.

189{
190 RankFourTensor dfedfpinv, deedfe, dfpinvdpk2;
191 std::vector<RankTwoTensor> dtaudpk2(_nss), dfpinvdsliprate(_nss);
192
193 for (unsigned int i = 0; i < _nss; ++i)
194 {
195 dtaudpk2[i] = _s0[i];
196 dfpinvdsliprate[i] = -_fp_old_inv * _s0[i] * _dt;
197 }
198
199 for (const auto i : make_range(Moose::dim))
200 for (const auto j : make_range(Moose::dim))
201 for (const auto k : make_range(Moose::dim))
202 dfedfpinv(i, j, k, j) = _dfgrd_tmp(i, k);
203
204 for (const auto i : make_range(Moose::dim))
205 for (const auto j : make_range(Moose::dim))
206 for (const auto k : make_range(Moose::dim))
207 {
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;
210 }
211
212 RankFourTensor dpk2dfpinv;
213
214 dpk2dfpinv = _elasticity_tensor[_qp] * deedfe * dfedfpinv;
215
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]);
220}
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.

Referenced by calcJacobianSlipRate().

◆ calcJacobian()

void FiniteStrainCrystalPlasticity::calcJacobian ( RankFourTensor jac)
protectedvirtualinherited

This function calculate jacobian.

Definition at line 927 of file FiniteStrainCrystalPlasticity.C.

928{
929 RankFourTensor dfedfpinv, deedfe, dfpinvdpk2;
930
931 std::vector<RankTwoTensor> dtaudpk2(_nss), dfpinvdslip(_nss);
932
933 for (unsigned int i = 0; i < _nss; ++i)
934 {
935 dtaudpk2[i] = _s0[i];
936 dfpinvdslip[i] = -_fp_old_inv * _s0[i];
937 }
938
939 for (const auto i : make_range(Moose::dim))
940 for (const auto j : make_range(Moose::dim))
941 for (const auto k : make_range(Moose::dim))
942 dfedfpinv(i, j, k, j) = _dfgrd_tmp(i, k);
943
944 for (const auto i : make_range(Moose::dim))
945 for (const auto j : make_range(Moose::dim))
946 for (const auto k : make_range(Moose::dim))
947 {
948 deedfe(i, j, k, i) = deedfe(i, j, k, i) + _fe(k, j) * 0.5;
949 deedfe(i, j, k, j) = deedfe(i, j, k, j) + _fe(k, i) * 0.5;
950 }
951
952 for (unsigned int i = 0; i < _nss; ++i)
953 dfpinvdpk2 += (dfpinvdslip[i] * _dslipdtau(i)).outerProduct(dtaudpk2[i]);
954
955 jac =
956 RankFourTensor::IdentityFour() - (_elasticity_tensor[_qp] * deedfe * dfedfpinv * dfpinvdpk2);
957}
static RankFourTensorTempl< T > IdentityFour()
RankFourTensorTempl< T > outerProduct(const RankTwoTensorTempl< T > &b) const

Referenced by FiniteStrainCrystalPlasticity::calc_resid_jacob().

◆ calcJacobianSlipRate()

void FiniteStrainCPSlipRateRes::calcJacobianSlipRate ( )
protectedvirtual

This function calculates jacobian of slip rate.

Definition at line 171 of file FiniteStrainCPSlipRateRes.C.

172{
173 //_dsliprate_dsliprate not reinitialized to zero, hence order is important
176
177 for (unsigned int i = 0; i < _nss; ++i)
178 for (unsigned int j = 0; j < _nss; ++j)
179 {
180 _jacob(i, j) = 0.0;
181 if (i == j)
182 _jacob(i, j) += 1.0;
183 _jacob(i, j) -= _dsliprate_dsliprate(i, j);
184 }
185}
virtual void calcDgssDsliprate()
This function calculates partial derivative of slip system resistances with respect to split rate.
virtual void calcDtauDsliprate()
This function calculates partial derivative of resolved shear stress with respect to split rate.

Referenced by calcResidJacobSlipRate(), and solveStress().

◆ calcResidDotProdUpdate()

Real FiniteStrainCPSlipRateRes::calcResidDotProdUpdate ( const DenseVector< Real > &  update)
protected

This function calculates the dot product of residual and update.

Definition at line 369 of file FiniteStrainCPSlipRateRes.C.

370{
371 Real dotprod = 0.0;
372 for (unsigned int i = 0; i < _nss; ++i)
373 dotprod += _resid(i) * update(i);
374 return dotprod;
375}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by lineSearchUpdateSlipRate().

◆ calcResidJacobSlipRate()

void FiniteStrainCPSlipRateRes::calcResidJacobSlipRate ( )
protectedvirtual

This function calculates residual and jacobian of slip rate.

Definition at line 126 of file FiniteStrainCPSlipRateRes.C.

127{
129 if (_err_tol)
130 return;
132}
virtual void calcResidualSlipRate()
This function calculates residual of slip rate.
virtual void calcJacobianSlipRate()
This function calculates jacobian of slip rate.

Referenced by solveStress().

◆ calcResidNorm()

Real FiniteStrainCPSlipRateRes::calcResidNorm ( )
protectedvirtual

This function calculates the residual norm.

Definition at line 261 of file FiniteStrainCPSlipRateRes.C.

262{
263 Real rnorm = 0.0;
264 for (unsigned int i = 0; i < _nss; ++i)
265 rnorm += Utility::pow<2>(_resid(i));
266 rnorm = std::sqrt(rnorm) / _nss;
267
268 return rnorm;
269}

Referenced by lineSearchUpdateSlipRate(), and solveStress().

◆ calcResidual()

void FiniteStrainCrystalPlasticity::calcResidual ( RankTwoTensor resid)
protectedvirtualinherited

This function calculate stress residual.

Definition at line 890 of file FiniteStrainCrystalPlasticity.C.

891{
892 RankTwoTensor iden(RankTwoTensor::initIdentity), ce, ee, ce_pk2, eqv_slip_incr, pk2_new;
893
894 _fe = _dfgrd_tmp * _fp_prev_inv; // _fp_inv ==> _fp_prev_inv
895
896 ce = _fe.transpose() * _fe;
897 ce_pk2 = ce * _pk2_tmp;
898 ce_pk2 = ce_pk2 / _fe.det();
899
900 // Calculate Schmid tensor and resolved shear stresses
901 for (unsigned int i = 0; i < _nss; ++i)
902 _tau(i) = ce_pk2.doubleContraction(_s0[i]);
903
904 getSlipIncrements(); // Calculate dslip,dslipdtau
905
906 if (_err_tol)
907 return;
908
909 eqv_slip_incr.zero();
910 for (unsigned int i = 0; i < _nss; ++i)
911 eqv_slip_incr += _s0[i] * _slip_incr(i);
912
913 eqv_slip_incr = iden - eqv_slip_incr;
914 _fp_inv = _fp_old_inv * eqv_slip_incr;
916
917 ce = _fe.transpose() * _fe;
918 ee = ce - iden;
919 ee *= 0.5;
920
921 pk2_new = _elasticity_tensor[_qp] * ee;
922
923 resid = _pk2_tmp - pk2_new;
924}
virtual void getSlipIncrements()
This function updates the slip increments.
T doubleContraction(const RankTwoTensorTempl< T > &a) const
RankTwoTensorTempl< T > transpose() const

Referenced by FiniteStrainCrystalPlasticity::calc_resid_jacob(), and FiniteStrainCrystalPlasticity::line_search_update().

◆ calcResidualSlipRate()

void FiniteStrainCPSlipRateRes::calcResidualSlipRate ( )
protectedvirtual

This function calculates residual of slip rate.

Definition at line 135 of file FiniteStrainCPSlipRateRes.C.

136{
137 RankTwoTensor eqv_slip_incr, ce, ee;
139
141 _slip_incr *= _dt;
142
143 for (unsigned int i = 0; i < _nss; ++i)
144 eqv_slip_incr += _s0[i] * _slip_incr(i);
145
146 eqv_slip_incr = iden - eqv_slip_incr;
147
148 _fp_inv = _fp_old_inv * eqv_slip_incr;
150
151 ce = _fe.transpose() * _fe;
152 ee = ce - iden;
153 ee *= 0.5;
154
155 _pk2_tmp = _elasticity_tensor[_qp] * ee;
156
157 for (unsigned int i = 0; i < _nss; ++i)
159
162
163 if (_err_tol)
164 return;
165
166 for (unsigned int i = 0; i < _nss; ++i)
167 _resid(i) = _slip_rate(i) - _slip_incr(i) / _dt;
168}
virtual void getSlipIncrements()
This function updates the slip system resistances.
virtual void update_slip_system_resistance()
This function updates the slip system resistances.

Referenced by calcResidJacobSlipRate(), lineSearchUpdateSlipRate(), and solveStress().

◆ calcTangentModuli()

RankFourTensor FiniteStrainCrystalPlasticity::calcTangentModuli ( )
protectedvirtualinherited

This function calculate the tangent moduli for preconditioner.

Default is the elastic stiffness matrix. Exact jacobian is currently implemented. tan_mod_type can be modified to exact in .i file to turn it on.

Definition at line 1032 of file FiniteStrainCrystalPlasticity.C.

1033{
1034 RankFourTensor tan_mod;
1035
1036 switch (_tan_mod_type)
1037 {
1038 case 0:
1039 tan_mod = elastoPlasticTangentModuli();
1040 break;
1041 default:
1042 tan_mod = elasticTangentModuli();
1043 }
1044
1045 return tan_mod;
1046}
virtual RankFourTensor elastoPlasticTangentModuli()
This function calculate the exact tangent moduli for preconditioner.
virtual RankFourTensor elasticTangentModuli()
This function calculate the elastic tangent moduli for preconditioner.
MooseEnum _tan_mod_type
Type of tangent moduli calculation.

Referenced by FiniteStrainCrystalPlasticity::postSolveQp().

◆ calcUpdate()

void FiniteStrainCPSlipRateRes::calcUpdate ( )
protected

This function calculates and updates the residual of slip rate.

Definition at line 247 of file FiniteStrainCPSlipRateRes.C.

248{
249 DenseMatrix<Real> A = _jacob;
250 DenseVector<Real> r(_nss);
251 DenseVector<Real> x(_nss);
252
253 r = _resid;
254
255 A.lu_solve(r, x);
256
257 _resid = x;
258}
const std::vector< double > x

Referenced by solveStress().

◆ computeQpElasticityTensor()

void FiniteStrainCrystalPlasticity::computeQpElasticityTensor ( )
protectedvirtualinherited

This function updates the elasticity tensor at a quadrature point.

Presently void.

Definition at line 1027 of file FiniteStrainCrystalPlasticity.C.

1028{
1029}

◆ computeQpProperties()

void ComputeGeneralStressBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 44 of file ComputeGeneralStressBase.C.

45{
47
48 // Add in extra stress
49 _stress[_qp] += _extra_stress[_qp];
50}
const MaterialProperty< RankTwoTensor > & _extra_stress
Extra stress tensor.
virtual void computeQpStress()=0
Compute the stress and store it in the _stress material property for the current quadrature point.
MaterialProperty< RankTwoTensor > & _stress
Stress material property.

◆ computeQpStress()

void FiniteStrainCrystalPlasticity::computeQpStress ( )
protectedvirtualinherited

This function updates the stress at a quadrature point.

Solves stress residual equation using NR.

Updates slip system resistances iteratively.

Implements ComputeGeneralStressBase.

Definition at line 493 of file FiniteStrainCrystalPlasticity.C.

494{
495 unsigned int substep_iter = 1; // Depth of substepping; Limited to maximum substep iteration
496 unsigned int num_substep = 1; // Calculated from substep_iter as 2^substep_iter
497 Real dt_original = _dt; // Stores original _dt; Reset at the end of solve
498 _first_substep = true; // Initialize variables at substep_iter = 1
499
500 if (_max_substep_iter > 1)
501 {
503 if (_dfgrd_tmp_old.det() == 0)
505
507 _err_tol = true; // Indicator to continue substepping
508 }
509
510 // Substepping loop
511 while (_err_tol && _max_substep_iter > 1)
512 {
513 _dt = dt_original / num_substep;
514
515 for (unsigned int istep = 0; istep < num_substep; ++istep)
516 {
517 _first_step_iter = false;
518 if (istep == 0)
519 _first_step_iter = true;
520
521 _last_step_iter = false;
522 if (istep == num_substep - 1)
523 _last_step_iter = true;
524
525 _dfgrd_scale_factor = (static_cast<Real>(istep) + 1) / num_substep;
526
527 preSolveQp();
528 solveQp();
529
530 if (_err_tol)
531 {
532 substep_iter++;
533 num_substep *= 2;
534 break;
535 }
536 }
537
538 _first_substep = false; // Prevents reinitialization
539 _dt = dt_original; // Resets dt
540
541#ifdef DEBUG
542 if (substep_iter > _max_substep_iter)
543 mooseWarning("FiniteStrainCrystalPlasticity: Failure with substepping");
544#endif
545
546 if (!_err_tol || substep_iter > _max_substep_iter)
547 postSolveQp(); // Evaluate variables after successful solve or indicate failure
548 }
549
550 // No substepping
551 if (_max_substep_iter == 1)
552 {
553 preSolveQp();
554 solveQp();
555 postSolveQp();
556 }
557}
void mooseWarning(Args &&... args)
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
const MaterialProperty< RankTwoTensor > & _deformation_gradient
virtual void postSolveQp()
This function update stress and internal variable after solve.
Real _dfgrd_scale_factor
Scales the substepping increment to obtain deformation gradient at a substep iteration.
virtual void solveQp()
This function solves stress and internal variables.
unsigned int _max_substep_iter
Maximum number of substep iterations.
RankTwoTensor _delta_dfgrd
Flag to check whether convergence is achieved.
bool _first_step_iter
Flags to reset variables and reinitialize variables.
virtual void preSolveQp()
This function set variables for stress and internal variable solve.
void addIa(const T &a)

◆ elasticTangentModuli()

RankFourTensor FiniteStrainCrystalPlasticity::elasticTangentModuli ( )
protectedvirtualinherited

This function calculate the elastic tangent moduli for preconditioner.

Definition at line 1121 of file FiniteStrainCrystalPlasticity.C.

1122{
1123 return _elasticity_tensor[_qp]; // update jacobian_mult
1124}

Referenced by FiniteStrainCrystalPlasticity::calcTangentModuli().

◆ elastoPlasticTangentModuli()

RankFourTensor FiniteStrainCrystalPlasticity::elastoPlasticTangentModuli ( )
protectedvirtualinherited

This function calculate the exact tangent moduli for preconditioner.

Definition at line 1081 of file FiniteStrainCrystalPlasticity.C.

1082{
1083 RankFourTensor tan_mod;
1084 RankTwoTensor pk2fet, fepk2;
1085 RankFourTensor deedfe, dsigdpk2dfe;
1086
1087 // Fill in the matrix stiffness material property
1088
1089 for (const auto i : make_range(Moose::dim))
1090 for (const auto j : make_range(Moose::dim))
1091 for (const auto k : make_range(Moose::dim))
1092 {
1093 deedfe(i, j, k, i) = deedfe(i, j, k, i) + _fe(k, j) * 0.5;
1094 deedfe(i, j, k, j) = deedfe(i, j, k, j) + _fe(k, i) * 0.5;
1095 }
1096
1097 usingTensorIndices(i_, j_, k_, l_);
1098 dsigdpk2dfe = _fe.times<i_, k_, j_, l_>(_fe) * _elasticity_tensor[_qp] * deedfe;
1099
1100 pk2fet = _pk2_tmp * _fe.transpose();
1101 fepk2 = _fe * _pk2_tmp;
1102
1103 for (const auto i : make_range(Moose::dim))
1104 for (const auto j : make_range(Moose::dim))
1105 for (const auto l : make_range(Moose::dim))
1106 {
1107 tan_mod(i, j, i, l) = tan_mod(i, j, i, l) + pk2fet(l, j);
1108 tan_mod(i, j, j, l) = tan_mod(i, j, j, l) + fepk2(i, l);
1109 }
1110
1111 tan_mod += dsigdpk2dfe;
1112
1113 Real je = _fe.det();
1114 if (je > 0.0)
1115 tan_mod /= je;
1116
1117 return tan_mod;
1118}
RankFourTensorTempl< T > times(const RankTwoTensorTempl< T > &b) const

Referenced by FiniteStrainCrystalPlasticity::calcTangentModuli().

◆ get_current_rotation()

RankTwoTensor FiniteStrainCrystalPlasticity::get_current_rotation ( const RankTwoTensor a)
protectedinherited

This function perform RU decomposition to obtain the rotation tensor.

Definition at line 985 of file FiniteStrainCrystalPlasticity.C.

986{
987 return getMatRot(a);
988}
RankTwoTensor getMatRot(const RankTwoTensor &a)
This function perform RU decomposition to obtain the rotation tensor.

Referenced by FiniteStrainCrystalPlasticity::postSolveQp().

◆ getFlowRateParams()

void FiniteStrainCrystalPlasticity::getFlowRateParams ( )
protectedvirtualinherited

This function assign flow rate parameters - see test.

.i input file format start_slip_sys_num, end_slip_sys_num, value1, value2

Definition at line 344 of file FiniteStrainCrystalPlasticity.C.

345{
346 if (_flowprops.size() <= 0)
347 mooseError("FiniteStrainCrystalPLasticity: Error in reading flow rate properties: Specify "
348 "input in .i file or a slip_sys_flow_prop_file_name");
349
350 _a0.resize(_nss);
351 _xm.resize(_nss);
352
353 unsigned int num_data_grp = 2 + _num_slip_sys_flowrate_props; // Number of data per group e.g.
354 // start_slip_sys, end_slip_sys,
355 // value1, value2, ..
356
357 for (unsigned int i = 0; i < _flowprops.size() / num_data_grp; ++i)
358 {
359 Real vs, ve;
360 unsigned int is, ie;
361
362 vs = _flowprops[i * num_data_grp];
363 ve = _flowprops[i * num_data_grp + 1];
364
365 if (vs <= 0 || ve <= 0)
366 mooseError("FiniteStrainCrystalPLasticity: Indices in flow rate parameter read must be "
367 "positive integers: is = ",
368 vs,
369 " ie = ",
370 ve);
371
372 if (vs != floor(vs) || ve != floor(ve))
373 mooseError("FiniteStrainCrystalPLasticity: Error in reading flow props: Values specifying "
374 "start and end number of slip system groups should be integer");
375
376 is = static_cast<unsigned int>(vs);
377 ie = static_cast<unsigned int>(ve);
378
379 if (is > ie)
380 mooseError("FiniteStrainCrystalPLasticity: Start index is = ",
381 is,
382 " should be greater than end index ie = ",
383 ie,
384 " in flow rate parameter read");
385
386 for (unsigned int j = is; j <= ie; ++j)
387 {
388 _a0(j - 1) = _flowprops[i * num_data_grp + 2];
389 _xm(j - 1) = _flowprops[i * num_data_grp + 3];
390 }
391 }
392
393 for (unsigned int i = 0; i < _nss; ++i)
394 {
395 if (!(_a0(i) > 0.0 && _xm(i) > 0.0))
396 {
398 "FiniteStrainCrystalPlasticity: Non-positive flow rate parameters ", _a0(i), ",", _xm(i));
399 break;
400 }
401 }
402}
void mooseError(Args &&... args)
unsigned int _num_slip_sys_flowrate_props
Number of slip system flow rate parameters.
PetscErrorCode PetscInt const PetscInt IS * is

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ getHardnessParams()

void FiniteStrainCrystalPlasticity::getHardnessParams ( )
protectedvirtualinherited

This function assign flow rate parameters from .i file - see test.

Definition at line 412 of file FiniteStrainCrystalPlasticity.C.

413{
414 if (_hprops.size() <= 0)
415 mooseError("FiniteStrainCrystalPLasticity: Error in reading hardness properties: Specify input "
416 "in .i file or a slip_sys_hard_prop_file_name");
417
418 _r = _hprops[0];
419 _h0 = _hprops[1];
420 _tau_init = _hprops[2];
421 _tau_sat = _hprops[3];
422}

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ getInitSlipSysRes()

void FiniteStrainCrystalPlasticity::getInitSlipSysRes ( )
protectedvirtualinherited

This function assign slip system resistances - see test.

.i input file format start_slip_sys_num, end_slip_sys_num, value.

Definition at line 262 of file FiniteStrainCrystalPlasticity.C.

263{
264 if (_gprops.size() <= 0)
265 mooseError("FiniteStrainCrystalPLasticity: Error in reading slip system resistance properties: "
266 "Specify input in .i file or in slip_sys_res_prop_file or in slip_sys_file");
267
268 _gss[_qp].resize(_nss, 0.0);
269
270 unsigned int num_data_grp = 3; // Number of data per group e.g. start_slip_sys, end_slip_sys,
271 // value
272
273 for (unsigned int i = 0; i < _gprops.size() / num_data_grp; ++i)
274 {
275 Real vs, ve;
276 unsigned int is, ie;
277
278 vs = _gprops[i * num_data_grp];
279 ve = _gprops[i * num_data_grp + 1];
280
281 if (vs <= 0 || ve <= 0)
282 mooseError("FiniteStrainCrystalPLasticity: Indices in gss property read must be positive "
283 "integers: is = ",
284 vs,
285 " ie = ",
286 ve);
287
288 if (vs != floor(vs) || ve != floor(ve))
289 mooseError("FiniteStrainCrystalPLasticity: Error in reading slip system resistances: Values "
290 "specifying start and end number of slip system groups should be integer");
291
292 is = static_cast<unsigned int>(vs);
293 ie = static_cast<unsigned int>(ve);
294
295 if (is > ie)
296 mooseError("FiniteStrainCrystalPLasticity: Start index is = ",
297 is,
298 " should be greater than end index ie = ",
299 ie,
300 " in slip system resistance property read");
301
302 for (unsigned int j = is; j <= ie; ++j)
303 _gss[_qp][j - 1] = _gprops[i * num_data_grp + 2];
304 }
305
306 for (unsigned int i = 0; i < _nss; ++i)
307 if (_gss[_qp][i] <= 0.0)
308 mooseError("FiniteStrainCrystalPLasticity: Value of resistance for slip system ",
309 i + 1,
310 " non positive");
311}

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ getMatRot()

RankTwoTensor FiniteStrainCrystalPlasticity::getMatRot ( const RankTwoTensor a)
protectedinherited

This function perform RU decomposition to obtain the rotation tensor.

Definition at line 992 of file FiniteStrainCrystalPlasticity.C.

993{
994 RankTwoTensor rot;
995 RankTwoTensor c, diag, evec;
996 PetscScalar cmat[LIBMESH_DIM][LIBMESH_DIM], work[10];
997 PetscReal w[LIBMESH_DIM];
998 PetscBLASInt nd = LIBMESH_DIM, lwork = 10, info;
999
1000 c = a.transpose() * a;
1001
1002 for (const auto i : make_range(Moose::dim))
1003 for (const auto j : make_range(Moose::dim))
1004 cmat[i][j] = c(i, j);
1005
1006 LAPACKsyev_("V", "U", &nd, &cmat[0][0], &nd, w, work, &lwork, &info);
1007
1008 if (info != 0)
1009 mooseError("FiniteStrainCrystalPLasticity: DSYEV function call in getMatRot function failed");
1010
1011 diag.zero();
1012
1013 for (const auto i : make_range(Moose::dim))
1014 diag(i, i) = std::sqrt(w[i]);
1015
1016 for (const auto i : make_range(Moose::dim))
1017 for (const auto j : make_range(Moose::dim))
1018 evec(i, j) = cmat[i][j];
1019
1020 rot = a * ((evec.transpose() * diag * evec).inverse());
1021
1022 return rot;
1023}
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
void inverse(const std::vector< std::vector< Real > > &m, std::vector< std::vector< Real > > &m_inv)
MPI_Info info

Referenced by FiniteStrainCrystalPlasticity::get_current_rotation().

◆ getSlipIncrements()

void FiniteStrainCPSlipRateRes::getSlipIncrements ( )
protectedvirtual

This function updates the slip system resistances.

Reimplemented from FiniteStrainCrystalPlasticity.

Definition at line 231 of file FiniteStrainCPSlipRateRes.C.

232{
234
235 if (_err_tol)
236 return;
237
238 _dslipdtau *= 1.0 / _dt;
239
240 for (unsigned int i = 0; i < _nss; ++i)
241 _dsliprate_dgss(i) = -_a0(i) / _xm(i) *
242 std::pow(std::abs(_tau(i) / _gss_tmp[i]), 1.0 / _xm(i) - 1.0) * _tau(i) /
243 std::pow(_gss_tmp[i], 2.0);
244}

Referenced by calcResidualSlipRate().

◆ getSlipSystems()

void FiniteStrainCrystalPlasticity::getSlipSystems ( )
protectedvirtualinherited

This function reads slip system from file - see test.

Definition at line 426 of file FiniteStrainCrystalPlasticity.C.

427{
428 Real vec[LIBMESH_DIM];
429 std::ifstream fileslipsys;
430
432
433 fileslipsys.open(_slip_sys_file_name.c_str());
434
435 for (unsigned int i = 0; i < _nss; ++i)
436 {
437 // Read the slip normal
438 for (const auto j : make_range(Moose::dim))
439 if (!(fileslipsys >> vec[j]))
440 mooseError("Crystal Plasticity Error: Premature end of file reading slip system file \n");
441
442 // Normalize the vectors
443 Real mag;
444 mag = Utility::pow<2>(vec[0]) + Utility::pow<2>(vec[1]) + Utility::pow<2>(vec[2]);
445 mag = std::sqrt(mag);
446
447 for (unsigned j = 0; j < LIBMESH_DIM; ++j)
448 _no(i * LIBMESH_DIM + j) = vec[j] / mag;
449
450 // Read the slip direction
451 for (const auto j : make_range(Moose::dim))
452 if (!(fileslipsys >> vec[j]))
453 mooseError("Crystal Plasticity Error: Premature end of file reading slip system file \n");
454
455 // Normalize the vectors
456 mag = Utility::pow<2>(vec[0]) + Utility::pow<2>(vec[1]) + Utility::pow<2>(vec[2]);
457 mag = std::sqrt(mag);
458
459 for (const auto j : make_range(Moose::dim))
460 _mo(i * LIBMESH_DIM + j) = vec[j] / mag;
461
462 mag = 0.0;
463 for (const auto j : make_range(Moose::dim))
464 mag += _mo(i * LIBMESH_DIM + j) * _no(i * LIBMESH_DIM + j);
465
466 if (std::abs(mag) > 1e-8)
468 "Crystal Plasicity Error: Slip direction and normal not orthonormal, System number = ",
469 i,
470 "\n");
471
473 for (unsigned int j = 0; j < _num_slip_sys_props; ++j)
474 if (!(fileslipsys >> _slip_sys_props(i * _num_slip_sys_props + j)))
475 mooseError("Crystal Plasticity Error: Premature end of file reading slip system file - "
476 "check in slip system file read input options/values\n");
477 }
478
479 fileslipsys.close();
480}
unsigned int _num_slip_sys_props
Number of slip system specific properties provided in the file containing slip system normals and dir...
std::string _slip_sys_file_name
File should contain slip plane normal and direction. See test.
bool checkFileReadable(const std::string &filename, bool check_line_endings, bool throw_on_unreadable, bool check_for_git_lfs_pointer)
if(subdm)

Referenced by FiniteStrainCrystalPlasticity::FiniteStrainCrystalPlasticity().

◆ initAdditionalProps()

void FiniteStrainCrystalPlasticity::initAdditionalProps ( )
protectedvirtualinherited

This function initializes additional parameters.

Definition at line 484 of file FiniteStrainCrystalPlasticity.C.

485{
486}

Referenced by FiniteStrainCrystalPlasticity::initQpStatefulProperties().

◆ initQpStatefulProperties()

void FiniteStrainCrystalPlasticity::initQpStatefulProperties ( )
protectedvirtualinherited

This function initializes the stateful properties such as stress, plastic deformation gradient, slip system resistances, etc.

Reimplemented from ComputeGeneralStressBase.

Definition at line 191 of file FiniteStrainCrystalPlasticity.C.

192{
193 _stress[_qp].zero();
194
195 _fp[_qp].setToIdentity();
196
197 _pk2[_qp].zero();
198 _acc_slip[_qp] = 0.0;
199 _lag_e[_qp].zero();
200
201 _update_rot[_qp].setToIdentity();
202
203 initSlipSysProps(); // Initializes slip system related properties
205}
MaterialProperty< RankTwoTensor > & _fp
virtual void initSlipSysProps()
This function initializes slip system resistances.
MaterialProperty< RankTwoTensor > & _lag_e
MaterialProperty< RankTwoTensor > & _update_rot
virtual void initAdditionalProps()
This function initializes additional parameters.
MaterialProperty< RankTwoTensor > & _pk2

◆ initSlipSysProps()

void FiniteStrainCrystalPlasticity::initSlipSysProps ( )
protectedvirtualinherited

This function initializes slip system resistances.

Definition at line 208 of file FiniteStrainCrystalPlasticity.C.

209{
210 switch (_intvar_read_type)
211 {
212 case 0:
214 break;
215 case 1:
217 break;
218 default:
220 }
221
222 if (_slip_sys_flow_prop_file_name.length() != 0)
224 else
226
227 if (_slip_sys_hard_prop_file_name.length() != 0)
229 else
231}
virtual void readFileHardnessParams()
This function read hardness parameters from file.
virtual void getFlowRateParams()
This function assign flow rate parameters - see test.
virtual void getInitSlipSysRes()
This function assign slip system resistances - see test.
std::string _slip_sys_hard_prop_file_name
The hardening parameters in this class are read from .i file. The user can override to read from file...
virtual void readFileFlowRateParams()
This function read flow rate parameters from file - see test.
MooseEnum _intvar_read_type
Read from options for initial values of internal variables.
std::string _slip_sys_flow_prop_file_name
File should contain values of the flow rate equation parameters.
virtual void assignSlipSysRes()
This function assign initial values of slip system resistances/internal variables read from getSlipSy...
virtual void getHardnessParams()
This function assign flow rate parameters from .i file - see test.
virtual void readFileInitSlipSysRes()
This function read slip system resistances from file - see test.

Referenced by FiniteStrainCrystalPlasticity::initQpStatefulProperties().

◆ internalVariableUpdateNRiteration()

void FiniteStrainCrystalPlasticity::internalVariableUpdateNRiteration ( )
protectedinherited

This function updates internal variables after each NewTon Raphson iteration (_fp_inv)

Definition at line 1210 of file FiniteStrainCrystalPlasticity.C.

1211{
1212 _fp_prev_inv = _fp_inv; // update _fp_prev_inv
1213}

Referenced by FiniteStrainCrystalPlasticity::solveStress().

◆ line_search_update()

bool FiniteStrainCrystalPlasticity::line_search_update ( const Real  rnorm_prev,
const RankTwoTensor  dpk2 
)
protectedinherited

This function performs the line search update.

Definition at line 1127 of file FiniteStrainCrystalPlasticity.C.

1128{
1129 if (_lsrch_method == "CUT_HALF")
1130 {
1131 Real rnorm;
1132 RankTwoTensor resid;
1133 Real step = 1.0;
1134
1135 do
1136 {
1137 _pk2_tmp = _pk2_tmp - step * dpk2;
1138 step /= 2.0;
1139 _pk2_tmp = _pk2_tmp + step * dpk2;
1140
1141 calcResidual(resid);
1142 rnorm = resid.L2norm();
1143 } while (rnorm > rnorm_prev && step > _min_lsrch_step);
1144
1145 if (rnorm > rnorm_prev && step <= _min_lsrch_step)
1146 return false;
1147
1148 return true;
1149 }
1150 else if (_lsrch_method == "BISECTION")
1151 {
1152 unsigned int count = 0;
1153 Real step_a = 0.0;
1154 Real step_b = 1.0;
1155 Real step = 1.0;
1156 Real s_m = 1000.0;
1157 Real rnorm = 1000.0;
1158
1159 RankTwoTensor resid;
1160 calcResidual(resid);
1161 Real s_b = resid.doubleContraction(dpk2);
1162 Real rnorm1 = resid.L2norm();
1163 _pk2_tmp = _pk2_tmp - dpk2;
1164 calcResidual(resid);
1165 Real s_a = resid.doubleContraction(dpk2);
1166 Real rnorm0 = resid.L2norm();
1167 _pk2_tmp = _pk2_tmp + dpk2;
1168
1169 if ((rnorm1 / rnorm0) < _lsrch_tol || s_a * s_b > 0)
1170 {
1171 calcResidual(resid);
1172 return true;
1173 }
1174
1175 while ((rnorm / rnorm0) > _lsrch_tol && count < _lsrch_max_iter)
1176 {
1177 _pk2_tmp = _pk2_tmp - step * dpk2;
1178 step = 0.5 * (step_b + step_a);
1179 _pk2_tmp = _pk2_tmp + step * dpk2;
1180 calcResidual(resid);
1181 s_m = resid.doubleContraction(dpk2);
1182 rnorm = resid.L2norm();
1183
1184 if (s_m * s_a < 0.0)
1185 {
1186 step_b = step;
1187 s_b = s_m;
1188 }
1189 if (s_m * s_b < 0.0)
1190 {
1191 step_a = step;
1192 s_a = s_m;
1193 }
1194 count++;
1195 }
1196
1197 if ((rnorm / rnorm0) < _lsrch_tol && count < _lsrch_max_iter)
1198 return true;
1199
1200 return false;
1201 }
1202 else
1203 {
1204 mooseError("Line search meothod is not provided.");
1205 return false;
1206 }
1207}
unsigned int count
unsigned int _lsrch_max_iter
Line search bisection method maximum iteration number.
Real _lsrch_tol
Line search bisection method tolerance.
Real _min_lsrch_step
Minimum line search step size.

Referenced by FiniteStrainCrystalPlasticity::solveStress().

◆ lineSearchUpdateSlipRate()

bool FiniteStrainCPSlipRateRes::lineSearchUpdateSlipRate ( const Real  rnorm_prev,
const DenseVector< Real > &  update 
)
protected

This function performs the line search update.

Definition at line 272 of file FiniteStrainCPSlipRateRes.C.

274{
275 if (_lsrch_method == "CUT_HALF")
276 {
277 Real rnorm;
278 Real step = 1.0;
279 do
280 {
281 for (unsigned int i = 0; i < update.size(); ++i)
282 _slip_rate(i) += step * update(i);
283
284 step /= 2.0;
285
286 for (unsigned int i = 0; i < update.size(); ++i)
287 _slip_rate(i) -= step * update(i);
288
290 if (_err_tol)
291 return false;
292 rnorm = calcResidNorm();
293 } while (rnorm > rnorm_prev && step > _min_lsrch_step);
294
295 if (rnorm > rnorm_prev && step <= _min_lsrch_step)
296 return false;
297
298 return true;
299 }
300 else if (_lsrch_method == "BISECTION")
301 {
302 unsigned int count = 0;
303 Real step_a = 0.0;
304 Real step_b = 1.0;
305 Real step = 1.0;
306 Real s_m = 1000.0;
307 Real rnorm = 1000.0;
308
309 Real s_b = calcResidDotProdUpdate(update);
310 Real rnorm1 = calcResidNorm();
311
312 for (unsigned int i = 0; i < update.size(); ++i)
313 _slip_rate(i) += update(i);
314
316 Real s_a = calcResidDotProdUpdate(update);
317 Real rnorm0 = calcResidNorm();
318
319 for (unsigned int i = 0; i < update.size(); ++i)
320 _slip_rate(i) -= update(i);
321
322 if ((rnorm1 / rnorm0) < _lsrch_tol || s_a * s_b > 0)
323 {
325 return true;
326 }
327
328 while ((rnorm / rnorm0) > _lsrch_tol && count < _lsrch_max_iter)
329 {
330
331 for (unsigned int i = 0; i < update.size(); ++i)
332 _slip_rate(i) += step * update(i);
333
334 step = 0.5 * (step_a + step_b);
335
336 for (unsigned int i = 0; i < update.size(); ++i)
337 _slip_rate(i) -= step * update(i);
338
340 s_m = calcResidDotProdUpdate(update);
341 rnorm = calcResidNorm();
342
343 if (s_m * s_a < 0.0)
344 {
345 step_b = step;
346 s_b = s_m;
347 }
348 if (s_m * s_b < 0.0)
349 {
350 step_a = step;
351 s_a = s_m;
352 }
353 count++;
354 }
355
356 if ((rnorm / rnorm0) < _lsrch_tol && count < _lsrch_max_iter)
357 return true;
358
359 return false;
360 }
361 else
362 {
363 mooseError("Line search meothod is not provided.");
364 return false;
365 }
366}
virtual Real calcResidNorm()
This function calculates the residual norm.
Real calcResidDotProdUpdate(const DenseVector< Real > &)
This function calculates the dot product of residual and update.

Referenced by solveStress().

◆ postSolveQp()

void FiniteStrainCrystalPlasticity::postSolveQp ( )
protectedvirtualinherited

This function update stress and internal variable after solve.

Definition at line 588 of file FiniteStrainCrystalPlasticity.C.

589{
590 if (_err_tol)
591 {
592 _err_tol = false;
594 {
596 _rndm_scale_var = _elasticity_tensor[_qp](0, 0, 0, 0);
597
599 }
600 else
601 mooseError("FiniteStrainCrystalPlasticity: Constitutive failure");
602 }
603 else
604 {
605 _stress[_qp] = _fe * _pk2[_qp] * _fe.transpose() / _fe.det();
606
607 _Jacobian_mult[_qp] += calcTangentModuli(); // Calculate jacobian for preconditioner
608
610
611 _lag_e[_qp] = _deformation_gradient[_qp].transpose() * _deformation_gradient[_qp] - iden;
612 _lag_e[_qp] = _lag_e[_qp] * 0.5;
613
614 RankTwoTensor rot;
615 rot = get_current_rotation(_deformation_gradient[_qp]); // Calculate material rotation
616 _update_rot[_qp] = rot * _crysrot[_qp];
617 }
618}
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
RankTwoTensor get_current_rotation(const RankTwoTensor &a)
This function perform RU decomposition to obtain the rotation tensor.
virtual RankFourTensor calcTangentModuli()
This function calculate the tangent moduli for preconditioner.
bool _input_rndm_scale_var
Input option for scaling variable to generate random stress when convergence fails.
static RankTwoTensorTempl< T > genRandomSymmTensor(T stddev, T mean)

Referenced by FiniteStrainCrystalPlasticity::computeQpStress().

◆ postSolveStatevar()

void FiniteStrainCrystalPlasticity::postSolveStatevar ( )
protectedvirtualinherited

This function update internal variable after solve.

Definition at line 683 of file FiniteStrainCrystalPlasticity.C.

684{
685 if (_max_substep_iter == 1) // No substepping
686 {
687 _gss[_qp] = _gss_tmp;
688 _acc_slip[_qp] = _accslip_tmp;
689 }
690 else
691 {
692 if (_last_step_iter)
693 {
694 _gss[_qp] = _gss_tmp;
695 _acc_slip[_qp] = _accslip_tmp;
696 }
697 else
698 {
701 }
702 }
703}

Referenced by FiniteStrainCrystalPlasticity::solveQp().

◆ postSolveStress()

void FiniteStrainCrystalPlasticity::postSolveStress ( )
protectedvirtualinherited

This function update stress and plastic deformation gradient after solve.

Definition at line 802 of file FiniteStrainCrystalPlasticity.C.

803{
804 if (_max_substep_iter == 1) // No substepping
805 {
806 _fp[_qp] = _fp_inv.inverse();
807 _pk2[_qp] = _pk2_tmp;
808 }
809 else
810 {
811 if (_last_step_iter)
812 {
813 _fp[_qp] = _fp_inv.inverse();
814 _pk2[_qp] = _pk2_tmp;
815 }
816 else
817 {
820 }
821 }
822}
RankTwoTensorTempl< T > inverse() const

Referenced by solveStatevar(), and FiniteStrainCrystalPlasticity::solveStatevar().

◆ preSolveQp()

void FiniteStrainCrystalPlasticity::preSolveQp ( )
protectedvirtualinherited

This function set variables for stress and internal variable solve.

Definition at line 560 of file FiniteStrainCrystalPlasticity.C.

561{
562 // Initialize variable
563 if (_first_substep)
564 {
565 _Jacobian_mult[_qp].zero(); // Initializes jacobian for preconditioner
567 }
568
569 if (_max_substep_iter == 1)
570 _dfgrd_tmp = _deformation_gradient[_qp]; // Without substepping
571 else
573
574 _err_tol = false;
575}
void calc_schmid_tensor()
This function calculate the Schmid tensor.

Referenced by FiniteStrainCrystalPlasticity::computeQpStress().

◆ preSolveStatevar()

void FiniteStrainCrystalPlasticity::preSolveStatevar ( )
protectedvirtualinherited

This function set variables for internal variable solve.

Definition at line 621 of file FiniteStrainCrystalPlasticity.C.

622{
623 if (_max_substep_iter == 1) // No substepping
624 {
625 _gss_tmp = _gss_old[_qp];
627 }
628 else
629 {
631 {
634 }
635 else
637 }
638}
const MaterialProperty< std::vector< Real > > & _gss_old
const MaterialProperty< Real > & _acc_slip_old

Referenced by FiniteStrainCrystalPlasticity::solveQp().

◆ preSolveStress()

void FiniteStrainCPSlipRateRes::preSolveStress ( )
protectedvirtual

This function sets variable for internal variable solve.

Reimplemented from FiniteStrainCrystalPlasticity.

Definition at line 45 of file FiniteStrainCPSlipRateRes.C.

46{
48 _slip_rate.zero();
49}
virtual void preSolveStress()
This function set variables for stress solve.

Referenced by solveStatevar().

◆ readFileFlowRateParams()

void FiniteStrainCrystalPlasticity::readFileFlowRateParams ( )
protectedvirtualinherited

This function read flow rate parameters from file - see test.

Definition at line 315 of file FiniteStrainCrystalPlasticity.C.

316{
317 _a0.resize(_nss);
318 _xm.resize(_nss);
319
321
322 std::ifstream file;
323 file.open(_slip_sys_flow_prop_file_name.c_str());
324
325 std::vector<Real> vec;
327
328 for (unsigned int i = 0; i < _nss; ++i)
329 {
330 for (unsigned int j = 0; j < _num_slip_sys_flowrate_props; ++j)
331 if (!(file >> vec[j]))
333 "Error FiniteStrainCrystalPlasticity: Premature end of slip_sys_flow_rate_param file");
334
335 _a0(i) = vec[0];
336 _xm(i) = vec[1];
337 }
338
339 file.close();
340}

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ readFileHardnessParams()

void FiniteStrainCrystalPlasticity::readFileHardnessParams ( )
protectedvirtualinherited

This function read hardness parameters from file.

Definition at line 406 of file FiniteStrainCrystalPlasticity.C.

407{
408}

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ readFileInitSlipSysRes()

void FiniteStrainCrystalPlasticity::readFileInitSlipSysRes ( )
protectedvirtualinherited

This function read slip system resistances from file - see test.

Definition at line 244 of file FiniteStrainCrystalPlasticity.C.

245{
246 _gss[_qp].resize(_nss);
247
249
250 std::ifstream file;
251 file.open(_slip_sys_res_prop_file_name.c_str());
252
253 for (unsigned int i = 0; i < _nss; ++i)
254 if (!(file >> _gss[_qp][i]))
255 mooseError("Error FiniteStrainCrystalPlasticity: Premature end of slip_sys_res_prop file");
256
257 file.close();
258}
std::string _slip_sys_res_prop_file_name
File should contain initial values of the slip system resistances.

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ solveQp()

void FiniteStrainCrystalPlasticity::solveQp ( )
protectedvirtualinherited

This function solves stress and internal variables.

Definition at line 578 of file FiniteStrainCrystalPlasticity.C.

579{
582 if (_err_tol)
583 return;
585}
virtual void solveStatevar()
This function solves internal variables.
virtual void preSolveStatevar()
This function set variables for internal variable solve.
virtual void postSolveStatevar()
This function update internal variable after solve.

Referenced by FiniteStrainCrystalPlasticity::computeQpStress().

◆ solveStatevar()

void FiniteStrainCPSlipRateRes::solveStatevar ( )
protectedvirtual

This function solves internal variables.

Reimplemented from FiniteStrainCrystalPlasticity.

Definition at line 35 of file FiniteStrainCPSlipRateRes.C.

36{
39 if (_err_tol)
40 return;
42}
virtual void solveStress()
This function solves for stress, updates plastic deformation gradient.
virtual void preSolveStress()
This function sets variable for internal variable solve.
virtual void postSolveStress()
This function update stress and plastic deformation gradient after solve.

◆ solveStress()

void FiniteStrainCPSlipRateRes::solveStress ( )
protectedvirtual

This function solves for stress, updates plastic deformation gradient.

Reimplemented from FiniteStrainCrystalPlasticity.

Definition at line 52 of file FiniteStrainCPSlipRateRes.C.

53{
54 Real rnorm, rnorm0, rnorm_prev;
55 unsigned int iter = 0;
56
57#ifdef DEBUG
58 std::vector<Real> rnormst(_maxiter + 1), slipratest(_maxiter + 1); // Use for Debugging
59#endif
60
62 if (_err_tol)
63 return;
64 rnorm = calcResidNorm();
65 rnorm0 = rnorm;
66
67#ifdef DEBUG
68 rnormst[iter] = rnorm;
69 Real slipratemax = 0.0;
70 for (unsigned int i = 0; i < _nss; ++i)
71 if (std::abs(_slip_rate(i)) > slipratemax)
72 slipratemax = std::abs(_slip_rate(i));
73 slipratest[iter] = slipratemax;
74#endif
75
76 while (rnorm > _rtol * rnorm0 && rnorm0 > _abs_tol && iter < _maxiter)
77 {
78 calcUpdate();
79
80 DenseVector<Real> update = _resid;
81
82 _slip_rate -= update;
83
85 if (_err_tol)
86 return;
87 rnorm_prev = rnorm;
88 rnorm = calcResidNorm();
89
90 if (_use_line_search && rnorm > rnorm_prev && !lineSearchUpdateSlipRate(rnorm_prev, update))
91 {
92#ifdef DEBUG
93 mooseWarning("FiniteStrainCrystalPLasticity: Failed with line search");
94#endif
95 _err_tol = true;
96 return;
97 }
98
100
102 rnorm = calcResidNorm();
103 iter++;
104
105#ifdef DEBUG
106 slipratemax = 0.0;
107 for (unsigned int i = 0; i < _nss; ++i)
108 if (std::abs(_slip_rate(i)) > slipratemax)
109 slipratemax = std::abs(_slip_rate(i));
110 rnormst[iter] = rnorm;
111 slipratest[iter] = slipratemax;
112#endif
113 }
114
115 if (iter == _maxiter)
116 {
117#ifdef DEBUG
118 mooseWarning("FiniteStrainCPSlipRateRes: NR exceeds maximum iteration ", iter, " ", rnorm);
119#endif
120 _err_tol = true;
121 return;
122 }
123}
virtual void calcResidJacobSlipRate()
This function calculates residual and jacobian of slip rate.
void calcUpdate()
This function calculates and updates the residual of slip rate.
bool lineSearchUpdateSlipRate(const Real, const DenseVector< Real > &)
This function performs the line search update.
Real _rtol
Stress residual equation relative tolerance.
unsigned int _maxiter
Maximum number of iterations for stress update.
Real _abs_tol
Stress residual equation absolute tolerance.
bool _use_line_search
Flag to activate line serach.

Referenced by solveStatevar().

◆ update_slip_system_resistance()

void FiniteStrainCrystalPlasticity::update_slip_system_resistance ( )
protectedvirtualinherited

This function updates the slip system resistances.

Definition at line 826 of file FiniteStrainCrystalPlasticity.C.

827{
828 updateGss();
829}
virtual void updateGss()
This function updates the slip system resistances.

Referenced by calcResidualSlipRate(), and FiniteStrainCrystalPlasticity::solveStatevar().

◆ updateGss()

void FiniteStrainCrystalPlasticity::updateGss ( )
protectedvirtualinherited

This function updates the slip system resistances.

Old function to update slip system resistances.

Kept to avoid code break at computeQpstress

Definition at line 836 of file FiniteStrainCrystalPlasticity.C.

837{
838 DenseVector<Real> hb(_nss);
839 Real qab;
840
841 Real a = _hprops[4]; // Kalidindi
842
844 for (unsigned int i = 0; i < _nss; ++i)
845 _accslip_tmp += std::abs(_slip_incr(i));
846
847 // Real val = std::cosh(_h0 * _accslip_tmp / (_tau_sat - _tau_init)); // Karthik
848 // val = _h0 * std::pow(1.0/val,2.0); // Kalidindi
849
850 for (unsigned int i = 0; i < _nss; ++i)
851 // hb(i)=val;
852 hb(i) = _h0 * std::pow(std::abs(1.0 - _gss_tmp[i] / _tau_sat), a) *
853 std::copysign(1.0, 1.0 - _gss_tmp[i] / _tau_sat);
854
855 for (unsigned int i = 0; i < _nss; ++i)
856 {
857 if (_max_substep_iter == 1) // No substepping
858 _gss_tmp[i] = _gss_old[_qp][i];
859 else
860 _gss_tmp[i] = _gss_tmp_old[i];
861
862 for (unsigned int j = 0; j < _nss; ++j)
863 {
864 unsigned int iplane, jplane;
865 iplane = i / 3;
866 jplane = j / 3;
867
868 if (iplane == jplane) // Kalidindi
869 qab = 1.0;
870 else
871 qab = _r;
872
873 _gss_tmp[i] += qab * hb(j) * std::abs(_slip_incr(j));
874 _dgss_dsliprate(i, j) = qab * hb(j) * std::copysign(1.0, _slip_incr(j)) * _dt;
875 }
876 }
877}

Referenced by FiniteStrainCrystalPlasticity::update_slip_system_resistance().

◆ validParams()

InputParameters FiniteStrainCPSlipRateRes::validParams ( )
static

Definition at line 16 of file FiniteStrainCPSlipRateRes.C.

17{
19 params.addClassDescription("Deprecated class: please use CrystalPlasticityKalidindiUpdate and "
20 "ComputeMultipleCrystalPlasticityStress instead.");
21 return params;
22}
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _a0

DenseVector<Real> FiniteStrainCrystalPlasticity::_a0
protectedinherited

◆ _abs_tol

Real FiniteStrainCrystalPlasticity::_abs_tol
protectedinherited

Stress residual equation absolute tolerance.

Definition at line 247 of file FiniteStrainCrystalPlasticity.h.

Referenced by solveStress(), and FiniteStrainCrystalPlasticity::solveStress().

◆ _acc_slip

MaterialProperty<Real>& FiniteStrainCrystalPlasticity::_acc_slip
protectedinherited

◆ _acc_slip_old

const MaterialProperty<Real>& FiniteStrainCrystalPlasticity::_acc_slip_old
protectedinherited

◆ _accslip_tmp

Real FiniteStrainCrystalPlasticity::_accslip_tmp
protectedinherited

◆ _accslip_tmp_old

Real FiniteStrainCrystalPlasticity::_accslip_tmp_old
protectedinherited

◆ _base_name

const std::string ComputeGeneralStressBase::_base_name
protectedinherited

Base name prepended to all material property names to allow for multi-material systems.

Definition at line 43 of file ComputeGeneralStressBase.h.

Referenced by ComputeCosseratLinearElasticStress::initialSetup(), and ComputeLinearElasticStress::initialSetup().

◆ _crysrot

const MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_crysrot
protectedinherited

◆ _deformation_gradient

const MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_deformation_gradient
protectedinherited

◆ _deformation_gradient_old

const MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_deformation_gradient_old
protectedinherited

◆ _delta_dfgrd

RankTwoTensor FiniteStrainCrystalPlasticity::_delta_dfgrd
protectedinherited

Flag to check whether convergence is achieved.

Used for substepping; Uniformly divides the increment in deformation gradient

Definition at line 349 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::computeQpStress(), FiniteStrainCrystalPlasticity::FiniteStrainCrystalPlasticity(), and FiniteStrainCrystalPlasticity::preSolveQp().

◆ _dfgrd_scale_factor

Real FiniteStrainCrystalPlasticity::_dfgrd_scale_factor
protectedinherited

Scales the substepping increment to obtain deformation gradient at a substep iteration.

Definition at line 351 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::computeQpStress(), and FiniteStrainCrystalPlasticity::preSolveQp().

◆ _dfgrd_tmp

RankTwoTensor FiniteStrainCrystalPlasticity::_dfgrd_tmp
protectedinherited

◆ _dfgrd_tmp_old

RankTwoTensor FiniteStrainCrystalPlasticity::_dfgrd_tmp_old
protectedinherited

◆ _dgss_dsliprate

DenseMatrix<Real> FiniteStrainCrystalPlasticity::_dgss_dsliprate
protectedinherited

◆ _dslipdtau

DenseVector<Real> FiniteStrainCrystalPlasticity::_dslipdtau
protectedinherited

◆ _dsliprate_dgss

DenseVector<Real> FiniteStrainCPSlipRateRes::_dsliprate_dgss
protected

Definition at line 91 of file FiniteStrainCPSlipRateRes.h.

Referenced by calcDgssDsliprate(), and getSlipIncrements().

◆ _dsliprate_dsliprate

DenseMatrix<Real> FiniteStrainCPSlipRateRes::_dsliprate_dsliprate
protected

◆ _elastic_strain

MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_elastic_strain
protectedinherited

◆ _elasticity_tensor

const MaterialProperty<RankFourTensor>& FiniteStrainCrystalPlasticity::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_name

const std::string FiniteStrainCrystalPlasticity::_elasticity_tensor_name
protectedinherited

Name of the elasticity tensor material property.

Definition at line 314 of file FiniteStrainCrystalPlasticity.h.

◆ _err_tol

bool FiniteStrainCrystalPlasticity::_err_tol
protectedinherited

◆ _extra_stress

const MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_extra_stress
protectedinherited

Extra stress tensor.

Definition at line 53 of file ComputeGeneralStressBase.h.

Referenced by ComputeGeneralStressBase::computeQpProperties().

◆ _fe

RankTwoTensor FiniteStrainCrystalPlasticity::_fe
protectedinherited

◆ _first_step_iter

bool FiniteStrainCrystalPlasticity::_first_step_iter
protectedinherited

◆ _first_substep

bool FiniteStrainCrystalPlasticity::_first_substep
protectedinherited

◆ _flowprops

std::vector<Real> FiniteStrainCrystalPlasticity::_flowprops
protectedinherited

◆ _fp

MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_fp
protectedinherited

◆ _fp_inv

RankTwoTensor FiniteStrainCrystalPlasticity::_fp_inv
protectedinherited

◆ _fp_old

const MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_fp_old
protectedinherited

◆ _fp_old_inv

RankTwoTensor FiniteStrainCrystalPlasticity::_fp_old_inv
protectedinherited

◆ _fp_prev_inv

RankTwoTensor FiniteStrainCrystalPlasticity::_fp_prev_inv
protectedinherited

◆ _gen_rndm_stress_flag

bool FiniteStrainCrystalPlasticity::_gen_rndm_stress_flag
protectedinherited

◆ _gprops

std::vector<Real> FiniteStrainCrystalPlasticity::_gprops
protectedinherited

◆ _gss

MaterialProperty<std::vector<Real> >& FiniteStrainCrystalPlasticity::_gss
protectedinherited

◆ _gss_old

const MaterialProperty<std::vector<Real> >& FiniteStrainCrystalPlasticity::_gss_old
protectedinherited

◆ _gss_tmp

std::vector<Real> FiniteStrainCrystalPlasticity::_gss_tmp
protectedinherited

◆ _gss_tmp_old

std::vector<Real> FiniteStrainCrystalPlasticity::_gss_tmp_old
protectedinherited

◆ _gtol

Real FiniteStrainCrystalPlasticity::_gtol
protectedinherited

Internal variable update equation tolerance.

Definition at line 249 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::solveStatevar().

◆ _h0

Real FiniteStrainCrystalPlasticity::_h0
protectedinherited

◆ _hprops

std::vector<Real> FiniteStrainCrystalPlasticity::_hprops
protectedinherited

◆ _initial_stress_fcn

std::vector<const Function *> ComputeGeneralStressBase::_initial_stress_fcn
protectedinherited

initial stress components

Definition at line 56 of file ComputeGeneralStressBase.h.

◆ _input_rndm_scale_var

bool FiniteStrainCrystalPlasticity::_input_rndm_scale_var
protectedinherited

Input option for scaling variable to generate random stress when convergence fails.

Definition at line 273 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::postSolveQp().

◆ _intvar_read_type

MooseEnum FiniteStrainCrystalPlasticity::_intvar_read_type
protectedinherited

Read from options for initial values of internal variables.

Definition at line 265 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::FiniteStrainCrystalPlasticity(), and FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ _jacob

DenseMatrix<Real> FiniteStrainCPSlipRateRes::_jacob
protected

Definition at line 92 of file FiniteStrainCPSlipRateRes.h.

Referenced by calcJacobianSlipRate(), and calcUpdate().

◆ _Jacobian_mult

MaterialProperty<RankFourTensor>& ComputeGeneralStressBase::_Jacobian_mult
protectedinherited

derivative of stress w.r.t. strain (_dstress_dstrain)

Definition at line 59 of file ComputeGeneralStressBase.h.

Referenced by ComputeStrainIncrementBasedStress::computeQpJacobian(), FiniteStrainHyperElasticViscoPlastic::computeQpJacobian(), ComputeMultipleInelasticStressBase::computeQpJacobianMult(), ComputeMultipleInelasticCosseratStress::computeQpJacobianMult(), ComputeMultiPlasticityStress::computeQpStress(), FiniteStrainPlasticMaterial::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), ComputeLinearElasticPFFractureStress::computeQpStress(), ComputeLinearElasticStress::computeQpStress(), ComputeLinearViscoelasticStress::computeQpStress(), ComputeMultipleInelasticStressBase::computeQpStress(), ComputeSmearedCrackingStress::computeQpStress(), ComputeMultipleCrystalPlasticityStress::computeQpStress(), ComputeMultipleInelasticStressBase::computeQpStressIntermediateConfiguration(), ComputeLinearElasticPFFractureStress::computeStrainSpectral(), ComputeLinearElasticPFFractureStress::computeStrainVolDev(), ComputeLinearElasticPFFractureStress::computeStressSpectral(), FiniteStrainUObasedCP::elasticTangentModuli(), FiniteStrainUObasedCP::elastoPlasticTangentModuli(), ComputeMultipleInelasticStressBase::finiteStrainRotation(), ComputeMultiPlasticityStress::postReturnMap(), FiniteStrainCrystalPlasticity::postSolveQp(), FiniteStrainCrystalPlasticity::preSolveQp(), and ComputeMultipleInelasticStressBase::updateQpStateSingleModel().

◆ _lag_e

MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_lag_e
protectedinherited

◆ _lag_e_old

const MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_lag_e_old
protectedinherited

Definition at line 304 of file FiniteStrainCrystalPlasticity.h.

◆ _last_step_iter

bool FiniteStrainCrystalPlasticity::_last_step_iter
protectedinherited

◆ _lsrch_max_iter

unsigned int FiniteStrainCrystalPlasticity::_lsrch_max_iter
protectedinherited

Line search bisection method maximum iteration number.

Definition at line 294 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::line_search_update(), and lineSearchUpdateSlipRate().

◆ _lsrch_method

MooseEnum FiniteStrainCrystalPlasticity::_lsrch_method
protectedinherited

◆ _lsrch_tol

Real FiniteStrainCrystalPlasticity::_lsrch_tol
protectedinherited

Line search bisection method tolerance.

Definition at line 291 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::line_search_update(), and lineSearchUpdateSlipRate().

◆ _max_substep_iter

unsigned int FiniteStrainCrystalPlasticity::_max_substep_iter
protectedinherited

◆ _maxiter

unsigned int FiniteStrainCrystalPlasticity::_maxiter
protectedinherited

Maximum number of iterations for stress update.

Definition at line 254 of file FiniteStrainCrystalPlasticity.h.

Referenced by solveStress(), and FiniteStrainCrystalPlasticity::solveStress().

◆ _maxiterg

unsigned int FiniteStrainCrystalPlasticity::_maxiterg
protectedinherited

Maximum number of iterations for internal variable update.

Definition at line 256 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::solveStatevar().

◆ _mechanical_strain

const MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_mechanical_strain
protectedinherited

◆ _min_lsrch_step

Real FiniteStrainCrystalPlasticity::_min_lsrch_step
protectedinherited

Minimum line search step size.

Definition at line 288 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::line_search_update(), and lineSearchUpdateSlipRate().

◆ _mo

DenseVector<Real> FiniteStrainCrystalPlasticity::_mo
protectedinherited

◆ _no

DenseVector<Real> FiniteStrainCrystalPlasticity::_no
protectedinherited

◆ _nss

const unsigned int FiniteStrainCrystalPlasticity::_nss
protectedinherited

◆ _num_slip_sys_flowrate_props

unsigned int FiniteStrainCrystalPlasticity::_num_slip_sys_flowrate_props
protectedinherited

Number of slip system flow rate parameters.

Definition at line 259 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::getFlowRateParams(), and FiniteStrainCrystalPlasticity::readFileFlowRateParams().

◆ _num_slip_sys_props

unsigned int FiniteStrainCrystalPlasticity::_num_slip_sys_props
protectedinherited

Number of slip system specific properties provided in the file containing slip system normals and directions.

Definition at line 268 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::FiniteStrainCrystalPlasticity(), and FiniteStrainCrystalPlasticity::getSlipSystems().

◆ _pk2

MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_pk2
protectedinherited

◆ _pk2_old

const MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_pk2_old
protectedinherited

◆ _pk2_tmp

RankTwoTensor FiniteStrainCrystalPlasticity::_pk2_tmp
protectedinherited

◆ _pk2_tmp_old

RankTwoTensor FiniteStrainCrystalPlasticity::_pk2_tmp_old
protectedinherited

◆ _r

Real FiniteStrainCrystalPlasticity::_r
protectedinherited

◆ _read_from_slip_sys_file

bool FiniteStrainCrystalPlasticity::_read_from_slip_sys_file
protectedinherited

◆ _resid

DenseVector<Real> FiniteStrainCPSlipRateRes::_resid
protected

◆ _rndm_scale_var

Real FiniteStrainCrystalPlasticity::_rndm_scale_var
protectedinherited

Scaling value.

Definition at line 276 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::postSolveQp().

◆ _rndm_seed

unsigned int FiniteStrainCrystalPlasticity::_rndm_seed
protectedinherited

◆ _rtol

Real FiniteStrainCrystalPlasticity::_rtol
protectedinherited

Stress residual equation relative tolerance.

Definition at line 245 of file FiniteStrainCrystalPlasticity.h.

Referenced by solveStress(), and FiniteStrainCrystalPlasticity::solveStress().

◆ _s0

std::vector<RankTwoTensor> FiniteStrainCrystalPlasticity::_s0
protectedinherited

◆ _slip_incr

DenseVector<Real> FiniteStrainCrystalPlasticity::_slip_incr
protectedinherited

◆ _slip_incr_tol

Real FiniteStrainCrystalPlasticity::_slip_incr_tol
protectedinherited

Slip increment tolerance.

Definition at line 251 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::getSlipIncrements().

◆ _slip_rate

DenseVector<Real> FiniteStrainCPSlipRateRes::_slip_rate
protected

◆ _slip_sys_file_name

std::string FiniteStrainCrystalPlasticity::_slip_sys_file_name
protectedinherited

File should contain slip plane normal and direction. See test.

Definition at line 230 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::getSlipSystems().

◆ _slip_sys_flow_prop_file_name

std::string FiniteStrainCrystalPlasticity::_slip_sys_flow_prop_file_name
protectedinherited

File should contain values of the flow rate equation parameters.

Values for every slip system must be provided. Should have the same order of slip systens as in slip_sys_file. See test. The option of reading all the properties from .i is still present.

Definition at line 239 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps(), and FiniteStrainCrystalPlasticity::readFileFlowRateParams().

◆ _slip_sys_hard_prop_file_name

std::string FiniteStrainCrystalPlasticity::_slip_sys_hard_prop_file_name
protectedinherited

The hardening parameters in this class are read from .i file. The user can override to read from file.

Definition at line 242 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::initSlipSysProps().

◆ _slip_sys_props

DenseVector<Real> FiniteStrainCrystalPlasticity::_slip_sys_props
protectedinherited

◆ _slip_sys_res_prop_file_name

std::string FiniteStrainCrystalPlasticity::_slip_sys_res_prop_file_name
protectedinherited

File should contain initial values of the slip system resistances.

Definition at line 233 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::readFileInitSlipSysRes().

◆ _stress

MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_stress
protectedinherited

Stress material property.

Definition at line 48 of file ComputeGeneralStressBase.h.

Referenced by ComputeMultipleInelasticStressBase::computeAdmissibleState(), ComputeMultipleInelasticCosseratStress::computeAdmissibleState(), ComputeGeneralStressBase::computeQpProperties(), ComputeMultiPlasticityStress::computeQpStress(), ComputeStrainIncrementBasedStress::computeQpStress(), FiniteStrainPlasticMaterial::computeQpStress(), AbaqusUMATStress::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), ComputeLinearElasticPFFractureStress::computeQpStress(), ComputeLinearElasticStress::computeQpStress(), ComputeLinearViscoelasticStress::computeQpStress(), ComputeMultipleInelasticStressBase::computeQpStress(), ComputeSmearedCrackingStress::computeQpStress(), ComputeMultipleCrystalPlasticityStress::computeQpStress(), ComputeMultipleInelasticStressBase::computeQpStressIntermediateConfiguration(), ComputeLinearElasticPFFractureStress::computeStrainSpectral(), ComputeLinearElasticPFFractureStress::computeStrainVolDev(), ComputeLinearElasticPFFractureStress::computeStressSpectral(), ComputeCreepPlasticityStress::computeTangentOperators(), ComputeMultipleInelasticStressBase::finiteStrainRotation(), FiniteStrainCrystalPlasticity::initQpStatefulProperties(), FiniteStrainUObasedCP::initQpStatefulProperties(), FiniteStrainHyperElasticViscoPlastic::initQpStatefulProperties(), ComputeGeneralStressBase::initQpStatefulProperties(), ComputeMultiPlasticityStress::postReturnMap(), FiniteStrainCrystalPlasticity::postSolveQp(), FiniteStrainUObasedCP::postSolveQp(), FiniteStrainHyperElasticViscoPlastic::postSolveQp(), ComputeSmearedCrackingStress::updateCrackingStateAndStress(), ComputeCreepPlasticityStress::updateQpState(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStressBase::updateQpStateSingleModel().

◆ _tan_mod_type

MooseEnum FiniteStrainCrystalPlasticity::_tan_mod_type
protectedinherited

Type of tangent moduli calculation.

Definition at line 262 of file FiniteStrainCrystalPlasticity.h.

Referenced by FiniteStrainCrystalPlasticity::calcTangentModuli().

◆ _tau

DenseVector<Real> FiniteStrainCrystalPlasticity::_tau
protectedinherited

◆ _tau_init

Real FiniteStrainCrystalPlasticity::_tau_init
protectedinherited

◆ _tau_sat

Real FiniteStrainCrystalPlasticity::_tau_sat
protectedinherited

◆ _update_rot

MaterialProperty<RankTwoTensor>& FiniteStrainCrystalPlasticity::_update_rot
protectedinherited

◆ _use_line_search

bool FiniteStrainCrystalPlasticity::_use_line_search
protectedinherited

Flag to activate line serach.

Definition at line 285 of file FiniteStrainCrystalPlasticity.h.

Referenced by solveStress(), and FiniteStrainCrystalPlasticity::solveStress().

◆ _xm

DenseVector<Real> FiniteStrainCrystalPlasticity::_xm
protectedinherited

The documentation for this class was generated from the following files: