OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
Exfiltration.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
31
32#ifndef OPENSWMM_EXFILTRATION_HPP
33#define OPENSWMM_EXFILTRATION_HPP
34
36#include <vector>
37
38namespace openswmm {
39
41
42namespace exfil {
43
44struct ExfilSoA {
45 int count = 0;
46 std::vector<int> node_idx;
47 std::vector<double> btm_area;
48 std::vector<double> bank_min_depth;
49 std::vector<double> bank_max_depth;
50 std::vector<double> bank_max_area;
51 std::vector<GreenAmptState> btm_ga;
52 std::vector<GreenAmptState> bank_ga;
53
54 void resize(int n);
55};
56
58public:
59 void init(SimulationContext& ctx);
60
67 void computeAll(SimulationContext& ctx, double dt);
68
69 ExfilSoA& state() { return soa_; }
70
71private:
72 ExfilSoA soa_;
73};
74
75} // namespace exfil
76} // namespace openswmm
77
78#endif // OPENSWMM_EXFILTRATION_HPP
Infiltration models — Horton, Green-Ampt, SCS Curve Number.
Definition Exfiltration.hpp:57
void init(SimulationContext &ctx)
Definition Exfiltration.cpp:50
ExfilSoA & state()
Definition Exfiltration.hpp:69
void computeAll(SimulationContext &ctx, double dt)
Batch compute exfiltration for all storage nodes.
Definition Exfiltration.cpp:196
Definition Exfiltration.cpp:36
Definition NodeCoupling.cpp:16
Central, reentrant simulation context.
Definition SimulationContext.hpp:353
Definition Exfiltration.hpp:44
std::vector< GreenAmptState > bank_ga
Bank Green-Ampt state.
Definition Exfiltration.hpp:52
int count
Definition Exfiltration.hpp:45
std::vector< double > bank_max_depth
Depth at max bank area.
Definition Exfiltration.hpp:49
void resize(int n)
Definition Exfiltration.cpp:38
std::vector< int > node_idx
Storage node index.
Definition Exfiltration.hpp:46
std::vector< double > bank_max_area
Maximum bank seepage area (ft2)
Definition Exfiltration.hpp:50
std::vector< GreenAmptState > btm_ga
Bottom Green-Ampt state.
Definition Exfiltration.hpp:51
std::vector< double > bank_min_depth
Depth where bank seepage starts.
Definition Exfiltration.hpp:48
std::vector< double > btm_area
Bottom area (ft2)
Definition Exfiltration.hpp:47