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

SoretDiffusion adds the soret effect in the split form of the Cahn-Hilliard equation. More...

#include <SoretDiffusion.h>

Inheritance diagram for SoretDiffusion:
[legend]

Public Member Functions

 SoretDiffusion (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

unsigned int _T_var
 int label for temperature variable More...
 
const VariableValue & _T
 Coupled variable for the temperature. More...
 
const VariableGradient & _grad_T
 Variable gradient for temperature. More...
 
const bool _is_coupled
 is the kernel used in a coupled form? More...
 
unsigned int _c_var
 int label for the Concentration More...
 
const VariableValue & _c
 Variable value for the concentration. More...
 
const MaterialProperty< Real > & _D
 Diffusivity material property. More...
 
const MaterialProperty< Real > & _Q
 Heat of transport material property. More...
 
const Real _kB
 Boltzmann constant. More...
 

Detailed Description

SoretDiffusion adds the soret effect in the split form of the Cahn-Hilliard equation.

Definition at line 21 of file SoretDiffusion.h.

Constructor & Destructor Documentation

SoretDiffusion::SoretDiffusion ( const InputParameters &  parameters)

Definition at line 27 of file SoretDiffusion.C.

28  : Kernel(parameters),
29  _T_var(coupled("T")),
30  _T(coupledValue("T")),
31  _grad_T(coupledGradient("T")),
32  _is_coupled(isCoupled("c")),
33  _c_var(_is_coupled ? coupled("c") : _var.number()),
34  _c(_is_coupled ? coupledValue("c") : _u),
35  _D(getMaterialProperty<Real>("diff_name")),
36  _Q(getMaterialProperty<Real>("Q_name")),
37  _kB(8.617343e-5) // Boltzmann constant in eV/K
38 {
39 }
const MaterialProperty< Real > & _D
Diffusivity material property.
const Real _kB
Boltzmann constant.
const VariableGradient & _grad_T
Variable gradient for temperature.
const MaterialProperty< Real > & _Q
Heat of transport material property.
const VariableValue & _c
Variable value for the concentration.
unsigned int _c_var
int label for the Concentration
const VariableValue & _T
Coupled variable for the temperature.
const bool _is_coupled
is the kernel used in a coupled form?
unsigned int _T_var
int label for temperature variable

Member Function Documentation

Real SoretDiffusion::computeQpCJacobian ( )
protectedvirtual

Definition at line 71 of file SoretDiffusion.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

72 {
73  // Calculate the Jacobian for the c variable
74  return _D[_qp] * _Q[_qp] * _phi[_j][_qp] * _grad_T[_qp] / (_kB * _T[_qp] * _T[_qp]) *
75  _grad_test[_i][_qp];
76 }
const MaterialProperty< Real > & _D
Diffusivity material property.
const Real _kB
Boltzmann constant.
const VariableGradient & _grad_T
Variable gradient for temperature.
const MaterialProperty< Real > & _Q
Heat of transport material property.
const VariableValue & _T
Coupled variable for the temperature.
Real SoretDiffusion::computeQpJacobian ( )
protectedvirtual

Definition at line 49 of file SoretDiffusion.C.

50 {
51  return _is_coupled ? 0.0 : computeQpCJacobian();
52 }
const bool _is_coupled
is the kernel used in a coupled form?
virtual Real computeQpCJacobian()
Real SoretDiffusion::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 55 of file SoretDiffusion.C.

56 {
57  // c Off-Diagonal Jacobian
58  if (_c_var == jvar)
59  return computeQpCJacobian();
60 
61  // T Off-Diagonal Jacobian
62  if (_T_var == jvar)
63  return _D[_qp] * _Q[_qp] * _c[_qp] * _grad_test[_i][_qp] *
64  (_grad_phi[_j][_qp] - 2.0 * _grad_T[_qp] * _phi[_j][_qp] / _T[_qp]) /
65  (_kB * _T[_qp] * _T[_qp]);
66 
67  return 0.0;
68 }
const MaterialProperty< Real > & _D
Diffusivity material property.
const Real _kB
Boltzmann constant.
const VariableGradient & _grad_T
Variable gradient for temperature.
const MaterialProperty< Real > & _Q
Heat of transport material property.
const VariableValue & _c
Variable value for the concentration.
unsigned int _c_var
int label for the Concentration
const VariableValue & _T
Coupled variable for the temperature.
virtual Real computeQpCJacobian()
unsigned int _T_var
int label for temperature variable
Real SoretDiffusion::computeQpResidual ( )
protectedvirtual

Definition at line 42 of file SoretDiffusion.C.

43 {
44  const Real T_term = _D[_qp] * _Q[_qp] * _c[_qp] / (_kB * _T[_qp] * _T[_qp]);
45  return T_term * _grad_T[_qp] * _grad_test[_i][_qp];
46 }
const MaterialProperty< Real > & _D
Diffusivity material property.
const Real _kB
Boltzmann constant.
const VariableGradient & _grad_T
Variable gradient for temperature.
const MaterialProperty< Real > & _Q
Heat of transport material property.
const VariableValue & _c
Variable value for the concentration.
const VariableValue & _T
Coupled variable for the temperature.

Member Data Documentation

const VariableValue& SoretDiffusion::_c
protected

Variable value for the concentration.

Definition at line 48 of file SoretDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

unsigned int SoretDiffusion::_c_var
protected

int label for the Concentration

Definition at line 45 of file SoretDiffusion.h.

Referenced by computeQpOffDiagJacobian().

const MaterialProperty<Real>& SoretDiffusion::_D
protected

Diffusivity material property.

Definition at line 51 of file SoretDiffusion.h.

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

const VariableGradient& SoretDiffusion::_grad_T
protected

Variable gradient for temperature.

Definition at line 39 of file SoretDiffusion.h.

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

const bool SoretDiffusion::_is_coupled
protected

is the kernel used in a coupled form?

Definition at line 42 of file SoretDiffusion.h.

Referenced by computeQpJacobian().

const Real SoretDiffusion::_kB
protected

Boltzmann constant.

Definition at line 57 of file SoretDiffusion.h.

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

const MaterialProperty<Real>& SoretDiffusion::_Q
protected

Heat of transport material property.

Definition at line 54 of file SoretDiffusion.h.

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

const VariableValue& SoretDiffusion::_T
protected

Coupled variable for the temperature.

Definition at line 36 of file SoretDiffusion.h.

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

unsigned int SoretDiffusion::_T_var
protected

int label for temperature variable

Definition at line 33 of file SoretDiffusion.h.

Referenced by computeQpOffDiagJacobian().


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