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 23 of file DeformedGrainMaterial.h.

Constructor & Destructor Documentation

DeformedGrainMaterial::DeformedGrainMaterial ( const InputParameters &  parameters)

Definition at line 26 of file DeformedGrainMaterial.C.

27  : Material(parameters),
28  _op_num(coupledComponents("v")),
29  _vals(_op_num),
30  _length_scale(getParam<Real>("length_scale")),
31  _int_width(getParam<Real>("int_width")),
32  _time_scale(getParam<Real>("time_scale")),
33  _GBMobility(getParam<Real>("GBMobility")),
34  _GBE(getParam<Real>("GBE")),
35  _Disloc_Den(getParam<Real>("Disloc_Den")),
36  _Elas_Mod(getParam<Real>("Elas_Mod")),
37  _Burg_vec(getParam<Real>("Burg_vec")),
38  _kappa(declareProperty<Real>("kappa_op")),
39  _gamma(declareProperty<Real>("gamma_asymm")),
40  _L(declareProperty<Real>("L")),
41  _mu(declareProperty<Real>("mu")),
42  _beta(declareProperty<Real>("beta")),
43  _Disloc_Den_i(declareProperty<Real>("Disloc_Den_i")),
44  _rho_eff(declareProperty<Real>("rho_eff")),
45  _Def_Eng(declareProperty<Real>("Def_Eng")),
46  _deformed_grain_num(getParam<unsigned int>("deformed_grain_num")),
47  _grain_tracker(getUserObject<GrainTrackerInterface>("grain_tracker")),
48  _kb(8.617343e-5), // Boltzmann constant in eV/K
49  _JtoeV(6.24150974e18) // Joule to eV conversion
50 {
51  if (_op_num == 0)
52  mooseError("Model requires op_num > 0");
53 
54  for (unsigned int i = 0; i < _op_num; ++i)
55  _vals[i] = &coupledValue("v", i);
56 }
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

void DeformedGrainMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 59 of file DeformedGrainMaterial.C.

60 {
62 
63  Real rho_i;
64  Real rho0 = 0.0;
65  Real SumEtai2 = 0.0;
66  for (unsigned int i = 0; i < _op_num; ++i)
67  SumEtai2 += (*_vals[i])[_qp] * (*_vals[i])[_qp];
68 
69  // calculate effective dislocation density and assign zero dislocation densities to undeformed
70  // grains
71  const auto & op_to_grains = _grain_tracker.getVarToFeatureVector(_current_elem->id());
72 
73  // loop over active OPs
74  bool one_active = false;
75  for (auto op_index = beginIndex(op_to_grains); op_index < op_to_grains.size(); ++op_index)
76  {
77  if (op_to_grains[op_index] == FeatureFloodCount::invalid_id)
78  continue;
79 
80  one_active = true;
81  auto grain_id = op_to_grains[op_index];
82 
83  if (grain_id >= _deformed_grain_num)
84  rho_i = 0.0;
85  else
86  rho_i = _Disloc_Den_i[_qp];
87  rho0 += rho_i * (*_vals[op_index])[_qp] * (*_vals[op_index])[_qp];
88  }
89 
90  if (!one_active && _t_step > 0)
91  mooseError("No active order parameters");
92 
93  _rho_eff[_qp] = rho0 / SumEtai2;
94  if (_rho_eff[_qp] < 1e-9)
95  {
96  _rho_eff[_qp] = 0.0;
97  _Disloc_Den_i[_qp] = 0.0;
98  }
99 
100  _beta[_qp] = 0.5 * _Elas_Mod * _Burg_vec * _Burg_vec * _JtoeV * _length_scale;
101 
102  // Compute the deformation energy
103  _Def_Eng[_qp] = _beta[_qp] * _rho_eff[_qp];
104 
105  const Real sigma = _GBE * _JtoeV * (_length_scale * _length_scale);
106  const Real length_scale4 = _length_scale * _length_scale * _length_scale * _length_scale;
107  const Real M_GB = _GBMobility * _time_scale / (_JtoeV * length_scale4);
108 
109  _L[_qp] = 4.0 / 3.0 * M_GB / _int_width;
110  _kappa[_qp] = 3.0 / 4.0 * sigma * _int_width;
111  _gamma[_qp] = 1.5;
112  _mu[_qp] = 6.0 * sigma / _int_width;
113 }
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
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 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

MaterialProperty<Real>& DeformedGrainMaterial::_beta
protected

the prefactor needed to calculate the deformation energy from dislocation density

Definition at line 61 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_Burg_vec
protected

the Length of Burger's Vector

Definition at line 52 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& DeformedGrainMaterial::_Def_Eng
protected

the deformation energy

Definition at line 70 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const unsigned int DeformedGrainMaterial::_deformed_grain_num
protected

number of deformed grains

Definition at line 75 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_Disloc_Den
protected

the average dislocation density

Definition at line 46 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& DeformedGrainMaterial::_Disloc_Den_i
protected

dislocation density in grain i

Definition at line 64 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_Elas_Mod
protected

the elastic modulus

Definition at line 49 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& DeformedGrainMaterial::_gamma
protected

Definition at line 56 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_GBE
protected

the GB Energy

Definition at line 43 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_GBMobility
protected

Definition at line 40 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const GrainTrackerInterface& DeformedGrainMaterial::_grain_tracker
protected

Grain tracker object.

Definition at line 78 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_int_width
protected

Definition at line 38 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_JtoeV
protected

Definition at line 80 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& DeformedGrainMaterial::_kappa
protected

the same parameters that appear in the original grain growth model

Definition at line 55 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_kb
protected

Definition at line 79 of file DeformedGrainMaterial.h.

MaterialProperty<Real>& DeformedGrainMaterial::_L
protected

Definition at line 57 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_length_scale
protected

Definition at line 37 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& DeformedGrainMaterial::_mu
protected

Definition at line 58 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const unsigned int DeformedGrainMaterial::_op_num
protected

total number of grains

Definition at line 32 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties(), and DeformedGrainMaterial().

MaterialProperty<Real>& DeformedGrainMaterial::_rho_eff
protected

the average/effective dislocation density

Definition at line 67 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

const Real DeformedGrainMaterial::_time_scale
protected

Definition at line 39 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties().

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

order parameter values

Definition at line 35 of file DeformedGrainMaterial.h.

Referenced by computeQpProperties(), and DeformedGrainMaterial().


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