OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
PorewaterTransport.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2
11
12#pragma once
14#include <string>
15#include <vector>
16namespace openswmm::twoD {
22// Exclusive caller-owned workspace. No input may alias writable scratch/result
23// storage. Borrowed mutable results expire on reuse; owning APIs remain independent.
27 std::vector<double> capacity, initial, diagonal, lower, upper, rhs, water;
28 std::vector<unsigned char> residue;
29 std::vector<LayerTransportMove> moves;
30};
32 const std::vector<double>& old_water, const std::vector<double>& new_water,
33 const std::vector<double>& retention, const std::vector<double>& mass,
34 const std::vector<double>& external_water, const std::vector<double>& external_mass,
35 const std::vector<double>& withdrawal, PorewaterTransportScratch& scratch);
37 const std::vector<double>& old_water, const std::vector<double>& retention,
38 const std::vector<double>& mass, const std::vector<double>& water_change,
39 const std::vector<double>& external_water, const std::vector<double>& external_mass,
40 const std::vector<double>& withdrawal, const std::vector<double>& reserved_water,
41 const std::vector<double>& reserved_mass, PorewaterTransportScratch& scratch);
42// Fixed physical layers, native concentration*m3 mass. Retention is the
43// equilibrium sorption capacity rho_bulk*Kd*bulk_volume (m3), zero for age.
44// External water is NET accepted water; external mass excludes the unknown
45// implicit withdrawals. Evaporation can remove water without removing solute.
46// Zero-water stores retain dry residue; throughflow needs no invented volume.
47// Refusal never mutates any input or publishes a partial mass solution.
62advectPorewater(const std::vector<double>& old_water, const std::vector<double>& new_water,
63 const std::vector<double>& retention, const std::vector<double>& mass,
64 const std::vector<double>& external_water, const std::vector<double>& external_mass,
65 const std::vector<double>& implicit_withdrawal);
66// Beginning-state Euler stage with accepted physical water increments.
67// Reserved producer packets cannot supply another export. concentration
68// reports the accepted withdrawal composition when a donor budget binds.
83 const std::vector<double>& old_water, const std::vector<double>& retention,
84 const std::vector<double>& mass, const std::vector<double>& water_change,
85 const std::vector<double>& external_water, const std::vector<double>& external_mass,
86 const std::vector<double>& withdrawal, const std::vector<double>& reserved_water = {},
87 const std::vector<double>& reserved_mass = {});
88} // namespace openswmm::twoD
Conservative species transfers between physical layers.
Definition ExchangeLaw.hpp:60
PorewaterAdvection advectPorewater(const std::vector< double > &old_water, const std::vector< double > &new_water, const std::vector< double > &retention, const std::vector< double > &mass, const std::vector< double > &external_water, const std::vector< double > &external_mass, const std::vector< double > &withdrawal)
Solve conservative implicit upwind porewater transport on fixed physical layers.
Definition PorewaterTransport.cpp:310
PorewaterAdvection advectPorewaterEuler(const std::vector< double > &old_water, const std::vector< double > &retention, const std::vector< double > &mass, const std::vector< double > &change, const std::vector< double > &external_water, const std::vector< double > &external_mass, const std::vector< double > &withdrawal, const std::vector< double > &reserved_water, const std::vector< double > &reserved_mass)
Compute explicit fixed-layer porewater transport from accepted physical water tangents.
Definition PorewaterTransport.cpp:54
Definition LayerTransport.hpp:32
Definition PorewaterTransport.hpp:17
std::vector< double > concentration
Definition PorewaterTransport.hpp:19
std::vector< double > withdrawn_mass
Definition PorewaterTransport.hpp:19
std::vector< double > vertical_water
Definition PorewaterTransport.hpp:19
std::string error
Definition PorewaterTransport.hpp:18
std::vector< double > vertical_mass
Definition PorewaterTransport.hpp:19
double external_mass
Definition PorewaterTransport.hpp:20
double water_residual
Definition PorewaterTransport.hpp:20
std::vector< double > mass
Definition PorewaterTransport.hpp:19
Definition PorewaterTransport.hpp:24
PorewaterAdvection result
Definition PorewaterTransport.hpp:25
std::vector< double > water
Definition PorewaterTransport.hpp:27
std::vector< double > diagonal
Definition PorewaterTransport.hpp:27
std::vector< LayerTransportMove > moves
Definition PorewaterTransport.hpp:29
std::vector< double > upper
Definition PorewaterTransport.hpp:27
std::vector< double > rhs
Definition PorewaterTransport.hpp:27
std::vector< double > capacity
Definition PorewaterTransport.hpp:27
LayerTransportScratch transport
Definition PorewaterTransport.hpp:26
std::vector< double > lower
Definition PorewaterTransport.hpp:27
std::vector< double > initial
Definition PorewaterTransport.hpp:27
std::vector< unsigned char > residue
Definition PorewaterTransport.hpp:28