forked from idaholab/moose
/
KKSCHBulk.h
73 lines (58 loc) · 2.24 KB
/
KKSCHBulk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/****************************************************************/
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* All contents are licensed under LGPL V2.1 */
/* See LICENSE for full restrictions */
/****************************************************************/
#ifndef KKSCHBULK_H
#define KKSCHBULK_H
#include "CHBulk.h"
//Forward Declarations
class KKSCHBulk;
template<>
InputParameters validParams<KKSCHBulk>();
/**
* CHBulk child class that takes all the necessary data from a
* KKSBaseMaterial.
* We calculate \f$ \nabla\frac{\partial F_a}{\partial c_a} \f$.
* This takes advantage of the KKS identity
*
* \f$ dF/dc = dF_a/dc_a (= dF_b/dc_b) \f$
*
* The non-linear variable for this Kernel is the concentration 'c'.
* The user picks one phase free energy \f$ F_a \f$ (f_base) and its corresponding
* phase concentration \f$ c_a \f$
*/
class KKSCHBulk : public CHBulk<Real>
{
public:
KKSCHBulk(const InputParameters & parameters);
protected:
virtual RealGradient computeGradDFDCons(PFFunctionType type);
virtual Real computeQpOffDiagJacobian(unsigned int jvar);
private:
/// Number of coupled variables
unsigned int _nvar;
///@{
/// Phase concnetration variables
unsigned int _ca_var;
const VariableName _ca_name;
unsigned int _cb_var;
const VariableName _cb_name;
///@}
/// Derivatives of \f$ dFa/dca \f$ with respect to all coupled variables
std::vector<const MaterialProperty<Real> *> _second_derivatives;
/// Second derivatives of dFa/dca with respect to all coupled variables
std::vector<std::vector<const MaterialProperty<Real> *> > _third_derivatives;
/// Derivatives of \f$ d^2Fa/dca^2 \f$ with respect to all coupled variables
std::vector<const MaterialProperty<Real> *> _third_derivatives_ca;
/// Gradients for all coupled variables
std::vector<VariableGradient *> _grad_args;
/// h(eta) material property
const MaterialProperty<Real> & _prop_h;
/// Second derivative \f$ d^2Fa/dca^2 \f$
const MaterialProperty<Real> & _second_derivative_Fa;
/// Second derivative \f$ d^2Fb/dcb^2 \f$
const MaterialProperty<Real> & _second_derivative_Fb;
};
#endif //KKSCHBULK_H