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

This Dirichlet condition imposes the condition p_0 = p_0_desired, where p_0 is the stagnation pressure, defined as: p_0 = p * (1 + (gam-1)/2 * M^2)^(gam/(gam-1)) More...

#include <NSStagnationPressureBC.h>

Inheritance diagram for NSStagnationPressureBC:
[legend]

Public Member Functions

 NSStagnationPressureBC (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 

Protected Attributes

const VariableValue & _pressure
 
const Real _desired_stagnation_pressure
 
const VariableValue & _mach
 
const IdealGasFluidProperties_fp
 

Detailed Description

This Dirichlet condition imposes the condition p_0 = p_0_desired, where p_0 is the stagnation pressure, defined as: p_0 = p * (1 + (gam-1)/2 * M^2)^(gam/(gam-1))

Definition at line 24 of file NSStagnationPressureBC.h.

Constructor & Destructor Documentation

NSStagnationPressureBC::NSStagnationPressureBC ( const InputParameters &  parameters)

Definition at line 27 of file NSStagnationPressureBC.C.

28  : NSStagnationBC(parameters),
29  _pressure(coupledValue(NS::pressure)),
30  _desired_stagnation_pressure(getParam<Real>("desired_stagnation_pressure"))
31 {
32 }
NSStagnationBC(const InputParameters &parameters)
const VariableValue & _pressure
const std::string pressure
Definition: NS.h:24

Member Function Documentation

Real NSStagnationPressureBC::computeQpResidual ( )
protectedvirtual

Definition at line 35 of file NSStagnationPressureBC.C.

36 {
37  // p_0 = p*(1 + 0.5*(gam-1)*M^2)^(gam/(gam-1))
38  const Real computed_stagnation_pressure =
39  _pressure[_qp] * std::pow(1. + 0.5 * (_fp.gamma() - 1.) * _mach[_qp] * _mach[_qp],
40  _fp.gamma() / (_fp.gamma() - 1.));
41 
42  // Return the difference between the current solution's stagnation pressure
43  // and the desired. The Dirichlet condition asserts that these should be equal.
44  return computed_stagnation_pressure - _desired_stagnation_pressure;
45 }
const VariableValue & _mach
const VariableValue & _pressure
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real gamma(Real v=0., Real u=0.) const override
Compute the ratio of specific heats.
const IdealGasFluidProperties & _fp

Member Data Documentation

const Real NSStagnationPressureBC::_desired_stagnation_pressure
protected

Definition at line 39 of file NSStagnationPressureBC.h.

Referenced by computeQpResidual().

const IdealGasFluidProperties& NSStagnationBC::_fp
protectedinherited
const VariableValue& NSStagnationBC::_mach
protectedinherited
const VariableValue& NSStagnationPressureBC::_pressure
protected

Definition at line 36 of file NSStagnationPressureBC.h.

Referenced by computeQpResidual().


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