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 27 of file NSTemperatureL2.h.

Constructor & Destructor Documentation

◆ NSTemperatureL2()

NSTemperatureL2::NSTemperatureL2 ( const InputParameters &  parameters)

Definition at line 34 of file NSTemperatureL2.C.

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

Member Function Documentation

◆ computeQpJacobian()

Real NSTemperatureL2::computeQpJacobian ( )
protectedvirtual

Definition at line 65 of file NSTemperatureL2.C.

66 {
67  return _phi[_j][_qp] * _test[_i][_qp];
68 }

◆ computeQpOffDiagJacobian()

Real NSTemperatureL2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 71 of file NSTemperatureL2.C.

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

◆ computeQpResidual()

Real NSTemperatureL2::computeQpResidual ( )
protectedvirtual

Definition at line 51 of file NSTemperatureL2.C.

52 {
53  Real value = 1.0 / _c_v[_qp];
54 
55  const Real et = _rhoe[_qp] / _rho[_qp];
56  const RealVectorValue vec(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
57 
58  value *= et - ((vec * vec) / 2.0);
59 
60  // L2-projection
61  return (_u[_qp] - value) * _test[_i][_qp];
62 }
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

◆ _c_v

const MaterialProperty<Real>& NSTemperatureL2::_c_v
protected

Definition at line 52 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _rho

const VariableValue& NSTemperatureL2::_rho
protected

Definition at line 38 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _rho_var

unsigned int NSTemperatureL2::_rho_var
protected

Definition at line 37 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian().

◆ _rhoe

const VariableValue& NSTemperatureL2::_rhoe
protected

Definition at line 41 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _rhoe_var

unsigned int NSTemperatureL2::_rhoe_var
protected

Definition at line 40 of file NSTemperatureL2.h.

Referenced by computeQpOffDiagJacobian().

◆ _u_vel

const VariableValue& NSTemperatureL2::_u_vel
protected

Definition at line 44 of file NSTemperatureL2.h.

Referenced by computeQpResidual().

◆ _u_vel_var

unsigned int NSTemperatureL2::_u_vel_var
protected

Definition at line 43 of file NSTemperatureL2.h.

◆ _v_vel

const VariableValue& NSTemperatureL2::_v_vel
protected

Definition at line 47 of file NSTemperatureL2.h.

Referenced by computeQpResidual().

◆ _v_vel_var

unsigned int NSTemperatureL2::_v_vel_var
protected

Definition at line 46 of file NSTemperatureL2.h.

◆ _w_vel

const VariableValue& NSTemperatureL2::_w_vel
protected

Definition at line 50 of file NSTemperatureL2.h.

Referenced by computeQpResidual().

◆ _w_vel_var

unsigned int NSTemperatureL2::_w_vel_var
protected

Definition at line 49 of file NSTemperatureL2.h.


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