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

ACBulk child class that sets up necessary variables and materials for calculation of residual contribution \( \frac{\partial f}{\partial \eta_i} \) by child classes KKSMultiACBulkF and KKSMultiACBulkC. More...

#include <KKSMultiACBulkBase.h>

Inheritance diagram for KKSMultiACBulkBase:
[legend]

Public Member Functions

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

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

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

Protected Attributes

unsigned int _nvar
 Number of coupled variables. More...
 
VariableName _etai_name
 name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material properties) More...
 
unsigned int _etai_var
 index of order parameter that derivatives are taken wrt More...
 
std::vector< MaterialPropertyName > _Fj_names
 Names of free energy functions for each phase \( F_j \). More...
 
unsigned int _num_j
 
std::vector< const MaterialProperty< Real > * > _prop_Fj
 Values of the free energy functions for each phase \( F_j \). More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
 Derivatives of the free energy functions (needed for off-diagonal Jacobians) More...
 
std::vector< MaterialPropertyName > _hj_names
 switching function names More...
 
std::vector< const MaterialProperty< Real > * > _prop_hj
 Values of the switching functions for each phase \( h_j \). More...
 
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
 Derivatives of the switching functions wrt the order parameter for this kernel. More...
 
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
 Second derivatives of the switching functions wrt the order parameter for this kernel. More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
 Second derivatives of the switching functions (needed for off-diagonal Jacobians) 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

ACBulk child class that sets up necessary variables and materials for calculation of residual contribution \( \frac{\partial f}{\partial \eta_i} \) by child classes KKSMultiACBulkF and KKSMultiACBulkC.

The non-linear variable for this Kernel is the order parameter \( \eta_i \).

Definition at line 25 of file KKSMultiACBulkBase.h.

Member Enumeration Documentation

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 35 of file ACBulk.h.

Constructor & Destructor Documentation

KKSMultiACBulkBase::KKSMultiACBulkBase ( const InputParameters &  parameters)

Definition at line 26 of file KKSMultiACBulkBase.C.

27  : ACBulk<Real>(parameters),
28  _nvar(_coupled_moose_vars.size()), // number of coupled variables
29  _etai_name(getVar("eta_i", 0)->name()),
30  _etai_var(coupled("eta_i", 0)),
31  _Fj_names(getParam<std::vector<MaterialPropertyName>>("Fj_names")),
32  _num_j(_Fj_names.size()),
35  _hj_names(getParam<std::vector<MaterialPropertyName>>("hj_names")),
40 {
41  // check passed in parameter vectors
42  if (_num_j != _hj_names.size())
43  mooseError(
44  "Need to pass in as many hj_names as Fj_names in KKSMultiACBulkF and KKSMultiACBulkC ",
45  name());
46 
47  // reserve space and set phase material properties
48  for (unsigned int n = 0; n < _num_j; ++n)
49  {
50  // get phase free energy
51  _prop_Fj[n] = &getMaterialPropertyByName<Real>(_Fj_names[n]);
52  _prop_dFjdarg[n].resize(_nvar);
53 
54  // get switching function and derivatives wrt eta_i, the nonlinear variable
55  _prop_hj[n] = &getMaterialPropertyByName<Real>(_hj_names[n]);
56  _prop_dhjdetai[n] = &getMaterialPropertyDerivative<Real>(_hj_names[n], _etai_name);
57  _prop_d2hjdetai2[n] =
58  &getMaterialPropertyDerivative<Real>(_hj_names[n], _etai_name, _etai_name);
59  _prop_d2hjdetaidarg[n].resize(_nvar);
60 
61  for (unsigned int i = 0; i < _nvar; ++i)
62  {
63  MooseVariable * cvar = _coupled_moose_vars[i];
64  // Get derivatives of all Fj wrt all coupled variables
65  _prop_dFjdarg[n][i] = &getMaterialPropertyDerivative<Real>(_Fj_names[n], cvar->name());
66 
67  // Get second derivatives of all hj wrt eta_i and all coupled variables
68  _prop_d2hjdetaidarg[n][i] =
69  &getMaterialPropertyDerivative<Real>(_hj_names[n], _etai_name, cvar->name());
70  }
71  }
72 }
unsigned int _nvar
Number of coupled variables.
std::vector< MaterialPropertyName > _Fj_names
Names of free energy functions for each phase .
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
Second derivatives of the switching functions (needed for off-diagonal Jacobians) ...
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< MaterialPropertyName > _hj_names
switching function names
std::vector< const MaterialProperty< Real > * > _prop_hj
Values of the switching functions for each phase .
std::vector< const MaterialProperty< Real > * > _prop_Fj
Values of the free energy functions for each phase .
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
Second derivatives of the switching functions wrt the order parameter for this kernel.
VariableName _etai_name
name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material pr...
unsigned int _etai_var
index of order parameter that derivatives are taken wrt
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
Derivatives of the free energy functions (needed for off-diagonal Jacobians)

Member Function Documentation

virtual Real ACBulk< Real >::computeDFDOP ( PFFunctionType  type)
protectedpure virtualinherited
virtual Real ACBulk< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited
void KKSMultiACBulkBase::initialSetup ( )
virtual

Reimplemented from ACBulk< Real >.

Definition at line 75 of file KKSMultiACBulkBase.C.

76 {
78 
79  for (unsigned int n = 0; n < _num_j; ++n)
80  {
81  validateNonlinearCoupling<Real>(_Fj_names[n]);
82  validateNonlinearCoupling<Real>(_hj_names[n]);
83  }
84 }
virtual void initialSetup()
Definition: ACBulk.h:83
std::vector< MaterialPropertyName > _Fj_names
Names of free energy functions for each phase .
std::vector< MaterialPropertyName > _hj_names
switching function names
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.

VariableName KKSMultiACBulkBase::_etai_name
protected

name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material properties)

Definition at line 37 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase().

unsigned int KKSMultiACBulkBase::_etai_var
protected

index of order parameter that derivatives are taken wrt

Definition at line 40 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeDFDOP(), KKSMultiACBulkF::computeDFDOP(), and KKSMultiACBulkF::computeQpOffDiagJacobian().

std::vector<MaterialPropertyName> KKSMultiACBulkBase::_Fj_names
protected

Names of free energy functions for each phase \( F_j \).

Definition at line 43 of file KKSMultiACBulkBase.h.

Referenced by initialSetup(), KKSMultiACBulkBase(), and KKSMultiACBulkC::KKSMultiACBulkC().

std::vector<MaterialPropertyName> KKSMultiACBulkBase::_hj_names
protected

switching function names

Definition at line 53 of file KKSMultiACBulkBase.h.

Referenced by initialSetup(), and KKSMultiACBulkBase().

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited
unsigned int KKSMultiACBulkBase::_num_j
protected
unsigned int KKSMultiACBulkBase::_nvar
protected

Number of coupled variables.

Definition at line 34 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase(), and KKSMultiACBulkC::KKSMultiACBulkC().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_d2hjdetai2
protected

Second derivatives of the switching functions wrt the order parameter for this kernel.

Definition at line 62 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeDFDOP(), KKSMultiACBulkF::computeDFDOP(), and KKSMultiACBulkBase().

std::vector<std::vector<const MaterialProperty<Real> *> > KKSMultiACBulkBase::_prop_d2hjdetaidarg
protected

Second derivatives of the switching functions (needed for off-diagonal Jacobians)

Definition at line 65 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeQpOffDiagJacobian(), KKSMultiACBulkF::computeQpOffDiagJacobian(), and KKSMultiACBulkBase().

std::vector<std::vector<const MaterialProperty<Real> *> > KKSMultiACBulkBase::_prop_dFjdarg
protected

Derivatives of the free energy functions (needed for off-diagonal Jacobians)

Definition at line 50 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkF::computeQpOffDiagJacobian(), and KKSMultiACBulkBase().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_dhjdetai
protected

Derivatives of the switching functions wrt the order parameter for this kernel.

Definition at line 59 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeDFDOP(), KKSMultiACBulkF::computeDFDOP(), KKSMultiACBulkF::computeQpOffDiagJacobian(), KKSMultiACBulkC::computeQpOffDiagJacobian(), and KKSMultiACBulkBase().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_Fj
protected

Values of the free energy functions for each phase \( F_j \).

Definition at line 47 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkF::computeDFDOP(), KKSMultiACBulkF::computeQpOffDiagJacobian(), and KKSMultiACBulkBase().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_hj
protected

Values of the switching functions for each phase \( h_j \).

Definition at line 56 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase().


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