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

Constructor & Destructor Documentation

ThermoDiffusion::ThermoDiffusion ( const InputParameters &  parameters)

Definition at line 25 of file ThermoDiffusion.C.

26  : Kernel(parameters),
27  _temperature(coupledValue("temp")),
28  _grad_temperature(coupledGradient("temp")),
29  _mass_diffusivity(getMaterialProperty<Real>(getParam<std::string>("mass_diffusivity"))),
30  _heat_of_transport(getMaterialProperty<Real>(getParam<std::string>("heat_of_transport"))),
31  _gas_constant(getParam<Real>("gas_constant")),
32  _temperature_index(coupled("temp"))
33 {
34 }
const VariableGradient & _grad_temperature
const MaterialProperty< Real > & _heat_of_transport
const MaterialProperty< Real > & _mass_diffusivity
const Real _gas_constant
const VariableValue & _temperature
const unsigned int _temperature_index

Member Function Documentation

Real ThermoDiffusion::computeQpJacobian ( )
protectedvirtual

Definition at line 58 of file ThermoDiffusion.C.

59 {
60  return thermoDiffusionVelocity() * _phi[_j][_qp] * _grad_test[_i][_qp];
61 }
RealGradient thermoDiffusionVelocity() const
Real ThermoDiffusion::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

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

Definition at line 64 of file ThermoDiffusion.C.

65 {
66  if (jvar == _temperature_index)
67  {
68  Real coeff = _mass_diffusivity[_qp] * _heat_of_transport[_qp] /
69  (_gas_constant * _temperature[_qp] * _temperature[_qp]);
70  return coeff * _grad_test[_i][_qp] * _u[_qp] *
71  (_grad_phi[_j][_qp] - 2 * _phi[_j][_qp] * _grad_temperature[_qp] / _temperature[_qp]);
72  }
73  return 0;
74 }
const VariableGradient & _grad_temperature
const MaterialProperty< Real > & _heat_of_transport
const MaterialProperty< Real > & _mass_diffusivity
const Real _gas_constant
const VariableValue & _temperature
const unsigned int _temperature_index
Real ThermoDiffusion::computeQpResidual ( )
protectedvirtual

Definition at line 52 of file ThermoDiffusion.C.

53 {
54  return thermoDiffusionVelocity() * _u[_qp] * _grad_test[_i][_qp];
55 }
RealGradient thermoDiffusionVelocity() const
RealGradient ThermoDiffusion::thermoDiffusionVelocity ( ) const
private

Definition at line 37 of file ThermoDiffusion.C.

Referenced by computeQpJacobian(), and computeQpResidual().

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

Member Data Documentation

const Real ThermoDiffusion::_gas_constant
private

Definition at line 57 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

const VariableGradient& ThermoDiffusion::_grad_temperature
private

Definition at line 54 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

const MaterialProperty<Real>& ThermoDiffusion::_heat_of_transport
private

Definition at line 56 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

const MaterialProperty<Real>& ThermoDiffusion::_mass_diffusivity
private

Definition at line 55 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

const VariableValue& ThermoDiffusion::_temperature
private

Definition at line 53 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian(), and thermoDiffusionVelocity().

const unsigned int ThermoDiffusion::_temperature_index
private

Definition at line 58 of file ThermoDiffusion.h.

Referenced by computeQpOffDiagJacobian().


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