www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HyperElasticPhaseFieldIsoDamage Class Reference

This class solves visco plastic model based on isotropically damaged stress The damage parameter is obtained from phase field fracture kernel Computes undamaged elastic strain energy and associated tensors used in phase field fracture kernel. More...

#include <HyperElasticPhaseFieldIsoDamage.h>

Inheritance diagram for HyperElasticPhaseFieldIsoDamage:
[legend]

Public Member Functions

 HyperElasticPhaseFieldIsoDamage (const InputParameters &parameters)
 

Protected Member Functions

virtual void computePK2StressAndDerivative ()
 This function computes PK2 stress. More...
 
virtual void computeDamageStress ()
 This function computes PK2 stress modified to account for damage Computes numerical stiffness if flag is true Computes undamaged elastic strain energy and associated tensors. More...
 
virtual void computeNumStiffness ()
 This function computes numerical stiffness. More...
 
virtual void computeQpJacobian ()
 This function computes tensors used to construct diagonal and off-diagonal Jacobian. More...
 
virtual void initUOVariables ()
 This function initializes the properties, stateful properties and user objects The properties and stateful properties associated with user objects are only initialized here The properties have the same name as the user object name. More...
 
void initNumUserObjects (const std::vector< UserObjectName > &, unsigned int &)
 This function calculates the number of each user object type. More...
 
template<typename T >
void initProp (const std::vector< UserObjectName > &, unsigned int, std::vector< MaterialProperty< T > * > &)
 This function initializes properties for each user object. More...
 
template<typename T >
void initPropOld (const std::vector< UserObjectName > &, unsigned int, std::vector< const MaterialProperty< T > * > &)
 This function initializes old for stateful properties associated with user object Only user objects that update internal variables have an associated old property. More...
 
template<typename T >
void initUserObjects (const std::vector< UserObjectName > &, unsigned int, std::vector< const T * > &)
 This function initializes user objects. More...
 
virtual void initJacobianVariables ()
 This function initialize variables required for Jacobian calculation. More...
 
virtual void initQpStatefulProperties ()
 Initializes state. More...
 
virtual void computeQpStress ()
 This function computes the Cauchy stress. More...
 
virtual void saveOldState ()
 This function saves the old stateful properties that is modified during sub stepping. More...
 
virtual void preSolveQp ()
 Sets state for solve. More...
 
virtual bool solveQp ()
 Solve state. More...
 
virtual void postSolveQp ()
 Update state for output (Outside substepping) More...
 
virtual void recoverOldState ()
 This function restores the the old stateful properties after a successful solve. More...
 
virtual void preSolveFlowrate ()
 Sets state for solve (Inside substepping) More...
 
virtual bool solveFlowrate ()
 Solve for flow rate and state. More...
 
virtual void postSolveFlowrate ()
 Update state for output (Inside substepping) More...
 
virtual bool computeFlowRateFunction ()
 Calls user objects to compute flow rates. More...
 
virtual bool computeFlowDirection ()
 Calls user objects to compute flow directions. More...
 
virtual void computeElasticRightCauchyGreenTensor ()
 Computes elastic Right Cauchy Green Tensor. More...
 
virtual void computeElasticStrain ()
 Computes elastic Lagrangian strain. More...
 
virtual void computeDeeDce ()
 Computes derivative of elastic strain w.r.t elastic Right Cauchy Green Tensor. More...
 
virtual bool computeFlowRateResidual ()
 Computes flow rate residual vector. More...
 
virtual void computeFlowRateJacobian ()
 Computes flow rate Jacobian matrix. More...
 
virtual void computeElasticPlasticDeformGrad ()
 Computes elastic and plastic deformation gradients. More...
 
virtual Real computeNorm (const std::vector< Real > &)
 Computes norm of residual vector. More...
 
virtual void updateFlowRate ()
 Update flow rate. More...
 
virtual void computeDpk2Dfpinv ()
 Computes derivative of PK2 stress wrt inverse of plastic deformation gradient. More...
 
virtual bool computeIntVarRates ()
 This function call user objects to calculate rate of internal variables. More...
 
virtual bool computeIntVar ()
 This function call user objects to integrate internal variables. More...
 
virtual bool computeStrength ()
 This function call user objects to compute strength. More...
 
virtual void computeIntVarRateDerivatives ()
 This function call user objects to compute dintvar_rate/dintvar and dintvarrate/dflowrate. More...
 
virtual void computeIntVarDerivatives ()
 This function call user objects to compute dintvar/dintvar_rate and dintvar/dflowrate. More...
 
void computeStrengthDerivatives ()
 This function call user objects to compute dstrength/dintvar. More...
 
virtual void computeQpProperties () override
 
void addQpInitialStress ()
 InitialStress Deprecation: remove this method. More...
 

Protected Attributes

bool _num_stiffness
 Flag to compute numerical stiffness. More...
 
Real _kdamage
 Small stiffness of completely damaged material point. More...
 
Real _zero_tol
 Used in numerical stiffness calculation to check near zero values. More...
 
Real _zero_pert
 Perturbation value for near zero or zero strain components. More...
 
Real _pert_val
 Perturbation value for strain components. More...
 
const VariableValue & _c
 Compupled damage variable. More...
 
bool _save_state
 Flag to save couple material properties. More...
 
MaterialProperty< Real > & _G0
 
MaterialProperty< RankTwoTensor > & _dG0_dstrain
 
MaterialProperty< RankTwoTensor > & _dstress_dc
 
RankTwoTensor _pk2_tmp
 
RankTwoTensor _dG0_dee
 
RankTwoTensor _dpk2_dc
 
RankFourTensor _dpk2_dee
 
std::vector< RankTwoTensor > _etens
 
Real _resid_abs_tol
 Absolute tolerance for residual convergence check. More...
 
Real _resid_rel_tol
 Relative tolerance for residual convergence check. More...
 
unsigned int _maxiters
 Maximum number of iterations. More...
 
unsigned int _max_substep_iter
 Maximum number of substep iterations. More...
 
std::vector< UserObjectName > _flow_rate_uo_names
 Names of flow rate user objects. More...
 
std::vector< UserObjectName > _strength_uo_names
 Names of strength user objects. More...
 
std::vector< UserObjectName > _int_var_uo_names
 Names of internal variable user objects. More...
 
std::vector< UserObjectName > _int_var_rate_uo_names
 Names of internal variable rate user objects. More...
 
unsigned int _num_flow_rate_uos
 Number of flow rate user objects. More...
 
unsigned int _num_strength_uos
 Number of strength user objects. More...
 
unsigned int _num_int_var_uos
 Number of internal variable user objects. More...
 
unsigned int _num_int_var_rate_uos
 Number of internal variable rate user objects. More...
 
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
 Flow rate user objects. More...
 
std::vector< const HEVPStrengthUOBase * > _strength_uo
 Strength user objects. More...
 
std::vector< const HEVPInternalVarUOBase * > _int_var_uo
 Internal variable user objects. More...
 
std::vector< const HEVPInternalVarRateUOBase * > _int_var_rate_uo
 Internal variable rate user objects. More...
 
std::string _pk2_prop_name
 
MaterialProperty< RankTwoTensor > & _pk2
 
MaterialProperty< RankTwoTensor > & _fp
 
const MaterialProperty< RankTwoTensor > & _fp_old
 
MaterialProperty< RankTwoTensor > & _ce
 
const MaterialProperty< RankTwoTensor > & _deformation_gradient
 
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
 
const MaterialProperty< RankTwoTensor > & _rotation_increment
 
std::vector< MaterialProperty< Real > * > _flow_rate_prop
 
std::vector< MaterialProperty< Real > * > _strength_prop
 
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
 
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
 
std::vector< MaterialProperty< Real > * > _int_var_rate_prop
 
std::vector< Real > _int_var_old
 
RankTwoTensor _dfgrd_tmp
 
RankTwoTensor _fp_tmp_inv
 
RankTwoTensor _fp_tmp_old_inv
 
RankTwoTensor _fe
 
RankTwoTensor _ee
 
RankTwoTensor _pk2_fet
 
RankTwoTensor _fe_pk2
 
RankFourTensor _dpk2_dce
 
RankFourTensor _dpk2_dfe
 
RankFourTensor _dfe_dfpinv
 
RankFourTensor _dpk2_dfpinv
 
RankFourTensor _dee_dce
 
RankFourTensor _dce_dfe
 
RankFourTensor _dfe_df
 
RankFourTensor _tan_mod
 
RankFourTensor _df_dstretch_inc
 
std::vector< RankTwoTensor > _flow_dirn
 
std::vector< RankTwoTensor > _dflowrate_dpk2
 
std::vector< RankTwoTensor > _dpk2_dflowrate
 
std::vector< RankTwoTensor > _dfpinv_dflowrate
 
DenseVector< Real > _dflow_rate
 
DenseVector< Real > _flow_rate
 
DenseVector< Real > _resid
 
std::vector< DenseVector< Real > > _dintvarrate_dflowrate
 Jacobian variables. More...
 
std::vector< DenseVector< Real > > _dintvar_dflowrate_tmp
 
DenseMatrix< Real > _dintvarrate_dintvar
 
DenseMatrix< Real > _dintvar_dintvarrate
 
DenseMatrix< Real > _dintvar_dintvar
 
DenseMatrix< Real > _dintvar_dflowrate
 
DenseMatrix< Real > _dstrength_dintvar
 
DenseMatrix< Real > _dflowrate_dstrength
 
DenseVector< Real > _dintvar_dintvar_x
 
DenseMatrix< Real > _jac
 
Real _dt_substep
 
const std::string _base_name
 
const std::string _elasticity_tensor_name
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain
 
MaterialProperty< RankTwoTensor > & _stress
 
MaterialProperty< RankTwoTensor > & _elastic_strain
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 
const MaterialProperty< RankTwoTensor > & _extra_stress
 Extra stress tensor. More...
 
std::vector< Function * > _initial_stress_fcn
 initial stress components More...
 
MaterialProperty< RankFourTensor > & _Jacobian_mult
 derivative of stress w.r.t. strain (_dstress_dstrain) More...
 
const bool _store_stress_old
 Parameter which decides whether to store old stress. This is required for HHT time integration and Rayleigh damping. More...
 
const bool _initial_stress_provided
 Whether initial stress was provided. InitialStress Deprecation: remove this. More...
 
MaterialProperty< RankTwoTensor > * _initial_stress
 Initial stress, if provided. InitialStress Deprecation: remove this. More...
 
const MaterialProperty< RankTwoTensor > * _initial_stress_old
 Old value of initial stress, which is needed to correctly implement finite-strain rotations. InitialStress Deprecation: remove this. More...
 

Detailed Description

This class solves visco plastic model based on isotropically damaged stress The damage parameter is obtained from phase field fracture kernel Computes undamaged elastic strain energy and associated tensors used in phase field fracture kernel.

Definition at line 23 of file HyperElasticPhaseFieldIsoDamage.h.

Constructor & Destructor Documentation

HyperElasticPhaseFieldIsoDamage::HyperElasticPhaseFieldIsoDamage ( const InputParameters &  parameters)

Definition at line 28 of file HyperElasticPhaseFieldIsoDamage.C.

30  _num_stiffness(getParam<bool>("numerical_stiffness")),
31  _kdamage(getParam<Real>("damage_stiffness")),
32  _zero_tol(getParam<Real>("zero_tol")),
33  _zero_pert(getParam<Real>("zero_perturb")),
34  _pert_val(getParam<Real>("perturbation_scale_factor")),
35  _c(coupledValue("c")),
36  _save_state(false),
37  _G0(declareProperty<Real>(_base_name + "G0")),
38  _dG0_dstrain(declareProperty<RankTwoTensor>(_base_name + "dG0_dstrain")),
40  declarePropertyDerivative<RankTwoTensor>(_base_name + "stress", getVar("c", 0)->name())),
41  _etens(LIBMESH_DIM)
42 {
43 }
Real _zero_pert
Perturbation value for near zero or zero strain components.
MaterialProperty< RankTwoTensor > & _dG0_dstrain
bool _save_state
Flag to save couple material properties.
const VariableValue & _c
Compupled damage variable.
Real _pert_val
Perturbation value for strain components.
Real _zero_tol
Used in numerical stiffness calculation to check near zero values.
const std::string _base_name
MaterialProperty< RankTwoTensor > & _dstress_dc
bool _num_stiffness
Flag to compute numerical stiffness.
FiniteStrainHyperElasticViscoPlastic(const InputParameters &parameters)
Real _kdamage
Small stiffness of completely damaged material point.

Member Function Documentation

void ComputeStressBase::addQpInitialStress ( )
protectedinherited

InitialStress Deprecation: remove this method.

Adds initial stress, if it is provided, to _stress[_qp]. This function should NOT be used if you calculate stress using

stress = stress_old + elasticity * strain_increment

because stress_old will already include initial stress. However this function SHOULD be used if your code uses

stress = elasticity * (elastic_strain_old + strain_increment) or stress = elasticity * elastic_strain

since in these cases the elastic_strain and elastic_strain_old will not include any contribution from initial stress.

Definition at line 112 of file ComputeStressBase.C.

Referenced by ComputeLinearElasticStress::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), ComputeSmearedCrackingStress::computeQpStress(), ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration(), ComputeStressBase::initQpStatefulProperties(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStress::updateQpStateSingleModel().

113 {
115  _stress[_qp] += (*_initial_stress)[_qp];
116 }
MaterialProperty< RankTwoTensor > & _stress
const bool _initial_stress_provided
Whether initial stress was provided. InitialStress Deprecation: remove this.
void HyperElasticPhaseFieldIsoDamage::computeDamageStress ( )
protectedvirtual

This function computes PK2 stress modified to account for damage Computes numerical stiffness if flag is true Computes undamaged elastic strain energy and associated tensors.

Definition at line 74 of file HyperElasticPhaseFieldIsoDamage.C.

Referenced by computeNumStiffness(), and computePK2StressAndDerivative().

75 {
76  Real lambda = _elasticity_tensor[_qp](0, 0, 1, 1);
77  Real mu = _elasticity_tensor[_qp](0, 1, 0, 1);
78 
79  Real c = _c[_qp];
80  Real xfac = Utility::pow<2>(1.0 - c) + _kdamage;
81 
82  std::vector<Real> w;
83  RankTwoTensor evec;
84  _ee.symmetricEigenvaluesEigenvectors(w, evec);
85 
86  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
87  _etens[i].vectorOuterProduct(evec.column(i), evec.column(i));
88 
89  Real etr = 0.0;
90  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
91  etr += w[i];
92 
93  Real etrpos = (std::abs(etr) + etr) / 2.0;
94  Real etrneg = (std::abs(etr) - etr) / 2.0;
95 
96  RankTwoTensor pk2pos, pk2neg;
97 
98  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
99  {
100  pk2pos += _etens[i] * (lambda * etrpos + 2.0 * mu * (std::abs(w[i]) + w[i]) / 2.0);
101  pk2neg += _etens[i] * (lambda * etrneg + 2.0 * mu * (std::abs(w[i]) - w[i]) / 2.0);
102  }
103 
104  _pk2_tmp = pk2pos * xfac - pk2neg;
105 
106  if (_save_state)
107  {
108  std::vector<Real> epos(LIBMESH_DIM);
109  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
110  epos[i] = (std::abs(w[i]) + w[i]) / 2.0;
111 
112  _G0[_qp] = 0.0;
113  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
114  _G0[_qp] += Utility::pow<2>(epos[i]);
115  _G0[_qp] *= mu;
116  _G0[_qp] += lambda * Utility::pow<2>(etrpos) / 2.0;
117 
118  _dG0_dee = pk2pos;
119  _dpk2_dc = -pk2pos * (2.0 * (1.0 - c));
120  }
121 }
bool _save_state
Flag to save couple material properties.
const VariableValue & _c
Compupled damage variable.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Real _kdamage
Small stiffness of completely damaged material point.
void FiniteStrainHyperElasticViscoPlastic::computeDeeDce ( )
protectedvirtualinherited

Computes derivative of elastic strain w.r.t elastic Right Cauchy Green Tensor.

Definition at line 485 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::initJacobianVariables().

486 {
487  _dee_dce.zero();
488 
489  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
490  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
491  _dee_dce(i, j, i, j) = 0.5;
492 }
void FiniteStrainHyperElasticViscoPlastic::computeDpk2Dfpinv ( )
protectedvirtualinherited

Computes derivative of PK2 stress wrt inverse of plastic deformation gradient.

Definition at line 516 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateJacobian().

517 {
518  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
519  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
520  for (unsigned int k = 0; k < LIBMESH_DIM; ++k)
521  _dfe_dfpinv(i, j, k, j) = _dfgrd_tmp(i, k);
522 
524 }
void FiniteStrainHyperElasticViscoPlastic::computeElasticPlasticDeformGrad ( )
protectedvirtualinherited

Computes elastic and plastic deformation gradients.

Definition at line 501 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

502 {
503  RankTwoTensor iden;
504  iden.addIa(1.0);
505 
506  RankTwoTensor val;
507  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
508  val += _flow_rate(i) * _flow_dirn[i] * _dt_substep;
509 
510  _fp_tmp_inv = _fp_tmp_old_inv * (iden - val);
511  _fp_tmp_inv = std::pow(_fp_tmp_inv.det(), -1.0 / 3.0) * _fp_tmp_inv;
513 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
void FiniteStrainHyperElasticViscoPlastic::computeElasticRightCauchyGreenTensor ( )
protectedvirtualinherited

Computes elastic Right Cauchy Green Tensor.

Definition at line 495 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual().

496 {
497  _ce[_qp] = _fe.transpose() * _fe;
498 }
void FiniteStrainHyperElasticViscoPlastic::computeElasticStrain ( )
protectedvirtualinherited

Computes elastic Lagrangian strain.

Definition at line 477 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by computePK2StressAndDerivative(), and FiniteStrainHyperElasticViscoPlastic::computePK2StressAndDerivative().

478 {
479  RankTwoTensor iden;
480  iden.addIa(1.0);
481  _ee = 0.5 * (_ce[_qp] - iden);
482 }
bool FiniteStrainHyperElasticViscoPlastic::computeFlowDirection ( )
protectedvirtualinherited

Calls user objects to compute flow directions.

Definition at line 434 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual().

435 {
436  for (unsigned i = 0; i < _num_flow_rate_uos; ++i)
437  {
438  if (!_flow_rate_uo[i]->computeDirection(_qp, _flow_dirn[i]))
439  return false;
440  }
441  return true;
442 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
Flow rate user objects.
bool FiniteStrainHyperElasticViscoPlastic::computeFlowRateFunction ( )
protectedvirtualinherited

Calls user objects to compute flow rates.

Definition at line 445 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual().

446 {
447  Real val = 0;
448  for (unsigned i = 0; i < _num_flow_rate_uos; ++i)
449  {
450  if (_flow_rate_uo[i]->computeValue(_qp, val))
451  _resid(i) = -val;
452  else
453  return false;
454  }
455  return true;
456 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
Flow rate user objects.
void FiniteStrainHyperElasticViscoPlastic::computeFlowRateJacobian ( )
protectedvirtualinherited

Computes flow rate Jacobian matrix.

Definition at line 396 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

397 {
401 
402  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
403  for (unsigned int j = 0; j < _num_strength_uos; ++j)
404  _flow_rate_uo[i]->computeDerivative(_qp, _strength_uo_names[j], _dflowrate_dstrength(i, j));
405 
406  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
407  _flow_rate_uo[i]->computeTensorDerivative(_qp, _pk2_prop_name, _dflowrate_dpk2[i]);
408 
410 
411  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
412  {
415  }
416 
417  DenseMatrix<Real> dflowrate_dflowrate;
418  dflowrate_dflowrate = _dflowrate_dstrength;
419  dflowrate_dflowrate.right_multiply(_dstrength_dintvar);
420  dflowrate_dflowrate.right_multiply(_dintvar_dflowrate);
421 
422  _jac.zero();
423  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
424  for (unsigned int j = 0; j < _num_flow_rate_uos; ++j)
425  {
426  if (i == j)
427  _jac(i, j) = 1;
428  _jac(i, j) -= dflowrate_dflowrate(i, j);
429  _jac(i, j) -= _dflowrate_dpk2[i].doubleContraction(_dpk2_dflowrate[j]);
430  }
431 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< UserObjectName > _strength_uo_names
Names of strength user objects.
virtual void computeDpk2Dfpinv()
Computes derivative of PK2 stress wrt inverse of plastic deformation gradient.
void computeStrengthDerivatives()
This function call user objects to compute dstrength/dintvar.
virtual void computeIntVarRateDerivatives()
This function call user objects to compute dintvar_rate/dintvar and dintvarrate/dflowrate.
virtual void computeIntVarDerivatives()
This function call user objects to compute dintvar/dintvar_rate and dintvar/dflowrate.
unsigned int _num_strength_uos
Number of strength user objects.
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
Flow rate user objects.
bool FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual ( )
protectedvirtualinherited

Computes flow rate residual vector.

Definition at line 370 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

371 {
372  if (!computeIntVarRates())
373  return false;
374 
375  if (!computeIntVar())
376  return false;
377 
378  if (!computeStrength())
379  return false;
380 
383 
385  return false;
386 
387  if (!computeFlowDirection())
388  return false;
389 
390  _resid += _flow_rate;
391 
392  return true;
393 }
virtual bool computeFlowDirection()
Calls user objects to compute flow directions.
virtual void computeElasticRightCauchyGreenTensor()
Computes elastic Right Cauchy Green Tensor.
virtual void computePK2StressAndDerivative()
Computes PK2 stress and derivative w.r.t elastic Right Cauchy Green Tensor.
virtual bool computeFlowRateFunction()
Calls user objects to compute flow rates.
virtual bool computeIntVar()
This function call user objects to integrate internal variables.
virtual bool computeStrength()
This function call user objects to compute strength.
virtual bool computeIntVarRates()
This function call user objects to calculate rate of internal variables.
bool FiniteStrainHyperElasticViscoPlastic::computeIntVar ( )
protectedvirtualinherited

This function call user objects to integrate internal variables.

Definition at line 592 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual().

593 {
594  Real val = 0;
595  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
596  {
597  if (_int_var_uo[i]->computeValue(_qp, _dt_substep, val))
598  (*_int_var_stateful_prop[i])[_qp] = val;
599  else
600  return false;
601  }
602  return true;
603 }
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const HEVPInternalVarUOBase * > _int_var_uo
Internal variable user objects.
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
void FiniteStrainHyperElasticViscoPlastic::computeIntVarDerivatives ( )
protectedvirtualinherited

This function call user objects to compute dintvar/dintvar_rate and dintvar/dflowrate.

Definition at line 633 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateJacobian().

634 {
635  Real val = 0;
636 
637  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
638  for (unsigned int j = 0; j < _num_int_var_rate_uos; ++j)
639  {
640  _int_var_uo[i]->computeDerivative(_qp, _dt_substep, _int_var_rate_uo_names[j], val);
641  _dintvar_dintvarrate(i, j) = val;
642  }
643 
644  _dintvar_dintvar.zero();
645 
646  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
647  for (unsigned int j = 0; j < _num_int_var_uos; ++j)
648  {
649  if (i == j)
650  _dintvar_dintvar(i, j) = 1;
651  for (unsigned int k = 0; k < _num_int_var_rate_uos; ++k)
653  }
654 
655  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
657 
658  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
659  {
660  _dintvar_dintvar_x.zero();
662  for (unsigned int j = 0; j < _num_int_var_uos; ++j)
664  }
665 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
std::vector< DenseVector< Real > > _dintvar_dflowrate_tmp
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< DenseVector< Real > > _dintvarrate_dflowrate
Jacobian variables.
std::vector< const HEVPInternalVarUOBase * > _int_var_uo
Internal variable user objects.
std::vector< UserObjectName > _int_var_rate_uo_names
Names of internal variable rate user objects.
void FiniteStrainHyperElasticViscoPlastic::computeIntVarRateDerivatives ( )
protectedvirtualinherited

This function call user objects to compute dintvar_rate/dintvar and dintvarrate/dflowrate.

Definition at line 620 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateJacobian().

621 {
622  Real val = 0;
623 
624  for (unsigned int i = 0; i < _num_int_var_rate_uos; ++i)
625  for (unsigned int j = 0; j < _num_flow_rate_uos; ++j)
626  {
627  _int_var_rate_uo[i]->computeDerivative(_qp, _flow_rate_uo_names[j], val);
628  _dintvarrate_dflowrate[j](i) = val;
629  }
630 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
std::vector< DenseVector< Real > > _dintvarrate_dflowrate
Jacobian variables.
std::vector< UserObjectName > _flow_rate_uo_names
Names of flow rate user objects.
std::vector< const HEVPInternalVarRateUOBase * > _int_var_rate_uo
Internal variable rate user objects.
bool FiniteStrainHyperElasticViscoPlastic::computeIntVarRates ( )
protectedvirtualinherited

This function call user objects to calculate rate of internal variables.

Definition at line 578 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual().

579 {
580  Real val = 0;
581  for (unsigned int i = 0; i < _num_int_var_rate_uos; ++i)
582  {
583  if (_int_var_rate_uo[i]->computeValue(_qp, val))
584  (*_int_var_rate_prop[i])[_qp] = val;
585  else
586  return false;
587  }
588  return true;
589 }
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
std::vector< const HEVPInternalVarRateUOBase * > _int_var_rate_uo
Internal variable rate user objects.
std::vector< MaterialProperty< Real > * > _int_var_rate_prop
Real FiniteStrainHyperElasticViscoPlastic::computeNorm ( const std::vector< Real > &  var)
protectedvirtualinherited

Computes norm of residual vector.

Definition at line 527 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

528 {
529  Real val = 0.0;
530  for (unsigned int i = 0; i < var.size(); ++i)
531  val += Utility::pow<2>(var[i]);
532  return std::sqrt(val);
533 }
void HyperElasticPhaseFieldIsoDamage::computeNumStiffness ( )
protectedvirtual

This function computes numerical stiffness.

Definition at line 124 of file HyperElasticPhaseFieldIsoDamage.C.

Referenced by computePK2StressAndDerivative().

125 {
126  RankTwoTensor ee_tmp;
127 
128  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
129  for (unsigned int j = i; j < LIBMESH_DIM; ++j)
130  {
131  Real ee_pert = _zero_pert;
132  if (std::abs(_ee(i, j)) > _zero_tol)
133  ee_pert = _pert_val * std::abs(_ee(i, j));
134 
135  ee_tmp = _ee;
136  _ee(i, j) += ee_pert;
137 
139 
140  for (unsigned int k = 0; k < LIBMESH_DIM; ++k)
141  for (unsigned int l = 0; l < LIBMESH_DIM; ++l)
142  {
143  _dpk2_dee(k, l, i, j) = (_pk2_tmp(k, l) - _pk2[_qp](k, l)) / ee_pert;
144  _dpk2_dee(k, l, j, i) = (_pk2_tmp(k, l) - _pk2[_qp](k, l)) / ee_pert;
145  }
146  _ee = ee_tmp;
147  }
148 }
virtual void computeDamageStress()
This function computes PK2 stress modified to account for damage Computes numerical stiffness if flag...
Real _zero_pert
Perturbation value for near zero or zero strain components.
Real _pert_val
Perturbation value for strain components.
Real _zero_tol
Used in numerical stiffness calculation to check near zero values.
void HyperElasticPhaseFieldIsoDamage::computePK2StressAndDerivative ( )
protectedvirtual

This function computes PK2 stress.

Reimplemented from FiniteStrainHyperElasticViscoPlastic.

Definition at line 46 of file HyperElasticPhaseFieldIsoDamage.C.

47 {
49 
50  _save_state = true;
52  _pk2[_qp] = _pk2_tmp;
53 
54  _save_state = false;
55  if (_num_stiffness)
57 
58  if (_num_stiffness)
60 
61  _dce_dfe.zero();
62  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
63  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
64  for (unsigned int k = 0; k < LIBMESH_DIM; ++k)
65  {
66  _dce_dfe(i, j, k, i) = _dce_dfe(i, j, k, i) + _fe(k, j);
67  _dce_dfe(i, j, k, j) = _dce_dfe(i, j, k, j) + _fe(k, i);
68  }
69 
71 }
virtual void computeElasticStrain()
Computes elastic Lagrangian strain.
virtual void computeDamageStress()
This function computes PK2 stress modified to account for damage Computes numerical stiffness if flag...
virtual void computeNumStiffness()
This function computes numerical stiffness.
bool _save_state
Flag to save couple material properties.
bool _num_stiffness
Flag to compute numerical stiffness.
void HyperElasticPhaseFieldIsoDamage::computeQpJacobian ( )
protectedvirtual

This function computes tensors used to construct diagonal and off-diagonal Jacobian.

Reimplemented from FiniteStrainHyperElasticViscoPlastic.

Definition at line 151 of file HyperElasticPhaseFieldIsoDamage.C.

152 {
154 
155  RankTwoTensor dG0_dce = _dee_dce.innerProductTranspose(_dG0_dee);
156  RankTwoTensor dG0_dfe = _dce_dfe.innerProductTranspose(dG0_dce);
157  RankTwoTensor dG0_df = _dfe_df.innerProductTranspose(dG0_dfe);
158 
159  _dG0_dstrain[_qp] = _df_dstretch_inc.innerProductTranspose(dG0_df);
160  _dstress_dc[_qp] = _fe.mixedProductIkJl(_fe) * _dpk2_dc;
161 }
virtual void computeQpJacobian()
This function computes the Jacobian.
MaterialProperty< RankTwoTensor > & _dG0_dstrain
MaterialProperty< RankTwoTensor > & _dstress_dc
void ComputeStressBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Reimplemented in ComputeBirchMurnaghanEquationOfStress, and ComputeStressEosBase.

Definition at line 99 of file ComputeStressBase.C.

100 {
101  // InitialStress Deprecation: remove the following 2 lines
103  (*_initial_stress)[_qp] = (*_initial_stress_old)[_qp];
104 
105  computeQpStress();
106 
107  // Add in extra stress
108  _stress[_qp] += _extra_stress[_qp];
109 }
virtual void computeQpStress()=0
MaterialProperty< RankTwoTensor > & _stress
const bool _initial_stress_provided
Whether initial stress was provided. InitialStress Deprecation: remove this.
const MaterialProperty< RankTwoTensor > & _extra_stress
Extra stress tensor.
void FiniteStrainHyperElasticViscoPlastic::computeQpStress ( )
protectedvirtualinherited

This function computes the Cauchy stress.

Implements ComputeStressBase.

Definition at line 205 of file FiniteStrainHyperElasticViscoPlastic.C.

206 {
207  bool converge;
208  RankTwoTensor delta_dfgrd = _deformation_gradient[_qp] - _deformation_gradient_old[_qp];
209  unsigned int num_substep = 1;
210  unsigned int substep_iter = 1;
211 
212  saveOldState();
213 
214  do
215  {
216  preSolveQp();
217 
218  converge = true;
219  _dt_substep = _dt / num_substep;
220 
221  for (unsigned int istep = 0; istep < num_substep; ++istep)
222  {
223  _dfgrd_tmp = (istep + 1) * delta_dfgrd / num_substep + _deformation_gradient_old[_qp];
224  if (!solveQp())
225  {
226  converge = false;
227  substep_iter++;
228  num_substep *= 2;
229  break;
230  }
231  }
232 
233  if (substep_iter > _max_substep_iter)
234  mooseError("Constitutive failure with substepping at quadrature point ",
235  _q_point[_qp](0),
236  " ",
237  _q_point[_qp](1),
238  " ",
239  _q_point[_qp](2));
240  } while (!converge);
241 
242  postSolveQp();
243 }
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
unsigned int _max_substep_iter
Maximum number of substep iterations.
virtual void postSolveQp()
Update state for output (Outside substepping)
virtual void saveOldState()
This function saves the old stateful properties that is modified during sub stepping.
const MaterialProperty< RankTwoTensor > & _deformation_gradient
bool FiniteStrainHyperElasticViscoPlastic::computeStrength ( )
protectedvirtualinherited

This function call user objects to compute strength.

Definition at line 606 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateResidual().

607 {
608  Real val = 0;
609  for (unsigned int i = 0; i < _num_strength_uos; ++i)
610  {
611  if (_strength_uo[i]->computeValue(_qp, val))
612  (*_strength_prop[i])[_qp] = val;
613  else
614  return false;
615  }
616  return true;
617 }
std::vector< const HEVPStrengthUOBase * > _strength_uo
Strength user objects.
unsigned int _num_strength_uos
Number of strength user objects.
std::vector< MaterialProperty< Real > * > _strength_prop
void FiniteStrainHyperElasticViscoPlastic::computeStrengthDerivatives ( )
protectedinherited

This function call user objects to compute dstrength/dintvar.

Definition at line 668 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeFlowRateJacobian().

669 {
670  Real val = 0;
671 
672  for (unsigned int i = 0; i < _num_strength_uos; ++i)
673  for (unsigned int j = 0; j < _num_int_var_uos; ++j)
674  {
675  _strength_uo[i]->computeDerivative(_qp, _int_var_uo_names[j], val);
676  _dstrength_dintvar(i, j) = val;
677  }
678 }
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< UserObjectName > _int_var_uo_names
Names of internal variable user objects.
std::vector< const HEVPStrengthUOBase * > _strength_uo
Strength user objects.
unsigned int _num_strength_uos
Number of strength user objects.
void FiniteStrainHyperElasticViscoPlastic::initJacobianVariables ( )
protectedvirtualinherited

This function initialize variables required for Jacobian calculation.

Definition at line 149 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::FiniteStrainHyperElasticViscoPlastic().

150 {
152  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
154 
155  _dintvar_dflowrate_tmp.resize(_num_flow_rate_uos);
156  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
158 
161  _dintvar_dflowrate.resize(_num_int_var_uos, _num_flow_rate_uos);
164  _dflowrate_dstrength.resize(_num_flow_rate_uos, _num_strength_uos);
166 
167  _dpk2_dflowrate.resize(_num_flow_rate_uos);
168  _dflowrate_dpk2.resize(_num_flow_rate_uos);
169  _dfpinv_dflowrate.resize(_num_flow_rate_uos);
170 
171  _jac.resize(_num_flow_rate_uos, _num_flow_rate_uos);
172 
173  computeDeeDce();
174 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
std::vector< DenseVector< Real > > _dintvar_dflowrate_tmp
virtual void computeDeeDce()
Computes derivative of elastic strain w.r.t elastic Right Cauchy Green Tensor.
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< DenseVector< Real > > _dintvarrate_dflowrate
Jacobian variables.
unsigned int _num_strength_uos
Number of strength user objects.
void FiniteStrainHyperElasticViscoPlastic::initNumUserObjects ( const std::vector< UserObjectName > &  uo_names,
unsigned int &  uo_num 
)
protectedinherited

This function calculates the number of each user object type.

Definition at line 104 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::initUOVariables().

106 {
107  uo_num = uo_names.size();
108 }
template<typename T >
void FiniteStrainHyperElasticViscoPlastic::initProp ( const std::vector< UserObjectName > &  uo_names,
unsigned int  uo_num,
std::vector< MaterialProperty< T > * > &  uo_prop 
)
protectedinherited

This function initializes properties for each user object.

Definition at line 112 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::initUOVariables().

115 {
116  uo_prop.resize(uo_num);
117  for (unsigned int i = 0; i < uo_num; ++i)
118  uo_prop[i] = &declareProperty<T>(uo_names[i]);
119 }
template<typename T >
void FiniteStrainHyperElasticViscoPlastic::initPropOld ( const std::vector< UserObjectName > &  uo_names,
unsigned int  uo_num,
std::vector< const MaterialProperty< T > * > &  uo_prop_old 
)
protectedinherited

This function initializes old for stateful properties associated with user object Only user objects that update internal variables have an associated old property.

Definition at line 123 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::initUOVariables().

127 {
128  uo_prop_old.resize(uo_num);
129  for (unsigned int i = 0; i < uo_num; ++i)
130  uo_prop_old[i] = &getMaterialPropertyOld<T>(uo_names[i]);
131 }
void FiniteStrainHyperElasticViscoPlastic::initQpStatefulProperties ( )
protectedvirtualinherited

Initializes state.

Reimplemented from ComputeStressBase.

Definition at line 177 of file FiniteStrainHyperElasticViscoPlastic.C.

178 {
179  _stress[_qp].zero();
180 
181  _fp[_qp].zero();
182  _fp[_qp].addIa(1.0);
183  _ce[_qp].zero();
184 
185  _pk2[_qp].zero();
186 
187  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
188  (*_flow_rate_prop[i])[_qp] = 0.0;
189 
190  for (unsigned int i = 0; i < _num_strength_uos; ++i)
191  (*_strength_prop[i])[_qp] = 0.0;
192 
193  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
194  {
195  (*_int_var_stateful_prop[i])[_qp] = 0.0;
196  // TODO: remove this nasty const_cast if you can figure out how
197  const_cast<MaterialProperty<Real> &>(*_int_var_stateful_prop_old[i])[_qp] = 0.0;
198  }
199 
200  for (unsigned int i = 0; i < _num_int_var_rate_uos; ++i)
201  (*_int_var_rate_prop[i])[_qp] = 0.0;
202 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< MaterialProperty< Real > * > _flow_rate_prop
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
MaterialProperty< RankTwoTensor > & _stress
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
unsigned int _num_strength_uos
Number of strength user objects.
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
std::vector< MaterialProperty< Real > * > _int_var_rate_prop
std::vector< MaterialProperty< Real > * > _strength_prop
void FiniteStrainHyperElasticViscoPlastic::initUOVariables ( )
protectedvirtualinherited

This function initializes the properties, stateful properties and user objects The properties and stateful properties associated with user objects are only initialized here The properties have the same name as the user object name.

Definition at line 81 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::FiniteStrainHyperElasticViscoPlastic().

82 {
87 
92 
94 
99 
100  _int_var_old.resize(_num_int_var_uos, 0.0);
101 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< MaterialProperty< Real > * > _flow_rate_prop
void initUserObjects(const std::vector< UserObjectName > &, unsigned int, std::vector< const T * > &)
This function initializes user objects.
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
void initNumUserObjects(const std::vector< UserObjectName > &, unsigned int &)
This function calculates the number of each user object type.
std::vector< UserObjectName > _strength_uo_names
Names of strength user objects.
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< UserObjectName > _flow_rate_uo_names
Names of flow rate user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
std::vector< UserObjectName > _int_var_uo_names
Names of internal variable user objects.
std::vector< const HEVPInternalVarUOBase * > _int_var_uo
Internal variable user objects.
std::vector< const HEVPStrengthUOBase * > _strength_uo
Strength user objects.
unsigned int _num_strength_uos
Number of strength user objects.
std::vector< UserObjectName > _int_var_rate_uo_names
Names of internal variable rate user objects.
std::vector< const HEVPInternalVarRateUOBase * > _int_var_rate_uo
Internal variable rate user objects.
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
void initProp(const std::vector< UserObjectName > &, unsigned int, std::vector< MaterialProperty< T > * > &)
This function initializes properties for each user object.
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
Flow rate user objects.
std::vector< MaterialProperty< Real > * > _int_var_rate_prop
void initPropOld(const std::vector< UserObjectName > &, unsigned int, std::vector< const MaterialProperty< T > * > &)
This function initializes old for stateful properties associated with user object Only user objects t...
std::vector< MaterialProperty< Real > * > _strength_prop
template<typename T >
void FiniteStrainHyperElasticViscoPlastic::initUserObjects ( const std::vector< UserObjectName > &  uo_names,
unsigned int  uo_num,
std::vector< const T * > &  uo 
)
protectedinherited

This function initializes user objects.

Definition at line 135 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::initUOVariables().

138 {
139  uo.resize(uo_num);
140 
141  if (uo_num == 0)
142  mooseError("Specify atleast one user object of type", typeid(T).name());
143 
144  for (unsigned int i = 0; i < uo_num; ++i)
145  uo[i] = &getUserObjectByName<T>(uo_names[i]);
146 }
void FiniteStrainHyperElasticViscoPlastic::postSolveFlowrate ( )
protectedvirtualinherited

Update state for output (Inside substepping)

Definition at line 359 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveQp().

360 {
362 
363  // TODO: remove this nasty const_cast if you can figure out how
364  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
365  const_cast<MaterialProperty<Real> &>(*_int_var_stateful_prop_old[i])[_qp] =
366  (*_int_var_stateful_prop[i])[_qp];
367 }
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
void FiniteStrainHyperElasticViscoPlastic::postSolveQp ( )
protectedvirtualinherited

Update state for output (Outside substepping)

Definition at line 277 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeQpStress().

278 {
279  recoverOldState();
280 
281  _stress[_qp] = _fe * _pk2[_qp] * _fe.transpose() / _fe.det();
282  _fp[_qp] = _fp_tmp_inv.inverse();
283 
285 }
virtual void recoverOldState()
This function restores the the old stateful properties after a successful solve.
MaterialProperty< RankTwoTensor > & _stress
virtual void computeQpJacobian()
This function computes the Jacobian.
void FiniteStrainHyperElasticViscoPlastic::preSolveFlowrate ( )
protectedvirtualinherited

Sets state for solve (Inside substepping)

Definition at line 296 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveQp().

297 {
298  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
299  {
300  _flow_rate(i) = 0.0;
301  (*_flow_rate_prop[i])[_qp] = 0.0;
302  }
303 
304  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
305  (*_int_var_stateful_prop[i])[_qp] = (*_int_var_stateful_prop_old[i])[_qp];
306 
309 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< MaterialProperty< Real > * > _flow_rate_prop
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
void FiniteStrainHyperElasticViscoPlastic::preSolveQp ( )
protectedvirtualinherited

Sets state for solve.

Definition at line 253 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeQpStress().

254 {
255  _fp_tmp_old_inv = _fp_old[_qp].inverse();
256 
257  // TODO: remove this nasty const_cast if you can figure out how
258  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
259  (*_int_var_stateful_prop[i])[_qp] =
260  const_cast<MaterialProperty<Real> &>(*_int_var_stateful_prop_old[i])[_qp] = _int_var_old[i];
261 
263 }
const MaterialProperty< RankTwoTensor > & _fp_old
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
const MaterialProperty< RankFourTensor > & _elasticity_tensor
void FiniteStrainHyperElasticViscoPlastic::recoverOldState ( )
protectedvirtualinherited

This function restores the the old stateful properties after a successful solve.

Definition at line 288 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::postSolveQp().

289 {
290  // TODO: remove this nasty const_cast if you can figure out how
291  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
292  const_cast<MaterialProperty<Real> &>(*_int_var_stateful_prop_old[i])[_qp] = _int_var_old[i];
293 }
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
void FiniteStrainHyperElasticViscoPlastic::saveOldState ( )
protectedvirtualinherited

This function saves the old stateful properties that is modified during sub stepping.

Definition at line 246 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeQpStress().

247 {
248  for (unsigned int i = 0; i < _num_int_var_uos; ++i)
250 }
unsigned int _num_int_var_uos
Number of internal variable user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
bool FiniteStrainHyperElasticViscoPlastic::solveFlowrate ( )
protectedvirtualinherited

Solve for flow rate and state.

Definition at line 312 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveQp().

313 {
314  Real resid0, rnorm;
315  unsigned int iter = 0;
316 
317 #ifdef DEBUG
318  std::vector<Real> rnormst(_maxiters + 1), flowratest(_maxiters + 1);
319 #endif
320 
322  return false;
323 
324  rnorm = computeNorm(_resid.get_values());
325  resid0 = rnorm;
326 
327 #ifdef DEBUG
328  rnormst[iter] = rnorm;
329  flowratest[iter] = computeNorm(_flow_rate.get_values());
330 #endif
331 
332  while (rnorm > _resid_abs_tol && rnorm > _resid_rel_tol * resid0 && iter < _maxiters)
333  {
335 
336  updateFlowRate();
337 
339 
341  return false;
342 
343  rnorm = computeNorm(_resid.get_values());
344  iter++;
345 
346 #ifdef DEBUG
347  rnormst[iter] = rnorm;
348  flowratest[iter] = computeNorm(_flow_rate.get_values());
349 #endif
350  }
351 
352  if (iter == _maxiters && rnorm > _resid_abs_tol && rnorm > _resid_rel_tol * resid0)
353  return false;
354 
355  return true;
356 }
unsigned int _maxiters
Maximum number of iterations.
Real _resid_abs_tol
Absolute tolerance for residual convergence check.
virtual bool computeFlowRateResidual()
Computes flow rate residual vector.
virtual void computeFlowRateJacobian()
Computes flow rate Jacobian matrix.
virtual Real computeNorm(const std::vector< Real > &)
Computes norm of residual vector.
virtual void computeElasticPlasticDeformGrad()
Computes elastic and plastic deformation gradients.
Real _resid_rel_tol
Relative tolerance for residual convergence check.
bool FiniteStrainHyperElasticViscoPlastic::solveQp ( )
protectedvirtualinherited

Solve state.

Definition at line 266 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeQpStress().

267 {
269  if (!solveFlowrate())
270  return false;
272 
273  return true;
274 }
virtual bool solveFlowrate()
Solve for flow rate and state.
virtual void preSolveFlowrate()
Sets state for solve (Inside substepping)
virtual void postSolveFlowrate()
Update state for output (Inside substepping)
void FiniteStrainHyperElasticViscoPlastic::updateFlowRate ( )
protectedvirtualinherited

Update flow rate.

Definition at line 536 of file FiniteStrainHyperElasticViscoPlastic.C.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

537 {
538  _jac.lu_solve(_resid, _dflow_rate);
540 
541  for (unsigned int i = 0; i < _num_flow_rate_uos; ++i)
542  (*_flow_rate_prop[i])[_qp] = _flow_rate(i);
543 }
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
std::vector< MaterialProperty< Real > * > _flow_rate_prop

Member Data Documentation

const std::string ComputeStressBase::_base_name
protectedinherited
const VariableValue& HyperElasticPhaseFieldIsoDamage::_c
protected

Compupled damage variable.

Definition at line 53 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress().

MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_ce
protectedinherited
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dce_dfe
protectedinherited
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dee_dce
protectedinherited
const MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_deformation_gradient
protectedinherited
const MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_deformation_gradient_old
protectedinherited
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_df_dstretch_inc
protectedinherited
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dfe_df
protectedinherited
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dfe_dfpinv
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_dfgrd_tmp
protectedinherited
DenseVector<Real> FiniteStrainHyperElasticViscoPlastic::_dflow_rate
protectedinherited
std::vector<RankTwoTensor> FiniteStrainHyperElasticViscoPlastic::_dflowrate_dpk2
protectedinherited
DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_dflowrate_dstrength
protectedinherited
std::vector<RankTwoTensor> FiniteStrainHyperElasticViscoPlastic::_dfpinv_dflowrate
protectedinherited
RankTwoTensor HyperElasticPhaseFieldIsoDamage::_dG0_dee
protected

Definition at line 61 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress(), and computeQpJacobian().

MaterialProperty<RankTwoTensor>& HyperElasticPhaseFieldIsoDamage::_dG0_dstrain
protected

Definition at line 58 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeQpJacobian().

DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_dintvar_dflowrate
protectedinherited
std::vector<DenseVector<Real> > FiniteStrainHyperElasticViscoPlastic::_dintvar_dflowrate_tmp
protectedinherited
DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_dintvar_dintvar
protectedinherited
DenseVector<Real> FiniteStrainHyperElasticViscoPlastic::_dintvar_dintvar_x
protectedinherited
DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_dintvar_dintvarrate
protectedinherited
std::vector<DenseVector<Real> > FiniteStrainHyperElasticViscoPlastic::_dintvarrate_dflowrate
protectedinherited
DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_dintvarrate_dintvar
protectedinherited
RankTwoTensor HyperElasticPhaseFieldIsoDamage::_dpk2_dc
protected

Definition at line 61 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress(), and computeQpJacobian().

RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dpk2_dce
protectedinherited
RankFourTensor HyperElasticPhaseFieldIsoDamage::_dpk2_dee
protected
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dpk2_dfe
protectedinherited
std::vector<RankTwoTensor> FiniteStrainHyperElasticViscoPlastic::_dpk2_dflowrate
protectedinherited
RankFourTensor FiniteStrainHyperElasticViscoPlastic::_dpk2_dfpinv
protectedinherited
DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_dstrength_dintvar
protectedinherited
MaterialProperty<RankTwoTensor>& HyperElasticPhaseFieldIsoDamage::_dstress_dc
protected

Definition at line 59 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeQpJacobian().

Real FiniteStrainHyperElasticViscoPlastic::_dt_substep
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_ee
protectedinherited
MaterialProperty<RankTwoTensor>& ComputeStressBase::_elastic_strain
protectedinherited
const MaterialProperty<RankFourTensor>& ComputeStressBase::_elasticity_tensor
protectedinherited
const std::string ComputeStressBase::_elasticity_tensor_name
protectedinherited
std::vector<RankTwoTensor> HyperElasticPhaseFieldIsoDamage::_etens
protected

Definition at line 63 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress().

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_extra_stress
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_fe
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_fe_pk2
protectedinherited
std::vector<RankTwoTensor> FiniteStrainHyperElasticViscoPlastic::_flow_dirn
protectedinherited
DenseVector<Real> FiniteStrainHyperElasticViscoPlastic::_flow_rate
protectedinherited
std::vector<MaterialProperty<Real> *> FiniteStrainHyperElasticViscoPlastic::_flow_rate_prop
protectedinherited
std::vector<const HEVPFlowRateUOBase *> FiniteStrainHyperElasticViscoPlastic::_flow_rate_uo
protectedinherited
std::vector<UserObjectName> FiniteStrainHyperElasticViscoPlastic::_flow_rate_uo_names
protectedinherited
MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_fp
protectedinherited
const MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_fp_old
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_fp_tmp_inv
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_fp_tmp_old_inv
protectedinherited
MaterialProperty<Real>& HyperElasticPhaseFieldIsoDamage::_G0
protected

Definition at line 57 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress().

MaterialProperty<RankTwoTensor>* ComputeStressBase::_initial_stress
protectedinherited

Initial stress, if provided. InitialStress Deprecation: remove this.

Definition at line 74 of file ComputeStressBase.h.

Referenced by ComputeStressBase::initQpStatefulProperties().

std::vector<Function *> ComputeStressBase::_initial_stress_fcn
protectedinherited

initial stress components

Definition at line 62 of file ComputeStressBase.h.

Referenced by ComputeStressBase::ComputeStressBase(), and ComputeStressBase::initQpStatefulProperties().

const MaterialProperty<RankTwoTensor>* ComputeStressBase::_initial_stress_old
protectedinherited

Old value of initial stress, which is needed to correctly implement finite-strain rotations. InitialStress Deprecation: remove this.

Definition at line 77 of file ComputeStressBase.h.

const bool ComputeStressBase::_initial_stress_provided
protectedinherited
std::vector<Real> FiniteStrainHyperElasticViscoPlastic::_int_var_old
protectedinherited
std::vector<MaterialProperty<Real> *> FiniteStrainHyperElasticViscoPlastic::_int_var_rate_prop
protectedinherited
std::vector<const HEVPInternalVarRateUOBase *> FiniteStrainHyperElasticViscoPlastic::_int_var_rate_uo
protectedinherited
std::vector<UserObjectName> FiniteStrainHyperElasticViscoPlastic::_int_var_rate_uo_names
protectedinherited
std::vector<MaterialProperty<Real> *> FiniteStrainHyperElasticViscoPlastic::_int_var_stateful_prop
protectedinherited
std::vector<const MaterialProperty<Real> *> FiniteStrainHyperElasticViscoPlastic::_int_var_stateful_prop_old
protectedinherited
std::vector<const HEVPInternalVarUOBase *> FiniteStrainHyperElasticViscoPlastic::_int_var_uo
protectedinherited
std::vector<UserObjectName> FiniteStrainHyperElasticViscoPlastic::_int_var_uo_names
protectedinherited
DenseMatrix<Real> FiniteStrainHyperElasticViscoPlastic::_jac
protectedinherited
MaterialProperty<RankFourTensor>& ComputeStressBase::_Jacobian_mult
protectedinherited
Real HyperElasticPhaseFieldIsoDamage::_kdamage
protected

Small stiffness of completely damaged material point.

Definition at line 45 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress().

unsigned int FiniteStrainHyperElasticViscoPlastic::_max_substep_iter
protectedinherited

Maximum number of substep iterations.

Definition at line 162 of file FiniteStrainHyperElasticViscoPlastic.h.

Referenced by FiniteStrainHyperElasticViscoPlastic::computeQpStress().

unsigned int FiniteStrainHyperElasticViscoPlastic::_maxiters
protectedinherited

Maximum number of iterations.

Definition at line 160 of file FiniteStrainHyperElasticViscoPlastic.h.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_mechanical_strain
protectedinherited
unsigned int FiniteStrainHyperElasticViscoPlastic::_num_flow_rate_uos
protectedinherited
unsigned int FiniteStrainHyperElasticViscoPlastic::_num_int_var_rate_uos
protectedinherited
unsigned int FiniteStrainHyperElasticViscoPlastic::_num_int_var_uos
protectedinherited
bool HyperElasticPhaseFieldIsoDamage::_num_stiffness
protected

Flag to compute numerical stiffness.

Definition at line 43 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computePK2StressAndDerivative().

unsigned int FiniteStrainHyperElasticViscoPlastic::_num_strength_uos
protectedinherited
Real HyperElasticPhaseFieldIsoDamage::_pert_val
protected

Perturbation value for strain components.

Definition at line 51 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeNumStiffness().

MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_pk2
protectedinherited
RankTwoTensor FiniteStrainHyperElasticViscoPlastic::_pk2_fet
protectedinherited
std::string FiniteStrainHyperElasticViscoPlastic::_pk2_prop_name
protectedinherited
RankTwoTensor HyperElasticPhaseFieldIsoDamage::_pk2_tmp
protected
DenseVector<Real> FiniteStrainHyperElasticViscoPlastic::_resid
protectedinherited
Real FiniteStrainHyperElasticViscoPlastic::_resid_abs_tol
protectedinherited

Absolute tolerance for residual convergence check.

Definition at line 156 of file FiniteStrainHyperElasticViscoPlastic.h.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

Real FiniteStrainHyperElasticViscoPlastic::_resid_rel_tol
protectedinherited

Relative tolerance for residual convergence check.

Definition at line 158 of file FiniteStrainHyperElasticViscoPlastic.h.

Referenced by FiniteStrainHyperElasticViscoPlastic::solveFlowrate().

const MaterialProperty<RankTwoTensor>& FiniteStrainHyperElasticViscoPlastic::_rotation_increment
protectedinherited
bool HyperElasticPhaseFieldIsoDamage::_save_state
protected

Flag to save couple material properties.

Definition at line 55 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeDamageStress(), and computePK2StressAndDerivative().

const bool ComputeStressBase::_store_stress_old
protectedinherited

Parameter which decides whether to store old stress. This is required for HHT time integration and Rayleigh damping.

Definition at line 68 of file ComputeStressBase.h.

std::vector<MaterialProperty<Real> *> FiniteStrainHyperElasticViscoPlastic::_strength_prop
protectedinherited
std::vector<const HEVPStrengthUOBase *> FiniteStrainHyperElasticViscoPlastic::_strength_uo
protectedinherited
std::vector<UserObjectName> FiniteStrainHyperElasticViscoPlastic::_strength_uo_names
protectedinherited
MaterialProperty<RankTwoTensor>& ComputeStressBase::_stress
protectedinherited

Definition at line 53 of file ComputeStressBase.h.

Referenced by ComputeStressBase::addQpInitialStress(), ComputeMultipleInelasticCosseratStress::computeAdmissibleState(), ComputeMultipleInelasticStress::computeAdmissibleState(), ComputeStressBase::computeQpProperties(), ComputeStressEosBase::computeQpProperties(), ComputeBirchMurnaghanEquationOfStress::computeQpProperties(), ComputeLinearElasticStress::computeQpStress(), ComputeStrainIncrementBasedStress::computeQpStress(), ComputeLinearElasticPFFractureStress::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), ComputeIsotropicLinearElasticPFFractureStress::computeQpStress(), ComputeFiniteStrainElasticStressBirchMurnaghan::computeQpStress(), FiniteStrainPlasticMaterial::computeQpStress(), ComputeMultiPlasticityStress::computeQpStress(), ComputeSmearedCrackingStress::computeQpStress(), ComputeLinearViscoelasticStress::computeQpStress(), ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration(), ComputeSmearedCrackingStress::crackingStressRotation(), ComputeMultipleInelasticStress::finiteStrainRotation(), ComputeStressBase::initQpStatefulProperties(), FiniteStrainCrystalPlasticity::initQpStatefulProperties(), FiniteStrainUObasedCP::initQpStatefulProperties(), FiniteStrainHyperElasticViscoPlastic::initQpStatefulProperties(), ComputeMultiPlasticityStress::postReturnMap(), FiniteStrainUObasedCP::postSolveQp(), FiniteStrainHyperElasticViscoPlastic::postSolveQp(), FiniteStrainCrystalPlasticity::postSolveQp(), ComputeMultipleInelasticStress::updateQpState(), ComputeMultipleInelasticStress::updateQpStateSingleModel(), and LinearIsoElasticPFDamage::updateVar().

RankFourTensor FiniteStrainHyperElasticViscoPlastic::_tan_mod
protectedinherited
Real HyperElasticPhaseFieldIsoDamage::_zero_pert
protected

Perturbation value for near zero or zero strain components.

Definition at line 49 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeNumStiffness().

Real HyperElasticPhaseFieldIsoDamage::_zero_tol
protected

Used in numerical stiffness calculation to check near zero values.

Definition at line 47 of file HyperElasticPhaseFieldIsoDamage.h.

Referenced by computeNumStiffness().


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