https://mooseframework.inl.gov
LagrangianStressDivergenceBase.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 #include "RankFourTensorForward.h"
17 #include "GuaranteeConsumer.h"
18 
30  : public JvarMapKernelInterface<DerivativeMaterialInterface<KernelScalarBase>>,
31  public GuaranteeConsumer
32 {
33 public:
36 
39  enum class FBarMode
40  {
41  Total,
43  };
44 
45 protected:
46  // Helper function to return the test function gradient which may depend on kinematics and
47  // stabilization
48  virtual RankTwoTensor gradTest(unsigned int component) = 0;
49 
50  // Helper function to return the trial function gradient which may depend on kinematics and
51  // stabilization
52  virtual RankTwoTensor gradTrial(unsigned int component) = 0;
53 
55  virtual void initialSetup() override;
56 
57  virtual void precalculateJacobian() override;
58  virtual void precalculateOffDiagJacobian(unsigned int jvar) override;
59 
61  virtual void precalculateJacobianDisplacement(unsigned int component) = 0;
62 
63  virtual Real computeQpJacobian() override;
64  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
65 
66  // Derivatives of the residual w.r.t. the displacement dofs
67  virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta) = 0;
68 
69  // Derivatives of the residual w.r.t. the temperature dofs through eigenstrain
70  virtual Real computeQpJacobianTemperature(unsigned int cvar) = 0;
71 
72  // Derivatives of the residual w.r.t. the out-of-plane strain
74 
89  RankTwoTensor deltaPK1NonLocalFBar(const RankTwoTensor & delta_F_avg) const;
90 
91 protected:
96 
98  const bool _stabilize_strain;
99 
104 
106  const std::string _base_name;
107 
109  const unsigned int _alpha;
110 
112  const unsigned int _ndisp;
113 
115  std::vector<unsigned int> _disp_nums;
116 
117  // Averaged trial function gradients for each displacement component
118  // i.e. _avg_grad_trial[a][j] returns the average gradient of trial function associated with
119  // node j with respect to displacement component a.
120  std::vector<std::vector<RankTwoTensor>> _avg_grad_trial;
121 
129  std::vector<Real> _avg_grad_spatial_test;
130 
134  std::vector<std::vector<Real>> _avg_grad_spatial_phi;
135 
141  std::vector<std::vector<std::vector<std::vector<Real>>>> _avg_test_phi_cross;
142 
145 
150 
153 
156 
159 
167 
171 
175 
178 
181 
191 
194 
197 
199  std::vector<std::vector<const MaterialProperty<RankTwoTensor> *>> _deigenstrain_dargs;
200 
207 
213 };
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MaterialProperty< Real > * _F_ust_det
const MaterialProperty< RankTwoTensor > & _F_inv
The inverse deformation gradient.
virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta)=0
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
std::vector< std::vector< Real > > _avg_grad_spatial_phi
Element-averaged spatial gradient of trial functions per component: _avg_grad_spatial_phi[component][...
std::vector< Real > _avg_grad_spatial_test
Element-averaged spatial (deformed-frame) gradient of test functions for the kernel&#39;s component _alph...
virtual void precalculateJacobianDisplacement(unsigned int component)=0
Prepare the average shape function gradients for stabilization.
virtual void precalculateOffDiagJacobian(unsigned int jvar) override
LagrangianStressDivergenceBase(const InputParameters &parameters)
static const std::string component
Definition: NS.h:157
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
RankTwoTensor deltaPK1NonLocalFBar(const RankTwoTensor &delta_F_avg) const
Non-local F-bar contribution to deltaPK1 at the current _qp, given the perturbation delta_F_avg of th...
const MaterialProperty< RankTwoTensor > & _F_avg
The element-average deformation gradient.
virtual Real computeQpJacobianOutOfPlaneStrain()=0
const MaterialProperty< RankTwoTensor > * _F_ust_inv
F_ust^{-1} and det(F_ust) from the strain calculator, consumed by the F-bar spatial push-forward (gra...
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
const MaterialProperty< RankTwoTensor > & _F
The actual (stabilized) deformation gradient.
const MaterialProperty< RankTwoTensor > & _F_ust
The unmodified deformation gradient.
const MaterialProperty< RankTwoTensor > & _F_ust_old
Old unstabilized deformation gradient.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< RankFourTensor > * _dcauchy_stress_d_eigenstrain
Derivative of the Cauchy stress with respect to the eigenstrain (published by ComputeLagrangianObject...
std::vector< unsigned int > _disp_nums
The displacement numbers.
FBarMode
Mirrors ComputeLagrangianStrainBase::FBarMode.
const MaterialProperty< RankFourTensor > & _d_F_d_grad_u
Derivative of F_{n+1} w.r.t. the displacement gradient.
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_ust
Partials of the F-bar-stabilized deformation gradient.
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_avg
const unsigned int _ndisp
Total number of displacements/size of residual vector.
const MaterialProperty< RankFourTensor > * _d_nl_fbar
Composed non-local F-bar operator D_nl = cauchy_jac : d(dL)/dF : d(F_stab)/d(F_avg), published per qp by the stress material (once per element, shared by all displacement kernels).
const MaterialProperty< RankTwoTensor > & _F_actual
The literal deformation gradient at n+1 (I + grad u_{n+1}), independent of alpha and F-bar...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string alpha
Definition: NS.h:138
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.
virtual RankTwoTensor gradTrial(unsigned int component)=0
const MaterialProperty< RankFourTensor > & _d_deformation_gradient_increment_d_F
Derivative of the spatial velocity gradient increment w.r.t. F_{n+1}.
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
Eigenstrain derivatives wrt generate coupleds.
bool _large_kinematics
If true use large deformation kinematics.
Add-on class that provides the functionality to check if guarantees for material properties are provi...
const std::string _base_name
Prepend to the material properties.
Base class of the "Lagrangian" kernel system.
std::vector< std::vector< std::vector< std::vector< Real > > > > _avg_test_phi_cross
Element-averaged cross product (on displaced mesh) of spatial test/trial gradients: avg_test_phi_cros...
virtual RankTwoTensor gradTest(unsigned int component)=0
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator&#39;s LARGE_KINEMATICS guarantee. ...
const MaterialProperty< RankTwoTensor > & _f_inv
The inverse increment deformation gradient.
virtual Real computeQpJacobianTemperature(unsigned int cvar)=0