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

Calculates The Deformation Energy associated with a specific dislocation density. More...

#include <DeformedGrainMaterial.h>

Inheritance diagram for DeformedGrainMaterial:
[legend]

Public Member Functions

 DeformedGrainMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

const unsigned int _op_num
 total number of grains More...
 
std::vector< const VariableValue * > _vals
 order parameter values More...
 
const Real _length_scale
 
const Real _int_width
 
const Real _time_scale
 
const Real _GBMobility
 
const Real _GBE
 the GB Energy More...
 
const Real _Disloc_Den
 the average dislocation density More...
 
const Real _Elas_Mod
 the elastic modulus More...
 
const Real _Burg_vec
 the Length of Burger's Vector More...
 
MaterialProperty< Real > & _kappa
 the same parameters that appear in the original grain growth model More...
 
MaterialProperty< Real > & _gamma
 
MaterialProperty< Real > & _L
 
MaterialProperty< Real > & _mu
 
MaterialProperty< Real > & _beta
 the prefactor needed to calculate the deformation energy from dislocation density More...
 
MaterialProperty< Real > & _Disloc_Den_i
 dislocation density in grain i More...
 
MaterialProperty< Real > & _rho_eff
 the average/effective dislocation density More...
 
MaterialProperty< Real > & _Def_Eng
 the deformation energy More...
 
const unsigned int _deformed_grain_num
 number of deformed grains More...
 
const GrainTrackerInterface_grain_tracker
 Grain tracker object. More...
 
const Real _kb
 
const Real _JtoeV
 

Detailed Description

Calculates The Deformation Energy associated with a specific dislocation density.

The rest of parameters are the same as in the grain growth model

Definition at line 26 of file DeformedGrainMaterial.h.

Constructor & Destructor Documentation

◆ DeformedGrainMaterial()

DeformedGrainMaterial::DeformedGrainMaterial ( const InputParameters &  parameters)

Definition at line 36 of file DeformedGrainMaterial.C.

37  : Material(parameters),
38  _op_num(coupledComponents("v")),
39  _vals(_op_num),
40  _length_scale(getParam<Real>("length_scale")),
41  _int_width(getParam<Real>("int_width")),
42  _time_scale(getParam<Real>("time_scale")),
43  _GBMobility(getParam<Real>("GBMobility")),
44  _GBE(getParam<Real>("GBE")),
45  _Disloc_Den(getParam<Real>("Disloc_Den")),
46  _Elas_Mod(getParam<Real>("Elas_Mod")),
47  _Burg_vec(getParam<Real>("Burg_vec")),
48  _kappa(declareProperty<Real>("kappa_op")),
49  _gamma(declareProperty<Real>("gamma_asymm")),
50  _L(declareProperty<Real>("L")),
51  _mu(declareProperty<Real>("mu")),
52  _beta(declareProperty<Real>("beta")),
53  _Disloc_Den_i(declareProperty<Real>("Disloc_Den_i")),
54  _rho_eff(declareProperty<Real>("rho_eff")),
55  _Def_Eng(declareProperty<Real>("Def_Eng")),
56  _deformed_grain_num(getParam<unsigned int>("deformed_grain_num")),
57  _grain_tracker(getUserObject<GrainTrackerInterface>("grain_tracker")),
58  _kb(8.617343e-5), // Boltzmann constant in eV/K
59  _JtoeV(6.24150974e18) // Joule to eV conversion
60 {
61  if (_op_num == 0)
62  paramError("op_num", "Model requires op_num > 0");
63 
64  for (unsigned int i = 0; i < _op_num; ++i)
65  _vals[i] = &coupledValue("v", i);
66 }
MaterialProperty< Real > & _Def_Eng
the deformation energy
MaterialProperty< Real > & _Disloc_Den_i
dislocation density in grain i
std::vector< const VariableValue * > _vals
order parameter values
const Real _GBE
the GB Energy
const Real _Burg_vec
the Length of Burger&#39;s Vector
MaterialProperty< Real > & _kappa
the same parameters that appear in the original grain growth model
MaterialProperty< Real > & _mu
MaterialProperty< Real > & _rho_eff
the average/effective dislocation density
const unsigned int _deformed_grain_num
number of deformed grains
const unsigned int _op_num
total number of grains
const Real _Elas_Mod
the elastic modulus
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
MaterialProperty< Real > & _gamma
const Real _Disloc_Den
the average dislocation density
MaterialProperty< Real > & _beta
the prefactor needed to calculate the deformation energy from dislocation density ...
MaterialProperty< Real > & _L

Member Function Documentation

◆ computeQpProperties()

void DeformedGrainMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 69 of file DeformedGrainMaterial.C.

70 {
72 
73  Real rho_i;
74  Real rho0 = 0.0;
75  Real SumEtai2 = 0.0;
76  for (unsigned int i = 0; i < _op_num; ++i)
77  SumEtai2 += (*_vals[i])[_qp] * (*_vals[i])[_qp];
78 
79  // calculate effective dislocation density and assign zero dislocation densities to undeformed
80  // grains
81  const auto & op_to_grains = _grain_tracker.getVarToFeatureVector(_current_elem->id());
82 
83  // loop over active OPs
84  bool one_active = false;
85  for (auto op_index = beginIndex(op_to_grains); op_index < op_to_grains.size(); ++op_index)
86  {
87  if (op_to_grains[op_index] == FeatureFloodCount::invalid_id)
88  continue;
89 
90  one_active = true;
91  auto grain_id = op_to_grains[op_index];
92 
93  if (grain_id >= _deformed_grain_num)
94  rho_i = 0.0;
95  else
96  rho_i = _Disloc_Den_i[_qp];
97  rho0 += rho_i * (*_vals[op_index])[_qp] * (*_vals[op_index])[_qp];
98  }
99 
100  if (!one_active && _t_step > 0)
101  mooseError("No active order parameters");
102 
103  _rho_eff[_qp] = rho0 / SumEtai2;
104  if (_rho_eff[_qp] < 1e-9)
105  {
106  _rho_eff[_qp] = 0.0;
107  _Disloc_Den_i[_qp] = 0.0;
108  }
109 
110  _beta[_qp] = 0.5 * _Elas_Mod * _Burg_vec * _Burg_vec * _JtoeV * _length_scale;
111 
112  // Compute the deformation energy
113  _Def_Eng[_qp] = _beta[_qp] * _rho_eff[_qp];
114 
115  const Real sigma = _GBE * _JtoeV * (_length_scale * _length_scale);
116  const Real length_scale4 = _length_scale * _length_scale * _length_scale * _length_scale;
117  const Real M_GB = _GBMobility * _time_scale / (_JtoeV * length_scale4);
118 
119  _L[_qp] = 4.0 / 3.0 * M_GB / _int_width;
120  _kappa[_qp] = 3.0 / 4.0 * sigma * _int_width;
121  _gamma[_qp] = 1.5;
122  _mu[_qp] = 6.0 * sigma / _int_width;
123 }
MaterialProperty< Real > & _Def_Eng
the deformation energy
MaterialProperty< Real > & _Disloc_Den_i
dislocation density in grain i
std::vector< const VariableValue * > _vals
order parameter values
const Real _GBE
the GB Energy
const Real _Burg_vec
the Length of Burger&#39;s Vector
MaterialProperty< Real > & _kappa
the same parameters that appear in the original grain growth model
MaterialProperty< Real > & _mu
MaterialProperty< Real > & _rho_eff
the average/effective dislocation density
const unsigned int _deformed_grain_num
number of deformed grains
virtual const std::vector< unsigned int > & getVarToFeatureVector(dof_id_type elem_id) const =0
Returns a list of active unique feature ids for a particular element.
const unsigned int _op_num
total number of grains
const Real _Elas_Mod
the elastic modulus
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
static const unsigned int invalid_id
MaterialProperty< Real > & _gamma
const Real _Disloc_Den
the average dislocation density
MaterialProperty< Real > & _beta
the prefactor needed to calculate the deformation energy from dislocation density ...
MaterialProperty< Real > & _L

Member Data Documentation

◆ _beta

MaterialProperty<Real>& DeformedGrainMaterial::_beta
protected

the prefactor needed to calculate the deformation energy from dislocation density

Definition at line 64 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _Burg_vec

const Real DeformedGrainMaterial::_Burg_vec
protected

the Length of Burger's Vector

Definition at line 55 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _Def_Eng

MaterialProperty<Real>& DeformedGrainMaterial::_Def_Eng
protected

the deformation energy

Definition at line 73 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _deformed_grain_num

const unsigned int DeformedGrainMaterial::_deformed_grain_num
protected

number of deformed grains

Definition at line 78 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _Disloc_Den

const Real DeformedGrainMaterial::_Disloc_Den
protected

the average dislocation density

Definition at line 49 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _Disloc_Den_i

MaterialProperty<Real>& DeformedGrainMaterial::_Disloc_Den_i
protected

dislocation density in grain i

Definition at line 67 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _Elas_Mod

const Real DeformedGrainMaterial::_Elas_Mod
protected

the elastic modulus

Definition at line 52 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _gamma

MaterialProperty<Real>& DeformedGrainMaterial::_gamma
protected

Definition at line 59 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _GBE

const Real DeformedGrainMaterial::_GBE
protected

the GB Energy

Definition at line 46 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _GBMobility

const Real DeformedGrainMaterial::_GBMobility
protected

Definition at line 43 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _grain_tracker

const GrainTrackerInterface& DeformedGrainMaterial::_grain_tracker
protected

Grain tracker object.

Definition at line 81 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _int_width

const Real DeformedGrainMaterial::_int_width
protected

Definition at line 41 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _JtoeV

const Real DeformedGrainMaterial::_JtoeV
protected

Definition at line 83 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _kappa

MaterialProperty<Real>& DeformedGrainMaterial::_kappa
protected

the same parameters that appear in the original grain growth model

Definition at line 58 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _kb

const Real DeformedGrainMaterial::_kb
protected

Definition at line 82 of file DeformedGrainMaterial.h.

◆ _L

MaterialProperty<Real>& DeformedGrainMaterial::_L
protected

Definition at line 60 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _length_scale

const Real DeformedGrainMaterial::_length_scale
protected

Definition at line 40 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _mu

MaterialProperty<Real>& DeformedGrainMaterial::_mu
protected

Definition at line 61 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _op_num

const unsigned int DeformedGrainMaterial::_op_num
protected

total number of grains

Definition at line 35 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties(), and DeformedGrainMaterial().

◆ _rho_eff

MaterialProperty<Real>& DeformedGrainMaterial::_rho_eff
protected

the average/effective dislocation density

Definition at line 70 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _time_scale

const Real DeformedGrainMaterial::_time_scale
protected

Definition at line 42 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

◆ _vals

std::vector<const VariableValue *> DeformedGrainMaterial::_vals
protected

order parameter values

Definition at line 38 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties(), and DeformedGrainMaterial().


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