https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVSpecificEnthalpyFromPressureTemperatureDirichletBC.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
12#include "NS.h"
13
15
18{
20 params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties object.");
21 params.addRequiredParam<MooseFunctorName>(
22 NS::pressure, "The pressure (units should be based on fluid properties object)");
23 params.addRequiredParam<MooseFunctorName>(
24 NS::T_fluid, "The temperature (units should be based on fluid properties object)");
26 "Computes the specific enthalpy at the boundary from the pressure and temperature.");
27 return params;
28}
29
32 : FVDirichletBCBase(parameters),
33 _fp(getUserObject<SinglePhaseFluidProperties>("fp")),
34 _pressure(getFunctor<ADReal>(NS::pressure)),
35 _temperature(getFunctor<ADReal>(NS::T_fluid))
36{
37}
38
41 const FaceInfo & fi, const Moose::StateArg & state) const
42{
43 auto sfa = singleSidedFaceArg(&fi);
44 return _fp.h_from_p_T(_pressure(sfa, state), _temperature(sfa, state));
45}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", FVSpecificEnthalpyFromPressureTemperatureDirichletBC)
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
static InputParameters validParams()
Computes the boundary value of the specific enthalpy from pressure and temperature variables.
const SinglePhaseFluidProperties & _fp
Single phase fluid property user object.
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override
const Moose::Functor< ADReal > & _temperature
The functor computing the temperature value for this BC.
const Moose::Functor< ADReal > & _pressure
The functor computing the pressure value for this BC.
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.
static const std::string T_fluid
Definition NS.h:110
static const std::string pressure
Definition NS.h:57