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

This kernel calculates the residual for grain growth for a multi-phase, poly-crystal system. More...

#include <ACGrGrMulti.h>

Inheritance diagram for ACGrGrMulti:
[legend]

Public Member Functions

 ACGrGrMulti (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 computeQpOffDiagJacobian (unsigned int jvar)
 
virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 

Protected Attributes

std::vector< MaterialPropertyName > _gamma_names
 Names of gammas for each order parameter. More...
 
unsigned int _num_j
 
std::vector< const MaterialProperty< Real > * > _prop_gammas
 Values of gammas for each order parameter. More...
 
const unsigned int _op_num
 
std::vector< const VariableValue * > _vals
 
std::vector< unsigned int > _vals_var
 
const MaterialProperty< Real > & _mu
 
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

This kernel calculates the residual for grain growth for a multi-phase, poly-crystal system.

A list of material properties needs to be supplied for the gammas (prefactors of the cross-terms between order parameters).

Definition at line 23 of file ACGrGrMulti.h.

Member Enumeration Documentation

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 35 of file ACBulk.h.

Constructor & Destructor Documentation

ACGrGrMulti::ACGrGrMulti ( const InputParameters &  parameters)

Definition at line 22 of file ACGrGrMulti.C.

23  : ACGrGrBase(parameters),
24  _gamma_names(getParam<std::vector<MaterialPropertyName>>("gamma_names")),
25  _num_j(_gamma_names.size()),
27 {
28  // check passed in parameter vectors
29  if (_num_j != coupledComponents("v"))
30  mooseError("Need to pass in as many gamma_names as coupled variables in v in ACGrGrMulti",
31  name());
32 
33  for (unsigned int n = 0; n < _num_j; ++n)
34  _prop_gammas[n] = &getMaterialPropertyByName<Real>(_gamma_names[n]);
35 }
ACGrGrBase(const InputParameters &parameters)
Definition: ACGrGrBase.C:19
std::vector< MaterialPropertyName > _gamma_names
Names of gammas for each order parameter.
Definition: ACGrGrMulti.h:33
unsigned int _num_j
Definition: ACGrGrMulti.h:34
std::vector< const MaterialProperty< Real > * > _prop_gammas
Values of gammas for each order parameter.
Definition: ACGrGrMulti.h:37

Member Function Documentation

Real ACGrGrMulti::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Implements ACBulk< Real >.

Definition at line 38 of file ACGrGrMulti.C.

39 {
40  // Sum all other order parameters
41  Real SumGammaEtaj = 0.0;
42  for (unsigned int i = 0; i < _op_num; ++i)
43  SumGammaEtaj += (*_prop_gammas[i])[_qp] * (*_vals[i])[_qp] * (*_vals[i])[_qp];
44 
45  // Calculate either the residual or Jacobian of the grain growth free energy
46  switch (type)
47  {
48  case Residual:
49  {
50  return _mu[_qp] * (_u[_qp] * _u[_qp] * _u[_qp] - _u[_qp] + 2.0 * _u[_qp] * SumGammaEtaj);
51  }
52 
53  case Jacobian:
54  {
55  return _mu[_qp] * (_phi[_j][_qp] * (3.0 * _u[_qp] * _u[_qp] - 1.0 + 2.0 * SumGammaEtaj));
56  }
57 
58  default:
59  mooseError("Invalid type passed in");
60  }
61 }
const unsigned int _op_num
Definition: ACGrGrBase.h:29
const MaterialProperty< Real > & _mu
Definition: ACGrGrBase.h:34
std::vector< const MaterialProperty< Real > * > _prop_gammas
Values of gammas for each order parameter.
Definition: ACGrGrMulti.h:37
std::vector< const VariableValue * > _vals
Definition: ACGrGrBase.h:31
Real ACGrGrMulti::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 64 of file ACGrGrMulti.C.

65 {
66  for (unsigned int i = 0; i < _op_num; ++i)
67  if (jvar == _vals_var[i])
68  {
69  // Derivative of SumGammaEtaj
70  const Real dSumGammaEtaj = 2.0 * (*_prop_gammas[i])[_qp] * (*_vals[i])[_qp] * _phi[_j][_qp];
71  const Real dDFDOP = _mu[_qp] * 2.0 * _u[_qp] * dSumGammaEtaj;
72 
73  return _L[_qp] * _test[_i][_qp] * dDFDOP;
74  }
75 
76  return 0.0;
77 }
const unsigned int _op_num
Definition: ACGrGrBase.h:29
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:44
std::vector< unsigned int > _vals_var
Definition: ACGrGrBase.h:32
const MaterialProperty< Real > & _mu
Definition: ACGrGrBase.h:34
std::vector< const MaterialProperty< Real > * > _prop_gammas
Values of gammas for each order parameter.
Definition: ACGrGrMulti.h:37
std::vector< const VariableValue * > _vals
Definition: ACGrGrBase.h:31
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

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.

std::vector<MaterialPropertyName> ACGrGrMulti::_gamma_names
protected

Names of gammas for each order parameter.

Definition at line 33 of file ACGrGrMulti.h.

Referenced by ACGrGrMulti().

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited
const MaterialProperty<Real>& ACGrGrBase::_mu
protectedinherited
unsigned int ACGrGrMulti::_num_j
protected

Definition at line 34 of file ACGrGrMulti.h.

Referenced by ACGrGrMulti().

const unsigned int ACGrGrBase::_op_num
protectedinherited
std::vector<const MaterialProperty<Real> *> ACGrGrMulti::_prop_gammas
protected

Values of gammas for each order parameter.

Definition at line 37 of file ACGrGrMulti.h.

Referenced by ACGrGrMulti(), computeDFDOP(), and computeQpOffDiagJacobian().

std::vector<const VariableValue *> ACGrGrBase::_vals
protectedinherited
std::vector<unsigned int> ACGrGrBase::_vals_var
protectedinherited

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