www.mooseframework.org
ComputeEigenstrainBeamBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
13 
14 InputParameters
16 {
17  InputParameters params = Material::validParams();
18  params.addRequiredParam<std::string>("eigenstrain_name",
19  "Material property name for the eigenstrain vector computed "
20  "by this model. IMPORTANT: The name of this property must "
21  "also be provided to the strain calculator.");
22  return params;
23 }
24 
25 ComputeEigenstrainBeamBase::ComputeEigenstrainBeamBase(const InputParameters & parameters)
26  : Material(parameters),
27  _eigenstrain_name(getParam<std::string>("eigenstrain_name")),
28  _disp_eigenstrain(declareProperty<RealVectorValue>("disp_" + _eigenstrain_name)),
29  _rot_eigenstrain(declareProperty<RealVectorValue>("rot_" + _eigenstrain_name)),
30  _step_zero(declareRestartableData<bool>("step_zero", true))
31 {
32 }
33 
34 void
36 {
37  // This property can be promoted to be stateful by other models that use it,
38  // so it needs to be initalized.
39  RealVectorValue a;
40  _disp_eigenstrain[_qp] = a;
41  _rot_eigenstrain[_qp] = a;
42 }
43 
44 void
46 {
47  if (_t_step >= 1)
48  _step_zero = false;
49 
50  // Skip the eigenstrain calculation in step zero because no solution is computed during
51  // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
52  // an incorrect calculation of mechanical_strain, which is stateful.
53  if (!_step_zero)
55 }
ComputeEigenstrainBeamBase::computeQpEigenstrain
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain.
ComputeEigenstrainBeamBase.h
ComputeEigenstrainBeamBase::computeQpProperties
virtual void computeQpProperties()
Definition: ComputeEigenstrainBeamBase.C:45
ComputeEigenstrainBeamBase
ComputeEigenstrainBeamBase is the base class for beam eigenstrain vectors.
Definition: ComputeEigenstrainBeamBase.h:22
ComputeEigenstrainBeamBase::ComputeEigenstrainBeamBase
ComputeEigenstrainBeamBase(const InputParameters &parameters)
Definition: ComputeEigenstrainBeamBase.C:25
ComputeEigenstrainBeamBase::_rot_eigenstrain
MaterialProperty< RealVectorValue > & _rot_eigenstrain
Stores the current rotational eigenstrain.
Definition: ComputeEigenstrainBeamBase.h:43
validParams
InputParameters validParams()
defineLegacyParams
defineLegacyParams(ComputeEigenstrainBeamBase)
ComputeEigenstrainBeamBase::validParams
static InputParameters validParams()
Definition: ComputeEigenstrainBeamBase.C:15
ComputeEigenstrainBeamBase::_step_zero
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Definition: ComputeEigenstrainBeamBase.h:46
ComputeEigenstrainBeamBase::initQpStatefulProperties
virtual void initQpStatefulProperties()
Definition: ComputeEigenstrainBeamBase.C:35
ComputeEigenstrainBeamBase::_disp_eigenstrain
MaterialProperty< RealVectorValue > & _disp_eigenstrain
Stores the current displacement eigenstrain.
Definition: ComputeEigenstrainBeamBase.h:40