https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
HomogenizedTotalLagrangianStressDivergence Class Reference

Total Lagrangian formulation with all homogenization terms (one disp_xyz field and macro_gradient scalar) More...

#include <HomogenizedTotalLagrangianStressDivergence.h>

Inheritance diagram for HomogenizedTotalLagrangianStressDivergence:
[legend]

Public Types

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

Public Member Functions

 HomogenizedTotalLagrangianStressDivergence (const InputParameters &parameters)
 
virtual std::set< std::string > additionalROVariables () override
 Inform moose that this kernel covers the constraint scalar variable. More...
 
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 computeScalarResidual () override
 Method for computing the scalar part of residual for _kappa. More...
 
virtual void computeScalarJacobian () override
 Method for computing the scalar variable part of Jacobian for d-_kappa-residual / d-_kappa. More...
 
virtual void computeScalarOffDiagJacobian (const unsigned int jvar_num) override
 Method for computing an off-diagonal jacobian component d-_kappa-residual / d-jvar. More...
 
virtual Real computeScalarQpOffDiagJacobian (const unsigned int jvar_num) override
 Method for computing an off-diagonal jacobian component at quadrature points. More...
 
virtual void computeOffDiagJacobianScalarLocal (const unsigned int svar_num) override
 Method for computing an off-diagonal jacobian component d-_var-residual / d-svar. More...
 
virtual Real computeQpOffDiagJacobianScalar (const unsigned int svar_num) override
 Method for computing d-_var-residual / d-svar at quadrature points. More...
 
const Homogenization::ConstraintMapcmap () const
 Get the constraint map. More...
 
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 precalculateJacobian () override
 
virtual void precalculateOffDiagJacobian (unsigned int jvar) override
 
virtual Real computeQpResidual () 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...
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 
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 bool _use_off_diagonal
 Whether to use the off diagonal term. More...
 
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
 

Private Attributes

unsigned int _m
 Indices for off-diagonal Jacobian components. More...
 
unsigned int _n
 
Homogenization::ConstraintType _ctype = Homogenization::ConstraintType::None
 Type of current homogenization constraint. More...
 

Detailed Description

Total Lagrangian formulation with all homogenization terms (one disp_xyz field and macro_gradient scalar)

Definition at line 17 of file HomogenizedTotalLagrangianStressDivergence.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

◆ HomogenizedTotalLagrangianStressDivergence()

HomogenizedTotalLagrangianStressDivergence::HomogenizedTotalLagrangianStressDivergence ( const InputParameters parameters)

Definition at line 33 of file HomogenizedTotalLagrangianStressDivergence.C.

36  _use_off_diagonal(getParam<bool>("off_diagonal_jacobian"))
37 {
38 }
const bool _use_off_diagonal
Whether to use the off diagonal term.

Member Function Documentation

◆ additionalROVariables()

std::set< std::string > HomogenizedTotalLagrangianStressDivergence::additionalROVariables ( )
overridevirtual

Inform moose that this kernel covers the constraint scalar variable.

Definition at line 41 of file HomogenizedTotalLagrangianStressDivergence.C.

42 {
43  // Add the scalar variable to the list of variables that this kernel contributes to
44  std::set<std::string> vars = TotalLagrangianStressDivergence::additionalROVariables();
45  vars.insert(_kappa_var_ptr->name());
46  return vars;
47 }
char ** vars

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

◆ cmap()

Get the constraint map.

Definition at line 46 of file HomogenizationInterface.h.

Referenced by computeOffDiagJacobianScalarLocal(), computeScalarJacobian(), computeScalarOffDiagJacobian(), and computeScalarResidual().

46 { return _cmap; }
Homogenization::ConstraintMap _cmap
Constraint map.

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

◆ computeOffDiagJacobianScalarLocal()

void HomogenizedTotalLagrangianStressDivergence::computeOffDiagJacobianScalarLocal ( const unsigned int  svar_num)
overrideprotectedvirtual

Method for computing an off-diagonal jacobian component d-_var-residual / d-svar.

svar is looped over all scalar variables, which herein is just _kappa

Definition at line 208 of file HomogenizedTotalLagrangianStressDivergence.C.

210 {
211  if (!_use_off_diagonal)
212  return;
213 
214  // Just in case, skip any other scalar variables
215  if (svar_num != _kappa_var)
216  return;
217 
218  _local_ke.resize(_test.size(), _k_order);
219 
220  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
221  {
222  unsigned int l = 0;
223  const auto dV = _JxW[_qp] * _coord[_qp];
224  for (const auto & [indices, constraint] : cmap())
225  {
226  // copy constraint indices to protected variables to pass to Qp routine
227  std::tie(_m, _n) = indices;
228  _ctype = constraint.first;
229  initScalarQpJacobian(svar_num);
230  for (_i = 0; _i < _test.size(); _i++)
231  _local_ke(_i, l) += dV * computeQpOffDiagJacobianScalar(svar_num);
232  l++;
233  }
234  }
235 
236  addJacobian(
237  _assembly, _local_ke, _var.dofIndices(), _kappa_var_ptr->dofIndices(), _var.scalingFactor());
238 }
virtual Real computeQpOffDiagJacobianScalar(const unsigned int svar_num) override
Method for computing d-_var-residual / d-svar at quadrature points.
unsigned int _m
Indices for off-diagonal Jacobian components.
Homogenization::ConstraintType _ctype
Type of current homogenization constraint.
const bool _use_off_diagonal
Whether to use the off diagonal term.
const Homogenization::ConstraintMap & cmap() const
Get the constraint map.

◆ computeQpJacobian()

Real LagrangianStressDivergenceBase::computeQpJacobian ( )
overrideprotectedvirtualinherited

Reimplemented in TotalLagrangianWeakPlaneStress.

Definition at line 191 of file LagrangianStressDivergenceBase.C.

192 {
194 }
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

◆ 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 LagrangianStressDivergenceBase::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtualinherited

Reimplemented in TotalLagrangianWeakPlaneStress.

Definition at line 210 of file LagrangianStressDivergenceBase.C.

211 {
212  // Bail if jvar not coupled
213  if (getJvarMap()[jvar] < 0)
214  return 0.0;
215 
216  // Off diagonal terms for other displacements
217  for (auto beta : make_range(_ndisp))
218  if (jvar == _disp_nums[beta])
220 
221  // Off diagonal temperature term due to eigenstrain
222  if (_temperature && jvar == _temperature->number())
224 
225  // Off diagonal term due to weak plane stress
228 
229  return 0;
230 }
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
unsigned int number() const
virtual Real computeQpJacobianOutOfPlaneStrain()=0
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
std::vector< unsigned int > _disp_nums
The displacement numbers.
const unsigned int _ndisp
Total number of displacements/size of residual vector.
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
IntRange< T > make_range(T beg, T end)
virtual Real computeQpJacobianTemperature(unsigned int cvar)=0

◆ computeQpOffDiagJacobianScalar()

Real HomogenizedTotalLagrangianStressDivergence::computeQpOffDiagJacobianScalar ( const unsigned int  svar_num)
overrideprotectedvirtual

Method for computing d-_var-residual / d-svar at quadrature points.

Definition at line 241 of file HomogenizedTotalLagrangianStressDivergence.C.

Referenced by computeOffDiagJacobianScalarLocal().

243 {
244  // d(disp residual) / d(scalar_{m,n}) = int gradTest_alpha : d(PK1)/d(scalar_{m,n}) dV.
245  // The macro_gradient adds to `_F` AFTER F-bar runs (in
246  // `ComputeLagrangianStrainBase::computeQpProperties`), so scalar perturbations
247  // bypass F-bar's chain -- use `_dpk1_bypass_fbar` (pk1_jacobian with the F-bar
248  // `_d_F_stab_d_F_ust` factor REPLACED by identity in the sigma chain).
249  return _dpk1_bypass_fbar[_qp].contractionKl(_m, _n, gradTest(_alpha));
250 }
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...
virtual RankTwoTensor gradTest(unsigned int component) override
unsigned int _m
Indices for off-diagonal Jacobian components.

◆ computeQpResidual()

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

Reimplemented in TotalLagrangianWeakPlaneStress.

Definition at line 370 of file TotalLagrangianStressDivergenceBase.C.

371 {
372  Real result = gradTest(_alpha).doubleContraction(_pk1[_qp]);
373 
374  // OLD-compat B-bar volumetric correction (only in `F_bar_mode = incremental`, the explicit
375  // OLD-compat mode). This adds
376  // int (tr sigma / 3) * (avg_grad_x test - grad_x test)_alpha dV_x
377  // expressed in reference-frame integration as
378  // sum_qp ((PK1 : F_ust) / 3) * (avg_grad_spatial_test[_i] - grad_x_test_alpha) * JxW * coord
379  // (the J = det(F_ust) factor is already absorbed into `PK1 : F_ust = J * tr sigma`).
380  // Without this term, PK1 = det(F_ust) sigma F_ust^{-T} reproduces OLD's `sigma : grad_x test`
381  // term but not OLD's vol-locking correction; for uniform sigma that's harmless (the integral
382  // vanishes per element) but for non-uniform sigma -- e.g. mixed-component Dirichlet BCs producing
383  // non-affine equilibrium with plasticity + a kinematic decomposition that gives spatially varying
384  // sigma -- it drives the converged displacement away from OLD's. Scoped to incremental mode
385  // because (a) that's the documented OLD-compat F-bar mode and (b) the existing `total` mode tests
386  // are calibrated to the F-bar-in-sigma-only formulation (adding the B-bar term there would be
387  // a separate behavior change).
389  {
390  const Real PK1_F_over_3 = _pk1_ddot_F_ust[_qp] / 3.0;
391  result += PK1_F_over_3 * (_avg_grad_spatial_test[_i] - gradXTestComponent(_alpha));
392  }
393  return result;
394 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MaterialProperty< RankTwoTensor > & _pk1
The 1st Piola-Kirchhoff stress.
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
Real doubleContraction(const RankTwoTensorTempl< Real > &a) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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...

◆ computeScalarJacobian()

void HomogenizedTotalLagrangianStressDivergence::computeScalarJacobian ( )
overrideprotectedvirtual

Method for computing the scalar variable part of Jacobian for d-_kappa-residual / d-_kappa.

Definition at line 102 of file HomogenizedTotalLagrangianStressDivergence.C.

103 {
104  if (_alpha != 0)
105  return;
106 
107  _local_ke.resize(_k_order, _k_order);
108 
109  // only assemble scalar residual once; i.e. when handling the first displacement component
110  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
111  {
112  initScalarQpJacobian(_kappa_var);
113  const auto dV = _JxW[_qp] * _coord[_qp];
114 
115  // index for Jacobian row
116  unsigned int h = 0;
117 
118  for (const auto & [indices1, constraint1] : cmap())
119  {
120  const auto [i, j] = indices1;
121  const auto ctype = constraint1.first;
122 
123  // index for Jacobian col
124  unsigned int m = 0;
125 
126  for (const auto & [indices2, constraint2] : cmap())
127  {
128  const auto [k, l] = indices2;
130  // Macro_grad <-> macro_grad: scalar perturbation bypasses F-bar (the
131  // homogenization material adds to `_F` AFTER F-bar runs), so use the
132  // bypass variant of pk1_jacobian.
133  _local_ke(h, m++) += dV * (_dpk1_bypass_fbar[_qp](i, j, k, l));
134  else if (ctype == Homogenization::ConstraintType::Strain)
135  {
136  if (_large_kinematics)
137  _local_ke(h, m++) += dV * (Real(i == k && j == l));
138  else
139  _local_ke(h, m++) += dV * (0.5 * Real(i == k && j == l) + 0.5 * Real(i == l && j == k));
140  }
141  else
142  mooseError("Unknown constraint type in Jacobian calculator!");
143  }
144  h++;
145  }
146  }
147 
148  addJacobian(_assembly,
149  _local_ke,
150  _kappa_var_ptr->dofIndices(),
151  _kappa_var_ptr->dofIndices(),
152  _kappa_var_ptr->scalingFactor());
153 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
void mooseError(Args &&... args)
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...
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
const Homogenization::ConstraintMap & cmap() const
Get the constraint map.

◆ computeScalarOffDiagJacobian()

void HomogenizedTotalLagrangianStressDivergence::computeScalarOffDiagJacobian ( const unsigned int  jvar_num)
overrideprotectedvirtual

Method for computing an off-diagonal jacobian component d-_kappa-residual / d-jvar.

jvar is looped over all field variables, which herein is just disp_x and disp_y

Definition at line 156 of file HomogenizedTotalLagrangianStressDivergence.C.

158 {
159  if (!_use_off_diagonal)
160  return;
161 
162  // ONLY assemble the contribution from _alpha component, which is connected with _var
163  // The other components are handled by other kernel instances with other _alpha
164  if (jvar_num != _var.number())
165  return;
166 
167  const auto & jvar = getVariable(jvar_num);
168  const auto jvar_size = jvar.phiSize();
169  _local_ke.resize(_k_order, jvar_size);
170 
171  // The scalar<->disp Jacobian needs `_avg_grad_trial[_alpha]` populated (for the
172  // non-local F-bar chain via `_d_F_stab_d_F_avg * deltaF_avg`). The base
173  // `precalculateOffDiagJacobian` only does this when the off-diag jvar IS a
174  // displacement; for the scalar-driven path it must be triggered explicitly.
175  if (_stabilize_strain)
176  {
177  _fe_problem.prepareShapes(jvar_num, _tid);
178  _avg_grad_trial[_alpha].resize(_phi.size());
180  }
181 
182  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
183  {
184  const auto dV = _JxW[_qp] * _coord[_qp];
185 
186  // index for Jacobian row
187  unsigned int h = 0;
188 
189  for (const auto & [indices, constraint] : cmap())
190  {
191  std::tie(_m, _n) = indices;
192  _ctype = constraint.first;
193  initScalarQpOffDiagJacobian(jvar);
194  for (_j = 0; _j < jvar_size; _j++)
195  _local_ke(h, _j) += dV * computeScalarQpOffDiagJacobian(jvar_num);
196  h++;
197  }
198  }
199 
200  addJacobian(_assembly,
201  _local_ke,
202  _kappa_var_ptr->dofIndices(),
203  jvar.dofIndices(),
204  _kappa_var_ptr->scalingFactor());
205 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
virtual Real computeScalarQpOffDiagJacobian(const unsigned int jvar_num) override
Method for computing an off-diagonal jacobian component at quadrature points.
unsigned int _m
Indices for off-diagonal Jacobian components.
Homogenization::ConstraintType _ctype
Type of current homogenization constraint.
const bool _use_off_diagonal
Whether to use the off diagonal term.
virtual void precalculateJacobianDisplacement(unsigned int component) override
Prepare the average shape function gradients for stabilization.
const Homogenization::ConstraintMap & cmap() const
Get the constraint map.

◆ computeScalarQpOffDiagJacobian()

Real HomogenizedTotalLagrangianStressDivergence::computeScalarQpOffDiagJacobian ( const unsigned int  jvar_num)
overrideprotectedvirtual

Method for computing an off-diagonal jacobian component at quadrature points.

Definition at line 253 of file HomogenizedTotalLagrangianStressDivergence.C.

Referenced by computeScalarOffDiagJacobian().

255 {
257  {
258  // d(PK1_{m,n})/d(grad u_beta,j) -- local chain via _dpk1 (= dPK1/d(grad u) including
259  // local F-bar effect via the sigma-chain through `_d_F_stab_d_F_ust`).
260  Real J = _dpk1[_qp].contractionIj(_m, _n, gradTrial(_alpha));
261 
262  // Non-local F-bar contribution to PK1 component (m, n) via the shared helper --
263  // same chain as the regular TL displacement Jacobian but contracted into the single
264  // (m, n) entry rather than doubled with gradTest. Guarded on `_stabilize_strain`
265  // because `_avg_grad_trial` is only populated when F-bar is on.
266  if (_stabilize_strain)
267  {
268  const RankTwoTensor delta_F_avg = _d_F_d_grad_u[_qp] * _avg_grad_trial[_alpha][_j];
269  J += deltaPK1NonLocalFBar(delta_F_avg)(_m, _n);
270  }
271  return J;
272  }
274  {
275  // d(F_stab_{m,n})/d(disp_alpha_j) -- for F-bar on, the F-bar chain couples F_stab to
276  // F_ust through both LOCAL (`_d_F_stab_d_F_ust`) and NON-LOCAL
277  // (`_d_F_stab_d_F_avg * deltaF_avg`) routes. The old `Real(_m == _alpha) *
278  // gradTrial(_m, _n)` form captured only the F-bar-off case correctly.
279  const RankTwoTensor delta_F_ust_local = _d_F_d_grad_u[_qp] * gradTrialUnstabilized(_alpha);
280  RankTwoTensor delta_F_stab = _d_F_stab_d_F_ust[_qp] * delta_F_ust_local;
281  if (_stabilize_strain)
282  {
283  const RankTwoTensor delta_F_avg = _d_F_d_grad_u[_qp] * _avg_grad_trial[_alpha][_j];
284  delta_F_stab += _d_F_stab_d_F_avg[_qp] * delta_F_avg;
285  }
286  if (_large_kinematics)
287  return delta_F_stab(_m, _n);
288  else
289  return 0.5 * (delta_F_stab(_m, _n) + delta_F_stab(_n, _m));
290  }
291  else
292  mooseError("Unknown constraint type in kernel calculation!");
293 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
virtual RankTwoTensor gradTrialUnstabilized(unsigned int component)
The unstabilized trial function gradient.
void mooseError(Args &&... args)
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< 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 > & _dpk1
The derivative of the PK1 stress with respect to the deformation gradient (F that the stress material...
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_avg
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _m
Indices for off-diagonal Jacobian components.
Homogenization::ConstraintType _ctype
Type of current homogenization constraint.
virtual RankTwoTensor gradTrial(unsigned int component) override
bool _large_kinematics
If true use large deformation kinematics.

◆ computeScalarResidual()

void HomogenizedTotalLagrangianStressDivergence::computeScalarResidual ( )
overrideprotectedvirtual

Method for computing the scalar part of residual for _kappa.

Definition at line 50 of file HomogenizedTotalLagrangianStressDivergence.C.

51 {
52  if (_alpha != 0)
53  return;
54 
55  std::vector<Real> scalar_residuals(_k_order);
56 
57  // only assemble scalar residual once; i.e. when handling the first displacement component
58  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
59  {
60  initScalarQpResidual();
61  const auto dV = _JxW[_qp] * _coord[_qp];
62 
63  // index for residual vector
64  unsigned int h = 0;
65 
66  for (const auto & [indices, constraint] : cmap())
67  {
68  const auto [i, j] = indices;
69  const auto [ctype, ctarget] = constraint;
70  const auto cval = ctarget->value(_t, _q_point[_qp]);
71 
72  // value to be constrained
73  Real val;
75  {
77  val = _pk1[_qp](i, j);
79  val = _F[_qp](i, j) - (Real(i == j));
80  else
81  mooseError("Unknown constraint type in the integral!");
82  }
83  else
84  {
86  val = _pk1[_qp](i, j);
88  val = 0.5 * (_F[_qp](i, j) + _F[_qp](j, i)) - (Real(i == j));
89  else
90  mooseError("Unknown constraint type in the integral!");
91  }
92 
93  scalar_residuals[h++] += (val - cval) * dV;
94  }
95  }
96 
97  addResiduals(
98  _assembly, scalar_residuals, _kappa_var_ptr->dofIndices(), _kappa_var_ptr->scalingFactor());
99 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
const MaterialProperty< RankTwoTensor > & _pk1
The 1st Piola-Kirchhoff stress.
void mooseError(Args &&... args)
const MaterialProperty< RankTwoTensor > & _F
The actual (stabilized) deformation gradient.
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.
const Homogenization::ConstraintMap & cmap() const
Get the constraint map.

◆ 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 TotalLagrangianWeakPlaneStress::computeQpOffDiagJacobian(), and 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 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 TotalLagrangianWeakPlaneStress::computeQpOffDiagJacobian(), and 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 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< 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() [2/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() [3/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() [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()

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

Reimplemented from LagrangianStressDivergenceBase.

Reimplemented in TotalLagrangianWeakPlaneStress.

Definition at line 118 of file TotalLagrangianStressDivergenceBase.C.

119 {
121  // Populate the per-(qp, j) local PK1 chain cache for the diagonal column (beta = _alpha).
122  // Runs regardless of `_stabilize_strain` because the local chain is always needed; the
123  // helper itself only touches `_avg_grad_trial` when stab is on.
126  {
130  }
131 }
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
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.
const FBarMode _F_bar_mode
What F gets F-bar volumetric correction (Total vs.
void computeAvgTestPhiCross(unsigned int beta)
Compute element-averaged cross product (grad_x test_i)_{b1} * (grad_x phi_j)_{b2} for b1...

◆ 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 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 HomogenizedTotalLagrangianStressDivergence::validParams ( )
static

Definition at line 19 of file HomogenizedTotalLagrangianStressDivergence.C.

20 {
22  params.addClassDescription("Total Lagrangian stress equilibrium kernel with "
23  "homogenization constraint Jacobian terms");
24  params.renameCoupledVar(
25  "scalar_variable", "macro_var", "Optional scalar field with the macro gradient");
26 
27  params.addParam<bool>(
28  "off_diagonal_jacobian", true, "Include the off diagonal parts of the constraint Jacobian");
29 
30  return params;
31 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void renameCoupledVar(const std::string &old_name, const std::string &new_name, const std::string &new_docstring)
static InputParameters validParams()
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

◆ _ctype

Homogenization::ConstraintType HomogenizedTotalLagrangianStressDivergence::_ctype = Homogenization::ConstraintType::None
private

Type of current homogenization constraint.

Definition at line 69 of file HomogenizedTotalLagrangianStressDivergence.h.

Referenced by computeOffDiagJacobianScalarLocal(), computeScalarOffDiagJacobian(), and computeScalarQpOffDiagJacobian().

◆ _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 TotalLagrangianWeakPlaneStress::computeQpOffDiagJacobian(), and computeScalarQpOffDiagJacobian().

◆ _d_F_stab_d_F_avg

const MaterialProperty<RankFourTensor>& LagrangianStressDivergenceBase::_d_F_stab_d_F_avg
protectedinherited

Definition at line 190 of file LagrangianStressDivergenceBase.h.

Referenced by computeScalarQpOffDiagJacobian().

◆ _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 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 TotalLagrangianWeakPlaneStress::computeQpOffDiagJacobian(), and 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 TotalLagrangianWeakPlaneStress::computeQpJacobian(), computeQpOffDiagJacobianScalar(), and 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 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 computeScalarJacobian(), computeScalarQpOffDiagJacobian(), computeScalarResidual(), LagrangianStressDivergenceBase::deltaPK1NonLocalFBar(), and LagrangianStressDivergenceBase::initialSetup().

◆ _m

unsigned int HomogenizedTotalLagrangianStressDivergence::_m
private

◆ _n

unsigned int HomogenizedTotalLagrangianStressDivergence::_n
private

◆ _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 TotalLagrangianWeakPlaneStress::computeQpResidual(), and 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().

◆ _use_off_diagonal

const bool HomogenizedTotalLagrangianStressDivergence::_use_off_diagonal
protected

Whether to use the off diagonal term.

Definition at line 62 of file HomogenizedTotalLagrangianStressDivergence.h.

Referenced by computeOffDiagJacobianScalarLocal(), and computeScalarOffDiagJacobian().


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