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

Phenomenological constitutive model state variable evolution rate component userobject class. More...

#include <CrystalPlasticityStateVarRateComponentVoce.h>

Inheritance diagram for CrystalPlasticityStateVarRateComponentVoce:
[legend]

Public Member Functions

 CrystalPlasticityStateVarRateComponentVoce (const InputParameters &parameters)
 
virtual bool calcStateVariableEvolutionRateComponent (unsigned int qp, std::vector< Real > &val) const
 computing the slip system hardening rate More...
 
virtual unsigned int variableSize () const
 Returns the size of variable. More...
 

Static Public Member Functions

static MooseEnum crystalLatticeTypeOptions ()
 class for switching between different crystal lattice types More...
 

Protected Member Functions

virtual void initSlipSystemPlaneID (std::vector< unsigned int > &_slipSystem_PlaneID) const
 method associating slip system to their group by generating a vector containing the association between slip system number and slip plane number More...
 
virtual void initSlipSystemGroupID (std::vector< unsigned int > &_slipSystem_GroupID) const
 method associating slip system to their slip plane by generating a vector containing the association between slip system number and provided group edges More...
 
virtual Real getHardeningCoefficient (unsigned int slipSystemIndex_i, unsigned int slipSystemIndex_j) const
 method retriving the appropiate self/latent hardening coefficient More...
 

Protected Attributes

const MaterialProperty< std::vector< Real > > & _mat_prop_slip_rate
 
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var
 
MooseEnum _crystal_lattice_type
 the variable to switch crystal lattice type (i.e. FCC or BCC) More...
 
const unsigned int _n_groups
 the number of slip system groups More...
 
std::vector< unsigned int > _slipSystem_PlaneID
 the vector associating a slip system to its slip plane ID More...
 
std::vector< unsigned int > _slipSystem_GroupID
 the vector associating a slip system to its groud ID More...
 
unsigned int _variable_size
 
std::vector< unsigned int > _groups
 the vectors of the input paramters More...
 
std::vector< Real > _h0_group_values
 
std::vector< Real > _tau0_group_values
 
std::vector< Real > _tauSat_group_values
 
std::vector< Real > _hardeningExponent_group_values
 
std::vector< Real > _selfHardening_group_values
 
std::vector< Real > _coplanarHardening_group_values
 
std::vector< Real > _GroupGroup_Hardening_group_values
 

Detailed Description

Phenomenological constitutive model state variable evolution rate component userobject class.

Definition at line 24 of file CrystalPlasticityStateVarRateComponentVoce.h.

Constructor & Destructor Documentation

◆ CrystalPlasticityStateVarRateComponentVoce()

CrystalPlasticityStateVarRateComponentVoce::CrystalPlasticityStateVarRateComponentVoce ( const InputParameters &  parameters)

Definition at line 79 of file CrystalPlasticityStateVarRateComponentVoce.C.

83  getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_slip_rate_name"))),
85  getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_state_var_name"))),
86  _crystal_lattice_type(getParam<MooseEnum>("crystal_lattice_type")),
87  _groups(getParam<std::vector<unsigned int>>("groups")),
88  _h0_group_values(getParam<std::vector<Real>>("h0_group_values")),
89  _tau0_group_values(getParam<std::vector<Real>>("tau0_group_values")),
90  _tauSat_group_values(getParam<std::vector<Real>>("tauSat_group_values")),
91  _hardeningExponent_group_values(getParam<std::vector<Real>>("hardeningExponent_group_values")),
92  _selfHardening_group_values(getParam<std::vector<Real>>("selfHardening_group_values")),
93  _coplanarHardening_group_values(getParam<std::vector<Real>>("coplanarHardening_group_values")),
95  getParam<std::vector<Real>>("GroupGroup_Hardening_group_values")),
96  _n_groups(_groups.size())
97 {
98  // perform input checks
99  if (_n_groups < 2)
100  paramError("groups",
101  "the number of slip system groups provided is not "
102  "correct. At least two values are expected");
103 
104  // check the size of all the user provided parameters
105  if (_h0_group_values.size() != _n_groups - 1)
106  paramError("h0_group_values",
107  "the number of supplied parameters does not"
108  " match the number of ip system groups");
109 
110  if (_tau0_group_values.size() != _n_groups - 1)
111  paramError("tau0_group_values",
112  "the number of supplied parameters does "
113  "not match the number of slip system groups");
114 
115  if (_tauSat_group_values.size() != _n_groups - 1)
116  paramError("tauSat_group_values",
117  "the number of supplied parameters does "
118  "not match the number of slip system groups");
119 
120  if (_hardeningExponent_group_values.size() != _n_groups - 1)
121  paramError("hardeningExponent_group_values",
122  "the number of supplied "
123  "parameters does not match the number of slip system groups");
124 
125  if (_selfHardening_group_values.size() != _n_groups - 1)
126  paramError("selfHardening_group_values",
127  "the number of supplied parameters "
128  "does not match the number of slip system groups");
129 
130  if (_coplanarHardening_group_values.size() != _n_groups - 1)
131  paramError("coplanarHardening_group_values",
132  "the number of supplied "
133  "parameters does not match the number of slip system groups");
134 
135  if (_GroupGroup_Hardening_group_values.size() != (_n_groups - 1) * (_n_groups - 1))
136  paramError("GroupGroup_Hardening_group_values",
137  "the number of supplied "
138  "parameters does not match the number of slip system groups");
139 
140  // initialize useful variables;
143 }
CrystalPlasticityStateVarRateComponent(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var
virtual void initSlipSystemPlaneID(std::vector< unsigned int > &_slipSystem_PlaneID) const
method associating slip system to their group by generating a vector containing the association betwe...
virtual void initSlipSystemGroupID(std::vector< unsigned int > &_slipSystem_GroupID) const
method associating slip system to their slip plane by generating a vector containing the association ...
const unsigned int _n_groups
the number of slip system groups
std::vector< unsigned int > _slipSystem_GroupID
the vector associating a slip system to its groud ID
const MaterialProperty< std::vector< Real > > & _mat_prop_slip_rate
std::vector< unsigned int > _groups
the vectors of the input paramters
MooseEnum _crystal_lattice_type
the variable to switch crystal lattice type (i.e. FCC or BCC)
std::vector< unsigned int > _slipSystem_PlaneID
the vector associating a slip system to its slip plane ID

Member Function Documentation

◆ calcStateVariableEvolutionRateComponent()

bool CrystalPlasticityStateVarRateComponentVoce::calcStateVariableEvolutionRateComponent ( unsigned int  qp,
std::vector< Real > &  val 
) const
virtual

computing the slip system hardening rate

Implements CrystalPlasticityStateVarRateComponent.

Definition at line 146 of file CrystalPlasticityStateVarRateComponentVoce.C.

148 {
149  val.assign(_variable_size, 0.0);
150 
151  unsigned int group_i;
152  Real h0;
153  Real tau_0;
154  Real tau_sat;
155  Real hardening_exponenet;
156  Real delta_tau;
157 
158  DenseVector<Real> hb(_variable_size);
159 
160  for (unsigned int i = 0; i < _variable_size; ++i)
161  {
162  group_i = _slipSystem_GroupID[i];
163  h0 = _h0_group_values[group_i];
164  tau_0 = _tau0_group_values[group_i];
165  tau_sat = _tauSat_group_values[group_i];
166  hardening_exponenet = _hardeningExponent_group_values[group_i];
167 
168  delta_tau = tau_sat - tau_0;
169 
170  hb(i) = h0 *
171  std::pow(std::abs(1.0 - (_mat_prop_state_var[qp][i] - tau_0) / delta_tau),
172  hardening_exponenet) *
173  std::copysign(1.0, 1.0 - (_mat_prop_state_var[qp][i] - tau_0) / delta_tau);
174  }
175 
176  for (unsigned int i = 0; i < _variable_size; ++i)
177  for (unsigned int j = 0; j < _variable_size; ++j)
178  {
179  const Real q_ab = getHardeningCoefficient(i, j);
180  val[i] += std::abs(_mat_prop_slip_rate[qp][j]) * q_ab * hb(j);
181  }
182 
183  return true;
184 }
const MaterialProperty< std::vector< Real > > & _mat_prop_state_var
std::vector< unsigned int > _slipSystem_GroupID
the vector associating a slip system to its groud ID
const MaterialProperty< std::vector< Real > > & _mat_prop_slip_rate
virtual Real getHardeningCoefficient(unsigned int slipSystemIndex_i, unsigned int slipSystemIndex_j) const
method retriving the appropiate self/latent hardening coefficient
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ crystalLatticeTypeOptions()

MooseEnum CrystalPlasticityStateVarRateComponentVoce::crystalLatticeTypeOptions ( )
static

class for switching between different crystal lattice types

Definition at line 187 of file CrystalPlasticityStateVarRateComponentVoce.C.

Referenced by validParams< CrystalPlasticityStateVarRateComponentVoce >().

188 {
189  return MooseEnum("FCC BCC", "FCC");
190 }

◆ getHardeningCoefficient()

Real CrystalPlasticityStateVarRateComponentVoce::getHardeningCoefficient ( unsigned int  slipSystemIndex_i,
unsigned int  slipSystemIndex_j 
) const
protectedvirtual

method retriving the appropiate self/latent hardening coefficient

Definition at line 242 of file CrystalPlasticityStateVarRateComponentVoce.C.

Referenced by calcStateVariableEvolutionRateComponent().

244 {
245  // collect slip system plane and group
246  const unsigned int group_i = _slipSystem_GroupID[slipSystemIndex_i];
247  const unsigned int group_j = _slipSystem_GroupID[slipSystemIndex_j];
248  const unsigned int plane_i = _slipSystem_PlaneID[slipSystemIndex_i];
249  const unsigned int plane_j = _slipSystem_PlaneID[slipSystemIndex_j];
250 
251  // create check for clarity
252  const bool same_slipSystem = slipSystemIndex_i == slipSystemIndex_j;
253  const bool same_group = group_i == group_j;
254  const bool same_plane = plane_i == plane_j;
255 
256  // retrieve appropriate coefficient
257  Real q_ab;
258  if (same_slipSystem)
259  q_ab = _selfHardening_group_values[group_i];
260  else if (same_plane)
261  q_ab = _coplanarHardening_group_values[group_i];
262  else if (same_group) // here for debugging purposes this if could be removed
263  q_ab = _GroupGroup_Hardening_group_values[group_i * (_n_groups - 1) + group_i];
264  else if (!same_group)
265  q_ab = _GroupGroup_Hardening_group_values[group_i * (_n_groups - 1) + group_j];
266  else // here for debugging purposes
267  mooseError("VoceHardeningError:getHardeningCoefficient: case not listed, abort ");
268 
269  return q_ab;
270 }
const unsigned int _n_groups
the number of slip system groups
std::vector< unsigned int > _slipSystem_GroupID
the vector associating a slip system to its groud ID
std::vector< unsigned int > _slipSystem_PlaneID
the vector associating a slip system to its slip plane ID

◆ initSlipSystemGroupID()

void CrystalPlasticityStateVarRateComponentVoce::initSlipSystemGroupID ( std::vector< unsigned int > &  _slipSystem_GroupID) const
protectedvirtual

method associating slip system to their slip plane by generating a vector containing the association between slip system number and provided group edges

Definition at line 227 of file CrystalPlasticityStateVarRateComponentVoce.C.

Referenced by CrystalPlasticityStateVarRateComponentVoce().

229 {
231 
232  for (unsigned int slipSystemIndex = 0; slipSystemIndex < _variable_size; ++slipSystemIndex)
233  for (unsigned int i = 0; i < _n_groups - 1; ++i)
234  if (slipSystemIndex >= _groups[i] && slipSystemIndex < _groups[i + 1])
235  {
236  _slipSystem_GroupID[slipSystemIndex] = i;
237  break;
238  }
239 }
const unsigned int _n_groups
the number of slip system groups
std::vector< unsigned int > _slipSystem_GroupID
the vector associating a slip system to its groud ID
std::vector< unsigned int > _groups
the vectors of the input paramters

◆ initSlipSystemPlaneID()

void CrystalPlasticityStateVarRateComponentVoce::initSlipSystemPlaneID ( std::vector< unsigned int > &  _slipSystem_PlaneID) const
protectedvirtual

method associating slip system to their group by generating a vector containing the association between slip system number and slip plane number

Definition at line 193 of file CrystalPlasticityStateVarRateComponentVoce.C.

Referenced by CrystalPlasticityStateVarRateComponentVoce().

195 {
197 
198  for (unsigned int slipSystemIndex = 0; slipSystemIndex < _variable_size; ++slipSystemIndex)
199  switch (_crystal_lattice_type)
200  {
201  case 0: // FCC
202  if (slipSystemIndex < 12)
203  _slipSystem_PlaneID[slipSystemIndex] = slipSystemIndex / 3;
204  else
205  mooseError("FCC with more than 12 slip planes is not implemented ");
206 
207  break;
208 
209  case 1: // BCC
210  if (slipSystemIndex < 12)
211  _slipSystem_PlaneID[slipSystemIndex] = slipSystemIndex / 2;
212 
213  else if (slipSystemIndex >= 12 && slipSystemIndex < 48)
214  _slipSystem_PlaneID[slipSystemIndex] = (slipSystemIndex - 6);
215 
216  else
217  mooseError("BCC with more than 48 slip systems is not implemented ");
218 
219  break;
220 
221  default:
222  mooseError("VoceHardeningError: Pass valid crustal_structure_type ");
223  }
224 }
MooseEnum _crystal_lattice_type
the variable to switch crystal lattice type (i.e. FCC or BCC)
std::vector< unsigned int > _slipSystem_PlaneID
the vector associating a slip system to its slip plane ID

◆ variableSize()

unsigned int CrystalPlasticityUOBase::variableSize ( ) const
virtualinherited

Returns the size of variable.

Definition at line 29 of file CrystalPlasticityUOBase.C.

30 {
31  return _variable_size;
32 }

Member Data Documentation

◆ _coplanarHardening_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_coplanarHardening_group_values
protected

◆ _crystal_lattice_type

MooseEnum CrystalPlasticityStateVarRateComponentVoce::_crystal_lattice_type
protected

the variable to switch crystal lattice type (i.e. FCC or BCC)

Definition at line 41 of file CrystalPlasticityStateVarRateComponentVoce.h.

Referenced by initSlipSystemPlaneID().

◆ _GroupGroup_Hardening_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_GroupGroup_Hardening_group_values
protected

◆ _groups

std::vector<unsigned int> CrystalPlasticityStateVarRateComponentVoce::_groups
protected

the vectors of the input paramters

Definition at line 44 of file CrystalPlasticityStateVarRateComponentVoce.h.

Referenced by initSlipSystemGroupID().

◆ _h0_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_h0_group_values
protected

◆ _hardeningExponent_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_hardeningExponent_group_values
protected

◆ _mat_prop_slip_rate

const MaterialProperty<std::vector<Real> >& CrystalPlasticityStateVarRateComponentVoce::_mat_prop_slip_rate
protected

◆ _mat_prop_state_var

const MaterialProperty<std::vector<Real> >& CrystalPlasticityStateVarRateComponentVoce::_mat_prop_state_var
protected

◆ _n_groups

const unsigned int CrystalPlasticityStateVarRateComponentVoce::_n_groups
protected

◆ _selfHardening_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_selfHardening_group_values
protected

◆ _slipSystem_GroupID

std::vector<unsigned int> CrystalPlasticityStateVarRateComponentVoce::_slipSystem_GroupID
protected

◆ _slipSystem_PlaneID

std::vector<unsigned int> CrystalPlasticityStateVarRateComponentVoce::_slipSystem_PlaneID
protected

the vector associating a slip system to its slip plane ID

Definition at line 58 of file CrystalPlasticityStateVarRateComponentVoce.h.

Referenced by CrystalPlasticityStateVarRateComponentVoce(), getHardeningCoefficient(), and initSlipSystemPlaneID().

◆ _tau0_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_tau0_group_values
protected

◆ _tauSat_group_values

std::vector<Real> CrystalPlasticityStateVarRateComponentVoce::_tauSat_group_values
protected

◆ _variable_size

unsigned int CrystalPlasticityUOBase::_variable_size
protectedinherited

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