https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADWeakPlaneStress.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "ADWeakPlaneStress.h"
11
13
16{
18 params.addClassDescription("Plane stress kernel to provide out-of-plane strain contribution.");
19 params.addParam<std::string>("base_name", "Material property base name");
20 MooseEnum direction("x y z", "z");
21 params.addParam<MooseEnum>("out_of_plane_strain_direction",
22 direction,
23 "The direction of the out-of-plane strain variable");
24 params.set<bool>("use_displaced_mesh") = false;
25
26 return params;
27}
28
30 : ADKernelValue(parameters),
31 _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
32 _stress(getADMaterialProperty<RankTwoTensor>(_base_name + "stress")),
33 _direction(getParam<MooseEnum>("out_of_plane_strain_direction"))
34{
35}
36
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("SolidMechanicsApp", ADWeakPlaneStress)
static InputParameters validParams()
ADWeakPlaneStress is the automatic differentiation version of WeakPlaneStress.
const ADMaterialProperty< RankTwoTensor > & _stress
The stress tensor that provides the out-of-plane stress.
const unsigned int _direction
The direction of the out-of-plane strain variable.
ADWeakPlaneStress(const InputParameters &parameters)
static InputParameters validParams()
ADReal precomputeQpResidual() override
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
unsigned int _qp