Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : // Inputs/Outputs hold RankTwoTensor / RankFourTensor by value, so the full definitions are needed. 13 : #include "RankTwoTensor.h" 14 : #include "RankFourTensor.h" 15 : 16 : class MooseEnum; 17 : 18 : /// Objective-stress-rate updates as stateless free functions. 19 : /// 20 : /// Each rate integrates the constitutive small-stress increment into the cumulative Cauchy stress 21 : /// using its objective-rate advection and, when requested, returns the consistent tangent 22 : /// d(sigma_cauchy)/d(dL) plus the eigenstrain sensitivity. The rates are pure functions of an 23 : /// explicit `Inputs` bundle -- no coupling to the material that gathers them -- so they can be unit 24 : /// tested in isolation and dispatched by a `switch` (composition, not a class hierarchy). 25 : namespace LagrangianObjectiveRates 26 : { 27 : /// Per-qp quantities a rate reads. The host material gathers these once per qp from the strain 28 : /// calculator's published properties and its own constitutive small stress. The Green-Naghdi-only 29 : /// fields are default-constructed for the other rates -- only `greenNaghdi` reads them. 30 33582605 : struct Inputs 31 : { 32 : /// Constitutive small-stress increment (`_small_stress - _small_stress_old`). 33 : RankTwoTensor dS; 34 : /// Cumulative Cauchy stress at step n. 35 : RankTwoTensor cauchy_stress_old; 36 : /// Small-strain algorithmic tangent. 37 : RankFourTensor small_jacobian; 38 : /// Spatial velocity gradient increment dL and its vorticity (skew) part dW. 39 : RankTwoTensor dL, dW; 40 : /// d(dL)/dF and d(dW)/dF from the strain calculator. 41 : RankFourTensor d_dL_d_F, d_dW_d_F; 42 : /// Green-Naghdi only: polar-decomposition rotation R (n+1 and n), the inverse incremental 43 : /// deformation gradient, and F^{-1}. 44 : RankTwoTensor rotation, rotation_old, inv_df, inv_def_grad; 45 : /// Green-Naghdi only: dR/dF. 46 : RankFourTensor d_rotation_d_F; 47 : }; 48 : 49 : /// Per-qp outputs a rate produces. `cauchy_jacobian` and `dcauchy_stress_d_eigenstrain` are filled 50 : /// only when `need_jacobian` is true (they are read only on Jacobian sweeps). 51 33582638 : struct Outputs 52 : { 53 : RankTwoTensor cauchy_stress; 54 : RankFourTensor cauchy_jacobian; 55 : RankFourTensor dcauchy_stress_d_eigenstrain; 56 : }; 57 : 58 : /// sigma_{n+1} = J(dL)^{-1} (sigma_n + Deltasigma). Truesdell rate. 59 : Outputs truesdell(const Inputs & in, bool need_jacobian); 60 : /// sigma_{n+1} = J(dW)^{-1} (sigma_n + Deltasigma). Jaumann rate. 61 : Outputs jaumann(const Inputs & in, bool need_jacobian); 62 : /// sigma_{n+1} = J(dO)^{-1} (sigma_n + Deltasigma), with dO built from the polar rotation increment. 63 : Outputs greenNaghdi(const Inputs & in, bool need_jacobian); 64 : /// sigma_{n+1} = r_hat (sigma_n + Deltasigma) r_hat^T, r_hat = exp(Deltaw). See 65 : /// `rashid_project/plan_outline.pdf` Sec.3.2. 66 : Outputs rashid(const Inputs & in, bool need_jacobian); 67 : 68 : /// Dispatch to the rate selected by the `objective_rate` enum 69 : /// (truesdell / jaumann / green_naghdi / rashid). Errors on an unknown value. 70 : Outputs compute(const MooseEnum & rate, const Inputs & in, bool need_jacobian); 71 : }