OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
RadiativeExchange.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2//
3// Copyright 2026 Caleb Buahin
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
69
70#ifndef OPENSWMM_ENGINE_TRANSPORT_RADIATIVE_EXCHANGE_HPP
71#define OPENSWMM_ENGINE_TRANSPORT_RADIATIVE_EXCHANGE_HPP
72
73#include "../../../data/HeatOverrideData.hpp" // HeatElement (PE1)
74
75namespace openswmm {
77struct RadiativeConfig;
78}
79
81
83inline constexpr double kStefanBoltzmann = 5.67e-8;
84
86inline constexpr double kKelvinOffset = 273.15;
87
89double netShortwave(double incoming_wm2, double albedo,
90 double shade_factor) noexcept;
91
93double backLongwave(double t_water_c, double emiss_water) noexcept;
94
102double atmosphericEmissivity(double e_a_kpa, double atm_emiss_coeff,
103 double cloud_factor = 1.0) noexcept;
104
106double atmosphericLongwave(double t_air_c, double humidity_pct,
107 double atm_emiss_coeff, double lw_reflection,
108 double sky_view,
109 double cloud_factor = 1.0) noexcept;
110
112double landCoverLongwave(double t_air_c, double emiss_landcover,
113 double sky_view) noexcept;
114
124double netRadiativeFluxOut(double t_water_c, double t_air_c,
125 double humidity_pct, const RadiativeConfig& cfg,
126 double jin_wm2 = -1.0,
127 double cloud_factor = 1.0) noexcept;
128
137double radiativeFluxOut(const SimulationContext& ctx,
138 const HeatElement& elem, double t_w) noexcept;
139
140} // namespace openswmm::transport::heat
141
142#endif // OPENSWMM_ENGINE_TRANSPORT_RADIATIVE_EXCHANGE_HPP
Plan PE — per-element radiative and bed attributes.
Definition BedExchange.cpp:37
constexpr double kStefanBoltzmann
Stefan–Boltzmann constant, W/m²/K⁴ (rhemodel.cpp:46).
Definition RadiativeExchange.hpp:83
double atmosphericLongwave(double t_air_c, double humidity_pct, double atm_emiss_coeff, double lw_reflection, double sky_view, double cloud_factor) noexcept
Atmospheric longwave [W/m²], INTO the water.
Definition RadiativeExchange.cpp:96
constexpr double kKelvinOffset
Celsius → Kelvin offset.
Definition RadiativeExchange.hpp:86
double atmosphericEmissivity(double e_a_kpa, double atm_emiss_coeff, double cloud_factor) noexcept
Definition RadiativeExchange.cpp:79
double radiativeFluxOut(const SimulationContext &ctx, const HeatElement &elem, double t_w) noexcept
Definition RadiativeExchange.cpp:144
double backLongwave(double t_water_c, double emiss_water) noexcept
Back longwave emitted by the water [W/m²], OUT of the water.
Definition RadiativeExchange.cpp:75
double landCoverLongwave(double t_air_c, double emiss_landcover, double sky_view) noexcept
Land-cover longwave [W/m²], INTO the water.
Definition RadiativeExchange.cpp:106
double netShortwave(double incoming_wm2, double albedo, double shade_factor) noexcept
Net absorbed shortwave [W/m²], INTO the water.
Definition RadiativeExchange.cpp:67
double netRadiativeFluxOut(double t_water_c, double t_air_c, double humidity_pct, const RadiativeConfig &cfg, double jin_wm2, double cloud_factor) noexcept
Definition RadiativeExchange.cpp:116
Definition NodeCoupling.cpp:16
Which element a flux evaluator is being called for.
Definition HeatOverrideData.hpp:96
[RADIATIVE_FLUXES] parameters (heat plan §2.2, phase H3).
Definition HeatData.hpp:243
Central, reentrant simulation context.
Definition SimulationContext.hpp:353