https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SaturationPressureMaterial.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
15
16template <bool is_ad>
19{
21
22 params.addClassDescription("Computes saturation pressure at some temperature.");
23
24 params.addRequiredParam<MaterialPropertyName>("T", "Temperature material property");
25 params.addRequiredParam<MaterialPropertyName>(
26 "p_sat", "Name to give saturation pressure material property");
27
28 params.addRequiredParam<UserObjectName>("fp_2phase",
29 "Two-phase fluid properties user object name");
30
31 return params;
32}
33
34template <bool is_ad>
36 const InputParameters & parameters)
37 : Material(parameters),
38
39 _T(getGenericMaterialProperty<Real, is_ad>("T")),
40 _p_sat_name(getParam<MaterialPropertyName>("p_sat")),
41 _p_sat(declareGenericProperty<Real, is_ad>(_p_sat_name)),
42
43 _fp_2phase(getUserObject<TwoPhaseFluidProperties>("fp_2phase"))
44{
45}
46
47template <bool is_ad>
48void
50{
51 _p_sat[_qp] = _fp_2phase.p_sat(_T[_qp]);
52}
registerMooseObject("FluidPropertiesApp", SaturationPressureMaterial)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Computes saturation pressure at some temperature.
SaturationPressureMaterialTempl(const InputParameters &parameters)
Base class for fluid properties used with two-phase flow.