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"
13#include "UserObjectInterface.h"
16#include "SystemBase.h"
18#include "NS.h"
19
20#include <set>
21
25
26namespace NS
27{
28namespace FV
29{
30
36{
37public:
40
42
44 void linkEnergySystems(SystemBase * solid_energy_system,
45 SystemBase * fluid_energy_system,
46 std::vector<SystemBase *> pm_radiation_systems);
47
51
54
57
60
62 bool converged() const;
63
66
69
72
74 void printIntegratedFluxes() const;
75
78
80 virtual bool enabled() const override final;
81
82protected:
85
88
91
94
96 std::vector<SystemBase *> _pm_radiation_systems;
97
100
103
105 std::vector<BoundaryName> _cht_boundary_names;
106
108 std::vector<BoundaryID> _cht_boundary_ids;
109
111 const unsigned int _max_cht_fpi;
112
115
118
121
123 std::vector<const Moose::Functor<Real> *> _thermal_resistance;
124
127 std::vector<std::vector<Real>> _cht_flux_relaxation_factor;
128
131 std::vector<std::vector<Real>> _cht_temperature_relaxation_factor;
132
134 std::vector<unsigned int> _cht_system_numbers;
135
137 std::vector<unsigned int> _cht_pm_radiation_system_numbers;
138
140 std::vector<std::vector<const FaceInfo *>> _cht_face_info;
141
143 std::vector<LinearFVFluxKernel *> _cht_conduction_kernels;
144
146 std::vector<LinearFVFluxKernel *> _cht_pm_radiation_kernels;
147
149 std::vector<std::vector<LinearFVBoundaryCondition *>> _cht_boundary_conditions;
150
152 std::vector<std::vector<LinearFVBoundaryCondition *>> _cht_pm_radiation_boundary_conditions;
153
156 std::vector<std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>>
158
160 std::vector<std::vector<Real>> _integrated_boundary_heat_flux;
161
165
168 std::vector<std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>>
170
173 std::vector<std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>>
175
176private:
178 unsigned int _fpi_it;
179};
180
181inline bool
183{
184 return !_cht_boundary_names.empty();
185}
186
187inline void
192
193inline void
198
199} // End FV namespace
200} // End Moose namespace
GrayLambertSurfaceRadiationBase computes the heat flux on a set of surfaces in radiative heat transfe...
const InputParameters & parameters() const
This class provides an interface for managing conjugate heat transfer (CHT) between fluid and solid d...
Definition CHTHandler.h:36
const Real _cht_heat_flux_tolerance
Tolerance for heat flux at the CHT interfaces.
Definition CHTHandler.h:114
std::vector< BoundaryName > _cht_boundary_names
The names of the CHT boundaries.
Definition CHTHandler.h:105
std::vector< Real > _integrated_boundary_surface_radiation_heat_flux
Integrated net outward surface-radiation flux, kept separate for the CHT energy balance.
Definition CHTHandler.h:164
void sumIntegratedFluxes()
Sum the integrated fluxes over all processors.
Definition CHTHandler.C:585
SystemBase * _energy_system
The energy system.
Definition CHTHandler.h:90
std::vector< unsigned int > _cht_pm_radiation_system_numbers
The participating media radiation system numbers.
Definition CHTHandler.h:137
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:143
void printIntegratedFluxes() const
Print the integrated heat fluxes.
Definition CHTHandler.C:598
std::vector< unsigned int > _cht_system_numbers
The solid (0) and fluid (1) system numbers.
Definition CHTHandler.h:134
std::vector< LinearFVFluxKernel * > _cht_pm_radiation_kernels
The conduction radiation kernels from the fluid domains.
Definition CHTHandler.h:146
void resetCHTConvergence()
Reset the convergence data.
Definition CHTHandler.h:188
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:127
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:157
SystemBase * _solid_energy_system
The solid energy system.
Definition CHTHandler.h:93
std::vector< std::vector< const FaceInfo * > > _cht_face_info
The subset of the FaceInfo objects that belong to the given boundaries.
Definition CHTHandler.h:140
std::vector< SystemBase * > _pm_radiation_systems
The solid energy system.
Definition CHTHandler.h:96
void resetIntegratedFluxes()
Reset the heat fluxes to 0.
Definition CHTHandler.C:614
void initializeCHTCouplingFields()
Initialize the coupling fields for the conjugate heat transfer routines.
Definition CHTHandler.C:436
std::vector< std::vector< Real > > _integrated_boundary_heat_flux
Integrated source-domain flux for each boundary and solid/fluid transfer direction.
Definition CHTHandler.h:160
std::vector< std::vector< LinearFVBoundaryCondition * > > _cht_boundary_conditions
Vector of boundary conditions that describe the conjugate heat transfer from each side.
Definition CHTHandler.h:149
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:152
void deduceCHTBoundaryCoupling()
Run error checks and make sure everything works.
Definition CHTHandler.C:144
bool converged() const
Check if CHT iteration converged.
Definition CHTHandler.C:625
std::set< BoundaryID > _surface_radiation_boundary_ids
Boundaries represented by the surface-to-surface radiation model.
Definition CHTHandler.h:120
MooseMesh & _mesh
Mesh.
Definition CHTHandler.h:87
void setupConjugateHeatTransferContainers()
Set up the boundary condition pairs, functor maps, and every other necessary structure for the conjug...
Definition CHTHandler.C:351
std::vector< std::vector< FaceCenteredMapFunctor< Real, std::unordered_map< dof_id_type, Real > > > > _boundary_temperature
Functors describing the raw wall temperatures on the conjugate heat transfer interfaces.
Definition CHTHandler.h:169
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:131
virtual bool enabled() const override final
Check if CHT treatment is needed.
Definition CHTHandler.h:182
std::vector< BoundaryID > _cht_boundary_ids
The IDs of the CHT boundaries.
Definition CHTHandler.h:108
const MooseLinearVariableFVReal * _solid_variable
The solid-side temperature variable.
Definition CHTHandler.h:102
static InputParameters validParams()
Definition CHTHandler.C:26
const MooseLinearVariableFVReal * _fluid_variable
The fluid-side temperature variable.
Definition CHTHandler.h:99
FEProblemBase & _problem
Reference to FEProblem.
Definition CHTHandler.h:84
std::vector< std::vector< FaceCenteredMapFunctor< Real, std::unordered_map< dof_id_type, Real > > > > _boundary_effective_temperature
Functors describing the effective wall temperatures after applying thermal resistance.
Definition CHTHandler.h:174
std::vector< const Moose::Functor< Real > * > _thermal_resistance
Thermal resistance functors, one per CHT interface.
Definition CHTHandler.h:123
void updateCHTBoundaryCouplingFields(const NS::CHTSide side)
Update the coupling fields for.
Definition CHTHandler.C:465
unsigned int _fpi_it
CHT fixed point iteration counter.
Definition CHTHandler.h:178
void linkEnergySystems(SystemBase *solid_energy_system, SystemBase *fluid_energy_system, std::vector< SystemBase * > pm_radiation_systems)
Link energy systems.
Definition CHTHandler.C:129
void incrementCHTIterators()
Increment CHT iterators in the loop.
Definition CHTHandler.h:194
const unsigned int _max_cht_fpi
Maximum number of CHT fixed point iterations.
Definition CHTHandler.h:111
const GrayLambertSurfaceRadiationBase * _surface_radiation_uo
Optional surface-to-surface radiation model supplying net outward wall heat fluxes.
Definition CHTHandler.h:117
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