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

AllenCahn uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial to computer the residual for the bulk part of the Allen-Cahn equation. More...

#include <AllenCahn.h>

Inheritance diagram for AllenCahn:
[legend]

Public Member Functions

 AllenCahn (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

const unsigned int _nvar
 
const MaterialProperty< Real > & _dFdEta
 
const MaterialProperty< Real > & _d2FdEta2
 
std::vector< const MaterialProperty< Real > * > _d2FdEtadarg
 
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

AllenCahn uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial to computer the residual for the bulk part of the Allen-Cahn equation.

Definition at line 23 of file AllenCahn.h.

Member Enumeration Documentation

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 35 of file ACBulk.h.

Constructor & Destructor Documentation

AllenCahn::AllenCahn ( const InputParameters &  parameters)

Definition at line 20 of file AllenCahn.C.

21  : ACBulk<Real>(parameters),
22  _nvar(_coupled_moose_vars.size()),
23  _dFdEta(getMaterialPropertyDerivative<Real>("f_name", _var.name())),
24  _d2FdEta2(getMaterialPropertyDerivative<Real>("f_name", _var.name(), _var.name())),
26 {
27  // Iterate over all coupled variables
28  for (unsigned int i = 0; i < _nvar; ++i)
29  _d2FdEtadarg[i] =
30  &getMaterialPropertyDerivative<Real>("f_name", _var.name(), _coupled_moose_vars[i]->name());
31 }
std::vector< const MaterialProperty< Real > * > _d2FdEtadarg
Definition: AllenCahn.h:38
const MaterialProperty< Real > & _dFdEta
Definition: AllenCahn.h:35
const MaterialProperty< Real > & _d2FdEta2
Definition: AllenCahn.h:36
const unsigned int _nvar
Definition: AllenCahn.h:34

Member Function Documentation

Real AllenCahn::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Implements ACBulk< Real >.

Definition at line 42 of file AllenCahn.C.

43 {
44  switch (type)
45  {
46  case Residual:
47  return _dFdEta[_qp];
48 
49  case Jacobian:
50  return _d2FdEta2[_qp] * _phi[_j][_qp];
51  }
52 
53  mooseError("Internal error");
54 }
const MaterialProperty< Real > & _dFdEta
Definition: AllenCahn.h:35
const MaterialProperty< Real > & _d2FdEta2
Definition: AllenCahn.h:36
Real AllenCahn::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 57 of file AllenCahn.C.

58 {
59  // get the coupled variable jvar is referring to
60  const unsigned int cvar = mapJvarToCvar(jvar);
61 
63  _L[_qp] * (*_d2FdEtadarg[cvar])[_qp] * _phi[_j][_qp] * _test[_i][_qp];
64 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:44
std::vector< const MaterialProperty< Real > * > _d2FdEtadarg
Definition: AllenCahn.h:38
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: ACBulk.h:114
void AllenCahn::initialSetup ( )
virtual

Reimplemented from ACBulk< Real >.

Definition at line 34 of file AllenCahn.C.

35 {
37  validateNonlinearCoupling<Real>("f_name");
38  validateDerivativeMaterialPropertyBase<Real>("f_name");
39 }
virtual void initialSetup()
Definition: ACBulk.h:83
virtual Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited
virtual Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited
static InputParameters ACBulk< Real >::validParams ( )
staticinherited

Member Data Documentation

const MaterialProperty<Real>& AllenCahn::_d2FdEta2
protected

Definition at line 36 of file AllenCahn.h.

Referenced by computeDFDOP().

std::vector<const MaterialProperty<Real> *> AllenCahn::_d2FdEtadarg
protected

Definition at line 38 of file AllenCahn.h.

Referenced by AllenCahn(), and computeQpOffDiagJacobian().

const MaterialProperty<Real>& AllenCahn::_dFdEta
protected

Definition at line 35 of file AllenCahn.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 MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited
const unsigned int AllenCahn::_nvar
protected

Definition at line 34 of file AllenCahn.h.

Referenced by AllenCahn().


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