https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CHTHandler.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"
14#include "SystemBase.h"
15#include "NS.h"
16
19
20namespace NS
21{
22namespace FV
23{
24
29class CHTHandler : public MooseObject
30{
31public:
34
36
38 void linkEnergySystems(SystemBase * solid_energy_system,
39 SystemBase * fluid_energy_system,
40 std::vector<SystemBase *> pm_radiation_systems);
41
45
48
51
54
56 bool converged() const;
57
60
63
66
68 void printIntegratedFluxes() const;
69
72
74 virtual bool enabled() const override final;
75
76protected:
79
82
85
88
90 std::vector<SystemBase *> _pm_radiation_systems;
91
93 std::vector<BoundaryName> _cht_boundary_names;
94
96 std::vector<BoundaryID> _cht_boundary_ids;
97
99 const unsigned int _max_cht_fpi;
100
103
106 std::vector<std::vector<Real>> _cht_flux_relaxation_factor;
107
110 std::vector<std::vector<Real>> _cht_temperature_relaxation_factor;
111
113 std::vector<unsigned int> _cht_system_numbers;
114
116 std::vector<unsigned int> _cht_pm_radiation_system_numbers;
117
119 std::vector<std::vector<const FaceInfo *>> _cht_face_info;
120
122 std::vector<LinearFVFluxKernel *> _cht_conduction_kernels;
123
125 std::vector<LinearFVFluxKernel *> _cht_pm_radiation_kernels;
126
128 std::vector<std::vector<LinearFVBoundaryCondition *>> _cht_boundary_conditions;
129
131 std::vector<std::vector<LinearFVBoundaryCondition *>> _cht_pm_radiation_boundary_conditions;
132
135 std::vector<std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>>
137
139 std::vector<std::vector<Real>> _integrated_boundary_heat_flux;
140
143 std::vector<std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>>
145
146private:
148 unsigned int _fpi_it;
149};
150
151inline bool
153{
154 return !_cht_boundary_names.empty();
155}
156
157inline void
162
163inline void
168
169} // End FV namespace
170} // End Moose namespace
const InputParameters & parameters() const
This class provides an interface for managing conjugate heat transfer (CHT) between fluid and solid d...
Definition CHTHandler.h:30
const Real _cht_heat_flux_tolerance
Tolerance for heat flux at the CHT interfaces.
Definition CHTHandler.h:102
std::vector< BoundaryName > _cht_boundary_names
The names of the CHT boundaries.
Definition CHTHandler.h:93
void sumIntegratedFluxes()
Sum the integrated fluxes over all processors.
Definition CHTHandler.C:465
SystemBase * _energy_system
The energy system.
Definition CHTHandler.h:84
std::vector< unsigned int > _cht_pm_radiation_system_numbers
The participating media radiation system numbers.
Definition CHTHandler.h:116
std::vector< LinearFVFluxKernel * > _cht_conduction_kernels
The conduction kernels from the solid/fluid domains. Can't be const, considering we are updating the ...
Definition CHTHandler.h:122
void printIntegratedFluxes() const
Print the integrated heat fluxes.
Definition CHTHandler.C:476
std::vector< unsigned int > _cht_system_numbers
The solid (0) and fluid (1) system numbers.
Definition CHTHandler.h:113
std::vector< LinearFVFluxKernel * > _cht_pm_radiation_kernels
The conduction radiation kernels from the fluid domains.
Definition CHTHandler.h:125
void resetCHTConvergence()
Reset the convergence data.
Definition CHTHandler.h:158
std::vector< std::vector< Real > > _cht_flux_relaxation_factor
The relaxation factors for flux fields for the CHT boundaries first index is solid/fluid second is th...
Definition CHTHandler.h:106
std::vector< std::vector< FaceCenteredMapFunctor< Real, std::unordered_map< dof_id_type, Real > > > > _boundary_heat_flux
Functors describing the heat flux on the conjugate heat transfer interfaces.
Definition CHTHandler.h:136
SystemBase * _solid_energy_system
The solid energy system.
Definition CHTHandler.h:87
std::vector< std::vector< const FaceInfo * > > _cht_face_info
The subset of the FaceInfo objects that belong to the given boundaries.
Definition CHTHandler.h:119
std::vector< SystemBase * > _pm_radiation_systems
The solid energy system.
Definition CHTHandler.h:90
void resetIntegratedFluxes()
Reset the heat fluxes to 0.
Definition CHTHandler.C:488
void initializeCHTCouplingFields()
Initialize the coupling fields for the conjugate heat transfer routines.
Definition CHTHandler.C:371
std::vector< std::vector< Real > > _integrated_boundary_heat_flux
Integrated flux for the boundaries, first index is the boundary second is solid/fluid.
Definition CHTHandler.h:139
std::vector< std::vector< LinearFVBoundaryCondition * > > _cht_boundary_conditions
Vector of boundary conditions that describe the conjugate heat transfer from each side.
Definition CHTHandler.h:128
std::vector< std::vector< LinearFVBoundaryCondition * > > _cht_pm_radiation_boundary_conditions
Vector of boundary conditions that describe the radiation pm bcs from each side.
Definition CHTHandler.h:131
void deduceCHTBoundaryCoupling()
Run error checks and make sure everything works.
Definition CHTHandler.C:106
bool converged() const
Check if CHT iteration converged.
Definition CHTHandler.C:495
MooseMesh & _mesh
Mesh.
Definition CHTHandler.h:81
void setupConjugateHeatTransferContainers()
Set up the boundary condition pairs, functor maps, and every other necessary structure for the conjug...
Definition CHTHandler.C:291
std::vector< std::vector< FaceCenteredMapFunctor< Real, std::unordered_map< dof_id_type, Real > > > > _boundary_temperature
Functors describing the heat flux on the conjugate heat transfer interfaces.
Definition CHTHandler.h:144
std::vector< std::vector< Real > > _cht_temperature_relaxation_factor
The relaxation factors for temperature fields for the CHT boundaries first index is solid/fluid secon...
Definition CHTHandler.h:110
virtual bool enabled() const override final
Check if CHT treatment is needed.
Definition CHTHandler.h:152
std::vector< BoundaryID > _cht_boundary_ids
The IDs of the CHT boundaries.
Definition CHTHandler.h:96
static InputParameters validParams()
Definition CHTHandler.C:25
FEProblemBase & _problem
Reference to FEProblem.
Definition CHTHandler.h:78
void updateCHTBoundaryCouplingFields(const NS::CHTSide side)
Update the coupling fields for.
Definition CHTHandler.C:392
unsigned int _fpi_it
CHT fixed point iteration counter.
Definition CHTHandler.h:148
void linkEnergySystems(SystemBase *solid_energy_system, SystemBase *fluid_energy_system, std::vector< SystemBase * > pm_radiation_systems)
Link energy systems.
Definition CHTHandler.C:91
void incrementCHTIterators()
Increment CHT iterators in the loop.
Definition CHTHandler.h:164
const unsigned int _max_cht_fpi
Maximum number of CHT fixed point iterations.
Definition CHTHandler.h:99
CHTSide
CHT side options, we want to make sure these can be used as integers so we are avoiding the enum clas...
Definition NS.h:199