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

CoupledAllenCahn uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial to compute the residual for the bulk part of the Allen-Cahn equation, where the variational free energy derivative is taken w.r.t. More...

#include <CoupledAllenCahn.h>

Inheritance diagram for CoupledAllenCahn:
[legend]

Public Member Functions

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

VariableName _v_name
 
const unsigned int _nvar
 
const MaterialProperty< Real > & _dFdV
 
const MaterialProperty< Real > & _d2FdVdEta
 
std::vector< const MaterialProperty< Real > * > _d2FdVdarg
 
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

CoupledAllenCahn uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial to compute the residual for the bulk part of the Allen-Cahn equation, where the variational free energy derivative is taken w.r.t.

a coupled variable.

Definition at line 24 of file CoupledAllenCahn.h.

Member Enumeration Documentation

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 35 of file ACBulk.h.

Constructor & Destructor Documentation

CoupledAllenCahn::CoupledAllenCahn ( const InputParameters &  parameters)

Definition at line 22 of file CoupledAllenCahn.C.

23  : ACBulk<Real>(parameters),
24  _v_name(getVar("v", 0)->name()),
25  _nvar(_coupled_moose_vars.size()),
26  _dFdV(getMaterialPropertyDerivative<Real>("f_name", _v_name)),
27  _d2FdVdEta(getMaterialPropertyDerivative<Real>("f_name", _v_name, _var.name())),
29 {
30  // Iterate over all coupled variables
31  for (unsigned int i = 0; i < _nvar; ++i)
32  _d2FdVdarg[i] =
33  &getMaterialPropertyDerivative<Real>("f_name", _v_name, _coupled_moose_vars[i]->name());
34 }
const MaterialProperty< Real > & _d2FdVdEta
const unsigned int _nvar
VariableName _v_name
const MaterialProperty< Real > & _dFdV
std::vector< const MaterialProperty< Real > * > _d2FdVdarg

Member Function Documentation

Real CoupledAllenCahn::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Implements ACBulk< Real >.

Definition at line 44 of file CoupledAllenCahn.C.

45 {
46  switch (type)
47  {
48  case Residual:
49  return _dFdV[_qp];
50 
51  case Jacobian:
52  return _d2FdVdEta[_qp] * _phi[_j][_qp];
53  }
54 
55  mooseError("Internal error");
56 }
const MaterialProperty< Real > & _d2FdVdEta
const MaterialProperty< Real > & _dFdV
Real CoupledAllenCahn::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 59 of file CoupledAllenCahn.C.

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

Reimplemented from ACBulk< Real >.

Definition at line 37 of file CoupledAllenCahn.C.

38 {
40  validateNonlinearCoupling<Real>("f_name");
41 }
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

std::vector<const MaterialProperty<Real> *> CoupledAllenCahn::_d2FdVdarg
protected

Definition at line 42 of file CoupledAllenCahn.h.

Referenced by computeQpOffDiagJacobian(), and CoupledAllenCahn().

const MaterialProperty<Real>& CoupledAllenCahn::_d2FdVdEta
protected

Definition at line 40 of file CoupledAllenCahn.h.

Referenced by computeDFDOP().

const MaterialProperty<Real>& CoupledAllenCahn::_dFdV
protected

Definition at line 39 of file CoupledAllenCahn.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 CoupledAllenCahn::_nvar
protected

Definition at line 38 of file CoupledAllenCahn.h.

Referenced by CoupledAllenCahn().

VariableName CoupledAllenCahn::_v_name
protected

Definition at line 36 of file CoupledAllenCahn.h.

Referenced by CoupledAllenCahn().


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