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, double shade_factor) noexcept;
90
92double backLongwave(double t_water_c, double emiss_water) noexcept;
93
101double atmosphericEmissivity(double e_a_kpa, double atm_emiss_coeff,
102 double cloud_factor = 1.0) noexcept;
103
105double atmosphericLongwave(double t_air_c, double humidity_pct, double atm_emiss_coeff,
106 double lw_reflection, double sky_view,
107 double cloud_factor = 1.0) noexcept;
108
110double landCoverLongwave(double t_air_c, double emiss_landcover, double sky_view) noexcept;
111
121double netRadiativeFluxOut(double t_water_c, double t_air_c, double humidity_pct,
122 const RadiativeConfig& cfg, double jin_wm2 = -1.0,
123 double cloud_factor = 1.0, double incoming_longwave = -1.0) noexcept;
124
133double radiativeFluxOut(const SimulationContext& ctx, const HeatElement& elem, double t_w) noexcept;
135double radiativeFluxOut(const SimulationContext&, const HeatElement&, double,
136 bool enabled) noexcept;
137
138} // namespace openswmm::transport::heat
139
140#endif // OPENSWMM_ENGINE_TRANSPORT_RADIATIVE_EXCHANGE_HPP
Plan PE — per-element radiative and bed attributes.
Definition BedExchange.cpp:39
double netRadiativeFluxOut(double t_water_c, double t_air_c, double humidity_pct, const RadiativeConfig &cfg, double jin_wm2, double cloud_factor, double incoming_longwave) noexcept
Combine water emission with absorbed shortwave, sky longwave and land-cover longwave.
Definition RadiativeExchange.cpp:181
constexpr double kStefanBoltzmann
Stefan–Boltzmann constant, W/m²/K⁴ (rhemodel.cpp:46).
Definition RadiativeExchange.hpp:83
constexpr double kKelvinOffset
Celsius → Kelvin offset.
Definition RadiativeExchange.hpp:86
double atmosphericEmissivity(double e_a_kpa, double atm_emiss_coeff, double cloud_factor) noexcept
Compute Brunt atmospheric emissivity with optional held cloud enhancement.
Definition RadiativeExchange.cpp:109
double atmosphericLongwave(double t_air_c, double humidity_pct, double atm_emiss_coeff, double lw_reflection, double sky_view, double cloud_factor) noexcept
Compute absorbed visible-sky atmospheric longwave into water.
Definition RadiativeExchange.cpp:137
double radiativeFluxOut(const SimulationContext &ctx, const HeatElement &elem, double t_w) noexcept
Evaluate element radiative flux using the configured global family enable.
Definition RadiativeExchange.cpp:217
double backLongwave(double t_water_c, double emiss_water) noexcept
Compute emitted water longwave flux from the Stefan-Boltzmann law.
Definition RadiativeExchange.cpp:95
double landCoverLongwave(double t_air_c, double emiss_landcover, double sky_view) noexcept
Compute visible land-cover longwave contribution into water.
Definition RadiativeExchange.cpp:154
double netShortwave(double incoming_wm2, double albedo, double shade_factor) noexcept
Compute absorbed incident shortwave after albedo and shade.
Definition RadiativeExchange.cpp:82
Definition ExchangeLaw.hpp:60
Which element a flux evaluator is being called for.
Definition HeatOverrideData.hpp:95
[RADIATIVE_FLUXES] parameters (heat plan §2.2, phase H3).
Definition HeatData.hpp:237
Central, reentrant simulation context.
Definition SimulationContext.hpp:390