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

#include <NSEntropyError.h>

Inheritance diagram for NSEntropyError:
[legend]

Public Member Functions

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

Protected Member Functions

virtual Real computeQpIntegral ()
 

Protected Attributes

Real _rho_infty
 
Real _p_infty
 
const VariableValue & _rho
 
const VariableValue & _pressure
 
const IdealGasFluidProperties_fp
 

Detailed Description

Definition at line 21 of file NSEntropyError.h.

Constructor & Destructor Documentation

◆ NSEntropyError()

NSEntropyError::NSEntropyError ( const InputParameters &  parameters)

Definition at line 34 of file NSEntropyError.C.

35  : ElementIntegralPostprocessor(parameters),
36  _rho_infty(getParam<Real>("rho_infty")),
37  _p_infty(getParam<Real>("p_infty")),
38  _rho(coupledValue(NS::density)),
39  _pressure(coupledValue(NS::pressure)),
40  _fp(getUserObject<IdealGasFluidProperties>("fluid_properties"))
41 {
42 }

Member Function Documentation

◆ computeQpIntegral()

Real NSEntropyError::computeQpIntegral ( )
protectedvirtual

Definition at line 51 of file NSEntropyError.C.

52 {
53  Real integrand = (_pressure[_qp] / _p_infty) * std::pow(_rho_infty / _rho[_qp], _fp.gamma()) - 1.;
54  return integrand * integrand;
55 }

◆ getValue()

Real NSEntropyError::getValue ( )
virtual

Definition at line 45 of file NSEntropyError.C.

46 {
47  return std::sqrt(ElementIntegralPostprocessor::getValue());
48 }

Member Data Documentation

◆ _fp

const IdealGasFluidProperties& NSEntropyError::_fp
protected

Definition at line 37 of file NSEntropyError.h.

Referenced by computeQpIntegral().

◆ _p_infty

Real NSEntropyError::_p_infty
protected

Definition at line 31 of file NSEntropyError.h.

Referenced by computeQpIntegral().

◆ _pressure

const VariableValue& NSEntropyError::_pressure
protected

Definition at line 34 of file NSEntropyError.h.

Referenced by computeQpIntegral().

◆ _rho

const VariableValue& NSEntropyError::_rho
protected

Definition at line 33 of file NSEntropyError.h.

Referenced by computeQpIntegral().

◆ _rho_infty

Real NSEntropyError::_rho_infty
protected

Definition at line 30 of file NSEntropyError.h.

Referenced by computeQpIntegral().


The documentation for this class was generated from the following files:
NSEntropyError::_p_infty
Real _p_infty
Definition: NSEntropyError.h:31
pow
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Definition: ExpressionBuilder.h:673
IdealGasFluidProperties::gamma
virtual Real gamma() const
Definition: IdealGasFluidProperties.h:117
NS::density
const std::string density
Definition: NS.h:16
NSEntropyError::_rho
const VariableValue & _rho
Definition: NSEntropyError.h:33
NSEntropyError::_pressure
const VariableValue & _pressure
Definition: NSEntropyError.h:34
NSEntropyError::_rho_infty
Real _rho_infty
Definition: NSEntropyError.h:30
NSEntropyError::_fp
const IdealGasFluidProperties & _fp
Definition: NSEntropyError.h:37
NS::pressure
const std::string pressure
Definition: NS.h:25