https://mooseframework.inl.gov
UpdatedLagrangianStressDivergence.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 
13 #include "GradientOperator.h"
14 #include "Assembly.h"
15 
31 template <class G>
33 {
34 public:
36  {
38  return params;
39  }
42  virtual void initialSetup() override;
43 
44 protected:
45  virtual RankTwoTensor gradTest(unsigned int component) override;
46  virtual RankTwoTensor gradTrial(unsigned int component) override;
47  virtual void precalculateJacobianDisplacement(unsigned int component) override;
48  virtual Real computeQpResidual() override;
49  virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta) override;
50  virtual Real computeQpJacobianTemperature(unsigned int cvar) override;
51  virtual Real computeQpJacobianOutOfPlaneStrain() override { return 0; }
52 
55 
56  // The derivative of the increment in Cauchy stress w.r.t. the increment in the spatial velocity
57  // gradient
59 
60  // @{
61  // The assembly quantities in the reference frame for stabilization
67  // @}
68 
69 private:
73  virtual RankTwoTensor gradTrialUnstabilized(unsigned int component);
74 };
75 
76 template <>
77 inline InputParameters
79 {
81  params.addClassDescription(
82  "Enforce equilibrium with an updated Lagrangian formulation in Cartesian coordinates.");
83  return params;
84 }
85 
86 template <>
87 inline void
89 {
90  // Derives _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
92 
93  if (getBlockCoordSystem() != Moose::COORD_XYZ)
94  mooseError("This kernel should only act in Cartesian coordinates.");
95 
96  // The updated Lagrangian kernel integrates on the displaced mesh iff large kinematics is on;
97  // large_kinematics is derived from the strain calculator, so validate the pairing here.
98  if (_large_kinematics && !getParam<bool>("use_displaced_mesh"))
99  mooseError("The UpdatedLagrangianStressDivergence kernels require use_displaced_mesh = true "
100  "for large_kinematics = true");
101  if (!_large_kinematics && getParam<bool>("use_displaced_mesh"))
102  mooseError("The UpdatedLagrangianStressDivergence kernels require use_displaced_mesh = false "
103  "for large_kinematics = false");
104 }
105 
virtual RankTwoTensor gradTrial(unsigned int component) override
virtual RankTwoTensor gradTest(unsigned int component) override
void mooseError(Args &&... args)
static const std::string component
Definition: NS.h:157
virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta) override
static InputParameters validParams()
static const std::string G
Definition: NS.h:170
UpdatedLagrangianStressDivergenceBase< GradientOperatorCartesian > UpdatedLagrangianStressDivergence
VariableShapeGradient< false > VariablePhiGradient
const MaterialProperty< RankTwoTensor > & _stress
The Cauchy stress.
const MaterialProperty< RankFourTensor > & _material_jacobian
virtual RankTwoTensor gradTrialUnstabilized(unsigned int component)
The unstabilized trial function gradient.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string alpha
Definition: NS.h:138
void addClassDescription(const std::string &doc_string)
virtual void precalculateJacobianDisplacement(unsigned int component) override
Prepare the average shape function gradients for stabilization.
UpdatedLagrangianStressDivergenceBase(const InputParameters &parameters)
virtual Real computeQpJacobianTemperature(unsigned int cvar) override
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator&#39;s LARGE_KINEMATICS guarantee. ...
Base class of the "Lagrangian" kernel system.
Enforce equilibrium with an updated Lagrangian formulation.
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator&#39;s LARGE_KINEMATICS guarantee. ...