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

#include <ACSEDGPoly.h>

Inheritance diagram for ACSEDGPoly:
[legend]

Public Member Functions

 ACSEDGPoly (const InputParameters &parameters)
 
virtual void initialSetup ()
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

virtual Real computeDFDOP (PFFunctionType type)
 
virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Protected Attributes

const unsigned int _op_num
 
std::vector< const VariableValue * > _vals
 
std::vector< unsigned int > _vals_var
 
const MaterialProperty< Real > & _beta
 the prefactor needed to calculate the deformation energy from dislocation density More...
 
const MaterialProperty< Real > & _rho_eff
 the average/effective dislocation density More...
 
const MaterialProperty< Real > & _Disloc_Den_i
 dislocation density in grain i More...
 
unsigned int _deformed_grain_num
 number of deformed grains More...
 
const GrainTrackerInterface_grain_tracker
 Grain tracker object. More...
 
unsigned int _op_index
 index of the OP the kernel is currently acting on More...
 
const MaterialProperty< Real > & _L
 Mobility. More...
 
const MaterialProperty< Real > & _dLdop
 Mobility derivative w.r.t. order parameter. More...
 
std::vector< const MaterialProperty< Real > * > _dLdarg
 Mobility derivative w.r.t coupled variables. More...
 

Detailed Description

Definition at line 27 of file ACSEDGPoly.h.

Member Enumeration Documentation

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 35 of file ACBulk.h.

Constructor & Destructor Documentation

ACSEDGPoly::ACSEDGPoly ( const InputParameters &  parameters)

Definition at line 25 of file ACSEDGPoly.C.

26  : ACBulk<Real>(parameters),
27  _op_num(coupledComponents("v")),
28  _vals(_op_num),
30  _beta(getMaterialProperty<Real>("beta")),
31  _rho_eff(getMaterialProperty<Real>("rho_eff")),
32  _Disloc_Den_i(getMaterialProperty<Real>("Disloc_Den_i")),
33  _deformed_grain_num(getParam<unsigned int>("deformed_grain_num")),
34  _grain_tracker(getUserObject<GrainTrackerInterface>("grain_tracker")),
35  _op_index(getParam<unsigned int>("op_index"))
36 {
37  // Loop through grains and load coupled variables into the arrays
38  for (unsigned int i = 0; i < _op_num; ++i)
39  {
40  _vals[i] = &coupledValue("v", i);
41  _vals_var[i] = coupled("v", i);
42  }
43 }
const unsigned int _op_num
Definition: ACSEDGPoly.h:35
std::vector< unsigned int > _vals_var
Definition: ACSEDGPoly.h:38
unsigned int _deformed_grain_num
number of deformed grains
Definition: ACSEDGPoly.h:50
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
Definition: ACSEDGPoly.h:53
const MaterialProperty< Real > & _rho_eff
the average/effective dislocation density
Definition: ACSEDGPoly.h:44
const MaterialProperty< Real > & _beta
the prefactor needed to calculate the deformation energy from dislocation density ...
Definition: ACSEDGPoly.h:41
unsigned int _op_index
index of the OP the kernel is currently acting on
Definition: ACSEDGPoly.h:56
const MaterialProperty< Real > & _Disloc_Den_i
dislocation density in grain i
Definition: ACSEDGPoly.h:47
std::vector< const VariableValue * > _vals
Definition: ACSEDGPoly.h:37

Member Function Documentation

Real ACSEDGPoly::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Implements ACBulk< Real >.

Definition at line 46 of file ACSEDGPoly.C.

47 {
48  Real SumEtaj = 0.0;
49  for (unsigned int i = 0; i < _op_num; ++i)
50  SumEtaj += (*_vals[i])[_qp] * (*_vals[i])[_qp];
51 
52  // Add the current OP to the sum
53  Real SumEtai2 = SumEtaj + _u[_qp] * _u[_qp];
54  // Dislocation density in deformed grains
55  Real rho_i = _Disloc_Den_i[_qp];
56  // undeformed grains are dislocation-free
57  const auto & op_to_grain = _grain_tracker.getVarToFeatureVector(_current_elem->id());
58  const auto grn_index = op_to_grain[_op_index];
59  if (grn_index >= _deformed_grain_num)
60  rho_i = 0.0;
61 
62  // Calculate the contributions of the deformation energy to the residual and Jacobian
63  Real drho_eff_detai = 2.0 * _u[_qp] * (rho_i - _rho_eff[_qp]) / SumEtai2;
64 
65  // Calculate the Stored Energy contribution to either the residual or Jacobian of the grain growth
66  // free energy
67  switch (type)
68  {
69  case Residual:
70  return _beta[_qp] * drho_eff_detai;
71 
72  case Jacobian:
73  return _beta[_qp] * _phi[_j][_qp] *
74  (2.0 * SumEtai2 * ((rho_i - _rho_eff[_qp]) - _u[_qp] * drho_eff_detai) -
75  4.0 * _u[_qp] * _u[_qp] * (rho_i - _rho_eff[_qp])) /
76  (SumEtai2 * SumEtai2);
77  }
78  mooseError("Invalid type passed in");
79 }
const unsigned int _op_num
Definition: ACSEDGPoly.h:35
unsigned int _deformed_grain_num
number of deformed grains
Definition: ACSEDGPoly.h:50
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
Definition: ACSEDGPoly.h:53
const MaterialProperty< Real > & _rho_eff
the average/effective dislocation density
Definition: ACSEDGPoly.h:44
const MaterialProperty< Real > & _beta
the prefactor needed to calculate the deformation energy from dislocation density ...
Definition: ACSEDGPoly.h:41
unsigned int _op_index
index of the OP the kernel is currently acting on
Definition: ACSEDGPoly.h:56
const MaterialProperty< Real > & _Disloc_Den_i
dislocation density in grain i
Definition: ACSEDGPoly.h:47
std::vector< const VariableValue * > _vals
Definition: ACSEDGPoly.h:37
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.
virtual Real ACBulk< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited
virtual void ACBulk< Real >::initialSetup ( )
virtualinherited
virtual Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited
virtual Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited
static InputParameters ACBulk< Real >::validParams ( )
staticinherited

Member Data Documentation

const MaterialProperty<Real>& ACSEDGPoly::_beta
protected

the prefactor needed to calculate the deformation energy from dislocation density

Definition at line 41 of file ACSEDGPoly.h.

Referenced by computeDFDOP().

unsigned int ACSEDGPoly::_deformed_grain_num
protected

number of deformed grains

Definition at line 50 of file ACSEDGPoly.h.

Referenced by computeDFDOP().

const MaterialProperty<Real>& ACSEDGPoly::_Disloc_Den_i
protected

dislocation density in grain i

Definition at line 47 of file ACSEDGPoly.h.

Referenced by computeDFDOP().

std::vector<const MaterialProperty<Real > *> ACBulk< Real >::_dLdarg
protectedinherited

Mobility derivative w.r.t coupled variables.

Definition at line 50 of file ACBulk.h.

const MaterialProperty<Real >& ACBulk< Real >::_dLdop
protectedinherited

Mobility derivative w.r.t. order parameter.

Definition at line 47 of file ACBulk.h.

const GrainTrackerInterface& ACSEDGPoly::_grain_tracker
protected

Grain tracker object.

Definition at line 53 of file ACSEDGPoly.h.

Referenced by computeDFDOP().

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited
unsigned int ACSEDGPoly::_op_index
protected

index of the OP the kernel is currently acting on

Definition at line 56 of file ACSEDGPoly.h.

Referenced by computeDFDOP().

const unsigned int ACSEDGPoly::_op_num
protected

Definition at line 35 of file ACSEDGPoly.h.

Referenced by ACSEDGPoly(), and computeDFDOP().

const MaterialProperty<Real>& ACSEDGPoly::_rho_eff
protected

the average/effective dislocation density

Definition at line 44 of file ACSEDGPoly.h.

Referenced by computeDFDOP().

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

Definition at line 37 of file ACSEDGPoly.h.

Referenced by ACSEDGPoly(), and computeDFDOP().

std::vector<unsigned int> ACSEDGPoly::_vals_var
protected

Definition at line 38 of file ACSEDGPoly.h.

Referenced by ACSEDGPoly().


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