https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PrandtlNumberAux.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 "PrandtlNumberAux.h"
12#include "Numerics.h"
13
14registerMooseObject("ThermalHydraulicsApp", PrandtlNumberAux);
15
18{
20 params.addClassDescription("Computes the Prandtl number for the fluid in the simulation domain");
21 params.addRequiredCoupledVar("v", "Specific volume");
22 params.addRequiredCoupledVar("e", "Specific internal energy");
23 params.addRequiredParam<UserObjectName>("fp",
24 "The name of the user object with fluid properties");
25 return params;
26}
27
29 : AuxKernel(parameters),
30 _v(coupledValue("v")),
31 _e(coupledValue("e")),
32 _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
33{
34}
35
36Real
38{
39 Real cp = _fp.cp_from_v_e(_v[_qp], _e[_qp]);
40 Real mu = _fp.mu_from_v_e(_v[_qp], _e[_qp]);
41 Real k = _fp.k_from_v_e(_v[_qp], _e[_qp]);
42 return THM::Prandtl(cp, mu, k);
43}
const double mu
registerMooseObject("ThermalHydraulicsApp", PrandtlNumberAux)
static InputParameters validParams()
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)
Computes Prandtl number.
virtual Real computeValue()
PrandtlNumberAux(const InputParameters &parameters)
const VariableValue & _e
Specific internal energy.
const SinglePhaseFluidProperties & _fp
static InputParameters validParams()
const VariableValue & _v
Specific volume.
Common class for single phase fluid properties.
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Definition Numerics.h:131