OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
Radiation.hpp File Reference

Solar geometry, atmospheric radiation and interval weather forcing. More...

#include <string>
#include "surface/UebSnow.hpp"
Include dependency graph for Radiation.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::climate::RadiationState
 
struct  openswmm::climate::SolarPosition
 Sun geometry at one instant. The SPA swap point's return type. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::climate
 

Enumerations

enum class  openswmm::climate::RadiationOrigin {
  openswmm::climate::Computed ,
  openswmm::climate::Timeseries ,
  openswmm::climate::MetFile ,
  openswmm::climate::LegacyHeat
}
 

Functions

std::string openswmm::climate::resolveRadiation (SimulationContext &ctx, double date, double seconds, RadiationState &output)
 Resolve mean weather/radiation for one interval without advancing climate time.
 
std::string openswmm::climate::initializeRadiation (SimulationContext &ctx)
 Validate snow parameters and prepare site and weather input caches.
 
std::string openswmm::climate::resolveUebForcing (SimulationContext &ctx, double date, double seconds, double slope, double aspect, surface::ueb::Forcing &forcing, double &pressure)
 Merge resolved interval weather and slope-adjusted radiation into a UEB forcing.
 
SolarPosition openswmm::climate::solarPosition (int day_of_year, double hour_local, double lat_deg, double lon_deg, double tz_hours) noexcept
 Compute Spencer/NOAA sun geometry at a local civil-clock instant.
 
double openswmm::climate::airMass (double zenith_deg) noexcept
 Compute Kasten-Young relative optical air mass.
 
double openswmm::climate::pressureFromElevation (double elevation_m) noexcept
 Estimate standard-atmosphere station pressure from elevation.
 
double openswmm::climate::birdClearSkyGHI (const SolarPosition &pos, double pressure_mb, const SolarConfig &cfg) noexcept
 Estimate clear-sky global horizontal irradiance with Bird-Hulstrom terms.
 
double openswmm::climate::cloudShortwaveFactor (double cloud_fraction, double k, double n) noexcept
 Compute the cloud attenuation multiplier max(0,1-k*C^n).
 
double openswmm::climate::cloudLongwaveFactor (double cloud_fraction, double k_lw) noexcept
 Compute the cloud atmospheric-emissivity multiplier 1+k_lw*C^2.
 
void openswmm::climate::updateSolarForcing (SimulationContext &ctx, double seconds=1)
 Update shared heat shortwave/cloud forcing with mesh radiation disabled.
 
void openswmm::climate::updateSolarForcing (SimulationContext &ctx, double seconds, bool mesh_enabled)
 Resolve shared incoming heat shortwave and cloud forcing at current_date.
 

Variables

constexpr double openswmm::climate::kSolarConstant = 1367.0
 Solar constant, W/m² (Bird & Hulstrom 1981; WMO 1982).
 
constexpr double openswmm::climate::kStdPressureMb = 1013.25
 Sea-level standard pressure, millibars — Bird's pressure reference.
 

Detailed Description

Solar geometry, atmospheric radiation and interval weather forcing.

Solar position uses the Spencer/NOAA approximation, not NREL SPA. Angles are degrees; longitude and timezone are positive east. The position result is shared by Bird-Hulstrom clear-sky irradiance and the interval solar geometry used for UEB forcing. Atmospheric and radiation outputs use SI units.

Shortwave cloud attenuation follows 1-k*C^n; the independent longwave factor follows 1+k_lw*C^2. Constant, time-series and computed heat radiation are supported alongside the snow forcing resolver's meteorological file inputs. These functions supply incoming forcing; net surface fluxes live in the heat components. Serialization, configuration validation and runtime scheduling remain caller responsibilities.

See also
SolarPosition, resolveRadiation(), updateSolarForcing()
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0