https://mooseframework.inl.gov
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 
13 registerMooseObject("FluidPropertiesApp", SaturationPressureMaterial);
15 
16 template <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 
34 template <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 
47 template <bool is_ad>
48 void
50 {
51  _p_sat[_qp] = _fp_2phase.p_sat(_T[_qp]);
52 }
SaturationPressureMaterialTempl(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
Base class for fluid properties used with two-phase flow.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("FluidPropertiesApp", SaturationPressureMaterial)
void addClassDescription(const std::string &doc_string)
Computes saturation pressure at some temperature.