www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Attributes | List of all members
TwoParameterPlasticityStressUpdate Class Referenceabstract

TwoParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates for plastic models that describe (p, q) plasticity. More...

#include <TwoParameterPlasticityStressUpdate.h>

Inheritance diagram for TwoParameterPlasticityStressUpdate:
[legend]

Public Member Functions

 TwoParameterPlasticityStressUpdate (const InputParameters &parameters, unsigned num_yf, unsigned num_intnl)
 
void setQp (unsigned int qp)
 Sets the value of the global variable _qp for inheriting classes. More...
 
virtual bool requiresIsotropicTensor ()=0
 Does the model require the elasticity tensor to be isotropic? More...
 
virtual bool isIsotropic ()
 Is the implmented model isotropic? The safe default is 'false'. More...
 
virtual Real computeTimeStepLimit ()
 
void resetQpProperties () final
 Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten. More...
 
void resetProperties () final
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void yieldFunctionValues (Real p, Real q, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
 Computes the values of the yield functions, given p, q and intnl parameters. More...
 
void yieldFunctionValuesV (const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const override
 Computes the values of the yield functions, given stress_params and intnl parameters. More...
 
virtual void computeAllQ (Real p, Real q, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
 Completely fills all_q with correct values. More...
 
void computeAllQV (const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const override
 Completely fills all_q with correct values. More...
 
virtual void preReturnMap (Real p_trial, Real q_trial, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
 Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm. More...
 
void preReturnMapV (const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl) override
 Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm. More...
 
virtual void initializeVars (Real p_trial, Real q_trial, const std::vector< Real > &intnl_old, Real &p, Real &q, Real &gaE, std::vector< Real > &intnl) const
 Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm. More...
 
void initializeVarsV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const override
 Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm. More...
 
virtual void setIntnlValues (Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
 Sets the internal parameters based on the trial values of p and q, their current values, and the old values of the internal parameters. More...
 
void setIntnlValuesV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const override
 Sets the internal parameters based on the trial values of stress_params, their current values, and the old values of the internal parameters. More...
 
virtual void setIntnlDerivatives (Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
 Sets the derivatives of internal parameters, based on the trial values of p and q, their current values, and the old values of the internal parameters. More...
 
virtual void setIntnlDerivativesV (const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const override
 Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters. More...
 
virtual void computePQ (const RankTwoTensor &stress, Real &p, Real &q) const =0
 Computes p and q, given stress. More...
 
virtual void computeStressParams (const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
 Computes stress_params, given stress. More...
 
virtual void setEppEqq (const RankFourTensor &Eijkl, Real &Epp, Real &Eqq) const =0
 Set Epp and Eqq based on the elasticity tensor Derived classes must override this. More...
 
virtual void setEffectiveElasticity (const RankFourTensor &Eijkl) override
 Sets _Eij and _En and _Cij. More...
 
virtual void setStressAfterReturn (const RankTwoTensor &stress_trial, Real p_ok, Real q_ok, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
 Sets stress from the admissible parameters. More...
 
void setStressAfterReturnV (const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const override
 Sets stress from the admissible parameters. More...
 
void setInelasticStrainIncrementAfterReturn (const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment) const override
 Sets inelastic strain increment from the returned configuration This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called. More...
 
virtual void consistentTangentOperator (const RankTwoTensor &stress_trial, Real p_trial, Real q_trial, const RankTwoTensor &stress, Real p, Real q, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, RankFourTensor &cto) const
 Calculates the consistent tangent operator. More...
 
void consistentTangentOperatorV (const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto) override
 Calculates the consistent tangent operator. More...
 
virtual std::vector< RankTwoTensordstress_param_dstress (const RankTwoTensor &stress) const override
 d(stress_param[i])/d(stress) at given stress More...
 
virtual std::vector< RankFourTensord2stress_param_dstress (const RankTwoTensor &stress) const override
 d2(stress_param[i])/d(stress)/d(stress) at given stress More...
 
virtual RankTwoTensor dpdstress (const RankTwoTensor &stress) const =0
 d(p)/d(stress) Derived classes must override this More...
 
virtual RankFourTensor d2pdstress2 (const RankTwoTensor &stress) const =0
 d2(p)/d(stress)/d(stress) Derived classes must override this More...
 
virtual RankTwoTensor dqdstress (const RankTwoTensor &stress) const =0
 d(q)/d(stress) Derived classes must override this More...
 
virtual RankFourTensor d2qdstress2 (const RankTwoTensor &stress) const =0
 d2(q)/d(stress)/d(stress) Derived classes must override this More...
 
virtual void initQpStatefulProperties () override
 
virtual void updateState (RankTwoTensor &strain_increment, RankTwoTensor &inelastic_strain_increment, const RankTwoTensor &rotation_increment, RankTwoTensor &stress_new, const RankTwoTensor &stress_old, const RankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator, RankFourTensor &tangent_operator) override
 Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment. More...
 
virtual void propagateQpStatefulProperties () override
 If updateState is not called during a timestep, this will be. More...
 
virtual TangentCalculationMethod getTangentCalculationMethod () override
 
Real yieldF (const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
 Computes the smoothed yield function. More...
 
Real yieldF (const std::vector< Real > &yfs) const
 Computes the smoothed yield function. More...
 
Real ismoother (Real f_diff) const
 Smooths yield functions. More...
 
Real smoother (Real f_diff) const
 Derivative of ismoother. More...
 
Real dsmoother (Real f_diff) const
 Derivative of smoother. More...
 
yieldAndFlow smoothAllQuantities (const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
 Calculates all yield functions and derivatives, and then performs the smoothing scheme. More...
 
int lineSearch (Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
 Performs a line-search to find stress_params and gaE Upon entry: More...
 
int nrStep (const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
 Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution. More...
 
Real calculateRes2 (const std::vector< Real > &rhs) const
 Calculates the residual-squared for the Newton-Raphson + line-search. More...
 
void calculateRHS (const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
 Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, j] * dg/dS[j] ... More...
 
void dnRHSdVar (const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
 Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving the linear system using LAPACK gsev. More...
 
virtual void errorHandler (const std::string &message) const
 Performs any necessary cleaning-up, then throw MooseException(message) More...
 
virtual void initializeReturnProcess ()
 Derived classes may use this to perform calculations before any return-map process is performed, for instance, to initialize variables. More...
 
virtual void finalizeReturnProcess (const RankTwoTensor &rotation_increment)
 Derived classes may use this to perform calculations after the return-map process has completed successfully in stress_param space but before the returned stress tensor has been calculcated. More...
 
void dVardTrial (bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
 Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_params for the (sub)strain increment. More...
 
bool precisionLoss (const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
 Check whether precision loss has occurred. More...
 

Protected Attributes

Real _p_trial
 Trial value of p. More...
 
Real _q_trial
 Trial value of q. More...
 
Real _Epp
 elasticity tensor in p direction More...
 
Real _Eqq
 elasticity tensor in q direction More...
 
Real _dgaE_dpt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dgaE_dqt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dp_dpt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dq_dpt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dp_dqt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
Real _dq_dqt
 derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation) More...
 
const unsigned _num_sp
 Number of stress parameters. More...
 
const std::vector< Real > _definitely_ok_sp
 An admissible value of stress_params at the initial time. More...
 
std::vector< std::vector< Real > > _Eij
 E[i, j] in the system of equations to be solved. More...
 
Real _En
 normalising factor More...
 
std::vector< std::vector< Real > > _Cij
 _Cij[i, j] * _Eij[j, k] = 1 iff j == k More...
 
const unsigned _num_yf
 Number of yield functions. More...
 
const unsigned _num_intnl
 Number of internal parameters. More...
 
const unsigned _max_nr_its
 Maximum number of Newton-Raphson iterations allowed in the return-map process. More...
 
const bool _perform_finite_strain_rotations
 Whether to perform finite-strain rotations. More...
 
const Real _smoothing_tol
 Smoothing tolerance: edges of the yield surface get smoothed by this amount. More...
 
const Real _smoothing_tol2
 Square of the smoothing tolerance. More...
 
const Real _f_tol
 The yield-function tolerance. More...
 
const Real _f_tol2
 Square of the yield-function tolerance. More...
 
const Real _min_step_size
 In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-increments of size greater than this value. More...
 
bool _step_one
 handles case of initial_stress that is inadmissible being supplied More...
 
const bool _warn_about_precision_loss
 Output a warning message if precision loss is encountered during the return-map process. More...
 
MaterialProperty< RankTwoTensor > & _plastic_strain
 plastic strain More...
 
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
 Old value of plastic strain. More...
 
MaterialProperty< std::vector< Real > > & _intnl
 internal parameters More...
 
const MaterialProperty< std::vector< Real > > & _intnl_old
 old values of internal parameters More...
 
MaterialProperty< std::vector< Real > > & _yf
 yield functions More...
 
MaterialProperty< Real > & _iter
 Number of Newton-Raphson iterations used in the return-map. More...
 
MaterialProperty< Real > & _max_iter_used
 Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation. More...
 
const MaterialProperty< Real > & _max_iter_used_old
 Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation. More...
 
MaterialProperty< Real > & _linesearch_needed
 Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise) More...
 
const std::string _base_name
 Name used as a prefix for all material properties related to the stress update model. More...
 

Static Protected Attributes

constexpr static int _num_pq = 2
 Number of variables = 2 = (p, q) More...
 
constexpr static unsigned _tensor_dimensionality = 3
 Internal dimensionality of tensors (currently this is 3 throughout tensor_mechanics) More...
 

Private Types

enum  SmootherFunctionType { SmootherFunctionType::cos, SmootherFunctionType::poly1, SmootherFunctionType::poly2, SmootherFunctionType::poly3 }
 The type of smoother function. More...
 

Private Attributes

std::vector< Real > _trial_sp
 "Trial" value of stress_params that initializes the return-map process This is derived from stress = stress_old + Eijkl * strain_increment. More...
 
RankTwoTensor _stress_trial
 "Trial" value of stress that is set at the beginning of the return-map process. More...
 
std::vector< Real > _rhs
 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, i] * dg/dS[i] ... More...
 
std::vector< std::vector< Real > > _dvar_dtrial
 d({stress_param[i], gaE})/d(trial_stress_param[j]) More...
 
std::vector< Real > _ok_sp
 The state (ok_sp, ok_intnl) is known to be admissible, so ok_sp are stress_params that are "OK". More...
 
std::vector< Real > _ok_intnl
 The state (ok_sp, ok_intnl) is known to be admissible. More...
 
std::vector< Real > _del_stress_params
 _del_stress_params = trial_stress_params - ok_sp This is fixed at the beginning of the return-map process, irrespective of substepping. More...
 
std::vector< Real > _current_sp
 The current values of the stress params during the Newton-Raphson. More...
 
std::vector< Real > _current_intnl
 The current values of the internal params during the Newton-Raphson. More...
 
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
 

Detailed Description

TwoParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates for plastic models that describe (p, q) plasticity.

That is, for plastic models where the yield function and flow directions only depend on two parameters, p and q, that are themselves functions of stress.

Definition at line 29 of file TwoParameterPlasticityStressUpdate.h.

Member Enumeration Documentation

◆ SmootherFunctionType

The type of smoother function.

Enumerator
cos 
poly1 
poly2 
poly3 

Definition at line 743 of file MultiParameterPlasticityStressUpdate.h.

744  {
745  cos,
746  poly1,
747  poly2,
748  poly3

Constructor & Destructor Documentation

◆ TwoParameterPlasticityStressUpdate()

TwoParameterPlasticityStressUpdate::TwoParameterPlasticityStressUpdate ( const InputParameters &  parameters,
unsigned  num_yf,
unsigned  num_intnl 
)

Definition at line 25 of file TwoParameterPlasticityStressUpdate.C.

27  : MultiParameterPlasticityStressUpdate(parameters, _num_pq, num_yf, num_intnl),
28  _p_trial(0.0),
29  _q_trial(0.0),
30  _Epp(0.0),
31  _Eqq(0.0),
32  _dgaE_dpt(0.0),
33  _dgaE_dqt(0.0),
34  _dp_dpt(0.0),
35  _dq_dpt(0.0),
36  _dp_dqt(0.0),
37  _dq_dqt(0.0)
38 {
39 }

Member Function Documentation

◆ calculateRes2()

Real MultiParameterPlasticityStressUpdate::calculateRes2 ( const std::vector< Real > &  rhs) const
protectedinherited

Calculates the residual-squared for the Newton-Raphson + line-search.

Parameters
rhs[in]The RHS vector
Returns
sum_i (rhs[i] * rhs[i])

Definition at line 802 of file MultiParameterPlasticityStressUpdate.C.

803 {
804  Real res2 = 0.0;
805  for (const auto & r : rhs)
806  res2 += r * r;
807  return res2;
808 }

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

◆ calculateRHS()

void MultiParameterPlasticityStressUpdate::calculateRHS ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
Real  gaE,
const yieldAndFlow smoothed_q,
std::vector< Real > &  rhs 
) const
protectedinherited

Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, j] * dg/dS[j] ...

0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, j] * dg/dS[j] 0 = rhs[N] = f(S, intnl) where N = _num_sp

Parameters
trial_stress_params[in]The trial stress parameters for this (sub)strain increment, S[:]^trial
stress_params[in]The current stress parameters, S[:]
gaE[in]ga*_En (the normalisation with _En is so that gaE is of similar magnitude to S)
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the current stress parameters and the current internal parameters
rhs[out]The result

Definition at line 811 of file MultiParameterPlasticityStressUpdate.C.

816 {
817  const Real ga = gaE / _En;
818  for (unsigned i = 0; i < _num_sp; ++i)
819  {
820  rhs[i] = stress_params[i] - trial_stress_params[i];
821  for (unsigned j = 0; j < _num_sp; ++j)
822  rhs[i] += ga * _Eij[i][j] * smoothed_q.dg[j];
823  }
824  rhs[_num_sp] = smoothed_q.f;
825 }

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

◆ computeAllQ()

virtual void TwoParameterPlasticityStressUpdate::computeAllQ ( Real  p,
Real  q,
const std::vector< Real > &  intnl,
std::vector< yieldAndFlow > &  all_q 
) const
protectedpure virtual

Completely fills all_q with correct values.

These values are: (1) the yield function values, yf[i] (2) d(yf[i])/d(p, q) (3) d(yf[i])/d(intnl[j]) (4) d(flowPotential[i])/d(p, q) (5) d2(flowPotential[i])/d(p, q)/d(p, q) (6) d2(flowPotential[i])/d(p, q)/d(intnl[j])

Parameters
pp stress
qq stress
intnlThe internal parameters
[out]all_qAll the desired quantities

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by computeAllQV().

◆ computeAllQV()

void TwoParameterPlasticityStressUpdate::computeAllQV ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
std::vector< yieldAndFlow > &  all_q 
) const
overrideprotectedvirtual

Completely fills all_q with correct values.

These values are: (1) the yield function values, yf[i] (2) d(yf[i])/d(stress_params[j]) (3) d(yf[i])/d(intnl[j]) (4) d(flowPotential[i])/d(stress_params[j]) (5) d2(flowPotential[i])/d(stress_params[j])/d(stress_params[k]) (6) d2(flowPotential[i])/d(stress_params[j])/d(intnl[k])

Parameters
stress_params[in]The stress parameters
intnl[in]The internal parameters
[out]all_qAll the desired quantities

Implements MultiParameterPlasticityStressUpdate.

Definition at line 103 of file TwoParameterPlasticityStressUpdate.C.

106 {
107  const Real p = stress_params[0];
108  const Real q = stress_params[1];
109  computeAllQ(p, q, intnl, all_q);
110 }

◆ computePQ()

virtual void TwoParameterPlasticityStressUpdate::computePQ ( const RankTwoTensor stress,
Real &  p,
Real &  q 
) const
protectedpure virtual

Computes p and q, given stress.

Derived classes must override this

Parameters
stressStress tensor
pp stress
qq q stress

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Referenced by computeStressParams().

◆ computeStressParams()

void TwoParameterPlasticityStressUpdate::computeStressParams ( const RankTwoTensor stress,
std::vector< Real > &  stress_params 
) const
overrideprotectedvirtual

Computes stress_params, given stress.

Derived classes must override this

Parameters
stress[in]Stress tensor
stress_params[out]The compute stress_params

Implements MultiParameterPlasticityStressUpdate.

Definition at line 156 of file TwoParameterPlasticityStressUpdate.C.

158 {
159  Real p;
160  Real q;
161  computePQ(stress, p, q);
162  stress_params[0] = p;
163  stress_params[1] = q;
164 }

◆ computeTimeStepLimit()

Real StressUpdateBase::computeTimeStepLimit ( )
virtualinherited

Reimplemented in RadialReturnStressUpdate.

Definition at line 56 of file StressUpdateBase.C.

57 {
58  return std::numeric_limits<Real>::max();
59 }

◆ consistentTangentOperator()

void TwoParameterPlasticityStressUpdate::consistentTangentOperator ( const RankTwoTensor stress_trial,
Real  p_trial,
Real  q_trial,
const RankTwoTensor stress,
Real  p,
Real  q,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
bool  compute_full_tangent_operator,
RankFourTensor cto 
) const
protectedvirtual

Calculates the consistent tangent operator.

Derived classes may choose to override this for computational efficiency. The implementation in this class is quite expensive, even though it looks compact and clean, because of all the manipulations of RankFourTensors involved.

Parameters
stress_trialthe trial value of the stress tensor for this strain increment
p_trialthe trial value of p for this strain increment
q_trialthe trial value of q for this strain increment
stressthe returned value of the stress tensor for this strain increment
pthe returned value of p for this strain increment
qthe returned value of q for this strain increment
gaEthe total value of that came from this strain increment
smoothed_qcontains the yield function and derivatives evaluated at (p, q)
EijklThe elasticity tensor
compute_full_tangent_operatortrue if the full consistent tangent operator is needed, otherwise false
[out]ctoThe consistent tangent operator

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, CappedDruckerPragerCosseratStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Definition at line 203 of file TwoParameterPlasticityStressUpdate.C.

215 {
216  cto = elasticity_tensor;
217  if (!compute_full_tangent_operator)
218  return;
219 
220  const RankTwoTensor dpdsig = dpdstress(stress);
221  const RankTwoTensor dpdsig_trial = dpdstress(stress_trial);
222  const RankTwoTensor dqdsig = dqdstress(stress);
223  const RankTwoTensor dqdsig_trial = dqdstress(stress_trial);
224 
225  const RankTwoTensor s1 = elasticity_tensor * ((1.0 / _Epp) * (1.0 - _dp_dpt) * dpdsig +
226  (1.0 / _Eqq) * (-_dq_dpt) * dqdsig);
227  const RankTwoTensor s2 = elasticity_tensor * ((1.0 / _Epp) * (-_dp_dqt) * dpdsig +
228  (1.0 / _Eqq) * (1.0 - _dq_dqt) * dqdsig);
229  const RankTwoTensor t1 = elasticity_tensor * dpdsig_trial;
230  const RankTwoTensor t2 = elasticity_tensor * dqdsig_trial;
231 
232  for (unsigned i = 0; i < _tensor_dimensionality; ++i)
233  for (unsigned j = 0; j < _tensor_dimensionality; ++j)
234  for (unsigned k = 0; k < _tensor_dimensionality; ++k)
235  for (unsigned l = 0; l < _tensor_dimensionality; ++l)
236  cto(i, j, k, l) -= s1(i, j) * t1(k, l) + s2(i, j) * t2(k, l);
237 
238  const RankFourTensor d2pdsig2 = d2pdstress2(stress);
239  const RankFourTensor d2qdsig2 = d2qdstress2(stress);
240 
241  const RankFourTensor Tijab = elasticity_tensor * (gaE / _Epp) *
242  (smoothed_q.dg[0] * d2pdsig2 + smoothed_q.dg[1] * d2qdsig2);
243 
244  RankFourTensor inv = RankFourTensor(RankFourTensor::initIdentityFour) + Tijab;
245  try
246  {
247  inv = inv.transposeMajor().invSymm();
248  }
249  catch (const MooseException & e)
250  {
251  // Cannot form the inverse, so probably at some degenerate place in stress space.
252  // Just return with the "best estimate" of the cto.
253  mooseWarning("TwoParameterPlasticityStressUpdate: Cannot invert 1+T in consistent tangent "
254  "operator computation at quadpoint ",
255  _qp,
256  " of element ",
257  _current_elem->id());
258  return;
259  }
260 
261  cto = (cto.transposeMajor() * inv).transposeMajor();
262 }

Referenced by CappedWeakInclinedPlaneStressUpdate::consistentTangentOperator(), and consistentTangentOperatorV().

◆ consistentTangentOperatorV()

void TwoParameterPlasticityStressUpdate::consistentTangentOperatorV ( const RankTwoTensor stress_trial,
const std::vector< Real > &  trial_stress_params,
const RankTwoTensor stress,
const std::vector< Real > &  stress_params,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
bool  compute_full_tangent_operator,
const std::vector< std::vector< Real >> &  dvar_dtrial,
RankFourTensor cto 
)
overrideprotectedvirtual

Calculates the consistent tangent operator.

Derived classes may choose to override this for computational efficiency. The implementation in this class is quite expensive, even though it looks compact and clean, because of all the manipulations of RankFourTensors involved.

Parameters
stress_trial[in]the trial value of the stress tensor for this strain increment
trial_stress_params[in]the trial values of the stress_params for this strain increment
stress[in]the returned value of the stress tensor for this strain increment
stress_params[in]the returned value of the stress_params for this strain increment
gaE[in]the total value of that came from this strain increment
smoothed_q[in]contains the yield function and derivatives evaluated at (p, q)
Eijkl[in]The elasticity tensor
compute_full_tangent_operator[in]true if the full consistent tangent operator is needed, otherwise false
dvar_dtrial[in]dvar_dtrial[i][j] = d({stress_param[i],gaE})/d(trial_stress_param[j]) for this strain increment
[out]ctoThe consistent tangent operator

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 167 of file TwoParameterPlasticityStressUpdate.C.

178 {
179  const Real p_trial = trial_stress_params[0];
180  const Real q_trial = trial_stress_params[1];
181  const Real p = stress_params[0];
182  const Real q = stress_params[1];
183  _dp_dpt = dvar_dtrial[0][0];
184  _dp_dqt = dvar_dtrial[0][1];
185  _dq_dpt = dvar_dtrial[1][0];
186  _dq_dqt = dvar_dtrial[1][1];
187  _dgaE_dpt = dvar_dtrial[2][0];
188  _dgaE_dqt = dvar_dtrial[2][1];
189  consistentTangentOperator(stress_trial,
190  p_trial,
191  q_trial,
192  stress,
193  p,
194  q,
195  gaE,
196  smoothed_q,
197  Eijkl,
198  compute_full_tangent_operator,
199  cto);
200 }

◆ d2pdstress2()

virtual RankFourTensor TwoParameterPlasticityStressUpdate::d2pdstress2 ( const RankTwoTensor stress) const
protectedpure virtual

d2(p)/d(stress)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d2(p)/d(stress)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by consistentTangentOperator(), and d2stress_param_dstress().

◆ d2qdstress2()

virtual RankFourTensor TwoParameterPlasticityStressUpdate::d2qdstress2 ( const RankTwoTensor stress) const
protectedpure virtual

d2(q)/d(stress)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d2(q)/d(stress)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Referenced by consistentTangentOperator(), and d2stress_param_dstress().

◆ d2stress_param_dstress()

std::vector< RankFourTensor > TwoParameterPlasticityStressUpdate::d2stress_param_dstress ( const RankTwoTensor stress) const
overrideprotectedvirtual

d2(stress_param[i])/d(stress)/d(stress) at given stress

Parameters
stressstress tensor
Returns
d2(stress_param[:])/d(stress)/d(stress)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 301 of file TwoParameterPlasticityStressUpdate.C.

302 {
303  std::vector<RankFourTensor> d2(_num_pq, RankFourTensor());
304  d2[0] = d2pdstress2(stress);
305  d2[1] = d2qdstress2(stress);
306  return d2;
307 }

◆ dnRHSdVar()

void MultiParameterPlasticityStressUpdate::dnRHSdVar ( const yieldAndFlow smoothed_q,
const std::vector< std::vector< Real >> &  dintnl,
const std::vector< Real > &  stress_params,
Real  gaE,
std::vector< double > &  jac 
) const
protectedinherited

Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving the linear system using LAPACK gsev.

Parameters
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the current values of the stress_params and the internal parameters
dintnl[in]The derivatives of the internal parameters wrt the stress_params
stress_params[in]The current value of the stress_params during the Newton-Raphson process
gaE[in]The current value of gaE
jac[out]The outputted derivatives

Definition at line 828 of file MultiParameterPlasticityStressUpdate.C.

833 {
834  for (auto & jac_entry : jac)
835  jac_entry = 0.0;
836 
837  const Real ga = gaE / _En;
838 
839  unsigned ind = 0;
840  for (unsigned var = 0; var < _num_sp; ++var)
841  {
842  for (unsigned rhs = 0; rhs < _num_sp; ++rhs)
843  {
844  if (var == rhs)
845  jac[ind] -= 1.0;
846  for (unsigned j = 0; j < _num_sp; ++j)
847  {
848  jac[ind] -= ga * _Eij[rhs][j] * smoothed_q.d2g[j][var];
849  for (unsigned k = 0; k < _num_intnl; ++k)
850  jac[ind] -= ga * _Eij[rhs][j] * smoothed_q.d2g_di[j][k] * dintnl[k][var];
851  }
852  ind++;
853  }
854  // now rhs = _num_sp (that is, the yield function)
855  jac[ind] -= smoothed_q.df[var];
856  for (unsigned k = 0; k < _num_intnl; ++k)
857  jac[ind] -= smoothed_q.df_di[k] * dintnl[k][var];
858  ind++;
859  }
860 
861  // now var = _num_sp (that is, gaE)
862  for (unsigned rhs = 0; rhs < _num_sp; ++rhs)
863  {
864  for (unsigned j = 0; j < _num_sp; ++j)
865  jac[ind] -= (1.0 / _En) * _Eij[rhs][j] * smoothed_q.dg[j];
866  ind++;
867  }
868  // now rhs = _num_sp (that is, the yield function)
869  jac[ind] = 0.0;
870 }

Referenced by MultiParameterPlasticityStressUpdate::dVardTrial(), and MultiParameterPlasticityStressUpdate::nrStep().

◆ dpdstress()

virtual RankTwoTensor TwoParameterPlasticityStressUpdate::dpdstress ( const RankTwoTensor stress) const
protectedpure virtual

d(p)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d(p)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Referenced by consistentTangentOperator(), dstress_param_dstress(), and setInelasticStrainIncrementAfterReturn().

◆ dqdstress()

virtual RankTwoTensor TwoParameterPlasticityStressUpdate::dqdstress ( const RankTwoTensor stress) const
protectedpure virtual

d(q)/d(stress) Derived classes must override this

Parameters
stressstress tensor
Returns
d(q)/d(stress)

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Referenced by consistentTangentOperator(), dstress_param_dstress(), and setInelasticStrainIncrementAfterReturn().

◆ dsmoother()

Real MultiParameterPlasticityStressUpdate::dsmoother ( Real  f_diff) const
protectedinherited

Derivative of smoother.

Definition at line 533 of file MultiParameterPlasticityStressUpdate.C.

534 {
535  if (std::abs(f_diff) >= _smoothing_tol)
536  return 0.0;
537  switch (_smoother_function_type)
538  {
540  return 0.25 * M_PI / _smoothing_tol * std::cos(f_diff * M_PI * 0.5 / _smoothing_tol);
542  return 0.75 / _smoothing_tol * (1.0 - Utility::pow<2>(f_diff / _smoothing_tol));
544  return 0.625 / _smoothing_tol * (1.0 - Utility::pow<4>(f_diff / _smoothing_tol));
546  return (7.0 / 12.0 / _smoothing_tol) * (1.0 - Utility::pow<6>(f_diff / _smoothing_tol));
547  default:
548  return 0.0;
549  }
550 }

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities().

◆ dstress_param_dstress()

std::vector< RankTwoTensor > TwoParameterPlasticityStressUpdate::dstress_param_dstress ( const RankTwoTensor stress) const
overrideprotectedvirtual

d(stress_param[i])/d(stress) at given stress

Parameters
stressstress tensor
Returns
d(stress_param[:])/d(stress)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 292 of file TwoParameterPlasticityStressUpdate.C.

293 {
294  std::vector<RankTwoTensor> dsp(_num_pq, RankTwoTensor());
295  dsp[0] = dpdstress(stress);
296  dsp[1] = dqdstress(stress);
297  return dsp;
298 }

◆ dVardTrial()

void MultiParameterPlasticityStressUpdate::dVardTrial ( bool  elastic_only,
const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
Real  step_size,
bool  compute_full_tangent_operator,
std::vector< std::vector< Real >> &  dvar_dtrial 
) const
protectedinherited

Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_params for the (sub)strain increment.

After the strain increment has been fully applied, dvar_dtrial will contain the result appropriate to the full strain increment. Before that time (if applying in sub-strain increments) it will contain the result appropriate to the amount of strain increment applied successfully.

Parameters
elastic_only[in]whether this was an elastic step: if so then the updates to dvar_dtrial are fairly trivial
trial_stress_params[in]Trial values of stress_params for this (sub)strain increment
stress_params[in]Returned values of stress_params for this (sub)strain increment
gaE[in]the value of gaE that came from this (sub)strain increment
intnl[in]the value of the internal parameters at the returned position
smoothed_q[in]contains the yield function and derivatives evaluated at (stress_params, intnl)
step_size[in]size of this (sub)strain increment
compute_full_tangent_operator[in]true if the full consistent tangent operator is needed, otherwise false
dvar_dtrial[out]dvar_dtrial[i][j] = d({stress_param[i],gaE})/d(trial_stress_param[j])

Definition at line 873 of file MultiParameterPlasticityStressUpdate.C.

882 {
883  if (!_fe_problem.currentlyComputingJacobian())
884  return;
885 
886  if (!compute_full_tangent_operator)
887  return;
888 
889  if (elastic_only)
890  {
891  // no change to gaE, and all off-diag stuff remains unchanged from previous step
892  for (unsigned v = 0; v < _num_sp; ++v)
893  dvar_dtrial[v][v] += step_size;
894  return;
895  }
896 
897  const Real ga = gaE / _En;
898 
899  std::vector<std::vector<Real>> dintnl(_num_intnl, std::vector<Real>(_num_sp));
900  setIntnlDerivativesV(trial_stress_params, stress_params, intnl, dintnl);
901 
902  // rhs is described elsewhere, the following are changes in rhs wrt the trial_stress_param
903  // values
904  // In the following we use d(intnl)/d(trial variable) = - d(intnl)/d(variable)
905  std::vector<Real> rhs_cto((_num_sp + 1) * _num_sp);
906 
907  unsigned ind = 0;
908  for (unsigned a = 0; a < _num_sp; ++a)
909  {
910  // change in RHS[b] wrt changes in stress_param_trial[a]
911  for (unsigned b = 0; b < _num_sp; ++b)
912  {
913  if (a == b)
914  rhs_cto[ind] -= 1.0;
915  for (unsigned j = 0; j < _num_sp; ++j)
916  for (unsigned k = 0; k < _num_intnl; ++k)
917  rhs_cto[ind] -= ga * _Eij[b][j] * smoothed_q.d2g_di[j][k] * dintnl[k][a];
918  ind++;
919  }
920  // now b = _num_sp (that is, the yield function)
921  for (unsigned k = 0; k < _num_intnl; ++k)
922  rhs_cto[ind] -= smoothed_q.df_di[k] * dintnl[k][a];
923  ind++;
924  }
925 
926  // jac = d(-rhs)/d(var)
927  std::vector<double> jac((_num_sp + 1) * (_num_sp + 1));
928  dnRHSdVar(smoothed_q, dintnl, stress_params, gaE, jac);
929 
930  std::vector<int> ipiv(_num_sp + 1);
931  int info;
932  const int gesv_num_rhs = _num_sp + 1;
933  const int gesv_num_pq = _num_sp;
934  LAPACKgesv_(&gesv_num_rhs,
935  &gesv_num_pq,
936  &jac[0],
937  &gesv_num_rhs,
938  &ipiv[0],
939  &rhs_cto[0],
940  &gesv_num_rhs,
941  &info);
942  if (info != 0)
943  errorHandler("MultiParameterPlasticityStressUpdate: PETSC LAPACK gsev routine returned with "
944  "error code " +
945  Moose::stringify(info));
946 
947  ind = 0;
948  std::vector<std::vector<Real>> dvarn_dtrialn(_num_sp + 1, std::vector<Real>(_num_sp, 0.0));
949  for (unsigned spt = 0; spt < _num_sp; ++spt) // loop over trial stress-param variables
950  {
951  for (unsigned v = 0; v < _num_sp; ++v) // loop over variables in NR procedure
952  {
953  dvarn_dtrialn[v][spt] = rhs_cto[ind];
954  ind++;
955  }
956  // the final NR variable is gaE
957  dvarn_dtrialn[_num_sp][spt] = rhs_cto[ind];
958  ind++;
959  }
960 
961  const std::vector<std::vector<Real>> dvar_dtrial_old = dvar_dtrial;
962 
963  for (unsigned v = 0; v < _num_sp; ++v) // loop over variables in NR procedure
964  {
965  for (unsigned spt = 0; spt < _num_sp; ++spt) // loop over trial stress-param variables
966  {
967  dvar_dtrial[v][spt] = step_size * dvarn_dtrialn[v][spt];
968  for (unsigned a = 0; a < _num_sp; ++a)
969  dvar_dtrial[v][spt] += dvarn_dtrialn[v][a] * dvar_dtrial_old[a][spt];
970  }
971  }
972  // for gaE the formulae are a little different
973  const unsigned v = _num_sp;
974  for (unsigned spt = 0; spt < _num_sp; ++spt)
975  {
976  dvar_dtrial[v][spt] += step_size * dvarn_dtrialn[v][spt]; // note +=
977  for (unsigned a = 0; a < _num_sp; ++a)
978  dvar_dtrial[v][spt] += dvarn_dtrialn[v][a] * dvar_dtrial_old[a][spt];
979  }
980 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ errorHandler()

void MultiParameterPlasticityStressUpdate::errorHandler ( const std::string &  message) const
protectedvirtualinherited

Performs any necessary cleaning-up, then throw MooseException(message)

Parameters
messageThe message to using in MooseException

Definition at line 661 of file MultiParameterPlasticityStressUpdate.C.

662 {
663  throw MooseException(message);
664 }

Referenced by MultiParameterPlasticityStressUpdate::dVardTrial(), and MultiParameterPlasticityStressUpdate::updateState().

◆ finalizeReturnProcess()

void MultiParameterPlasticityStressUpdate::finalizeReturnProcess ( const RankTwoTensor rotation_increment)
protectedvirtualinherited

Derived classes may use this to perform calculations after the return-map process has completed successfully in stress_param space but before the returned stress tensor has been calculcated.

Parameters
rotation_increment[in]The large-strain rotation increment

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 672 of file MultiParameterPlasticityStressUpdate.C.

674 {
675 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ getTangentCalculationMethod()

virtual TangentCalculationMethod MultiParameterPlasticityStressUpdate::getTangentCalculationMethod ( )
inlineoverrideprotectedvirtualinherited

Reimplemented from StressUpdateBase.

Definition at line 123 of file MultiParameterPlasticityStressUpdate.h.

124  {
126  }

◆ initializeReturnProcess()

void MultiParameterPlasticityStressUpdate::initializeReturnProcess ( )
protectedvirtualinherited

Derived classes may use this to perform calculations before any return-map process is performed, for instance, to initialize variables.

This is called at the very start of updateState, even before any checking for admissible stresses, etc, is performed

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 667 of file MultiParameterPlasticityStressUpdate.C.

668 {
669 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ initializeVars()

void TwoParameterPlasticityStressUpdate::initializeVars ( Real  p_trial,
Real  q_trial,
const std::vector< Real > &  intnl_old,
Real &  p,
Real &  q,
Real &  gaE,
std::vector< Real > &  intnl 
) const
protectedvirtual

Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm.

The purpose of these "good guesses" is to speed up the Newton-Raphson process by providing it with a good initial guess. Derived classes may choose to override this if their plastic models are easy enough to solve approximately. The default values, provided by this class, are simply p=p_trial, etc: that is, the "good guess" is just the trial point for this (sub)strain increment.

Parameters
p_trialThe trial value of p for this (sub)strain increment
q_trialThe trial value of q for this (sub)strain increment
intnl_oldThe internal parameters before applying the (sub)strain increment
p[out]The "good guess" value of p. Default = p_trial
q[out]The "good guess" value of q. Default = q_trial
gaE[out]The "good guess" value of gaE. Default = 0
intnl[out]The "good guess" value of the internal parameters

Reimplemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Definition at line 88 of file TwoParameterPlasticityStressUpdate.C.

95 {
96  p = p_trial;
97  q = q_trial;
98  gaE = 0.0;
99  std::copy(intnl_old.begin(), intnl_old.end(), intnl.begin());
100 }

Referenced by initializeVarsV().

◆ initializeVarsV()

void TwoParameterPlasticityStressUpdate::initializeVarsV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  stress_params,
Real &  gaE,
std::vector< Real > &  intnl 
) const
overrideprotectedvirtual

Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.

The purpose of these "good guesses" is to speed up the Newton-Raphson process by providing it with a good initial guess. Derived classes may choose to override this if their plastic models are easy enough to solve approximately. The default values, provided by this class, are simply gaE = 0, stress_params = trial_stress_params, that is, the "good guess" is just the trial point for this (sub)strain increment.

Parameters
trial_stress_params[in]The stress_params at the trial point
intnl_old[in]The internal parameters before applying the (sub)strain increment
stress_params[out]The "good guess" value of the stress_params
gaE[out]The "good guess" value of gaE
intnl[out]The "good guess" value of the internal parameters

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 113 of file TwoParameterPlasticityStressUpdate.C.

118 {
119  const Real p_trial = trial_stress_params[0];
120  const Real q_trial = trial_stress_params[1];
121  Real p;
122  Real q;
123  initializeVars(p_trial, q_trial, intnl_old, p, q, gaE, intnl);
124  stress_params[0] = p;
125  stress_params[1] = q;
126 }

◆ initQpStatefulProperties()

void MultiParameterPlasticityStressUpdate::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented in CappedWeakInclinedPlaneStressUpdate.

Definition at line 141 of file MultiParameterPlasticityStressUpdate.C.

142 {
143  _plastic_strain[_qp].zero();
144  _intnl[_qp].assign(_num_intnl, 0);
145  _yf[_qp].assign(_num_yf, 0);
146  _iter[_qp] = 0.0;
147  _max_iter_used[_qp] = 0.0;
148  _linesearch_needed[_qp] = 0.0;
149 }

Referenced by CappedWeakInclinedPlaneStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ isIsotropic()

virtual bool StressUpdateBase::isIsotropic ( )
inlinevirtualinherited

Is the implmented model isotropic? The safe default is 'false'.

Reimplemented in RadialReturnStressUpdate, CappedDruckerPragerStressUpdate, and CappedMohrCoulombStressUpdate.

Definition at line 112 of file StressUpdateBase.h.

112 { return false; };

Referenced by ComputeMultipleInelasticStress::initialSetup().

◆ ismoother()

Real MultiParameterPlasticityStressUpdate::ismoother ( Real  f_diff) const
protectedinherited

Smooths yield functions.

The returned value must be zero if abs(f_diff) >= _smoothing_tol and otherwise must satisfy, over -_smoothing_tol <= f_diff <= _smoothing_tol: (1) C2 (2) zero at f_diff = +/- _smoothing_tol (3) derivative is +/-0.5 at f_diff = +/- _smoothing_tol (4) derivative must be in [-0.5, 0.5] (5) second derivative is zero at f_diff = +/- _smoothing_tol (6) second derivative must be non-negative in order to ensure C2 differentiability and convexity of the smoothed yield surface.

Definition at line 484 of file MultiParameterPlasticityStressUpdate.C.

485 {
486  if (std::abs(f_diff) >= _smoothing_tol)
487  return 0.0;
488  switch (_smoother_function_type)
489  {
491  return -_smoothing_tol / M_PI * std::cos(0.5 * M_PI * f_diff / _smoothing_tol);
493  return 0.75 / _smoothing_tol *
494  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
495  (_smoothing_tol2 / 12.0) * (Utility::pow<4>(f_diff / _smoothing_tol) - 1.0));
497  return 0.625 / _smoothing_tol *
498  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
499  (_smoothing_tol2 / 30.0) * (Utility::pow<6>(f_diff / _smoothing_tol) - 1.0));
501  return (7.0 / 12.0 / _smoothing_tol) *
502  (0.5 * (Utility::pow<2>(f_diff) - _smoothing_tol2) -
503  (_smoothing_tol2 / 56.0) * (Utility::pow<8>(f_diff / _smoothing_tol) - 1.0));
504  default:
505  return 0.0;
506  }
507 }

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities(), and MultiParameterPlasticityStressUpdate::yieldF().

◆ lineSearch()

int MultiParameterPlasticityStressUpdate::lineSearch ( Real &  res2,
std::vector< Real > &  stress_params,
Real &  gaE,
const std::vector< Real > &  trial_stress_params,
yieldAndFlow smoothed_q,
const std::vector< Real > &  intnl_ok,
std::vector< Real > &  intnl,
std::vector< Real > &  rhs,
Real &  linesearch_needed 
) const
protectedinherited

Performs a line-search to find stress_params and gaE Upon entry:

  • rhs contains the solution to the Newton-Raphson (ie nrStep should have been called). If a full Newton step is used then stress_params[:] += rhs[0:_num_sp-1] and gaE += rhs[_num_sp]
  • res2 contains the residual-squared before applying any of solution
  • stress_params contains the stress_params before applying any of the solution
  • gaE contains gaE before applying any of the solution (that is contained in rhs) Upon exit:
  • stress_params will be the stress_params after applying the solution
  • gaE will be the stress_params after applying the solution
  • rhs will contain the updated rhs values (after applying the solution) ready for the next Newton-Raphson step,
  • res2 will be the residual-squared after applying the solution
  • intnl will contain the internal variables corresponding to the return from trial_stress_params to stress_params (and starting from intnl_ok)
  • linesearch_needed will be 1.0 if a linesearch was needed
  • smoothed_q will contain the value of the yield function and its derivatives, etc, at (stress_params, intnl)
    Parameters
    res2[in,out]the residual-squared, both as an input and output
    stress_params[in,out]Upon input the value of the stress_params before the current Newton-Raphson process was initiated. Upon exit this will hold the values coming from the line search.
    trial_stress_params[in]Trial value for the stress_params for this (sub)strain increment
    gaE[in,out]Upon input the value of gaE before the current Newton-Raphson iteration was initiated. Upon exit this will hold the value coming from the line-search
    smoothed_q[in,out]Upon input, the value of the smoothed yield function and derivatives at the prior-to-Newton configuration. Upon exit this is evaluated at the new (stress_params, intnl)
    intnl_ok[in]The value of the internal parameters from the start of this (sub)strain increment
    intnl[in,out]The value of the internal parameters after the line-search has converged
    rhs[in,out]Upon entry this contains the solution to the Newton-Raphson. Upon exit this contains the updated rhs values
    Returns
    0 if successful, 1 otherwise

Definition at line 553 of file MultiParameterPlasticityStressUpdate.C.

562 {
563  const Real res2_old = res2;
564  const std::vector<Real> sp_params_old = stress_params;
565  const Real gaE_old = gaE;
566  const std::vector<Real> delta_nr_params = rhs;
567 
568  Real lam = 1.0; // line-search parameter
569  const Real lam_min = 1E-10; // minimum value of lam allowed
570  const Real slope = -2.0 * res2_old; // "Numerical Recipes" uses -b*A*x, in order to check for
571  // roundoff, but i hope the nrStep would warn if there were
572  // problems
573  Real tmp_lam; // cached value of lam used in quadratic & cubic line search
574  Real f2 = res2_old; // cached value of f = residual2 used in the cubic in the line search
575  Real lam2 = lam; // cached value of lam used in the cubic in the line search
576 
577  while (true)
578  {
579  // update variables using the current line-search parameter
580  for (unsigned i = 0; i < _num_sp; ++i)
581  stress_params[i] = sp_params_old[i] + lam * delta_nr_params[i];
582  gaE = gaE_old + lam * delta_nr_params[_num_sp];
583 
584  // and internal parameters
585  setIntnlValuesV(trial_stress_params, stress_params, intnl_ok, intnl);
586 
587  smoothed_q = smoothAllQuantities(stress_params, intnl);
588 
589  // update rhs for next-time through
590  calculateRHS(trial_stress_params, stress_params, gaE, smoothed_q, rhs);
591  res2 = calculateRes2(rhs);
592 
593  // do the line-search
594  if (res2 < res2_old + 1E-4 * lam * slope)
595  break;
596  else if (lam < lam_min)
597  return 1;
598  else if (lam == 1.0)
599  {
600  // model as a quadratic
601  tmp_lam = -0.5 * slope / (res2 - res2_old - slope);
602  }
603  else
604  {
605  // model as a cubic
606  const Real rhs1 = res2 - res2_old - lam * slope;
607  const Real rhs2 = f2 - res2_old - lam2 * slope;
608  const Real a = (rhs1 / Utility::pow<2>(lam) - rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
609  const Real b =
610  (-lam2 * rhs1 / Utility::pow<2>(lam) + lam * rhs2 / Utility::pow<2>(lam2)) / (lam - lam2);
611  if (a == 0.0)
612  tmp_lam = -slope / (2.0 * b);
613  else
614  {
615  const Real disc = Utility::pow<2>(b) - 3.0 * a * slope;
616  if (disc < 0)
617  tmp_lam = 0.5 * lam;
618  else if (b <= 0)
619  tmp_lam = (-b + std::sqrt(disc)) / (3.0 * a);
620  else
621  tmp_lam = -slope / (b + std::sqrt(disc));
622  }
623  if (tmp_lam > 0.5 * lam)
624  tmp_lam = 0.5 * lam;
625  }
626  lam2 = lam;
627  f2 = res2;
628  lam = std::max(tmp_lam, 0.1 * lam);
629  }
630 
631  if (lam < 1.0)
632  linesearch_needed = 1.0;
633  return 0;
634 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ nrStep()

int MultiParameterPlasticityStressUpdate::nrStep ( const yieldAndFlow smoothed_q,
const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
Real  gaE,
std::vector< Real > &  rhs 
) const
protectedinherited

Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution.

Parameters
smoothed_q[in]The value of the smoothed yield function and derivatives prior to this Newton-Raphson step
trial_stress_params[in]Trial value for the stress_params for this (sub)strain increment
stress_params[in]The current value of the stress_params
intnl[in]The current value of the internal parameters
gaE[in]The current value of gaE
rhs[in,out]Upon entry, the rhs to zero using Newton-Raphson. Upon exit, the solution to the Newton-Raphson problem
Returns
0 if successful, 1 otherwise

Definition at line 637 of file MultiParameterPlasticityStressUpdate.C.

643 {
644  std::vector<std::vector<Real>> dintnl(_num_intnl, std::vector<Real>(_num_sp));
645  setIntnlDerivativesV(trial_stress_params, stress_params, intnl, dintnl);
646 
647  std::vector<double> jac((_num_sp + 1) * (_num_sp + 1));
648  dnRHSdVar(smoothed_q, dintnl, stress_params, gaE, jac);
649 
650  // use LAPACK to solve the linear system
651  const int nrhs = 1;
652  std::vector<int> ipiv(_num_sp + 1);
653  int info;
654  const int gesv_num_rhs = _num_sp + 1;
655  LAPACKgesv_(
656  &gesv_num_rhs, &nrhs, &jac[0], &gesv_num_rhs, &ipiv[0], &rhs[0], &gesv_num_rhs, &info);
657  return info;
658 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ precisionLoss()

bool MultiParameterPlasticityStressUpdate::precisionLoss ( const std::vector< Real > &  solution,
const std::vector< Real > &  stress_params,
Real  gaE 
) const
protectedinherited

Check whether precision loss has occurred.

Parameters
[in]solutionThe solution to the Newton-Raphson system
[in]stress_paramsThe currect values of the stress_params for this (sub)strain increment
[in]gaEThe currenct value of gaE for this (sub)strain increment
Returns
true if precision loss has occurred

Definition at line 983 of file MultiParameterPlasticityStressUpdate.C.

986 {
987  if (std::abs(solution[_num_sp]) > 1E-13 * std::abs(gaE))
988  return false;
989  for (unsigned i = 0; i < _num_sp; ++i)
990  if (std::abs(solution[i]) > 1E-13 * std::abs(stress_params[i]))
991  return false;
992  return true;
993 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ preReturnMap()

void TwoParameterPlasticityStressUpdate::preReturnMap ( Real  p_trial,
Real  q_trial,
const RankTwoTensor stress_trial,
const std::vector< Real > &  intnl_old,
const std::vector< Real > &  yf,
const RankFourTensor Eijkl 
)
protectedvirtual

Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm.

We know that (p_trial, q_trial, intnl_old) is inadmissible.

Parameters
p_trialTrial value of p
q_trialTrial value of q
stress_trialTrial stress tensor
intnl_oldOld value of the internal parameters.
yfThe yield functions at (p_trial, q_trial, intnl_old)
EijklThe elasticity tensor

Reimplemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, and CappedWeakInclinedPlaneStressUpdate.

Definition at line 77 of file TwoParameterPlasticityStressUpdate.C.

83 {
84  return;
85 }

Referenced by preReturnMapV().

◆ preReturnMapV()

void TwoParameterPlasticityStressUpdate::preReturnMapV ( const std::vector< Real > &  trial_stress_params,
const RankTwoTensor stress_trial,
const std::vector< Real > &  intnl_old,
const std::vector< Real > &  yf,
const RankFourTensor Eijkl 
)
overrideprotectedvirtual

Derived classes may employ this function to record stuff or do other computations prior to the return-mapping algorithm.

We know that (trial_stress_params, intnl_old) is inadmissible when this is called

Parameters
trial_stress_params[in]The trial values of the stress parameters
stress_trial[in]Trial stress tensor
intnl_old[in]Old value of the internal parameters.
yf[in]The yield functions at (p_trial, q_trial, intnl_old)
Eijkl[in]The elasticity tensor

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 65 of file TwoParameterPlasticityStressUpdate.C.

70 {
71  const Real p_trial = trial_stress_params[0];
72  const Real q_trial = trial_stress_params[1];
73  preReturnMap(p_trial, q_trial, stress_trial, intnl_old, yf, Eijkl);
74 }

◆ propagateQpStatefulProperties()

void MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties ( )
overrideprotectedvirtualinherited

If updateState is not called during a timestep, this will be.

This method allows derived classes to set internal parameters from their Old values, for instance

Reimplemented from StressUpdateBase.

Definition at line 152 of file MultiParameterPlasticityStressUpdate.C.

153 {
155  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _intnl[_qp].begin());
157 }

◆ requiresIsotropicTensor()

virtual bool StressUpdateBase::requiresIsotropicTensor ( )
pure virtualinherited

◆ resetProperties()

void StressUpdateBase::resetProperties ( )
inlinefinalinherited

Definition at line 123 of file StressUpdateBase.h.

123 {}

◆ resetQpProperties()

void StressUpdateBase::resetQpProperties ( )
inlinefinalinherited

Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten.

Definition at line 122 of file StressUpdateBase.h.

122 {}

◆ setEffectiveElasticity()

void TwoParameterPlasticityStressUpdate::setEffectiveElasticity ( const RankFourTensor Eijkl)
overrideprotectedvirtual

Sets _Eij and _En and _Cij.

Implements MultiParameterPlasticityStressUpdate.

Definition at line 52 of file TwoParameterPlasticityStressUpdate.C.

53 {
54  setEppEqq(Eijkl, _Epp, _Eqq);
55  _Eij[0][0] = _Epp;
56  _Eij[1][0] = _Eij[0][1] = 0.0;
57  _Eij[1][1] = _Eqq;
58  _En = _Epp;
59  _Cij[0][0] = 1.0 / _Epp;
60  _Cij[1][0] = _Cij[0][1] = 0.0;
61  _Cij[1][1] = 1.0 / _Eqq;
62 }

◆ setEppEqq()

virtual void TwoParameterPlasticityStressUpdate::setEppEqq ( const RankFourTensor Eijkl,
Real &  Epp,
Real &  Eqq 
) const
protectedpure virtual

Set Epp and Eqq based on the elasticity tensor Derived classes must override this.

Parameters
Eijklelasticity tensor
[out]EppEpp value
[out]EqqEqq value

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, and CappedDruckerPragerCosseratStressUpdate.

Referenced by setEffectiveElasticity().

◆ setInelasticStrainIncrementAfterReturn()

void TwoParameterPlasticityStressUpdate::setInelasticStrainIncrementAfterReturn ( const RankTwoTensor stress_trial,
Real  gaE,
const yieldAndFlow smoothed_q,
const RankFourTensor elasticity_tensor,
const RankTwoTensor returned_stress,
RankTwoTensor inelastic_strain_increment 
) const
overrideprotectedvirtual

Sets inelastic strain increment from the returned configuration This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called.

Derived classes may override this function

Parameters
stress_trial[in]The trial value of stress
gaE[in]The value of gaE after the return-map process has completed successfully
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the returned configuration
elasticity_tensor[in]The elasticity tensor
returned_stress[in]The stress after the return-map process
inelastic_strain_increment[out]The inelastic strain increment resulting from this return-map

Reimplemented from MultiParameterPlasticityStressUpdate.

Definition at line 279 of file TwoParameterPlasticityStressUpdate.C.

286 {
287  inelastic_strain_increment = (gaE / _Epp) * (smoothed_q.dg[0] * dpdstress(returned_stress) +
288  smoothed_q.dg[1] * dqdstress(returned_stress));
289 }

◆ setIntnlDerivatives()

virtual void TwoParameterPlasticityStressUpdate::setIntnlDerivatives ( Real  p_trial,
Real  q_trial,
Real  p,
Real  q,
const std::vector< Real > &  intnl,
std::vector< std::vector< Real >> &  dintnl 
) const
protectedpure virtual

Sets the derivatives of internal parameters, based on the trial values of p and q, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
p_trialTrial value of p
q_trialTrial value of q
pCurrent value of p
qCurrent value of q
intnlThe current value of the internal parameters
dintnlThe derivatives dintnl[i][j] = d(intnl[i])/d(variable j), where variable0=p and variable1=q

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by setIntnlDerivativesV().

◆ setIntnlDerivativesV()

void TwoParameterPlasticityStressUpdate::setIntnlDerivativesV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  current_stress_params,
const std::vector< Real > &  intnl,
std::vector< std::vector< Real >> &  dintnl 
) const
overrideprotectedvirtual

Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.

Derived classes must override this.

Parameters
trial_stress_params[in]The trial stress parameters
current_stress_params[in]The current stress parameters
intnl[in]The current value of the internal parameters
dintnl[out]The derivatives dintnl[i][j] = d(intnl[i])/d(stress_param j)

Implements MultiParameterPlasticityStressUpdate.

Definition at line 142 of file TwoParameterPlasticityStressUpdate.C.

147 {
148  const Real p_trial = trial_stress_params[0];
149  const Real q_trial = trial_stress_params[1];
150  const Real p = current_stress_params[0];
151  const Real q = current_stress_params[1];
152  setIntnlDerivatives(p_trial, q_trial, p, q, intnl_old, dintnl);
153 }

◆ setIntnlValues()

virtual void TwoParameterPlasticityStressUpdate::setIntnlValues ( Real  p_trial,
Real  q_trial,
Real  p,
Real  q,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  intnl 
) const
protectedpure virtual

Sets the internal parameters based on the trial values of p and q, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
p_trialTrial value of p
q_trialTrial value of q
pCurrent value of p
qCurrent value of q
intnl_oldOld value of internal parameters
intnl[out]The value of internal parameters to be set

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by setIntnlValuesV().

◆ setIntnlValuesV()

void TwoParameterPlasticityStressUpdate::setIntnlValuesV ( const std::vector< Real > &  trial_stress_params,
const std::vector< Real > &  current_stress_params,
const std::vector< Real > &  intnl_old,
std::vector< Real > &  intnl 
) const
overrideprotectedvirtual

Sets the internal parameters based on the trial values of stress_params, their current values, and the old values of the internal parameters.

Derived classes must override this.

Parameters
trial_stress_params[in]The trial stress parameters (eg trial_p and trial_q)
current_stress_params[in]The current stress parameters (eg p and q)
intnl_old[out]Old value of internal parameters
intnl[out]The value of internal parameters to be set

Implements MultiParameterPlasticityStressUpdate.

Definition at line 129 of file TwoParameterPlasticityStressUpdate.C.

133 {
134  const Real p_trial = trial_stress_params[0];
135  const Real q_trial = trial_stress_params[1];
136  const Real p = current_stress_params[0];
137  const Real q = current_stress_params[1];
138  setIntnlValues(p_trial, q_trial, p, q, intnl_old, intnl);
139 }

◆ setQp()

void StressUpdateBase::setQp ( unsigned int  qp)
inherited

Sets the value of the global variable _qp for inheriting classes.

Definition at line 43 of file StressUpdateBase.C.

44 {
45  _qp = qp;
46 }

◆ setStressAfterReturn()

virtual void TwoParameterPlasticityStressUpdate::setStressAfterReturn ( const RankTwoTensor stress_trial,
Real  p_ok,
Real  q_ok,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
RankTwoTensor stress 
) const
protectedpure virtual

Sets stress from the admissible parameters.

This is called after the return-map process has completed successfully in (p, q) space, just after finalizeReturnProcess has been called. Derived classes may override this function

Parameters
stress_trialThe trial value of stress
p_okReturned value of p
q_okReturned value of q
gaEValue of gaE induced by the return (gaE = gamma * Epp)
smoothed_qHolds the current value of yield function and derivatives evaluated at (p_ok, q_ok, _intnl)
EijklThe elasticity tensor
stress[out]The returned value of the stress tensor

Implemented in CappedDruckerPragerStressUpdate, CappedWeakPlaneStressUpdate, CappedWeakInclinedPlaneStressUpdate, CappedDruckerPragerCosseratStressUpdate, and CappedWeakPlaneCosseratStressUpdate.

Referenced by setStressAfterReturnV().

◆ setStressAfterReturnV()

void TwoParameterPlasticityStressUpdate::setStressAfterReturnV ( const RankTwoTensor stress_trial,
const std::vector< Real > &  stress_params,
Real  gaE,
const std::vector< Real > &  intnl,
const yieldAndFlow smoothed_q,
const RankFourTensor Eijkl,
RankTwoTensor stress 
) const
overrideprotectedvirtual

Sets stress from the admissible parameters.

This is called after the return-map process has completed successfully in stress_param space, just after finalizeReturnProcess has been called. Derived classes must override this function

Parameters
stress_trial[in]The trial value of stress
stress_params[in]The value of the stress_params after the return-map process has completed successfully
gaE[in]The value of gaE after the return-map process has completed successfully
intnl[in]The value of the internal parameters after the return-map process has completed successfully
smoothed_q[in]Holds the current value of yield function and derivatives evaluated at the returned state
Eijkl[in]The elasticity tensor
stress[out]The returned value of the stress tensor

Implements MultiParameterPlasticityStressUpdate.

Definition at line 265 of file TwoParameterPlasticityStressUpdate.C.

272 {
273  const Real p_ok = stress_params[0];
274  const Real q_ok = stress_params[1];
275  setStressAfterReturn(stress_trial, p_ok, q_ok, gaE, intnl, smoothed_q, Eijkl, stress);
276 }

◆ smoothAllQuantities()

MultiParameterPlasticityStressUpdate::yieldAndFlow MultiParameterPlasticityStressUpdate::smoothAllQuantities ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl 
) const
protectedinherited

Calculates all yield functions and derivatives, and then performs the smoothing scheme.

Parameters
stress_params[in]The stress parameters (eg stress_params[0] = stress_zz and stress_params[1] = sqrt(stress_zx^2 + stress_zy^2))
intnl[in]Internal parameters
Returns
The smoothed yield function and derivatives

Definition at line 400 of file MultiParameterPlasticityStressUpdate.C.

402 {
403  std::vector<yieldAndFlow> all_q(_num_yf, yieldAndFlow(_num_sp, _num_intnl));
404  computeAllQV(stress_params, intnl, all_q);
405 
406  /* This routine holds the key to my smoothing strategy. It
407  * may be proved that this smoothing strategy produces a
408  * yield surface that is both C2 differentiable and convex,
409  * assuming the individual yield functions are C2 and
410  * convex too.
411  * Of course all the derivatives must also be smoothed.
412  * Also, I assume that d(flow potential)/dstress gets smoothed
413  * by the Yield Function (which produces a C2 flow potential).
414  * See the line identified in the loop below.
415  * Only time will tell whether this is a good strategy, but it
416  * works well in all tests so far. Convexity is irrelevant
417  * for the non-associated case, but at least the return-map
418  * problem should always have a unique solution.
419  * For two yield functions+flows, labelled 1 and 2, we
420  * should have
421  * d(g1 - g2) . d(f1 - f2) >= 0
422  * If not then the return-map problem for even the
423  * multi-surface plasticity with no smoothing won't have a
424  * unique solution. If the multi-surface plasticity has
425  * a unique solution then the smoothed version defined
426  * below will too.
427  */
428 
429  // res_f is the index that contains the smoothed yieldAndFlow
430  std::size_t res_f = 0;
431 
432  for (std::size_t a = 1; a < all_q.size(); ++a)
433  {
434  if (all_q[res_f].f >= all_q[a].f + _smoothing_tol)
435  // no smoothing is needed: res_f is already indexes the largest yield function
436  continue;
437  else if (all_q[a].f >= all_q[res_f].f + _smoothing_tol)
438  {
439  // no smoothing is needed, and res_f needs to index to all_q[a]
440  res_f = a;
441  continue;
442  }
443  else
444  {
445  // smoothing is required
446  const Real f_diff = all_q[res_f].f - all_q[a].f;
447  const Real ism = ismoother(f_diff);
448  const Real sm = smoother(f_diff);
449  const Real dsm = dsmoother(f_diff);
450  // we want: all_q[res_f].f = 0.5 * all_q[res_f].f + all_q[a].f + _smoothing_tol) + ism,
451  // but we have to do the derivatives first
452  for (unsigned i = 0; i < _num_sp; ++i)
453  {
454  for (unsigned j = 0; j < _num_sp; ++j)
455  all_q[res_f].d2g[i][j] =
456  0.5 * (all_q[res_f].d2g[i][j] + all_q[a].d2g[i][j]) +
457  dsm * (all_q[res_f].df[j] - all_q[a].df[j]) * (all_q[res_f].dg[i] - all_q[a].dg[i]) +
458  sm * (all_q[res_f].d2g[i][j] - all_q[a].d2g[i][j]);
459  for (unsigned j = 0; j < _num_intnl; ++j)
460  all_q[res_f].d2g_di[i][j] = 0.5 * (all_q[res_f].d2g_di[i][j] + all_q[a].d2g_di[i][j]) +
461  dsm * (all_q[res_f].df_di[j] - all_q[a].df_di[j]) *
462  (all_q[res_f].dg[i] - all_q[a].dg[i]) +
463  sm * (all_q[res_f].d2g_di[i][j] - all_q[a].d2g_di[i][j]);
464  }
465  for (unsigned i = 0; i < _num_sp; ++i)
466  {
467  all_q[res_f].df[i] = 0.5 * (all_q[res_f].df[i] + all_q[a].df[i]) +
468  sm * (all_q[res_f].df[i] - all_q[a].df[i]);
469  // whether the following (smoothing g with f's smoother) is a good strategy remains to be
470  // seen...
471  all_q[res_f].dg[i] = 0.5 * (all_q[res_f].dg[i] + all_q[a].dg[i]) +
472  sm * (all_q[res_f].dg[i] - all_q[a].dg[i]);
473  }
474  for (unsigned i = 0; i < _num_intnl; ++i)
475  all_q[res_f].df_di[i] = 0.5 * (all_q[res_f].df_di[i] + all_q[a].df_di[i]) +
476  sm * (all_q[res_f].df_di[i] - all_q[a].df_di[i]);
477  all_q[res_f].f = 0.5 * (all_q[res_f].f + all_q[a].f + _smoothing_tol) + ism;
478  }
479  }
480  return all_q[res_f];
481 }

Referenced by MultiParameterPlasticityStressUpdate::lineSearch(), and MultiParameterPlasticityStressUpdate::updateState().

◆ smoother()

Real MultiParameterPlasticityStressUpdate::smoother ( Real  f_diff) const
protectedinherited

Derivative of ismoother.

Definition at line 510 of file MultiParameterPlasticityStressUpdate.C.

511 {
512  if (std::abs(f_diff) >= _smoothing_tol)
513  return 0.0;
514  switch (_smoother_function_type)
515  {
517  return 0.5 * std::sin(f_diff * M_PI * 0.5 / _smoothing_tol);
519  return 0.75 / _smoothing_tol *
520  (f_diff - (_smoothing_tol / 3.0) * Utility::pow<3>(f_diff / _smoothing_tol));
522  return 0.625 / _smoothing_tol *
523  (f_diff - (_smoothing_tol / 5.0) * Utility::pow<5>(f_diff / _smoothing_tol));
525  return (7.0 / 12.0 / _smoothing_tol) *
526  (f_diff - (_smoothing_tol / 7.0) * Utility::pow<7>(f_diff / _smoothing_tol));
527  default:
528  return 0.0;
529  }
530 }

Referenced by MultiParameterPlasticityStressUpdate::smoothAllQuantities().

◆ updateState()

void MultiParameterPlasticityStressUpdate::updateState ( RankTwoTensor strain_increment,
RankTwoTensor inelastic_strain_increment,
const RankTwoTensor rotation_increment,
RankTwoTensor stress_new,
const RankTwoTensor stress_old,
const RankFourTensor elasticity_tensor,
const RankTwoTensor elastic_strain_old,
bool  compute_full_tangent_operator,
RankFourTensor tangent_operator 
)
overrideprotectedvirtualinherited

Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment.

If _fe_problem.currentlyComputingJacobian() = true, then updateState also computes d(stress)/d(strain) (or some approximation to it).

This method is called by ComputeMultipleInelasticStress. This method is pure virutal: all inheriting classes must overwrite this method.

Parameters
strain_incrementUpon input: the strain increment. Upon output: the elastic strain increment
inelastic_strain_incrementThe inelastic_strain resulting from the interative procedure
rotation_incrementThe finite-strain rotation increment
stress_newUpon input: the trial stress that results from applying strain_increment as an elastic strain. Upon output: the admissible stress
stress_oldThe old value of stress
elasticity_tensorThe elasticity tensor
compute_full_tangent_operatorThe calling routine would like the full consistent tangent operator to be placed in tangent_operator, if possible. This is irrelevant if _fe_problem.currentlyComputingJacobian() = false
tangent_operatord(stress)/d(strain), or some approximation to it If compute_full_tangent_operator=false, then tangent_operator=elasticity_tensor is an appropriate choice. tangent_operator is only computed if _fe_problem.currentlyComputingJacobian() = true

Implements StressUpdateBase.

Definition at line 160 of file MultiParameterPlasticityStressUpdate.C.

169 {
170  // Size _yf[_qp] appropriately
171  _yf[_qp].assign(_num_yf, 0);
172  // _plastic_strain and _intnl are usually sized appropriately because they are stateful, but this
173  // Material may be used from a DiracKernel where stateful materials are not allowed. The best we
174  // can do is:
175  if (_intnl[_qp].size() != _num_intnl)
177 
179 
180  if (_t_step >= 2)
181  _step_one = false;
182 
183  // initially assume an elastic deformation
184  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _intnl[_qp].begin());
185 
186  _iter[_qp] = 0.0;
187  _max_iter_used[_qp] = std::max(_max_iter_used[_qp], _max_iter_used_old[_qp]);
188  _linesearch_needed[_qp] = 0.0;
189 
190  computeStressParams(stress_new, _trial_sp);
192 
193  if (yieldF(_yf[_qp]) <= _f_tol)
194  {
196  inelastic_strain_increment.zero();
197  if (_fe_problem.currentlyComputingJacobian())
198  tangent_operator = elasticity_tensor;
199  return;
200  }
201 
202  _stress_trial = stress_new;
203  /* The trial stress must be inadmissible
204  * so we need to return to the yield surface. The following
205  * equations must be satisfied.
206  *
207  * 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i]
208  * 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, i] * dg/dS[i]
209  * ...
210  * 0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, i] * dg/dS[i]
211  * 0 = rhs[N] = f(S, intnl)
212  *
213  * as well as equations defining intnl parameters as functions of
214  * stress_params, trial_stress_params and intnl_old
215  *
216  * The unknowns are S[0], ..., S[N-1], gaE, and the intnl parameters.
217  * Here gaE = ga * _En (the _En serves to make gaE similar magnitude to S)
218  * I find it convenient to solve the first N+1 equations for p, q and gaE,
219  * while substituting the "intnl parameters" equations into these during the solve process
220  */
221 
222  for (auto & deriv : _dvar_dtrial)
223  deriv.assign(_num_sp, 0.0);
224 
225  preReturnMapV(_trial_sp, stress_new, _intnl_old[_qp], _yf[_qp], elasticity_tensor);
226 
227  setEffectiveElasticity(elasticity_tensor);
228 
229  if (_step_one)
230  std::copy(_definitely_ok_sp.begin(), _definitely_ok_sp.end(), _ok_sp.begin());
231  else
232  computeStressParams(stress_old, _ok_sp);
233  std::copy(_intnl_old[_qp].begin(), _intnl_old[_qp].end(), _ok_intnl.begin());
234 
235  // Return-map problem: must apply the following changes in stress_params,
236  // and find the returned stress_params and gaE
237  for (unsigned i = 0; i < _num_sp; ++i)
238  _del_stress_params[i] = _trial_sp[i] - _ok_sp[i];
239 
240  Real step_taken = 0.0; // amount of del_stress_params that we've applied and the return-map
241  // problem has succeeded
242  Real step_size = 1.0; // potentially can apply del_stress_params in substeps
243  Real gaE_total = 0.0;
244 
245  // current values of the yield function, derivatives, etc
246  yieldAndFlow smoothed_q;
247 
248  // In the following sub-stepping procedure it is possible that
249  // the last step is an elastic step, and therefore smoothed_q won't
250  // be computed on the last step, so we have to compute it.
251  bool smoothed_q_calculated = false;
252 
253  while (step_taken < 1.0 && step_size >= _min_step_size)
254  {
255  if (1.0 - step_taken < step_size)
256  // prevent over-shoots of substepping
257  step_size = 1.0 - step_taken;
258 
259  // trial variables in terms of admissible variables
260  for (unsigned i = 0; i < _num_sp; ++i)
261  _trial_sp[i] = _ok_sp[i] + step_size * _del_stress_params[i];
262 
263  // initialize variables that are to be found via Newton-Raphson
265  Real gaE = 0.0;
266 
267  // flags indicating failure of Newton-Raphson and line-search
268  int nr_failure = 0;
269  int ls_failure = 0;
270 
271  // NR iterations taken in this substep
272  unsigned step_iter = 0;
273 
274  // The residual-squared for the line-search
275  Real res2 = 0.0;
276 
277  if (step_size < 1.0 && yieldF(_trial_sp, _ok_intnl) <= _f_tol)
278  // This is an elastic step
279  // The "step_size < 1.0" in above condition is for efficiency: we definitely
280  // know that this is a plastic step if step_size = 1.0
281  smoothed_q_calculated = false;
282  else
283  {
284  // this is a plastic step
285 
286  // initialize current_sp, gaE and current_intnl based on the non-smoothed situation
288  // and find the smoothed yield function, flow potential and derivatives
290  smoothed_q_calculated = true;
291  calculateRHS(_trial_sp, _current_sp, gaE, smoothed_q, _rhs);
292  res2 = calculateRes2(_rhs);
293 
294  // Perform a Newton-Raphson with linesearch to get current_sp, gaE, and also smoothed_q
295  while (res2 > _f_tol2 && step_iter < _max_nr_its && nr_failure == 0 && ls_failure == 0)
296  {
297  // solve the linear system and store the answer (the "updates") in rhs
298  nr_failure = nrStep(smoothed_q, _trial_sp, _current_sp, _current_intnl, gaE, _rhs);
299  if (nr_failure != 0)
300  break;
301 
302  // handle precision loss
303  if (precisionLoss(_rhs, _current_sp, gaE))
304  {
306  {
307  Moose::err << "MultiParameterPlasticityStressUpdate: precision-loss in element "
308  << _current_elem->id() << " quadpoint=" << _qp << ". Stress_params =";
309  for (unsigned i = 0; i < _num_sp; ++i)
310  Moose::err << " " << _current_sp[i];
311  Moose::err << " gaE = " << gaE << "\n";
312  }
313  res2 = 0.0;
314  break;
315  }
316 
317  // apply (parts of) the updates, re-calculate smoothed_q, and res2
318  ls_failure = lineSearch(res2,
319  _current_sp,
320  gaE,
321  _trial_sp,
322  smoothed_q,
323  _ok_intnl,
325  _rhs,
326  _linesearch_needed[_qp]);
327  step_iter++;
328  }
329  }
330  if (res2 <= _f_tol2 && step_iter < _max_nr_its && nr_failure == 0 && ls_failure == 0 &&
331  gaE >= 0.0)
332  {
333  // this Newton-Raphson worked fine, or this was an elastic step
334  std::copy(_current_sp.begin(), _current_sp.end(), _ok_sp.begin());
335  gaE_total += gaE;
336  step_taken += step_size;
338  std::copy(_intnl[_qp].begin(), _intnl[_qp].end(), _ok_intnl.begin());
339  // calculate dp/dp_trial, dp/dq_trial, etc, for Jacobian
340  dVardTrial(!smoothed_q_calculated,
341  _trial_sp,
342  _ok_sp,
343  gaE,
344  _ok_intnl,
345  smoothed_q,
346  step_size,
347  compute_full_tangent_operator,
348  _dvar_dtrial);
349  if (static_cast<Real>(step_iter) > _iter[_qp])
350  _iter[_qp] = static_cast<Real>(step_iter);
351  if (static_cast<Real>(step_iter) > _max_iter_used[_qp])
352  _max_iter_used[_qp] = static_cast<Real>(step_iter);
353  step_size *= 1.1;
354  }
355  else
356  {
357  // Newton-Raphson + line-search process failed
358  step_size *= 0.5;
359  }
360  }
361 
362  if (step_size < _min_step_size)
363  errorHandler("MultiParameterPlasticityStressUpdate: Minimum step-size violated");
364 
365  // success!
366  finalizeReturnProcess(rotation_increment);
367  yieldFunctionValuesV(_ok_sp, _intnl[_qp], _yf[_qp]);
368 
369  if (!smoothed_q_calculated)
370  smoothed_q = smoothAllQuantities(_ok_sp, _intnl[_qp]);
371 
373  _stress_trial, _ok_sp, gaE_total, _intnl[_qp], smoothed_q, elasticity_tensor, stress_new);
374 
376  gaE_total,
377  smoothed_q,
378  elasticity_tensor,
379  stress_new,
380  inelastic_strain_increment);
381 
382  strain_increment = strain_increment - inelastic_strain_increment;
383  _plastic_strain[_qp] = _plastic_strain_old[_qp] + inelastic_strain_increment;
384 
385  if (_fe_problem.currentlyComputingJacobian())
386  // for efficiency, do not compute the tangent operator if not currently computing Jacobian
388  _trial_sp,
389  stress_new,
390  _ok_sp,
391  gaE_total,
392  smoothed_q,
393  elasticity_tensor,
394  compute_full_tangent_operator,
395  _dvar_dtrial,
396  tangent_operator);
397 }

◆ validParams()

InputParameters TwoParameterPlasticityStressUpdate::validParams ( )
static

Definition at line 18 of file TwoParameterPlasticityStressUpdate.C.

19 {
20  InputParameters params = MultiParameterPlasticityStressUpdate::validParams();
21  params.addClassDescription("Return-map and Jacobian algorithms for (P, Q) plastic models");
22  return params;
23 }

Referenced by CappedWeakPlaneStressUpdate::validParams(), and CappedDruckerPragerStressUpdate::validParams().

◆ yieldF() [1/2]

Real MultiParameterPlasticityStressUpdate::yieldF ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl 
) const
protectedinherited

Computes the smoothed yield function.

Parameters
stress_paramsThe stress parameters (eg stress_params[0] = stress_zz and stress_params[1] = sqrt(stress_zx^2 + stress_zy^2))
intnlThe internal parameters (eg intnl[0] is shear, intnl[1] is tensile)
Returns
The smoothed yield function value

Definition at line 688 of file MultiParameterPlasticityStressUpdate.C.

690 {
691  std::vector<Real> yfs(_num_yf);
692  yieldFunctionValuesV(stress_params, intnl, yfs);
693  return yieldF(yfs);
694 }

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ yieldF() [2/2]

Real MultiParameterPlasticityStressUpdate::yieldF ( const std::vector< Real > &  yfs) const
protectedinherited

Computes the smoothed yield function.

Parameters
yfsThe values of the individual yield functions
Returns
The smoothed yield function value

Definition at line 697 of file MultiParameterPlasticityStressUpdate.C.

698 {
699  Real yf = yfs[0];
700  for (std::size_t i = 1; i < yfs.size(); ++i)
701  if (yf >= yfs[i] + _smoothing_tol)
702  // no smoothing is needed, and yf is the biggest yield function
703  continue;
704  else if (yfs[i] >= yf + _smoothing_tol)
705  // no smoothing is needed, and yfs[i] is the biggest yield function
706  yf = yfs[i];
707  else
708  yf = 0.5 * (yf + yfs[i] + _smoothing_tol) + ismoother(yf - yfs[i]);
709  return yf;
710 }

◆ yieldFunctionValues()

virtual void TwoParameterPlasticityStressUpdate::yieldFunctionValues ( Real  p,
Real  q,
const std::vector< Real > &  intnl,
std::vector< Real > &  yf 
) const
protectedpure virtual

Computes the values of the yield functions, given p, q and intnl parameters.

Derived classes must override this, to provide the values of the yield functions in yf.

Parameters
pp stress
qq stress
intnlThe internal parameters
[out]yfThe yield function values

Implemented in CappedDruckerPragerStressUpdate, and CappedWeakPlaneStressUpdate.

Referenced by yieldFunctionValuesV().

◆ yieldFunctionValuesV()

void TwoParameterPlasticityStressUpdate::yieldFunctionValuesV ( const std::vector< Real > &  stress_params,
const std::vector< Real > &  intnl,
std::vector< Real > &  yf 
) const
overrideprotectedvirtual

Computes the values of the yield functions, given stress_params and intnl parameters.

Derived classes must override this, to provide the values of the yield functions in yf.

Parameters
stress_params[in]The stress parameters
intnl[in]The internal parameters
[out]yfThe yield function values

Implements MultiParameterPlasticityStressUpdate.

Definition at line 42 of file TwoParameterPlasticityStressUpdate.C.

45 {
46  const Real p = stress_params[0];
47  const Real q = stress_params[1];
48  yieldFunctionValues(p, q, intnl, yf);
49 }

Member Data Documentation

◆ _base_name

const std::string StressUpdateBase::_base_name
protectedinherited

Name used as a prefix for all material properties related to the stress update model.

Definition at line 128 of file StressUpdateBase.h.

◆ _Cij

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_Cij
protectedinherited

◆ _current_intnl

std::vector<Real> MultiParameterPlasticityStressUpdate::_current_intnl
privateinherited

The current values of the internal params during the Newton-Raphson.

Definition at line 737 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _current_sp

std::vector<Real> MultiParameterPlasticityStressUpdate::_current_sp
privateinherited

The current values of the stress params during the Newton-Raphson.

Definition at line 732 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _definitely_ok_sp

const std::vector<Real> MultiParameterPlasticityStressUpdate::_definitely_ok_sp
protectedinherited

◆ _del_stress_params

std::vector<Real> MultiParameterPlasticityStressUpdate::_del_stress_params
privateinherited

_del_stress_params = trial_stress_params - ok_sp This is fixed at the beginning of the return-map process, irrespective of substepping.

The return-map problem is: apply del_stress_params to stress_prams, and then find an admissible (returned) stress_params and gaE

Definition at line 727 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _dgaE_dpt

Real TwoParameterPlasticityStressUpdate::_dgaE_dpt
protected

derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation)

Definition at line 55 of file TwoParameterPlasticityStressUpdate.h.

Referenced by CappedWeakPlaneCosseratStressUpdate::consistentTangentOperator(), CappedWeakPlaneStressUpdate::consistentTangentOperator(), and consistentTangentOperatorV().

◆ _dgaE_dqt

Real TwoParameterPlasticityStressUpdate::_dgaE_dqt
protected

derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculation)

Definition at line 57 of file TwoParameterPlasticityStressUpdate.h.

Referenced by CappedWeakPlaneCosseratStressUpdate::consistentTangentOperator(), CappedWeakPlaneStressUpdate::consistentTangentOperator(), and consistentTangentOperatorV().

◆ _dp_dpt

Real TwoParameterPlasticityStressUpdate::_dp_dpt
protected

◆ _dp_dqt

Real TwoParameterPlasticityStressUpdate::_dp_dqt
protected

◆ _dq_dpt

Real TwoParameterPlasticityStressUpdate::_dq_dpt
protected

◆ _dq_dqt

Real TwoParameterPlasticityStressUpdate::_dq_dqt
protected

◆ _dvar_dtrial

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_dvar_dtrial
privateinherited

d({stress_param[i], gaE})/d(trial_stress_param[j])

Definition at line 703 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _Eij

std::vector<std::vector<Real> > MultiParameterPlasticityStressUpdate::_Eij
protectedinherited

◆ _En

Real MultiParameterPlasticityStressUpdate::_En
protectedinherited

◆ _Epp

Real TwoParameterPlasticityStressUpdate::_Epp
protected

◆ _Eqq

Real TwoParameterPlasticityStressUpdate::_Eqq
protected

◆ _f_tol

const Real MultiParameterPlasticityStressUpdate::_f_tol
protectedinherited

◆ _f_tol2

const Real MultiParameterPlasticityStressUpdate::_f_tol2
protectedinherited

Square of the yield-function tolerance.

Definition at line 168 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _intnl

MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_intnl
protectedinherited

◆ _intnl_old

const MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_intnl_old
protectedinherited

◆ _iter

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_iter
protectedinherited

Number of Newton-Raphson iterations used in the return-map.

Definition at line 199 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _linesearch_needed

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_linesearch_needed
protectedinherited

Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise)

Definition at line 208 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_iter_used

MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_max_iter_used
protectedinherited

Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation.

Definition at line 202 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::initQpStatefulProperties(), MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_iter_used_old

const MaterialProperty<Real>& MultiParameterPlasticityStressUpdate::_max_iter_used_old
protectedinherited

Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of the entire simulation.

Definition at line 205 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::propagateQpStatefulProperties(), and MultiParameterPlasticityStressUpdate::updateState().

◆ _max_nr_its

const unsigned MultiParameterPlasticityStressUpdate::_max_nr_its
protectedinherited

Maximum number of Newton-Raphson iterations allowed in the return-map process.

Definition at line 153 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _min_step_size

const Real MultiParameterPlasticityStressUpdate::_min_step_size
protectedinherited

In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-increments of size greater than this value.

Definition at line 175 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _num_intnl

const unsigned MultiParameterPlasticityStressUpdate::_num_intnl
protectedinherited

◆ _num_pq

constexpr static int TwoParameterPlasticityStressUpdate::_num_pq = 2
staticconstexprprotected

Number of variables = 2 = (p, q)

Definition at line 40 of file TwoParameterPlasticityStressUpdate.h.

Referenced by d2stress_param_dstress(), and dstress_param_dstress().

◆ _num_sp

const unsigned MultiParameterPlasticityStressUpdate::_num_sp
protectedinherited

◆ _num_yf

const unsigned MultiParameterPlasticityStressUpdate::_num_yf
protectedinherited

◆ _ok_intnl

std::vector<Real> MultiParameterPlasticityStressUpdate::_ok_intnl
privateinherited

The state (ok_sp, ok_intnl) is known to be admissible.

Definition at line 718 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _ok_sp

std::vector<Real> MultiParameterPlasticityStressUpdate::_ok_sp
privateinherited

The state (ok_sp, ok_intnl) is known to be admissible, so ok_sp are stress_params that are "OK".

If the strain_increment is applied in substeps then ok_sp is updated after each sub strain_increment is applied and the return-map is successful. At the end of the entire return-map process _ok_sp will contain the stress_params where (_ok_sp, _intnl) is admissible.

Definition at line 713 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _p_trial

Real TwoParameterPlasticityStressUpdate::_p_trial
protected

Trial value of p.

Definition at line 43 of file TwoParameterPlasticityStressUpdate.h.

◆ _perform_finite_strain_rotations

const bool MultiParameterPlasticityStressUpdate::_perform_finite_strain_rotations
protectedinherited

◆ _plastic_strain

MaterialProperty<RankTwoTensor>& MultiParameterPlasticityStressUpdate::_plastic_strain
protectedinherited

◆ _plastic_strain_old

const MaterialProperty<RankTwoTensor>& MultiParameterPlasticityStressUpdate::_plastic_strain_old
protectedinherited

◆ _q_trial

Real TwoParameterPlasticityStressUpdate::_q_trial
protected

Trial value of q.

Definition at line 46 of file TwoParameterPlasticityStressUpdate.h.

◆ _rhs

std::vector<Real> MultiParameterPlasticityStressUpdate::_rhs
privateinherited

0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1, i] * dg/dS[i] ...

0 = rhs[N-1] = S[N-1] - S[N-1]^trial + ga * E[N-1, i] * dg/dS[i] 0 = rhs[N] = f(S, intnl) Here N = num_sp

Definition at line 698 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _smoother_function_type

enum MultiParameterPlasticityStressUpdate::SmootherFunctionType MultiParameterPlasticityStressUpdate::_smoother_function_type
privateinherited

◆ _smoothing_tol

const Real MultiParameterPlasticityStressUpdate::_smoothing_tol
protectedinherited

◆ _smoothing_tol2

const Real MultiParameterPlasticityStressUpdate::_smoothing_tol2
protectedinherited

Square of the smoothing tolerance.

Definition at line 162 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::ismoother().

◆ _step_one

bool MultiParameterPlasticityStressUpdate::_step_one
protectedinherited

handles case of initial_stress that is inadmissible being supplied

Definition at line 178 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _stress_trial

RankTwoTensor MultiParameterPlasticityStressUpdate::_stress_trial
privateinherited

"Trial" value of stress that is set at the beginning of the return-map process.

It is fixed at stress_old + Eijkl * strain_increment irrespective of any sub-stepping

Definition at line 688 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _tensor_dimensionality

constexpr static unsigned MultiParameterPlasticityStressUpdate::_tensor_dimensionality = 3
staticconstexprprotectedinherited

◆ _trial_sp

std::vector<Real> MultiParameterPlasticityStressUpdate::_trial_sp
privateinherited

"Trial" value of stress_params that initializes the return-map process This is derived from stress = stress_old + Eijkl * strain_increment.

However, since the return-map process can fail and be restarted by applying strain_increment in multiple substeps, _trial_sp can vary from substep to substep.

Definition at line 681 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _warn_about_precision_loss

const bool MultiParameterPlasticityStressUpdate::_warn_about_precision_loss
protectedinherited

Output a warning message if precision loss is encountered during the return-map process.

Definition at line 181 of file MultiParameterPlasticityStressUpdate.h.

Referenced by MultiParameterPlasticityStressUpdate::updateState().

◆ _yf

MaterialProperty<std::vector<Real> >& MultiParameterPlasticityStressUpdate::_yf
protectedinherited

The documentation for this class was generated from the following files:
MultiParameterPlasticityStressUpdate::computeAllQV
virtual void computeAllQV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
MultiParameterPlasticityStressUpdate::_max_nr_its
const unsigned _max_nr_its
Maximum number of Newton-Raphson iterations allowed in the return-map process.
Definition: MultiParameterPlasticityStressUpdate.h:153
MultiParameterPlasticityStressUpdate::_warn_about_precision_loss
const bool _warn_about_precision_loss
Output a warning message if precision loss is encountered during the return-map process.
Definition: MultiParameterPlasticityStressUpdate.h:181
TwoParameterPlasticityStressUpdate::d2qdstress2
virtual RankFourTensor d2qdstress2(const RankTwoTensor &stress) const =0
d2(q)/d(stress)/d(stress) Derived classes must override this
MultiParameterPlasticityStressUpdate::_stress_trial
RankTwoTensor _stress_trial
"Trial" value of stress that is set at the beginning of the return-map process.
Definition: MultiParameterPlasticityStressUpdate.h:688
MultiParameterPlasticityStressUpdate::ismoother
Real ismoother(Real f_diff) const
Smooths yield functions.
Definition: MultiParameterPlasticityStressUpdate.C:484
MultiParameterPlasticityStressUpdate::MultiParameterPlasticityStressUpdate
MultiParameterPlasticityStressUpdate(const InputParameters &parameters, unsigned num_sp, unsigned num_yf, unsigned num_intnl)
Definition: MultiParameterPlasticityStressUpdate.C:82
MultiParameterPlasticityStressUpdate::_current_intnl
std::vector< Real > _current_intnl
The current values of the internal params during the Newton-Raphson.
Definition: MultiParameterPlasticityStressUpdate.h:737
MultiParameterPlasticityStressUpdate::SmootherFunctionType::poly1
MultiParameterPlasticityStressUpdate::SmootherFunctionType::cos
MultiParameterPlasticityStressUpdate::_smoothing_tol
const Real _smoothing_tol
Smoothing tolerance: edges of the yield surface get smoothed by this amount.
Definition: MultiParameterPlasticityStressUpdate.h:159
TangentCalculationMethod::FULL
MultiParameterPlasticityStressUpdate::finalizeReturnProcess
virtual void finalizeReturnProcess(const RankTwoTensor &rotation_increment)
Derived classes may use this to perform calculations after the return-map process has completed succe...
Definition: MultiParameterPlasticityStressUpdate.C:672
MultiParameterPlasticityStressUpdate::_smoother_function_type
enum MultiParameterPlasticityStressUpdate::SmootherFunctionType _smoother_function_type
MultiParameterPlasticityStressUpdate::_Cij
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
Definition: MultiParameterPlasticityStressUpdate.h:144
MultiParameterPlasticityStressUpdate::lineSearch
int lineSearch(Real &res2, std::vector< Real > &stress_params, Real &gaE, const std::vector< Real > &trial_stress_params, yieldAndFlow &smoothed_q, const std::vector< Real > &intnl_ok, std::vector< Real > &intnl, std::vector< Real > &rhs, Real &linesearch_needed) const
Performs a line-search to find stress_params and gaE Upon entry:
Definition: MultiParameterPlasticityStressUpdate.C:553
TwoParameterPlasticityStressUpdate::d2pdstress2
virtual RankFourTensor d2pdstress2(const RankTwoTensor &stress) const =0
d2(p)/d(stress)/d(stress) Derived classes must override this
TwoParameterPlasticityStressUpdate::yieldFunctionValues
virtual void yieldFunctionValues(Real p, Real q, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given p, q and intnl parameters.
MultiParameterPlasticityStressUpdate::SmootherFunctionType::poly3
MultiParameterPlasticityStressUpdate::_iter
MaterialProperty< Real > & _iter
Number of Newton-Raphson iterations used in the return-map.
Definition: MultiParameterPlasticityStressUpdate.h:199
MultiParameterPlasticityStressUpdate::_f_tol2
const Real _f_tol2
Square of the yield-function tolerance.
Definition: MultiParameterPlasticityStressUpdate.h:168
MultiParameterPlasticityStressUpdate::_min_step_size
const Real _min_step_size
In order to help the Newton-Raphson procedure, the applied strain increment may be applied in sub-inc...
Definition: MultiParameterPlasticityStressUpdate.h:175
MultiParameterPlasticityStressUpdate::setEffectiveElasticity
virtual void setEffectiveElasticity(const RankFourTensor &Eijkl)=0
Sets _Eij and _En and _Cij.
TwoParameterPlasticityStressUpdate::setEppEqq
virtual void setEppEqq(const RankFourTensor &Eijkl, Real &Epp, Real &Eqq) const =0
Set Epp and Eqq based on the elasticity tensor Derived classes must override this.
TwoParameterPlasticityStressUpdate::setIntnlValues
virtual void setIntnlValues(Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of p and q, their current values,...
MultiParameterPlasticityStressUpdate::initQpStatefulProperties
virtual void initQpStatefulProperties() override
Definition: MultiParameterPlasticityStressUpdate.C:141
MultiParameterPlasticityStressUpdate::_ok_intnl
std::vector< Real > _ok_intnl
The state (ok_sp, ok_intnl) is known to be admissible.
Definition: MultiParameterPlasticityStressUpdate.h:718
TwoParameterPlasticityStressUpdate::_dp_dqt
Real _dp_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:63
MultiParameterPlasticityStressUpdate::_linesearch_needed
MaterialProperty< Real > & _linesearch_needed
Whether a line-search was needed in the latest Newton-Raphson process (1 if true, 0 otherwise)
Definition: MultiParameterPlasticityStressUpdate.h:208
TwoParameterPlasticityStressUpdate::_Epp
Real _Epp
elasticity tensor in p direction
Definition: TwoParameterPlasticityStressUpdate.h:49
TwoParameterPlasticityStressUpdate::_dgaE_dqt
Real _dgaE_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:57
MultiParameterPlasticityStressUpdate::dVardTrial
void dVardTrial(bool elastic_only, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, Real step_size, bool compute_full_tangent_operator, std::vector< std::vector< Real >> &dvar_dtrial) const
Calculates derivatives of the stress_params and gaE with repect to the trial values of the stress_par...
Definition: MultiParameterPlasticityStressUpdate.C:873
MultiParameterPlasticityStressUpdate::initializeVarsV
virtual void initializeVarsV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const
Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.
Definition: MultiParameterPlasticityStressUpdate.C:713
MultiParameterPlasticityStressUpdate::precisionLoss
bool precisionLoss(const std::vector< Real > &solution, const std::vector< Real > &stress_params, Real gaE) const
Check whether precision loss has occurred.
Definition: MultiParameterPlasticityStressUpdate.C:983
MultiParameterPlasticityStressUpdate::validParams
static InputParameters validParams()
Definition: MultiParameterPlasticityStressUpdate.C:23
TwoParameterPlasticityStressUpdate::_dq_dqt
Real _dq_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:65
MultiParameterPlasticityStressUpdate::_plastic_strain_old
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
Old value of plastic strain.
Definition: MultiParameterPlasticityStressUpdate.h:187
MultiParameterPlasticityStressUpdate::_Eij
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
Definition: MultiParameterPlasticityStressUpdate.h:138
MultiParameterPlasticityStressUpdate::yieldF
Real yieldF(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Computes the smoothed yield function.
Definition: MultiParameterPlasticityStressUpdate.C:688
MultiParameterPlasticityStressUpdate::_del_stress_params
std::vector< Real > _del_stress_params
_del_stress_params = trial_stress_params - ok_sp This is fixed at the beginning of the return-map pro...
Definition: MultiParameterPlasticityStressUpdate.h:727
MultiParameterPlasticityStressUpdate::_intnl_old
const MaterialProperty< std::vector< Real > > & _intnl_old
old values of internal parameters
Definition: MultiParameterPlasticityStressUpdate.h:193
MultiParameterPlasticityStressUpdate::computeStressParams
virtual void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const =0
Computes stress_params, given stress.
TwoParameterPlasticityStressUpdate::computePQ
virtual void computePQ(const RankTwoTensor &stress, Real &p, Real &q) const =0
Computes p and q, given stress.
MultiParameterPlasticityStressUpdate::initializeReturnProcess
virtual void initializeReturnProcess()
Derived classes may use this to perform calculations before any return-map process is performed,...
Definition: MultiParameterPlasticityStressUpdate.C:667
MultiParameterPlasticityStressUpdate::smoother
Real smoother(Real f_diff) const
Derivative of ismoother.
Definition: MultiParameterPlasticityStressUpdate.C:510
MultiParameterPlasticityStressUpdate::_rhs
std::vector< Real > _rhs
0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, i] * dg/dS[i] 0 = rhs[1] = S[1] - S[1]^trial + ga * E[1,...
Definition: MultiParameterPlasticityStressUpdate.h:698
MultiParameterPlasticityStressUpdate::_num_sp
const unsigned _num_sp
Number of stress parameters.
Definition: MultiParameterPlasticityStressUpdate.h:132
MultiParameterPlasticityStressUpdate::yieldFunctionValuesV
virtual void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given stress_params and intnl parameters.
TwoParameterPlasticityStressUpdate::_dp_dpt
Real _dp_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:59
TwoParameterPlasticityStressUpdate::_q_trial
Real _q_trial
Trial value of q.
Definition: TwoParameterPlasticityStressUpdate.h:46
MultiParameterPlasticityStressUpdate::_yf
MaterialProperty< std::vector< Real > > & _yf
yield functions
Definition: MultiParameterPlasticityStressUpdate.h:196
MultiParameterPlasticityStressUpdate::_num_yf
const unsigned _num_yf
Number of yield functions.
Definition: MultiParameterPlasticityStressUpdate.h:147
MultiParameterPlasticityStressUpdate::dnRHSdVar
void dnRHSdVar(const yieldAndFlow &smoothed_q, const std::vector< std::vector< Real >> &dintnl, const std::vector< Real > &stress_params, Real gaE, std::vector< double > &jac) const
Derivative of -RHS with respect to the stress_params and gaE, placed into an array ready for solving ...
Definition: MultiParameterPlasticityStressUpdate.C:828
MultiParameterPlasticityStressUpdate::_plastic_strain
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain
Definition: MultiParameterPlasticityStressUpdate.h:184
MultiParameterPlasticityStressUpdate::_definitely_ok_sp
const std::vector< Real > _definitely_ok_sp
An admissible value of stress_params at the initial time.
Definition: MultiParameterPlasticityStressUpdate.h:135
TwoParameterPlasticityStressUpdate::preReturnMap
virtual void preReturnMap(Real p_trial, Real q_trial, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
Derived classes may employ this function to record stuff or do other computations prior to the return...
Definition: TwoParameterPlasticityStressUpdate.C:77
TwoParameterPlasticityStressUpdate::dpdstress
virtual RankTwoTensor dpdstress(const RankTwoTensor &stress) const =0
d(p)/d(stress) Derived classes must override this
MultiParameterPlasticityStressUpdate::_trial_sp
std::vector< Real > _trial_sp
"Trial" value of stress_params that initializes the return-map process This is derived from stress = ...
Definition: MultiParameterPlasticityStressUpdate.h:681
TwoParameterPlasticityStressUpdate::_p_trial
Real _p_trial
Trial value of p.
Definition: TwoParameterPlasticityStressUpdate.h:43
TwoParameterPlasticityStressUpdate::_dgaE_dpt
Real _dgaE_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:55
MultiParameterPlasticityStressUpdate::_num_intnl
const unsigned _num_intnl
Number of internal parameters.
Definition: MultiParameterPlasticityStressUpdate.h:150
RankTwoTensor
RankTwoTensorTempl< Real > RankTwoTensor
Definition: ACGrGrElasticDrivingForce.h:17
MultiParameterPlasticityStressUpdate::_step_one
bool _step_one
handles case of initial_stress that is inadmissible being supplied
Definition: MultiParameterPlasticityStressUpdate.h:178
MultiParameterPlasticityStressUpdate::dsmoother
Real dsmoother(Real f_diff) const
Derivative of smoother.
Definition: MultiParameterPlasticityStressUpdate.C:533
MultiParameterPlasticityStressUpdate::calculateRes2
Real calculateRes2(const std::vector< Real > &rhs) const
Calculates the residual-squared for the Newton-Raphson + line-search.
Definition: MultiParameterPlasticityStressUpdate.C:802
MultiParameterPlasticityStressUpdate::setIntnlDerivativesV
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of stress_params,...
TwoParameterPlasticityStressUpdate::initializeVars
virtual void initializeVars(Real p_trial, Real q_trial, const std::vector< Real > &intnl_old, Real &p, Real &q, Real &gaE, std::vector< Real > &intnl) const
Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm.
Definition: TwoParameterPlasticityStressUpdate.C:88
MultiParameterPlasticityStressUpdate::errorHandler
virtual void errorHandler(const std::string &message) const
Performs any necessary cleaning-up, then throw MooseException(message)
Definition: MultiParameterPlasticityStressUpdate.C:661
MultiParameterPlasticityStressUpdate::_current_sp
std::vector< Real > _current_sp
The current values of the stress params during the Newton-Raphson.
Definition: MultiParameterPlasticityStressUpdate.h:732
MultiParameterPlasticityStressUpdate::_En
Real _En
normalising factor
Definition: MultiParameterPlasticityStressUpdate.h:141
TwoParameterPlasticityStressUpdate::_num_pq
constexpr static int _num_pq
Number of variables = 2 = (p, q)
Definition: TwoParameterPlasticityStressUpdate.h:40
TwoParameterPlasticityStressUpdate::setIntnlDerivatives
virtual void setIntnlDerivatives(Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of p and q,...
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
TwoParameterPlasticityStressUpdate::setStressAfterReturn
virtual void setStressAfterReturn(const RankTwoTensor &stress_trial, Real p_ok, Real q_ok, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
MultiParameterPlasticityStressUpdate::consistentTangentOperatorV
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto)
Calculates the consistent tangent operator.
Definition: MultiParameterPlasticityStressUpdate.C:725
MultiParameterPlasticityStressUpdate::_max_iter_used
MaterialProperty< Real > & _max_iter_used
Maximum number of Newton-Raphson iterations used in the return-map during the course of the entire si...
Definition: MultiParameterPlasticityStressUpdate.h:202
MultiParameterPlasticityStressUpdate::SmootherFunctionType::poly2
MultiParameterPlasticityStressUpdate::setIntnlValuesV
virtual void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of stress_params, their current values,...
MultiParameterPlasticityStressUpdate::_dvar_dtrial
std::vector< std::vector< Real > > _dvar_dtrial
d({stress_param[i], gaE})/d(trial_stress_param[j])
Definition: MultiParameterPlasticityStressUpdate.h:703
MultiParameterPlasticityStressUpdate::smoothAllQuantities
yieldAndFlow smoothAllQuantities(const std::vector< Real > &stress_params, const std::vector< Real > &intnl) const
Calculates all yield functions and derivatives, and then performs the smoothing scheme.
Definition: MultiParameterPlasticityStressUpdate.C:400
TwoParameterPlasticityStressUpdate::_dq_dpt
Real _dq_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:61
MultiParameterPlasticityStressUpdate::calculateRHS
void calculateRHS(const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, std::vector< Real > &rhs) const
Calculates the RHS in the following 0 = rhs[0] = S[0] - S[0]^trial + ga * E[0, j] * dg/dS[j] 0 = rhs[...
Definition: MultiParameterPlasticityStressUpdate.C:811
RankTwoTensorTempl< Real >
TwoParameterPlasticityStressUpdate::_Eqq
Real _Eqq
elasticity tensor in q direction
Definition: TwoParameterPlasticityStressUpdate.h:52
MultiParameterPlasticityStressUpdate::_ok_sp
std::vector< Real > _ok_sp
The state (ok_sp, ok_intnl) is known to be admissible, so ok_sp are stress_params that are "OK".
Definition: MultiParameterPlasticityStressUpdate.h:713
MultiParameterPlasticityStressUpdate::setStressAfterReturnV
virtual void setStressAfterReturnV(const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
MultiParameterPlasticityStressUpdate::preReturnMapV
virtual void preReturnMapV(const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
Derived classes may employ this function to record stuff or do other computations prior to the return...
Definition: MultiParameterPlasticityStressUpdate.C:678
MultiParameterPlasticityStressUpdate::_smoothing_tol2
const Real _smoothing_tol2
Square of the smoothing tolerance.
Definition: MultiParameterPlasticityStressUpdate.h:162
MultiParameterPlasticityStressUpdate::nrStep
int nrStep(const yieldAndFlow &smoothed_q, const std::vector< Real > &trial_stress_params, const std::vector< Real > &stress_params, const std::vector< Real > &intnl, Real gaE, std::vector< Real > &rhs) const
Performs a Newton-Raphson step to attempt to zero rhs Upon return, rhs will contain the solution.
Definition: MultiParameterPlasticityStressUpdate.C:637
RankFourTensor
RankFourTensorTempl< Real > RankFourTensor
Definition: ACGrGrElasticDrivingForce.h:20
TwoParameterPlasticityStressUpdate::computeAllQ
virtual void computeAllQ(Real p, Real q, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
MultiParameterPlasticityStressUpdate::_tensor_dimensionality
constexpr static unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout tensor_mechanics)
Definition: MultiParameterPlasticityStressUpdate.h:129
MultiParameterPlasticityStressUpdate::_intnl
MaterialProperty< std::vector< Real > > & _intnl
internal parameters
Definition: MultiParameterPlasticityStressUpdate.h:190
TwoParameterPlasticityStressUpdate::consistentTangentOperator
virtual void consistentTangentOperator(const RankTwoTensor &stress_trial, Real p_trial, Real q_trial, const RankTwoTensor &stress, Real p, Real q, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, RankFourTensor &cto) const
Calculates the consistent tangent operator.
Definition: TwoParameterPlasticityStressUpdate.C:203
MultiParameterPlasticityStressUpdate::_max_iter_used_old
const MaterialProperty< Real > & _max_iter_used_old
Old value of maximum number of Newton-Raphson iterations used in the return-map during the course of ...
Definition: MultiParameterPlasticityStressUpdate.h:205
TwoParameterPlasticityStressUpdate::dqdstress
virtual RankTwoTensor dqdstress(const RankTwoTensor &stress) const =0
d(q)/d(stress) Derived classes must override this
MultiParameterPlasticityStressUpdate::setInelasticStrainIncrementAfterReturn
virtual void setInelasticStrainIncrementAfterReturn(const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment) const
Sets inelastic strain increment from the returned configuration This is called after the return-map p...
Definition: MultiParameterPlasticityStressUpdate.C:786
MultiParameterPlasticityStressUpdate::_f_tol
const Real _f_tol
The yield-function tolerance.
Definition: MultiParameterPlasticityStressUpdate.h:165