https://mooseframework.inl.gov
CHTHandler.C
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 // Moose includes
11 #include "CHTHandler.h"
12 #include "LinearFVFluxKernel.h"
13 #include "LinearFVDiffusion.h"
16 #include "LinearFVCHTBCInterface.h"
17 #include "FEProblemBase.h"
18 
19 namespace NS
20 {
21 namespace FV
22 {
23 
26 {
27  auto params = emptyInputParameters();
28  params.addParam<std::vector<BoundaryName>>(
29  "cht_interfaces",
30  {},
31  "The interfaces where we would like to add conjugate heat transfer handling.");
32 
33  params.addRangeCheckedParam<unsigned int>(
34  "max_cht_fpi",
35  1,
36  "max_cht_fpi >= 1",
37  "Number of maximum fixed point iterations (FPI). Currently only applied to"
38  " conjugate heat transfer simulations. The default value of 1 essentially keeps"
39  " the FPI feature turned off. CHT iteration ends after this number of iteration even if the "
40  "tolerance is not met.");
41 
42  params.addRangeCheckedParam<Real>(
43  "cht_heat_flux_tolerance",
44  1e-5,
45  "cht_heat_flux_tolerance > 0 & cht_heat_flux_tolerance <= 1.0",
46  "The relative tolerance for terminating conjugate heat transfer iteration before the maximum "
47  "number of CHT iterations. Relative tolerance is ignore if the maximum number of CHT "
48  "iterations is reached.");
49 
50  params.addParam<std::vector<Real>>(
51  "cht_fluid_temperature_relaxation",
52  {},
53  "The relaxation factors for the boundary temperature when being updated on the fluid side.");
54  params.addParam<std::vector<Real>>(
55  "cht_solid_temperature_relaxation",
56  {},
57  "The relaxation factors for the boundary temperature when being updated on the solid side.");
58  params.addParam<std::vector<Real>>(
59  "cht_fluid_flux_relaxation",
60  {},
61  "The relaxation factors for the boundary flux when being updated on the fluid side.");
62  params.addParam<std::vector<Real>>(
63  "cht_solid_flux_relaxation",
64  {},
65  "The relaxation factors for the boundary flux when being updated on the solid side.");
66 
67  params.addParamNamesToGroup(
68  "cht_interfaces max_cht_fpi cht_heat_flux_tolerance cht_fluid_temperature_relaxation "
69  "cht_solid_temperature_relaxation cht_fluid_flux_relaxation "
70  "cht_solid_flux_relaxation",
71  "Conjugate Heat Transfer");
72 
73  return params;
74 }
75 
77  : MooseObject(params),
78  _problem(*getCheckedPointerParam<FEProblemBase *>(
79  "_fe_problem_base", "This might happen if you don't have a mesh")),
80  _mesh(_problem.mesh()),
81  _cht_boundary_names(getParam<std::vector<BoundaryName>>("cht_interfaces")),
82  _cht_boundary_ids(_mesh.getBoundaryIDs(_cht_boundary_names)),
83  _max_cht_fpi(getParam<unsigned int>("max_cht_fpi")),
84  _cht_heat_flux_tolerance(getParam<Real>("cht_heat_flux_tolerance"))
85 {
86  if (isParamSetByUser("cht_interfaces") && !_cht_boundary_names.size())
87  paramError("cht_interfaces", "You must declare at least one interface!");
88 }
89 
90 void
92  SystemBase * fluid_energy_system,
93  std::vector<SystemBase *> pm_radiation_systems)
94 {
95  _energy_system = fluid_energy_system;
96  _solid_energy_system = solid_energy_system;
97  _pm_radiation_systems = pm_radiation_systems;
98 
100  paramError("cht_interfaces",
101  "You selected to do conjugate heat transfer treatment, but it needs two energy "
102  "systems: a solid and a fluid. One of these systems is missing.");
103 }
104 
105 void
107 {
108  if (_solid_energy_system->nVariables() != 1)
109  mooseError("We should have only one variable in the solid energy system: ",
110  _energy_system->name(),
111  "! Right now we have: ",
113  if (_energy_system->nVariables() != 1)
114  mooseError("We should have only one variable in the fluid energy system: ",
115  _energy_system->name(),
116  "! Right now we have: ",
118  const std::vector<std::string> solid_fluid({"solid", "fluid"});
119 
120  // We do some setup at the beginning to make sure the container sizes are good
122  std::vector<unsigned int>({_solid_energy_system->number(), _energy_system->number()});
123  _cht_conduction_kernels = std::vector<LinearFVFluxKernel *>({nullptr, nullptr});
124  _cht_boundary_conditions.clear();
125  _cht_boundary_conditions.resize(_cht_boundary_names.size(), {nullptr, nullptr});
126 
127  // Populate the PM radiation system numbers
128  if (!_pm_radiation_systems.empty())
129  {
130  for (const auto sys_i : index_range(_pm_radiation_systems))
131  _cht_pm_radiation_system_numbers.push_back(_pm_radiation_systems[sys_i]->number());
132 
133  // Reserve space for _cht_pm_radiation_kernels based on the size of
134  // _cht_pm_radiation_system_numbers
136  // Reserve space for pm radiation boundary conditions
139  _cht_boundary_names.size(),
140  std::vector<LinearFVBoundaryCondition *>(_cht_pm_radiation_system_numbers.size(), nullptr));
141  }
142 
143  const auto flux_relaxation_param_names =
144  std::vector<std::string>({"cht_solid_flux_relaxation", "cht_fluid_flux_relaxation"});
145  const auto temperature_relaxation_param_names = std::vector<std::string>(
146  {"cht_solid_temperature_relaxation", "cht_fluid_temperature_relaxation"});
148  _cht_flux_relaxation_factor.resize(2, std::vector<Real>(_cht_boundary_names.size(), 1.0));
150  _cht_temperature_relaxation_factor.resize(2, std::vector<Real>(_cht_boundary_names.size(), 1.0));
151 
152  for (const auto region_index : index_range(solid_fluid))
153  {
154  // First thing, we fetch the relaxation parameter values
155  const auto & flux_param_value =
156  getParam<std::vector<Real>>(flux_relaxation_param_names[region_index]);
157  if (flux_param_value.empty() || (flux_param_value.size() != _cht_boundary_names.size()))
158  paramError(flux_relaxation_param_names[region_index],
159  "The number of relaxation factors is not the same as the number of interfaces!");
160 
161  _cht_flux_relaxation_factor[region_index] = flux_param_value;
162  // We have to do the range check here because the intput parameter check errors if the vector is
163  // empty
164  for (const auto param : _cht_flux_relaxation_factor[region_index])
165  if (param <= 0 || param > 1.0)
166  paramError(flux_relaxation_param_names[region_index],
167  "The relaxation parameter should be between 0 and 1!");
168 
169  const auto & temperature_param_value =
170  getParam<std::vector<Real>>(temperature_relaxation_param_names[region_index]);
171  if (temperature_param_value.empty() ||
172  (temperature_param_value.size() != _cht_boundary_names.size()))
173  paramError(temperature_relaxation_param_names[region_index],
174  "The number of relaxation factors is not the same as the number of interfaces!");
175 
176  _cht_temperature_relaxation_factor[region_index] = temperature_param_value;
177  // We have to do the range check here because the intput parameter check errors if the vector is
178  // empty
179  for (const auto param : _cht_temperature_relaxation_factor[region_index])
180  if (param <= 0 || param > 1.0)
181  paramError(temperature_relaxation_param_names[region_index],
182  "The relaxation parameter should be between 0 and 1!");
183 
184  // We then fetch the conduction kernels
185  std::vector<LinearFVFluxKernel *> flux_kernels;
187  .query()
188  .template condition<AttribSystem>("LinearFVFluxKernel")
189  .template condition<AttribVar>(0)
190  .template condition<AttribSysNum>(_cht_system_numbers[region_index])
191  .queryInto(flux_kernels);
192 
193  // We then fetch the radiation conduction kernels in the fluid region
194  if (!_pm_radiation_systems.empty() && region_index == 1)
195  for (const auto sys_i : index_range(_pm_radiation_systems))
196  {
197  // We then fetch the radiation conduction kernels
198  std::vector<LinearFVFluxKernel *> radiation_kernels;
200  .query()
201  .template condition<AttribSystem>("LinearFVFluxKernel")
202  .template condition<AttribVar>(0)
203  .template condition<AttribSysNum>(_cht_pm_radiation_system_numbers[sys_i])
204  .queryInto(radiation_kernels);
205 
206  if (radiation_kernels.size() > 1)
207  mooseError(
208  "We already have a kernel that describes the participating media radiation diffusion "
209  "with the name: ",
210  radiation_kernels[0]->name(),
211  ". Make sure that you have only one conduction kernel.");
212  else if (radiation_kernels.empty())
213  mooseError("We did not find a diffusion kernel for the participating media radiation "
214  "diffusion to compute the "
215  "radiative heat flux. Please add a diffusion kernel.");
216  else
217  _cht_pm_radiation_kernels.push_back(radiation_kernels[0]);
218  }
219 
220  for (auto kernel : flux_kernels)
221  {
222  auto check_diff = dynamic_cast<LinearFVDiffusion *>(kernel);
223  auto check_aniso_diff = dynamic_cast<LinearFVAnisotropicDiffusion *>(kernel);
224  if (_cht_conduction_kernels[region_index] && (check_diff || check_aniso_diff))
225  mooseError("We already have a kernel that describes the heat conduction for the ",
226  solid_fluid[region_index],
227  " domain: ",
228  _cht_conduction_kernels[region_index]->name(),
229  " We found another one with the name: ",
230  (check_diff ? check_diff->name() : check_aniso_diff->name()),
231  " Make sure that you have only one conduction kernel on the ",
232  solid_fluid[region_index],
233  " side!");
234 
235  if (check_diff || check_aniso_diff)
236  _cht_conduction_kernels[region_index] = kernel;
237  }
238 
239  // Then we check the boundary conditions, to make sure at least there is something defined
240  // from both sides
241  for (const auto bd_index : index_range(_cht_boundary_names))
242  {
243  const auto & boundary_name = _cht_boundary_names[bd_index];
244  const auto boundary_id = _cht_boundary_ids[bd_index];
245 
246  std::vector<LinearFVBoundaryCondition *> bcs;
248  .theWarehouse()
249  .query()
250  .template condition<AttribSystem>("LinearFVBoundaryCondition")
251  .template condition<AttribVar>(0)
252  .template condition<AttribSysNum>(_cht_system_numbers[region_index])
253  .template condition<AttribBoundaries>(boundary_id)
254  .queryInto(bcs);
255 
256  // We then fetch the radiation conduction bcs in the fluid region (i.e MarshakBC in P1)
257  if (!_pm_radiation_systems.empty() && region_index == 1)
258  for (const auto sys_i : index_range(_pm_radiation_systems))
259  {
260  std::vector<LinearFVBoundaryCondition *> rad_bcs;
262  .query()
263  .template condition<AttribSystem>("LinearFVBoundaryCondition")
264  .template condition<AttribVar>(0)
265  .template condition<AttribSysNum>(_cht_pm_radiation_system_numbers[sys_i])
266  .template condition<AttribBoundaries>(boundary_id)
267  .queryInto(rad_bcs);
268 
269  if (!rad_bcs.empty())
270  _cht_pm_radiation_boundary_conditions[bd_index][sys_i] = rad_bcs[0];
271  else
272  mooseError("No LinearFVBoundaryCondition found for the given boundary or system.");
273  }
274 
275  if (bcs.size() != 1)
276  mooseError("We found multiple or no boundary conditions for solid energy on boundary ",
277  boundary_name,
278  " (ID: ",
279  boundary_id,
280  "). Make sure you define exactly one for conjugate heat transfer applications!");
281  _cht_boundary_conditions[bd_index][region_index] = bcs[0];
282 
283  if (!dynamic_cast<LinearFVCHTBCInterface *>(_cht_boundary_conditions[bd_index][region_index]))
284  mooseError("The selected boundary condition cannot be used with CHT problems! Make sure it "
285  "inherits from LinearFVCHTBCInterface!");
286  }
287  }
288 }
289 
290 void
292 {
293  // We already error in initialSetup if we have more variables
294  const auto * fluid_variable =
295  dynamic_cast<const MooseLinearVariableFVReal *>(&_energy_system->getVariable(0, 0));
296  const auto * solid_variable =
297  dynamic_cast<const MooseLinearVariableFVReal *>(&_solid_energy_system->getVariable(0, 0));
298 
299  _cht_face_info.clear();
300  _cht_face_info.resize(_cht_boundary_ids.size());
301  _boundary_heat_flux.clear();
302  _boundary_temperature.clear();
304 
305  for (const auto bd_index : index_range(_cht_boundary_ids))
306  {
307  const auto bd_id = _cht_boundary_ids[bd_index];
308  const auto & bd_name = _cht_boundary_names[bd_index];
309 
310  // We populate the face infos for every interface
311  auto & bd_fi_container = _cht_face_info[bd_index];
312  for (auto & fi : _problem.mesh().faceInfo())
313  if (fi->boundaryIDs().count(bd_id))
314  bd_fi_container.push_back(fi);
315 
316  // We do this because the coupling functors should be evaluated on both sides
317  // of the interface and there are rigorous checks if the functors don't support a subdomain
318  std::set<SubdomainID> combined_set;
319  std::set_union(solid_variable->blockIDs().begin(),
320  solid_variable->blockIDs().end(),
321  fluid_variable->blockIDs().begin(),
322  fluid_variable->blockIDs().end(),
323  std::inserter(combined_set, combined_set.begin()));
324 
325  // We instantiate the coupling fuctors for heat flux and temperature
327  _problem.mesh(), combined_set, "heat_flux_to_solid_" + bd_name);
329  _problem.mesh(), combined_set, "heat_flux_to_fluid_" + bd_name);
330 
331  _boundary_heat_flux.push_back(
332  std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>(
333  {std::move(solid_bd_flux), std::move(fluid_bd_flux)}));
334  auto & flux_container = _boundary_heat_flux.back();
335 
336  _integrated_boundary_heat_flux.push_back(std::vector<Real>({0.0, 0.0}));
337 
339  _problem.mesh(), combined_set, "interface_temperature_solid_" + bd_name);
341  _problem.mesh(), combined_set, "interface_temperature_fluid_" + bd_name);
342 
343  _boundary_temperature.push_back(
344  std::vector<FaceCenteredMapFunctor<Real, std::unordered_map<dof_id_type, Real>>>(
345  {std::move(solid_bd_temperature), std::move(fluid_bd_temperature)}));
346  auto & temperature_container = _boundary_temperature.back();
347 
348  // Time to register the functors on all of the threads
349  for (const auto tid : make_range(libMesh::n_threads()))
350  {
351  _problem.addFunctor("heat_flux_to_solid_" + bd_name, flux_container[NS::CHTSide::SOLID], tid);
352  _problem.addFunctor("heat_flux_to_fluid_" + bd_name, flux_container[NS::CHTSide::FLUID], tid);
354  "interface_temperature_solid_" + bd_name, temperature_container[NS::CHTSide::SOLID], tid);
356  "interface_temperature_fluid_" + bd_name, temperature_container[NS::CHTSide::FLUID], tid);
357  }
358 
359  // Initialize the containers, they will be filled with correct values soon.
360  // Before any solve happens.
361  for (const auto region_index : make_range(2))
362  for (auto & fi : bd_fi_container)
363  {
364  flux_container[region_index][fi->id()] = 0.0;
365  temperature_container[region_index][fi->id()] = 0.0;
366  }
367  }
368 }
369 
370 void
372 {
373  for (const auto bd_index : index_range(_cht_boundary_ids))
374  {
375  const auto & bd_fi_container = _cht_face_info[bd_index];
376  auto & temperature_container = _boundary_temperature[bd_index];
377 
378  for (const auto region_index : make_range(2))
379  {
380  // Can't be const considering we will update members from here
381  auto bc = _cht_boundary_conditions[bd_index][region_index];
382  for (const auto & fi : bd_fi_container)
383  {
384  bc->setupFaceData(fi, fi->faceType(std::make_pair(0, _cht_system_numbers[region_index])));
385  temperature_container[1 - region_index][fi->id()] = bc->computeBoundaryValue();
386  }
387  }
388  }
389 }
390 
391 void
393 {
394  // Well we can just use the face that this enum casts into int very nicely
395  // we can use it to get the index of the other side
396  const NS::CHTSide other_side = static_cast<NS::CHTSide>(1 - side);
397 
398  for (const auto bd_index : index_range(_cht_boundary_ids))
399  {
400  auto & other_bc = _cht_boundary_conditions[bd_index][other_side];
401  auto & other_kernel = _cht_conduction_kernels[other_side];
402 
403  // We get the relaxation from the other side, so if we are fluid side we get the solid
404  // relaxation
405  const auto temperature_relaxation = _cht_flux_relaxation_factor[other_side][bd_index];
406  const auto flux_relaxation = _cht_temperature_relaxation_factor[other_side][bd_index];
407 
408  // Fetching the right container here, if side is fluid we fetch "heat_flux_to_fluid"
409  auto & flux_container = _boundary_heat_flux[bd_index][side];
410  // Fetching the other side's contaienr here, if side is fluid we fetch the solid temperature
411  auto & temperature_container = _boundary_temperature[bd_index][other_side];
412  // We will also update the integrated flux for output info
413  auto & integrated_flux = _integrated_boundary_heat_flux[bd_index][side];
414  // We are recomputing this so, time to zero this out
415  integrated_flux = 0.0;
416 
417  const auto & bd_fi_container = _cht_face_info[bd_index];
418 
419  // We enter the face loop to update the coupling fields
420  for (const auto & fi : bd_fi_container)
421  {
422  other_kernel->setupFaceData(fi);
423  // We will want the flux in W/m2 for the coupling so no face integral for now,
424  // this can cause issues if we start using face area in the kernels
425  // for more than just face integral multipliers.
426  // Also, if we decide to not require overlapping meshes on the boundary
427  // this will probably have to change.
428  other_kernel->setCurrentFaceArea(1.0);
429  other_bc->setupFaceData(fi, fi->faceType(std::make_pair(0, _cht_system_numbers[other_side])));
430 
431  // T_new = relaxation * T_boundary + (1-relaxation) * T_old
432  temperature_container[fi->id()] =
433  temperature_relaxation * other_bc->computeBoundaryValue() +
434  (1 - temperature_relaxation) * temperature_container[fi->id()];
435 
436  // Flux_new = relaxation * Flux_boundary + (1-relaxation) * Flux_old,
437  // minus sign is due to the normal differences
438 
439  // Conductive flux
440  auto flux = other_kernel->computeBoundaryFlux(*other_bc);
441 
442  // If participating media radiation system exists we add the heat flux from the fluid
443  // to the solid region.
444  if (!_pm_radiation_systems.empty() && side == NS::CHTSide::SOLID)
445  for (const auto sys_i : index_range(_pm_radiation_systems))
446  {
447  _cht_pm_radiation_kernels[sys_i]->setupFaceData(fi);
448  _cht_pm_radiation_kernels[sys_i]->setCurrentFaceArea(1.0);
449  _cht_pm_radiation_boundary_conditions[bd_index][sys_i]->setupFaceData(
450  fi, fi->faceType(std::make_pair(0, _cht_pm_radiation_system_numbers[sys_i])));
451  flux += _cht_pm_radiation_kernels[sys_i]->computeBoundaryFlux(
452  *_cht_pm_radiation_boundary_conditions[bd_index][sys_i]);
453  }
454 
455  flux_container[fi->id()] =
456  flux_relaxation * flux + (1 - flux_relaxation) * flux_container[fi->id()];
457 
458  // We do the integral here
459  integrated_flux += flux * fi->faceArea() * fi->faceCoord();
460  }
461  }
462 }
463 
464 void
466 {
467  for (const auto i : index_range(_integrated_boundary_heat_flux))
468  {
469  auto & integrated_fluxes = _integrated_boundary_heat_flux[i];
470  _problem.comm().sum(integrated_fluxes[NS::CHTSide::SOLID]);
471  _problem.comm().sum(integrated_fluxes[NS::CHTSide::FLUID]);
472  }
473 }
474 
475 void
477 {
478  for (const auto i : index_range(_integrated_boundary_heat_flux))
479  {
480  auto & integrated_fluxes = _integrated_boundary_heat_flux[i];
481  _console << " Iteration " << _fpi_it << " Boundary " << _cht_boundary_names[i]
482  << " flux on solid side " << integrated_fluxes[NS::CHTSide::SOLID]
483  << " flux on fluid side: " << integrated_fluxes[NS::CHTSide::FLUID] << std::endl;
484  }
485 }
486 
487 void
489 {
490  for (const auto i : index_range(_integrated_boundary_heat_flux))
491  _integrated_boundary_heat_flux[i] = std::vector<Real>({0.0, 0.0});
492 }
493 
494 bool
496 {
497  if (_fpi_it >= _max_cht_fpi)
498  return true;
499 
500  for (const auto & boundary_flux : _integrated_boundary_heat_flux)
501  {
502  const Real f1 = boundary_flux[0];
503  const Real f2 = boundary_flux[1];
504 
505  // Special case: both are zero at startup not converged yet
506  if (_fpi_it != 0 && (f1 == 0.0 && f2 == 0.0))
507  return true;
508 
509  // These fluxes should be of opposite sign
510  const Real diff = std::abs(f1 + f2);
511  const Real denom = std::max({std::fabs(f1), std::fabs(f2), Real(1e-14)});
512  const Real rel_diff = diff / denom;
513 
514  if (rel_diff >= _cht_heat_flux_tolerance)
515  return false;
516  }
517 
518  return _fpi_it;
519 }
520 
521 } // End FV namespace
522 } // End Moose namespace
std::vector< unsigned int > _cht_system_numbers
The solid (0) and fluid (1) system numbers.
Definition: CHTHandler.h:113
void updateCHTBoundaryCouplingFields(const NS::CHTSide side)
Update the coupling fields for.
Definition: CHTHandler.C:392
unsigned int n_threads()
A functor whose evaluation relies on querying a map where the keys are face info ids and the values c...
std::vector< LinearFVFluxKernel * > _cht_pm_radiation_kernels
The conduction radiation kernels from the fluid domains.
Definition: CHTHandler.h:125
void paramError(const std::string &param, Args... args) const
std::vector< BoundaryID > _cht_boundary_ids
The IDs of the CHT boundaries.
Definition: CHTHandler.h:96
FEProblemBase & _problem
Reference to FEProblem.
Definition: CHTHandler.h:78
void resetIntegratedFluxes()
Reset the heat fluxes to 0.
Definition: CHTHandler.C:488
void addFunctor(const std::string &name, const Moose::FunctorBase< T > &functor, const THREAD_ID tid)
MeshBase & mesh
void printIntegratedFluxes() const
Print the integrated heat fluxes.
Definition: CHTHandler.C:476
Definition: NS.h:201
const Parallel::Communicator & comm() const
void initializeCHTCouplingFields()
Initialize the coupling fields for the conjugate heat transfer routines.
Definition: CHTHandler.C:371
SystemBase * _energy_system
The energy system.
Definition: CHTHandler.h:84
void setupConjugateHeatTransferContainers()
Set up the boundary condition pairs, functor maps, and every other necessary structure for the conjug...
Definition: CHTHandler.C:291
MooseApp & getMooseApp() const
InputParameters emptyInputParameters()
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
virtual unsigned int nVariables() const
virtual const std::string & name() const
const std::vector< const FaceInfo *> & faceInfo() const
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
const std::string & name() const
void linkEnergySystems(SystemBase *solid_energy_system, SystemBase *fluid_energy_system, std::vector< SystemBase *> pm_radiation_systems)
Link energy systems.
Definition: CHTHandler.C:91
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:198
unsigned int _fpi_it
CHT fixed point iteration counter.
Definition: CHTHandler.h:148
bool converged() const
Check if CHT iteration converged.
Definition: CHTHandler.C:495
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< 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
const Real _cht_heat_flux_tolerance
Tolerance for heat flux at the CHT interfaces.
Definition: CHTHandler.h:102
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
unsigned int number() const
std::string stringify(const T &t)
std::vector< SystemBase * > _pm_radiation_systems
The solid energy system.
Definition: CHTHandler.h:90
void sumIntegratedFluxes()
Sum the integrated fluxes over all processors.
Definition: CHTHandler.C:465
SystemBase * _solid_energy_system
The solid energy system.
Definition: CHTHandler.h:87
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
std::vector< unsigned int > _cht_pm_radiation_system_numbers
The participating media radiation system numbers.
Definition: CHTHandler.h:116
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
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseApp & _app
std::vector< BoundaryName > _cht_boundary_names
The names of the CHT boundaries.
Definition: CHTHandler.h:93
Query query()
IntRange< T > make_range(T beg, T end)
virtual MooseMesh & mesh() override
void mooseError(Args &&... args) const
void deduceCHTBoundaryCoupling()
Run error checks and make sure everything works.
Definition: CHTHandler.C:106
const std::vector< VariableName > & getVariableNames() const
TheWarehouse & theWarehouse()
const ConsoleStream _console
static InputParameters validParams()
Definition: CHTHandler.C:25
MooseVariableFieldBase & getVariable(THREAD_ID tid, const std::string &var_name) const
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< 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
bool isParamSetByUser(const std::string &name) const
std::vector< LinearFVFluxKernel * > _cht_conduction_kernels
The conduction kernels from the solid/fluid domains. Can&#39;t be const, considering we are updating the ...
Definition: CHTHandler.h:122
const unsigned int _max_cht_fpi
Maximum number of CHT fixed point iterations.
Definition: CHTHandler.h:99
void ErrorVector unsigned int
auto index_range(const T &sizable)
CHTHandler(const InputParameters &parameters)
Constructor with initialization parameters.
Definition: CHTHandler.C:76
Definition: NS.h:200