https://mooseframework.inl.gov
HeatStructureBase.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 "Component2D.h"
13 #include "HeatStructureInterface.h"
14 #include "HeatConductionModel.h"
15 
20 {
21 public:
22  HeatStructureBase(const InputParameters & params);
23 
24  virtual void addVariables() override;
25  virtual void addMooseObjects() override;
26 
32  const unsigned int & getIndexFromName(const std::string & name) const;
33 
40  virtual Real getUnitPerimeter(const ExternalBoundaryType & side) const = 0;
41 
48  Real getNumberOfUnits() const { return _num_rods; }
49 
50 protected:
51  virtual void init() override;
52  virtual void check() const override;
53  virtual bool usingSecondOrderMesh() const override;
54 
55  void
56  loadMaterial(InputParameters & pars, const std::string & par, const std::string & material_name);
57 
65  void addConstantDensitySolidPropertiesMaterial(const UserObjectName & sp_name,
66  const Real & T_ref,
67  unsigned int i_region) const;
68 
70  std::map<std::string, unsigned int> _name_index;
72  std::vector<std::string> _material_names;
75 
76  // This reference should be deleted after applications start using _n_regions:
77  unsigned int & _number_of_hs;
78 
79 public:
81 };
void loadMaterial(InputParameters &pars, const std::string &par, const std::string &material_name)
Real getNumberOfUnits() const
Gets the number of units that heat structure represents.
void addConstantDensitySolidPropertiesMaterial(const UserObjectName &sp_name, const Real &T_ref, unsigned int i_region) const
Adds a ADConstantDensityThermalSolidPropertiesMaterial for a heat structure region.
std::vector< std::string > _material_names
Material names.
ExternalBoundaryType
External boundary type.
Definition: Component2D.h:18
Real _num_rods
The number of rods represented by this heat structure.
const unsigned int & getIndexFromName(const std::string &name) const
Get index of the block from its name.
virtual const std::string & name() const
HeatStructureBase(const InputParameters &params)
Interface class for heat structure components.
virtual Real getUnitPerimeter(const ExternalBoundaryType &side) const =0
Gets the perimeter of one unit of this heat structure on the specified side.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
virtual void check() const override
Check the component integrity.
virtual void addVariables() override
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
Base class for 2D generated heat structures.
unsigned int & _number_of_hs
std::map< std::string, unsigned int > _name_index
Map from block name to block index.
virtual void addMooseObjects() override
virtual void init() override
Initializes the component.