15 #include "libmesh/int_range.h" 23 params.
addClassDescription(
"Compute state (stress and internal parameters such as inelastic " 24 "strains and internal parameters) using an Newton process for one " 25 "creep and one plasticity model");
27 "Creep model that derives from PowerLawCreepStressUpdate.");
29 "plasticity_model",
"Plasticity model that derives from IsotropicPlasticityStressUpdate.");
39 std::vector<MaterialName>
42 std::vector<MaterialName> names = {getParam<MaterialName>(
"creep_model"),
43 getParam<MaterialName>(
"plasticity_model")};
53 mooseError(
"Error in ComputeCreepPlasticityStress: two models are required.");
57 mooseError(
"Model " + getParam<MaterialName>(
"creep_model") +
58 " is not a compatible creep model in ComputeCreepPlasticityStress.");
62 mooseError(
"Model " + getParam<MaterialName>(
"plasticity_model") +
63 " is not a compatible plasticity model in ComputeCreepPlasticityStress.");
73 <<
"iteration output for ComputeCreepPlasticityStress solve:" 74 <<
" time=" <<
_t <<
" int_pt=" <<
_qp << std::endl;
85 const Real effective_trial_stress =
86 std::sqrt(1.5 * deviatoric_trial_stress.
doubleContraction(deviatoric_trial_stress));
106 if (yield_condition > 0.0)
116 elastic_strain_increment,
119 const Real max_effective_plastic_strain_increment =
150 unsigned int counter = 0;
154 const Real reference_residual = effective_trial_stress / threeG;
173 Real A12 = A11 + 1.0;
184 Real rhs1 = creep_residual;
185 Real rhs2 = plasticity_residual;
193 const Real a = -A21 / A11;
198 Real x2 = rhs2 / A22;
199 Real x1 = (rhs1 - A12 * x2) / A11;
218 const Real factor = 0.9 * effective_trial_stress / (threeG * sum);
243 std::sqrt(creep_residual * creep_residual + plasticity_residual * plasticity_residual);
247 _console <<
"stress iteration number = " << counter <<
"\n relative residual = " 248 << (0 == reference_residual ? 0 : residual / reference_residual)
250 <<
"\n absolute residual = " << residual
251 <<
"\n creep residual = " << creep_residual
252 <<
"\n plasticity residual = " << plasticity_residual
253 <<
"\n creep iteration increment = " << x1
254 <<
"\n plasticity iteration increment = " << x2
257 <<
"\n max creep scalar strain = " << max_effective_creep_strain_increment
258 <<
"\n max plasticity scalar strain = " << max_effective_plastic_strain_increment
269 std::stringstream msg;
270 msg <<
"\n relative residual = " 271 << (0 == reference_residual ? 0 : residual / reference_residual)
273 <<
"\n absolute residual = " << residual <<
"\n creep residual = " << creep_residual
274 <<
"\n plasticity residual = " << plasticity_residual
277 <<
"\n max creep scalar strain = " << max_effective_creep_strain_increment
278 <<
"\n max plasticity scalar strain = " << max_effective_plastic_strain_increment
281 throw MooseException(
"Max stress iteration hit during ComputeCreepPlasticityStress solve! " +
289 combined_inelastic_strain_increment.
zero();
293 if (yield_condition > 0.0)
354 effective_stress = std::sqrt(1.5 * deviatoric_stress.
doubleContraction(deviatoric_stress));
362 Real effective_trial_stress,
const RankTwoTensor & deviatoric_trial_stress)
368 deviatoric_trial_stress *
375 deviatoric_trial_stress *
virtual GenericReal< is_ad > computeResidual(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the residual for a predicted value of the scalar.
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
static InputParameters validParams()
virtual void computeQpJacobianMult()
Using _elasticity_tensor[_qp] and the consistent tangent operators, _consistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp].
FEProblemBase & _fe_problem
ComputeCreepPlasticityStress(const InputParameters ¶meters)
This class uses the stress update material in a radial return isotropic creep model.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
virtual void computeStressFinalize(const GenericRankTwoTensor< is_ad > &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations.
This class uses the Discrete material in a radial return isotropic plasticity model.
const bool _internal_solve_full_iteration_history
const Real _relative_tolerance
virtual void initialSetup() override
RankTwoTensor _undamaged_stress_old
ComputeCreepPlasticityStress computes the stress, the consistent tangent operator (or an approximatio...
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor) override
Perform any necessary initialization before return mapping iterations.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
const MaterialProperty< RankTwoTensor > & _strain_increment
virtual GenericReal< is_ad > computeDerivative(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the derivative of the residual as a function of the scalar variable.
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
virtual std::vector< MaterialName > getInelasticModelNames() override
void updateEffectiveInelasticStrain(const GenericReal< is_ad > &increment)
virtual void computeAdmissibleState(unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &inelastic_strain_increment, RankFourTensor &consistent_tangent_operator)
Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_n...
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
RankTwoTensorTempl< Real > deviatoric() const
PowerLawCreepStressUpdate * _creep_model
void computeInelasticStrainIncrements(Real effective_trial_stress, const RankTwoTensor &deviatoric_trial_stress)
Real _effective_plastic_strain_increment
const GenericReal< is_ad > & effectiveInelasticStrainIncrement() const
Current value of scalar inelastic strain.
virtual void computeStressFinalize(const GenericRankTwoTensor< is_ad > &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations.
DamageBaseTempl< false > * _damage_model
Pointer to the damage model.
void computeTangentOperators()
Real doubleContraction(const RankTwoTensorTempl< Real > &a) const
ComputeMultipleInelasticStressBase computes the stress, the consistent tangent operator (or an approx...
IsotropicPlasticityStressUpdate * _plasticity_model
virtual void resetIncrementalMaterialProperties() override
Reset material properties.
void computeTangentOperator(Real effective_trial_stress, const RankTwoTensor &stress_new, RankFourTensor &tangent_operator)
Calculate the tangent_operator.
std::array< RankTwoTensor, 2 > _inelastic_strain_increment
MaterialProperty< Real > & _material_timestep_limit
unsigned _num_models
number of plastic models
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
virtual void initialSetup() override
virtual void updateQpState(RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment) override
Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order...
const MaterialProperty< RankTwoTensor > & _stress_old
Old state of the stress tensor material property.
virtual GenericReal< is_ad > computeResidual(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the residual for a predicted value of the scalar.
void finalizeConstitutiveModels()
GenericReal< is_ad > yieldCondition() const
void setQp(unsigned int qp)
Sets the value of the global variable _qp for inheriting classes.
IntRange< T > make_range(T beg, T end)
void computeStress(const RankTwoTensor &elastic_strain_increment, RankTwoTensor &stress)
void mooseError(Args &&... args) const
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
const ConsoleStream _console
const bool & currentlyComputingJacobian() const
virtual GenericReal< is_ad > computeDerivative(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the derivative of the residual as a function of the scalar variable.
void updateEffectiveInelasticStrainIncrement(const GenericReal< is_ad > &eisi)
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
Strain tensors.
auto index_range(const T &sizable)
const Real _absolute_tolerance
Real _effective_creep_strain_increment
const unsigned int _max_iterations
Input parameters associated with the recompute iteration to return the stress state to the yield surf...
registerMooseObject("SolidMechanicsApp", ComputeCreepPlasticityStress)