https://mooseframework.inl.gov
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)");
25  params.addClassDescription(
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 
39 ADReal
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 }
Computes the boundary value of the specific enthalpy from pressure and temperature variables...
const SinglePhaseFluidProperties & _fp
Single phase fluid property user object.
const Moose::Functor< ADReal > & _temperature
The functor computing the temperature value for this BC.
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
DualNumber< Real, DNDerivativeType, false > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
static const std::string T_fluid
Definition: NS.h:110
static InputParameters validParams()
Common class for single phase fluid properties.
const Moose::Functor< ADReal > & _pressure
The functor computing the pressure value for this BC.
static const std::string pressure
Definition: NS.h:57
registerMooseObject("NavierStokesApp", FVSpecificEnthalpyFromPressureTemperatureDirichletBC)
void addClassDescription(const std::string &doc_string)
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override