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

ComputeAxisymmetric1DSmallStrain defines small strains in an Axisymmetric 1D problem. More...

#include <ComputeAxisymmetric1DSmallStrain.h>

Inheritance diagram for ComputeAxisymmetric1DSmallStrain:
[legend]

Public Member Functions

 ComputeAxisymmetric1DSmallStrain (const InputParameters &parameters)
 

Protected Member Functions

void initialSetup () override
 
Real computeStrainYY () override
 Computes the strain_yy for axisymmetric problems. More...
 
Real computeStrainZZ () override
 Computes the strain_zz for axisymmetric problems, where \( \epsilon_{\theta} = \frac{u_r}{r} \). More...
 
unsigned int getCurrentSubblockIndex () const
 gets its subblock index for current element More...
 
void computeProperties () override
 
virtual void initQpStatefulProperties () override
 

Protected Attributes

const SubblockIndexProvider_subblock_id_provider
 
const bool _has_out_of_plane_strain
 
const VariableValue & _out_of_plane_strain
 
const bool _has_scalar_out_of_plane_strain
 
unsigned int _nscalar_strains
 
std::vector< const VariableValue * > _scalar_out_of_plane_strain
 
unsigned int _ndisp
 Coupled displacement variables. More...
 
std::vector< const VariableValue * > _disp
 
std::vector< const VariableGradient * > _grad_disp
 
std::string _base_name
 
MaterialProperty< RankTwoTensor > & _mechanical_strain
 
MaterialProperty< RankTwoTensor > & _total_strain
 
std::vector< MaterialPropertyName > _eigenstrain_names
 
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
 
bool _volumetric_locking_correction
 
const Real & _current_elem_volume
 

Detailed Description

ComputeAxisymmetric1DSmallStrain defines small strains in an Axisymmetric 1D problem.

The COORD_TYPE in the Problem block must be set to RZ.

Definition at line 17 of file ComputeAxisymmetric1DSmallStrain.h.

Constructor & Destructor Documentation

ComputeAxisymmetric1DSmallStrain::ComputeAxisymmetric1DSmallStrain ( const InputParameters &  parameters)

Definition at line 24 of file ComputeAxisymmetric1DSmallStrain.C.

26  : Compute1DSmallStrain(parameters),
27  _subblock_id_provider(isParamValid("subblock_index_provider")
28  ? &getUserObject<SubblockIndexProvider>("subblock_index_provider")
29  : nullptr),
30  _has_out_of_plane_strain(isParamValid("out_of_plane_strain")),
31  _out_of_plane_strain(_has_out_of_plane_strain ? coupledValue("out_of_plane_strain") : _zero),
32  _has_scalar_out_of_plane_strain(isParamValid("scalar_out_of_plane_strain")),
34  _has_scalar_out_of_plane_strain ? coupledScalarComponents("scalar_out_of_plane_strain") : 0)
35 {
37  mooseError("Must define only one of out_of_plane_strain or scalar_out_of_plane_strain");
38 
40  mooseError("Must define either out_of_plane_strain or scalar_out_of_plane_strain");
41 
42  // in case when the provided scalar_out_of_plane_strain is not a coupled
43  // scalar variable, still set _nscalar_strains = 1 but return its default value 0
44  if (coupledScalarComponents("scalar_out_of_plane_strain") == 0)
45  _nscalar_strains = 1;
46 
48  {
50  for (unsigned int i = 0; i < _nscalar_strains; ++i)
51  _scalar_out_of_plane_strain[i] = &coupledScalarValue("scalar_out_of_plane_strain", i);
52  }
53 }
std::vector< const VariableValue * > _scalar_out_of_plane_strain
const SubblockIndexProvider * _subblock_id_provider
Compute1DSmallStrain(const InputParameters &parameters)

Member Function Documentation

void Compute1DSmallStrain::computeProperties ( )
overrideprotectedvirtualinherited

Reimplemented from ComputeSmallStrain.

Definition at line 27 of file Compute1DSmallStrain.C.

28 {
29  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
30  {
31  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
32  _total_strain[_qp](1, 1) = computeStrainYY();
33  _total_strain[_qp](2, 2) = computeStrainZZ();
34 
36 
37  // Remove the eigenstrain
38  for (auto es : _eigenstrains)
39  _mechanical_strain[_qp] -= (*es)[_qp];
40  }
41 }
virtual Real computeStrainYY()=0
Computes the strain_yy; as a virtual function, this function is overwritten for the specific geometri...
virtual Real computeStrainZZ()=0
Computes the strain_zz; as a virtual function, this function is overwritten for the specific geometri...
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _total_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
std::vector< const VariableGradient * > _grad_disp
Real ComputeAxisymmetric1DSmallStrain::computeStrainYY ( )
overrideprotectedvirtual

Computes the strain_yy for axisymmetric problems.

Implements Compute1DSmallStrain.

Definition at line 63 of file ComputeAxisymmetric1DSmallStrain.C.

64 {
67  else
68  return _out_of_plane_strain[_qp];
69 }
unsigned int getCurrentSubblockIndex() const
gets its subblock index for current element
std::vector< const VariableValue * > _scalar_out_of_plane_strain
Real ComputeAxisymmetric1DSmallStrain::computeStrainZZ ( )
overrideprotectedvirtual

Computes the strain_zz for axisymmetric problems, where \( \epsilon_{\theta} = \frac{u_r}{r} \).

Implements Compute1DSmallStrain.

Definition at line 72 of file ComputeAxisymmetric1DSmallStrain.C.

73 {
74  if (!MooseUtils::absoluteFuzzyEqual(_q_point[_qp](0), 0.0))
75  return (*_disp[0])[_qp] / _q_point[_qp](0);
76  else
77  return 0.0;
78 }
std::vector< const VariableValue * > _disp
unsigned int ComputeAxisymmetric1DSmallStrain::getCurrentSubblockIndex ( ) const
inlineprotected

gets its subblock index for current element

Definition at line 33 of file ComputeAxisymmetric1DSmallStrain.h.

Referenced by computeStrainYY().

34  {
35  return _subblock_id_provider ? _subblock_id_provider->getSubblockIndex(*_current_elem) : 0;
36  };
virtual unsigned int getSubblockIndex(const Elem &) const =0
The index of subblock this element is on.
const SubblockIndexProvider * _subblock_id_provider
void ComputeAxisymmetric1DSmallStrain::initialSetup ( )
overrideprotected

Definition at line 56 of file ComputeAxisymmetric1DSmallStrain.C.

57 {
58  if (getBlockCoordSystem() != Moose::COORD_RZ)
59  mooseError("The coordinate system must be set to RZ for Axisymmetric geometries.");
60 }
void ComputeStrainBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented in ComputeCosseratIncrementalSmallStrain, and ComputeIncrementalStrainBase.

Definition at line 78 of file ComputeStrainBase.C.

Referenced by ComputeStrainBase::~ComputeStrainBase().

79 {
80  _mechanical_strain[_qp].zero();
81  _total_strain[_qp].zero();
82 }
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _total_strain

Member Data Documentation

std::string ComputeStrainBase::_base_name
protectedinherited

Definition at line 33 of file ComputeStrainBase.h.

Referenced by ComputeStrainBase::ComputeStrainBase().

const Real& ComputeStrainBase::_current_elem_volume
protectedinherited
std::vector<const VariableValue *> ComputeStrainBase::_disp
protectedinherited
std::vector<MaterialPropertyName> ComputeStrainBase::_eigenstrain_names
protectedinherited
std::vector<const MaterialProperty<RankTwoTensor> *> ComputeStrainBase::_eigenstrains
protectedinherited
std::vector<const VariableGradient *> ComputeStrainBase::_grad_disp
protectedinherited
const bool ComputeAxisymmetric1DSmallStrain::_has_out_of_plane_strain
protected

Definition at line 40 of file ComputeAxisymmetric1DSmallStrain.h.

Referenced by ComputeAxisymmetric1DSmallStrain().

const bool ComputeAxisymmetric1DSmallStrain::_has_scalar_out_of_plane_strain
protected
MaterialProperty<RankTwoTensor>& ComputeStrainBase::_mechanical_strain
protectedinherited
unsigned int ComputeStrainBase::_ndisp
protectedinherited
unsigned int ComputeAxisymmetric1DSmallStrain::_nscalar_strains
protected

Definition at line 44 of file ComputeAxisymmetric1DSmallStrain.h.

Referenced by ComputeAxisymmetric1DSmallStrain().

const VariableValue& ComputeAxisymmetric1DSmallStrain::_out_of_plane_strain
protected

Definition at line 41 of file ComputeAxisymmetric1DSmallStrain.h.

Referenced by computeStrainYY().

std::vector<const VariableValue *> ComputeAxisymmetric1DSmallStrain::_scalar_out_of_plane_strain
protected
const SubblockIndexProvider* ComputeAxisymmetric1DSmallStrain::_subblock_id_provider
protected

Definition at line 36 of file ComputeAxisymmetric1DSmallStrain.h.

Referenced by getCurrentSubblockIndex().

MaterialProperty<RankTwoTensor>& ComputeStrainBase::_total_strain
protectedinherited
bool ComputeStrainBase::_volumetric_locking_correction
protectedinherited

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