OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm_heat.h
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
54
55#ifndef OPENSWMM_HEAT_H
56#define OPENSWMM_HEAT_H
57
58#include "openswmm_engine.h"
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
71
77typedef int (*SWMM_HydrothermalEdit)(SWMM_Engine engine, void* user);
94 void* user);
122SWMM_ENGINE_API int swmm_heat_get_lid_material(SWMM_Engine engine, double values[4]);
148typedef void* SWMM_HeatSnapshot;
179
216
228 int* configured);
239
256
269
285
293
294/* ---------------------------------------------------------------- toggles */
295
304SWMM_ENGINE_API int swmm_heat_get_enabled(SWMM_Engine engine, int* enabled);
305
315SWMM_ENGINE_API int swmm_heat_get_module(SWMM_Engine engine, int module, int* on);
327SWMM_ENGINE_API int swmm_heat_set_module(SWMM_Engine engine, int module, int on);
328
329/* ------------------------------------------------------------- radiative */
330
340SWMM_ENGINE_API int swmm_heat_get_radiative(SWMM_Engine engine, int param, double* value);
358SWMM_ENGINE_API int swmm_heat_set_radiative(SWMM_Engine engine, int param, double value);
359
382
395
411SWMM_ENGINE_API int swmm_heat_get_shortwave_timeseries(SWMM_Engine engine, char* buf, int buflen);
412
424
425/* ----------------------------------------------------------------- solar */
426
436SWMM_ENGINE_API int swmm_heat_get_solar(SWMM_Engine engine, int param, double* value);
452SWMM_ENGINE_API int swmm_heat_set_solar(SWMM_Engine engine, int param, double value);
453
467
468/* ----------------------------------------------------------------- cloud */
469
479
489SWMM_ENGINE_API int swmm_heat_get_cloud(SWMM_Engine engine, int param, double* value);
502SWMM_ENGINE_API int swmm_heat_set_cloud(SWMM_Engine engine, int param, double value);
503
515
528SWMM_ENGINE_API int swmm_heat_get_cloud_timeseries(SWMM_Engine engine, char* buf, int buflen);
529
542
552SWMM_ENGINE_API int swmm_heat_get_current_cloud(SWMM_Engine engine, double* fraction);
553
554/* -------------------------------------------------------- [HEAT_SOURCES]
555 *
556 * The per-source inlet temperature table: a GLOBAL °C for each of the seven
557 * water sources, plus NODE-scope overrides. Added for the G4g editor, which
558 * cannot round-trip a table the API cannot read.
559 *
560 * Every refusal below mirrors `HeatComponent.cpp`'s parser exactly, so a
561 * value the deck rejects is a value this API rejects, and the two cannot
562 * disagree about what a model contains. Values are REFUSED, never clamped.
563 */
564
575
587
600SWMM_ENGINE_API int swmm_heat_get_source_temp(SWMM_Engine engine, int source, double* temp_c);
601
615SWMM_ENGINE_API int swmm_heat_set_source_temp(SWMM_Engine engine, int source, double temp_c);
616
629 int* configured);
630
643
653
665SWMM_ENGINE_API int swmm_heat_get_node_override(SWMM_Engine engine, int index, int* source,
666 int* node, double* temp_c);
667
688SWMM_ENGINE_API int swmm_heat_set_node_override(SWMM_Engine engine, int source, int node,
689 double temp_c);
690
701
717 double* temp_c);
718
719/* =========================================================================
720 * [SEDIMENT_EXCHANGE] and per-element attribute overrides
721 * (closed C-API gaps 2026-10-11)
722 *
723 * Values are REFUSED, never clamped, by the same rules as the parser
724 * (HeatComponent.cpp). Edits persist: the heat serializer writes the
725 * configuration and the override rows back to the component file on save.
726 * ========================================================================= */
727
744
754SWMM_ENGINE_API int swmm_heat_get_sediment(SWMM_Engine engine, int param, double* value);
755
772SWMM_ENGINE_API int swmm_heat_set_sediment(SWMM_Engine engine, int param, double value);
773
785 int buflen);
786
799
819
829
839
854SWMM_ENGINE_API int swmm_heat_get_element_override(SWMM_Engine engine, int index, int* attr,
855 int* scope, char* name, int name_len,
856 double* value);
857
876SWMM_ENGINE_API int swmm_heat_set_element_override(SWMM_Engine engine, int attr, int scope,
877 const char* name, double value);
878
890
911SWMM_ENGINE_API int swmm_heat_get_effective_element(SWMM_Engine engine, int attr, int scope,
912 const char* name, double* value, int* source,
913 char* source_name, int source_name_len);
914
939
971SWMM_ENGINE_API int swmm_heat_get_2d_values(SWMM_Engine engine, int kind, int first_cell, int count,
972 double* values);
996
1053SWMM_ENGINE_API int swmm_heat_get_ground_values(SWMM_Engine engine, int kind, int first_cell,
1054 int count, double* values);
1081SWMM_ENGINE_API int swmm_heat_get_ground_layers(SWMM_Engine engine, int cell, int kind,
1082 int first_layer, int count, double* values);
1083
1105 SWMM_ChannelGroundStatus* status);
1130 int first_link, int count, double* values);
1153 SWMM_ChannelGroundContact* contact);
1191 SWMM_ChannelGroundContact* contacts,
1192 int capacity, int* required);
1222 SWMM_Engine engine, int link, SWMM_ChannelGroundPreview* out,
1223 SWMM_ChannelGroundContact* contacts, int capacity, int* required, SWMM_CancelCallback callback,
1224 void* user_data);
1254 SWMM_Engine engine, int link, SWMM_ChannelGroundPreview* out, int first,
1255 SWMM_ChannelGroundContact* contacts, int capacity, int* required, SWMM_CancelCallback callback,
1256 void* user_data);
1257
1258#ifdef __cplusplus
1259}
1260#endif
1261
1262#endif /* OPENSWMM_HEAT_H */
#define SWMM_ENGINE_API
Definition openswmm_2d.h:62
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:55
int(* SWMM_CancelCallback)(SWMM_Engine engine, int stage, int progress, void *user_data)
Report synchronous read-only operation progress and optionally request cancellation.
Definition openswmm_callbacks.h:98
OpenSWMM Engine — primary transparent C API (master header).
SWMM_ENGINE_API int swmm_heat_get_lid_material(SWMM_Engine engine, double values[4])
Read-only LID material assumptions: water conductivity, soil conductivity, soil density,...
Definition openswmm_heat_impl.cpp:1444
SWMM_ENGINE_API int swmm_heat_clear_cloud(SWMM_Engine engine)
Clear [CLOUD_COVER] entirely — back to clear sky.
Definition openswmm_heat_impl.cpp:714
int(* SWMM_HydrothermalEdit)(SWMM_Engine engine, void *user)
Definition openswmm_heat.h:77
SWMM_ENGINE_API SWMM_ConfigSnapshot swmm_config_snapshot_create(SWMM_Engine engine)
Allocate a reusable complete hydrothermal authoring snapshot.
Definition openswmm_heat_impl.cpp:1564
SWMM_ENGINE_API int swmm_heat_get_effective_source_temp(SWMM_Engine engine, int source, int node, double *temp_c)
The temperature source water actually enters node at (°C) — the NODE override when one exists,...
Definition openswmm_heat_impl.cpp:878
SWMM_ENGINE_API int swmm_heat_get_radiative(SWMM_Engine engine, int param, double *value)
Read one [RADIATIVE_FLUXES] parameter.
Definition openswmm_heat_impl.cpp:275
SWMM_GroundHeatLayerValue
Definition openswmm_heat.h:1056
@ SWMM_GROUND_LAYER_TOP
Definition openswmm_heat.h:1057
@ SWMM_GROUND_LAYER_TEMPERATURE
Definition openswmm_heat.h:1059
@ SWMM_GROUND_LAYER_ENERGY
Definition openswmm_heat.h:1060
@ SWMM_GROUND_LAYER_SATURATED_WATER
Definition openswmm_heat.h:1064
@ SWMM_GROUND_LAYER_MOISTURE
Definition openswmm_heat.h:1062
@ SWMM_GROUND_LAYER_BOTTOM
Definition openswmm_heat.h:1058
@ SWMM_GROUND_LAYER_CONDUCTIVITY
Definition openswmm_heat.h:1063
@ SWMM_GROUND_LAYER_CAPACITY
Definition openswmm_heat.h:1061
SWMM_ENGINE_API int swmm_heat_get_ground_values(SWMM_Engine engine, int kind, int first_cell, int count, double *values)
Read a contiguous cell range of canonical soil thermal values.
Definition openswmm_mesh_heat_impl.cpp:670
SWMM_ENGINE_API int swmm_heat_get_cloud_configured(SWMM_Engine engine, int *configured)
Is a [CLOUD_COVER] section in effect?
Definition openswmm_heat_impl.cpp:621
SWMM_ENGINE_API int swmm_heat_clear_source_temp(SWMM_Engine engine, int source)
Return a source to the 20 °C default and mark it unconfigured, so the writer emits no row for it....
Definition openswmm_heat_impl.cpp:794
SWMM_ENGINE_API int swmm_heat_set_radiative(SWMM_Engine engine, int param, double value)
Write one [RADIATIVE_FLUXES] parameter.
Definition openswmm_heat_impl.cpp:314
SWMM_Heat2DValue
Definition openswmm_heat.h:943
@ SWMM_HEAT_2D_DEEP_ENERGY
Definition openswmm_heat.h:952
@ SWMM_HEAT_2D_SENSIBLE_ENERGY
Definition openswmm_heat.h:950
@ SWMM_HEAT_2D_WATER_TO_BED_ENERGY
Definition openswmm_heat.h:953
@ SWMM_HEAT_2D_BED_ENERGY
Definition openswmm_heat.h:946
@ SWMM_HEAT_2D_THERMAL_RESIDUAL
Definition openswmm_heat.h:956
@ SWMM_HEAT_2D_RADIATIVE_ENERGY
Definition openswmm_heat.h:949
@ SWMM_HEAT_2D_BED_TEMPERATURE
Definition openswmm_heat.h:945
@ SWMM_HEAT_2D_WATER_THERMAL_INCREMENT
Definition openswmm_heat.h:954
@ SWMM_HEAT_2D_LATENT_ENERGY
Definition openswmm_heat.h:951
@ SWMM_HEAT_2D_WATER_TEMPERATURE
Definition openswmm_heat.h:944
@ SWMM_HEAT_2D_ATMOSPHERIC_ENERGY
Definition openswmm_heat.h:948
@ SWMM_HEAT_2D_BED_CAPACITY
Definition openswmm_heat.h:947
@ SWMM_HEAT_2D_ACCEPTED_EVAPORATION
Definition openswmm_heat.h:955
SWMM_ENGINE_API int swmm_heat_clear_ground_source(SWMM_Engine engine)
Restore the absent/default prescribed channel ground-source choice.
Definition openswmm_heat_impl.cpp:981
SWMM_ENGINE_API int swmm_heat_get_module(SWMM_Engine engine, int module, int *on)
Read one [HEAT_FLUXES] module toggle.
Definition openswmm_heat_impl.cpp:213
SWMM_ENGINE_API int swmm_heat_set_sediment(SWMM_Engine engine, int param, double value)
Write a [SEDIMENT_EXCHANGE] GLOBAL parameter.
Definition openswmm_heat_impl.cpp:1050
SWMM_ENGINE_API int swmm_heat_get_cloud_timeseries(SWMM_Engine engine, char *buf, int buflen)
Name of the [TIMESERIES] bound as the cloud-fraction record, or "" when none is bound....
Definition openswmm_heat_impl.cpp:705
SWMM_ENGINE_API int swmm_heat_get_dry_policy(SWMM_Engine engine, int *policy)
Dry policy: HOLD=0, AIR=1, DEFAULT=2.
Definition openswmm_heat_impl.cpp:1390
SWMM_HeatSolarParam
[SOLAR_RADIATION] parameters (consulted under COMPUTED only).
Definition openswmm_heat.h:271
@ SWMM_HEAT_SOLAR_PRECIP_WATER
Definition openswmm_heat.h:280
@ SWMM_HEAT_SOLAR_LONGITUDE
Definition openswmm_heat.h:273
@ SWMM_HEAT_SOLAR_TURBIDITY_500
Definition openswmm_heat.h:279
@ SWMM_HEAT_SOLAR_TIMEZONE
Definition openswmm_heat.h:274
@ SWMM_HEAT_SOLAR_GROUND_ALBEDO
Definition openswmm_heat.h:282
@ SWMM_HEAT_SOLAR_TURBIDITY_380
Definition openswmm_heat.h:278
@ SWMM_HEAT_SOLAR_ELEVATION
Definition openswmm_heat.h:275
@ SWMM_HEAT_SOLAR_OZONE
Definition openswmm_heat.h:281
@ SWMM_HEAT_SOLAR_LATITUDE
Definition openswmm_heat.h:272
SWMM_ENGINE_API int swmm_heat_set_shortwave_mode(SWMM_Engine engine, int mode)
Set the incoming-shortwave mode.
Definition openswmm_heat_impl.cpp:395
SWMM_ENGINE_API int swmm_heat_set_cloud(SWMM_Engine engine, int param, double value)
Write one [CLOUD_COVER] parameter. Writing any of them marks cloud cover as configured.
Definition openswmm_heat_impl.cpp:653
SWMM_ENGINE_API int swmm_heat_get_channel_ground_values(SWMM_Engine engine, int kind, int first_link, int count, double *values)
Read a contiguous link range of accepted channel-ground values.
Definition openswmm_mesh_heat_impl.cpp:322
SWMM_ENGINE_API int swmm_heat_get_solar(SWMM_Engine engine, int param, double *value)
Read one [SOLAR_RADIATION] parameter.
Definition openswmm_heat_impl.cpp:467
SWMM_ENGINE_API void swmm_config_snapshot_destroy(SWMM_ConfigSnapshot snapshot)
Release a config authoring snapshot.
Definition openswmm_heat_impl.cpp:1620
SWMM_ENGINE_API int swmm_heat_set_source_temp(SWMM_Engine engine, int source, double temp_c)
Write one source's GLOBAL inlet temperature (°C).
Definition openswmm_heat_impl.cpp:767
SWMM_ENGINE_API int swmm_heat_source_count(SWMM_Engine engine, int *count)
Number of sources the table carries (7). Never fails on a model with no heat configured — the table i...
Definition openswmm_heat_impl.cpp:746
SWMM_ENGINE_API SWMM_HeatSnapshot swmm_heat_snapshot_create(SWMM_Engine engine)
Allocate a reusable heat authoring snapshot for an editable engine.
Definition openswmm_heat_impl.cpp:1514
SWMM_ENGINE_API int swmm_heat_get_2d_status(SWMM_Engine engine, SWMM_Heat2DStatus *status)
Read requested and initialized coupled surface-heat status.
Definition openswmm_mesh_heat_impl.cpp:492
SWMM_HeatSedimentParam
[SEDIMENT_EXCHANGE] GLOBAL parameters (bed zone beneath conduits).
Definition openswmm_heat.h:729
@ SWMM_HEAT_SED_GROUND_DEPTH
Definition openswmm_heat.h:733
@ SWMM_HEAT_SED_HYPORHEIC_VELOCITY
Definition openswmm_heat.h:736
@ SWMM_HEAT_SED_GROUND_TEMPERATURE
Definition openswmm_heat.h:734
@ SWMM_HEAT_SED_MESH_POROSITY
Definition openswmm_heat.h:740
@ SWMM_HEAT_SED_THERMAL_DIFFUSIVITY
Definition openswmm_heat.h:730
@ SWMM_HEAT_SED_SOLUTE_DIFFUSIVITY
Definition openswmm_heat.h:731
@ SWMM_HEAT_SED_BED_THICKNESS
Definition openswmm_heat.h:732
@ SWMM_HEAT_SED_DENSITY
Definition openswmm_heat.h:737
@ SWMM_HEAT_SED_GROUND_SOURCE
Definition openswmm_heat.h:741
@ SWMM_HEAT_SED_INITIAL_TEMPERATURE
Definition openswmm_heat.h:739
@ SWMM_HEAT_SED_SPECIFIC_HEAT
Definition openswmm_heat.h:738
SWMM_ENGINE_API int swmm_heat_set_cloud_timeseries(SWMM_Engine engine, const char *name)
Bind a [TIMESERIES] (by name) as the cloud-fraction record.
Definition openswmm_heat_impl.cpp:689
SWMM_ENGINE_API int swmm_heat_get_ground_layers(SWMM_Engine engine, int cell, int kind, int first_layer, int count, double *values)
Zero-based cell/layer ranges. Invalid ranges leave all output untouched.
Definition openswmm_mesh_heat_impl.cpp:759
SWMM_ENGINE_API int swmm_heat_get_shortwave_timeseries(SWMM_Engine engine, char *buf, int buflen)
Name of the [TIMESERIES] bound as the shortwave record, or "" when none is bound. NUL-terminated,...
Definition openswmm_heat_impl.cpp:441
SWMM_ENGINE_API int swmm_heat_preview_channel_ground_map(SWMM_Engine engine, int link, SWMM_ChannelGroundPreview *out, SWMM_ChannelGroundContact *contacts, int capacity, int *required)
Preview complete channel XY coverage on a private mesh copy.
Definition openswmm_mesh_heat_impl.cpp:462
SWMM_ENGINE_API int swmm_heat_node_override_count(SWMM_Engine engine, int *count)
Number of NODE-scope override rows.
Definition openswmm_heat_impl.cpp:808
SWMM_ENGINE_API int swmm_heat_get_channel_ground_contact(SWMM_Engine engine, int index, SWMM_ChannelGroundContact *contact)
Read one initialized channel-to-ground contact interval.
Definition openswmm_mesh_heat_impl.cpp:366
SWMM_ENGINE_API int swmm_heat_get_current_cloud(SWMM_Engine engine, double *fraction)
Cloud fraction in effect at the CURRENT step, [0,1]. Read-only.
Definition openswmm_heat_impl.cpp:730
SWMM_ENGINE_API int swmm_heat_get_sediment(SWMM_Engine engine, int param, double *value)
Read a [SEDIMENT_EXCHANGE] GLOBAL parameter.
Definition openswmm_heat_impl.cpp:1005
SWMM_ENGINE_API int swmm_heat_preview_channel_ground_map_page(SWMM_Engine engine, int link, SWMM_ChannelGroundPreview *out, int first, SWMM_ChannelGroundContact *contacts, int capacity, int *required, SWMM_CancelCallback callback, void *user_data)
Bounded, cancellable contact page. first is a zero-based interval offset; at most capacity rows are c...
Definition openswmm_mesh_heat_impl.cpp:482
SWMM_ENGINE_API int swmm_heat_sediment_temperature_configured(SWMM_Engine engine, int param, int *configured)
Authored status and reset for ground/initial bed temperature.
Definition openswmm_heat_impl.cpp:1406
SWMM_ENGINE_API int swmm_heat_get_sediment_ground_timeseries(SWMM_Engine engine, char *buf, int buflen)
Ground-temperature timeseries name; empty when the constant spelling is in force.
Definition openswmm_heat_impl.cpp:1129
SWMM_ENGINE_API int swmm_heat_ground_source_configured(SWMM_Engine engine, int *configured)
Exact authoring state for the new channel ground selector. Clear restores the absent/default PRESCRIB...
Definition openswmm_heat_impl.cpp:974
SWMM_ENGINE_API int swmm_heat_get_solar_sited(SWMM_Engine engine, int *sited)
Have latitude AND longitude both been explicitly set?
Definition openswmm_heat_impl.cpp:605
SWMM_HeatOverrideScope
Scope of a per-element override row. GLOBAL values are set with swmm_heat_set_radiative / swmm_heat_s...
Definition openswmm_heat.h:822
@ SWMM_HEAT_SCOPE_LINK
Definition openswmm_heat.h:825
@ SWMM_HEAT_SCOPE_MESH_TAG
Definition openswmm_heat.h:827
@ SWMM_HEAT_SCOPE_TAG
Definition openswmm_heat.h:823
@ SWMM_HEAT_SCOPE_NODE
Definition openswmm_heat.h:824
@ SWMM_HEAT_SCOPE_CELL2D
Definition openswmm_heat.h:826
SWMM_ENGINE_API int swmm_heat_set_node_override(SWMM_Engine engine, int source, int node, double temp_c)
Add or update the NODE override for (source, node).
Definition openswmm_heat_impl.cpp:832
SWMM_ENGINE_API int swmm_heat_remove_element_override(SWMM_Engine engine, int index)
Remove one override row by index.
Definition openswmm_heat_impl.cpp:1231
SWMM_ENGINE_API int swmm_config_snapshot_restore(SWMM_Engine engine, SWMM_ConfigSnapshot snapshot)
Restore complete hydrothermal authoring configuration atomically.
Definition openswmm_heat_impl.cpp:1577
SWMM_HeatCloudParam
[CLOUD_COVER] parameters.
Definition openswmm_heat.h:287
@ SWMM_HEAT_CLOUD_FRACTION
Definition openswmm_heat.h:288
@ SWMM_HEAT_CLOUD_LW_CLOUD_K
Definition openswmm_heat.h:291
@ SWMM_HEAT_CLOUD_SW_ATTEN_N
Definition openswmm_heat.h:290
@ SWMM_HEAT_CLOUD_SW_ATTEN_K
Definition openswmm_heat.h:289
SWMM_ENGINE_API int swmm_heat_clear_solar_site(SWMM_Engine engine)
Remove explicit shared solar coordinates and their provenance.
Definition openswmm_heat_impl.cpp:1455
SWMM_ENGINE_API int swmm_heat_clear_sediment_temperature(SWMM_Engine engine, int param)
Reset one authored sediment temperature to inherited/default behavior.
Definition openswmm_heat_impl.cpp:1420
SWMM_ENGINE_API int swmm_heat_remove_node_override(SWMM_Engine engine, int index)
Remove one NODE override by row index. Later rows shift down, so a caller iterating by index must re-...
Definition openswmm_heat_impl.cpp:866
SWMM_ENGINE_API int swmm_heat_get_current_shortwave(SWMM_Engine engine, double *wm2)
Resolved incoming shortwave at the CURRENT step, W/m², cloud already applied. Read-only: this is stat...
Definition openswmm_heat_impl.cpp:450
SWMM_ENGINE_API void swmm_heat_snapshot_destroy(SWMM_HeatSnapshot snapshot)
Release a heat authoring snapshot.
Definition openswmm_heat_impl.cpp:1560
SWMM_ChannelGroundValue
Definition openswmm_heat.h:1109
@ SWMM_CHANNEL_GROUND_TO_SOIL_ENERGY
Definition openswmm_heat.h:1112
@ SWMM_CHANNEL_GROUND_ATMOSPHERIC_ENERGY
Definition openswmm_heat.h:1111
@ SWMM_CHANNEL_GROUND_BED_TEMPERATURE
Definition openswmm_heat.h:1110
@ SWMM_CHANNEL_GROUND_WATER_INCREMENT
Definition openswmm_heat.h:1113
@ SWMM_CHANNEL_GROUND_INTERVAL_COUNT
Definition openswmm_heat.h:1114
SWMM_ENGINE_API int swmm_heat_get_channel_ground_status(SWMM_Engine engine, SWMM_ChannelGroundStatus *status)
Read requested and measured channel-to-ground contact status.
Definition openswmm_mesh_heat_impl.cpp:281
SWMM_ENGINE_API int swmm_heat_get_shortwave_mode(SWMM_Engine engine, int *mode)
Read the incoming-shortwave mode (SWMM_HeatShortwaveMode).
Definition openswmm_heat_impl.cpp:387
SWMM_ENGINE_API int swmm_heat_set_module(SWMM_Engine engine, int module, int on)
Write one [HEAT_FLUXES] module toggle.
Definition openswmm_heat_impl.cpp:236
SWMM_ENGINE_API int swmm_heat_get_effective_element(SWMM_Engine engine, int attr, int scope, const char *name, double *value, int *source, char *source_name, int source_name_len)
Read the effective property for a named NODE, LINK or CELL2D. Source is GLOBAL=0, TAG=1,...
Definition openswmm_heat_impl.cpp:1243
@ SWMM_HEAT_PREVIEW_STAGE_MESH
Definition openswmm_heat.h:1193
@ SWMM_HEAT_PREVIEW_STAGE_MAPPING
Definition openswmm_heat.h:1193
SWMM_HeatSourceKind
[HEAT_SOURCES] water sources. Mirrors openswmm::HeatSource.
Definition openswmm_heat.h:566
@ SWMM_HEAT_SRC_IFACE
Definition openswmm_heat.h:572
@ SWMM_HEAT_SRC_EXTERNAL_INFLOW
Definition openswmm_heat.h:571
@ SWMM_HEAT_SRC_DWF
Definition openswmm_heat.h:568
@ SWMM_HEAT_SRC_INITIAL_STATE
Definition openswmm_heat.h:573
@ SWMM_HEAT_SRC_GW
Definition openswmm_heat.h:569
@ SWMM_HEAT_SRC_RAINFALL
Definition openswmm_heat.h:567
@ SWMM_HEAT_SRC_RDII
Definition openswmm_heat.h:570
SWMM_ENGINE_API int swmm_heat_set_shortwave_timeseries(SWMM_Engine engine, const char *name)
Bind a [TIMESERIES] (by name) as the shortwave record and switch the mode to SWMM_HEAT_SW_TIMESERIES.
Definition openswmm_heat_impl.cpp:424
SWMM_ENGINE_API int swmm_heat_get_source_configured(SWMM_Engine engine, int source, int *configured)
Did the model set this source explicitly, or is it taking the default? The editor needs the distincti...
Definition openswmm_heat_impl.cpp:780
void * SWMM_ConfigSnapshot
Definition openswmm_heat.h:185
SWMM_ENGINE_API int swmm_heat_preview_channel_ground_map_with_progress(SWMM_Engine engine, int link, SWMM_ChannelGroundPreview *out, SWMM_ChannelGroundContact *contacts, int capacity, int *required, SWMM_CancelCallback callback, void *user_data)
Cancellable variant of the read-only channel-contact preview. The callback may be invoked during mesh...
Definition openswmm_mesh_heat_impl.cpp:471
SWMM_HeatRadiativeParam
[RADIATIVE_FLUXES] scalar parameters.
Definition openswmm_heat.h:258
@ SWMM_HEAT_RAD_SHADE_FACTOR
Definition openswmm_heat.h:261
@ SWMM_HEAT_RAD_EMISS_LANDCOVER
Definition openswmm_heat.h:264
@ SWMM_HEAT_RAD_LW_REFLECTION
Definition openswmm_heat.h:266
@ SWMM_HEAT_RAD_EMISS_WATER
Definition openswmm_heat.h:263
@ SWMM_HEAT_RAD_LANDCOVER_TEMPERATURE
Definition openswmm_heat.h:267
@ SWMM_HEAT_RAD_SKY_VIEW
Definition openswmm_heat.h:262
@ SWMM_HEAT_RAD_ATM_EMISS_COEFF
Definition openswmm_heat.h:265
@ SWMM_HEAT_RAD_ALBEDO
Definition openswmm_heat.h:260
@ SWMM_HEAT_RAD_SHORTWAVE
Definition openswmm_heat.h:259
SWMM_ENGINE_API int swmm_heat_set_dry_policy(SWMM_Engine engine, int policy)
Select the reported temperature policy for dry water elements.
Definition openswmm_heat_impl.cpp:1397
SWMM_ENGINE_API int swmm_heat_set_sediment_ground_timeseries(SWMM_Engine engine, const char *name)
Drive the ground temperature from a [TIMESERIES]; NULL or "" returns to the constant value.
Definition openswmm_heat_impl.cpp:1139
SWMM_ENGINE_API int swmm_heat_element_override_count(SWMM_Engine engine, int *count)
Number of per-element override rows (radiative and sediment).
Definition openswmm_heat_impl.cpp:1158
SWMM_HeatFluxModule
Flux modules of heat plan §2, each independently toggleable.
Definition openswmm_heat.h:65
@ SWMM_HEAT_SEDIMENT_EXCHANGE
Definition openswmm_heat.h:69
@ SWMM_HEAT_RADIATIVE_EXCHANGE
Definition openswmm_heat.h:67
@ SWMM_HEAT_SURFACE_EXCHANGE
Definition openswmm_heat.h:66
@ SWMM_HEAT_LAYER_CONDUCTION
Definition openswmm_heat.h:68
SWMM_ENGINE_API int swmm_heat_get_source_temp(SWMM_Engine engine, int source, double *temp_c)
Read one source's GLOBAL inlet temperature (°C).
Definition openswmm_heat_impl.cpp:756
SWMM_ENGINE_API int swmm_heat_set_solar(SWMM_Engine engine, int param, double value)
Write one [SOLAR_RADIATION] parameter.
Definition openswmm_heat_impl.cpp:526
SWMM_ENGINE_API int swmm_heat_get_authoring_flags(SWMM_Engine engine, unsigned *flags)
Authoring provenance bits: configured=1, shared site=2, explicit latitude/longitude/timezone/elevatio...
Definition openswmm_heat_impl.cpp:1624
SWMM_ENGINE_API int swmm_heat_set_element_override(SWMM_Engine engine, int attr, int scope, const char *name, double value)
Add or update the override for (attr, scope, name).
Definition openswmm_heat_impl.cpp:1188
SWMM_ENGINE_API int swmm_heat_get_ground_status(SWMM_Engine engine, SWMM_GroundHeatStatus *status)
Read canonical ground thermal ownership and runtime status.
Definition openswmm_mesh_heat_impl.cpp:627
SWMM_ENGINE_API int swmm_heat_snapshot_restore(SWMM_Engine engine, SWMM_HeatSnapshot snapshot)
Restore a reusable heat authoring snapshot to its original engine.
Definition openswmm_heat_impl.cpp:1533
SWMM_ENGINE_API int swmm_hydrothermal_edit_atomic(SWMM_Engine engine, SWMM_HydrothermalEdit edit, void *user)
Apply one synchronous hydrothermal configuration transaction with rollback.
Definition openswmm_heat_impl.cpp:1334
SWMM_HeatAttr
Attributes that take per-element overrides. Mirrors openswmm::HeatAttr.
Definition openswmm_heat.h:801
@ SWMM_HEAT_ATTR_GROUND_TEMPERATURE
Definition openswmm_heat.h:812
@ SWMM_HEAT_ATTR_GROUND_SOURCE
Definition openswmm_heat.h:817
@ SWMM_HEAT_ATTR_ALBEDO
Definition openswmm_heat.h:802
@ SWMM_HEAT_ATTR_MESH_POROSITY
Definition openswmm_heat.h:816
@ SWMM_HEAT_ATTR_SHADE_FACTOR
Definition openswmm_heat.h:803
@ SWMM_HEAT_ATTR_GROUND_DEPTH
Definition openswmm_heat.h:811
@ SWMM_HEAT_ATTR_LANDCOVER_TEMPERATURE
Definition openswmm_heat.h:807
@ SWMM_HEAT_ATTR_THERMAL_DIFFUSIVITY
Definition openswmm_heat.h:808
@ SWMM_HEAT_ATTR_SEDIMENT_DENSITY
Definition openswmm_heat.h:814
@ SWMM_HEAT_ATTR_EMISS_WATER
Definition openswmm_heat.h:805
@ SWMM_HEAT_ATTR_SKY_VIEW
Definition openswmm_heat.h:804
@ SWMM_HEAT_ATTR_BED_THICKNESS
Definition openswmm_heat.h:810
@ SWMM_HEAT_ATTR_SOLUTE_DIFFUSIVITY
Definition openswmm_heat.h:809
@ SWMM_HEAT_ATTR_HYPORHEIC_VELOCITY
Definition openswmm_heat.h:813
@ SWMM_HEAT_ATTR_SEDIMENT_SPECIFIC_HEAT
Definition openswmm_heat.h:815
@ SWMM_HEAT_ATTR_EMISS_LANDCOVER
Definition openswmm_heat.h:806
void * SWMM_HeatSnapshot
Definition openswmm_heat.h:148
SWMM_HeatShortwaveMode
Where incoming shortwave comes from (plan §2.5, D-H6a-3).
Definition openswmm_heat.h:251
@ SWMM_HEAT_SW_COMPUTED
Definition openswmm_heat.h:254
@ SWMM_HEAT_SW_CONSTANT
Definition openswmm_heat.h:252
@ SWMM_HEAT_SW_TIMESERIES
Definition openswmm_heat.h:253
SWMM_GroundHeatValue
Definition openswmm_heat.h:1021
@ SWMM_GROUND_HEAT_INITIAL_ENERGY
Definition openswmm_heat.h:1025
@ SWMM_GROUND_HEAT_CAPACITY
Definition openswmm_heat.h:1023
@ SWMM_GROUND_HEAT_ADVECTIVE_ENERGY
Definition openswmm_heat.h:1026
@ SWMM_GROUND_HEAT_DEEP_ENERGY
Definition openswmm_heat.h:1029
@ SWMM_GROUND_HEAT_PENDING_LATERAL
Definition openswmm_heat.h:1035
@ SWMM_GROUND_HEAT_SOURCE_ENERGY
Definition openswmm_heat.h:1027
@ SWMM_GROUND_HEAT_ENERGY
Definition openswmm_heat.h:1022
@ SWMM_GROUND_HEAT_LATENT_ENERGY
Definition openswmm_heat.h:1030
@ SWMM_GROUND_HEAT_LID_CONTACT
Definition openswmm_heat.h:1038
@ SWMM_GROUND_HEAT_LATERAL_ENERGY
Definition openswmm_heat.h:1031
@ SWMM_GROUND_HEAT_WATER_CONTACT_ENERGY
Definition openswmm_heat.h:1032
@ SWMM_GROUND_HEAT_RESIDUAL
Definition openswmm_heat.h:1033
@ SWMM_GROUND_HEAT_TEMPERATURE
Definition openswmm_heat.h:1024
@ SWMM_GROUND_HEAT_SURFACE_ENERGY
Definition openswmm_heat.h:1028
@ SWMM_GROUND_HEAT_NORMALIZED_RESIDUAL
Definition openswmm_heat.h:1034
@ SWMM_GROUND_HEAT_CHANNEL_CONTACT
Definition openswmm_heat.h:1037
SWMM_ENGINE_API int swmm_heat_get_cloud(SWMM_Engine engine, int param, double *value)
Read one [CLOUD_COVER] parameter.
Definition openswmm_heat_impl.cpp:629
SWMM_ENGINE_API int swmm_heat_get_element_override(SWMM_Engine engine, int index, int *attr, int *scope, char *name, int name_len, double *value)
Read one override row. Any out-pointer may be NULL.
Definition openswmm_heat_impl.cpp:1166
SWMM_ENGINE_API int swmm_heat_get_node_override(SWMM_Engine engine, int index, int *source, int *node, double *temp_c)
Read one NODE override by row index. Any out-pointer may be NULL.
Definition openswmm_heat_impl.cpp:816
SWMM_ENGINE_API int swmm_heat_get_enabled(SWMM_Engine engine, int *enabled)
Is [OPTIONS] HEAT_TRANSPORT on?
Definition openswmm_heat_impl.cpp:205
SWMM_ENGINE_API int swmm_heat_get_2d_values(SWMM_Engine engine, int kind, int first_cell, int count, double *values)
Read a contiguous range of accepted surface-heat runtime values.
Definition openswmm_mesh_heat_impl.cpp:530
Definition openswmm_heat.h:1134
double end_fraction
Definition openswmm_heat.h:1137
int link
Definition openswmm_heat.h:1136
double begin_fraction
Definition openswmm_heat.h:1137
int layer
Definition openswmm_heat.h:1136
double invert_m
Definition openswmm_heat.h:1137
unsigned int struct_size
Definition openswmm_heat.h:1135
int cell
Definition openswmm_heat.h:1136
double share
Definition openswmm_heat.h:1137
Definition openswmm_heat.h:1163
double covered_length_m
Definition openswmm_heat.h:1166
int valid
Definition openswmm_heat.h:1165
char reason[256]
Definition openswmm_heat.h:1167
int link
Definition openswmm_heat.h:1165
int contact_cells
Definition openswmm_heat.h:1165
unsigned int struct_size
Definition openswmm_heat.h:1164
int contact_intervals
Definition openswmm_heat.h:1165
double length_m
Definition openswmm_heat.h:1166
double uncovered_length_m
Definition openswmm_heat.h:1166
Definition openswmm_heat.h:1087
int contact_intervals
Definition openswmm_heat.h:1089
int experimental
Definition openswmm_heat.h:1090
unsigned int struct_size
Definition openswmm_heat.h:1088
int requested
Definition openswmm_heat.h:1089
int contact_cells
Definition openswmm_heat.h:1089
int exchange_active
Definition openswmm_heat.h:1089
char reason[256]
Definition openswmm_heat.h:1091
int initialized
Definition openswmm_heat.h:1089
int mapped_links
Definition openswmm_heat.h:1089
Definition openswmm_heat.h:999
int requested
Definition openswmm_heat.h:1001
int initialized
Definition openswmm_heat.h:1001
int aquifer_cells
Definition openswmm_heat.h:1001
int standalone_cells
Definition openswmm_heat.h:1001
int lateral_active
Definition openswmm_heat.h:1002
unsigned int struct_size
Definition openswmm_heat.h:1000
int conduction_active
Definition openswmm_heat.h:1002
char reason[256]
Definition openswmm_heat.h:1004
int thermal_layers
Definition openswmm_heat.h:1001
int experimental
Definition openswmm_heat.h:1002
double water_heat_capacity
Definition openswmm_heat.h:1003
Definition openswmm_heat.h:919
int bed_active
Definition openswmm_heat.h:921
int bed_model
Definition openswmm_heat.h:922
int experimental
Definition openswmm_heat.h:923
int surface_active
Definition openswmm_heat.h:921
unsigned int struct_size
Definition openswmm_heat.h:920
int initialized
Definition openswmm_heat.h:921
int requested
Definition openswmm_heat.h:921
int radiative_active
Definition openswmm_heat.h:921
char reason[256]
Definition openswmm_heat.h:925
double water_heat_capacity
Definition openswmm_heat.h:924