www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeEigenstrainBeamFromVariable Class Reference

ComputeEigenstrainBeamFromVariable computes an eigenstrain from displacement and rotational eigenstrain variables. More...

#include <ComputeEigenstrainBeamFromVariable.h>

Inheritance diagram for ComputeEigenstrainBeamFromVariable:
[legend]

Public Member Functions

 ComputeEigenstrainBeamFromVariable (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpEigenstrain () override
 Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain. More...
 
virtual void initQpStatefulProperties ()
 
virtual void computeQpProperties ()
 

Protected Attributes

const unsigned int _ndisp
 Number of displacement eigenstrain variables. More...
 
const unsigned int _nrot
 Number of rotational eigenstrain variables. More...
 
std::vector< const VariableValue * > _disp
 Displacemenet eigenstrain variable values. More...
 
std::vector< const VariableValue * > _rot
 Rotational eigenstrain variable values. More...
 
std::string _eigenstrain_name
 Base material property name for the eigenstrain vectors. More...
 
MaterialProperty< RealVectorValue > & _disp_eigenstrain
 Stores the current displacement eigenstrain. More...
 
MaterialProperty< RealVectorValue > & _rot_eigenstrain
 Stores the current rotational eigenstrain. More...
 
bool & _step_zero
 Restartable data to check for the zeroth and first time steps for thermal calculations. More...
 

Detailed Description

ComputeEigenstrainBeamFromVariable computes an eigenstrain from displacement and rotational eigenstrain variables.

Definition at line 24 of file ComputeEigenstrainBeamFromVariable.h.

Constructor & Destructor Documentation

◆ ComputeEigenstrainBeamFromVariable()

ComputeEigenstrainBeamFromVariable::ComputeEigenstrainBeamFromVariable ( const InputParameters &  parameters)

Definition at line 33 of file ComputeEigenstrainBeamFromVariable.C.

35  : ComputeEigenstrainBeamBase(parameters),
36  _ndisp(coupledComponents("displacement_eigenstrain_variables")),
37  _nrot(coupledComponents("rotational_eigenstrain_variables")),
38  _disp(3),
39  _rot(3)
40 {
41  if ((_ndisp != 3 && _ndisp != 0) || (_nrot != 3 && _nrot != 0))
42  mooseError("ComputeEigenstrainBeamFromVariable: If the displacement or rotational eigenstrains "
43  "are provided, it should contain 3 variables corresponding to the three "
44  "components in the global coordinate system.");
45 
46  // fetch coupled variables
47  if (_ndisp > 0)
48  {
49  for (unsigned int i = 0; i < _ndisp; ++i)
50  _disp[i] = &coupledValue("displacement_eigenstrain_variables", i);
51  }
52  else
53  {
54  for (unsigned int i = 0; i < 3; ++i)
55  _disp[i] = &_zero;
56  }
57 
58  if (_nrot > 0)
59  {
60  for (unsigned int i = 0; i < _nrot; ++i)
61  _rot[i] = &coupledValue("rotational_eigenstrain_variables", i);
62  }
63  else
64  {
65  for (unsigned int i = 0; i < 3; ++i)
66  _rot[i] = &_zero;
67  }
68 }
std::vector< const VariableValue * > _disp
Displacemenet eigenstrain variable values.
const unsigned int _ndisp
Number of displacement eigenstrain variables.
std::vector< const VariableValue * > _rot
Rotational eigenstrain variable values.
const unsigned int _nrot
Number of rotational eigenstrain variables.
ComputeEigenstrainBeamBase(const InputParameters &parameters)

Member Function Documentation

◆ computeQpEigenstrain()

void ComputeEigenstrainBeamFromVariable::computeQpEigenstrain ( )
overrideprotectedvirtual

Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain.

Implements ComputeEigenstrainBeamBase.

Definition at line 71 of file ComputeEigenstrainBeamFromVariable.C.

72 {
73  for (unsigned int i = 0; i < 3; ++i)
74  {
75  _disp_eigenstrain[_qp](i) = (*_disp[i])[_qp];
76  _rot_eigenstrain[_qp](i) = (*_rot[i])[_qp];
77  }
78 }
std::vector< const VariableValue * > _disp
Displacemenet eigenstrain variable values.
MaterialProperty< RealVectorValue > & _rot_eigenstrain
Stores the current rotational eigenstrain.
MaterialProperty< RealVectorValue > & _disp_eigenstrain
Stores the current displacement eigenstrain.
std::vector< const VariableValue * > _rot
Rotational eigenstrain variable values.

◆ computeQpProperties()

void ComputeEigenstrainBeamBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 44 of file ComputeEigenstrainBeamBase.C.

45 {
46  if (_t_step >= 1)
47  _step_zero = false;
48 
49  // Skip the eigenstrain calculation in step zero because no solution is computed during
50  // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
51  // an incorrect calculation of mechanical_strain, which is stateful.
52  if (!_step_zero)
54 }
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _disp_eigenstrain and _rot_eigenstrain.

◆ initQpStatefulProperties()

void ComputeEigenstrainBeamBase::initQpStatefulProperties ( )
protectedvirtualinherited

Definition at line 34 of file ComputeEigenstrainBeamBase.C.

35 {
36  // This property can be promoted to be stateful by other models that use it,
37  // so it needs to be initalized.
38  RealVectorValue a;
39  _disp_eigenstrain[_qp] = a;
40  _rot_eigenstrain[_qp] = a;
41 }
MaterialProperty< RealVectorValue > & _rot_eigenstrain
Stores the current rotational eigenstrain.
MaterialProperty< RealVectorValue > & _disp_eigenstrain
Stores the current displacement eigenstrain.

Member Data Documentation

◆ _disp

std::vector<const VariableValue *> ComputeEigenstrainBeamFromVariable::_disp
protected

Displacemenet eigenstrain variable values.

Definition at line 39 of file ComputeEigenstrainBeamFromVariable.h.

Referenced by ComputeEigenstrainBeamFromVariable(), and computeQpEigenstrain().

◆ _disp_eigenstrain

MaterialProperty<RealVectorValue>& ComputeEigenstrainBeamBase::_disp_eigenstrain
protectedinherited

Stores the current displacement eigenstrain.

Definition at line 39 of file ComputeEigenstrainBeamBase.h.

Referenced by computeQpEigenstrain(), and ComputeEigenstrainBeamBase::initQpStatefulProperties().

◆ _eigenstrain_name

std::string ComputeEigenstrainBeamBase::_eigenstrain_name
protectedinherited

Base material property name for the eigenstrain vectors.

Definition at line 36 of file ComputeEigenstrainBeamBase.h.

◆ _ndisp

const unsigned int ComputeEigenstrainBeamFromVariable::_ndisp
protected

Number of displacement eigenstrain variables.

Definition at line 33 of file ComputeEigenstrainBeamFromVariable.h.

Referenced by ComputeEigenstrainBeamFromVariable().

◆ _nrot

const unsigned int ComputeEigenstrainBeamFromVariable::_nrot
protected

Number of rotational eigenstrain variables.

Definition at line 36 of file ComputeEigenstrainBeamFromVariable.h.

Referenced by ComputeEigenstrainBeamFromVariable().

◆ _rot

std::vector<const VariableValue *> ComputeEigenstrainBeamFromVariable::_rot
protected

Rotational eigenstrain variable values.

Definition at line 42 of file ComputeEigenstrainBeamFromVariable.h.

Referenced by ComputeEigenstrainBeamFromVariable(), and computeQpEigenstrain().

◆ _rot_eigenstrain

MaterialProperty<RealVectorValue>& ComputeEigenstrainBeamBase::_rot_eigenstrain
protectedinherited

Stores the current rotational eigenstrain.

Definition at line 42 of file ComputeEigenstrainBeamBase.h.

Referenced by computeQpEigenstrain(), and ComputeEigenstrainBeamBase::initQpStatefulProperties().

◆ _step_zero

bool& ComputeEigenstrainBeamBase::_step_zero
protectedinherited

Restartable data to check for the zeroth and first time steps for thermal calculations.

Definition at line 45 of file ComputeEigenstrainBeamBase.h.

Referenced by ComputeEigenstrainBeamBase::computeQpProperties().


The documentation for this class was generated from the following files: