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

enum  FBarMode { FBarMode::Total, FBarMode::Incremental }
 Mirrors ComputeLagrangianStrainBase::FBarMode. More...
 
typedef std::vector< intJvarMap
 

Public Member Functions

 TotalLagrangianWeakPlaneStress (const InputParameters &parameters)
 
virtual void initialSetup () override
 Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee. More...
 
template<>
void initialSetup ()
 Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee. More...
 
template<>
void initialSetup ()
 Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee. More...
 
template<>
void initialSetup ()
 Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee. More...
 
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 void precalculateResidual () override
 
virtual void precalculateOffDiagJacobian (unsigned int jvar) override
 
virtual Real computeQpJacobianDisplacement (unsigned int alpha, unsigned int beta) override
 
virtual Real computeQpJacobianTemperature (unsigned int cvar) override
 
virtual Real computeQpJacobianOutOfPlaneStrain () override
 
void computeAverageGradientSpatialTest ()
 Compute element-averaged spatial gradient of test functions for component _alpha, filling _avg_grad_spatial_test. More...
 
void computeAverageGradientSpatialPhi (unsigned int beta)
 Compute element-averaged spatial gradient of trial functions for component beta, filling _avg_grad_spatial_phi[beta]. More...
 
void computeAvgTestPhiCross (unsigned int beta)
 Compute element-averaged cross product (grad_x test_i)_{b1} * (grad_x phi_j)_{b2} for b1, b2 in {_alpha, beta} (4 combinations), filling _avg_test_phi_cross[b1][b2][i][j]. More...
 
Real gradXTestComponent (unsigned int component) const
 (grad_x test_i)_component at the current _qp, where the push-forward uses the unstabilized F (= F_actual at alpha = 1), consistent with the PK1 wrap. More...
 
Real gradXPhiComponent (unsigned int component) const
 (grad_x phi_j)_component at the current _qp, same push-forward as gradXTestComponent. More...
 
virtual RankTwoTensor gradTrialUnstabilized (unsigned int component)
 The unstabilized trial function gradient. More...
 
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 the element-average F. More...
 
bool hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee)
 

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 (F that the stress material consumed, i.e. More...
 
const MaterialProperty< RankFourTensor > & _dpk1_d_grad_u
 The derivative of the PK1 stress with respect to the displacement gradient (grad u_{n+1}). More...
 
const MaterialProperty< RankFourTensor > & _dpk1_bypass_fbar
 Variant of _dpk1 (= pk1_jacobian) computed WITHOUT the F-bar chain factor _d_F_stab_d_F_ust in the sigma-via-dL contribution. More...
 
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 FBarMode _F_bar_mode
 What F gets F-bar volumetric correction (Total vs. 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
 
std::vector< Real_avg_grad_spatial_test
 Element-averaged spatial (deformed-frame) gradient of test functions for the kernel's component _alpha: _avg_grad_spatial_test[i] = (1/V_x) int_e (grad_x test_i)_alpha dV_x Used for OLD-compat B-bar volumetric correction in F_bar_mode = incremental. More...
 
std::vector< std::vector< Real > > _avg_grad_spatial_phi
 Element-averaged spatial gradient of trial functions per component: _avg_grad_spatial_phi[component][j] = (1/V_x) int_e (grad_x phi_j)_component dV_x Populated alongside _avg_grad_spatial_test for the Jacobian's B-bar contribution. More...
 
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_cross[b1][b2][i][j] = (1/V_x) int_e (grad_x test_i){b1} * (grad_x phi_j)_{b2} dV_x Indexed by [b1][b2] in {0,1,2}^2. More...
 
const MaterialProperty< RankTwoTensor > & _F_ust
 The unmodified deformation gradient. More...
 
const MaterialProperty< RankTwoTensor > & _F_ust_old
 Old unstabilized 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_ust_inv = nullptr
 F_ust^{-1} and det(F_ust) from the strain calculator, consumed by the F-bar spatial push-forward (grad_x = F_ust^{-T} grad_X, J_ust = det F_ust) on both the residual and Jacobian sweeps. More...
 
const MaterialProperty< Real > * _F_ust_det = nullptr
 
const MaterialProperty< RankTwoTensor > & _F
 The actual (stabilized) deformation gradient. More...
 
const MaterialProperty< RankTwoTensor > & _F_actual
 The literal deformation gradient at n+1 (I + grad u_{n+1}), independent of alpha and F-bar. More...
 
const MaterialProperty< RankFourTensor > & _d_deformation_gradient_increment_d_F
 Derivative of the spatial velocity gradient increment w.r.t. F_{n+1}. More...
 
const MaterialProperty< RankFourTensor > & _d_F_d_grad_u
 Derivative of F_{n+1} w.r.t. the displacement gradient. More...
 
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_ust
 Partials of the F-bar-stabilized deformation gradient. More...
 
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_avg
 
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 MaterialProperty< RankFourTensor > * _dcauchy_stress_d_eigenstrain = nullptr
 Derivative of the Cauchy stress with respect to the eigenstrain (published by ComputeLagrangianObjectiveStress; can be overridden by other Cauchy-providing materials). More...
 
const MaterialProperty< RankFourTensor > * _d_nl_fbar = nullptr
 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). More...
 
const unsigned int _n_args
 

Detailed Description

Definition at line 14 of file TotalLagrangianWeakPlaneStress.h.

Member Enumeration Documentation

◆ FBarMode

Mirrors ComputeLagrangianStrainBase::FBarMode.

Replicated here (rather than included) so this header doesn't need to pull in the templated strain header.

Enumerator
Total 
Incremental 

Definition at line 39 of file LagrangianStressDivergenceBase.h.

40  {
41  Total,
42  Incremental
43  };

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)

◆ computeAverageGradientSpatialPhi()

template<class G >
void TotalLagrangianStressDivergenceBase< G >::computeAverageGradientSpatialPhi ( unsigned int  beta)
protectedinherited

Compute element-averaged spatial gradient of trial functions for component beta, filling _avg_grad_spatial_phi[beta].

Used for the B-bar Jacobian contribution.

Definition at line 273 of file TotalLagrangianStressDivergenceBase.C.

274 {
275  // Same structure as computeAverageGradientSpatialTest, but for trial functions and component
276  // beta.
277  _avg_grad_spatial_phi[beta].assign(_phi.size(), 0.0);
278  Real V_x = 0.0;
279  for (unsigned int qp = 0; qp < _qrule->n_points(); ++qp)
280  {
281  const Real J = _large_kinematics ? (*_F_ust_det)[qp] : 1.0;
282  const Real w = J * _JxW[qp] * _coord[qp];
283  V_x += w;
284  const RankTwoTensor F_inv = _large_kinematics ? (*_F_ust_inv)[qp] : RankTwoTensor::Identity();
285  for (unsigned int j = 0; j < _phi.size(); ++j)
286  {
287  Real g_x = 0.0;
288  for (unsigned int k = 0; k < 3; ++k)
289  g_x += _grad_phi[j][qp](k) * F_inv(k, beta);
290  _avg_grad_spatial_phi[beta][j] += g_x * w;
291  }
292  }
293  for (unsigned int j = 0; j < _phi.size(); ++j)
294  _avg_grad_spatial_phi[beta][j] /= V_x;
295 }
std::vector< std::vector< Real > > _avg_grad_spatial_phi
Element-averaged spatial gradient of trial functions per component: _avg_grad_spatial_phi[component][...
static RankTwoTensorTempl Identity()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
bool _large_kinematics
If true use large deformation kinematics.
static const std::string k
Definition: NS.h:134

◆ computeAverageGradientSpatialTest()

template<class G >
void TotalLagrangianStressDivergenceBase< G >::computeAverageGradientSpatialTest ( )
protectedinherited

Compute element-averaged spatial gradient of test functions for component _alpha, filling _avg_grad_spatial_test.

Used for the OLD-compat B-bar volumetric correction.

Definition at line 245 of file TotalLagrangianStressDivergenceBase.C.

246 {
247  // _avg_grad_spatial_test[i] = (1/V_x) int (grad_x test_i)_alpha dV_x
248  // = (sum_qp (grad_X test_i)_j (F_ust^{-1})_{j, _alpha} * J_ust * w)
249  // / (sum_qp J_ust * w), w = JxW * coord
250  // For small kinematics, F_ust = I, J_ust = 1, reducing to OLD's element-averaged grad_test.
251  _avg_grad_spatial_test.assign(_test.size(), 0.0);
252  Real V_x = 0.0;
253  for (unsigned int qp = 0; qp < _qrule->n_points(); ++qp)
254  {
255  const Real J = _large_kinematics ? (*_F_ust_det)[qp] : 1.0;
256  const Real w = J * _JxW[qp] * _coord[qp];
257  V_x += w;
258  const RankTwoTensor F_inv = _large_kinematics ? (*_F_ust_inv)[qp] : RankTwoTensor::Identity();
259  for (unsigned int i = 0; i < _test.size(); ++i)
260  {
261  Real g_x = 0.0;
262  for (unsigned int j = 0; j < 3; ++j)
263  g_x += _grad_test[i][qp](j) * F_inv(j, _alpha);
264  _avg_grad_spatial_test[i] += g_x * w;
265  }
266  }
267  for (unsigned int i = 0; i < _test.size(); ++i)
268  _avg_grad_spatial_test[i] /= V_x;
269 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
std::vector< Real > _avg_grad_spatial_test
Element-averaged spatial (deformed-frame) gradient of test functions for the kernel&#39;s component _alph...
static RankTwoTensorTempl Identity()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
bool _large_kinematics
If true use large deformation kinematics.

◆ computeAvgTestPhiCross()

template<class G >
void TotalLagrangianStressDivergenceBase< G >::computeAvgTestPhiCross ( unsigned int  beta)
protectedinherited

Compute element-averaged cross product (grad_x test_i)_{b1} * (grad_x phi_j)_{b2} for b1, b2 in {_alpha, beta} (4 combinations), filling _avg_test_phi_cross[b1][b2][i][j].

Used by the non-local B-bar Jacobian contribution from d(avg_grad_spatial_test)/dU. beta is the displacement component of the trial-side variable in this Jacobian column; only the four (_alpha, _alpha), (_alpha, beta), (beta, _alpha), (beta, beta) entries are populated (others are left untouched / unread).

Definition at line 299 of file TotalLagrangianStressDivergenceBase.C.

300 {
301  // Populate the cross-products
302  // _avg_test_phi_cross[b1][b2][i][j] = (1/V_x) int (grad_x test_i)_{b1} * (grad_x phi_j)_{b2}
303  // dV_x
304  // for the 4 combinations of (b1, b2) in {_alpha, beta}. The d(avg_grad_spatial_test)/dU
305  // term in the B-bar Jacobian needs both (alpha, beta) and (beta, alpha) entries; the
306  // diagonal (alpha == beta) collapses to a single combination.
307  const unsigned int n_test = _test.size();
308  const unsigned int n_phi = _phi.size();
309  std::vector<unsigned int> bs = {_alpha};
310  if (beta != _alpha)
311  bs.push_back(beta);
312  // Zero out and resize the affected slots
313  for (auto b1 : bs)
314  for (auto b2 : bs)
315  {
316  _avg_test_phi_cross[b1][b2].assign(n_test, std::vector<Real>(n_phi, 0.0));
317  }
318  Real V_x = 0.0;
319  // Cache (grad_x test_i)_{b1} and (grad_x phi_j)_{b2} per qp to avoid recomputing for
320  // each (i, j) pair.
321  std::vector<std::vector<Real>> gx_test(bs.size(), std::vector<Real>(n_test, 0.0));
322  std::vector<std::vector<Real>> gx_phi(bs.size(), std::vector<Real>(n_phi, 0.0));
323  for (unsigned int qp = 0; qp < _qrule->n_points(); ++qp)
324  {
325  const Real J = _large_kinematics ? (*_F_ust_det)[qp] : 1.0;
326  const Real w = J * _JxW[qp] * _coord[qp];
327  V_x += w;
328  const RankTwoTensor F_inv = _large_kinematics ? (*_F_ust_inv)[qp] : RankTwoTensor::Identity();
329  for (unsigned int bi = 0; bi < bs.size(); ++bi)
330  {
331  const unsigned int b = bs[bi];
332  for (unsigned int i = 0; i < n_test; ++i)
333  {
334  Real g = 0.0;
335  for (unsigned int k = 0; k < 3; ++k)
336  g += _grad_test[i][qp](k) * F_inv(k, b);
337  gx_test[bi][i] = g;
338  }
339  for (unsigned int j = 0; j < n_phi; ++j)
340  {
341  Real g = 0.0;
342  for (unsigned int k = 0; k < 3; ++k)
343  g += _grad_phi[j][qp](k) * F_inv(k, b);
344  gx_phi[bi][j] = g;
345  }
346  }
347  for (unsigned int b1i = 0; b1i < bs.size(); ++b1i)
348  for (unsigned int b2i = 0; b2i < bs.size(); ++b2i)
349  {
350  const unsigned int b1 = bs[b1i];
351  const unsigned int b2 = bs[b2i];
352  auto & dest = _avg_test_phi_cross[b1][b2];
353  for (unsigned int i = 0; i < n_test; ++i)
354  for (unsigned int j = 0; j < n_phi; ++j)
355  dest[i][j] += gx_test[b1i][i] * gx_phi[b2i][j] * w;
356  }
357  }
358  for (auto b1 : bs)
359  for (auto b2 : bs)
360  {
361  auto & dest = _avg_test_phi_cross[b1][b2];
362  for (unsigned int i = 0; i < n_test; ++i)
363  for (unsigned int j = 0; j < n_phi; ++j)
364  dest[i][j] /= V_x;
365  }
366 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
static RankTwoTensorTempl Identity()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
bool _large_kinematics
If true use large deformation kinematics.
static const std::string k
Definition: NS.h:134
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...

◆ computeQpJacobian()

Real TotalLagrangianWeakPlaneStress::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 39 of file TotalLagrangianWeakPlaneStress.C.

40 {
41  // Diagonal Jacobian: d(R_zz)/d(strain_zz_j) = test * d(PK1_{2,2})/d(strain_zz_j).
42  // strain_zz feeds `_F[(2,2)]` AFTER F-bar runs, so strain_zz perturbations bypass
43  // F-bar's chain. Use `_dpk1_bypass_fbar` (pk1_jacobian with the F-bar
44  // `_d_F_stab_d_F_ust` factor REPLACED by identity in the sigma chain) for consistency.
45  return _test[_i][_qp] * _dpk1_bypass_fbar[_qp](2, 2, 2, 2) * _phi[_j][_qp];
46 }
const MaterialProperty< RankFourTensor > & _dpk1_bypass_fbar
Variant of _dpk1 (= pk1_jacobian) computed WITHOUT the F-bar chain factor _d_F_stab_d_F_ust in the si...

◆ computeQpJacobianDisplacement()

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

Implements LagrangianStressDivergenceBase.

Definition at line 398 of file TotalLagrangianStressDivergenceBase.C.

400 {
401  // gradTest(alpha) feeds the local Jacobian contraction below.
402  const RankTwoTensor grad_test = gradTest(alpha);
403 
404  // Local (+ non-local F-bar) Jacobian: J_{alpha beta} = gradTest_alpha : dPK1_total, where
405  // dPK1_total = dPK1/d(grad u) * grad_phi_beta (local) plus the wrapped non-local F-bar
406  // perturbation. Both pieces depend only on (qp, j) and are precomputed and pre-summed into
407  // `_dpk1_total_cache` by `populateLocalPK1Cache(beta)`, so a single contraction covers both.
408  // Without stabilization there is no non-local piece, so the local cache is contracted directly.
410  : _dpk1_grad_trial_cache[_qp][_j]);
411 
412  // OLD-compat B-bar volumetric correction Jacobian (only in `F_bar_mode = incremental`).
413  // The residual added the term R_extra = (PK1:F_ust)/3 * (avg_T - T_alpha) summed over qps.
414  // Linearizing per (i, j, alpha, beta):
415  // J_extra_qp = (1/3) * d(PK1:F_ust)/dU * (avg_T - T_alpha)
416  // + (1/3) * (PK1:F_ust) * (d(avg_T)/dU - dT_alpha/dU)
417  // with derivatives in U (the trial-DOF for component beta at node j):
418  // d(PK1:F_ust)/dU|qp = (dPK1_local + dPK1_NL) : F_ust + PK1 : dF_ust_local
419  // dPK1_local = _dpk1_grad_trial_cache[_qp][_j] (cached above)
420  // dPK1_NL = d_PK1_NL (cached above)
421  // dF_ust = _grad_trial_cache[_qp][_j] (cached unstabilized trial)
422  // dT_alpha/dU|qp = -(grad_x test_i)_beta * (grad_x phi_j)_alpha (local cross)
423  // d(avg_T)/dU = avgCross(alpha, beta) - avgCross(beta, alpha) - avg_T(i) *
424  // avg_grad_spatial_phi[beta][j]
425  // avgCross(b1, b2) = _avg_test_phi_cross[b1][b2][i][j] (precomputed)
427  {
428  // A_qp (= pk1:F_ust/3, per qp) and dA_dU (per qp, j) are precomputed in
429  // `cachePK1ContractionFUst` / `populateLocalPK1Cache` -- no double contractions here.
430  const Real A_qp = _pk1_ddot_F_ust[_qp] / 3.0;
431  const Real avg_T = _avg_grad_spatial_test[_i];
432  const Real T_alpha = gradXTestComponent(alpha);
433  const Real B = avg_T - T_alpha;
434 
435  const Real dA_dU = _dA_dU_cache[_qp][_j];
436 
437  // dB/dU: -dT_alpha/dU + d(avg_T)/dU
438  // dT_alpha/dU = -(grad_x test_i)_beta * (grad_x phi_j)_alpha (local cross at _qp)
439  const Real T_beta_i = gradXTestComponent(beta);
440  const Real phi_alpha_j = gradXPhiComponent(alpha);
441  const Real dT_alpha_dU = -T_beta_i * phi_alpha_j;
442 
443  const Real avg_cross_ab = _avg_test_phi_cross[alpha][beta][_i][_j];
444  const Real avg_cross_ba = _avg_test_phi_cross[beta][alpha][_i][_j];
445  const Real d_avg_T_dU = avg_cross_ab - avg_cross_ba - avg_T * _avg_grad_spatial_phi[beta][_j];
446 
447  const Real dB_dU = d_avg_T_dU - dT_alpha_dU;
448  J += dA_dU * B + A_qp * dB_dU;
449  }
450 
451  return J;
452 }
std::vector< std::vector< RankTwoTensor > > _dpk1_grad_trial_cache
_dpk1_d_grad_u[qp] * gradTrial(beta) per (qp, j) for the current Jacobian column&#39;s beta...
Real gradXPhiComponent(unsigned int component) const
(grad_x phi_j)_component at the current _qp, same push-forward as gradXTestComponent.
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...
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
std::vector< Real > _pk1_ddot_F_ust
pk1 : F_ust per qp for the B-bar volumetric correction (see cachePK1ContractionFUst).
virtual RankTwoTensor gradTest(unsigned int component) override
std::vector< std::vector< RankTwoTensor > > _dpk1_total_cache
Local + non-local PK1 derivative per (qp, j): _dpk1_grad_trial_cache + _delta_PK1_NL_cache.
Real doubleContraction(const RankTwoTensorTempl< Real > &a) const
std::vector< std::vector< Real > > _dA_dU_cache
d(pk1 : F_ust)/dU per (qp, j) for the current column – the B-bar Jacobian&#39;s dA/dU term...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string alpha
Definition: NS.h:138
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.
Real gradXTestComponent(unsigned int component) const
(grad_x test_i)_component at the current _qp, where the push-forward uses the unstabilized F (= F_act...
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...

◆ computeQpJacobianOutOfPlaneStrain()

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

Implements LagrangianStressDivergenceBase.

Definition at line 487 of file TotalLagrangianStressDivergenceBase.C.

488 {
489  // d(R_disp_alpha)/d(strain_zz_j) at qp = gradTest_alpha : d(PK1)/d(strain_zz_j).
490  // strain_zz feeds `_F[(2,2)]` AFTER F-bar runs in `ComputeLagrangianWPSStrain`, so
491  // strain_zz perturbations bypass F-bar's chain. Use `_dpk1_bypass_fbar` (= the
492  // pk1_jacobian variant computed with the F-bar `_d_F_stab_d_F_ust` factor REPLACED
493  // by identity in the sigma chain) for a consistent Jacobian.
494  return _dpk1_bypass_fbar[_qp].contractionKl(2, 2, gradTest(_alpha)) *
495  _out_of_plane_strain->phi()[_j][_qp];
496 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MaterialProperty< RankFourTensor > & _dpk1_bypass_fbar
Variant of _dpk1 (= pk1_jacobian) computed WITHOUT the F-bar chain factor _d_F_stab_d_F_ust in the si...
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
virtual RankTwoTensor gradTest(unsigned int component) override
const FieldVariablePhiValue & phi() const override

◆ computeQpJacobianTemperature()

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

Implements LagrangianStressDivergenceBase.

Definition at line 456 of file TotalLagrangianStressDivergenceBase.C.

457 {
458  // Multiple eigenstrains may depend on the same coupled var
459  RankTwoTensor total_deigen;
460  for (const auto deigen_darg : _deigenstrain_dargs[cvar])
461  total_deigen += (*deigen_darg)[_qp];
462 
463  // No eigenstrain -> no temperature coupling. Short-circuit before dereferencing the
464  // d_sigma/d_eigenstrain property (only fetched when eigenstrains are coupled; see
465  // LagrangianStressDivergenceBase ctor).
466  if (total_deigen.L2norm() == 0.0)
467  return 0.0;
468 
469  // Direct chain through the constitutive update. The stress material publishes
470  // d_sigma/d_eigenstrain (= -Jinv * small_jacobian for the objective-rate path,
471  // with the sign convention that an eigenstrain increase
472  // reduces the mechanical strain).
473  // We then wrap to PK1 the same way the residual does:
474  // dP/dT = det(F) * dsigma/dT * F^{-T} (large kinematics)
475  // dP/dT = dsigma/dT (small kinematics, P == sigma by convention)
476  const RankTwoTensor dsigma_dT = (*_dcauchy_stress_d_eigenstrain)[_qp] * total_deigen;
477  RankTwoTensor dP_dT;
478  if (_large_kinematics)
479  dP_dT = _F[_qp].det() * dsigma_dT * _F_inv[_qp].transpose();
480  else
481  dP_dT = dsigma_dT;
482  return dP_dT.doubleContraction(gradTest(_alpha)) * _temperature->phi()[_j][_qp];
483 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MaterialProperty< RankTwoTensor > & _F_inv
The inverse deformation gradient.
const MaterialProperty< RankTwoTensor > & _F
The actual (stabilized) deformation gradient.
virtual RankTwoTensor gradTest(unsigned int component) override
const FieldVariablePhiValue & phi() const override
Real doubleContraction(const RankTwoTensorTempl< Real > &a) const
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
bool _large_kinematics
If true use large deformation kinematics.
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
Eigenstrain derivatives wrt generate coupleds.

◆ computeQpOffDiagJacobian()

Real TotalLagrangianWeakPlaneStress::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 49 of file TotalLagrangianWeakPlaneStress.C.

50 {
51  for (auto beta : make_range(_ndisp))
52  if (jvar == _disp_nums[beta])
53  {
54  // Local PK1_{2,2} Jacobian via _dpk1 (includes local F-bar through the sigma chain).
55  // Displacement perturbations DO go through F-bar's chain, so use the regular
56  // `_dpk1` (= pk1_jacobian WITH the F-bar local correction).
57  Real J = _test[_i][_qp] * _dpk1[_qp].contractionIj(2, 2, gradTrial(beta));
58 
59  // Non-local F-bar contribution to PK1_{2,2}; helper handles the sigma-via-dL chain and
60  // the wrap branch. Guarded on `_stabilize_strain` because `_avg_grad_trial` is only
61  // populated when F-bar is on.
63  {
64  const RankTwoTensor delta_F_avg = _d_F_d_grad_u[_qp] * _avg_grad_trial[beta][_j];
65  J += _test[_i][_qp] * deltaPK1NonLocalFBar(delta_F_avg)(2, 2);
66  }
67  return J;
68  }
69 
70  return 0;
71 }
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
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...
std::vector< unsigned int > _disp_nums
The displacement numbers.
const MaterialProperty< RankFourTensor > & _d_F_d_grad_u
Derivative of F_{n+1} w.r.t. the displacement gradient.
const MaterialProperty< RankFourTensor > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient (F that the stress material...
const unsigned int _ndisp
Total number of displacements/size of residual vector.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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.

◆ deltaPK1NonLocalFBar()

RankTwoTensor LagrangianStressDivergenceBase::deltaPK1NonLocalFBar ( const RankTwoTensor delta_F_avg) const
protectedinherited

Non-local F-bar contribution to deltaPK1 at the current _qp, given the perturbation delta_F_avg of the element-average F.

Implements the shared chain deltaF_stab_NL = _d_F_stab_d_F_avg * deltaF_avg deltadL_NL = _d_deformation_gradient_increment_d_F * deltaF_stab_NL deltasigma_NL = _cauchy_jacobian * deltadL_NL deltaPK1_NL = det(F_ust) * deltasigma_NL * F_ust^{-T} (large kinematics) = deltasigma_NL (small kinematics, PK1 == sigma) Returns zero when F-bar is off (!_stabilize_strain). Used by the TL displacement Jacobian, the WPS off-diag Jacobian, and the homogenization scalar<->disp Jacobian – anywhere the disp perturbation chains through F-bar's non-local route.

Consumes the strain/stress material's per-qp _d_nl_fbar operator so the inner (test, trial) loop pays only one R4*R2 (and, in the large-kinematics branch, one R2*R2*R2 PK1 wrap) per call instead of three R4*R2 chains plus a per-call 3x3 inverse.

Definition at line 197 of file LagrangianStressDivergenceBase.C.

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

198 {
199  if (!_stabilize_strain)
200  return RankTwoTensor();
201  // `_d_nl_fbar` (the composed non-local operator) and F_ust^{-1}/det come from the stress and
202  // strain materials as per-qp properties -- no kernel-side cache to refresh.
203  const RankTwoTensor delta_sigma_nl = (*_d_nl_fbar)[_qp] * delta_F_avg;
204  if (_large_kinematics)
205  return (*_F_ust_det)[_qp] * delta_sigma_nl * (*_F_ust_inv)[_qp].transpose();
206  return delta_sigma_nl;
207 }
const MaterialProperty< Real > * _F_ust_det
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
RankTwoTensorTempl< Real > transpose() const
bool _large_kinematics
If true use large deformation kinematics.

◆ gradTest()

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

Implements LagrangianStressDivergenceBase.

Definition at line 36 of file TotalLagrangianStressDivergenceBase.C.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeQpOffDiagJacobianScalar().

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

◆ gradTrial()

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

Implements LagrangianStressDivergenceBase.

Definition at line 44 of file TotalLagrangianStressDivergenceBase.C.

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

45 {
46  // After the F_ust-wrap architectural change, pk1_jacobian = dPK1/d(F_ust) already
47  // contains the local F-bar contribution (via the sigma-chain through
48  // `_d_F_stab_d_F_ust`). The trial gradient is always unstabilized; the non-local F-bar
49  // Jacobian contribution is added explicitly in `computeQpJacobianDisplacement`.
51 }
virtual RankTwoTensor gradTrialUnstabilized(unsigned int component)
The unstabilized trial function gradient.
static const std::string component
Definition: NS.h:157

◆ gradTrialUnstabilized()

template<class G >
RankTwoTensor TotalLagrangianStressDivergenceBase< G >::gradTrialUnstabilized ( unsigned int  component)
protectedvirtualinherited

The unstabilized trial function gradient.

Exposed (protected, not private) so subclasses like HomogenizedTotalLagrangianStressDivergence can use it directly for the macro-var <-> disp off-diagonal Jacobian chain.

Definition at line 55 of file TotalLagrangianStressDivergenceBase.C.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeScalarQpOffDiagJacobian().

56 {
57  // Without F-bar stabilization, simply return the gradient of the trial functions
58  return G::gradOp(component, _grad_phi[_j][_qp], _phi[_j][_qp], _q_point[_qp]);
59 }
static const std::string component
Definition: NS.h:157

◆ gradXPhiComponent()

template<class G >
Real TotalLagrangianStressDivergenceBase< G >::gradXPhiComponent ( unsigned int  component) const
protectedinherited

(grad_x phi_j)_component at the current _qp, same push-forward as gradXTestComponent.

Definition at line 232 of file TotalLagrangianStressDivergenceBase.C.

233 {
234  if (!_large_kinematics)
235  return _grad_phi[_j][_qp](component);
236  const RankTwoTensor & F_inv = (*_F_ust_inv)[_qp];
237  Real out = 0.0;
238  for (unsigned int j = 0; j < 3; ++j)
239  out += _grad_phi[_j][_qp](j) * F_inv(j, component);
240  return out;
241 }
static const std::string component
Definition: NS.h:157
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
OStreamProxy out
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
bool _large_kinematics
If true use large deformation kinematics.

◆ gradXTestComponent()

template<class G >
Real TotalLagrangianStressDivergenceBase< G >::gradXTestComponent ( unsigned int  component) const
protectedinherited

(grad_x test_i)_component at the current _qp, where the push-forward uses the unstabilized F (= F_actual at alpha = 1), consistent with the PK1 wrap.

Definition at line 216 of file TotalLagrangianStressDivergenceBase.C.

217 {
218  // (grad_x test_i)_component = (grad_X test_i)_j (F_ust^{-1})_{j, component}
219  // Push-forward via F_ust (= F_actual at alpha=1) matches the PK1 wrap. F_ust^{-1} is a
220  // material property (computed once per qp by the strain calc), not recomputed here.
221  if (!_large_kinematics)
222  return _grad_test[_i][_qp](component);
223  const RankTwoTensor & F_inv = (*_F_ust_inv)[_qp];
224  Real out = 0.0;
225  for (unsigned int j = 0; j < 3; ++j)
226  out += _grad_test[_i][_qp](j) * F_inv(j, component);
227  return out;
228 }
static const std::string component
Definition: NS.h:157
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
OStreamProxy out
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
bool _large_kinematics
If true use large deformation kinematics.

◆ hasGuaranteedMaterialProperty()

bool GuaranteeConsumer::hasGuaranteedMaterialProperty ( const MaterialPropertyName &  prop,
Guarantee  guarantee 
)
protectedinherited

Definition at line 28 of file GuaranteeConsumer.C.

Referenced by ComputeFiniteStrainElasticStress::computeQpStress(), ADComputeSmearedCrackingStress::initialSetup(), ComputeSmearedCrackingStress::initialSetup(), ComputeLinearElasticPFFractureStress::initialSetup(), CriticalTimeStep::initialSetup(), ComputeStVenantKirchhoffStress::initialSetup(), ComputeMultipleInelasticStressBase::initialSetup(), ADComputeMultipleInelasticStress::initialSetup(), LagrangianStressDivergenceBase::initialSetup(), and ComputeLagrangianStressBase::initialSetup().

30 {
32  mooseError("hasGuaranteedMaterialProperty() needs to be called in initialSetup()");
33 
34  // Reference to MaterialWarehouse for testing and retrieving block ids
35  const auto & warehouse = _gc_feproblem->getMaterialWarehouse();
36 
37  // Complete set of ids that this object is active
38  const auto & ids = (_gc_block_restrict && _gc_block_restrict->blockRestricted())
41 
42  // Loop over each id for this object
43  for (const auto & id : ids)
44  {
45  // If block materials exist, look if any issue the required guarantee
46  if (warehouse.hasActiveBlockObjects(id))
47  {
48  const std::vector<std::shared_ptr<MaterialBase>> & mats = warehouse.getActiveBlockObjects(id);
49  for (const auto & mat : mats)
50  {
51  const auto & mat_props = mat->getSuppliedItems();
52  if (mat_props.count(prop_name))
53  {
54  auto guarantee_mat = dynamic_cast<GuaranteeProvider *>(mat.get());
55  if (guarantee_mat && !guarantee_mat->hasGuarantee(prop_name, guarantee))
56  {
57  // we found at least one material on the set of block we operate on
58  // that does _not_ provide the requested guarantee
59  return false;
60  }
61  }
62  }
63  }
64  }
65 
66  return true;
67 }
void mooseError(Args &&... args)
Add-on class that provides the functionality to issue guarantees for declared material properties...
BlockRestrictable *const _gc_block_restrict
Access block restrictions of the object with this interface.
virtual const std::set< SubdomainID > & blockIDs() const
virtual bool blockRestricted() const
const MaterialWarehouse & getMaterialWarehouse() const
FEProblemBase *const _gc_feproblem
Reference to the FEProblemBase class.
virtual MooseMesh & mesh() override
virtual bool startedInitialSetup()
const std::set< SubdomainID > & meshSubdomains() const

◆ initialSetup() [1/4]

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

Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 26 of file TotalLagrangianStressDivergence.h.

27 {
28  // Derives _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
30 
31  if (getBlockCoordSystem() != Moose::COORD_XYZ)
32  mooseError("This kernel should only act in Cartesian coordinates.");
33 }
void mooseError(Args &&... args)
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator&#39;s LARGE_KINEMATICS guarantee. ...

◆ initialSetup() [2/4]

template<>
void TotalLagrangianStressDivergenceBase< GradientOperatorAxisymmetricCylindrical >::initialSetup ( )
virtualinherited

Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 26 of file TotalLagrangianStressDivergenceAxisymmetricCylindrical.h.

27 {
28  // Derives _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
30 
31  if (getBlockCoordSystem() != Moose::COORD_RZ)
32  mooseError("This kernel should only act in axisymmetric cylindrical coordinates.");
33 }
void mooseError(Args &&... args)
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator&#39;s LARGE_KINEMATICS guarantee. ...

◆ initialSetup() [3/4]

template<>
void TotalLagrangianStressDivergenceBase< GradientOperatorCentrosymmetricSpherical >::initialSetup ( )
virtualinherited

Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 26 of file TotalLagrangianStressDivergenceCentrosymmetricSpherical.h.

27 {
28  // Derives _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
30 
31  if (getBlockCoordSystem() != Moose::COORD_RSPHERICAL)
32  mooseError("This kernel should only act in centrosymmetric spherical coordinates.");
33 }
void mooseError(Args &&... args)
COORD_RSPHERICAL
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator&#39;s LARGE_KINEMATICS guarantee. ...

◆ initialSetup() [4/4]

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

Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.

Reimplemented from LagrangianStressDivergenceBase.

◆ precalculateJacobian()

virtual void TotalLagrangianWeakPlaneStress::precalculateJacobian ( )
inlineoverrideprotectedvirtual

Reimplemented from TotalLagrangianStressDivergenceBase< G >.

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 63 of file TotalLagrangianStressDivergenceBase.C.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeScalarOffDiagJacobian().

64 {
65  // For total Lagrangian, the averaging is taken on the reference frame regardless of geometric
66  // nonlinearity. The stored quantity is what the strain calc's `_d_F_stab_d_F_avg` contracts
67  // with: deltaF_avg in `F_bar_mode = total`, deltaf_avg in `F_bar_mode = incremental`.
68  // total: avg_q(grad_phi[j][q]) -> deltaF_avg per DOF
69  // incremental: avg_q(grad_phi[j][q] * F_ust_old[q]^{-1})
70  // -> deltaf_avg per DOF
71  // (since f_ust = F_ust * F_ust_old^{-1} and F_ust_old is fixed w.r.t. the
72  // current Newton iterate's disp, so deltaf_ust = deltaF_ust * F_ust_old^{-1}).
73  const bool incremental = (_F_bar_mode == FBarMode::Incremental);
74  // F_ust_old[qp]^{-1} depends only on qp, but the average below runs once per trial DOF j.
75  // Precompute the per-qp inverse once instead of re-inverting the 3x3 for every (qp, j).
76  std::vector<RankTwoTensor> f_ust_old_inv;
77  if (incremental)
78  {
79  f_ust_old_inv.resize(_qrule->n_points());
80  for (const auto qp : make_range(_qrule->n_points()))
81  f_ust_old_inv[qp] = _F_ust_old[qp].inverse();
82  }
83  for (auto j : make_range(_phi.size()))
85  [this, component, j, incremental, &f_ust_old_inv](unsigned int qp)
86  {
87  const RankTwoTensor g = G::gradOp(component, _grad_phi[j][qp], _phi[j][qp], _q_point[qp]);
88  return incremental ? g * f_ust_old_inv[qp] : g;
89  },
90  _JxW,
91  _coord);
92 }
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
static const std::string component
Definition: NS.h:157
const MaterialProperty< RankTwoTensor > & _F_ust_old
Old unstabilized deformation gradient.
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.
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()

template<class G >
void TotalLagrangianStressDivergenceBase< G >::precalculateOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtualinherited

Reimplemented from LagrangianStressDivergenceBase.

Definition at line 135 of file TotalLagrangianStressDivergenceBase.C.

136 {
138  // Populate the per-(qp, j) local PK1 chain cache for the matched off-diagonal beta.
139  for (auto beta : make_range(_ndisp))
140  if (jvar == _disp_nums[beta])
141  {
142  populateLocalPK1Cache(beta);
144  {
148  }
149  break;
150  }
151 }
virtual void precalculateOffDiagJacobian(unsigned int jvar) override
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
void computeAverageGradientSpatialTest()
Compute element-averaged spatial gradient of test functions for component _alpha, filling _avg_grad_s...
void computeAverageGradientSpatialPhi(unsigned int beta)
Compute element-averaged spatial gradient of trial functions for component beta, filling _avg_grad_sp...
void populateLocalPK1Cache(unsigned int beta)
Populate the per-(qp, j) caches consumed by computeQpJacobianDisplacement.
std::vector< unsigned int > _disp_nums
The displacement numbers.
const unsigned int _ndisp
Total number of displacements/size of residual vector.
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.
IntRange< T > make_range(T beg, T end)
void computeAvgTestPhiCross(unsigned int beta)
Compute element-averaged cross product (grad_x test_i)_{b1} * (grad_x phi_j)_{b2} for b1...

◆ precalculateResidual()

template<class G >
void TotalLagrangianStressDivergenceBase< G >::precalculateResidual ( )
overrideprotectedvirtualinherited

Definition at line 96 of file TotalLagrangianStressDivergenceBase.C.

97 {
98  LagrangianStressDivergenceBase::precalculateResidual();
100  {
103  }
104 }
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
void computeAverageGradientSpatialTest()
Compute element-averaged spatial gradient of test functions for component _alpha, filling _avg_grad_s...
void cachePK1ContractionFUst()
Cache pk1 : F_ust per qp (the J * tr(sigma) factor of the B-bar volumetric correction).
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.

◆ 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_spatial_phi

std::vector<std::vector<Real> > LagrangianStressDivergenceBase::_avg_grad_spatial_phi
protectedinherited

Element-averaged spatial gradient of trial functions per component: _avg_grad_spatial_phi[component][j] = (1/V_x) int_e (grad_x phi_j)_component dV_x Populated alongside _avg_grad_spatial_test for the Jacobian's B-bar contribution.

Definition at line 134 of file LagrangianStressDivergenceBase.h.

◆ _avg_grad_spatial_test

std::vector<Real> LagrangianStressDivergenceBase::_avg_grad_spatial_test
protectedinherited

Element-averaged spatial (deformed-frame) gradient of test functions for the kernel's component _alpha: _avg_grad_spatial_test[i] = (1/V_x) int_e (grad_x test_i)_alpha dV_x Used for OLD-compat B-bar volumetric correction in F_bar_mode = incremental.

Populated by the TL kernel's precalculateResidual / precalculateJacobian overrides when _stabilize_strain == true. The trial-function analog is published per (component, j) in _avg_grad_spatial_phi and used by the Jacobian.

Definition at line 129 of file LagrangianStressDivergenceBase.h.

◆ _avg_grad_trial

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

◆ _avg_test_phi_cross

std::vector<std::vector<std::vector<std::vector<Real> > > > LagrangianStressDivergenceBase::_avg_test_phi_cross
protectedinherited

Element-averaged cross product (on displaced mesh) of spatial test/trial gradients: avg_test_phi_cross[b1][b2][i][j] = (1/V_x) int_e (grad_x test_i){b1} * (grad_x phi_j)_{b2} dV_x Indexed by [b1][b2] in {0,1,2}^2.

Only the (b1, b2) entries needed for the current Jacobian call are populated by the TL kernel's computeAvgTestPhiCross(beta) helper. Used for the B-bar Jacobian's non-local term (d(avg_grad_spatial_test)/dU).

Definition at line 141 of file LagrangianStressDivergenceBase.h.

◆ _base_name

const std::string LagrangianStressDivergenceBase::_base_name
protectedinherited

◆ _d_deformation_gradient_increment_d_F

const MaterialProperty<RankFourTensor>& LagrangianStressDivergenceBase::_d_deformation_gradient_increment_d_F
protectedinherited

Derivative of the spatial velocity gradient increment w.r.t. F_{n+1}.

Definition at line 177 of file LagrangianStressDivergenceBase.h.

◆ _d_F_d_grad_u

const MaterialProperty<RankFourTensor>& LagrangianStressDivergenceBase::_d_F_d_grad_u
protectedinherited

Derivative of F_{n+1} w.r.t. the displacement gradient.

Definition at line 180 of file LagrangianStressDivergenceBase.h.

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

◆ _d_F_stab_d_F_avg

const MaterialProperty<RankFourTensor>& LagrangianStressDivergenceBase::_d_F_stab_d_F_avg
protectedinherited

◆ _d_F_stab_d_F_ust

const MaterialProperty<RankFourTensor>& LagrangianStressDivergenceBase::_d_F_stab_d_F_ust
protectedinherited

Partials of the F-bar-stabilized deformation gradient.

Used by the UL kernel to assemble the F-bar Jacobian contribution. For F-bar off, _d_F_stab_d_F_ust = I^(4) and _d_F_stab_d_F_avg = 0, so the kernel chain reduces to the unstabilized case. TL also uses _d_F_stab_d_F_avg directly for the non-local F-bar Jacobian contribution to PK1 (since after the F_ust-wrap architectural change PK1 = det(F_ust) sigma F_ust^{-T} no longer contains the non-local F-bar effect – it has to enter through the sigma-via-dL chain explicitly).

Definition at line 189 of file LagrangianStressDivergenceBase.h.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeScalarQpOffDiagJacobian().

◆ _d_nl_fbar

const MaterialProperty<RankFourTensor>* LagrangianStressDivergenceBase::_d_nl_fbar = nullptr
protectedinherited

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).

deltaPK1NonLocalFBar(deltaF_avg) collapses to one R4*R2 contraction against it. Fetched only when _stabilize_strain (nullptr otherwise).

Definition at line 212 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::LagrangianStressDivergenceBase().

◆ _dcauchy_stress_d_eigenstrain

const MaterialProperty<RankFourTensor>* LagrangianStressDivergenceBase::_dcauchy_stress_d_eigenstrain = nullptr
protectedinherited

Derivative of the Cauchy stress with respect to the eigenstrain (published by ComputeLagrangianObjectiveStress; can be overridden by other Cauchy-providing materials).

Only fetched when eigenstrains are coupled, since only the temperature off-diagonal Jacobian needs it. Will be nullptr otherwise; subclasses that consume it must guard accordingly.

Definition at line 206 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::LagrangianStressDivergenceBase().

◆ _deigenstrain_dargs

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

Eigenstrain derivatives wrt generate coupleds.

Definition at line 199 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 (F that the stress material consumed, i.e.

the alpha-weighted F under the generalized midpoint rule). Used by the homogenization macro-var Jacobian path, which couples to F directly.

Definition at line 76 of file TotalLagrangianStressDivergenceBase.h.

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

◆ _dpk1_bypass_fbar

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

Variant of _dpk1 (= pk1_jacobian) computed WITHOUT the F-bar chain factor _d_F_stab_d_F_ust in the sigma-via-dL contribution.

Used for coupled variables that add to _F AFTER F-bar runs (out-of-plane strain in WPS, homogenization macro_grad) – those perturbations bypass F-bar's chain, so the sigma side of dPK1/d(F_ust) must NOT include the F-bar local correction.

Definition at line 89 of file TotalLagrangianStressDivergenceBase.h.

Referenced by computeQpJacobian(), HomogenizedTotalLagrangianStressDivergence::computeQpOffDiagJacobianScalar(), and HomogenizedTotalLagrangianStressDivergence::computeScalarJacobian().

◆ _dpk1_d_grad_u

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

The derivative of the PK1 stress with respect to the displacement gradient (grad u_{n+1}).

Equals _dpk1 * _d_F_d_grad_u, populated in ComputeLagrangianStressBase::computeQpProperties. Used by the TL displacement Jacobian so the kernel does not need to know about the generalized-alpha kinematic policy.

Definition at line 82 of file TotalLagrangianStressDivergenceBase.h.

◆ _F

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F
protectedinherited

The actual (stabilized) deformation gradient.

With the generalized midpoint rule this is the alpha-weighted F, NOT the literal F at n+1.

Definition at line 170 of file LagrangianStressDivergenceBase.h.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeScalarResidual().

◆ _F_actual

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_actual
protectedinherited

The literal deformation gradient at n+1 (I + grad u_{n+1}), independent of alpha and F-bar.

Used by the UL kernel to convert spatial gradients to reference-frame gradients.

Definition at line 174 of file LagrangianStressDivergenceBase.h.

◆ _F_avg

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_avg
protectedinherited

The element-average deformation gradient.

Definition at line 152 of file LagrangianStressDivergenceBase.h.

◆ _F_bar_mode

const FBarMode LagrangianStressDivergenceBase::_F_bar_mode
protectedinherited

What F gets F-bar volumetric correction (Total vs.

Incremental). Must match the strain calc's F_bar_mode. Incremental mode changes how _avg_grad_trial is computed so the non-local F-bar chain captures deltaf_avg (= avg of deltaF_ust * F_ust_old^{-1}) instead of deltaF_avg.

Definition at line 103 of file LagrangianStressDivergenceBase.h.

Referenced by UpdatedLagrangianStressDivergenceBase< G >::UpdatedLagrangianStressDivergenceBase().

◆ _f_inv

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_f_inv
protectedinherited

The inverse increment deformation gradient.

Definition at line 155 of file LagrangianStressDivergenceBase.h.

◆ _F_inv

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_inv
protectedinherited

The inverse deformation gradient.

Definition at line 158 of file LagrangianStressDivergenceBase.h.

◆ _F_ust

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_ust
protectedinherited

The unmodified deformation gradient.

Definition at line 144 of file LagrangianStressDivergenceBase.h.

◆ _F_ust_det

const MaterialProperty<Real>* LagrangianStressDivergenceBase::_F_ust_det = nullptr
protectedinherited

◆ _F_ust_inv

const MaterialProperty<RankTwoTensor>* LagrangianStressDivergenceBase::_F_ust_inv = nullptr
protectedinherited

F_ust^{-1} and det(F_ust) from the strain calculator, consumed by the F-bar spatial push-forward (grad_x = F_ust^{-T} grad_X, J_ust = det F_ust) on both the residual and Jacobian sweeps.

Fetched only when _stabilize_strain (nullptr otherwise). The strain material computes them once per qp (shared by all displacement kernels), replacing the former per-kernel F_ust-inverse/det cache and the per-test/trial recomputation.

Definition at line 165 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::LagrangianStressDivergenceBase().

◆ _F_ust_old

const MaterialProperty<RankTwoTensor>& LagrangianStressDivergenceBase::_F_ust_old
protectedinherited

Old unstabilized deformation gradient.

Only consulted in F_bar_mode = incremental for the kernel's element-average of grad_phi * F_ust_old^{-1}. Always fetched (cheap) so the kernel doesn't need conditional property bookkeeping.

Definition at line 149 of file LagrangianStressDivergenceBase.h.

◆ _large_kinematics

bool LagrangianStressDivergenceBase::_large_kinematics
protectedinherited

If true use large deformation kinematics.

Derived in initialSetup() from the strain calculator's LARGE_KINEMATICS guarantee (single source of truth); the kernel's own large_kinematics parameter is deprecated.

Definition at line 95 of file LagrangianStressDivergenceBase.h.

Referenced by HomogenizedTotalLagrangianStressDivergence::computeScalarJacobian(), HomogenizedTotalLagrangianStressDivergence::computeScalarQpOffDiagJacobian(), HomogenizedTotalLagrangianStressDivergence::computeScalarResidual(), LagrangianStressDivergenceBase::deltaPK1NonLocalFBar(), and LagrangianStressDivergenceBase::initialSetup().

◆ _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 71 of file TotalLagrangianStressDivergenceBase.h.

Referenced by computeQpResidual(), and HomogenizedTotalLagrangianStressDivergence::computeScalarResidual().

◆ _stabilize_strain

const bool LagrangianStressDivergenceBase::_stabilize_strain
protectedinherited

◆ _temperature

const MooseVariable* LagrangianStressDivergenceBase::_temperature
protectedinherited

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

Definition at line 193 of file LagrangianStressDivergenceBase.h.

Referenced by LagrangianStressDivergenceBase::computeQpOffDiagJacobian().


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