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

ComputeEigenstrain computes an Eigenstrain that results from an initial stress. More...

#include <ComputeEigenstrainFromInitialStress.h>

Inheritance diagram for ComputeEigenstrainFromInitialStress:
[legend]

Public Member Functions

 ComputeEigenstrainFromInitialStress (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpEigenstrain () override
 Compute the eigenstrain and store in _eigenstrain. More...
 
virtual void initQpStatefulProperties ()
 
virtual void computeQpProperties ()
 
Real computeVolumetricStrainComponent (const Real volumetric_strain) const
 Helper function for models that compute the eigenstrain based on a volumetric strain. More...
 

Protected Attributes

const std::string _base_name
 base_name for elasticity tensor to use to convert stress to strain More...
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 elasticity tensor used to convert stress to strain More...
 
std::vector< Function * > _initial_stress_fcn
 initial stress components More...
 
std::string _eigenstrain_name
 Material property name for the eigenstrain tensor. More...
 
bool _incremental_form
 Whether the eigenstrain model should compute the total or incremental eigenstrain. More...
 
MaterialProperty< RankTwoTensor > & _eigenstrain
 Stores the current total eigenstrain. More...
 
const MaterialProperty< RankTwoTensor > * _eigenstrain_old
 Stores the total eigenstrain in the previous step (only for incremental form) More...
 
bool & _step_zero
 Restartable data to check for the zeroth and first time steps for thermal calculations. More...
 

Detailed Description

ComputeEigenstrain computes an Eigenstrain that results from an initial stress.

Definition at line 16 of file ComputeEigenstrainFromInitialStress.h.

Constructor & Destructor Documentation

ComputeEigenstrainFromInitialStress::ComputeEigenstrainFromInitialStress ( const InputParameters &  parameters)

Definition at line 33 of file ComputeEigenstrainFromInitialStress.C.

35  : ComputeEigenstrainBase(parameters),
36  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
37  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_base_name + "elasticity_tensor"))
38 {
39  if (_incremental_form == false)
40  mooseError("ComputeEigenstrainFromInitialStress: incremental_form must be set to true");
41 
42  const std::vector<FunctionName> & fcn_names(
43  getParam<std::vector<FunctionName>>("initial_stress"));
44  const unsigned num = fcn_names.size();
45 
46  if (num != LIBMESH_DIM * LIBMESH_DIM)
47  mooseError("ComputeEigenstrainFromInitialStress: ",
48  LIBMESH_DIM * LIBMESH_DIM,
49  " initial stress functions must be provided. You supplied ",
50  num,
51  "\n");
52 
53  _initial_stress_fcn.resize(num);
54  for (unsigned i = 0; i < num; ++i)
55  _initial_stress_fcn[i] = &getFunctionByName(fcn_names[i]);
56 }
std::vector< Function * > _initial_stress_fcn
initial stress components
const std::string _base_name
base_name for elasticity tensor to use to convert stress to strain
ComputeEigenstrainBase(const InputParameters &parameters)
bool _incremental_form
Whether the eigenstrain model should compute the total or incremental eigenstrain.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
elasticity tensor used to convert stress to strain

Member Function Documentation

void ComputeEigenstrainFromInitialStress::computeQpEigenstrain ( )
overrideprotectedvirtual

Compute the eigenstrain and store in _eigenstrain.

Implements ComputeEigenstrainBase.

Definition at line 59 of file ComputeEigenstrainFromInitialStress.C.

60 {
61  if (_t_step == 1)
62  {
63  RankTwoTensor initial_stress;
64  for (unsigned i = 0; i < LIBMESH_DIM; ++i)
65  for (unsigned j = 0; j < LIBMESH_DIM; ++j)
66  initial_stress(i, j) = _initial_stress_fcn[i * LIBMESH_DIM + j]->value(_t, _q_point[_qp]);
67 
68  _eigenstrain[_qp] = -_elasticity_tensor[_qp].invSymm() * initial_stress;
69  }
70  else
71  _eigenstrain[_qp] = (*_eigenstrain_old)[_qp];
72 }
std::vector< Function * > _initial_stress_fcn
initial stress components
MaterialProperty< RankTwoTensor > & _eigenstrain
Stores the current total eigenstrain.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
elasticity tensor used to convert stress to strain
void ComputeEigenstrainBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 50 of file ComputeEigenstrainBase.C.

51 {
52  if (_t_step >= 1)
53  _step_zero = false;
54 
55  // Skip the eigenstrain calculation in step zero because no solution is computed during
56  // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
57  // an incorrect calculation of mechanical_strain, which is stateful.
58  if (!_step_zero)
60 }
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Real ComputeEigenstrainBase::computeVolumetricStrainComponent ( const Real  volumetric_strain) const
protectedinherited

Helper function for models that compute the eigenstrain based on a volumetric strain.

This function computes the diagonal components of the eigenstrain tensor. param volumetric_strain The current volumetric strain to be applied

Definition at line 63 of file ComputeEigenstrainBase.C.

64 {
65 
66  Real volumetric_strain_comp = std::cbrt(volumetric_strain + 1.0) - 1.0;
67 
68  // Convert to logarithmic strain to compute strains to exactly recover
69  // volumetric strain in finite strain models
70  volumetric_strain_comp = std::log(1.0 + volumetric_strain_comp);
71 
72  return volumetric_strain_comp;
73 }
void ComputeEigenstrainBase::initQpStatefulProperties ( )
protectedvirtualinherited

Reimplemented in ComputeReducedOrderEigenstrain.

Definition at line 43 of file ComputeEigenstrainBase.C.

44 {
46  _eigenstrain[_qp].zero();
47 }
MaterialProperty< RankTwoTensor > & _eigenstrain
Stores the current total eigenstrain.
bool _incremental_form
Whether the eigenstrain model should compute the total or incremental eigenstrain.

Member Data Documentation

const std::string ComputeEigenstrainFromInitialStress::_base_name
protected

base_name for elasticity tensor to use to convert stress to strain

Definition at line 25 of file ComputeEigenstrainFromInitialStress.h.

MaterialProperty<RankTwoTensor>& ComputeEigenstrainBase::_eigenstrain
protectedinherited
std::string ComputeEigenstrainBase::_eigenstrain_name
protectedinherited

Material property name for the eigenstrain tensor.

Definition at line 33 of file ComputeEigenstrainBase.h.

const MaterialProperty<RankTwoTensor>* ComputeEigenstrainBase::_eigenstrain_old
protectedinherited

Stores the total eigenstrain in the previous step (only for incremental form)

Definition at line 42 of file ComputeEigenstrainBase.h.

const MaterialProperty<RankFourTensor>& ComputeEigenstrainFromInitialStress::_elasticity_tensor
protected

elasticity tensor used to convert stress to strain

Definition at line 28 of file ComputeEigenstrainFromInitialStress.h.

Referenced by computeQpEigenstrain().

bool ComputeEigenstrainBase::_incremental_form
protectedinherited

Whether the eigenstrain model should compute the total or incremental eigenstrain.

Definition at line 36 of file ComputeEigenstrainBase.h.

Referenced by ComputeEigenstrainFromInitialStress(), ComputeReducedOrderEigenstrain::ComputeReducedOrderEigenstrain(), and ComputeEigenstrainBase::initQpStatefulProperties().

std::vector<Function *> ComputeEigenstrainFromInitialStress::_initial_stress_fcn
protected

initial stress components

Definition at line 31 of file ComputeEigenstrainFromInitialStress.h.

Referenced by ComputeEigenstrainFromInitialStress(), and computeQpEigenstrain().

bool& ComputeEigenstrainBase::_step_zero
protectedinherited

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

Definition at line 52 of file ComputeEigenstrainBase.h.

Referenced by ComputeEigenstrainBase::computeQpProperties().


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