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

This Dirichlet condition imposes the condition T_0 = T_0_desired, where T_0 is the stagnation temperature, defined as: T_0 = T * (1 + (gam-1)/2 * M^2) More...

#include <NSStagnationTemperatureBC.h>

Inheritance diagram for NSStagnationTemperatureBC:
[legend]

Public Member Functions

 NSStagnationTemperatureBC (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 

Protected Attributes

const VariableValue & _temperature
 
const Real _desired_stagnation_temperature
 
const VariableValue & _mach
 
const IdealGasFluidProperties_fp
 

Detailed Description

This Dirichlet condition imposes the condition T_0 = T_0_desired, where T_0 is the stagnation temperature, defined as: T_0 = T * (1 + (gam-1)/2 * M^2)

Definition at line 26 of file NSStagnationTemperatureBC.h.

Constructor & Destructor Documentation

◆ NSStagnationTemperatureBC()

NSStagnationTemperatureBC::NSStagnationTemperatureBC ( const InputParameters &  parameters)

Definition at line 30 of file NSStagnationTemperatureBC.C.

31  : NSStagnationBC(parameters),
32  _temperature(coupledValue(NS::temperature)),
33  _desired_stagnation_temperature(getParam<Real>("desired_stagnation_temperature"))
34 {
35 }
NSStagnationBC(const InputParameters &parameters)
const std::string temperature
Definition: NS.h:27
const VariableValue & _temperature

Member Function Documentation

◆ computeQpResidual()

Real NSStagnationTemperatureBC::computeQpResidual ( )
protectedvirtual

Definition at line 38 of file NSStagnationTemperatureBC.C.

39 {
40  // T_0 = T*(1 + 0.5*(gam-1)*M^2)
41  Real computed_stagnation_temperature =
42  _temperature[_qp] * (1. + 0.5 * (_fp.gamma() - 1.) * _mach[_qp] * _mach[_qp]);
43 
44  // Return the difference between the current solution's stagnation temperature
45  // and the desired. The Dirichlet condition asserts that these should be equal.
46  return computed_stagnation_temperature - _desired_stagnation_temperature;
47 }
const VariableValue & _mach
const VariableValue & _temperature
const IdealGasFluidProperties & _fp

Member Data Documentation

◆ _desired_stagnation_temperature

const Real NSStagnationTemperatureBC::_desired_stagnation_temperature
protected

Definition at line 40 of file NSStagnationTemperatureBC.h.

Referenced by computeQpResidual().

◆ _fp

const IdealGasFluidProperties& NSStagnationBC::_fp
protectedinherited

◆ _mach

const VariableValue& NSStagnationBC::_mach
protectedinherited

◆ _temperature

const VariableValue& NSStagnationTemperatureBC::_temperature
protected

Definition at line 37 of file NSStagnationTemperatureBC.h.

Referenced by computeQpResidual().


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