www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
CHBulkPFCTrad Class Referenceabstract

#include <CHBulkPFCTrad.h>

Inheritance diagram for CHBulkPFCTrad:
[legend]

Public Member Functions

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

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

virtual RealGradient computeGradDFDCons (PFFunctionType type)
 
virtual RealGradient precomputeQpResidual ()
 
virtual RealGradient precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
virtual RealGradient computeGradDFDCons (PFFunctionType type)=0
 

Protected Attributes

const MaterialProperty< Real > & _M
 Mobility. More...
 
const MaterialProperty< Real > & _dMdc
 Mobility derivative w.r.t. concentration. More...
 
std::vector< const MaterialProperty< Real > *> _dMdarg
 Mobility derivative w.r.t coupled variables. More...
 

Private Attributes

const MaterialProperty< Real > & _C0
 
const MaterialProperty< Real > & _a
 
const MaterialProperty< Real > & _b
 

Detailed Description

Definition at line 20 of file CHBulkPFCTrad.h.

Member Enumeration Documentation

◆ PFFunctionType

enum CHBulk::PFFunctionType
protectedinherited

Definition at line 39 of file CHBulk.h.

Constructor & Destructor Documentation

◆ CHBulkPFCTrad()

CHBulkPFCTrad::CHBulkPFCTrad ( const InputParameters &  parameters)

Definition at line 23 of file CHBulkPFCTrad.C.

24  : CHBulk<Real>(parameters),
25  _C0(getMaterialProperty<Real>("C0")),
26  _a(getMaterialProperty<Real>("a")),
27  _b(getMaterialProperty<Real>("b"))
28 {
29 }
const MaterialProperty< Real > & _a
Definition: CHBulkPFCTrad.h:30
const MaterialProperty< Real > & _b
Definition: CHBulkPFCTrad.h:31
const MaterialProperty< Real > & _C0
Definition: CHBulkPFCTrad.h:29

Member Function Documentation

◆ computeGradDFDCons() [1/2]

RealGradient CHBulkPFCTrad::computeGradDFDCons ( PFFunctionType  type)
protectedvirtual

Definition at line 32 of file CHBulkPFCTrad.C.

33 {
34  Real d2fdc2 = 1.0 - _C0[_qp] - _a[_qp] * _u[_qp] + _b[_qp] * _u[_qp] * _u[_qp];
35 
36  switch (type)
37  {
38  case Residual:
39  return d2fdc2 * _grad_u[_qp];
40 
41  case Jacobian:
42  {
43  Real d3fdc3 = -_a[_qp] + 2.0 * _b[_qp] * _u[_qp];
44  return d2fdc2 * _grad_phi[_j][_qp] + d3fdc3 * _grad_u[_qp] * _phi[_j][_qp];
45  }
46  }
47 
48  mooseError("Invalid type passed in");
49 }
const MaterialProperty< Real > & _a
Definition: CHBulkPFCTrad.h:30
const MaterialProperty< Real > & _b
Definition: CHBulkPFCTrad.h:31
const MaterialProperty< Real > & _C0
Definition: CHBulkPFCTrad.h:29

◆ computeGradDFDCons() [2/2]

virtual RealGradient CHBulk< Real >::computeGradDFDCons ( PFFunctionType  type)
protectedpure virtualinherited

Implemented in CahnHilliardBase< Real >.

◆ computeQpOffDiagJacobian()

Real CHBulk< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited

Reimplemented in KKSCHBulk, and CahnHilliardBase< Real >.

Definition at line 111 of file CHBulk.h.

112 {
113  // get the coupled variable jvar is referring to
114  const unsigned int cvar = mapJvarToCvar(jvar);
115 
116  return (*_dMdarg[cvar])[_qp] * _phi[_j][_qp] * computeGradDFDCons(Residual) * _grad_test[_i][_qp];
117 }
virtual RealGradient computeGradDFDCons(PFFunctionType type)=0
std::vector< const MaterialProperty< Real > *> _dMdarg
Mobility derivative w.r.t coupled variables.
Definition: CHBulk.h:54

◆ initialSetup()

void CHBulk< Real >::initialSetup ( )
virtualinherited

Reimplemented in CahnHilliardBase< Real >.

Definition at line 87 of file CHBulk.h.

88 {
89  validateNonlinearCoupling<Real>("mob_name");
90 }

◆ precomputeQpJacobian()

RealGradient CHBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 101 of file CHBulk.h.

102 {
103  RealGradient grad_value = _M[_qp] * computeGradDFDCons(Jacobian) +
104  _dMdc[_qp] * _phi[_j][_qp] * computeGradDFDCons(Residual);
105 
106  return grad_value;
107 }
virtual RealGradient computeGradDFDCons(PFFunctionType type)=0
const MaterialProperty< Real > & _M
Mobility.
Definition: CHBulk.h:48
const MaterialProperty< Real > & _dMdc
Mobility derivative w.r.t. concentration.
Definition: CHBulk.h:51

◆ precomputeQpResidual()

RealGradient CHBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 94 of file CHBulk.h.

95 {
96  return _M[_qp] * computeGradDFDCons(Residual);
97 }
virtual RealGradient computeGradDFDCons(PFFunctionType type)=0
const MaterialProperty< Real > & _M
Mobility.
Definition: CHBulk.h:48

◆ validParams()

InputParameters CHBulk< Real >::validParams ( )
staticinherited

Definition at line 76 of file CHBulk.h.

77 {
78  InputParameters params = ::validParams<KernelGrad>();
79  params.addClassDescription("Cahn-Hilliard base Kernel");
80  params.addParam<MaterialPropertyName>("mob_name", "M", "The mobility used with the kernel");
81  params.addCoupledVar("args", "Vector of arguments of the mobility");
82  return params;
83 }

Member Data Documentation

◆ _a

const MaterialProperty<Real>& CHBulkPFCTrad::_a
private

Definition at line 30 of file CHBulkPFCTrad.h.

Referenced by computeGradDFDCons().

◆ _b

const MaterialProperty<Real>& CHBulkPFCTrad::_b
private

Definition at line 31 of file CHBulkPFCTrad.h.

Referenced by computeGradDFDCons().

◆ _C0

const MaterialProperty<Real>& CHBulkPFCTrad::_C0
private

Definition at line 29 of file CHBulkPFCTrad.h.

Referenced by computeGradDFDCons().

◆ _dMdarg

std::vector<const MaterialProperty<Real > *> CHBulk< Real >::_dMdarg
protectedinherited

Mobility derivative w.r.t coupled variables.

Definition at line 54 of file CHBulk.h.

◆ _dMdc

const MaterialProperty<Real >& CHBulk< Real >::_dMdc
protectedinherited

Mobility derivative w.r.t. concentration.

Definition at line 51 of file CHBulk.h.

◆ _M

const MaterialProperty<Real >& CHBulk< Real >::_M
protectedinherited

Mobility.

Definition at line 48 of file CHBulk.h.


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