https://mooseframework.inl.gov
Loading...
Searching...
No Matches
HeatTransfer1PhaseBase.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
13#include "ClosuresBase.h"
14#include "MooseUtils.h"
15
18{
20 params.addParam<FunctionName>("Hw", "Convective heat transfer coefficient [W/(m^2-K)]");
21 return params;
22}
23
28
29void
34
35void
37{
39
40 // determine names of heat transfer variables
41 if (hasComponentByName<FlowChannel1PhaseBase>(_flow_channel_name))
42 {
43 const FlowChannel1PhaseBase & flow_channel =
44 getComponentByName<FlowChannel1PhaseBase>(_flow_channel_name);
45 const std::string Hw_suffix = flow_channel.getHeatTransferNamesSuffix(name());
46
48 }
49 else
50 logError("Coupled component '", _flow_channel_name, "' must be a single phase flow channel.");
51}
52
53void
55{
57
58 for (const auto & closures : _closures_objects)
59 if (closures && hasComponentByName<FlowChannel1PhaseBase>(_flow_channel_name))
60 closures->checkHeatTransfer(*this,
61 getComponentByName<FlowChannel1PhaseBase>(_flow_channel_name));
62}
63
64void
66{
68
69 for (const auto & closures : _closures_objects)
70 closures->addMooseObjectsHeatTransfer(
71 *this, getComponentByName<FlowChannel1PhaseBase>(_flow_channel_name));
72}
73
74const MaterialPropertyName &
const std::string name
Definition Setup.h:21
void logError(Args &&... args) const
Logs an error.
Definition Component.h:226
@ INITIALIZED_SECONDARY
mesh set up, called both inits
Definition Component.h:42
void checkSetupStatus(const EComponentSetupStatus &status) const
Throws an error if the supplied setup status of this component has not been reached.
Definition Component.C:117
Base class for single-phase flow channels.
std::string getHeatTransferNamesSuffix(const std::string &ht_name) const
Gets suffix to add to heat-transfer-related names in a heat transfer component.
static const std::string HEAT_TRANSFER_COEFFICIENT_WALL
virtual void check() const override
Check the component integrity.
virtual void init() override
Initializes the component.
virtual void initSecondary() override
Perform secondary initialization, which relies on init() being called for all components.
const MaterialPropertyName & getWallHeatTransferCoefficient1PhaseName() const
Returns 1-phase wall heat transfer coefficient name.
static InputParameters validParams()
MaterialPropertyName _Hw_1phase_name
1-phase wall heat transfer coefficient name
virtual void addMooseObjects() override
HeatTransfer1PhaseBase(const InputParameters &parameters)
Base class for heat transfer connections.
virtual void initSecondary() override
Perform secondary initialization, which relies on init() being called for all components.
virtual void addMooseObjects() override
virtual void check() const override
Check the component integrity.
std::vector< std::shared_ptr< ClosuresBase > > _closures_objects
Used closures object(s)
static InputParameters validParams()
const std::string _flow_channel_name
name of the connected flow channel
virtual void init() override
Initializes the component.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)