https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
HeatStructureInterface Class Referenceabstract

Interface class for heat structure components. More...

#include <HeatStructureInterface.h>

Inheritance diagram for HeatStructureInterface:
[legend]

Public Member Functions

 HeatStructureInterface (GeometricalComponent *geometrical_component)
 
FunctionName getInitialT () const
 Gets the initial temperature function name. More...
 
const GeometricalComponentgetGeometricalComponent () const
 Gets the geometrical component inheriting from this interface. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual bool useCylindricalTransformation () const =0
 Use cylindrical transformation? More...
 
virtual std::shared_ptr< HeatConductionModelbuildModel ()
 Builds the heat conduction model. More...
 
void init ()
 Method to be called in the component's init() method. More...
 
void check () const
 Method to be called in the component's check() method. More...
 
void addVariables ()
 Method to be called in the component's addVariables() method. More...
 
void addMooseObjects ()
 Method to be called in the component's addMooseObjects() method. More...
 

Protected Attributes

std::shared_ptr< HeatConductionModel_hc_model
 The heat conduction model used by this heat structure. More...
 

Private Attributes

GeometricalComponent_geometrical_component_hsi
 The geometrical component inheriting from this interface. More...
 

Detailed Description

Interface class for heat structure components.

Definition at line 20 of file HeatStructureInterface.h.

Constructor & Destructor Documentation

◆ HeatStructureInterface()

HeatStructureInterface::HeatStructureInterface ( GeometricalComponent geometrical_component)

Definition at line 28 of file HeatStructureInterface.C.

29  : _geometrical_component_hsi(*geometrical_component)
30 {
31 }
GeometricalComponent & _geometrical_component_hsi
The geometrical component inheriting from this interface.

Member Function Documentation

◆ addMooseObjects()

void HeatStructureInterface::addMooseObjects ( )
protected

Method to be called in the component's addMooseObjects() method.

Definition at line 72 of file HeatStructureInterface.C.

Referenced by HeatStructureBase::addMooseObjects(), and HeatStructureFromFile3D::addMooseObjects().

73 {
75  _hc_model->addHeatEquationRZ();
76  else
77  _hc_model->addHeatEquationXYZ();
78 }
virtual bool useCylindricalTransformation() const =0
Use cylindrical transformation?
std::shared_ptr< HeatConductionModel > _hc_model
The heat conduction model used by this heat structure.

◆ addVariables()

void HeatStructureInterface::addVariables ( )
protected

Method to be called in the component's addVariables() method.

Definition at line 64 of file HeatStructureInterface.C.

Referenced by HeatStructureBase::addVariables(), and HeatStructureFromFile3D::addVariables().

65 {
66  _hc_model->addVariables();
68  _hc_model->addInitialConditions();
69 }
bool isParamValid(const std::string &name) const
std::shared_ptr< HeatConductionModel > _hc_model
The heat conduction model used by this heat structure.
GeometricalComponent & _geometrical_component_hsi
The geometrical component inheriting from this interface.

◆ buildModel()

std::shared_ptr< HeatConductionModel > HeatStructureInterface::buildModel ( )
protectedvirtual

Builds the heat conduction model.

Definition at line 34 of file HeatStructureInterface.C.

Referenced by init().

35 {
37 
38  const std::string class_name = "HeatConductionModel";
39  InputParameters params = factory.getValidParams(class_name);
40  params.set<THMProblem *>("_thm_problem") = &_geometrical_component_hsi.getTHMProblem();
41  params.set<HeatStructureInterface *>("_hs") = this;
43  return factory.create<HeatConductionModel>(
44  class_name, _geometrical_component_hsi.name(), params, 0);
45 }
Specialization of FEProblem to run with component subsystem.
Definition: THMProblem.h:18
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
T & set(const std::string &name, bool quiet_mode=false)
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
virtual const std::string & name() const
MooseApp & getMooseApp() const
Factory & getFactory()
Interface class for heat structure components.
GeometricalComponent & _geometrical_component_hsi
The geometrical component inheriting from this interface.
const InputParameters & parameters() const
Provides functions to setup the heat conduction model.

◆ check()

void HeatStructureInterface::check ( ) const
protected

Method to be called in the component's check() method.

Definition at line 54 of file HeatStructureInterface.C.

Referenced by HeatStructureFromFile3D::check(), and HeatStructureBase::check().

55 {
56  auto & moose_app = _geometrical_component_hsi.getMooseApp();
59  if (!ics_set && !moose_app.isRestarting())
60  _geometrical_component_hsi.logError("Missing initial condition for temperature.");
61 }
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
MooseApp & getMooseApp() const
void logError(Args &&... args) const
Logs an error.
Definition: Component.h:215
bool isParamValid(const std::string &name) const
GeometricalComponent & _geometrical_component_hsi
The geometrical component inheriting from this interface.
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.
Definition: Simulation.C:1070

◆ getGeometricalComponent()

const GeometricalComponent& HeatStructureInterface::getGeometricalComponent ( ) const
inline

Gets the geometrical component inheriting from this interface.

Definition at line 35 of file HeatStructureInterface.h.

Referenced by HSBoundaryExternalAppTemperature::addVariables(), HSBoundaryExternalAppConvection::addVariables(), and HSBoundaryExternalAppHeatFlux::addVariables().

36  {
38  }
GeometricalComponent & _geometrical_component_hsi
The geometrical component inheriting from this interface.

◆ getInitialT()

FunctionName HeatStructureInterface::getInitialT ( ) const

Gets the initial temperature function name.

Definition at line 81 of file HeatStructureInterface.C.

Referenced by HeatConductionModel::addInitialConditions(), HeatTransferFromHeatStructure3D1Phase::addVariables(), and HeatTransferFromHeatStructure1Phase::addVariables().

82 {
84  return _geometrical_component_hsi.getParam<FunctionName>("initial_T");
85  else
88  ": The parameter 'initial_T' was requested but not supplied");
89 }
virtual const std::string & name() const
bool isParamValid(const std::string &name) const
const T & getParam(const std::string &name) const
GeometricalComponent & _geometrical_component_hsi
The geometrical component inheriting from this interface.
void mooseError(Args &&... args) const

◆ init()

void HeatStructureInterface::init ( )
protected

Method to be called in the component's init() method.

Definition at line 48 of file HeatStructureInterface.C.

Referenced by HeatStructureFromFile3D::init(), and HeatStructureBase::init().

49 {
51 }
virtual std::shared_ptr< HeatConductionModel > buildModel()
Builds the heat conduction model.
std::shared_ptr< HeatConductionModel > _hc_model
The heat conduction model used by this heat structure.

◆ useCylindricalTransformation()

virtual bool HeatStructureInterface::useCylindricalTransformation ( ) const
protectedpure virtual

Use cylindrical transformation?

Implemented in HeatStructureCylindricalBase, HeatStructurePlate, and HeatStructureFromFile3D.

Referenced by addMooseObjects().

◆ validParams()

InputParameters HeatStructureInterface::validParams ( )
static

Definition at line 15 of file HeatStructureInterface.C.

Referenced by HeatStructureFromFile3D::validParams(), and HeatStructureBase::validParams().

16 {
18 
19  params.addParam<FunctionName>("initial_T", "Initial temperature [K]");
20  params.addParam<Real>(
21  "scaling_factor_temperature", 1.0, "Scaling factor for solid temperature variable.");
22 
23  params.addPrivateParam<std::string>("component_type", "heat_struct");
24 
25  return params;
26 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addPrivateParam(const std::string &name, const T &value)
InputParameters emptyInputParameters()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Data Documentation

◆ _geometrical_component_hsi

GeometricalComponent& HeatStructureInterface::_geometrical_component_hsi
private

The geometrical component inheriting from this interface.

Definition at line 76 of file HeatStructureInterface.h.

Referenced by addVariables(), buildModel(), check(), getGeometricalComponent(), and getInitialT().

◆ _hc_model

std::shared_ptr<HeatConductionModel> HeatStructureInterface::_hc_model
protected

The heat conduction model used by this heat structure.

Definition at line 72 of file HeatStructureInterface.h.

Referenced by HeatStructureBase::addMooseObjects(), addMooseObjects(), addVariables(), and init().


The documentation for this class was generated from the following files: