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 35 of file KKSPhaseConcentration.h.

Constructor & Destructor Documentation

◆ KKSPhaseConcentration()

KKSPhaseConcentration::KKSPhaseConcentration ( const InputParameters &  parameters)

Definition at line 32 of file KKSPhaseConcentration.C.

33  : DerivativeMaterialInterface<Kernel>(parameters),
34  _ca(coupledValue("ca")),
35  _ca_var(coupled("ca")),
36  _c(coupledValue("c")),
37  _c_var(coupled("c")),
38  _eta(coupledValue("eta")),
39  _eta_var(coupled("eta")),
40  _prop_h(getMaterialProperty<Real>("h_name")),
41  _prop_dh(getMaterialPropertyDerivative<Real>("h_name", getVar("eta", 0)->name()))
42 {
43 }
const VariableValue & _c
const VariableValue & _eta
const std::string name
Definition: Setup.h:22
const VariableValue & _ca
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
const MaterialProperty< Real > & _prop_h
Switching function .

Member Function Documentation

◆ computeQpJacobian()

Real KKSPhaseConcentration::computeQpJacobian ( )
protectedvirtual

Definition at line 53 of file KKSPhaseConcentration.C.

54 {
55  return _test[_i][_qp] * _prop_h[_qp] * _phi[_j][_qp];
56 }
const MaterialProperty< Real > & _prop_h
Switching function .

◆ computeQpOffDiagJacobian()

Real KKSPhaseConcentration::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 59 of file KKSPhaseConcentration.C.

60 {
61  if (jvar == _ca_var)
62  return _test[_i][_qp] * (1.0 - _prop_h[_qp]) * _phi[_j][_qp];
63 
64  else if (jvar == _c_var)
65  return -_test[_i][_qp] * _phi[_j][_qp];
66 
67  else if (jvar == _eta_var)
68  return _test[_i][_qp] * (_u[_qp] - _ca[_qp]) * _prop_dh[_qp] * _phi[_j][_qp];
69 
70  return 0.0;
71 }
const VariableValue & _ca
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
const MaterialProperty< Real > & _prop_h
Switching function .

◆ computeQpResidual()

Real KKSPhaseConcentration::computeQpResidual ( )
protectedvirtual

Definition at line 46 of file KKSPhaseConcentration.C.

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

Member Data Documentation

◆ _c

const VariableValue& KKSPhaseConcentration::_c
private

Definition at line 49 of file KKSPhaseConcentration.h.

Referenced by computeQpResidual().

◆ _c_var

unsigned int KKSPhaseConcentration::_c_var
private

Definition at line 50 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

◆ _ca

const VariableValue& KKSPhaseConcentration::_ca
private

Definition at line 46 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _ca_var

unsigned int KKSPhaseConcentration::_ca_var
private

Definition at line 47 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

◆ _eta

const VariableValue& KKSPhaseConcentration::_eta
private

Definition at line 52 of file KKSPhaseConcentration.h.

◆ _eta_var

unsigned int KKSPhaseConcentration::_eta_var
private

Definition at line 53 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

◆ _prop_dh

const MaterialProperty<Real>& KKSPhaseConcentration::_prop_dh
private

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

Definition at line 59 of file KKSPhaseConcentration.h.

Referenced by computeQpOffDiagJacobian().

◆ _prop_h

const MaterialProperty<Real>& KKSPhaseConcentration::_prop_h
private

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

Definition at line 56 of file KKSPhaseConcentration.h.

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


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