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

This class was originally used to solve for the temperature using an L2-projection. More...

#include <NSTemperatureL2.h>

Inheritance diagram for NSTemperatureL2:
[legend]

Public Member Functions

 NSTemperatureL2 (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

unsigned int _rho_var
 
const VariableValue & _rho
 
unsigned int _rhoe_var
 
const VariableValue & _rhoe
 
unsigned int _u_vel_var
 
const VariableValue & _u_vel
 
unsigned int _v_vel_var
 
const VariableValue & _v_vel
 
unsigned int _w_vel_var
 
const VariableValue & _w_vel
 
const MaterialProperty< Real > & _c_v
 

Detailed Description

This class was originally used to solve for the temperature using an L2-projection.

I'm not sure if anything is still using this. If not, it could probably be removed.

Definition at line 24 of file NSTemperatureL2.h.

Constructor & Destructor Documentation

NSTemperatureL2::NSTemperatureL2 ( const InputParameters &  parameters)

Definition at line 30 of file NSTemperatureL2.C.

31  : Kernel(parameters),
32  _rho_var(coupled(NS::density)),
33  _rho(coupledValue(NS::density)),
34  _rhoe_var(coupled("rhoe")),
35  _rhoe(coupledValue("rhoe")),
36  _u_vel_var(coupled(NS::velocity_x)),
37  _u_vel(coupledValue(NS::velocity_x)),
38  _v_vel_var(_mesh.dimension() >= 2 ? coupled(NS::velocity_y) : libMesh::invalid_uint),
39  _v_vel(_mesh.dimension() >= 2 ? coupledValue(NS::velocity_y) : _zero),
40  _w_vel_var(_mesh.dimension() == 3 ? coupled(NS::velocity_z) : libMesh::invalid_uint),
41  _w_vel(_mesh.dimension() == 3 ? coupledValue(NS::velocity_z) : _zero),
42  _c_v(getMaterialProperty<Real>("c_v"))
43 {
44 }
Definition: NS.h:13
const VariableValue & _w_vel
unsigned int _w_vel_var
unsigned int _v_vel_var
const std::string velocity_z
Definition: NS.h:23
const std::string density
Definition: NS.h:15
const std::string velocity_x
Definition: NS.h:21
unsigned int _u_vel_var
const VariableValue & _rhoe
const VariableValue & _rho
unsigned int _rho_var
const std::string velocity_y
Definition: NS.h:22
const VariableValue & _u_vel
unsigned int _rhoe_var
const MaterialProperty< Real > & _c_v
const VariableValue & _v_vel

Member Function Documentation

Real NSTemperatureL2::computeQpJacobian ( )
protectedvirtual

Definition at line 61 of file NSTemperatureL2.C.

62 {
63  return _phi[_j][_qp] * _test[_i][_qp];
64 }
Real NSTemperatureL2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 67 of file NSTemperatureL2.C.

68 {
69  if (jvar == _rho_var)
70  {
71  const Real et = (_rhoe[_qp] / (-_rho[_qp] * _rho[_qp])) * _phi[_j][_qp];
72  Real value = et / _c_v[_qp];
73 
74  return -value * _test[_i][_qp];
75  }
76  else if (jvar == _rhoe_var)
77  {
78  const Real et = _phi[_j][_qp] / _rho[_qp];
79  Real value = et / _c_v[_qp];
80 
81  return -value * _test[_i][_qp];
82  }
83 
84  return 0.0;
85 }
const VariableValue & _rhoe
const VariableValue & _rho
unsigned int _rho_var
unsigned int _rhoe_var
const MaterialProperty< Real > & _c_v
Real NSTemperatureL2::computeQpResidual ( )
protectedvirtual

Definition at line 47 of file NSTemperatureL2.C.

48 {
49  Real value = 1.0 / _c_v[_qp];
50 
51  const Real et = _rhoe[_qp] / _rho[_qp];
52  const RealVectorValue vec(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
53 
54  value *= et - ((vec * vec) / 2.0);
55 
56  // L2-projection
57  return (_u[_qp] - value) * _test[_i][_qp];
58 }
const VariableValue & _w_vel
const VariableValue & _rhoe
const VariableValue & _rho
const VariableValue & _u_vel
const MaterialProperty< Real > & _c_v
const VariableValue & _v_vel

Member Data Documentation

const MaterialProperty<Real>& NSTemperatureL2::_c_v
protected

Definition at line 49 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const VariableValue& NSTemperatureL2::_rho
protected

Definition at line 35 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

unsigned int NSTemperatureL2::_rho_var
protected

Definition at line 34 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian().

const VariableValue& NSTemperatureL2::_rhoe
protected

Definition at line 38 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

unsigned int NSTemperatureL2::_rhoe_var
protected

Definition at line 37 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian().

const VariableValue& NSTemperatureL2::_u_vel
protected

Definition at line 41 of file NSTemperatureL2.h.

Referenced by computeQpResidual().

unsigned int NSTemperatureL2::_u_vel_var
protected

Definition at line 40 of file NSTemperatureL2.h.

const VariableValue& NSTemperatureL2::_v_vel
protected

Definition at line 44 of file NSTemperatureL2.h.

Referenced by computeQpResidual().

unsigned int NSTemperatureL2::_v_vel_var
protected

Definition at line 43 of file NSTemperatureL2.h.

const VariableValue& NSTemperatureL2::_w_vel
protected

Definition at line 47 of file NSTemperatureL2.h.

Referenced by computeQpResidual().

unsigned int NSTemperatureL2::_w_vel_var
protected

Definition at line 46 of file NSTemperatureL2.h.


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