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

#include <ElasticModel.h>

Inheritance diagram for ElasticModel:
[legend]

Public Member Functions

 ElasticModel (const InputParameters &parameters)
 
virtual ~ElasticModel ()
 
void setQp (unsigned int qp)
 Sets the value of the variable _qp for inheriting classes. More...
 
virtual bool modifyStrainIncrement (const Elem &, SymmTensor &strain_increment, SymmTensor &d_strain_dT)
 
virtual bool updateElasticityTensor (SymmElasticityTensor &)
 
virtual bool applyThermalStrain (SymmTensor &strain_increment, SymmTensor &d_strain_dT)
 

Protected Member Functions

virtual void computeStress (const Elem &current_elem, const SymmElasticityTensor &elasticity_tensor, const SymmTensor &stress_old, SymmTensor &strain_increment, SymmTensor &stress_new)
 Compute the stress (sigma += deltaSigma) More...
 

Protected Attributes

const bool _has_temp
 
const VariableValue & _temperature
 
const VariableValue & _temperature_old
 
const Real _alpha
 
Function * _alpha_function
 
bool _has_stress_free_temp
 
Real _stress_free_temp
 
bool _mean_alpha_function
 
Real _ref_temp
 
bool & _step_zero_cm
 Restartable data to check for the zeroth and first time steps. More...
 
bool & _step_one_cm
 

Detailed Description

Definition at line 20 of file ElasticModel.h.

Constructor & Destructor Documentation

◆ ElasticModel()

ElasticModel::ElasticModel ( const InputParameters &  parameters)

Definition at line 56 of file ElasticModel.C.

56 : ConstitutiveModel(parameters) {}
ConstitutiveModel(const InputParameters &parameters)

◆ ~ElasticModel()

ElasticModel::~ElasticModel ( )
virtual

Definition at line 60 of file ElasticModel.C.

60 {}

Member Function Documentation

◆ applyThermalStrain()

bool ConstitutiveModel::applyThermalStrain ( SymmTensor strain_increment,
SymmTensor d_strain_dT 
)
virtualinherited

Definition at line 106 of file ConstitutiveModel.C.

Referenced by ConstitutiveModel::modifyStrainIncrement().

107 {
108  if (_t_step >= 1)
109  _step_zero_cm = false;
110 
111  if (_t_step >= 2)
112  _step_one_cm = false;
113 
114  if (_has_temp && !_step_zero_cm)
115  {
116  Real inc_thermal_strain;
117  Real d_thermal_strain_d_temp;
118 
119  Real old_temp;
121  old_temp = _stress_free_temp;
122  else
123  old_temp = _temperature_old[_qp];
124 
125  Real current_temp = _temperature[_qp];
126 
127  Real delta_t = current_temp - old_temp;
128 
129  Real alpha = _alpha;
130 
131  if (_alpha_function)
132  {
133  Point p;
134  Real alpha_current_temp = _alpha_function->value(current_temp, p);
135  Real alpha_old_temp = _alpha_function->value(old_temp, p);
136  Real alpha_stress_free_temperature = _alpha_function->value(_stress_free_temp, p);
137 
139  {
140  Real small(1e-6);
141 
142  Real numerator = alpha_current_temp * (current_temp - _ref_temp) -
143  alpha_old_temp * (old_temp - _ref_temp);
144  Real denominator = 1.0 + alpha_stress_free_temperature * (_stress_free_temp - _ref_temp);
145  if (denominator < small)
146  mooseError("Denominator too small in thermal strain calculation");
147  inc_thermal_strain = numerator / denominator;
148  d_thermal_strain_d_temp = alpha_current_temp * (current_temp - _ref_temp);
149  }
150  else
151  {
152  inc_thermal_strain = delta_t * 0.5 * (alpha_current_temp + alpha_old_temp);
153  d_thermal_strain_d_temp = alpha_current_temp;
154  }
155  }
156  else
157  {
158  inc_thermal_strain = delta_t * alpha;
159  d_thermal_strain_d_temp = alpha;
160  }
161 
162  strain_increment.addDiag(-inc_thermal_strain);
163  d_strain_dT.addDiag(-d_thermal_strain_d_temp);
164  }
165 
166  bool modified = true;
167  return modified;
168 }
const VariableValue & _temperature
Function * _alpha_function
bool & _step_zero_cm
Restartable data to check for the zeroth and first time steps.
void addDiag(Real value)
Definition: SymmTensor.h:282
const VariableValue & _temperature_old

◆ computeStress()

void ElasticModel::computeStress ( const Elem &  current_elem,
const SymmElasticityTensor elasticity_tensor,
const SymmTensor stress_old,
SymmTensor strain_increment,
SymmTensor stress_new 
)
protectedvirtual

Compute the stress (sigma += deltaSigma)

Reimplemented from ConstitutiveModel.

Definition at line 65 of file ElasticModel.C.

70 {
71  stress_new = elasticity_tensor * strain_increment;
72  stress_new += stress_old;
73 }

◆ modifyStrainIncrement()

virtual bool ConstitutiveModel::modifyStrainIncrement ( const Elem &  ,
SymmTensor strain_increment,
SymmTensor d_strain_dT 
)
inlinevirtualinherited

Reimplemented in CombinedCreepPlasticity.

Definition at line 39 of file ConstitutiveModel.h.

42  {
43  return applyThermalStrain(strain_increment, d_strain_dT);
44  }
virtual bool applyThermalStrain(SymmTensor &strain_increment, SymmTensor &d_strain_dT)

◆ setQp()

void ConstitutiveModel::setQp ( unsigned int  qp)
inherited

Sets the value of the variable _qp for inheriting classes.

Definition at line 89 of file ConstitutiveModel.C.

Referenced by CombinedCreepPlasticity::computeStress().

90 {
91  _qp = qp;
92 }

◆ updateElasticityTensor()

virtual bool ConstitutiveModel::updateElasticityTensor ( SymmElasticityTensor )
inlinevirtualinherited

Definition at line 45 of file ConstitutiveModel.h.

45 { return false; }

Member Data Documentation

◆ _alpha

const Real ConstitutiveModel::_alpha
protectedinherited

Definition at line 53 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

◆ _alpha_function

Function* ConstitutiveModel::_alpha_function
protectedinherited

◆ _has_stress_free_temp

bool ConstitutiveModel::_has_stress_free_temp
protectedinherited

Definition at line 55 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

◆ _has_temp

const bool ConstitutiveModel::_has_temp
protectedinherited

◆ _mean_alpha_function

bool ConstitutiveModel::_mean_alpha_function
protectedinherited

◆ _ref_temp

Real ConstitutiveModel::_ref_temp
protectedinherited

◆ _step_one_cm

bool& ConstitutiveModel::_step_one_cm
protectedinherited

Definition at line 62 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

◆ _step_zero_cm

bool& ConstitutiveModel::_step_zero_cm
protectedinherited

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

Definition at line 61 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

◆ _stress_free_temp

Real ConstitutiveModel::_stress_free_temp
protectedinherited

Definition at line 56 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

◆ _temperature

const VariableValue& ConstitutiveModel::_temperature
protectedinherited

◆ _temperature_old

const VariableValue& ConstitutiveModel::_temperature_old
protectedinherited

Definition at line 52 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().


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