https://mooseframework.inl.gov
SoundSpeedAux.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 "SoundSpeedAux.h"
12 
13 registerMooseObject("ThermalHydraulicsApp", SoundSpeedAux);
14 
17 {
19  params.addRequiredCoupledVar("v", "specific volume");
20  params.addRequiredCoupledVar("e", "specific internal energy");
21  params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties object to use.");
22  params.addClassDescription("Computes the speed of sound.");
23 
24  return params;
25 }
26 
28  : AuxKernel(parameters),
29  _v(coupledValue("v")),
30  _e(coupledValue("e")),
31  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
32 {
33 }
34 
35 Real
37 {
38  return _fp.c_from_v_e(_v[_qp], _e[_qp]);
39 }
const VariableValue & _v
Definition: SoundSpeedAux.h:27
static InputParameters validParams()
Definition: SoundSpeedAux.C:16
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("ThermalHydraulicsApp", SoundSpeedAux)
Common class for single phase fluid properties.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
SoundSpeedAux(const InputParameters &parameters)
Definition: SoundSpeedAux.C:27
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _e
Definition: SoundSpeedAux.h:28
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Computes the sound speed, given the equation of state.
Definition: SoundSpeedAux.h:19
virtual Real computeValue()
Definition: SoundSpeedAux.C:36
const SinglePhaseFluidProperties & _fp
Definition: SoundSpeedAux.h:30