https://mooseframework.inl.gov
Closures1PhaseNone.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 "Closures1PhaseNone.h"
11 #include "FlowChannel1Phase.h"
12 #include "HeatTransfer1PhaseBase.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", Closures1PhaseNone);
15 
18 {
20  params.addParam<bool>("add_wall_temperature_property",
21  true,
22  "If true, create a material property for the wall temperature (average if "
23  "multiple heat transfers)");
24  params.addClassDescription("No 1-phase closures. Useful for testing with one-time correlations.");
25  return params;
26 }
27 
29 {
30  if (getParam<bool>("add_wall_temperature_property"))
31  mooseDeprecated("'Closures1PhaseNone' is deprecated. Since 'add_wall_temperature_property' was "
32  "set to 'true', change the type of the 'Closures1PhaseNone' object to "
33  "'WallTemperature1PhaseClosures'.");
34  else
36  "'Closures1PhaseNone' is deprecated. The 'closures' parameter now takes an arbitrary-sized "
37  "list of closures objects, defaulting to an empty list, so to transition, delete the "
38  "'Closures1PhaseNone' block and the 'closures' parameter from your input file.");
39 }
40 
41 void
43 {
44 }
45 
46 void
48  const FlowChannelBase & /*flow_channel*/) const
49 {
50 }
51 
52 void
54 {
55  if (getParam<bool>("add_wall_temperature_property"))
56  {
57  const FlowChannel1Phase & flow_channel_1phase =
58  dynamic_cast<const FlowChannel1Phase &>(flow_channel);
59 
60  const unsigned int n_ht_connections = flow_channel_1phase.getNumberOfHeatTransferConnections();
61  if ((n_ht_connections > 0) && (flow_channel.getTemperatureMode()))
62  {
63  if (flow_channel.getNumberOfHeatTransferConnections() > 1)
64  addAverageWallTemperatureMaterial(flow_channel_1phase);
65  else
66  addWallTemperatureFromAuxMaterial(flow_channel_1phase);
67  }
68  }
69 }
70 
71 void
73  const FlowChannelBase & /*flow_channel*/)
74 {
75 }
void mooseDeprecated(Args &&... args) const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
unsigned int getNumberOfHeatTransferConnections() const
Gets the number of heat transfer connections.
static InputParameters validParams()
A base class for flow channels.
void addAverageWallTemperatureMaterial(const FlowChannel1Phase &flow_channel) const
Adds average wall temperature material.
void addWallTemperatureFromAuxMaterial(const FlowChannelBase &flow_channel, unsigned int i=0) const
Adds a material for wall temperature from an aux variable.
Definition: ClosuresBase.C:64
Single-component, single-phase flow channel.
Sets up no 1-phase closures.
Base class for heat transfer connections.
Base class for 1-phase closures.
registerMooseObject("ThermalHydraulicsApp", Closures1PhaseNone)
virtual void checkHeatTransfer(const HeatTransferBase &heat_transfer, const FlowChannelBase &flow_channel) const override
Checks for errors associated with a heat transfer component.
virtual void addMooseObjectsHeatTransfer(const HeatTransferBase &heat_transfer, const FlowChannelBase &flow_channel) override
Adds MOOSE objects associated with a heat transfer component.
virtual void addMooseObjectsFlowChannel(const FlowChannelBase &flow_channel) override
Adds MOOSE objects associated with a flow channel component.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
bool getTemperatureMode() const
Gets temperature mode flag.
Closures1PhaseNone(const InputParameters &params)
virtual void checkFlowChannel(const FlowChannelBase &flow_channel) const override
Checks for errors associated with a flow channel component.