https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
17
29{
30public:
32
34
35protected:
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;
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
232 DenseMatrix<Real> _dintvarrate_dintvar;
233 DenseMatrix<Real> _dintvar_dintvarrate;
234 DenseMatrix<Real> _dintvar_dintvar;
235 DenseMatrix<Real> _dintvar_dflowrate;
236 DenseMatrix<Real> _dstrength_dintvar;
237 DenseMatrix<Real> _dflowrate_dstrength;
238 DenseVector<Real> _dintvar_dintvar_x;
239 DenseMatrix<Real> _jac;
240
242};
ComputeStressBase is the base class for stress tensors computed from MOOSE's strain calculators.
This class solves the viscoplastic flow rate equations in the total form Involves 4 different types o...
void initNumUserObjects(const std::vector< UserObjectName > &, unsigned int &)
This function calculates the number of each user object type.
virtual void preSolveFlowrate()
Sets state for solve (Inside substepping)
std::vector< DenseVector< Real > > _dintvarrate_dflowrate
Jacobian variables.
virtual void computeElasticRightCauchyGreenTensor()
Computes elastic Right Cauchy Green Tensor.
virtual void computeDeeDce()
Computes derivative of elastic strain w.r.t elastic Right Cauchy Green Tensor.
std::vector< MaterialProperty< Real > * > _flow_rate_prop
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
virtual bool computeIntVarRates()
This function call user objects to calculate rate of internal variables.
std::vector< MaterialProperty< Real > * > _strength_prop
std::vector< UserObjectName > _flow_rate_uo_names
Names of flow rate user objects.
std::vector< MaterialProperty< Real > * > _int_var_stateful_prop
virtual void computeElasticPlasticDeformGrad()
Computes elastic and plastic deformation gradients.
virtual bool computeFlowDirection()
Calls user objects to compute flow directions.
unsigned int _num_strength_uos
Number of strength user objects.
virtual void computeIntVarDerivatives()
This function call user objects to compute dintvar/dintvar_rate and dintvar/dflowrate.
virtual void initUOVariables()
This function initializes the properties, stateful properties and user objects The properties and sta...
virtual void computeElasticStrain()
Computes elastic Lagrangian strain.
unsigned int _num_int_var_uos
Number of internal variable user objects.
virtual bool computeStrength()
This function call user objects to compute strength.
std::vector< UserObjectName > _int_var_uo_names
Names of internal variable user objects.
virtual void recoverOldState()
This function restores the the old stateful properties after a successful solve.
virtual void initJacobianVariables()
This function initialize variables required for Jacobian calculation.
std::vector< const HEVPInternalVarUOBase * > _int_var_uo
Internal variable user objects.
unsigned int _num_int_var_rate_uos
Number of internal variable rate user objects.
std::vector< UserObjectName > _strength_uo_names
Names of strength user objects.
const MaterialProperty< RankTwoTensor > & _rotation_increment
virtual void computeDpk2Dfpinv()
Computes derivative of PK2 stress wrt inverse of plastic deformation gradient.
std::vector< MaterialProperty< Real > * > _int_var_rate_prop
const MaterialProperty< RankTwoTensor > & _fp_old
virtual bool computeFlowRateFunction()
Calls user objects to compute flow rates.
virtual bool computeIntVar()
This function call user objects to integrate internal variables.
virtual void computeIntVarRateDerivatives()
This function call user objects to compute dintvar_rate/dintvar and dintvarrate/dflowrate.
virtual bool computeFlowRateResidual()
Computes flow rate residual vector.
void initUserObjects(const std::vector< UserObjectName > &, unsigned int, std::vector< const T * > &)
This function initializes user objects.
virtual void computeQpJacobian()
This function computes the Jacobian.
const MaterialProperty< RankTwoTensor > & _deformation_gradient_old
virtual void computeFlowRateJacobian()
Computes flow rate Jacobian matrix.
unsigned int _num_flow_rate_uos
Number of flow rate user objects.
virtual void computeQpStress()
This function computes the Cauchy stress.
virtual void postSolveFlowrate()
Update state for output (Inside substepping)
virtual void computePK2StressAndDerivative()
Computes PK2 stress and derivative w.r.t elastic Right Cauchy Green Tensor.
std::vector< DenseVector< Real > > _dintvar_dflowrate_tmp
void initProp(const std::vector< UserObjectName > &, unsigned int, std::vector< MaterialProperty< T > * > &)
This function initializes properties for each user object.
Real _resid_rel_tol
Relative tolerance for residual convergence check.
std::vector< UserObjectName > _int_var_rate_uo_names
Names of internal variable rate user objects.
virtual void postSolveQp()
Update state for output (Outside substepping)
std::vector< const HEVPStrengthUOBase * > _strength_uo
Strength user objects.
std::vector< const MaterialProperty< Real > * > _int_var_stateful_prop_old
void computeStrengthDerivatives()
This function call user objects to compute dstrength/dintvar.
unsigned int _maxiters
Maximum number of iterations.
virtual void saveOldState()
This function saves the old stateful properties that is modified during sub stepping.
const MaterialProperty< RankTwoTensor > & _deformation_gradient
virtual bool solveFlowrate()
Solve for flow rate and state.
unsigned int _max_substep_iter
Maximum number of substep iterations.
std::vector< const HEVPFlowRateUOBase * > _flow_rate_uo
Flow rate user objects.
const std::string _elasticity_tensor_name
Name of the elasticity tensor material property.
virtual Real computeNorm(const std::vector< Real > &)
Computes norm of residual vector.
std::vector< const HEVPInternalVarRateUOBase * > _int_var_rate_uo
Internal variable rate user objects.
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...
Real _resid_abs_tol
Absolute tolerance for residual convergence check.