https://mooseframework.inl.gov
FlowChannelGasMix.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 
10 #include "FlowChannelGasMix.h"
12 
13 registerMooseObject("ThermalHydraulicsApp", FlowChannelGasMix);
14 
17 {
19 
20  params.addParam<FunctionName>("initial_mass_fraction",
21  "Initial mass fraction of the secondary gas");
22  params.addParamNamesToGroup("initial_mass_fraction", "Variable initialization");
23 
24  params.addParam<Real>(
25  "scaling_factor_xirhoA", 1.0, "Scaling factor for the secondary component mass equation");
26  params.addParam<Real>("scaling_factor_rhoA", 1.0, "Scaling factor for the mixture mass equation");
27  params.addParam<Real>("scaling_factor_rhouA", 1.0, "Scaling factor for the momentum equation");
28  params.addParam<Real>("scaling_factor_rhoEA", 1.0, "Scaling factor for the energy equation");
29  params.addParamNamesToGroup(
30  "scaling_factor_xirhoA scaling_factor_rhoA scaling_factor_rhouA scaling_factor_rhoEA",
31  "Numerical scheme");
32 
33  params.addClassDescription("Single-phase flow channel with a binary gas mixture");
34 
35  return params;
36 }
37 
39 {
40 }
41 
42 void
44 {
46  if (dynamic_cast<const VaporMixtureFluidProperties *>(&fp) == nullptr)
47  logError("The supplied fluid properties object must be of type "
48  "'VaporMixtureFluidProperties'.");
49 }
50 
51 std::string
53 {
54  return "FlowModelGasMix";
55 }
56 
57 std::vector<std::string>
59 {
60  return {"initial_p", "initial_T", "initial_vel", "initial_mass_fraction"};
61 }
virtual void checkFluidProperties() const override
Logs an error if the fluid properties is not valid.
T & getUserObject(const std::string &name, unsigned int tid=0) const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
virtual std::vector< std::string > ICParameters() const override
Returns the names of the IC parameters.
Flow channel containing a mixture of two gases.
void logError(Args &&... args) const
Logs an error.
Definition: Component.h:215
static InputParameters validParams()
virtual std::string flowModelClassName() const override
Returns the flow model class name.
const UserObjectName & _fp_name
Name of fluid properties user object.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
FlowChannelGasMix(const InputParameters &params)
registerMooseObject("ThermalHydraulicsApp", FlowChannelGasMix)
Base class for single-phase flow channels.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)