www.mooseframework.org
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
KKSPhaseConcentration Class Reference

Enforce sum of phase concentrations to be the real concentration. More...

#include <KKSPhaseConcentration.h>

Inheritance diagram for KKSPhaseConcentration:
[legend]

Public Member Functions

 KKSPhaseConcentration (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Private Attributes

const VariableValue & _ca
 
unsigned int _ca_var
 
const VariableValue & _c
 
unsigned int _c_var
 
const VariableValue & _eta
 
unsigned int _eta_var
 
const MaterialProperty< Real > & _prop_h
 Switching function \( h(\eta) \). More...
 
const MaterialProperty< Real > & _prop_dh
 Derivative of the switching function \( \frac d{d\eta} h(\eta) \). More...
 

Detailed Description

Enforce sum of phase concentrations to be the real concentration.

\( c=h(\eta)c_a+\left(1-h(\eta)\right)c_b\)

The non-linear variable for this Kernel is the concentration \( c_b \), while \( c_a \) and \( c \) are supplied as coupled variables. (compare this to KKSPhaseChemicalPotential, where the non-linear variable is the other phase concentration \( c_a \)!)

See also
KKSPhaseChemicalPotential
KKSHEtaPolyMaterial

Definition at line 32 of file KKSPhaseConcentration.h.

Constructor & Destructor Documentation

KKSPhaseConcentration::KKSPhaseConcentration ( const InputParameters &  parameters)

Definition at line 27 of file KKSPhaseConcentration.C.

28  : DerivativeMaterialInterface<Kernel>(parameters),
29  _ca(coupledValue("ca")),
30  _ca_var(coupled("ca")),
31  _c(coupledValue("c")),
32  _c_var(coupled("c")),
33  _eta(coupledValue("eta")),
34  _eta_var(coupled("eta")),
35  _prop_h(getMaterialProperty<Real>("h_name")),
36  _prop_dh(getMaterialPropertyDerivative<Real>("h_name", getVar("eta", 0)->name()))
37 {
38 }
const VariableValue & _c
const VariableValue & _eta
const VariableValue & _ca
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
const MaterialProperty< Real > & _prop_h
Switching function .

Member Function Documentation

Real KKSPhaseConcentration::computeQpJacobian ( )
protectedvirtual

Definition at line 48 of file KKSPhaseConcentration.C.

49 {
50  return _test[_i][_qp] * _prop_h[_qp] * _phi[_j][_qp];
51 }
const MaterialProperty< Real > & _prop_h
Switching function .
Real KKSPhaseConcentration::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 54 of file KKSPhaseConcentration.C.

55 {
56  if (jvar == _ca_var)
57  return _test[_i][_qp] * (1.0 - _prop_h[_qp]) * _phi[_j][_qp];
58 
59  else if (jvar == _c_var)
60  return -_test[_i][_qp] * _phi[_j][_qp];
61 
62  else if (jvar == _eta_var)
63  return _test[_i][_qp] * (_u[_qp] - _ca[_qp]) * _prop_dh[_qp] * _phi[_j][_qp];
64 
65  return 0.0;
66 }
const VariableValue & _ca
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
const MaterialProperty< Real > & _prop_h
Switching function .
Real KKSPhaseConcentration::computeQpResidual ( )
protectedvirtual

Definition at line 41 of file KKSPhaseConcentration.C.

42 {
43  // R = (1-h(eta))*ca + h(eta)*cb - c
44  return _test[_i][_qp] * ((1.0 - _prop_h[_qp]) * _ca[_qp] + _prop_h[_qp] * _u[_qp] - _c[_qp]);
45 }
const VariableValue & _c
const VariableValue & _ca
const MaterialProperty< Real > & _prop_h
Switching function .

Member Data Documentation

const VariableValue& KKSPhaseConcentration::_c
private

Definition at line 46 of file KKSPhaseConcentration.h.

Referenced by computeQpResidual().

unsigned int KKSPhaseConcentration::_c_var
private

Definition at line 47 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

const VariableValue& KKSPhaseConcentration::_ca
private

Definition at line 43 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

unsigned int KKSPhaseConcentration::_ca_var
private

Definition at line 44 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

const VariableValue& KKSPhaseConcentration::_eta
private

Definition at line 49 of file KKSPhaseConcentration.h.

unsigned int KKSPhaseConcentration::_eta_var
private

Definition at line 50 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

const MaterialProperty<Real>& KKSPhaseConcentration::_prop_dh
private

Derivative of the switching function \( \frac d{d\eta} h(\eta) \).

Definition at line 56 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

const MaterialProperty<Real>& KKSPhaseConcentration::_prop_h
private

Switching function \( h(\eta) \).

Definition at line 53 of file KKSPhaseConcentration.h.

Referenced by computeQpJacobian(), computeQpOffDiagJacobian(), and computeQpResidual().


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