17 params.
addRequiredParam<
unsigned int>(
"component",
"Which direction this kernel acts in");
20 params.
addParam<
bool>(
"large_kinematics",
false,
"Use large displacement kinematics");
21 params.
addParam<
bool>(
"stabilize_strain",
false,
"Average the volumetric strains");
23 params.
addParam<std::string>(
"base_name",
"Material property base name");
26 "The name of the temperature variable used in the " 27 "ComputeThermalExpansionEigenstrain. (Not required for " 28 "simulations without temperature coupling.)");
30 params.
addParam<std::vector<MaterialPropertyName>>(
33 "List of eigenstrains used in the strain calculation. Used for computing their derivatives " 34 "for off-diagonal Jacobian terms.");
37 "The out-of-plane strain variable for weak plane stress formulation.");
44 _large_kinematics(getParam<bool>(
"large_kinematics")),
45 _stabilize_strain(getParam<bool>(
"stabilize_strain")),
46 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
47 _alpha(getParam<unsigned
int>(
"component")),
48 _ndisp(coupledComponents(
"displacements")),
50 _avg_grad_trial(_ndisp),
52 getMaterialPropertyByName<
RankTwoTensor>(_base_name +
"unstabilized_deformation_gradient")),
53 _F_avg(getMaterialPropertyByName<
RankTwoTensor>(_base_name +
"average_deformation_gradient")),
55 "inverse_incremental_deformation_gradient")),
56 _F_inv(getMaterialPropertyByName<
RankTwoTensor>(_base_name +
"inverse_deformation_gradient")),
57 _F(getMaterialPropertyByName<
RankTwoTensor>(_base_name +
"deformation_gradient")),
58 _temperature(isCoupled(
"temperature") ? getVar(
"temperature", 0) : nullptr),
59 _out_of_plane_strain(isCoupled(
"out_of_plane_strain") ? getVar(
"out_of_plane_strain", 0)
63 for (
unsigned int i = 0; i <
_ndisp; i++)
67 auto order_x = getVar(
"displacements", 0)->order();
68 for (
unsigned int i = 1; i <
_ndisp; i++)
70 if (getVar(
"displacements", i)->order() != order_x)
71 mooseError(
"The Lagrangian StressDivergence kernels require equal " 72 "order interpolation for all displacements.");
76 const auto nvar = _coupled_moose_vars.size();
78 for (std::size_t i = 0; i < nvar; ++i)
79 for (
auto eigenstrain_name : getParam<std::vector<MaterialPropertyName>>(
"eigenstrain_names"))
81 eigenstrain_name, _coupled_moose_vars[i]->
name()));
92 _fe_problem.prepareShapes(_var.number(), _tid);
108 _fe_problem.prepareShapes(jvar, _tid);
const MooseVariable * _temperature
Temperature, if provided. This is used only to get the trial functions.
std::vector< unsigned int > _disp_nums
The displacement numbers.
const unsigned int _alpha
Which component of the vector residual this kernel is responsible for.
void mooseError(Args &&... args)
unsigned int number() const
static InputParameters validParams()
const MooseVariable * _out_of_plane_strain
Out-of-plane strain, if provided.
const unsigned int _ndisp
Total number of displacements/size of residual vector.
const JvarMap & getJvarMap()
unsigned int mapJvarToCvar(unsigned int jvar)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real computeQpJacobianOutOfPlaneStrain()=0
const bool _stabilize_strain
If true calculate the deformation gradient derivatives for F_bar.
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
Eigenstrain derivatives wrt generate coupleds.
virtual Real computeQpJacobianDisplacement(unsigned int alpha, unsigned int beta)=0
LagrangianStressDivergenceBaseS(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< RankTwoTensor > > _avg_grad_trial
virtual Real computeQpJacobianTemperature(unsigned int cvar)=0
static InputParameters validParams()
IntRange< T > make_range(T beg, T end)
virtual void precalculateJacobianDisplacement(unsigned int component)=0
Prepare the average shape function gradients for stabilization.
virtual Real computeQpJacobian() override
void ErrorVector unsigned int
virtual void precalculateJacobian() override
virtual void precalculateOffDiagJacobian(unsigned int jvar) override