https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TotalLagrangianWeakPlaneStress Class Reference

#include <TotalLagrangianWeakPlaneStress.h>

Inheritance diagram for TotalLagrangianWeakPlaneStress:
[legend]

Public Types

typedef std::vector< intJvarMap
 

Public Member Functions

 TotalLagrangianWeakPlaneStress (const InputParameters &parameters)
 
virtual void initialSetup () override
 
template<>
void initialSetup ()
 
template<>
void initialSetup ()
 
template<>
void initialSetup ()
 
virtual void computeOffDiagJacobian (unsigned int jvar) override
 
unsigned int mapJvarToCvar (unsigned int jvar)
 
int mapJvarToCvar (unsigned int jvar, const JvarMap &jvar_map)
 
bool mapJvarToCvar (unsigned int jvar, unsigned int &cvar)
 
const JvarMapgetJvarMap ()
 
const JvarMapgetParameterJvarMap (std::string parameter_name)
 

Static Public Member Functions

static InputParameters validParams ()
 
static InputParameters baseParams ()
 

Protected Member Functions

virtual void precalculateJacobian () override
 
virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 
virtual RankTwoTensor gradTest (unsigned int component) override
 
virtual RankTwoTensor gradTrial (unsigned int component) override
 
virtual void precalculateJacobianDisplacement (unsigned int component) override
 Prepare the average shape function gradients for stabilization. More...
 
virtual Real computeQpJacobianDisplacement (unsigned int alpha, unsigned int beta) override
 
virtual Real computeQpJacobianTemperature (unsigned int cvar) override
 
virtual Real computeQpJacobianOutOfPlaneStrain () override
 
virtual void precalculateOffDiagJacobian (unsigned int jvar) override
 

Protected Attributes

const MaterialProperty< RankTwoTensor > & _pk1
 The 1st Piola-Kirchhoff stress. More...
 
const MaterialProperty< RankFourTensor > & _dpk1
 The derivative of the PK1 stress with respect to the deformation gradient. More...
 
const bool _large_kinematics
 If true use large deformation kinematics. More...
 
const bool _stabilize_strain
 If true calculate the deformation gradient derivatives for F_bar. More...
 
const std::string _base_name
 Prepend to the material properties. More...
 
const unsigned int _alpha
 Which component of the vector residual this kernel is responsible for. More...
 
const unsigned int _ndisp
 Total number of displacements/size of residual vector. More...
 
std::vector< unsigned int_disp_nums
 The displacement numbers. More...
 
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
 
const MaterialProperty< RankTwoTensor > & _F_ust
 The unmodified deformation gradient. More...
 
const MaterialProperty< RankTwoTensor > & _F_avg
 The element-average deformation gradient. More...
 
const MaterialProperty< RankTwoTensor > & _f_inv
 The inverse increment deformation gradient. More...
 
const MaterialProperty< RankTwoTensor > & _F_inv
 The inverse deformation gradient. More...
 
const MaterialProperty< RankTwoTensor > & _F
 The actual (stabilized) deformation gradient. More...
 
const MooseVariable_temperature
 Temperature, if provided. This is used only to get the trial functions. More...
 
const MooseVariable_out_of_plane_strain
 Out-of-plane strain, if provided. More...
 
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
 Eigenstrain derivatives wrt generate coupleds. More...
 
const unsigned int _n_args
 

Detailed Description

Definition at line 14 of file TotalLagrangianWeakPlaneStress.h.

Constructor & Destructor Documentation

◆ TotalLagrangianWeakPlaneStress()

TotalLagrangianWeakPlaneStress::TotalLagrangianWeakPlaneStress ( const InputParameters parameters)

Definition at line 27 of file TotalLagrangianWeakPlaneStress.C.

29 {
30 }
TotalLagrangianStressDivergenceBase< GradientOperatorCartesian > TotalLagrangianStressDivergence

Member Function Documentation

◆ baseParams()

template<class G >
InputParameters TotalLagrangianStressDivergenceBase< G >::baseParams ( )
staticinherited

Definition at line 14 of file TotalLagrangianStressDivergenceBase.C.

Referenced by TotalLagrangianStressDivergenceBase< G >::validParams().

15 {
17  // This kernel requires use_displaced_mesh to be off
18  params.suppressParameter<bool>("use_displaced_mesh");
19  return params;
20 }
void suppressParameter(const std::string &name)

◆ computeQpJacobian()

Real TotalLagrangianWeakPlaneStress::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 39 of file TotalLagrangianWeakPlaneStress.C.

40 {
41  return _test[_i][_qp] * _dpk1[_qp](2, 2, 2, 2) * _phi[_j][_qp];
42 }
const MaterialProperty< RankFourTensor > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient.

◆ computeQpJacobianDisplacement()

template<class G >
Real TotalLagrangianStressDivergenceBase< G >::computeQpJacobianDisplacement ( unsigned int  alpha,
unsigned int  beta 
)
overrideprotectedvirtualinherited

Implements LagrangianStressDivergenceBase.

Definition at line 101 of file TotalLagrangianStressDivergenceBase.C.

103 {
104  // J_{alpha beta} = phi^alpha_{i, J} T_{iJkL} G^beta_{kL}
105  return gradTest(alpha).doubleContraction(_dpk1[_qp] * gradTrial(beta));
106 }
virtual RankTwoTensor gradTest(unsigned int component) override
Real doubleContraction(const RankTwoTensorTempl< Real > &a) const
const MaterialProperty< RankFourTensor > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient.
static const std::string alpha
Definition: NS.h:134
virtual RankTwoTensor gradTrial(unsigned int component) override

◆ computeQpJacobianOutOfPlaneStrain()

template<class G >
Real TotalLagrangianStressDivergenceBase< G >::computeQpJacobianOutOfPlaneStrain ( )
overrideprotectedvirtualinherited

Implements LagrangianStressDivergenceBase.

Definition at line 128 of file TotalLagrangianStressDivergenceBase.C.

129 {
130  return _dpk1[_qp].contractionKl(2, 2, gradTest(_alpha)) * _out_of_plane_strain->phi()[_j][_qp];
131 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
virtual RankTwoTensor gradTest(unsigned int component) override
const FieldVariablePhiValue & phi() const override
const MaterialProperty< RankFourTensor > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient.

◆ computeQpJacobianTemperature()

template<class G >
Real TotalLagrangianStressDivergenceBase< G >::computeQpJacobianTemperature ( unsigned int  cvar)
overrideprotectedvirtualinherited

Implements LagrangianStressDivergenceBase.

Definition at line 110 of file TotalLagrangianStressDivergenceBase.C.

111 {
112  usingTensorIndices(i_, j_, k_, l_);
113  // Multiple eigenstrains may depend on the same coupled var
114  RankTwoTensor total_deigen;
115  for (const auto deigen_darg : _deigenstrain_dargs[cvar])
116  total_deigen += (*deigen_darg)[_qp];
117 
118  const auto A = _f_inv[_qp].inverse();
119  const auto B = _F_inv[_qp].inverse();
120  const auto U = 0.5 * (A.template times<i_, k_, l_, j_>(B) + A.template times<i_, l_, k_, j_>(B));
121 
122  return -(_dpk1[_qp] * U * total_deigen).doubleContraction(gradTest(_alpha)) *
123  _temperature->phi()[_j][_qp];
124 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MaterialProperty< RankTwoTensor > & _F_inv
The inverse deformation gradient.
virtual RankTwoTensor gradTest(unsigned int component) override
const FieldVariablePhiValue & phi() const override
const MaterialProperty< RankFourTensor > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient.
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
Eigenstrain derivatives wrt generate coupleds.
const MaterialProperty< RankTwoTensor > & _f_inv
The inverse increment deformation gradient.

◆ computeQpOffDiagJacobian()

Real TotalLagrangianWeakPlaneStress::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 45 of file TotalLagrangianWeakPlaneStress.C.

46 {
47  for (auto beta : make_range(_ndisp))
48  if (jvar == _disp_nums[beta])
49  return _test[_i][_qp] * _dpk1[_qp].contractionIj(2, 2, gradTrial(beta));
50 
51  return 0;
52 }
std::vector< unsigned int > _disp_nums
The displacement numbers.
const MaterialProperty< RankFourTensor > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient.
const unsigned int _ndisp
Total number of displacements/size of residual vector.
IntRange< T > make_range(T beg, T end)
virtual RankTwoTensor gradTrial(unsigned int component) override

◆ computeQpResidual()

Real TotalLagrangianWeakPlaneStress::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented from TotalLagrangianStressDivergenceBase< G >.

Definition at line 33 of file TotalLagrangianWeakPlaneStress.C.

34 {
35  return _test[_i][_qp] * _pk1[_qp](2, 2);
36 }
const MaterialProperty< RankTwoTensor > & _pk1
The 1st Piola-Kirchhoff stress.

◆ gradTest()

template<class G >
RankTwoTensor TotalLagrangianStressDivergenceBase< G >::gradTest ( unsigned int  component)
overrideprotectedvirtualinherited

Implements LagrangianStressDivergenceBase.

Definition at line 33 of file TotalLagrangianStressDivergenceBase.C.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeOffDiagJacobianScalar().

34 {
35  // F-bar doesn't modify the test function
36  return G::gradOp(component, _grad_test[_i][_qp], _test[_i][_qp], _q_point[_qp]);
37 }
static const std::string component
Definition: NS.h:153

◆ gradTrial()

template<class G >
RankTwoTensor TotalLagrangianStressDivergenceBase< G >::gradTrial ( unsigned int  component)
overrideprotectedvirtualinherited

Implements LagrangianStressDivergenceBase.

Definition at line 41 of file TotalLagrangianStressDivergenceBase.C.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeOffDiagJacobianScalar(), and computeQpOffDiagJacobian().

42 {
44 }
virtual RankTwoTensor gradTrialUnstabilized(unsigned int component)
The unstabilized trial function gradient.
static const std::string component
Definition: NS.h:153
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
virtual RankTwoTensor gradTrialStabilized(unsigned int component)
The stabilized trial function gradient.

◆ initialSetup() [1/4]

template<>
void TotalLagrangianStressDivergenceBase< GradientOperatorCartesian >::initialSetup ( )
inlineinherited

Definition at line 26 of file TotalLagrangianStressDivergence.h.

27 {
28  if (getBlockCoordSystem() != Moose::COORD_XYZ)
29  mooseError("This kernel should only act in Cartesian coordinates.");
30 }
void mooseError(Args &&... args)

◆ initialSetup() [2/4]

Definition at line 26 of file TotalLagrangianStressDivergenceAxisymmetricCylindrical.h.

27 {
28  if (getBlockCoordSystem() != Moose::COORD_RZ)
29  mooseError("This kernel should only act in axisymmetric cylindrical coordinates.");
30 }
void mooseError(Args &&... args)

◆ initialSetup() [3/4]

Definition at line 26 of file TotalLagrangianStressDivergenceCentrosymmetricSpherical.h.

27 {
28  if (getBlockCoordSystem() != Moose::COORD_RSPHERICAL)
29  mooseError("This kernel should only act in centrosymmetric spherical coordinates.");
30 }
void mooseError(Args &&... args)
COORD_RSPHERICAL

◆ initialSetup() [4/4]

template<class G >
virtual void TotalLagrangianStressDivergenceBase< G >::initialSetup ( )
overridevirtualinherited

◆ precalculateJacobian()

virtual void TotalLagrangianWeakPlaneStress::precalculateJacobian ( )
inlineoverrideprotectedvirtual

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 22 of file TotalLagrangianWeakPlaneStress.h.

22 {}

◆ precalculateJacobianDisplacement()

template<class G >
void TotalLagrangianStressDivergenceBase< G >::precalculateJacobianDisplacement ( unsigned int  component)
overrideprotectedvirtualinherited

Prepare the average shape function gradients for stabilization.

Implements LagrangianStressDivergenceBase.

Definition at line 80 of file TotalLagrangianStressDivergenceBase.C.

81 {
82  // For total Lagrangian, the averaging is taken on the reference frame regardless of geometric
83  // nonlinearity. Convenient!
84  for (auto j : make_range(_phi.size()))
86  [this, component, j](unsigned int qp)
87  { return G::gradOp(component, _grad_phi[j][qp], _phi[j][qp], _q_point[qp]); },
88  _JxW,
89  _coord);
90 }
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
static const std::string component
Definition: NS.h:153
IntRange< T > make_range(T beg, T end)
auto elementAverage(const Functor &f, const MooseArray< Real > &JxW, const MooseArray< Real > &coord)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ precalculateOffDiagJacobian()

void LagrangianStressDivergenceBase::precalculateOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtualinherited

Definition at line 98 of file LagrangianStressDivergenceBase.C.

99 {
100  // Skip if we are not doing stabilization
101  if (!_stabilize_strain)
102  return;
103 
104  for (auto beta : make_range(_ndisp))
105  if (jvar == _disp_nums[beta])
106  {
107  // We need the gradients of shape functions in the reference frame
108  _fe_problem.prepareShapes(jvar, _tid);
109  _avg_grad_trial[beta].resize(_phi.size());
111  }
112 }
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
virtual void precalculateJacobianDisplacement(unsigned int component)=0
Prepare the average shape function gradients for stabilization.
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
std::vector< unsigned int > _disp_nums
The displacement numbers.
const unsigned int _ndisp
Total number of displacements/size of residual vector.
IntRange< T > make_range(T beg, T end)

◆ validParams()

InputParameters TotalLagrangianWeakPlaneStress::validParams ( )
static

Definition at line 15 of file TotalLagrangianWeakPlaneStress.C.

16 {
18  params.addClassDescription("Plane stress kernel to provide out-of-plane strain contribution.");
19  params.set<unsigned int>("component") = 0;
20  params.suppressParameter<unsigned int>("component");
21  params.suppressParameter<std::vector<VariableName>>("temperature");
22  params.suppressParameter<std::vector<MaterialPropertyName>>("eigenstrain_names");
23  params.suppressParameter<std::vector<VariableName>>("out_of_plane_strain");
24  return params;
25 }
static InputParameters validParams()
T & set(const std::string &name, bool quiet_mode=false)
void suppressParameter(const std::string &name)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _alpha

const unsigned int LagrangianStressDivergenceBase::_alpha
protectedinherited

◆ _avg_grad_trial

std::vector<std::vector<RankTwoTensor> > LagrangianStressDivergenceBase::_avg_grad_trial
protectedinherited

◆ _base_name

const std::string LagrangianStressDivergenceBase::_base_name
protectedinherited

Prepend to the material properties.

Definition at line 69 of file LagrangianStressDivergenceBase.h.

◆ _deigenstrain_dargs

std::vector<std::vector<const MaterialProperty<RankTwoTensor> *> > LagrangianStressDivergenceBase::_deigenstrain_dargs
protectedinherited

Eigenstrain derivatives wrt generate coupleds.

Definition at line 107 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::LagrangianStressDivergenceBase().

◆ _disp_nums

std::vector<unsigned int> LagrangianStressDivergenceBase::_disp_nums
protectedinherited

◆ _dpk1

template<class G >
const MaterialProperty<RankFourTensor>& TotalLagrangianStressDivergenceBase< G >::_dpk1
protectedinherited

The derivative of the PK1 stress with respect to the deformation gradient.

Definition at line 49 of file TotalLagrangianStressDivergenceBase.h.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeOffDiagJacobianScalar(), computeQpJacobian(), and computeQpOffDiagJacobian().

◆ _F

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F
protectedinherited

The actual (stabilized) deformation gradient.

Definition at line 98 of file LagrangianStressDivergenceBase.h.

◆ _F_avg

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_avg
protectedinherited

The element-average deformation gradient.

Definition at line 89 of file LagrangianStressDivergenceBase.h.

◆ _f_inv

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_f_inv
protectedinherited

The inverse increment deformation gradient.

Definition at line 92 of file LagrangianStressDivergenceBase.h.

◆ _F_inv

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_inv
protectedinherited

The inverse deformation gradient.

Definition at line 95 of file LagrangianStressDivergenceBase.h.

◆ _F_ust

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_ust
protectedinherited

The unmodified deformation gradient.

Definition at line 86 of file LagrangianStressDivergenceBase.h.

◆ _large_kinematics

const bool LagrangianStressDivergenceBase::_large_kinematics
protectedinherited

◆ _ndisp

const unsigned int LagrangianStressDivergenceBase::_ndisp
protectedinherited

◆ _out_of_plane_strain

const MooseVariable* LagrangianStressDivergenceBase::_out_of_plane_strain
protectedinherited

◆ _pk1

template<class G >
const MaterialProperty<RankTwoTensor>& TotalLagrangianStressDivergenceBase< G >::_pk1
protectedinherited

The 1st Piola-Kirchhoff stress.

Definition at line 45 of file TotalLagrangianStressDivergenceBase.h.

Referenced by computeQpResidual().

◆ _stabilize_strain

const bool LagrangianStressDivergenceBase::_stabilize_strain
protectedinherited

If true calculate the deformation gradient derivatives for F_bar.

Definition at line 66 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::precalculateJacobian(), and LagrangianStressDivergenceBase::precalculateOffDiagJacobian().

◆ _temperature

const MooseVariable* LagrangianStressDivergenceBase::_temperature
protectedinherited

Temperature, if provided. This is used only to get the trial functions.

Definition at line 101 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::computeQpOffDiagJacobian().


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