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

Construct a global strain from the phase strains in a manner that is consistent with the construction of the global elastic energy by DerivativeMultiPhaseMaterial. More...

#include <MultiPhaseStressMaterial.h>

Inheritance diagram for MultiPhaseStressMaterial:
[legend]

Public Member Functions

 MultiPhaseStressMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

std::vector< MaterialPropertyName > _h_list
 switching function name list More...
 
unsigned int _n_phase
 number of phases handled by this material More...
 
std::vector< const MaterialProperty< Real > * > _h_eta
 switching functions More...
 
std::vector< std::string > _phase_base
 
std::vector< const MaterialProperty< RankTwoTensor > * > _phase_stress
 
std::vector< const MaterialProperty< RankFourTensor > * > _dphase_stress_dstrain
 
std::string _base_name
 
MaterialProperty< RankTwoTensor > & _stress
 
MaterialProperty< RankFourTensor > & _dstress_dstrain
 

Detailed Description

Construct a global strain from the phase strains in a manner that is consistent with the construction of the global elastic energy by DerivativeMultiPhaseMaterial.

Definition at line 24 of file MultiPhaseStressMaterial.h.

Constructor & Destructor Documentation

MultiPhaseStressMaterial::MultiPhaseStressMaterial ( const InputParameters &  parameters)

Definition at line 25 of file MultiPhaseStressMaterial.C.

26  : Material(parameters),
27  _h_list(getParam<std::vector<MaterialPropertyName>>("h")),
28  _n_phase(_h_list.size()),
30  _phase_base(getParam<std::vector<std::string>>("phase_base")),
33  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
34  _stress(declareProperty<RankTwoTensor>(_base_name + "stress")),
35  _dstress_dstrain(declareProperty<RankFourTensor>(_base_name + "Jacobian_mult"))
36 {
37  // verify parameter length
38  if (_n_phase != _phase_base.size())
39  mooseError(
40  "h and phase_base input vectors need to have the same length in MultiPhaseStressMaterial ",
41  name());
42 
43  for (unsigned int i = 0; i < _n_phase; ++i)
44  {
45  _h_eta[i] = &getMaterialProperty<Real>(_h_list[i]);
46  _phase_stress[i] = &getMaterialProperty<RankTwoTensor>(_phase_base[i] + "_stress");
48  &getMaterialProperty<RankFourTensor>(_phase_base[i] + "_Jacobian_mult");
49  }
50 }
std::vector< const MaterialProperty< RankFourTensor > * > _dphase_stress_dstrain
MaterialProperty< RankTwoTensor > & _stress
unsigned int _n_phase
number of phases handled by this material
MaterialProperty< RankFourTensor > & _dstress_dstrain
std::vector< const MaterialProperty< RankTwoTensor > * > _phase_stress
std::vector< std::string > _phase_base
std::vector< const MaterialProperty< Real > * > _h_eta
switching functions
std::vector< MaterialPropertyName > _h_list
switching function name list

Member Function Documentation

void MultiPhaseStressMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 53 of file MultiPhaseStressMaterial.C.

54 {
55  _stress[_qp].zero();
56  _dstress_dstrain[_qp].zero();
57 
58  for (unsigned int i = 0; i < _n_phase; ++i)
59  {
60  _stress[_qp] += (*_h_eta[i])[_qp] * (*_phase_stress[i])[_qp];
61  _dstress_dstrain[_qp] += (*_h_eta[i])[_qp] * (*_dphase_stress_dstrain[i])[_qp];
62  }
63 }
std::vector< const MaterialProperty< RankFourTensor > * > _dphase_stress_dstrain
MaterialProperty< RankTwoTensor > & _stress
unsigned int _n_phase
number of phases handled by this material
MaterialProperty< RankFourTensor > & _dstress_dstrain
std::vector< const MaterialProperty< RankTwoTensor > * > _phase_stress
std::vector< const MaterialProperty< Real > * > _h_eta
switching functions

Member Data Documentation

std::string MultiPhaseStressMaterial::_base_name
protected

Definition at line 47 of file MultiPhaseStressMaterial.h.

std::vector<const MaterialProperty<RankFourTensor> *> MultiPhaseStressMaterial::_dphase_stress_dstrain
protected

Definition at line 44 of file MultiPhaseStressMaterial.h.

Referenced by computeQpProperties(), and MultiPhaseStressMaterial().

MaterialProperty<RankFourTensor>& MultiPhaseStressMaterial::_dstress_dstrain
protected

Definition at line 49 of file MultiPhaseStressMaterial.h.

Referenced by computeQpProperties().

std::vector<const MaterialProperty<Real> *> MultiPhaseStressMaterial::_h_eta
protected

switching functions

Definition at line 39 of file MultiPhaseStressMaterial.h.

Referenced by computeQpProperties(), and MultiPhaseStressMaterial().

std::vector<MaterialPropertyName> MultiPhaseStressMaterial::_h_list
protected

switching function name list

Definition at line 33 of file MultiPhaseStressMaterial.h.

Referenced by MultiPhaseStressMaterial().

unsigned int MultiPhaseStressMaterial::_n_phase
protected

number of phases handled by this material

Definition at line 36 of file MultiPhaseStressMaterial.h.

Referenced by computeQpProperties(), and MultiPhaseStressMaterial().

std::vector<std::string> MultiPhaseStressMaterial::_phase_base
protected

Definition at line 42 of file MultiPhaseStressMaterial.h.

Referenced by MultiPhaseStressMaterial().

std::vector<const MaterialProperty<RankTwoTensor> *> MultiPhaseStressMaterial::_phase_stress
protected

Definition at line 43 of file MultiPhaseStressMaterial.h.

Referenced by computeQpProperties(), and MultiPhaseStressMaterial().

MaterialProperty<RankTwoTensor>& MultiPhaseStressMaterial::_stress
protected

Definition at line 48 of file MultiPhaseStressMaterial.h.

Referenced by computeQpProperties().


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