12 #include "libmesh/utility.h" 22 "This material computes the non-linear homogenized gauge stress in order to compute the " 23 "viscoplastic responce due to creep in porous materials. This material must be used in " 24 "conjunction with ADComputeMultiplePorousInelasticStress");
25 MooseEnum viscoplasticity_model(
"LPS GTN",
"LPS");
27 "viscoplasticity_model", viscoplasticity_model,
"Which viscoplastic model to use");
28 MooseEnum pore_shape_model(
"spherical cylindrical",
"spherical");
29 params.
addParam<
MooseEnum>(
"pore_shape_model", pore_shape_model,
"Which pore shape model to use");
31 "coefficient",
"Material property name for the leading coefficient for Norton power law");
33 "power",
"power>=1.0",
"Stress exponent for Norton power law");
35 "maximum_gauge_ratio",
37 "Maximum ratio between the gauge stress and the equivalent stress. This " 38 "should be a high number. Note that this does not set an upper bound on the value, but " 39 "rather will help with convergence of the inner Newton loop");
41 "minimum_equivalent_stress",
43 "Minimum value of equivalent stress below which viscoplasticiy is not calculated.");
46 "Maximum value of equivalent stress above which an exception is thrown " 47 "instead of calculating the properties in this material.");
49 params.
addParamNamesToGroup(
"verbose maximum_gauge_ratio maximum_equivalent_stress",
"Advanced");
59 _power(getParam<
Real>(
"power")),
61 _coefficient(getADMaterialProperty<
Real>(
"coefficient")),
62 _gauge_stress(declareADProperty<
Real>(_base_name +
"gauge_stress")),
63 _maximum_gauge_ratio(getParam<
Real>(
"maximum_gauge_ratio")),
64 _minimum_equivalent_stress(getParam<
Real>(
"minimum_equivalent_stress")),
65 _maximum_equivalent_stress(getParam<
Real>(
"maximum_equivalent_stress")),
68 _dhydro_stress_dsigma(_identity_two / 3.0),
96 const ADReal equiv_stress = dev_stress_squared == 0.0 ? 0.0 : std::sqrt(1.5 * dev_stress_squared);
103 inelastic_strain_increment.
zero();
107 mooseException(
"In ",
109 ": equivalent stress (",
111 ") is higher than maximum_equivalent_stress (",
113 ").\nCutting time step.");
123 inelastic_strain_increment,
129 elastic_strain_increment -= inelastic_strain_increment;
142 const ADReal new_equiv_stress =
143 new_dev_stress_squared == 0.0 ? 0.0 : std::sqrt(1.5 * new_dev_stress_squared);
146 mooseException(
"In ",
148 ": updated equivalent stress (",
150 ") is greater than initial equivalent stress (",
152 "). Try decreasing max_inelastic_increment to avoid this exception.");
160 return effective_trial_stress;
172 return effective_trial_stress;
177 const ADReal & trial_gauge)
180 const ADReal dM_dtrial_gauge = -M / trial_gauge;
182 const ADReal residual_left = Utility::pow<2>(equiv_stress / trial_gauge);
183 const ADReal dresidual_left_dtrial_gauge = -2.0 * residual_left / trial_gauge;
185 ADReal residual = residual_left;
209 _derivative += dresidual_dh * dh_dM * dM_dtrial_gauge;
214 Moose::out <<
"in computeResidual:\n" 216 <<
" equiv_stress: " << equiv_stress <<
" trial_grage: " << trial_gauge
217 <<
" M: " << M << std::endl;
218 Moose::out <<
" residual: " << residual <<
" derivative: " <<
_derivative << std::endl;
232 const ADReal dmod_dM = (n + 1.0) / n * mod / M;
233 return dmod_dM *
std::pow(1.0 + mod / n, n - 1.0);
241 const ADReal & equiv_stress,
251 ADReal dresidual_dhydro_stress = 0.0;
262 const ADReal dresidual_dh =
265 dresidual_dhydro_stress = dresidual_dh * dh_dM * dM_dhydro_stress;
270 ADReal dresidual_dequiv_stress = 2.0 * equiv_stress / Utility::pow<2>(gauge_stress);
275 const ADRankTwoTensor dequiv_stress_dsigma = 1.5 * dev_stress / equiv_stress;
279 dresidual_dequiv_stress * dequiv_stress_dsigma;
285 return dgauge_dsigma;
293 const ADReal & equiv_stress,
299 gauge_stress = equiv_stress;
307 mooseAssert(gauge_stress >= equiv_stress,
308 "Gauge stress calculated in inner Newton solve is less than the equivalent stress.");
315 inelastic_strain_increment =
321 const unsigned int total_it)
325 *iter_output <<
"At element " <<
_current_elem->id() <<
" _qp=" <<
_qp <<
" Coordinates " 333 const ADReal & gauge_stress)
virtual ADReal maximumPermissibleValue(const ADReal &effective_trial_stress) const override
virtual void computeStressFinalize(const GenericRankTwoTensor< is_ad > &)
Perform any necessary steps to finalize state after return mapping iterations.
static InputParameters validParams()
GenericMaterialProperty< Real, is_ad > & _effective_inelastic_strain
Effective inelastic strain material property.
const Real _minimum_equivalent_stress
Minimum value of equivalent stress below which viscoplasticiy is not calculated.
bool relativeFuzzyGreaterThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
virtual ADReal computeResidual(const ADReal &effective_trial_stress, const ADReal &scalar) override
Perform any necessary steps to finalize state after return mapping iterations.
virtual ADReal minimumPermissibleValue(const ADReal &effective_trial_stress) const override
ADReal _hydro_stress
Container for hydrostatic stress.
ViscoplasticityModel
Enum to choose which viscoplastic model to use.
const Real _power
Exponent on the effective stress.
void updateIntermediatePorosity(const GenericRankTwoTensor< is_ad > &elastic_strain_increment)
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
GenericReal< is_ad > _intermediate_porosity
Container for the porosity calculated from all other intelastic models except the current model...
ADMaterialProperty< Real > & _gauge_stress
Gauge stress.
virtual ADReal initialGuess(const ADReal &effective_trial_stress) override
Compute an initial guess for the value of the scalar.
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
RankTwoTensorTempl< T > deviatoric() const
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
void returnMappingSolve(const GenericReal< is_ad > &effective_trial_stress, GenericReal< is_ad > &scalar, const ConsoleStream &console)
Perform the return mapping iterations.
void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it) override
Output summary information for the convergence history of the model.
virtual Real computeReferenceResidual(const ADReal &effective_trial_stress, const ADReal &scalar_effective_inelastic_strain) override
ADViscoplasticityStressUpdate(const InputParameters ¶meters)
enum ADViscoplasticityStressUpdate::ViscoplasticityModel _model
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.
Base class that provides capability for Newton return mapping iterations on a single variable...
T doubleContraction(const RankTwoTensorTempl< T > &a) const
ADReal _derivative
Container for _derivative.
const Real _maximum_gauge_ratio
Maximum ratio between the gauge stress and the equilvalent stress.
const Real _maximum_equivalent_stress
Maximum value of equivalent stress above which an exception is thrown.
static InputParameters validParams()
const bool _verbose
Flag to enable verbose output.
const Real _power_factor
Power factor used for LPS model.
const Elem *const & _current_elem
GenericMaterialProperty< RankTwoTensor, is_ad > & _inelastic_strain
Creep strain material property.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void updateState(ADRankTwoTensor &strain_increment, ADRankTwoTensor &inelastic_strain_increment, const ADRankTwoTensor &rotation_increment, ADRankTwoTensor &stress_new, const RankTwoTensor &stress_old, const ADRankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=_identityTensor) override
void computeInelasticStrainIncrement(ADReal &gauge_stress, ADReal &dpsi_dgauge, ADRankTwoTensor &creep_strain_increment, const ADReal &equiv_stress, const ADRankTwoTensor &dev_stress, const ADRankTwoTensor &stress)
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
const MooseArray< Point > & _q_point
enum ADViscoplasticityStressUpdate::PoreShapeModel _pore_shape
virtual void computeStressInitialize(const GenericReal< is_ad > &, const GenericRankFourTensor< is_ad > &)
Perform any necessary initialization before return mapping iterations.
ADRankTwoTensor computeDGaugeDSigma(const ADReal &gauge_stress, const ADReal &equiv_stress, const ADRankTwoTensor &dev_stress, const ADRankTwoTensor &stress)
const Real _pore_shape_factor
Pore shape factor depending on pore shape model.
ADReal computeH(const Real n, const ADReal &gauge_stress, const bool derivative=false)
registerMooseObject("SolidMechanicsApp", ADViscoplasticityStressUpdate)
const ConsoleStream _console
const ADMaterialProperty< Real > & _coefficient
Leading coefficient.
MooseUnits pow(const MooseUnits &, int)
bool _check_range
Whether to check to see whether iterative solution is within admissible range, and set within that ra...
PoreShapeModel
Enum to choose which pore shape model to use.
const Elem & get(const ElemType type_in)
const MaterialProperty< Real > & _effective_inelastic_strain_old
const RankTwoTensor _dhydro_stress_dsigma
Derivative of hydrostatic stress with respect to the stress tensor.