https://mooseframework.inl.gov
Water97FluidPropertiesTest.h
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 #pragma once
11 
12 #include "MooseObjectUnitTest.h"
13 #include "Water97FluidProperties.h"
15 
17 {
18 public:
20 
21 protected:
22  void buildObjects()
23  {
24  InputParameters uo_pars = _factory.getValidParams("Water97FluidProperties");
25  // Give initial guesses that are slightly off
26  uo_pars.set<Real>("T_initial_guess") = 298.15 * 1.01;
27  uo_pars.set<Real>("p_initial_guess") = 1.01e5 * 1.01;
28  _fe_problem->addUserObject("Water97FluidProperties", "fp", uo_pars);
29  _fp = &_fe_problem->getUserObject<Water97FluidProperties>("fp");
30 
31  InputParameters ad_uo_pars = _factory.getValidParams("Water97FluidProperties");
32  _fe_problem->addUserObject("Water97FluidProperties", "ad_fp", ad_uo_pars);
33  _ad_fp = &_fe_problem->getUserObject<SinglePhaseFluidProperties>("ad_fp");
34  }
35 
38 };
std::shared_ptr< FEProblem > _fe_problem
const SinglePhaseFluidProperties * _ad_fp
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Common class for single phase fluid properties.
const Water97FluidProperties * _fp
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...