https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
NestedKKSMultiACBulkC Class Referenceabstract

KKSACBulkBase child class for the phase concentration term \( - \frac{\partial F_1}{\partial c_1} \sum_j \frac{\partial h_j}{\partial \eta_i} (c_j) \) in the the Allen-Cahn bulk residual. More...

#include <NestedKKSMultiACBulkC.h>

Inheritance diagram for NestedKKSMultiACBulkC:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 NestedKKSMultiACBulkC (const InputParameters &parameters)
 
virtual void initialSetup ()
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

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 ()
 
virtual Real computeDFDOP (PFFunctionType type)=0
 

Protected Attributes

std::vector< VariableName > _c_names
 Global concentrations. More...
 
const JvarMap & _c_map
 
unsigned int _num_c
 Number of global concentrations. More...
 
int _k
 Position of the nonlinear variable in the list of cj's. More...
 
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidetaj
 Derivative of phase concentrations wrt etaj \( \frac d{d{eta_j}} c_i \). More...
 
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidb
 Derivative of phase concentrations wrt global concentrations \( \frac d{db} c_i \). More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidetap
 Second derivative of switching function \( \frac {d^2}{deta_i deta_p} h_j \). More...
 
std::vector< const MaterialProperty< Real > * > _dF1dc1
 Derivative of the free energy function \( \frac d{dc_1} F_1 \). More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1db1
 Second derivative of the free energy function \( \frac {d^2}{dc_1 db_1} F_1 \). More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1darg
 Mixed partial derivatives of the free energy function wrt c and any other coupled variables \( \frac {d^2}{dc_1 dq} F_1 \). 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...
 
std::vector< VariableName > _eta_names
 Phase parameters. More...
 
const JvarMap & _eta_map
 
std::vector< MaterialPropertyName > _ci_names
 Phase concentrations. More...
 
std::vector< std::vector< MaterialPropertyName > > _ci_name_matrix
 
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_ci
 

Detailed Description

KKSACBulkBase child class for the phase concentration term \( - \frac{\partial F_1}{\partial c_1} \sum_j \frac{\partial h_j}{\partial \eta_i} (c_j) \) in the the Allen-Cahn bulk residual.

The non-linear variable for this Kernel is the order parameter 'eta_i'.

Definition at line 21 of file NestedKKSMultiACBulkC.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 37 of file ACBulk.h.

38  {
39  Jacobian,
40  Residual
41  };

Constructor & Destructor Documentation

◆ NestedKKSMultiACBulkC()

NestedKKSMultiACBulkC::NestedKKSMultiACBulkC ( const InputParameters parameters)

Definition at line 29 of file NestedKKSMultiACBulkC.C.

30  : KKSMultiACBulkBase(parameters),
31  _c_names(coupledNames("global_cs")),
32  _c_map(getParameterJvarMap("global_cs")),
33  _num_c(coupledComponents("global_cs")),
34  _eta_names(coupledNames("all_etas")),
35  _eta_map(getParameterJvarMap("all_etas")),
36  _k(-1),
37  _ci_names(getParam<std::vector<MaterialPropertyName>>("ci_names")),
41  _dcidb(_num_c),
43  _dF1dc1(_num_c),
45  _d2F1dc1darg(_n_args)
46 {
47  for (unsigned int i = 0; i < _num_j; ++i)
48  {
49  // get order parameter names and variable indices
50  _eta_names[i] = getVar("all_etas", i)->name();
51 
52  // Set _k to the position of the nonlinear variable in the list of etaj's
53  if (coupled("all_etas", i) == _var.number())
54  _k = i;
55  }
56 
57  // initialize _ci_name_matrix and _prop_ci for easy reference
58  for (unsigned int m = 0; m < _num_c; ++m)
59  {
60  _ci_name_matrix[m].resize(_num_j);
61  _prop_ci[m].resize(_num_j);
62 
63  for (const auto n : make_range(_num_j))
64  {
65  _ci_name_matrix[m][n] = _ci_names[m * _num_j + n];
66  _prop_ci[m][n] = &getMaterialPropertyByName<Real>(_ci_name_matrix[m][n]);
67  }
68  }
69 
70  // _dcidetaj and _dcidb are computed in KKSPhaseConcentrationMultiPhaseDerivatives
71  for (const auto m : make_range(_num_c))
72  {
73  _dcidetaj[m].resize(_num_j);
74  _dcidb[m].resize(_num_j);
75 
76  for (const auto n : make_range(_num_j))
77  {
78  _dcidetaj[m][n].resize(_num_j);
79  _dcidb[m][n].resize(_num_c);
80 
81  for (const auto l : make_range(_num_j))
82  _dcidetaj[m][n][l] =
83  &getMaterialPropertyDerivative<Real>(_ci_names[n + m * _num_j], _eta_names[l]);
84 
85  for (const auto l : make_range(_num_c))
86  _dcidb[m][n][l] =
87  &getMaterialPropertyDerivative<Real>(_ci_names[n + m * _num_j], _c_names[l]);
88  }
89  }
90 
91  for (const auto m : make_range(_num_j))
92  {
93  _prop_d2hjdetaidetap[m].resize(_num_j);
94 
95  for (const auto n : make_range(_num_j))
96  _prop_d2hjdetaidetap[m][n] =
97  &getMaterialPropertyDerivative<Real>(_hj_names[m], _eta_names[_k], _eta_names[n]);
98  }
99 
100  // _dF1dc1 and _d2F1dc1db1 are computed in KKSPhaseConcentrationMultiPhaseMaterial
101  for (const auto m : make_range(_num_c))
102  {
103  _dF1dc1[m] = &getMaterialPropertyDerivative<Real>(_Fj_names[0], _ci_names[m * _num_j]);
104  _d2F1dc1db1[m].resize(_num_c);
105 
106  for (const auto n : make_range(_num_c))
107  _d2F1dc1db1[m][n] = &getMaterialPropertyDerivative<Real>(
108  _Fj_names[0], _ci_name_matrix[m][0], _ci_name_matrix[n][0]);
109  }
110 
111  // _d2F1dc1darg are computed in KKSPhaseConcentrationMultiPhaseMaterial
112  for (const auto m : make_range(_num_c))
113  {
114  _d2F1dc1darg[m].resize(_n_args);
115 
116  for (const auto n : make_range(_n_args))
117  _d2F1dc1darg[m][n] =
118  &getMaterialPropertyDerivative<Real>(_Fj_names[0], _ci_name_matrix[m][0], n);
119  }
120 }
std::vector< MaterialPropertyName > _ci_names
Phase concentrations.
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1darg
Mixed partial derivatives of the free energy function wrt c and any other coupled variables ...
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_ci
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidb
Derivative of phase concentrations wrt global concentrations .
std::vector< MaterialPropertyName > _Fj_names
Names of free energy functions for each phase .
std::vector< const MaterialProperty< Real > * > _dF1dc1
Derivative of the free energy function .
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidetaj
Derivative of phase concentrations wrt etaj .
std::vector< MaterialPropertyName > _hj_names
switching function names
std::vector< VariableName > _c_names
Global concentrations.
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidetap
Second derivative of switching function .
int _k
Position of the nonlinear variable in the list of cj&#39;s.
IntRange< T > make_range(T beg, T end)
unsigned int _num_c
Number of global concentrations.
std::vector< VariableName > _eta_names
Phase parameters.
KKSMultiACBulkBase(const InputParameters &parameters)
std::vector< std::vector< MaterialPropertyName > > _ci_name_matrix
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1db1
Second derivative of the free energy function .

Member Function Documentation

◆ computeDFDOP() [1/2]

Real NestedKKSMultiACBulkC::computeDFDOP ( PFFunctionType  type)
protectedvirtual

For when this kernel is used in the Lagrange multiplier equation In that case the Lagrange multiplier is the nonlinear variable

Definition at line 123 of file NestedKKSMultiACBulkC.C.

124 {
125  Real sum = 0.0;
126 
127  switch (type)
128  {
129  case Residual:
130 
131  for (const auto m : make_range(_num_c))
132  {
133  Real sum1 = 0.0;
134 
135  for (const auto n : make_range(_num_j))
136  sum1 += (*_prop_dhjdetai[n])[_qp] * (*_prop_ci[m][n])[_qp];
137 
138  sum += (*_dF1dc1[m])[_qp] * sum1;
139  }
140 
141  return -sum;
142 
143  case Jacobian:
146  if (_etai_var != _var.number())
147  return 0.0;
148 
149  for (const auto m : make_range(_num_c))
150  {
151  Real sum1 = 0.0;
152  Real sum2 = 0.0;
153  Real sum3 = 0.0;
154 
155  for (const auto n : make_range(_num_c))
156  sum1 += (*_d2F1dc1db1[m][n])[_qp] * (*_dcidetaj[n][0][_k])[_qp];
157 
158  for (const auto l : make_range(_num_j))
159  {
160  sum2 += (*_prop_dhjdetai[l])[_qp] * (*_prop_ci[m][l])[_qp];
161 
162  sum3 += (*_prop_d2hjdetaidetap[l][_k])[_qp] * (*_prop_ci[m][l])[_qp] +
163  (*_prop_dhjdetai[l])[_qp] * (*_dcidetaj[m][l][_k])[_qp];
164  }
165 
166  sum += sum1 * sum2 + (*_dF1dc1[m])[_qp] * sum3;
167  }
168 
169  return -sum * _phi[_j][_qp];
170  }
171 
172  mooseError("Invalid type passed in");
173 }
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_ci
void mooseError(Args &&... args)
std::vector< const MaterialProperty< Real > * > _dF1dc1
Derivative of the free energy function .
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidetaj
Derivative of phase concentrations wrt etaj .
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidetap
Second derivative of switching function .
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
int _k
Position of the nonlinear variable in the list of cj&#39;s.
IntRange< T > make_range(T beg, T end)
unsigned int _num_c
Number of global concentrations.
unsigned int _etai_var
index of order parameter that derivatives are taken wrt
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1db1
Second derivative of the free energy function .

◆ computeDFDOP() [2/2]

virtual Real ACBulk< Real >::computeDFDOP ( PFFunctionType  type)
protectedpure virtualinherited

◆ computeQpOffDiagJacobian()

Real NestedKKSMultiACBulkC::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 176 of file NestedKKSMultiACBulkC.C.

177 {
178  // first get dependence of mobility _L on other variables using parent class member function Real
180 
181  Real sum = 0.0;
182 
183  // Then add dependence of KKSACBulkF on other variables if other cs are the coupled variables
184  auto compvar = mapJvarToCvar(jvar, _c_map);
185  if (compvar >= 0)
186  {
187  for (const auto m : make_range(_num_c))
188  {
189  Real sum1 = 0.0;
190  Real sum2 = 0.0;
191  Real sum3 = 0.0;
192 
193  for (const auto n : make_range(_num_c))
194  sum1 += (*_d2F1dc1db1[m][n])[_qp] * (*_dcidb[n][0][compvar])[_qp];
195 
196  for (const auto l : make_range(_num_j))
197  {
198  sum2 += (*_prop_dhjdetai[l])[_qp] * (*_prop_ci[m][l])[_qp];
199  sum3 += (*_prop_dhjdetai[l])[_qp] * (*_dcidb[m][l][compvar])[_qp];
200  }
201 
202  sum += sum1 * sum2 + (*_dF1dc1[m])[_qp] * sum3;
203  }
204 
205  res += -_L[_qp] * sum * _phi[_j][_qp] * _test[_i][_qp];
206 
207  return res;
208  }
209 
210  // if order parameters are the coupled variables
211  auto etavar = mapJvarToCvar(jvar, _eta_map);
212  if (etavar >= 0)
213  {
214  for (const auto m : make_range(_num_c))
215  {
216  Real sum1 = 0.0;
217  Real sum2 = 0.0;
218  Real sum3 = 0.0;
219 
220  for (const auto n : make_range(_num_c))
221  sum1 += (*_d2F1dc1db1[m][n])[_qp] * (*_dcidetaj[n][0][etavar])[_qp];
222 
223  for (const auto l : make_range(_num_j))
224  {
225  sum2 += (*_prop_dhjdetai[l])[_qp] * (*_prop_ci[m][l])[_qp];
226 
227  sum3 += (*_prop_d2hjdetaidetap[l][etavar])[_qp] * (*_prop_ci[m][l])[_qp] +
228  (*_prop_dhjdetai[l])[_qp] * (*_dcidetaj[m][l][etavar])[_qp];
229  }
230 
231  sum += sum1 * sum2 + (*_dF1dc1[m])[_qp] * sum3;
232  }
233 
234  res += -_L[_qp] * sum * _phi[_j][_qp] * _test[_i][_qp];
235  }
236 
237  // for all other vars get the coupled variable jvar is referring to
238  const unsigned int cvar = mapJvarToCvar(jvar);
239  for (unsigned int m = 0; m < _num_c; ++m)
240  {
241  Real sum1 = 0.0;
242 
243  for (const auto n : make_range(_num_j))
244  sum1 += (*_d2F1dc1darg[m][cvar])[_qp] * (*_prop_dhjdetai[n])[_qp] * (*_prop_ci[m][n])[_qp];
245 
246  res += -_L[_qp] * sum1 * _phi[_j][_qp] * _test[_i][_qp];
247  }
248 
249  return res;
250 }
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1darg
Mixed partial derivatives of the free energy function wrt c and any other coupled variables ...
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_ci
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidb
Derivative of phase concentrations wrt global concentrations .
std::vector< const MaterialProperty< Real > * > _dF1dc1
Derivative of the free energy function .
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _dcidetaj
Derivative of phase concentrations wrt etaj .
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidetap
Second derivative of switching function .
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: ACBulk.h:110
IntRange< T > make_range(T beg, T end)
unsigned int _num_c
Number of global concentrations.
std::vector< std::vector< const MaterialProperty< Real > * > > _d2F1dc1db1
Second derivative of the free energy function .

◆ initialSetup()

void KKSMultiACBulkBase::initialSetup ( )
virtualinherited

Reimplemented from ACBulk< Real >.

Definition at line 72 of file KKSMultiACBulkBase.C.

73 {
75 
76  for (unsigned int n = 0; n < _num_j; ++n)
77  {
78  validateNonlinearCoupling<Real>(_Fj_names[n]);
79  validateNonlinearCoupling<Real>(_hj_names[n]);
80  }
81 }
virtual void initialSetup()
Definition: ACBulk.h:79
std::vector< MaterialPropertyName > _Fj_names
Names of free energy functions for each phase .
std::vector< MaterialPropertyName > _hj_names
switching function names

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 97 of file ACBulk.h.

98 {
99  // Get free energy derivative and Jacobian
100  Real dFdop = computeDFDOP(Residual);
101 
102  Real JdFdop = computeDFDOP(Jacobian);
103 
104  // Set Jacobian value using product rule
105  return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
106 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
virtual Real computeDFDOP(PFFunctionType type)=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:49

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 86 of file ACBulk.h.

87 {
88  // Get free energy derivative from function
89  Real dFdop = computeDFDOP(Residual);
90 
91  // Set residual
92  return _L[_qp] * dFdop;
93 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
virtual Real computeDFDOP(PFFunctionType type)=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ validParams()

InputParameters NestedKKSMultiACBulkC::validParams ( )
static

Definition at line 15 of file NestedKKSMultiACBulkC.C.

16 {
18  params.addClassDescription("Multi-phase KKS model kernel (part 2 of 2) for the Bulk Allen-Cahn. "
19  "This includes all terms dependent on chemical potential.");
20  params.addRequiredCoupledVar("global_cs", "Global concentrations, for example, c, b.");
21  params.addRequiredCoupledVar("all_etas", "Order parameters.");
22  params.addRequiredParam<std::vector<MaterialPropertyName>>(
23  "ci_names",
24  "Phase concentrations. They must have the same order as Fj_names and global_cs, for "
25  "example, c1, c2, b1, b2.");
26  return params;
27 }
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _c_map

const JvarMap& NestedKKSMultiACBulkC::_c_map
protected

Definition at line 34 of file NestedKKSMultiACBulkC.h.

Referenced by computeQpOffDiagJacobian().

◆ _c_names

std::vector<VariableName> NestedKKSMultiACBulkC::_c_names
protected

Global concentrations.

Definition at line 33 of file NestedKKSMultiACBulkC.h.

Referenced by NestedKKSMultiACBulkC().

◆ _ci_name_matrix

std::vector<std::vector<MaterialPropertyName> > NestedKKSMultiACBulkC::_ci_name_matrix
protected

Definition at line 49 of file NestedKKSMultiACBulkC.h.

Referenced by NestedKKSMultiACBulkC().

◆ _ci_names

std::vector<MaterialPropertyName> NestedKKSMultiACBulkC::_ci_names
protected

Phase concentrations.

Definition at line 48 of file NestedKKSMultiACBulkC.h.

Referenced by NestedKKSMultiACBulkC().

◆ _d2F1dc1darg

std::vector<std::vector<const MaterialProperty<Real> *> > NestedKKSMultiACBulkC::_d2F1dc1darg
protected

Mixed partial derivatives of the free energy function wrt c and any other coupled variables \( \frac {d^2}{dc_1 dq} F_1 \).

Definition at line 70 of file NestedKKSMultiACBulkC.h.

Referenced by computeQpOffDiagJacobian(), and NestedKKSMultiACBulkC().

◆ _d2F1dc1db1

std::vector<std::vector<const MaterialProperty<Real> *> > NestedKKSMultiACBulkC::_d2F1dc1db1
protected

Second derivative of the free energy function \( \frac {d^2}{dc_1 db_1} F_1 \).

Definition at line 66 of file NestedKKSMultiACBulkC.h.

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

◆ _dcidb

std::vector<std::vector<std::vector<const MaterialProperty<Real> *> > > NestedKKSMultiACBulkC::_dcidb
protected

Derivative of phase concentrations wrt global concentrations \( \frac d{db} c_i \).

Definition at line 57 of file NestedKKSMultiACBulkC.h.

Referenced by computeQpOffDiagJacobian(), and NestedKKSMultiACBulkC().

◆ _dcidetaj

std::vector<std::vector<std::vector<const MaterialProperty<Real> *> > > NestedKKSMultiACBulkC::_dcidetaj
protected

Derivative of phase concentrations wrt etaj \( \frac d{d{eta_j}} c_i \).

Definition at line 54 of file NestedKKSMultiACBulkC.h.

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

◆ _dF1dc1

std::vector<const MaterialProperty<Real> *> NestedKKSMultiACBulkC::_dF1dc1
protected

Derivative of the free energy function \( \frac d{dc_1} F_1 \).

Definition at line 63 of file NestedKKSMultiACBulkC.h.

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

◆ _dLdarg

std::vector<const MaterialProperty<Real > *> ACBulk< Real >::_dLdarg
protectedinherited

Mobility derivative w.r.t coupled variables.

Definition at line 52 of file ACBulk.h.

◆ _dLdop

const MaterialProperty<Real >& ACBulk< Real >::_dLdop
protectedinherited

Mobility derivative w.r.t. order parameter.

Definition at line 49 of file ACBulk.h.

◆ _eta_map

const JvarMap& NestedKKSMultiACBulkC::_eta_map
protected

Definition at line 41 of file NestedKKSMultiACBulkC.h.

Referenced by computeQpOffDiagJacobian().

◆ _eta_names

std::vector<VariableName> NestedKKSMultiACBulkC::_eta_names
protected

Phase parameters.

Definition at line 40 of file NestedKKSMultiACBulkC.h.

Referenced by NestedKKSMultiACBulkC().

◆ _etai_name

VariableName KKSMultiACBulkBase::_etai_name
protectedinherited

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

Definition at line 34 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::KKSMultiACBulkBase().

◆ _etai_var

unsigned int KKSMultiACBulkBase::_etai_var
protectedinherited

◆ _Fj_names

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

◆ _hj_names

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

◆ _k

int NestedKKSMultiACBulkC::_k
protected

Position of the nonlinear variable in the list of cj's.

Definition at line 45 of file NestedKKSMultiACBulkC.h.

Referenced by computeDFDOP(), and NestedKKSMultiACBulkC().

◆ _L

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited

◆ _num_c

unsigned int NestedKKSMultiACBulkC::_num_c
protected

Number of global concentrations.

Definition at line 37 of file NestedKKSMultiACBulkC.h.

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

◆ _num_j

unsigned int KKSMultiACBulkBase::_num_j
protectedinherited

◆ _prop_ci

std::vector<std::vector<const MaterialProperty<Real> *> > NestedKKSMultiACBulkC::_prop_ci
protected

◆ _prop_d2hjdetai2

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

Second 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(), and KKSMultiACBulkBase::KKSMultiACBulkBase().

◆ _prop_d2hjdetaidarg

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

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

Definition at line 62 of file KKSMultiACBulkBase.h.

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

◆ _prop_d2hjdetaidetap

std::vector<std::vector<const MaterialProperty<Real> *> > NestedKKSMultiACBulkC::_prop_d2hjdetaidetap
protected

Second derivative of switching function \( \frac {d^2}{deta_i deta_p} h_j \).

Definition at line 60 of file NestedKKSMultiACBulkC.h.

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

◆ _prop_dFjdarg

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

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

Definition at line 47 of file KKSMultiACBulkBase.h.

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

◆ _prop_dhjdetai

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

◆ _prop_Fj

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

◆ _prop_hj

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

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

Definition at line 53 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::KKSMultiACBulkBase().


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