https://mooseframework.inl.gov
FlowChannel1Phase.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 "FlowChannel1Phase.h"
11 #include "FlowModelSinglePhase.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", FlowChannel1Phase);
15 
18 {
20 
21  MooseEnum wave_speed_formulation("einfeldt davis", "einfeldt");
22  params.addParam<MooseEnum>(
23  "wave_speed_formulation", wave_speed_formulation, "Method for computing wave speeds");
24 
25  std::vector<Real> sf_1phase(3, 1.0);
26  params.addParam<std::vector<Real>>(
27  "scaling_factor_1phase",
28  sf_1phase,
29  "Scaling factors for each single phase variable (rhoA, rhouA, rhoEA)");
30 
31  params.addParamNamesToGroup("scaling_factor_1phase", "Numerical scheme");
32  params.addClassDescription("1-phase 1D flow channel");
33 
34  return params;
35 }
36 
38 {
39 }
40 
41 void
43 {
45  if (dynamic_cast<const SinglePhaseFluidProperties *>(&fp) == nullptr)
46  logError("Supplied fluid properties must be for 1-phase fluids.");
47 }
48 
49 std::string
51 {
52  return "FlowModelSinglePhase";
53 }
54 
55 std::vector<std::string>
57 {
58  return {"initial_p", "initial_T", "initial_vel"};
59 }
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
FlowChannel1Phase(const InputParameters &params)
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
registerMooseObject("ThermalHydraulicsApp", FlowChannel1Phase)
void logError(Args &&... args) const
Logs an error.
Definition: Component.h:215
Single-component, single-phase flow channel.
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()
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
virtual std::vector< std::string > ICParameters() const override
Returns the names of the IC parameters.
Base class for single-phase flow channels.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)