https://mooseframework.inl.gov
FiniteStrainHyperElasticViscoPlastic.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "ComputeStressBase.h"
13 #include "HEVPFlowRateUOBase.h"
14 #include "HEVPStrengthUOBase.h"
15 #include "HEVPInternalVarUOBase.h"
17 
29 {
30 public:
32 
34 
35 protected:
41  virtual void initUOVariables();
42 
44  void initNumUserObjects(const std::vector<UserObjectName> &, unsigned int &);
45 
47  template <typename T>
48  void
49  initProp(const std::vector<UserObjectName> &, unsigned int, std::vector<MaterialProperty<T> *> &);
50 
55  template <typename T>
56  void initPropOld(const std::vector<UserObjectName> &,
57  unsigned int,
58  std::vector<const MaterialProperty<T> *> &);
59 
61  template <typename T>
62  void initUserObjects(const std::vector<UserObjectName> &, unsigned int, std::vector<const T *> &);
63 
65  virtual void initJacobianVariables();
66 
68  virtual void initQpStatefulProperties();
69 
71  virtual void computeQpStress();
72 
74  virtual void computeQpJacobian();
75 
77  virtual void saveOldState();
78 
80  virtual void preSolveQp();
81 
83  virtual bool solveQp();
84 
86  virtual void postSolveQp();
87 
89  virtual void recoverOldState();
90 
92  virtual void preSolveFlowrate();
93 
95  virtual bool solveFlowrate();
96 
98  virtual void postSolveFlowrate();
99 
101  virtual bool computeFlowRateFunction();
102 
104  virtual bool computeFlowDirection();
105 
108 
110  virtual void computePK2StressAndDerivative();
111 
113  virtual void computeElasticStrain();
114 
116  virtual void computeDeeDce();
117 
119  virtual bool computeFlowRateResidual();
120 
122  virtual void computeFlowRateJacobian();
123 
125  virtual void computeElasticPlasticDeformGrad();
126 
128  virtual Real computeNorm(const std::vector<Real> &);
129 
131  virtual void updateFlowRate();
132 
134  virtual void computeDpk2Dfpinv();
135 
137  virtual bool computeIntVarRates();
138 
140  virtual bool computeIntVar();
141 
143  virtual bool computeStrength();
144 
146  virtual void computeIntVarRateDerivatives();
147 
149  virtual void computeIntVarDerivatives();
150 
153 
159  unsigned int _maxiters;
161  unsigned int _max_substep_iter;
162 
164  std::vector<UserObjectName> _flow_rate_uo_names;
166  std::vector<UserObjectName> _strength_uo_names;
168  std::vector<UserObjectName> _int_var_uo_names;
170  std::vector<UserObjectName> _int_var_rate_uo_names;
171 
173  unsigned int _num_flow_rate_uos;
175  unsigned int _num_strength_uos;
177  unsigned int _num_int_var_uos;
179  unsigned int _num_int_var_rate_uos;
180 
182  std::vector<const HEVPFlowRateUOBase *> _flow_rate_uo;
184  std::vector<const HEVPStrengthUOBase *> _strength_uo;
186  std::vector<const HEVPInternalVarUOBase *> _int_var_uo;
188  std::vector<const HEVPInternalVarRateUOBase *> _int_var_rate_uo;
189 
190  std::string _pk2_prop_name;
195 
197  const std::string _elasticity_tensor_name;
203 
204  std::vector<MaterialProperty<Real> *> _flow_rate_prop;
205  std::vector<MaterialProperty<Real> *> _strength_prop;
206  std::vector<MaterialProperty<Real> *> _int_var_stateful_prop;
207  std::vector<const MaterialProperty<Real> *> _int_var_stateful_prop_old;
208  std::vector<MaterialProperty<Real> *> _int_var_rate_prop;
209  std::vector<Real> _int_var_old;
210 
218 
219  std::vector<RankTwoTensor> _flow_dirn;
220  std::vector<RankTwoTensor> _dflowrate_dpk2;
221  std::vector<RankTwoTensor> _dpk2_dflowrate;
222  std::vector<RankTwoTensor> _dfpinv_dflowrate;
223 
224  DenseVector<Real> _dflow_rate;
225  DenseVector<Real> _flow_rate;
226  DenseVector<Real> _resid;
227 
229  std::vector<DenseVector<Real>> _dintvarrate_dflowrate;
230  std::vector<DenseVector<Real>> _dintvar_dflowrate_tmp;
231 
238  DenseVector<Real> _dintvar_dintvar_x;
240 
242 };
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
unsigned int _maxiters
Maximum number of iterations.
virtual void recoverOldState()
This function restores the the old stateful properties after a successful solve.
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
This class solves the viscoplastic flow rate equations in the total form Involves 4 different types o...
ComputeStressBase is the base class for stress tensors computed from MOOSE&#39;s strain calculators...
std::vector< MaterialProperty< Real > * > _flow_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...
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
std::vector< DenseVector< Real > > _dintvar_dflowrate_tmp
virtual void computeElasticStrain()
Computes elastic Lagrangian strain.
void initNumUserObjects(const std::vector< UserObjectName > &, unsigned int &)
This function calculates the number of each user object type.
unsigned int _max_substep_iter
Maximum number of substep iterations.
std::vector< UserObjectName > _strength_uo_names
Names of strength user objects.
virtual void initUOVariables()
This function initializes the properties, stateful properties and user objects The properties and sta...
virtual void computeDpk2Dfpinv()
Computes derivative of PK2 stress wrt inverse of plastic deformation gradient.
const MaterialProperty< RankTwoTensor > & _fp_old
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.
Real _resid_abs_tol
Absolute tolerance for residual convergence check.
virtual bool solveFlowrate()
Solve for flow rate and state.
virtual void computeQpJacobian()
This function computes the Jacobian.
virtual void postSolveQp()
Update state for output (Outside substepping)
std::vector< UserObjectName > _flow_rate_uo_names
Names of flow rate user objects.
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 initJacobianVariables()
This function initialize variables required for Jacobian calculation.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
std::vector< UserObjectName > _int_var_uo_names
Names of internal variable user objects.
virtual bool computeFlowRateResidual()
Computes flow rate residual vector.
virtual void computeFlowRateJacobian()
Computes flow rate Jacobian matrix.
std::vector< const HEVPInternalVarUOBase * > _int_var_uo
Internal variable user objects.
virtual void preSolveFlowrate()
Sets state for solve (Inside substepping)
virtual void computeIntVarDerivatives()
This function call user objects to compute dintvar/dintvar_rate and dintvar/dflowrate.
std::vector< const HEVPStrengthUOBase * > _strength_uo
Strength user objects.
virtual Real computeNorm(const std::vector< Real > &)
Computes norm of residual vector.
virtual void computeElasticPlasticDeformGrad()
Computes elastic and plastic deformation gradients.
const std::string _elasticity_tensor_name
Name of the elasticity tensor material property.
virtual void computeQpStress()
This function computes the Cauchy stress.
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.
virtual bool computeFlowDirection()
Calls user objects to compute flow directions.
void initProp(const std::vector< UserObjectName > &, unsigned int, std::vector< MaterialProperty< T > *> &)
This function initializes properties for each user object.
virtual void postSolveFlowrate()
Update state for output (Inside substepping)
const MaterialProperty< RankTwoTensor > & _rotation_increment
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
Flow rate user objects.
virtual void saveOldState()
This function saves the old stateful properties that is modified during sub stepping.
const MaterialProperty< RankTwoTensor > & _deformation_gradient
const InputParameters & parameters() const
virtual void computeElasticRightCauchyGreenTensor()
Computes elastic Right Cauchy Green Tensor.
void initUserObjects(const std::vector< UserObjectName > &, unsigned int, std::vector< const T *> &)
This function initializes user objects.
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.
std::vector< MaterialProperty< Real > * > _int_var_rate_prop
Real _resid_rel_tol
Relative tolerance for residual convergence check.
FiniteStrainHyperElasticViscoPlastic(const InputParameters &parameters)
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
virtual bool computeStrength()
This function call user objects to compute strength.
virtual void initQpStatefulProperties()
Initializes state.
virtual bool computeIntVarRates()
This function call user objects to calculate rate of internal variables.
std::vector< MaterialProperty< Real > * > _strength_prop