https://mooseframework.inl.gov
LagrangianStressDivergenceBaseS.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 "KernelScalarBase.h"
14 #include "JvarMapInterface.h"
15 #include "StabilizationUtils.h"
16 
28  : public JvarMapKernelInterface<DerivativeMaterialInterface<KernelScalarBase>>
29 {
30 public:
33 
34 protected:
35  // Helper function to return the test function gradient which may depend on kinematics and
36  // stabilization
37  virtual RankTwoTensor gradTest(unsigned int component) = 0;
38 
39  // Helper function to return the trial function gradient which may depend on kinematics and
40  // stabilization
41  virtual RankTwoTensor gradTrial(unsigned int component) = 0;
42 
43  virtual void precalculateJacobian() override;
44  virtual void precalculateOffDiagJacobian(unsigned int jvar) override;
45 
47  virtual void precalculateJacobianDisplacement(unsigned int component) = 0;
48 
49  virtual Real computeQpJacobian() override;
50  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
51 
52  // Derivatives of the residual w.r.t. the displacement dofs
53  virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta) = 0;
54 
55  // Derivatives of the residual w.r.t. the temperature dofs through eigenstrain
56  virtual Real computeQpJacobianTemperature(unsigned int cvar) = 0;
57 
58  // Derivatives of the residual w.r.t. the out-of-plane strain
60 
61 protected:
63  const bool _large_kinematics;
64 
66  const bool _stabilize_strain;
67 
69  const std::string _base_name;
70 
72  const unsigned int _alpha;
73 
75  const unsigned int _ndisp;
76 
78  std::vector<unsigned int> _disp_nums;
79 
80  // Averaged trial function gradients for each displacement component
81  // i.e. _avg_grad_trial[a][j] returns the average gradient of trial function associated with
82  // node j with respect to displacement component a.
83  std::vector<std::vector<RankTwoTensor>> _avg_grad_trial;
84 
87 
90 
93 
96 
99 
102 
105 
107  std::vector<std::vector<const MaterialProperty<RankTwoTensor> *>> _deigenstrain_dargs;
108 };
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
std::vector< unsigned int > _disp_nums
The displacement numbers.
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const bool _large_kinematics
If true use large deformation kinematics.
static const std::string component
Definition: NS.h:153
const MaterialProperty< RankTwoTensor > & _f_inv
The inverse increment deformation gradient.
virtual RankTwoTensor gradTest(unsigned int component)=0
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
const unsigned int _ndisp
Total number of displacements/size of residual vector.
virtual RankTwoTensor gradTrial(unsigned int component)=0
const MaterialProperty< RankTwoTensor > & _F
The actual (stabilized) deformation gradient.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real computeQpJacobianOutOfPlaneStrain()=0
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
Eigenstrain derivatives wrt generate coupleds.
virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta)=0
LagrangianStressDivergenceBaseS(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > & _F_inv
The inverse deformation gradient.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
const std::string _base_name
Prepend to the material properties.
virtual Real computeQpJacobianTemperature(unsigned int cvar)=0
static const std::string alpha
Definition: NS.h:134
const MaterialProperty< RankTwoTensor > & _F_ust
The unmodified deformation gradient.
Base class of the "Lagrangian" kernel system.
const MaterialProperty< RankTwoTensor > & _F_avg
The element-average deformation gradient.
virtual void precalculateJacobianDisplacement(unsigned int component)=0
Prepare the average shape function gradients for stabilization.
virtual void precalculateOffDiagJacobian(unsigned int jvar) override