https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeCrystalPlasticityEigenstrainBase.C
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
11#include "RankTwoTensor.h"
12
15{
17
18 // The return stress increment classes are intended to be iterative materials, so must set compute
19 // = false for all inheriting classes
20 params.set<bool>("compute") = false;
21 params.suppressParameter<bool>("compute");
22
23 params.addRequiredParam<std::string>(
24 "deformation_gradient_name",
25 "Material property name for the deformation gradient tensor computed "
26 "by this model.");
27 return params;
28}
29
31 const InputParameters & parameters)
32 : ComputeEigenstrainBase(parameters),
33 _deformation_gradient_name(_base_name + getParam<std::string>("deformation_gradient_name")),
34 _deformation_gradient(declareProperty<RankTwoTensor>(_deformation_gradient_name)),
35 _deformation_gradient_old(getMaterialPropertyOld<RankTwoTensor>(_deformation_gradient_name)),
36 _crysrot(getMaterialProperty<RankTwoTensor>(
37 "crysrot")) // defined in the elasticity tensor classes for crystal plasticity
38{
39}
40
41void
50
51void
53{
54 // updates the deformation gradient from the child class
56 // use the updated deformation gradient for the eigenstrain calculation
59}
60
61void
63{
64 _qp = qp;
65}
66
67void
69{
70 _substep_dt = substep_dt;
71}
72
73const RankTwoTensor
78
79const RankTwoTensor
virtual void computeQpDeformationGradient()=0
Compute the deformation gradient and store in _deformation_gradient.
Real _substep_dt
Substepping time step value used within the inheriting crystal plasticity eigenstrain calculations.
virtual void initQpStatefulProperties() override
We need to set initial values for deforamtion gradients too.
void setQp(const unsigned int &qp)
Sets the value of the global variable _qp for inheriting classes.
void computeQpEigenstrain() override
Compute the eigenstrain and store in _eigenstrain.
MaterialProperty< RankTwoTensor > & _deformation_gradient
Stores the deformation gradient.
ComputeCrystalPlasticityEigenstrainBase(const InputParameters &parameters)
void setSubstepDt(const Real &substep_dt)
Sets the value of the _substep_dt for inheriting classes.
ComputeEigenstrainBase is the base class for eigenstrain tensors.
virtual void initQpStatefulProperties() override
GenericMaterialProperty< RankTwoTensor, is_ad > & _eigenstrain
Stores the current total eigenstrain.
static InputParameters validParams()
void suppressParameter(const std::string &name)
void addRequiredParam(const std::string &name, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
unsigned int _qp
RankTwoTensorTempl< T > inverse() const
static RankTwoTensorTempl Identity()