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

A PostProcessor object to calculate the L2 error of ideal gas entropy production for the CNS equations. More...

#include <CNSFVIdealGasEntropyL2Error.h>

Inheritance diagram for CNSFVIdealGasEntropyL2Error:
[legend]

Public Member Functions

 CNSFVIdealGasEntropyL2Error (const InputParameters &parameters)
 
virtual Real getValue ()
 Get the ideal gas entropy L2 error. More...
 

Protected Member Functions

virtual Real computeQpIntegral ()
 

Protected Attributes

const SinglePhaseFluidProperties_fp
 
Real _inf_rho
 
Real _inf_pres
 
const MaterialProperty< Real > & _rho
 
const MaterialProperty< Real > & _pres
 
const MaterialProperty< Real > & _gamma
 

Detailed Description

A PostProcessor object to calculate the L2 error of ideal gas entropy production for the CNS equations.

Definition at line 24 of file CNSFVIdealGasEntropyL2Error.h.

Constructor & Destructor Documentation

CNSFVIdealGasEntropyL2Error::CNSFVIdealGasEntropyL2Error ( const InputParameters &  parameters)

Definition at line 29 of file CNSFVIdealGasEntropyL2Error.C.

30  : ElementIntegralPostprocessor(parameters),
31  _fp(getUserObject<SinglePhaseFluidProperties>("fluid_properties")),
32  _inf_rho(getParam<Real>("infinity_density")),
33  _inf_pres(getParam<Real>("infinity_pressure")),
34  _rho(getMaterialProperty<Real>("rho")),
35  _pres(getMaterialProperty<Real>("pressure")),
36  _gamma(getMaterialProperty<Real>("gamma"))
37 {
38 }
const SinglePhaseFluidProperties & _fp
const MaterialProperty< Real > & _pres
const MaterialProperty< Real > & _gamma
const MaterialProperty< Real > & _rho

Member Function Documentation

Real CNSFVIdealGasEntropyL2Error::computeQpIntegral ( )
protectedvirtual

Definition at line 47 of file CNSFVIdealGasEntropyL2Error.C.

48 {
49  Real diff = (_pres[_qp] / _inf_pres) * std::pow(_inf_rho / _rho[_qp], _gamma[_qp]) - 1.;
50 
51  return diff * diff;
52 }
const MaterialProperty< Real > & _pres
const MaterialProperty< Real > & _gamma
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const MaterialProperty< Real > & _rho
Real CNSFVIdealGasEntropyL2Error::getValue ( )
virtual

Get the ideal gas entropy L2 error.

Definition at line 41 of file CNSFVIdealGasEntropyL2Error.C.

42 {
43  return std::sqrt(ElementIntegralPostprocessor::getValue());
44 }

Member Data Documentation

const SinglePhaseFluidProperties& CNSFVIdealGasEntropyL2Error::_fp
protected

Definition at line 37 of file CNSFVIdealGasEntropyL2Error.h.

const MaterialProperty<Real>& CNSFVIdealGasEntropyL2Error::_gamma
protected

Definition at line 44 of file CNSFVIdealGasEntropyL2Error.h.

Referenced by computeQpIntegral().

Real CNSFVIdealGasEntropyL2Error::_inf_pres
protected

Definition at line 40 of file CNSFVIdealGasEntropyL2Error.h.

Referenced by computeQpIntegral().

Real CNSFVIdealGasEntropyL2Error::_inf_rho
protected

Definition at line 39 of file CNSFVIdealGasEntropyL2Error.h.

Referenced by computeQpIntegral().

const MaterialProperty<Real>& CNSFVIdealGasEntropyL2Error::_pres
protected

Definition at line 43 of file CNSFVIdealGasEntropyL2Error.h.

Referenced by computeQpIntegral().

const MaterialProperty<Real>& CNSFVIdealGasEntropyL2Error::_rho
protected

Definition at line 42 of file CNSFVIdealGasEntropyL2Error.h.

Referenced by computeQpIntegral().


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