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 12 of file ElasticModel.h.

Constructor & Destructor Documentation

ElasticModel::ElasticModel ( const InputParameters &  parameters)

Definition at line 19 of file ElasticModel.C.

19 : ConstitutiveModel(parameters) {}
ConstitutiveModel(const InputParameters &parameters)
ElasticModel::~ElasticModel ( )
virtual

Definition at line 23 of file ElasticModel.C.

23 {}

Member Function Documentation

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

Definition at line 103 of file ConstitutiveModel.C.

Referenced by ConstitutiveModel::modifyStrainIncrement(), and ConstitutiveModel::updateElasticityTensor().

104 {
105  if (_t_step >= 1)
106  _step_zero_cm = false;
107 
108  if (_t_step >= 2)
109  _step_one_cm = false;
110 
111  if (_has_temp && !_step_zero_cm)
112  {
113  Real inc_thermal_strain;
114  Real d_thermal_strain_d_temp;
115 
116  Real old_temp;
118  old_temp = _stress_free_temp;
119  else
120  old_temp = _temperature_old[_qp];
121 
122  Real current_temp = _temperature[_qp];
123 
124  Real delta_t = current_temp - old_temp;
125 
126  Real alpha = _alpha;
127 
128  if (_alpha_function)
129  {
130  Point p;
131  Real alpha_current_temp = _alpha_function->value(current_temp, p);
132  Real alpha_old_temp = _alpha_function->value(old_temp, p);
133  Real alpha_stress_free_temperature = _alpha_function->value(_stress_free_temp, p);
134 
136  {
137  Real small(1e-6);
138 
139  Real numerator = alpha_current_temp * (current_temp - _ref_temp) -
140  alpha_old_temp * (old_temp - _ref_temp);
141  Real denominator = 1.0 + alpha_stress_free_temperature * (_stress_free_temp - _ref_temp);
142  if (denominator < small)
143  mooseError("Denominator too small in thermal strain calculation");
144  inc_thermal_strain = numerator / denominator;
145  d_thermal_strain_d_temp = alpha_current_temp * (current_temp - _ref_temp);
146  }
147  else
148  {
149  inc_thermal_strain = delta_t * 0.5 * (alpha_current_temp + alpha_old_temp);
150  d_thermal_strain_d_temp = alpha_current_temp;
151  }
152  }
153  else
154  {
155  inc_thermal_strain = delta_t * alpha;
156  d_thermal_strain_d_temp = alpha;
157  }
158 
159  strain_increment.addDiag(-inc_thermal_strain);
160  d_strain_dT.addDiag(-d_thermal_strain_d_temp);
161  }
162 
163  bool modified = true;
164  return modified;
165 }
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:279
const VariableValue & _temperature_old
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 28 of file ElasticModel.C.

33 {
34  stress_new = elasticity_tensor * strain_increment;
35  stress_new += stress_old;
36 }
virtual bool ConstitutiveModel::modifyStrainIncrement ( const Elem &  ,
SymmTensor strain_increment,
SymmTensor d_strain_dT 
)
inlinevirtualinherited

Reimplemented in CombinedCreepPlasticity.

Definition at line 34 of file ConstitutiveModel.h.

37  {
38  return applyThermalStrain(strain_increment, d_strain_dT);
39  }
virtual bool applyThermalStrain(SymmTensor &strain_increment, SymmTensor &d_strain_dT)
void ConstitutiveModel::setQp ( unsigned int  qp)
inherited

Sets the value of the variable _qp for inheriting classes.

Definition at line 86 of file ConstitutiveModel.C.

Referenced by CombinedCreepPlasticity::computeStress(), and ConstitutiveModel::~ConstitutiveModel().

87 {
88  _qp = qp;
89 }
virtual bool ConstitutiveModel::updateElasticityTensor ( SymmElasticityTensor )
inlinevirtualinherited

Definition at line 40 of file ConstitutiveModel.h.

40 { return false; }

Member Data Documentation

const Real ConstitutiveModel::_alpha
protectedinherited

Definition at line 48 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

Function* ConstitutiveModel::_alpha_function
protectedinherited
bool ConstitutiveModel::_has_stress_free_temp
protectedinherited

Definition at line 50 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

const bool ConstitutiveModel::_has_temp
protectedinherited
bool ConstitutiveModel::_mean_alpha_function
protectedinherited
Real ConstitutiveModel::_ref_temp
protectedinherited
bool& ConstitutiveModel::_step_one_cm
protectedinherited

Definition at line 57 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

bool& ConstitutiveModel::_step_zero_cm
protectedinherited

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

Definition at line 56 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

Real ConstitutiveModel::_stress_free_temp
protectedinherited

Definition at line 51 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().

const VariableValue& ConstitutiveModel::_temperature
protectedinherited
const VariableValue& ConstitutiveModel::_temperature_old
protectedinherited

Definition at line 47 of file ConstitutiveModel.h.

Referenced by ConstitutiveModel::applyThermalStrain().


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