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

This postprocessor computes the thermal conductivity of the bulk. More...

#include <ThermalConductivity.h>

Inheritance diagram for ThermalConductivity:
[legend]

Public Member Functions

 ThermalConductivity (const InputParameters &parameters)
 
virtual Real getValue ()
 

Protected Attributes

const Real _dx
 
const PostprocessorValue & _flux
 
const PostprocessorValue & _T_hot
 
const Real _length_scale
 
const Real _k0
 

Private Attributes

bool & _step_zero
 True if this is the zeroth timestep (timestep < 1). More...
 

Detailed Description

This postprocessor computes the thermal conductivity of the bulk.

Definition at line 21 of file ThermalConductivity.h.

Constructor & Destructor Documentation

ThermalConductivity::ThermalConductivity ( const InputParameters &  parameters)

Definition at line 23 of file ThermalConductivity.C.

24  : SideAverageValue(parameters),
25  _dx(getParam<Real>("dx")),
26  _flux(getPostprocessorValue("flux")),
27  _T_hot(getPostprocessorValue("T_hot")),
28  _length_scale(getParam<Real>("length_scale")),
29  _k0(getParam<Real>("k0")),
30  _step_zero(declareRestartableData<bool>("step_zero", true))
31 {
32 }
const PostprocessorValue & _T_hot
bool & _step_zero
True if this is the zeroth timestep (timestep < 1).
const PostprocessorValue & _flux

Member Function Documentation

Real ThermalConductivity::getValue ( )
virtual

Definition at line 35 of file ThermalConductivity.C.

36 {
37  const Real T_cold = SideAverageValue::getValue();
38  Real Th_cond = 0.0;
39  if (_t_step >= 1)
40  _step_zero = false;
41 
42  // Calculate effective thermal conductivity in W/(length_scale-K)
43  if (std::abs(_T_hot - T_cold) > 1.0e-20)
44  Th_cond = std::abs(_flux) * _dx / std::abs(_T_hot - T_cold);
45 
46  if (_step_zero)
47  return _k0;
48  else
49  return Th_cond / _length_scale; // In W/(m-K)
50 }
const PostprocessorValue & _T_hot
bool & _step_zero
True if this is the zeroth timestep (timestep < 1).
const PostprocessorValue & _flux

Member Data Documentation

const Real ThermalConductivity::_dx
protected

Definition at line 29 of file ThermalConductivity.h.

Referenced by getValue().

const PostprocessorValue& ThermalConductivity::_flux
protected

Definition at line 30 of file ThermalConductivity.h.

Referenced by getValue().

const Real ThermalConductivity::_k0
protected

Definition at line 33 of file ThermalConductivity.h.

Referenced by getValue().

const Real ThermalConductivity::_length_scale
protected

Definition at line 32 of file ThermalConductivity.h.

Referenced by getValue().

bool& ThermalConductivity::_step_zero
private

True if this is the zeroth timestep (timestep < 1).

At the zero timestep, the initial value of thermal conductivity should be returned. This boolean is delcared as a reference so that the variable is restartable data: if we restart, the code will not think it is the zero timestep again.

Definition at line 40 of file ThermalConductivity.h.

Referenced by getValue().

const PostprocessorValue& ThermalConductivity::_T_hot
protected

Definition at line 31 of file ThermalConductivity.h.

Referenced by getValue().


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