www.mooseframework.org
InternalEnergyAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "InternalEnergyAux.h"
12 
13 registerMooseObject("NavierStokesApp", InternalEnergyAux);
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<AuxKernel>();
20  params.addRequiredCoupledVar("density", "Density (conserved form)");
21  params.addRequiredCoupledVar("pressure", "Pressure");
22  params.addRequiredParam<UserObjectName>("fp", "The name of the equation of state user object");
23 
24  return params;
25 }
26 
27 InternalEnergyAux::InternalEnergyAux(const InputParameters & parameters)
28  : AuxKernel(parameters),
29  _pressure(coupledValue("pressure")),
30  _rho(coupledValue("density")),
31  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
32 {
33 }
34 
35 Real
37 {
38  return _fp.e_from_p_rho(_pressure[_qp], _rho[_qp]);
39 }
validParams< InternalEnergyAux >
InputParameters validParams< InternalEnergyAux >()
Definition: InternalEnergyAux.C:17
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition: SinglePhaseFluidProperties.h:89
SinglePhaseFluidProperties.h
InternalEnergyAux
Compute internal energy given equation of state pressure and density.
Definition: InternalEnergyAux.h:23
InternalEnergyAux::_fp
const SinglePhaseFluidProperties & _fp
Definition: InternalEnergyAux.h:34
InternalEnergyAux::_rho
const VariableValue & _rho
Definition: InternalEnergyAux.h:32
InternalEnergyAux::computeValue
virtual Real computeValue()
Definition: InternalEnergyAux.C:36
registerMooseObject
registerMooseObject("NavierStokesApp", InternalEnergyAux)
InternalEnergyAux::InternalEnergyAux
InternalEnergyAux(const InputParameters &parameters)
Definition: InternalEnergyAux.C:27
InternalEnergyAux::_pressure
const VariableValue & _pressure
Definition: InternalEnergyAux.h:31
InternalEnergyAux.h