OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::richards Namespace Reference

Classes

struct  Cell
 
struct  Column
 
struct  Material
 
struct  Options
 
struct  Report
 
struct  Transfer
 

Enumerations

enum class  Bottom {
  Sealed ,
  FreeDrainage ,
  Head
}
 

Functions

bool valid (const Material &p, double theta_s)
 Check the finite material ranges required by the column kernels.
 
bool valid (const Options &o)
 Check integration/discretization option ranges without considering enabled.
 
double theta (const Material &p, double theta_s, double pressure)
 Compute van Genuchten pore water content from pressure head.
 
double storage (const Material &p, double theta_s, double pressure)
 Compute pore plus explicitly authored positive-head elastic storage.
 
double pressure (const Material &p, double theta_s, double storage_fraction)
 Invert volumetric storage to pressure head.
 
double conductivity (const Material &p, double Ks, double pressure)
 Evaluate van Genuchten-Mualem unsaturated hydraulic conductivity.
 
std::vector< Report > advance (std::vector< Column * > &columns, double dt)
 Advance independently adaptive Richards columns with all-column rollback.
 

Enumeration Type Documentation

◆ Bottom

enum class openswmm::richards::Bottom
strong
Enumerator
Sealed 
FreeDrainage 
Head 

Function Documentation

◆ advance()

std::vector< Report > openswmm::richards::advance ( std::vector< Column * > & columns,
double dt )

Advance independently adaptive Richards columns with all-column rollback.

Parameters
[in,out]columnsNon-owning distinct nonnull pointers, each with at least two cells: surface reservoir first, porous cells top to bottom. water holds m3 and matches cell count. Validates positive finite volume/area/dz, finite z, theta_s in (0,1], nonnegative Ks/wilting/ET, valid porous materials/options, and initial water (nonnegative surface; strictly above residual volume in porous cells). Boundary heads/distances/conductivities, areas/factors, reservations and supply must be compatible finite/nonnegative values; reservation limits alone may be +infinity. Counts/packed products must fit int. Pointer vector/geometry/options are retained.
dtFinite positive integration interval seconds; no external clock updated.
Returns
One report per input in original order, including accepted/rejected/Newton/ RHS counts, m3 transfers/balance/evaporation and separate bottom-direction receipts. Invalid inputs mark all reports failed and leave columns unchanged. Compatible sizes pack cell-major/lane-minor in groups up to 64; BDF1 step doubling with damped Newton adapts each lane. Any solver failure rolls back every column, including previous groups; returned reports may retain trial counts/transfers and must not be booked when ok=false. Only successful water vectors publish; options.enabled is not a gate. Empty input returns empty reports. Allocation exceptions propagate before publication; caller serializes access and owns boundary reservations.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ conductivity()

double openswmm::richards::conductivity ( const Material & p,
double Ks,
double pressure )

Evaluate van Genuchten-Mualem unsaturated hydraulic conductivity.

Parameters
pValid material with nonnegative pore-connectivity exponent l.
KsFinite nonnegative saturated conductivity m/s.
pressurePressure head metres; nonnegative heads return Ks.
Returns
Conductivity m/s, otherwise the relative-saturation reduction times Ks. Does not validate inputs or supply error diagnostics for numerical-domain failures.

◆ pressure()

double openswmm::richards::pressure ( const Material & p,
double theta_s,
double storage_fraction )

Invert volumetric storage to pressure head.

Parameters
pValid material including positive specific_storage.
theta_sValid saturated pore fraction above residual fraction.
storage_fractionTotal stored-water/volume ratio, including elastic storage.
Returns
Metres of pressure head: nonnegative elastic branch at/above theta_s, negative retention-curve branch below, or negative infinity at/below theta_r. No material/finite validation occurs; advance() requires porous water strictly above the residual amount to avoid that singular lower boundary.
Here is the caller graph for this function:

◆ storage()

double openswmm::richards::storage ( const Material & p,
double theta_s,
double pressure )

Compute pore plus explicitly authored positive-head elastic storage.

Parameters
pValid material, specific_storage in 1/m.
theta_sSaturated volumetric pore fraction.
pressurePressure head metres.
Returns
Dimensionless stored-water/volume ratio theta()+Ss*max(0,pressure); it may exceed theta_s under positive pressure. No material/value validation occurs.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ theta()

double openswmm::richards::theta ( const Material & p,
double theta_s,
double pressure )

Compute van Genuchten pore water content from pressure head.

Parameters
pValid material; alpha is 1/m and n dimensionless.
theta_sValid saturated volumetric fraction above theta_r.
pressurePressure head metres; >=0 returns theta_s, negative heads follow the retention curve. Caller supplies a meaningful finite value or dry -infinity.
Returns
Dimensionless pore fraction; excludes elastic storage. Does not validate material/range or clamp numerical failures.
Here is the caller graph for this function:

◆ valid() [1/2]

bool openswmm::richards::valid ( const Material & p,
double theta_s )

Check the finite material ranges required by the column kernels.

Parameters
pMaterial with residual fraction, inverse-metre alpha, n>1, nonnegative pore-connectivity l and strictly positive specific storage in 1/m.
theta_sSaturated pore fraction in (0,1], strictly above theta_r>=0.
Returns
True exactly when all those scalar conditions hold. Does not inspect conductivity, geometry, initial water or any Options value.
Here is the caller graph for this function:

◆ valid() [2/2]

bool openswmm::richards::valid ( const Options & o)

Check integration/discretization option ranges without considering enabled.

Parameters
ocells_per_layer in [1,256], finite positive atol/rtol and max_step seconds.
Returns
True when these ranges hold, even when o.enabled is false. advance() does not use enabled as a bypass or use cells_per_layer to construct the supplied cells.