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

StrainEnergyDensity calculates the strain energy density. More...

#include <StrainEnergyDensity.h>

Inheritance diagram for StrainEnergyDensity:
[legend]

Public Member Functions

 StrainEnergyDensity (const InputParameters &parameters)
 
virtual void initQpStatefulProperties () override
 
virtual void initialSetup () override
 
virtual void computeQpProperties () override
 

Protected Attributes

std::string _base_name
 
bool _incremental
 Whether the material model is a total or incremental model. More...
 
MaterialProperty< Real > & _strain_energy_density
 The strain energy density material property. More...
 
const MaterialProperty< Real > & _strain_energy_density_old
 
const MaterialProperty< RankTwoTensor > & _stress
 Current and old values of stress. More...
 
const MaterialProperty< RankTwoTensor > & _stress_old
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain
 Current value of mechanical strain which includes elastic and inelastic components of the strain. More...
 
const MaterialProperty< RankTwoTensor > * _strain_increment
 Current value of the strain increment for incremental models. More...
 

Detailed Description

StrainEnergyDensity calculates the strain energy density.

Definition at line 26 of file StrainEnergyDensity.h.

Constructor & Destructor Documentation

◆ StrainEnergyDensity()

StrainEnergyDensity::StrainEnergyDensity ( const InputParameters &  parameters)

Definition at line 33 of file StrainEnergyDensity.C.

34  : DerivativeMaterialInterface<Material>(parameters),
35  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
36  _incremental(getParam<bool>("incremental")),
37  _strain_energy_density(declareProperty<Real>(_base_name + "strain_energy_density")),
38  _strain_energy_density_old(getMaterialPropertyOld<Real>(_base_name + "strain_energy_density")),
39  _stress(getMaterialProperty<RankTwoTensor>(_base_name + "stress")),
40  _stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "stress")),
41  _mechanical_strain(getMaterialProperty<RankTwoTensor>(_base_name + "mechanical_strain")),
43  _incremental ? &getMaterialProperty<RankTwoTensor>(_base_name + "strain_increment") : NULL)
44 {
45 }
const MaterialProperty< RankTwoTensor > & _stress_old
const MaterialProperty< RankTwoTensor > & _stress
Current and old values of stress.
bool _incremental
Whether the material model is a total or incremental model.
MaterialProperty< Real > & _strain_energy_density
The strain energy density material property.
const MaterialProperty< Real > & _strain_energy_density_old
const MaterialProperty< RankTwoTensor > & _mechanical_strain
Current value of mechanical strain which includes elastic and inelastic components of the strain...
const MaterialProperty< RankTwoTensor > * _strain_increment
Current value of the strain increment for incremental models.

Member Function Documentation

◆ computeQpProperties()

void StrainEnergyDensity::computeQpProperties ( )
overridevirtual

Definition at line 62 of file StrainEnergyDensity.C.

63 {
64 
65  if (_strain_increment != nullptr)
68  _stress[_qp].doubleContraction((*_strain_increment)[_qp]) / 2.0 +
69  _stress_old[_qp].doubleContraction((*_strain_increment)[_qp]) / 2.0;
70  else
71  _strain_energy_density[_qp] = _stress[_qp].doubleContraction((_mechanical_strain)[_qp]) / 2.0;
72 }
const MaterialProperty< RankTwoTensor > & _stress_old
const MaterialProperty< RankTwoTensor > & _stress
Current and old values of stress.
MaterialProperty< Real > & _strain_energy_density
The strain energy density material property.
const MaterialProperty< Real > & _strain_energy_density_old
const MaterialProperty< RankTwoTensor > & _mechanical_strain
Current value of mechanical strain which includes elastic and inelastic components of the strain...
const MaterialProperty< RankTwoTensor > * _strain_increment
Current value of the strain increment for incremental models.

◆ initialSetup()

void StrainEnergyDensity::initialSetup ( )
overridevirtual

Definition at line 48 of file StrainEnergyDensity.C.

49 {
50  if (!_incremental && hasMaterialProperty<RankTwoTensor>(_base_name + "strain_increment"))
51  mooseError("StrainEnergyDensity: Specified incremental = false, but material model is "
52  "incremental.");
53 }
bool _incremental
Whether the material model is a total or incremental model.

◆ initQpStatefulProperties()

void StrainEnergyDensity::initQpStatefulProperties ( )
overridevirtual

Definition at line 56 of file StrainEnergyDensity.C.

57 {
58  _strain_energy_density[_qp] = 0.0;
59 }
MaterialProperty< Real > & _strain_energy_density
The strain energy density material property.

Member Data Documentation

◆ _base_name

std::string StrainEnergyDensity::_base_name
protected

Definition at line 36 of file StrainEnergyDensity.h.

Referenced by initialSetup().

◆ _incremental

bool StrainEnergyDensity::_incremental
protected

Whether the material model is a total or incremental model.

Definition at line 39 of file StrainEnergyDensity.h.

Referenced by initialSetup().

◆ _mechanical_strain

const MaterialProperty<RankTwoTensor>& StrainEnergyDensity::_mechanical_strain
protected

Current value of mechanical strain which includes elastic and inelastic components of the strain.

Definition at line 51 of file StrainEnergyDensity.h.

Referenced by computeQpProperties().

◆ _strain_energy_density

MaterialProperty<Real>& StrainEnergyDensity::_strain_energy_density
protected

The strain energy density material property.

Definition at line 42 of file StrainEnergyDensity.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

◆ _strain_energy_density_old

const MaterialProperty<Real>& StrainEnergyDensity::_strain_energy_density_old
protected

Definition at line 43 of file StrainEnergyDensity.h.

Referenced by computeQpProperties().

◆ _strain_increment

const MaterialProperty<RankTwoTensor>* StrainEnergyDensity::_strain_increment
protected

Current value of the strain increment for incremental models.

Definition at line 54 of file StrainEnergyDensity.h.

Referenced by computeQpProperties().

◆ _stress

const MaterialProperty<RankTwoTensor>& StrainEnergyDensity::_stress
protected

Current and old values of stress.

Definition at line 46 of file StrainEnergyDensity.h.

Referenced by computeQpProperties().

◆ _stress_old

const MaterialProperty<RankTwoTensor>& StrainEnergyDensity::_stress_old
protected

Definition at line 47 of file StrainEnergyDensity.h.

Referenced by computeQpProperties().


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