https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FluidDensityAux.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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 "FluidDensityAux.h"
12
13registerMooseObject("FluidPropertiesApp", FluidDensityAux);
14
17{
19 params.addRequiredCoupledVar("p", "Pressure");
20 params.addRequiredCoupledVar("T", "Temperature");
21 params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
22 params.addClassDescription("Computes density from pressure and temperature");
23 return params;
24}
25
27 : AuxKernel(parameters),
28 _pressure(coupledValue("p")),
29 _temperature(coupledValue("T")),
30 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
31{
32}
33
34Real
36{
37 return _fp.rho_from_p_T(_pressure[_qp], _temperature[_qp]);
38}
registerMooseObject("FluidPropertiesApp", FluidDensityAux)
static InputParameters validParams()
Computes density from pressure and temperature.
const VariableValue & _pressure
pressure
virtual Real computeValue()
const SinglePhaseFluidProperties & _fp
fluid properties user object
static InputParameters validParams()
const VariableValue & _temperature
fluid temperature
FluidDensityAux(const InputParameters &parameters)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Common class for single phase fluid properties.