https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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.
 
const GeometricalComponentgetGeometricalComponent () const
 Gets the geometrical component inheriting from this interface.
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

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

Protected Attributes

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

Private Attributes

GeometricalComponent_geometrical_component_hsi
 The geometrical component inheriting from this interface.
 

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.

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

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

◆ addVariables()

void HeatStructureInterface::addVariables ( )
protected

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

Definition at line 64 of file HeatStructureInterface.C.

65{
66 _hc_model->addVariables();
68 _hc_model->addInitialConditions();
69}
bool isParamValid(const std::string &name) const

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

◆ buildModel()

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

Builds the heat conduction model.

Definition at line 34 of file HeatStructureInterface.C.

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}
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition Component.C:135
Provides functions to setup the heat conduction model.
Interface class for heat structure components.
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)
Factory & getFactory()
const InputParameters & parameters() const
const std::string & name() const
MooseApp & getMooseApp() const
Specialization of FEProblem to run with component subsystem.
Definition THMProblem.h:19

Referenced by init().

◆ check()

void HeatStructureInterface::check ( ) const
protected

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

Definition at line 54 of file HeatStructureInterface.C.

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}
void logError(Args &&... args) const
Logs an error.
Definition Component.h:226
bool hasInitialConditionsFromFile() const
Are initial conditions specified from a file.

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

◆ getGeometricalComponent()

const GeometricalComponent & HeatStructureInterface::getGeometricalComponent ( ) const
inline

Gets the geometrical component inheriting from this interface.

Definition at line 35 of file HeatStructureInterface.h.

36 {
38 }

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

◆ getInitialT()

FunctionName HeatStructureInterface::getInitialT ( ) const

Gets the initial temperature function name.

Definition at line 81 of file HeatStructureInterface.C.

82{
84 return _geometrical_component_hsi.getParam<FunctionName>("initial_T");
85 else
88 ": The parameter 'initial_T' was requested but not supplied");
89}
void mooseError(Args &&... args) const
const T & getParam(const std::string &name) const

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

◆ init()

void HeatStructureInterface::init ( )
protected

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

Definition at line 48 of file HeatStructureInterface.C.

49{
51}
virtual std::shared_ptr< HeatConductionModel > buildModel()
Builds the heat conduction model.

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

◆ useCylindricalTransformation()

virtual bool HeatStructureInterface::useCylindricalTransformation ( ) const
protectedpure virtual

Use cylindrical transformation?

Implemented in HeatStructureCylindricalBase, HeatStructureFromFile3D, and HeatStructurePlate.

Referenced by addMooseObjects().

◆ validParams()

InputParameters HeatStructureInterface::validParams ( )
static

Definition at line 15 of file HeatStructureInterface.C.

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}
InputParameters emptyInputParameters()
void addPrivateParam(const std::string &name, const T &value)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

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

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 addMooseObjects(), addVariables(), and init().


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