![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
#include <GroundPorewater.hpp>
Public Member Functions | |
| std::string | publishSigma (SubsurfaceTransportState &, int cell) |
| Publish pending SIGMA contact receipts and refresh the derived physical-layer views. | |
| void | refreshSigmaView () |
| Rebuild physical-layer mass and reservation views from an active SIGMA overlap map. | |
| bool | active () const noexcept |
| Test whether at least one species row is configured. | |
| std::string | initialize (const PorousHeatColumn &, const std::vector< double > &saturated_water, const std::vector< double > &saturated_mass, const std::vector< double > &unsaturated_mass, const std::vector< double > &kd, int age, int temperature) |
| Seed canonical physical-layer species inventories from saturated/unsaturated totals. | |
| std::pair< std::vector< double >, std::vector< double > > | zoneMasses (const PorousHeatColumn &, const std::vector< double > &saturated_water) const |
| Derive saturated and unsaturated totals without creating another inventory. | |
| std::pair< double, double > | zoneMass (const PorousHeatColumn &, const std::vector< double > &saturated_water, int species) const noexcept |
| Derive one species' saturated/unsaturated split from physical-layer mass. | |
| bool | generateAge (const PorousHeatColumn &, double seconds) noexcept |
| Add elapsed water age to every physical layer and its generation ledger. | |
| double | contactAvailableMass (int species, std::size_t layer) const noexcept |
| Read unreserved physical-layer inventory available to a finite contact. | |
| bool | canReserveOutgoing (int species, std::size_t layer, double amount) const noexcept |
| Preflight an outgoing reservation against unreserved canonical mass. | |
| bool | reserveOutgoing (int species, std::size_t layer, double amount) noexcept |
| Reserve accepted outgoing inventory without subtracting its canonical mass. | |
| bool | settleOutgoingReservation (int species, std::size_t layer, double amount) noexcept |
| Release a queued outgoing reservation after its owning gather has consumed the packet. | |
| bool | canApplyContactMassIncrement (int species, std::size_t layer, double increment) const noexcept |
| Preflight a signed contact receipt without spending reserved outgoing inventory. | |
| bool | applyContactMassIncrement (int species, std::size_t layer, double increment) noexcept |
| Apply a signed finite-contact receipt to the physical layer and optional SIGMA view. | |
Public Attributes | |
| int | n_species = 0 |
| int | age_row = -1 |
| int | temp_row = -1 |
| std::vector< double > | mass |
| std::vector< double > | retention |
| std::vector< double > | initial_mass |
| std::vector< double > | contact_mass |
| std::vector< double > | reserved_out |
| std::vector< double > | generated_age |
| SigmaPorewaterMap | sigma |
|
inlinenoexcept |
Test whether at least one species row is configured.
|
noexcept |
Apply a signed finite-contact receipt to the physical layer and optional SIGMA view.
| [in] | r | Valid non-temperature species row. |
| [in] | j | Physical layer index. |
| [in] | increment | Finite signed native inventory change, positive into this layer. |
|
noexcept |
Preflight a signed contact receipt without spending reserved outgoing inventory.
| [in] | r | Valid non-temperature species row. |
| [in] | j | Physical layer index. |
| [in] | increment | Finite signed native inventory change; positive enters the layer. |
|
noexcept |
Preflight an outgoing reservation against unreserved canonical mass.
| [in] | r | Non-temperature species index. |
| [in] | j | Physical layer index. |
| [in] | amount | Finite nonnegative native inventory amount to reserve. |
|
noexcept |
Read unreserved physical-layer inventory available to a finite contact.
| [in] | r | Species index; temperature rows are unsupported. |
| [in] | j | Physical layer index, derived from retention.size()/n_species. |
|
noexcept |
Add elapsed water age to every physical layer and its generation ledger.
| [in] | soil | Prepared physical column, with stable moisture and geometry in SI units. |
| [in] | dt | Finite nonnegative interval s; ignored when age_row is absent. |
| std::string openswmm::twoD::GroundPorewaterColumn::initialize | ( | const PorousHeatColumn & | soil, |
| const std::vector< double > & | saturated, | ||
| const std::vector< double > & | sat_mass, | ||
| const std::vector< double > & | unsat_mass, | ||
| const std::vector< double > & | kd, | ||
| int | age, | ||
| int | temperature ) |
Seed canonical physical-layer species inventories from saturated/unsaturated totals.
| [in] | soil | Prepared thermal geometry, moisture and material; layer count is theta.size(). |
| [in] | saturated | Finite nonnegative saturated water volume m3 per layer, no greater than physical layer water except the 1e-12*max(1,water) roundoff allowance. |
| [in] | sat_mass | Nonempty species totals for the saturated zone in native inventory units. |
| [in] | unsat_mass | Same-size unsaturated species totals. Non-temperature rows must be finite and nonnegative and nonzero inventory requires positive finite physical zone capacity. |
| [in] | kd | Finite nonnegative distribution coefficient m3/kg per species. Age ignores retention; temperature rows are not represented in porewater mass and their totals are ignored. |
| [in] | age | Optional age row index, -1 when absent; otherwise within species count. |
| [in] | temperature | Optional distinct temperature row index, -1 when absent. |
| std::string openswmm::twoD::GroundPorewaterColumn::publishSigma | ( | SubsurfaceTransportState & | tr, |
| int | cell ) |
Publish pending SIGMA contact receipts and refresh the derived physical-layer views.
| [in,out] | tr | Canonical transport owner with matching SIGMA species/layers and cell extent. |
| [in] | cell | Target cell index in that owner. |
| void openswmm::twoD::GroundPorewaterColumn::refreshSigmaView | ( | ) |
Rebuild physical-layer mass and reservation views from an active SIGMA overlap map.
|
noexcept |
Reserve accepted outgoing inventory without subtracting its canonical mass.
| [in] | r | Non-temperature species index. |
| [in] | j | Physical layer index. |
| [in] | amount | Finite nonnegative amount in native inventory units. |
|
noexcept |
Release a queued outgoing reservation after its owning gather has consumed the packet.
| [in] | r | Species index in [0,n_species). |
| [in] | j | Physical layer index for a consistently prepared inventory layout. |
| [in] | amount | Finite nonnegative native amount, no greater than the existing reservation. |
|
noexcept |
Derive one species' saturated/unsaturated split from physical-layer mass.
| [in] | soil | Stable prepared geometry/moisture; all depth and layer arrays must be valid. |
| [in] | saturated | Saturated water volume m3 per layer, with soil.theta.size() entries. |
| [in] | r | Species row in [0,n_species); temperature/invalid rows return zeros immediately. |
| std::pair< std::vector< double >, std::vector< double > > openswmm::twoD::GroundPorewaterColumn::zoneMasses | ( | const PorousHeatColumn & | soil, |
| const std::vector< double > & | saturated ) const |
Derive saturated and unsaturated totals without creating another inventory.
| std::invalid_argument | On saturated, mass or retention shape mismatch. |
| [in] | soil | Stable prepared physical layer geometry/moisture consistent with this column. |
| [in] | saturated | Saturated water volume m3 per physical layer. |
| std::invalid_argument | On saturated, mass or retention shape mismatch. |
| int openswmm::twoD::GroundPorewaterColumn::age_row = -1 |
| std::vector<double> openswmm::twoD::GroundPorewaterColumn::contact_mass |
| std::vector<double> openswmm::twoD::GroundPorewaterColumn::generated_age |
| std::vector<double> openswmm::twoD::GroundPorewaterColumn::initial_mass |
| std::vector<double> openswmm::twoD::GroundPorewaterColumn::mass |
| int openswmm::twoD::GroundPorewaterColumn::n_species = 0 |
| std::vector<double> openswmm::twoD::GroundPorewaterColumn::reserved_out |
| std::vector<double> openswmm::twoD::GroundPorewaterColumn::retention |
| SigmaPorewaterMap openswmm::twoD::GroundPorewaterColumn::sigma |
| int openswmm::twoD::GroundPorewaterColumn::temp_row = -1 |