OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
WatershedCommon.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
36
37#ifndef OPENSWMM_ENGINE_TRANSPORT_WATERSHED_COMMON_HPP
38#define OPENSWMM_ENGINE_TRANSPORT_WATERSHED_COMMON_HPP
39
40#include <cstddef>
41
42namespace openswmm {
44}
45
46namespace openswmm::transport {
47
50constexpr int kSubIMPERV0 = 0;
51constexpr int kSubIMPERV1 = 1;
52constexpr int kSubPERV = 2;
53
94double arrivingPrecipRate(const SimulationContext& ctx, std::size_t ui,
95 int subarea) noexcept;
96
109double arrivingMeltFraction(const SimulationContext& ctx, std::size_t ui,
110 int subarea) noexcept;
111
126double arrivingPrecipTemperature(const SimulationContext& ctx, std::size_t ui,
127 int subarea) noexcept;
128
159double arrivingPrecipAge(const SimulationContext& ctx, std::size_t ui,
160 int subarea) noexcept;
161
165inline constexpr double kMeltwaterTempC = 0.0;
166
167} // namespace openswmm::transport
168
169#endif // OPENSWMM_ENGINE_TRANSPORT_WATERSHED_COMMON_HPP
Definition ExplicitFvSolver.hpp:52
double arrivingPrecipRate(const SimulationContext &ctx, std::size_t ui, int subarea) noexcept
Net precipitation actually reaching one subarea this step [ft/s].
Definition WatershedCommon.cpp:32
constexpr int kSubIMPERV0
Definition WatershedCommon.hpp:50
double arrivingPrecipAge(const SimulationContext &ctx, std::size_t ui, int subarea) noexcept
Water age of the water arriving at one subarea [seconds] (S2b).
Definition WatershedCommon.cpp:102
constexpr int kSubPERV
Definition WatershedCommon.hpp:52
constexpr int kSubIMPERV1
Definition WatershedCommon.hpp:51
constexpr double kMeltwaterTempC
Definition WatershedCommon.hpp:165
double arrivingMeltFraction(const SimulationContext &ctx, std::size_t ui, int subarea) noexcept
Fraction of the arriving water that is MELTWATER, in [0, 1].
Definition WatershedCommon.cpp:68
double arrivingPrecipTemperature(const SimulationContext &ctx, std::size_t ui, int subarea) noexcept
Temperature of the water arriving at one subarea [°C] (S2).
Definition WatershedCommon.cpp:93
Definition NodeCoupling.cpp:16
Central, reentrant simulation context.
Definition SimulationContext.hpp:353