13 #include "libmesh/quadrature.h" 22 "stefan_boltzmann_constant",
24 "The Stefan-Boltzmann constant. Default value is in units of [W / m^2 K^4].");
27 "Emissivities for each boundary.");
28 params.
addParam<std::vector<BoundaryName>>(
29 "fixed_temperature_boundary",
31 "The list of boundary IDs from the mesh with fixed temperatures.");
32 params.
addParam<std::vector<FunctionName>>(
33 "fixed_boundary_temperatures", {},
"The temperatures of the fixed boundary.");
34 params.
addParam<std::vector<BoundaryName>>(
35 "adiabatic_boundary", {},
"The list of boundary IDs from the mesh that are adiabatic.");
38 "This object implements the exchange of heat by radiation between sidesets.");
44 _sigma_stefan_boltzmann(getParam<
Real>(
"stefan_boltzmann_constant")),
45 _n_sides(boundaryIDs().size()),
46 _temperature(coupledValue(
"temperature")),
48 _heat_flux_density(_n_sides),
49 _side_temperature(_n_sides),
53 _surface_irradiation(_n_sides)
56 auto & eps_names = getParam<std::vector<FunctionName>>(
"emissivity");
64 std::vector<BoundaryName> boundary_names = getParam<std::vector<BoundaryName>>(
"boundary");
66 for (
unsigned int j = 0;
j < boundary_names.size(); ++
j)
68 if (boundary_names[
j] ==
"ANY_BOUNDARY_ID")
69 paramError(
"boundary",
"boundary must be explicitly provided.");
77 paramError(
"emissivity",
"The number of entries must match the number of boundary entries.");
87 "fixed_temperature_boundary is provided, but fixed_boundary_temperatures is not.");
89 auto fst_fn = getParam<std::vector<FunctionName>>(
"fixed_boundary_temperatures");
90 for (
auto & fn : fst_fn)
94 std::vector<BoundaryName> boundary_names =
95 getParam<std::vector<BoundaryName>>(
"fixed_temperature_boundary");
99 "fixed_boundary_temperatures",
100 "fixed_boundary_temperatures and fixed_temperature_boundary must have the same length.");
102 unsigned int index = 0;
103 for (
auto &
name : boundary_names)
115 "fixed_temperature_boundary must be a subset of boundary.");
124 std::vector<BoundaryName> boundary_names =
125 getParam<std::vector<BoundaryName>>(
"adiabatic_boundary");
127 for (
auto &
name : boundary_names)
135 paramError(
"adiabatic_boundary",
"adiabatic_boundary must be a subset of boundary.");
142 paramError(
"adiabatic_boundary",
"Isothermal boundary cannot also be adiabatic boundary.");
150 "Current boundary id not in _side_id_index.");
153 for (
unsigned int qp = 0; qp <
_qrule->n_points(); qp++)
208 DenseVector<Real> radiosity(
_n_sides);
209 for (
unsigned int i = 0; i <
_n_sides; ++i)
227 for (
unsigned int i = 0; i <
_n_sides; ++i)
268 std::set<BoundaryID> surface_ids;
270 surface_ids.insert(p.first);
virtual std::vector< std::vector< Real > > setViewFactors()=0
a purely virtual function that defines where view factors come from
static InputParameters validParams()
std::vector< const Function * > _fixed_side_temperature
side id to index map, side ids can have holes or be out of order
std::map< BoundaryID, unsigned int > _side_id_index
side id to index map, side ids can have holes or be out of order
std::vector< Real > _surface_irradiation
the irradiation into each surface
GrayLambertSurfaceRadiationBase computes the heat flux on a set of surfaces in radiative heat transfe...
const MooseArray< Point > & _q_point
const std::vector< double > y
std::vector< Real > _radiosity
the radiosity of each surface
virtual void execute() override
virtual const std::string & name() const
Real getSurfaceIrradiation(BoundaryID id) const
public interface of this UserObject
virtual void finalize() override
bool isParamValid(const std::string &name) const
const MooseArray< Real > & _JxW
GrayLambertSurfaceRadiationBase(const InputParameters ¶meters)
const BoundaryID & _current_boundary_id
boundary_id_type BoundaryID
std::vector< const Function * > _emissivity
constant emissivity for each boundary
void paramError(const std::string ¶m, Args... args) const
const MooseArray< Real > & _coord
virtual void initialize() override
std::set< BoundaryID > getSurfaceIDs() const
std::vector< Real > _beta
the average value of sigma * eps * T^4
static InputParameters validParams()
std::vector< Real > _side_temperature
the average temperature: this could be important for adiabatic walls
void lu_solve(const DenseVector< Real > &b, DenseVector< Real > &x)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _n_sides
number of active boundary ids
std::map< unsigned int, unsigned int > _fixed_side_id_index
side id to index map for isothermal boundaries, side ids can have holes or be out of order ...
const Function & getFunctionByName(const FunctionName &name) const
std::vector< std::vector< Real > > _view_factors
the view factors which are set by setViewFactors by derived classes
const QBase *const & _qrule
Real getSurfaceEmissivity(BoundaryID id) const
const Real _sigma_stefan_boltzmann
Stefan-Boltzmann constant.
Real getSurfaceRadiosity(BoundaryID id) const
std::vector< Real > _heat_flux_density
the heat flux density qdot
std::set< unsigned int > _adiabatic_side_ids
the set of adiabatic boundaries
std::vector< enum RAD_BND_TYPE > _side_type
the type of the side, allows lookup index -> type
const VariableValue & _temperature
the coupled temperature variable
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
Real getViewFactor(BoundaryID from_id, BoundaryID to_id) const
std::vector< Real > _areas
the area by participating side set
Real getSurfaceTemperature(BoundaryID id) const
MooseUnits pow(const MooseUnits &, int)
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
virtual void threadJoin(const UserObject &y) override
Real getSurfaceHeatFluxDensity(BoundaryID id) const