https://mooseframework.inl.gov
ClosuresBase.h
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 #pragma once
11 
12 #include "MooseObject.h"
13 #include "LoggingInterface.h"
14 #include "NamingInterface.h"
15 
16 class FlowChannelBase;
17 class HeatTransferBase;
18 class THMProblem;
19 class Factory;
20 
29 {
30 public:
31  ClosuresBase(const InputParameters & params);
32 
38  virtual void checkFlowChannel(const FlowChannelBase & /*flow_channel*/) const {}
39 
46  virtual void checkHeatTransfer(const HeatTransferBase & /*heat_transfer*/,
47  const FlowChannelBase & /*flow_channel*/) const
48  {
49  }
50 
56  virtual void addMooseObjectsFlowChannel(const FlowChannelBase & flow_channel) = 0;
57 
64  virtual void addMooseObjectsHeatTransfer(const HeatTransferBase & heat_transfer,
65  const FlowChannelBase & flow_channel) = 0;
66 
67 protected:
74  void addZeroMaterial(const FlowChannelBase & flow_channel,
75  const std::string & property_name) const;
76 
85  void addWeightedAverageMaterial(const FlowChannelBase & flow_channel,
86  const std::vector<MaterialPropertyName> & values,
87  const std::vector<VariableName> & weights,
88  const MaterialPropertyName & property_name) const;
89 
96  void addWallTemperatureFromAuxMaterial(const FlowChannelBase & flow_channel,
97  unsigned int i = 0) const;
98 
101 
104 
105 public:
106  static InputParameters validParams();
107 };
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
Specialization of FEProblem to run with component subsystem.
Definition: THMProblem.h:18
virtual void addMooseObjectsFlowChannel(const FlowChannelBase &flow_channel)=0
Adds MOOSE objects associated with a flow channel component.
Interface for handling names.
void addWeightedAverageMaterial(const FlowChannelBase &flow_channel, const std::vector< MaterialPropertyName > &values, const std::vector< VariableName > &weights, const MaterialPropertyName &property_name) const
Adds a weighted average material.
Definition: ClosuresBase.C:49
A base class for flow channels.
static InputParameters validParams()
Definition: ClosuresBase.C:14
Interface class for logging errors and warnings.
Base class for closures implementations.
Definition: ClosuresBase.h:28
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
ClosuresBase(const InputParameters &params)
Definition: ClosuresBase.C:26
virtual void checkHeatTransfer(const HeatTransferBase &, const FlowChannelBase &) const
Checks for errors associated with a heat transfer component.
Definition: ClosuresBase.h:46
Base class for heat transfer connections.
void addZeroMaterial(const FlowChannelBase &flow_channel, const std::string &property_name) const
Adds an arbitrary zero-value material.
Definition: ClosuresBase.C:37
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
virtual void checkFlowChannel(const FlowChannelBase &) const
Checks for errors associated with a flow channel component.
Definition: ClosuresBase.h:38
virtual void addMooseObjectsHeatTransfer(const HeatTransferBase &heat_transfer, const FlowChannelBase &flow_channel)=0
Adds MOOSE objects associated with a heat transfer component.