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

Models thermo-diffusion (aka Soret effect, thermophoresis, etc.). More...

#include <ThermoDiffusion.h>

Inheritance diagram for ThermoDiffusion:
[legend]

Public Member Functions

 ThermoDiffusion (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 Computes contribution from grad( T ) / T^2 term. More...
 

Private Member Functions

RealGradient thermoDiffusionVelocity () const
 

Private Attributes

const VariableValue & _temperature
 
const VariableGradient & _grad_temperature
 
const MaterialProperty< Real > & _mass_diffusivity
 
const MaterialProperty< Real > & _heat_of_transport
 
const Real _gas_constant
 
const unsigned int _temperature_index
 

Detailed Description

Models thermo-diffusion (aka Soret effect, thermophoresis, etc.).

The mass flux J due to the thermal gradient is:

J_thermal = - ( D C Qstar / ( R T^2 ) ) * grad( T )

where D is the mass diffusivity (same as for Fick's law), C is the concentration Qstar is the heat of transport, R is the gas constant, and T is the temperature. Note that that grad( T ) / T^2 == -grad( 1/T ), which is how the term appears in Onsager's symmetry (this kernel works just as well for that form).

Also note that coupled diffusion terms like ThermoDiffusion (and Nernst, Ettingshausen, Dufour effects) can cause non-physical stability issues if a regular diffusion term is not included. Thus, ThermoDiffusion should always appear with a Fick's Law kernel such as CoefDiffusion.

The only restriction on the units of C, Qstar, and R is that they should be consistent with each other and with C and T (could be mass ppm, mols/m^3, etc.).

This kernel applies to the concentration C, but the off-diagonal terms in the Jacobian that are due to temperature dependence are also available.

Definition at line 37 of file ThermoDiffusion.h.

Constructor & Destructor Documentation

◆ ThermoDiffusion()

ThermoDiffusion::ThermoDiffusion ( const InputParameters &  parameters)

Definition at line 30 of file ThermoDiffusion.C.

31  : Kernel(parameters),
32  _temperature(coupledValue("temp")),
33  _grad_temperature(coupledGradient("temp")),
34  _mass_diffusivity(getMaterialProperty<Real>(getParam<std::string>("mass_diffusivity"))),
35  _heat_of_transport(getMaterialProperty<Real>(getParam<std::string>("heat_of_transport"))),
36  _gas_constant(getParam<Real>("gas_constant")),
37  _temperature_index(coupled("temp"))
38 {
39 }

Member Function Documentation

◆ computeQpJacobian()

Real ThermoDiffusion::computeQpJacobian ( )
protectedvirtual

Definition at line 63 of file ThermoDiffusion.C.

64 {
65  return thermoDiffusionVelocity() * _phi[_j][_qp] * _grad_test[_i][_qp];
66 }

◆ computeQpOffDiagJacobian()

Real ThermoDiffusion::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Computes contribution from grad( T ) / T^2 term.

Definition at line 69 of file ThermoDiffusion.C.

70 {
71  if (jvar == _temperature_index)
72  {
73  Real coeff = _mass_diffusivity[_qp] * _heat_of_transport[_qp] /
74  (_gas_constant * _temperature[_qp] * _temperature[_qp]);
75  return coeff * _grad_test[_i][_qp] * _u[_qp] *
76  (_grad_phi[_j][_qp] - 2 * _phi[_j][_qp] * _grad_temperature[_qp] / _temperature[_qp]);
77  }
78  return 0;
79 }

◆ computeQpResidual()

Real ThermoDiffusion::computeQpResidual ( )
protectedvirtual

Definition at line 57 of file ThermoDiffusion.C.

58 {
59  return thermoDiffusionVelocity() * _u[_qp] * _grad_test[_i][_qp];
60 }

◆ thermoDiffusionVelocity()

RealGradient ThermoDiffusion::thermoDiffusionVelocity ( ) const
private

Definition at line 42 of file ThermoDiffusion.C.

43 {
44  // The thermo-diffusion term looks like grad( v * C ) where v is like a diffusive
45  // velocity. If the concentration C does not couple back into the heat equation,
46  // then the one-way coupling of temperature means that thermo-diffusion of C
47  // behaves like advection. Then v is the velocity:
48  //
49  // v = D Qstar grad(T) / ( R T^2 )
50  //
51  Real coeff = _mass_diffusivity[_qp] * _heat_of_transport[_qp] /
52  (_gas_constant * _temperature[_qp] * _temperature[_qp]);
53  return coeff * _grad_temperature[_qp];
54 }

Referenced by computeQpJacobian(), and computeQpResidual().

Member Data Documentation

◆ _gas_constant

const Real ThermoDiffusion::_gas_constant
private

Definition at line 59 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

◆ _grad_temperature

const VariableGradient& ThermoDiffusion::_grad_temperature
private

Definition at line 56 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

◆ _heat_of_transport

const MaterialProperty<Real>& ThermoDiffusion::_heat_of_transport
private

Definition at line 58 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

◆ _mass_diffusivity

const MaterialProperty<Real>& ThermoDiffusion::_mass_diffusivity
private

Definition at line 57 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

◆ _temperature

const VariableValue& ThermoDiffusion::_temperature
private

Definition at line 55 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

◆ _temperature_index

const unsigned int ThermoDiffusion::_temperature_index
private

Definition at line 60 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian().


The documentation for this class was generated from the following files:
ThermoDiffusion::_grad_temperature
const VariableGradient & _grad_temperature
Definition: ThermoDiffusion.h:56
ThermoDiffusion::_mass_diffusivity
const MaterialProperty< Real > & _mass_diffusivity
Definition: ThermoDiffusion.h:57
ThermoDiffusion::_temperature
const VariableValue & _temperature
Definition: ThermoDiffusion.h:55
ThermoDiffusion::_heat_of_transport
const MaterialProperty< Real > & _heat_of_transport
Definition: ThermoDiffusion.h:58
ThermoDiffusion::thermoDiffusionVelocity
RealGradient thermoDiffusionVelocity() const
Definition: ThermoDiffusion.C:42
ThermoDiffusion::_temperature_index
const unsigned int _temperature_index
Definition: ThermoDiffusion.h:60
ThermoDiffusion::_gas_constant
const Real _gas_constant
Definition: ThermoDiffusion.h:59