https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeEigenstrainBeamBase.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
11
14{
16 params.addRequiredParam<std::string>("eigenstrain_name",
17 "Material property name for the eigenstrain vector computed "
18 "by this model. IMPORTANT: The name of this property must "
19 "also be provided to the strain calculator.");
20 return params;
21}
22
24 : Material(parameters),
25 _eigenstrain_name(getParam<std::string>("eigenstrain_name")),
26 _disp_eigenstrain(declareProperty<RealVectorValue>("disp_" + _eigenstrain_name)),
27 _rot_eigenstrain(declareProperty<RealVectorValue>("rot_" + _eigenstrain_name)),
28 _step_zero(declareRestartableData<bool>("step_zero", true))
29{
30}
31
32void
34{
35 // This property can be promoted to be stateful by other models that use it,
36 // so it needs to be initalized.
37 RealVectorValue a;
40}
41
42void
44{
45 if (_t_step >= 1)
46 _step_zero = false;
47
48 // Skip the eigenstrain calculation in step zero because no solution is computed during
49 // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
50 // an incorrect calculation of mechanical_strain, which is stateful.
51 if (!_step_zero)
53}
MaterialProperty< RealVectorValue > & _disp_eigenstrain
Stores the current displacement eigenstrain.
MaterialProperty< RealVectorValue > & _rot_eigenstrain
Stores the current rotational eigenstrain.
static InputParameters validParams()
ComputeEigenstrainBeamBase(const InputParameters &parameters)
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain.
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
int & _t_step