#include <ADLAROMANCEStressUpdateBase.h>
|
| ADLAROMANCEStressUpdateBase (const InputParameters ¶meters) |
|
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) override |
| A radial return (J2) mapping method is performed with return mapping iterations. More...
|
|
virtual Real | computeReferenceResidual (const ADReal &effective_trial_stress, const ADReal &scalar_effective_inelastic_strain) override |
| Compute a reference quantity to be used for checking relative convergence. More...
|
|
virtual ADReal | minimumPermissibleValue (const ADReal &) const override |
| Compute the minimum permissible value of the scalar. More...
|
|
virtual ADReal | maximumPermissibleValue (const ADReal &effective_trial_stress) const override |
| Compute the maximum permissible value of the scalar. More...
|
|
bool | requiresIsotropicTensor () override |
| Does the model require the elasticity tensor to be isotropic? More...
|
|
void | setQp (unsigned int qp) |
| Sets the value of the global variable _qp for inheriting classes. More...
|
|
|
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 |
|
|
virtual void | initialSetup () override |
|
virtual void | initQpStatefulProperties () override |
|
virtual ADReal | computeResidual (const ADReal &effective_trial_stress, const ADReal &scalar) override |
| Compute the residual for a predicted value of the scalar. More...
|
|
virtual ADReal | computeDerivative (const ADReal &, const ADReal &) override |
| Compute the derivative of the residual as a function of the scalar variable. More...
|
|
virtual void | computeStressFinalize (const ADRankTwoTensor &plastic_strain_increment) override |
| Perform any necessary steps to finalize state after return mapping iterations. More...
|
|
virtual Real | computeTimeStepLimit () override |
| Compute the limiting value of the time step for this material. More...
|
|
void | computeROMStrainRate (const Real dt, const Real &mobile_dislocations_old, const Real &immobile_dislocations_old, const ADReal &trial_stress, const Real &effective_strain_old, const ADReal &temperature, const ADReal &environmental, ADReal &mobile_dislocation_increment, ADReal &immobile_dislocation_increment, ADReal &rom_effective_strain, ADReal &rom_effective_strain_derivative) |
| Computes the ROM Strain rate. More...
|
|
void | checkInputWindows (std::vector< ADReal > &input) |
| Function to check input values against applicability windows set by ROM data set. More...
|
|
void | convertInput (const std::vector< ADReal > &input, std::vector< std::vector< ADReal >> &converted, std::vector< std::vector< ADReal >> &dconverted) |
| Convert the input variables into the form expected by the ROM Legendre polynomials to have a normalized space from [-1, 1] so that every variable has equal weight. More...
|
|
void | buildPolynomials (const std::vector< std::vector< ADReal >> &rom_inputs, const std::vector< std::vector< ADReal >> &drom_inputs, std::vector< std::vector< std::vector< ADReal >>> &polynomial_inputs, std::vector< std::vector< std::vector< ADReal >>> &dpolynomial_inputs) |
| Assemble the array of Legendre polynomials to be multiplied by the ROM coefficients. More...
|
|
void | computeValues (const std::vector< std::vector< Real >> &coefs, const std::vector< std::vector< std::vector< ADReal >>> &polynomial_inputs, const std::vector< std::vector< std::vector< ADReal >>> &dpolynomial_inputs, std::vector< ADReal > &rom_outputs, std::vector< ADReal > &drom_outputs) |
| Arranges the calculated Legendre polynomials into the order expected by the ROM coefficients and ultiplies the Legendre polynomials by the ROM coefficients to compute the the predicted output values. More...
|
|
void | convertOutput (const Real dt, const std::vector< ADReal > &old_input_values, const std::vector< ADReal > &rom_outputs, const std::vector< ADReal > &drom_outputs, std::vector< ADReal > &input_value_increments, std::vector< ADReal > &dinput_value_increments) |
| Computes the output variable increments from the ROM predictions by bringing out of the normalized map to the actual physical values. More...
|
|
ADReal | computePolynomial (const ADReal &value, const unsigned int degree, const bool derivative=false) |
| Calculate the value or derivative of Legendre polynomial up to 3rd order. More...
|
|
std::vector< std::vector< std::vector< Real > > > | getTransformedLimits () const |
|
std::vector< std::vector< unsigned int > > | getMakeFrameHelper () const |
|
virtual std::vector< std::vector< ROMInputTransform > > | getTransform ()=0 |
|
virtual std::vector< std::vector< Real > > | getTransformCoefs ()=0 |
|
virtual std::vector< std::vector< Real > > | getInputLimits ()=0 |
|
virtual std::vector< std::vector< Real > > | getCoefs ()=0 |
|
| ADMaterialProperty (Real) &_creep_rate |
| Creep rate material property. More...
|
|
virtual void | propagateQpStatefulProperties () override |
| If updateState is not called during a timestep, this will be. More...
|
|
| ADMaterialProperty (RankTwoTensor) &_creep_strain |
| Creep strain material property. More...
|
|
void | propagateQpStatefulPropertiesRadialReturn () |
| Propagate the properties pertaining to this intermediate class. More...
|
|
virtual void | computeStressInitialize (const ADReal &, const ADRankFourTensor &) |
| Perform any necessary initialization before return mapping iterations. More...
|
|
void | outputIterationSummary (std::stringstream *iter_output, const unsigned int total_it) override |
| Output summary information for the convergence history of the model. More...
|
|
void | returnMappingSolve (const ADReal &effective_trial_stress, ADReal &scalar, const ConsoleStream &console) |
| Perform the return mapping iterations. More...
|
|
virtual ADReal | initialGuess (const ADReal &) |
| Compute an initial guess for the value of the scalar. More...
|
|
virtual void | iterationFinalize (ADReal) |
| Finalize internal state variables for a model for a given iteration. More...
|
|
virtual void | outputIterationStep (std::stringstream *iter_output, const ADReal &effective_trial_stress, const ADReal &scalar, const Real reference_residual) |
| Output information for a single iteration step to build the convergence history of the model. More...
|
|
bool | converged (const ADReal &residual, const Real reference) |
| Check to see whether the residual is within the convergence limits. More...
|
|
|
SolveState | internalSolve (const ADReal effective_trial_stress, ADReal &scalar, std::stringstream *iter_output=nullptr) |
| Method called from within this class to perform the actual return mappping iterations. More...
|
|
bool | convergedAcceptable (const unsigned int it, const Real reference) |
| Check to see whether the residual is within acceptable convergence limits. More...
|
|
void | checkPermissibleRange (ADReal &scalar, ADReal &scalar_increment, const ADReal &scalar_old, const ADReal min_permissible_scalar, const ADReal max_permissible_scalar, std::stringstream *iter_output) |
| Check to see whether solution is within admissible range, and set it within that range if it is not. More...
|
|
void | updateBounds (const ADReal &scalar, const ADReal &residual, const Real init_resid_sign, ADReal &scalar_upper_bound, ADReal &scalar_lower_bound, std::stringstream *iter_output) |
| Update the upper and lower bounds of the root for the effective inelastic strain. More...
|
|
template<ComputeStage compute_stage>
class ADLAROMANCEStressUpdateBase< compute_stage >
Definition at line 22 of file ADLAROMANCEStressUpdateBase.h.
◆ InternalSolveOutput
template<ComputeStage compute_stage>
◆ SolveState
template<ComputeStage compute_stage>
◆ WindowFailure
template<ComputeStage compute_stage>
Enum to error, warn, or ignore checks that ensure ROM input is within applicability window.
Enumerator |
---|
ERROR | |
WARN | |
IGNORE | |
Definition at line 220 of file ADLAROMANCEStressUpdateBase.h.
◆ ADLAROMANCEStressUpdateBase()
template<ComputeStage compute_stage>
Definition at line 86 of file ADLAROMANCEStressUpdateBase.C.
91 _window(getParam<Real>(
"input_window_limit")),
93 parameters.get<MooseEnum>(
"input_window_failure_action").getEnum<
WindowFailure>()),
96 _mobile_dislocations(declareADProperty<Real>(
_base_name +
"mobile_dislocations")),
100 _mobile_function(isParamValid(
"mobile_dislocation_density_forcing_function")
101 ? &getFunction(
"mobile_dislocation_density_forcing_function")
105 _immobile_dislocations(declareADProperty<Real>(
_base_name +
"immobile_dislocations")),
110 ? &getFunction(
"immobile_dislocation_density_forcing_function")
117 ? &getFunction(
"old_creep_strain_forcing_function")
120 _creep_rate(declareADProperty<Real>(
_base_name +
"creep_rate")),
121 _failed(declareProperty<Real>(
"ROM_failure")),
◆ ADMaterialProperty() [1/4]
template<ComputeStage compute_stage>
Creep strain material property.
◆ ADMaterialProperty() [2/4]
template<ComputeStage compute_stage>
Creep rate material property.
◆ ADMaterialProperty() [3/4]
template<ComputeStage compute_stage>
Material properties for immobile (locked) dislocation densities (1/m^2)
◆ ADMaterialProperty() [4/4]
template<ComputeStage compute_stage>
Material properties for mobile (glissile) dislocation densities (1/m^2)
◆ buildPolynomials()
template<ComputeStage compute_stage>
void ADLAROMANCEStressUpdateBase< compute_stage >::buildPolynomials |
( |
const std::vector< std::vector< ADReal >> & |
rom_inputs, |
|
|
const std::vector< std::vector< ADReal >> & |
drom_inputs, |
|
|
std::vector< std::vector< std::vector< ADReal >>> & |
polynomial_inputs, |
|
|
std::vector< std::vector< std::vector< ADReal >>> & |
dpolynomial_inputs |
|
) |
| |
|
protected |
Assemble the array of Legendre polynomials to be multiplied by the ROM coefficients.
- Parameters
-
rom_inputs | Vector of converted input values |
drom_inputs | Vector of derivative of converted input values with respect to stress |
polynomial_inputs | Vector of Legendre polynomial transformation |
dpolynomial_inputs | Vector of derivative of Legendre polynomial transformation with respect to stress |
Definition at line 451 of file ADLAROMANCEStressUpdateBase.C.
461 for (
unsigned int k = 0; k <
_degree; ++k)
466 dpolynomial_inputs[i][j][k] = 0.0;
470 dpolynomial_inputs[i][j][k] = drom_inputs[i][j] *
472 polynomial_inputs[i][j][k];
◆ checkInputWindows()
template<ComputeStage compute_stage>
Function to check input values against applicability windows set by ROM data set.
- Parameters
-
input | Vector of input values |
Definition at line 360 of file ADLAROMANCEStressUpdateBase.C.
362 if (compute_stage != RESIDUAL)
374 if (input[j] < low_limit || input[j] > high_limit)
376 _failed[_qp] += (j + 1) * (j + 1);
380 ": input parameter number input=",
386 ") is out of range (",
396 ": input parameter number input=",
402 ") is out of range (",
◆ checkPermissibleRange()
template<ComputeStage compute_stage>
void ADSingleVariableReturnMappingSolution< compute_stage >::checkPermissibleRange |
( |
ADReal & |
scalar, |
|
|
ADReal & |
scalar_increment, |
|
|
const ADReal & |
scalar_old, |
|
|
const ADReal |
min_permissible_scalar, |
|
|
const ADReal |
max_permissible_scalar, |
|
|
std::stringstream * |
iter_output |
|
) |
| |
|
privateinherited |
Check to see whether solution is within admissible range, and set it within that range if it is not.
- Parameters
-
scalar | Current value of the inelastic strain increment |
scalar_increment | Incremental change in scalar from the previous iteration |
scalar_old | Previous value of scalar |
min_permissible_scalar | Minimum permissible value of scalar |
max_permissible_scalar | Maximum permissible value of scalar |
iter_output | Output stream |
Definition at line 334 of file ADSingleVariableReturnMappingSolution.C.
342 if (scalar > max_permissible_scalar)
344 scalar_increment = (max_permissible_scalar - scalar_old) / 2.0;
345 scalar = scalar_old + scalar_increment;
347 *iter_output <<
"Scalar greater than maximum ("
348 << MetaPhysicL::raw_value(max_permissible_scalar)
349 <<
") adjusted scalar=" << MetaPhysicL::raw_value(scalar)
350 <<
" scalar_increment=" << MetaPhysicL::raw_value(scalar_increment) << std::endl;
352 else if (scalar < min_permissible_scalar)
354 scalar_increment = (min_permissible_scalar - scalar_old) / 2.0;
355 scalar = scalar_old + scalar_increment;
357 *iter_output <<
"Scalar less than minimum (" << MetaPhysicL::raw_value(min_permissible_scalar)
358 <<
") adjusted scalar=" << MetaPhysicL::raw_value(scalar)
359 <<
" scalar_increment=" << MetaPhysicL::raw_value(scalar_increment) << std::endl;
◆ computeDerivative()
template<ComputeStage compute_stage>
virtual ADReal ADLAROMANCEStressUpdateBase< compute_stage >::computeDerivative |
( |
const ADReal & |
effective_trial_stress, |
|
|
const ADReal & |
scalar |
|
) |
| |
|
inlineoverrideprotectedvirtual |
◆ computePolynomial()
template<ComputeStage compute_stage>
ADReal ADLAROMANCEStressUpdateBase< compute_stage >::computePolynomial |
( |
const ADReal & |
value, |
|
|
const unsigned int |
degree, |
|
|
const bool |
derivative = false |
|
) |
| |
|
protected |
Calculate the value or derivative of Legendre polynomial up to 3rd order.
- Parameters
-
- Returns
- Computed value from Legendre polynomial
Definition at line 535 of file ADLAROMANCEStressUpdateBase.C.
545 else if (degree == 1)
551 else if (degree == 2)
555 return 1.5 * Utility::pow<2>(value) - 0.5;
560 return 7.5 * Utility::pow<2>(value) - 1.5;
561 return 2.5 * Utility::pow<3>(value) - 1.5 * value;
◆ computeReferenceResidual()
template<ComputeStage compute_stage>
Real ADRadialReturnStressUpdate< compute_stage >::computeReferenceResidual |
( |
const ADReal & |
effective_trial_stress, |
|
|
const ADReal & |
scalar |
|
) |
| |
|
overridevirtualinherited |
Compute a reference quantity to be used for checking relative convergence.
This should be in strain increment units for all models for consistency.
- Parameters
-
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
Implements ADSingleVariableReturnMappingSolution< compute_stage >.
Definition at line 124 of file ADRadialReturnStressUpdate.C.
128 MetaPhysicL::raw_value(scalar_effective_inelastic_strain);
◆ computeResidual()
template<ComputeStage compute_stage>
Compute the residual for a predicted value of the scalar.
This residual should be in strain increment units for all models for consistency.
- Parameters
-
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
Implements ADSingleVariableReturnMappingSolution< compute_stage >.
Definition at line 180 of file ADLAROMANCEStressUpdateBase.C.
193 const ADReal trial_stress_mpa = (effective_trial_stress -
_three_shear_modulus * scalar) * 1.0e-6;
195 if (trial_stress_mpa < 0.0)
196 mooseException(
"In ",
198 ": previously calculated scalar (",
199 MetaPhysicL::raw_value(scalar),
200 ") is too high resulting in a negative trial stress (",
201 MetaPhysicL::raw_value(trial_stress_mpa),
202 "). Cutting timestep.");
204 Real effective_strain_old;
208 effective_strain_old =
211 ADReal rom_effective_strain = 0.0;
212 ADReal derivative_rom_effective_strain = 0.0;
218 effective_strain_old,
223 rom_effective_strain,
224 derivative_rom_effective_strain);
226 if (
_verbose && compute_stage == RESIDUAL)
228 Moose::out <<
"Verbose information from " << _name <<
": \n";
229 Moose::out <<
" dt: " << _dt <<
"\n";
230 Moose::out <<
" old mobile disl: " <<
_mobile_old <<
"\n";
231 Moose::out <<
" old immobile disl: " <<
_immobile_old <<
"\n";
232 Moose::out <<
" initial stress (MPa): " << effective_trial_stress * 1.0e-6 <<
"\n";
233 Moose::out <<
" temperature: " <<
_temperature[_qp] <<
"\n";
234 Moose::out <<
" environmental factor: " <<
_environmental[_qp] <<
"\n";
235 Moose::out <<
" calculated scalar strain value: " << scalar <<
"\n";
236 Moose::out <<
" trial stress into rom (MPa): " << trial_stress_mpa <<
"\n";
237 Moose::out <<
" old effective strain: " << effective_strain_old <<
"\n";
238 Moose::out <<
" ROM outputs \n";
239 Moose::out <<
" effective incremental strain from rom: " << rom_effective_strain <<
"\n";
240 Moose::out <<
" new effective strain: " << effective_strain_old + rom_effective_strain <<
"\n";
248 _creep_rate[_qp] = rom_effective_strain / _dt;
251 return rom_effective_strain - scalar;
◆ computeROMStrainRate()
template<ComputeStage compute_stage>
void ADLAROMANCEStressUpdateBase< compute_stage >::computeROMStrainRate |
( |
const Real |
dt, |
|
|
const Real & |
mobile_dislocations_old, |
|
|
const Real & |
immobile_dislocations_old, |
|
|
const ADReal & |
trial_stress, |
|
|
const Real & |
effective_strain_old, |
|
|
const ADReal & |
temperature, |
|
|
const ADReal & |
environmental, |
|
|
ADReal & |
mobile_dislocation_increment, |
|
|
ADReal & |
immobile_dislocation_increment, |
|
|
ADReal & |
rom_effective_strain, |
|
|
ADReal & |
rom_effective_strain_derivative |
|
) |
| |
|
protected |
Computes the ROM Strain rate.
- Parameters
-
dt | Timestep size |
mobile_dislocations_old | Mobile dislocation density from previous timestep |
immobile_dislocations_old | Immobile dislocation density from previous timestep |
trial_stress | Trial stress from radial return method |
effective_strain_old | Effective strain from the previous timestep |
temperature | Temperature variable value |
environmental | Environmental variable value |
mobile_dislocation_increment | Mobile dislocation density incremental change |
immobile_dislocation_increment | Immobile dislocation density incremental change |
rom_effective_strain | ROM calculated effective strain |
rom_effective_strain_derivative | Derivative of ROM calculated effective strain with respect to stress |
Definition at line 301 of file ADLAROMANCEStressUpdateBase.C.
315 std::vector<ADReal> input_values = {mobile_dislocations_old,
316 immobile_dislocations_old,
318 effective_strain_old,
321 input_values.push_back(environmental);
329 std::vector<ADReal> old_input_values = {
330 mobile_dislocations_old, immobile_dislocations_old, effective_strain_old};
332 std::vector<std::vector<std::vector<ADReal>>> polynomial_inputs(
335 std::vector<ADReal> input_value_increments(
_num_outputs);
337 std::vector<std::vector<std::vector<ADReal>>> dpolynomial_inputs(
340 std::vector<ADReal> dinput_value_increments(
_num_outputs);
342 buildPolynomials(rom_inputs, drom_inputs, polynomial_inputs, dpolynomial_inputs);
348 input_value_increments,
349 dinput_value_increments);
351 mobile_dislocation_increment = input_value_increments[0];
352 immobile_dislocation_increment = input_value_increments[1];
353 rom_effective_strain = input_value_increments[2];
355 rom_effective_strain_derivative = dinput_value_increments[2];
◆ computeStressFinalize()
template<ComputeStage compute_stage>
Perform any necessary steps to finalize state after return mapping iterations.
- Parameters
-
inelasticStrainIncrement | Inelastic strain increment |
Reimplemented from ADRadialReturnCreepStressUpdateBase< compute_stage >.
Definition at line 256 of file ADLAROMANCEStressUpdateBase.C.
262 if (
_verbose && compute_stage == RESIDUAL)
264 Moose::out <<
"Finalized verbose information from " << _name <<
"\n";
265 Moose::out <<
" increment effective creep strain: "
266 << std::sqrt(2.0 / 3.0 *
267 plastic_strain_increment.doubleContraction(plastic_strain_increment))
269 Moose::out <<
" effective_creep_strain: "
270 << std::sqrt(2.0 / 3.0 * _creep_strain[_qp].doubleContraction(_creep_strain[_qp]))
272 Moose::out <<
" new mobile dislocations: " << _mobile_dislocations[_qp] <<
"\n";
273 Moose::out <<
" new immobile dislocations: " << _immobile_dislocations[_qp] <<
"\n"
278 plastic_strain_increment);
◆ computeStressInitialize()
template<ComputeStage compute_stage>
|
inlineprotectedvirtualinherited |
◆ computeTimeStepLimit()
template<ComputeStage compute_stage>
◆ computeValues()
template<ComputeStage compute_stage>
void ADLAROMANCEStressUpdateBase< compute_stage >::computeValues |
( |
const std::vector< std::vector< Real >> & |
coefs, |
|
|
const std::vector< std::vector< std::vector< ADReal >>> & |
polynomial_inputs, |
|
|
const std::vector< std::vector< std::vector< ADReal >>> & |
dpolynomial_inputs, |
|
|
std::vector< ADReal > & |
rom_outputs, |
|
|
std::vector< ADReal > & |
drom_outputs |
|
) |
| |
|
protected |
Arranges the calculated Legendre polynomials into the order expected by the ROM coefficients and ultiplies the Legendre polynomials by the ROM coefficients to compute the the predicted output values.
- Parameters
-
coefs | Legendre polynomials |
polynomial_inputs | Vector of Legendre polynomial transformation |
dpolynomial_inputs | Vector of derivative of Legendre polynomial transformation with respect to stress |
rom_outputs | Outputs from ROM |
drom_outputs | Derivative of outputs from ROM with respect to stress |
Definition at line 481 of file ADLAROMANCEStressUpdateBase.C.
490 rom_outputs[i] = 0.0;
491 drom_outputs[i] = 0.0;
494 ADReal xvals = coefs[i][j];
502 rom_outputs[i] += xvals;
503 drom_outputs[i] += dxvals * xvals;
◆ converged()
template<ComputeStage compute_stage>
Check to see whether the residual is within the convergence limits.
- Parameters
-
residual | Current value of the residual |
reference | Current value of the reference quantity |
- Returns
- Whether the model converged
Definition at line 301 of file ADSingleVariableReturnMappingSolution.C.
304 const Real residual = MetaPhysicL::raw_value(ad_residual);
◆ convergedAcceptable()
template<ComputeStage compute_stage>
Check to see whether the residual is within acceptable convergence limits.
This will only return true if it has been determined that progress is no longer being made and that the residual is within the acceptable limits.
- Parameters
-
residual | Current iteration count |
residual | Current value of the residual |
reference | Current value of the reference quantity |
- Returns
- Whether the model converged
Definition at line 311 of file ADSingleVariableReturnMappingSolution.C.
322 const Real convergence_history_factor = 10.0;
323 if (std::abs(
_residual * convergence_history_factor) <
◆ convertInput()
template<ComputeStage compute_stage>
void ADLAROMANCEStressUpdateBase< compute_stage >::convertInput |
( |
const std::vector< ADReal > & |
input, |
|
|
std::vector< std::vector< ADReal >> & |
converted, |
|
|
std::vector< std::vector< ADReal >> & |
dconverted |
|
) |
| |
|
protected |
Convert the input variables into the form expected by the ROM Legendre polynomials to have a normalized space from [-1, 1] so that every variable has equal weight.
- Parameters
-
input | Vector of input values |
converted | Vector of converted input values |
dconverted | Vector of derivative of converted input values with respect to stress |
Definition at line 416 of file ADLAROMANCEStressUpdateBase.C.
444 dconverted[i][j] = 0.0;
◆ convertOutput()
template<ComputeStage compute_stage>
void ADLAROMANCEStressUpdateBase< compute_stage >::convertOutput |
( |
const Real |
dt, |
|
|
const std::vector< ADReal > & |
old_input_values, |
|
|
const std::vector< ADReal > & |
rom_outputs, |
|
|
const std::vector< ADReal > & |
drom_outputs, |
|
|
std::vector< ADReal > & |
input_value_increments, |
|
|
std::vector< ADReal > & |
dinput_value_increments |
|
) |
| |
|
protected |
Computes the output variable increments from the ROM predictions by bringing out of the normalized map to the actual physical values.
- Parameters
-
dt | Timestep size |
old_input_values | Previous timestep values of ROM inputs |
rom_outputs | Outputs from ROM |
drom_outputs | Derivative of outputs from ROM with respect to stress |
input_value_increments | Incremental change of input values |
input_value_increments | Derivative of the incremental change of input values with respect to stress |
Definition at line 510 of file ADLAROMANCEStressUpdateBase.C.
520 input_value_increments[i] = std::exp(rom_outputs[i]) * dt;
521 if (i == 0 || i == 1)
523 dinput_value_increments[i] = 0.0;
524 input_value_increments[i] *= old_input_values[i];
526 input_value_increments[i] *= -1.0;
529 dinput_value_increments[i] = input_value_increments[i] * drom_outputs[i];
◆ getCoefs()
template<ComputeStage compute_stage>
◆ getInputLimits()
template<ComputeStage compute_stage>
◆ getMakeFrameHelper()
template<ComputeStage compute_stage>
◆ getTransform()
template<ComputeStage compute_stage>
◆ getTransformCoefs()
template<ComputeStage compute_stage>
◆ getTransformedLimits()
template<ComputeStage compute_stage>
Definition at line 567 of file ADLAROMANCEStressUpdateBase.C.
569 std::vector<std::vector<std::vector<Real>>> transformed_limits(
576 for (
unsigned int k = 0; k < 2; ++k)
588 return transformed_limits;
◆ initialGuess()
template<ComputeStage compute_stage>
|
inlineprotectedvirtualinherited |
Compute an initial guess for the value of the scalar.
For some cases, an intellegent starting point can provide enhanced robustness in the Newton iterations. This is also an opportunity for classes that derive from this to perform initialization tasks.
- Parameters
-
effective_trial_stress | Effective trial stress |
Reimplemented in ADViscoplasticityStressUpdate< compute_stage >.
Definition at line 82 of file ADSingleVariableReturnMappingSolution.h.
◆ initialSetup()
template<ComputeStage compute_stage>
Definition at line 129 of file ADLAROMANCEStressUpdateBase.C.
135 mooseError(
"In ", _name,
": _num_outputs (",
_num_outputs,
") is not 3");
139 mooseError(
"In ", _name,
": _num_inputs (",
_num_inputs,
") is not 5 or 6");
144 mooseError(
"In ", _name,
": transform_coef is the wrong shape!");
148 mooseError(
"In ", _name,
": input_limits is the wrong shape!");
152 mooseError(
"In ", _name,
": coefs is the wrong shape!");
157 mooseError(
"In ", _name,
": degree must be 1, 2, 3 or 4.");
162 Moose::out <<
"ROM model info:\n name:\t" << _name <<
"\n number of outputs:\t" <<
_num_outputs
164 <<
"\n degree (max Legendre degree + constant):\t" <<
_degree
165 <<
"\n number of coefficients:\t" <<
_num_coefs << std::endl;
◆ initQpStatefulProperties()
template<ComputeStage compute_stage>
◆ internalSolve()
template<ComputeStage compute_stage>
Method called from within this class to perform the actual return mappping iterations.
- Parameters
-
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
iter_output | Output stream – if null, no output is produced |
- Returns
- Whether the solution was successful
Definition at line 162 of file ADSingleVariableReturnMappingSolution.C.
166 ADReal scalar_old = scalar;
167 ADReal scalar_increment = 0.0;
170 ADReal scalar_upper_bound = max_permissible_scalar;
171 ADReal scalar_lower_bound = min_permissible_scalar;
177 Real init_resid_sign = MathUtils::sign(MetaPhysicL::raw_value(
_residual));
194 scalar = scalar_old + scalar_increment;
200 min_permissible_scalar,
201 max_permissible_scalar,
210 scalar,
_residual, init_resid_sign, scalar_upper_bound, scalar_lower_bound, iter_output);
219 bool modified_increment =
false;
226 ADReal alpha = residual_old / (residual_old -
_residual);
227 alpha = MathUtils::clamp(alpha, 1.0e-2, 1.0);
231 modified_increment =
true;
232 scalar_increment *= alpha;
234 *iter_output <<
" Line search alpha = " << MetaPhysicL::raw_value(alpha)
235 <<
" increment = " << MetaPhysicL::raw_value(scalar_increment)
245 if (scalar_old + scalar_increment >= scalar_upper_bound ||
246 scalar_old + scalar_increment <= scalar_lower_bound)
248 if (scalar_upper_bound != max_permissible_scalar &&
249 scalar_lower_bound != min_permissible_scalar)
251 const Real frac = 0.5;
253 (1.0 - frac) * scalar_lower_bound + frac * scalar_upper_bound - scalar_old;
254 modified_increment =
true;
256 *iter_output <<
" Trial scalar_increment exceeded bounds. Setting between "
257 "lower/upper bounds. frac: "
258 << frac << std::endl;
265 if (modified_increment)
267 scalar = scalar_old + scalar_increment;
◆ iterationFinalize()
template<ComputeStage compute_stage>
|
inlineprotectedvirtualinherited |
◆ maximumPermissibleValue()
template<ComputeStage compute_stage>
◆ minimumPermissibleValue()
template<ComputeStage compute_stage>
virtual ADReal ADRadialReturnStressUpdate< compute_stage >::minimumPermissibleValue |
( |
const ADReal & |
effective_trial_stress | ) |
const |
|
inlineoverridevirtualinherited |
◆ outputIterationStep()
template<ComputeStage compute_stage>
void ADSingleVariableReturnMappingSolution< compute_stage >::outputIterationStep |
( |
std::stringstream * |
iter_output, |
|
|
const ADReal & |
effective_trial_stress, |
|
|
const ADReal & |
scalar, |
|
|
const Real |
reference_residual |
|
) |
| |
|
protectedvirtualinherited |
Output information for a single iteration step to build the convergence history of the model.
- Parameters
-
iter_output | Output stream |
it | Current iteration count |
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
residual | Current value of the residual |
reference | Current value of the reference quantity |
Definition at line 393 of file ADSingleVariableReturnMappingSolution.C.
402 const Real residual = MetaPhysicL::raw_value(
_residual);
404 *iter_output <<
" iteration=" << it
405 <<
" trial_stress=" << MetaPhysicL::raw_value(effective_trial_stress)
406 <<
" scalar=" << MetaPhysicL::raw_value(scalar) <<
" residual=" << residual
407 <<
" ref_res=" << reference_residual
408 <<
" rel_res=" << std::abs(residual) / reference_residual
◆ outputIterationSummary()
template<ComputeStage compute_stage>
void ADRadialReturnStressUpdate< compute_stage >::outputIterationSummary |
( |
std::stringstream * |
iter_output, |
|
|
const unsigned int |
total_it |
|
) |
| |
|
overrideprotectedvirtualinherited |
Output summary information for the convergence history of the model.
- Parameters
-
iter_output | Output stream |
total_it | Total iteration count |
Reimplemented from ADSingleVariableReturnMappingSolution< compute_stage >.
Definition at line 153 of file ADRadialReturnStressUpdate.C.
158 *iter_output <<
"At element " << _current_elem->id() <<
" _qp=" << _qp <<
" Coordinates "
159 << _q_point[_qp] <<
" block=" << _current_elem->subdomain_id() <<
'\n';
◆ propagateQpStatefulProperties()
template<ComputeStage compute_stage>
|
overrideprotectedvirtualinherited |
◆ propagateQpStatefulPropertiesRadialReturn()
template<ComputeStage compute_stage>
◆ requiresIsotropicTensor()
template<ComputeStage compute_stage>
|
inlineoverridevirtualinherited |
◆ resetProperties()
template<ComputeStage compute_stage>
◆ resetQpProperties()
template<ComputeStage compute_stage>
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 103 of file ADStressUpdateBase.h.
◆ returnMappingSolve()
template<ComputeStage compute_stage>
Perform the return mapping iterations.
- Parameters
-
effective_trial_stress | Effective trial stress |
scalar | Inelastic strain increment magnitude being solved for |
console | Console output |
Definition at line 101 of file ADSingleVariableReturnMappingSolution.C.
105 std::unique_ptr<std::stringstream> iter_output =
107 ? libmesh_make_unique<std::stringstream>()
121 throw MooseException(
"");
125 iter_output = libmesh_make_unique<std::stringstream>();
131 *iter_output <<
"Encountered inf or nan in material return mapping iterations.\n";
135 *iter_output <<
"Exceeded maximum iterations in material return mapping iterations.\n";
139 mooseError(
"Unhandled solver state");
145 internalSolve(effective_trial_stress, scalar, iter_output.get());
149 throw MooseException(iter_output->str());
156 console << iter_output->str();
◆ setQp()
template<ComputeStage compute_stage>
Sets the value of the global variable _qp for inheriting classes.
Definition at line 47 of file ADStressUpdateBase.C.
◆ updateBounds()
template<ComputeStage compute_stage>
void ADSingleVariableReturnMappingSolution< compute_stage >::updateBounds |
( |
const ADReal & |
scalar, |
|
|
const ADReal & |
residual, |
|
|
const Real |
init_resid_sign, |
|
|
ADReal & |
scalar_upper_bound, |
|
|
ADReal & |
scalar_lower_bound, |
|
|
std::stringstream * |
iter_output |
|
) |
| |
|
privateinherited |
Update the upper and lower bounds of the root for the effective inelastic strain.
- Parameters
-
scalar | Current value of the inelastic strain increment |
residual | Current value of the residual |
init_resid_sign | Sign of the initial value of the residual |
scalar_upper_bound | Upper bound value of scalar |
scalar_lower_bound | Lower bound value of scalar |
iter_output | Output stream |
Definition at line 365 of file ADSingleVariableReturnMappingSolution.C.
373 if (residual * init_resid_sign < 0.0 && scalar < scalar_upper_bound)
375 scalar_upper_bound = scalar;
376 if (scalar_upper_bound < scalar_lower_bound)
378 scalar_upper_bound = scalar_lower_bound;
379 scalar_lower_bound = 0.0;
381 *iter_output <<
" Corrected for scalar_upper_bound < scalar_lower_bound" << std::endl;
386 else if (residual * init_resid_sign > 0.0 && scalar > scalar_lower_bound &&
387 scalar < scalar_upper_bound)
388 scalar_lower_bound = scalar;
◆ updateState()
template<ComputeStage compute_stage>
void ADRadialReturnStressUpdate< compute_stage >::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 |
|
) |
| |
|
overridevirtualinherited |
A radial return (J2) mapping method is performed with return mapping iterations.
- Parameters
-
strain_increment | Sum of elastic and inelastic strain increments |
inelastic_strain_increment | Inelastic strain increment calculated by this class |
rotation | increment Not used by this class |
stress_new | New trial stress from pure elastic calculation |
stress_old | Old state of stress |
elasticity_tensor | Rank 4 C_{ijkl}, must be isotropic |
elastic_strain_old | Old state of total elastic strain |
Implements ADStressUpdateBase< compute_stage >.
Definition at line 68 of file ADRadialReturnStressUpdate.C.
79 ADRankTwoTensor deviatoric_trial_stress = stress_new.deviatoric();
82 ADReal dev_trial_stress_squared =
83 deviatoric_trial_stress.doubleContraction(deviatoric_trial_stress);
84 ADReal effective_trial_stress =
85 dev_trial_stress_squared == 0.0 ? 0.0 : std::sqrt(3.0 / 2.0 * dev_trial_stress_squared);
93 ADReal scalar_effective_inelastic_strain = 0.0;
94 if (!MooseUtils::absoluteFuzzyEqual(effective_trial_stress, 0.0))
96 returnMappingSolve(effective_trial_stress, scalar_effective_inelastic_strain, _console);
97 if (scalar_effective_inelastic_strain != 0.0)
98 inelastic_strain_increment =
99 deviatoric_trial_stress *
100 (1.5 * scalar_effective_inelastic_strain / effective_trial_stress);
102 inelastic_strain_increment.zero();
105 inelastic_strain_increment.zero();
109 strain_increment -= inelastic_strain_increment;
110 _effective_inelastic_strain[_qp] =
116 stress_new = elasticity_tensor * (elastic_strain_old + strain_increment);
◆ validParams()
template<ComputeStage compute_stage>
Definition at line 19 of file ADLAROMANCEStressUpdateBase.C.
22 params.addClassDescription(
23 "Calculates the effective creep strain based on the rates predicted by a material "
24 "specific Los Alamos Reduced Order Model derived from a Visco-Plastic Self Consistent "
27 params.addRequiredCoupledVar(
"temperature",
"The coupled temperature (K)");
28 params.addCoupledVar(
"environmental_factor", 0.0,
"Optional coupled environmental factor");
29 params.addRangeCheckedParam<Real>(
"input_window_limit",
31 "input_window_limit>0.0",
32 "Multiplier for the input minium/maximum input window");
33 MooseEnum window_failure(
"ERROR WARN IGNORE",
"WARN");
34 params.addParam<MooseEnum>(
"input_window_failure_action",
36 "What to do if ROM input is outside the window of applicability.");
37 params.addParam<
bool>(
"extrapolate_to_zero_stress",
39 "Flag to allow for extrapolation of input J2 stress to zero");
41 params.addRangeCheckedParam<Real>(
"initial_mobile_dislocation_density",
43 "initial_mobile_dislocation_density >= 0.0",
44 "Initial density of mobile (glissile) dislocations (1/m^2)");
45 params.addRangeCheckedParam<Real>(
46 "max_relative_mobile_dislocation_increment",
48 "max_relative_mobile_dislocation_increment > 0.0",
49 "Maximum increment of density of mobile (glissile) dislocations.");
50 params.addParam<FunctionName>(
51 "mobile_dislocation_density_forcing_function",
52 "Optional forcing function for immobile dislocation. If provided, the immobile dislocation "
53 "density will be reset to the function value at the beginning of the timestep. Used for "
54 "testing purposes only.");
55 params.addRangeCheckedParam<Real>(
"initial_immobile_dislocation_density",
57 "initial_immobile_dislocation_density >= 0.0",
58 "Immobile (locked) dislocation density initial value (1/m^2).");
59 params.addRangeCheckedParam<Real>(
60 "max_relative_immobile_dislocation_increment",
62 "max_relative_immobile_dislocation_increment > 0.0",
63 "Maximum increment of immobile (locked) dislocation density initial value (1/m^2).");
64 params.addParam<FunctionName>(
65 "immobile_dislocation_density_forcing_function",
66 "Optional forcing function for immobile dislocation. If provided, the immobile dislocation "
67 "density will be reset to the function value at the beginning of the timestep. Used for "
68 "testing purposes only.");
70 params.addParam<FunctionName>(
71 "old_creep_strain_forcing_function",
72 "Optional forcing function for the creep strain from the previous timestep. If provided, "
73 "the old creep strain will be reset to the function value at the beginning of the "
74 "timestep. Used for testing purposes only.");
76 params.addParam<
bool>(
"verbose",
false,
"Flag to add verbose output");
78 params.addParamNamesToGroup(
79 "mobile_dislocation_density_forcing_function immobile_dislocation_density_forcing_function "
80 "old_creep_strain_forcing_function",
Referenced by SS316HLAROMANCEStressUpdateTest< compute_stage >::validParams().
◆ _absolute_tolerance
template<ComputeStage compute_stage>
◆ _acceptable_multiplier
template<ComputeStage compute_stage>
◆ _apply_strain
template<ComputeStage compute_stage>
◆ _base_name
template<ComputeStage compute_stage>
Name used as a prefix for all material properties related to the stress update model.
Definition at line 109 of file ADStressUpdateBase.h.
◆ _bracket_solution
template<ComputeStage compute_stage>
◆ _check_range
template<ComputeStage compute_stage>
◆ _coefs
template<ComputeStage compute_stage>
◆ _creep_strain_old
template<ComputeStage compute_stage>
◆ _creep_strain_old_forcing_function
template<ComputeStage compute_stage>
◆ _degree
template<ComputeStage compute_stage>
◆ _derivative
template<ComputeStage compute_stage>
◆ _effective_inelastic_strain_old
template<ComputeStage compute_stage>
◆ _environmental
template<ComputeStage compute_stage>
◆ _extrapolate_stress
template<ComputeStage compute_stage>
◆ _failed
template<ComputeStage compute_stage>
◆ _immobile_dislocation_increment
template<ComputeStage compute_stage>
◆ _immobile_dislocations_old
template<ComputeStage compute_stage>
◆ _immobile_function
template<ComputeStage compute_stage>
◆ _immobile_old
template<ComputeStage compute_stage>
◆ _initial_immobile_dislocations
template<ComputeStage compute_stage>
◆ _initial_mobile_dislocations
template<ComputeStage compute_stage>
◆ _initial_residual
template<ComputeStage compute_stage>
◆ _input_limits
template<ComputeStage compute_stage>
◆ _internal_solve_full_iteration_history
template<ComputeStage compute_stage>
◆ _internal_solve_output_on
template<ComputeStage compute_stage>
◆ _iteration
template<ComputeStage compute_stage>
◆ _line_search
template<ComputeStage compute_stage>
◆ _makeframe_helper
template<ComputeStage compute_stage>
◆ _max_immobile_increment
template<ComputeStage compute_stage>
◆ _max_inelastic_increment
template<ComputeStage compute_stage>
◆ _max_its
template<ComputeStage compute_stage>
Maximum number of return mapping iterations.
This exists only to avoid an infinite loop, and is is intended to be a large number that is not settable by the user.
Definition at line 172 of file ADSingleVariableReturnMappingSolution.h.
◆ _max_mobile_increment
template<ComputeStage compute_stage>
◆ _mobile_dislocation_increment
template<ComputeStage compute_stage>
◆ _mobile_dislocations_old
template<ComputeStage compute_stage>
◆ _mobile_function
template<ComputeStage compute_stage>
◆ _mobile_old
template<ComputeStage compute_stage>
◆ _num_coefs
template<ComputeStage compute_stage>
◆ _num_inputs
template<ComputeStage compute_stage>
◆ _num_outputs
template<ComputeStage compute_stage>
◆ _num_resids
template<ComputeStage compute_stage>
◆ _relative_tolerance
template<ComputeStage compute_stage>
◆ _residual
template<ComputeStage compute_stage>
◆ _residual_history
template<ComputeStage compute_stage>
◆ _stress_index
template<ComputeStage compute_stage>
◆ _svrms_name
template<ComputeStage compute_stage>
◆ _temperature
template<ComputeStage compute_stage>
◆ _three_shear_modulus
template<ComputeStage compute_stage>
◆ _transform
template<ComputeStage compute_stage>
◆ _transform_coefs
template<ComputeStage compute_stage>
◆ _transformed_limits
template<ComputeStage compute_stage>
◆ _use_env
template<ComputeStage compute_stage>
◆ _verbose
template<ComputeStage compute_stage>
◆ _window
template<ComputeStage compute_stage>
◆ _window_failure
template<ComputeStage compute_stage>
◆ usingMaterialMembers
template<ComputeStage compute_stage>
◆ usingRadialReturnCreepStressUpdateBaseMembers
template<ComputeStage compute_stage>
◆ usingRadialReturnStressUpdateMembers
template<ComputeStage compute_stage>
◆ usingSingleVariableReturnMappingSolutionMembers
template<ComputeStage compute_stage>
◆ usingStressUpdateBaseMembers
template<ComputeStage compute_stage>
The documentation for this class was generated from the following files:
void computeROMStrainRate(const Real dt, const Real &mobile_dislocations_old, const Real &immobile_dislocations_old, const ADReal &trial_stress, const Real &effective_strain_old, const ADReal &temperature, const ADReal &environmental, ADReal &mobile_dislocation_increment, ADReal &immobile_dislocation_increment, ADReal &rom_effective_strain, ADReal &rom_effective_strain_derivative)
Computes the ROM Strain rate.
const Real _window
Window applied to input maximum and minimum values.
ADReal _immobile_dislocation_increment
Container for immobile dislocation increment.
const MaterialProperty< Real > & _effective_inelastic_strain_old
virtual ADReal initialGuess(const ADReal &)
Compute an initial guess for the value of the scalar.
void checkInputWindows(std::vector< ADReal > &input)
Function to check input values against applicability windows set by ROM data set.
const Real _initial_mobile_dislocations
Initial mobile dislocation value.
static InputParameters validParams()
const bool _internal_solve_full_iteration_history
Whether to output iteration information all the time (regardless of whether iterations converge)
Real _immobile_old
Container for old immobile dislocation value.
void returnMappingSolve(const ADReal &effective_trial_stress, ADReal &scalar, const ConsoleStream &console)
Perform the return mapping iterations.
Real _mobile_old
Container for old mobile dislocation value.
virtual void computeStressInitialize(const ADReal &, const ADRankFourTensor &)
Perform any necessary initialization before return mapping iterations.
ADReal _mobile_dislocation_increment
Container for mobile dislocation increment.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
bool _bracket_solution
Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between t...
const ADVariableValue & _environmental
Optionally coupled environmental factor.
virtual void outputIterationStep(std::stringstream *iter_output, const ADReal &effective_trial_stress, const ADReal &scalar, const Real reference_residual)
Output information for a single iteration step to build the convergence history of the model.
unsigned int _iteration
iteration number
const bool _extrapolate_stress
Flag to optinoally allow model extrapolation to zero stress.
ADReal _initial_residual
Residual values, kept as members to retain solver state for summary outputting.
const ADVariableValue & _temperature
Coupled temperature variable.
const MaterialProperty< RankTwoTensor > & _creep_strain_old
bool convergedAcceptable(const unsigned int it, const Real reference)
Check to see whether the residual is within acceptable convergence limits.
WindowFailure
Enum to error, warn, or ignore checks that ensure ROM input is within applicability window.
std::vector< std::vector< Real > > _transform_coefs
Transform coefficients defined by the ROM data set.
std::vector< Real > _residual_history
History of residuals used to check whether progress is still being made on decreasing the residual.
const Real _max_immobile_increment
Maximum immobile dislocation increment.
virtual ADReal maximumPermissibleValue(const ADReal &effective_trial_stress) const
Compute the maximum permissible value of the scalar.
virtual std::vector< std::vector< Real > > getInputLimits()=0
Real _relative_tolerance
Relative convergence tolerance.
void convertOutput(const Real dt, const std::vector< ADReal > &old_input_values, const std::vector< ADReal > &rom_outputs, const std::vector< ADReal > &drom_outputs, std::vector< ADReal > &input_value_increments, std::vector< ADReal > &dinput_value_increments)
Computes the output variable increments from the ROM predictions by bringing out of the normalized ma...
enum ADLAROMANCEStressUpdateBase::WindowFailure _window_failure
const MaterialProperty< Real > & _mobile_dislocations_old
const Real _max_mobile_increment
Maximum mobile dislocation increment.
const Function *const _mobile_function
Optional mobile dislocation forcing function.
enum ADSingleVariableReturnMappingSolution::InternalSolveOutput _internal_solve_output_on
void propagateQpStatefulPropertiesRadialReturn()
Propagate the properties pertaining to this intermediate class.
ADReal _derivative
Container for derivative of creep rate with respect to strain.
virtual std::vector< std::vector< ROMInputTransform > > getTransform()=0
bool _use_env
Flag that checks if environmental factor is included in ROM data set.
const MaterialProperty< Real > & _immobile_dislocations_old
std::vector< std::vector< ROMInputTransform > > _transform
Transform rules defined by the ROM data set.
Real _acceptable_multiplier
Multiplier applied to relative and absolute tolerances for acceptable convergence.
const Function *const _creep_strain_old_forcing_function
Optional old creep strain forcing function.
unsigned int _degree
Legendre polynomial degree for the ROM data set.
bool converged(const ADReal &residual, const Real reference)
Check to see whether the residual is within the convergence limits.
void updateBounds(const ADReal &scalar, const ADReal &residual, const Real init_resid_sign, ADReal &scalar_upper_bound, ADReal &scalar_lower_bound, std::stringstream *iter_output)
Update the upper and lower bounds of the root for the effective inelastic strain.
void computeValues(const std::vector< std::vector< Real >> &coefs, const std::vector< std::vector< std::vector< ADReal >>> &polynomial_inputs, const std::vector< std::vector< std::vector< ADReal >>> &dpolynomial_inputs, std::vector< ADReal > &rom_outputs, std::vector< ADReal > &drom_outputs)
Arranges the calculated Legendre polynomials into the order expected by the ROM coefficients and ulti...
std::vector< std::vector< unsigned int > > getMakeFrameHelper() const
void buildPolynomials(const std::vector< std::vector< ADReal >> &rom_inputs, const std::vector< std::vector< ADReal >> &drom_inputs, std::vector< std::vector< std::vector< ADReal >>> &polynomial_inputs, std::vector< std::vector< std::vector< ADReal >>> &dpolynomial_inputs)
Assemble the array of Legendre polynomials to be multiplied by the ROM coefficients.
std::vector< std::vector< Real > > _input_limits
Input limits defined by the ROM data set.
const unsigned int _max_its
Maximum number of return mapping iterations.
This class provides baseline functionallity for creep models based on the stress update material in a...
virtual std::vector< std::vector< Real > > getTransformCoefs()=0
std::vector< std::vector< unsigned int > > _makeframe_helper
Helper container defined by the ROM data set.
virtual std::vector< std::vector< Real > > getCoefs()=0
ADReal computePolynomial(const ADReal &value, const unsigned int degree, const bool derivative=false)
Calculate the value or derivative of Legendre polynomial up to 3rd order.
std::vector< std::vector< std::vector< Real > > > getTransformedLimits() const
const unsigned int _stress_index
Index corresponding to the position for the stress in the input vector.
void checkPermissibleRange(ADReal &scalar, ADReal &scalar_increment, const ADReal &scalar_old, const ADReal min_permissible_scalar, const ADReal max_permissible_scalar, std::stringstream *iter_output)
Check to see whether solution is within admissible range, and set it within that range if it is not.
virtual void iterationFinalize(ADReal)
Finalize internal state variables for a model for a given iteration.
std::vector< std::vector< Real > > _coefs
Coefficients used with Legendre polynomials defined by the ROM data set.
virtual ADReal minimumPermissibleValue(const ADReal &effective_trial_stress) const
Compute the minimum permissible value of the scalar.
ADReal _three_shear_modulus
3 * shear modulus
bool _check_range
Whether to check to see whether iterative solution is within admissible range, and set within that ra...
virtual void computeStressFinalize(const ADRankTwoTensor &)
Perform any necessary steps to finalize state after return mapping iterations.
virtual void computeStressFinalize(const ADRankTwoTensor &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations.
const std::string temperature
const Function *const _immobile_function
Optional immobile dislocation forcing function.
const std::size_t _num_resids
Number of residuals to be stored in history.
unsigned int _num_outputs
Number of inputs to the ROM data set.
unsigned int _num_coefs
Total number of Legendre polynomial coefficients for the ROM data set.
const std::string _base_name
Name used as a prefix for all material properties related to the stress update model.
virtual void initQpStatefulProperties() override
virtual Real computeTimeStepLimit() override
Compute the limiting value of the time step for this material.
Real _absolute_tolerance
Absolute convergence tolerance.
void convertInput(const std::vector< ADReal > &input, std::vector< std::vector< ADReal >> &converted, std::vector< std::vector< ADReal >> &dconverted)
Convert the input variables into the form expected by the ROM Legendre polynomials to have a normaliz...
std::vector< std::vector< std::vector< Real > > > _transformed_limits
Limits transformed from readabile input to ROM readable limits.
MaterialProperty< Real > & _failed
Material property to indicate if material point is outside of input limits.
bool _line_search
Whether to use line searches to improve convergence.
const bool _verbose
Flag to output verbose infromation.
virtual ADReal computeResidual(const ADReal &effective_trial_stress, const ADReal &scalar)=0
Compute the residual for a predicted value of the scalar.
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.
unsigned int _num_inputs
Number of inputs for the ROM data set.
SolveState internalSolve(const ADReal effective_trial_stress, ADReal &scalar, std::stringstream *iter_output=nullptr)
Method called from within this class to perform the actual return mappping iterations.
const Real _initial_immobile_dislocations
Initial immobile dislocation value.
virtual ADReal computeDerivative(const ADReal &effective_trial_stress, const ADReal &scalar)=0
Compute the derivative of the residual as a function of the scalar variable.
virtual Real computeReferenceResidual(const ADReal &effective_trial_stress, const ADReal &scalar)=0
Compute a reference quantity to be used for checking relative convergence.