https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GapFluxModelRadiationBase.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
11
14{
16 params.addParam<Real>("stefan_boltzmann", 5.670373e-8, "Stefan-Boltzmann constant");
17 params.addRangeCheckedParam<Real>("primary_emissivity",
18 1,
19 "primary_emissivity>=0 & primary_emissivity<=1",
20 "The emissivity of the primary surface");
21 params.addRangeCheckedParam<Real>("secondary_emissivity",
22 1,
23 "secondary_emissivity>=0 & secondary_emissivity<=1",
24 "The emissivity of the secondary surface");
25 params.addParamNamesToGroup("stefan_boltzmann primary_emissivity secondary_emissivity",
26 "Gap Radiative Flux");
27 return params;
28}
29
31 : GapFluxModelBase(parameters),
32 _stefan_boltzmann(getParam<Real>("stefan_boltzmann")),
33 _radial_coord(),
34 _eps_primary(getParam<Real>("primary_emissivity")),
35 _eps_secondary(getParam<Real>("secondary_emissivity")),
36 _has_zero_emissivity(_eps_primary == 0 && _eps_secondary == 0),
37 _parallel_plate_emissivity(
38 _has_zero_emissivity ? 0 : 1 / (1.0 / _eps_primary + 1.0 / _eps_secondary - 1))
39{
40 const auto & coord_systems = _mesh.getCoordSystem();
41 mooseAssert(coord_systems.size(), "This better not be empty");
42 _coord_system = coord_systems.begin()->second;
43 for (const auto [sub_id, coord_system_type] : coord_systems)
44 {
45 libmesh_ignore(sub_id);
46 if (coord_system_type != _coord_system)
48 "Multiple coordinate system types detected. If you need this object to work with "
49 "multiple coordinate system types in the same mesh, please contact a MOOSE developer");
50 }
51
54}
55
56Real
58{
60 return 0;
61
62 switch (_coord_system)
63 {
66
67 case Moose::COORD_RZ:
68 {
69 const auto primary_r = _primary_point.point(_radial_coord);
70 const auto secondary_r = _secondary_point.point(_radial_coord);
71 const bool primary_is_inner = primary_r < secondary_r;
72 const auto inner_r = primary_is_inner ? primary_r : secondary_r;
73 const auto outer_r = primary_is_inner ? secondary_r : primary_r;
74 const auto inner_eps = primary_is_inner ? _eps_primary : _eps_secondary;
75 const auto outer_eps = primary_is_inner ? _eps_secondary : _eps_primary;
76
77 // Taken from our documentation of FVInfiniteCylinderRadiativeBC
78 return inner_eps * outer_eps * outer_r /
79 (outer_eps * outer_r + inner_eps * inner_r * (1 - outer_eps));
80 }
81
82 default:
83 mooseError("spherical coordinates not yet supported for this object");
84 }
85}
86
89 const ADReal & primary_T) const
90{
91 // We add 'surface_integration_factor' to account for the surface integration of the conductance
92 // due to radiation.
93 const ADReal temp_func =
94 (primary_T * primary_T + secondary_T * secondary_T) * (primary_T + secondary_T);
95
96 return (primary_T - secondary_T) * _stefan_boltzmann * temp_func * emissivity() *
98}
DualNumber< Real, DNDerivativeType, true > ADReal
Base class for gap flux models used by ModularGapConductanceConstraint.
static InputParameters validParams()
Moose::ElemPointArg _secondary_point
The secondary quadrature point location.
ADReal _surface_integration_factor
Moose::ElemPointArg _primary_point
The primary quadrature point location.
GapFluxModelRadiationBase(const InputParameters &parameters)
const Real _eps_secondary
The emissivity of the secondary surface.
static InputParameters validParams()
const bool _has_zero_emissivity
Whether both primary and secondary emissivities are zero.
Moose::CoordinateSystemType _coord_system
The coordinate system type, e.g. XYZ or RZ.
const Real _eps_primary
The emissivity of the primary surface.
unsigned int _radial_coord
The index for the radial coordinate when performing RZ simulations.
const Real _parallel_plate_emissivity
The theoretical infinite parallel-plate geometry surface emissivity, which is a function of both the ...
Real emissivity() const
computes a single emissivity coefficient based on the coordinate system and the individual secondary ...
ADReal computeRadiationFlux(const ADReal &secondary_T, const ADReal &primary_T) const
computes the radiation flux based on the input secondary and primary temperatures
const Real _stefan_boltzmann
Stefan-Boltzmann constant.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void mooseError(Args &&... args) const
unsigned int getAxisymmetricRadialCoord() const
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
const Moose::CoordinateSystemType & _coord_sys
libMesh::Point point