https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
17#include "GuaranteeConsumer.h"
18
30 : public JvarMapKernelInterface<DerivativeMaterialInterface<KernelScalarBase>>,
32{
33public:
36
39 enum class FBarMode
40 {
41 Total,
43 };
44
45protected:
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
91protected:
96
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};
Add-on class that provides the functionality to check if guarantees for material properties are provi...
Base class of the "Lagrangian" kernel system.
const MaterialProperty< Real > * _F_ust_det
virtual void precalculateOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< RankTwoTensor > & _F_actual
The literal deformation gradient at n+1 (I + grad u_{n+1}), independent of alpha and 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...
virtual RankTwoTensor gradTrial(unsigned int component)=0
const MaterialProperty< RankTwoTensor > & _F
The actual (stabilized) deformation gradient.
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta)=0
const MaterialProperty< RankTwoTensor > & _f_inv
The inverse increment deformation gradient.
const MaterialProperty< RankTwoTensor > & _F_ust
The unmodified deformation gradient.
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 unsigned int _ndisp
Total number of displacements/size of residual vector.
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
const MaterialProperty< RankTwoTensor > & _F_avg
The element-average deformation gradient.
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.
virtual Real computeQpJacobianOutOfPlaneStrain()=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< Real > > _avg_grad_spatial_phi
Element-averaged spatial gradient of trial functions per component: _avg_grad_spatial_phi[component][...
bool _large_kinematics
If true use large deformation kinematics.
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_avg
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< RankTwoTensor > & _F_ust_old
Old unstabilized deformation gradient.
std::vector< unsigned int > _disp_nums
The displacement numbers.
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_ust
Partials of the F-bar-stabilized deformation gradient.
FBarMode
Mirrors ComputeLagrangianStrainBase::FBarMode.
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
std::vector< Real > _avg_grad_spatial_test
Element-averaged spatial (deformed-frame) gradient of test functions for the kernel's component _alph...
virtual RankTwoTensor gradTest(unsigned int component)=0
virtual Real computeQpJacobianTemperature(unsigned int cvar)=0
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
Eigenstrain derivatives wrt generate coupleds.
const MaterialProperty< RankTwoTensor > & _F_inv
The inverse deformation gradient.
const std::string _base_name
Prepend to the material properties.
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
const MaterialProperty< RankFourTensor > * _dcauchy_stress_d_eigenstrain
Derivative of the Cauchy stress with respect to the eigenstrain (published by ComputeLagrangianObject...
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),...
virtual void precalculateJacobianDisplacement(unsigned int component)=0
Prepare the average shape function gradients for stabilization.
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
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...
const MaterialProperty< RankFourTensor > & _d_F_d_grad_u
Derivative of F_{n+1} w.r.t. the displacement gradient.