https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
14#include "HeatConductionModel.h"
15
20{
21public:
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
50protected:
51 virtual void init() override;
52 virtual void check() const override;
53 virtual bool usingSecondOrderMesh() const override;
54 virtual Convergence * getNonlinearConvergence() const override;
55
56 void
57 loadMaterial(InputParameters & pars, const std::string & par, const std::string & material_name);
58
60 void addAverageElementSizePostprocessor(const SubdomainName & block);
62 void addResidualNormPostprocessor(const SubdomainName & block,
63 const UserObjectName & sp_name,
64 Real T_ref);
65
73 void addConstantDensitySolidPropertiesMaterial(const UserObjectName & sp_name,
74 const Real & T_ref,
75 unsigned int i_region) const;
76
78 std::map<std::string, unsigned int> _name_index;
81
82 // This reference should be deleted after applications start using _n_regions:
83 unsigned int & _number_of_hs;
84
85public:
87};
const std::string name
Definition Setup.h:21
ExternalBoundaryType
External boundary type.
Definition Component2D.h:19
Base class for 2D generated heat structures.
Real getNumberOfUnits() const
Gets the number of units that heat structure represents.
void addAverageElementSizePostprocessor(const SubdomainName &block)
Adds a PP for the average element size on a block.
static InputParameters validParams()
void addConstantDensitySolidPropertiesMaterial(const UserObjectName &sp_name, const Real &T_ref, unsigned int i_region) const
Adds a ADConstantDensityThermalSolidPropertiesMaterial for a heat structure region.
virtual Convergence * getNonlinearConvergence() const override
Gets the Component's nonlinear Convergence object if it has one.
void addResidualNormPostprocessor(const SubdomainName &block, const UserObjectName &sp_name, Real T_ref)
Adds a residual norm PP for a block.
const unsigned int & getIndexFromName(const std::string &name) const
Get index of the block from its name.
virtual void check() const override
Check the component integrity.
virtual void addMooseObjects() override
virtual void addVariables() override
virtual void init() override
Initializes the component.
std::map< std::string, unsigned int > _name_index
Map from block name to block index.
void loadMaterial(InputParameters &pars, const std::string &par, const std::string &material_name)
virtual Real getUnitPerimeter(const ExternalBoundaryType &side) const =0
Gets the perimeter of one unit of this heat structure on the specified side.
Real _num_rods
The number of rods represented by this heat structure.
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
unsigned int & _number_of_hs
Interface class for heat structure components.