https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ThermalHydraulicsApp.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
11#include "THMSyntax.h"
12#include "HeatTransferApp.h"
13#include "FluidPropertiesApp.h"
14#include "NavierStokesApp.h"
15#include "RayTracingApp.h"
16#include "RdgApp.h"
17#include "SolidPropertiesApp.h"
18#include "MiscApp.h"
19
20#include "AppFactory.h"
21#include "Simulation.h"
22
27
28std::map<THM::FlowModelID, std::string> ThermalHydraulicsApp::_flow_model_map;
29
30namespace THM
31{
32
35{
36 static FlowModelID flow_model_id = 0;
37 flow_model_id++;
38 return flow_model_id;
39}
40
46
47} // namespace THM
48
51{
53 params.set<bool>("use_legacy_output_syntax") = false;
54 params.set<bool>("use_legacy_material_output") = false;
55 params.set<bool>("use_legacy_initial_residual_evaluation_behavior") = false;
56 return params;
57}
58
59registerKnownLabel("ThermalHydraulicsApp");
60
66
68
69void
71{
72 Registry::registerObjectsTo(f, {"ThermalHydraulicsApp"});
73 Registry::registerActionsTo(af, {"ThermalHydraulicsApp"});
74
79 RdgApp::registerAll(f, af, s);
81 MiscApp::registerAll(f, af, s);
82
85
86 // flow models
88
89 // Component variable ordering:
90 // Note that this particular order ({rhoA, rhoEA, rhouA}) corresponds to the
91 // the alphabetic ordering, which was the ordering used before this ordering
92 // feature was implemented. We preserve this order for ease of transition,
93 // but an order such as {rhoA, rhouA, rhoEA} may work as well.
102}
103
104const std::string &
106{
107 const auto it = _flow_model_map.find(flow_model_id);
108 if (it == _flow_model_map.end())
109 mooseError("Flow model with ID '" + Moose::stringify(flow_model_id) +
110 "' is not associated with any flow models class. Register your flow model class to "
111 "a flow model ID by calling registerFlowModel().");
112 return it->second;
113}
114
115void
128
129//
130// Dynamic Library Entry Points - DO NOT MODIFY
131//
132extern "C" void
137
138extern "C" void
Real f(Real x)
Test function for Brents method.
registerKnownLabel("ThermalHydraulicsApp")
void ThermalHydraulicsApp__registerApps()
void ThermalHydraulicsApp__registerAll(Factory &f, ActionFactory &af, Syntax &s)
Flow model for a single-component, single-phase fluid using the Euler equations.
static const std::string RHOUA
static const std::string RHOA
static const std::string RHOEA
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static void registerApps()
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static void registerApps()
T & set(const std::string &name, bool quiet_mode=false)
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Definition MiscApp.C:36
static void registerApps()
Definition MiscApp.C:43
ActionFactory _action_factory
static InputParameters validParams()
Factory _factory
Syntax _syntax
void mooseError(Args &&... args) const
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static void registerApps()
static void registerApps()
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static void registerApps()
Definition RdgApp.C:44
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Definition RdgApp.C:37
static void registerActionsTo(ActionFactory &f, const std::set< std::string > &labels)
static void registerObjectsTo(Factory &f, const std::set< std::string > &labels)
static void setComponentVariableOrder(const VariableName &var, int index)
Sets a component variable order index.
Definition Simulation.C:40
static void registerApps()
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
static InputParameters validParams()
static std::map< THM::FlowModelID, std::string > _flow_model_map
Map from flow model ID to flow model instance.
const std::string & getFlowModelClassName(const THM::FlowModelID &flow_model_id)
Get the class name of a flow model corresponding to the flow model ID.
ThermalHydraulicsApp(const InputParameters &parameters)
std::string stringify(const T &t)
FlowModelID FM_INVALID
unsigned int FlowModelID
void associateSyntax(Syntax &syntax)
Definition THMSyntax.C:18
FlowModelID FM_SINGLE_PHASE
FlowModelID registerFlowModelID()
Register a new flow mode type and return its ID.
void registerActions(Syntax &syntax)
Definition THMSyntax.C:40
FlowModelID FM_TWO_PHASE
FlowModelID FM_GAS_MIX
FlowModelID FM_TWO_PHASE_NCG