https://mooseframework.inl.gov
HenryGasConstantTest.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 "HenryGasConstant.h"
14 
16 {
17 public:
18  HenryGasConstantTest() : MooseObjectUnitTest("ChemicalReactionsApp") { buildObjects(); }
19 
20 protected:
21  void buildObjects()
22  {
23  // Set up object for helium and FLiBe
24  {
25  InputParameters params = _factory.getValidParams("HenryGasConstant");
26  params.set<MooseEnum>("salt") = "FLIBE";
27  params.set<Real>("radius") = 1.4e-10;
28  _fe_problem->addUserObject("HenryGasConstant", "henry_helium_flibe", params);
29  _henry_helium_flibe = &_fe_problem->getUserObject<HenryGasConstant>("henry_helium_flibe");
30  }
31  // Set up object for argon and FLiBe
32  {
33  InputParameters params = _factory.getValidParams("HenryGasConstant");
34  params.set<MooseEnum>("salt") = "FLIBE";
35  params.set<Real>("radius") = 1.88e-10;
36  _fe_problem->addUserObject("HenryGasConstant", "henry_argon_flibe", params);
37  _henry_argon_flibe = &_fe_problem->getUserObject<HenryGasConstant>("henry_argon_flibe");
38  }
39  // Set up object for helium and FLiNaK
40  {
41  InputParameters params = _factory.getValidParams("HenryGasConstant");
42  params.set<MooseEnum>("salt") = "FLINAK";
43  params.set<Real>("radius") = 1.4e-10;
44  _fe_problem->addUserObject("HenryGasConstant", "henry_helium_flinak", params);
45  _henry_helium_flinak = &_fe_problem->getUserObject<HenryGasConstant>("henry_helium_flinak");
46  }
47  // Set up object for argon and FLiNaK
48  {
49  InputParameters params = _factory.getValidParams("HenryGasConstant");
50  params.set<MooseEnum>("salt") = "FLINAK";
51  params.set<Real>("radius") = 1.88e-10;
52  _fe_problem->addUserObject("HenryGasConstant", "henry_argon_flinak", params);
53  _henry_argon_flinak = &_fe_problem->getUserObject<HenryGasConstant>("henry_argon_flinak");
54  }
55  // Set up argon and custom, but make custom salt the same as FLiNaK and ensure results are the
56  // same
57  {
58  InputParameters params = _factory.getValidParams("HenryGasConstant");
59  params.set<MooseEnum>("salt") = "CUSTOM";
60  params.set<Real>("radius") = 1.88e-10;
61  params.set<Real>("alpha") = HenryGasConstant::_alpha_FLiNaK;
62  params.set<Real>("beta") = HenryGasConstant::_beta_FLiNaK;
63  params.set<Real>("KH0") = HenryGasConstant::_KH0_FLiNaK;
64  params.set<Real>("gamma_0") = HenryGasConstant::_gamma_0_FLiNaK;
65  params.set<Real>("dgamma_dT") = HenryGasConstant::_dgamma_dT_FLiNaK;
66 
67  _fe_problem->addUserObject("HenryGasConstant", "henry_argon_custom", params);
68  _henry_argon_custom = &_fe_problem->getUserObject<HenryGasConstant>("henry_argon_custom");
69  }
70  }
71 
77 };
std::shared_ptr< FEProblem > _fe_problem
const HenryGasConstant * _henry_argon_flibe
static constexpr Real _dgamma_dT_FLiNaK
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const HenryGasConstant * _henry_helium_flibe
static constexpr Real _beta_FLiNaK
const HenryGasConstant * _henry_helium_flinak
const HenryGasConstant * _henry_argon_custom
static constexpr Real _gamma_0_FLiNaK
static constexpr Real _alpha_FLiNaK
Model constants for FLiNaK.
const HenryGasConstant * _henry_argon_flinak
static constexpr Real _KH0_FLiNaK
This UserObject performs a calculation of the Henry coefficient for noble gases using the model by K...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real