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

Classes

struct  Closure
 
struct  Flux
 
struct  Jet
 
struct  State
 

Functions

Jet operator+ (const Jet &a, const Jet &b)
 Add two forward-mode values.
 
Jet operator- (const Jet &a, const Jet &b)
 Subtract two forward-mode values.
 
Jet operator* (const Jet &a, const Jet &b)
 Multiply two forward-mode values using the product rule.
 
Jet operator/ (const Jet &a, const Jet &b)
 Divide two forward-mode values using the quotient rule.
 
Jet mapped (double value, double slope, const Jet &x)
 Lift a known scalar function value and slope through an input jet.
 
Jet minimum (const Jet &a, const Jet &b)
 Select the local minimum branch and preserve that branch derivative.
 
Jet maximum (const Jet &a, const Jet &b)
 Select the local maximum branch and preserve that branch derivative.
 
bool finite (const Jet &x)
 Check a primal value and every directional derivative for finite arithmetic.
 
Closure closure (const FvClosure &c, const Jet &h)
 Differentiate wet closure area, width and pressure integral with respect to depth.
 
double radiusSlope (const FvClosure &c, double h)
 Evaluate the active wet friction-radius derivative with respect to depth.
 
State state (const FvClosure &table, const Jet &h, const Jet &velocity, uint8_t press)
 Construct a differentiated wet face state from depth and velocity.
 
Flux flux (const State &l, const State &r)
 Differentiate the active wet HLL hydraulic flux and pressure-bore bounds.
 

Function Documentation

◆ closure()

Closure openswmm::fv::implicit_wet::closure ( const FvClosure & c,
const Jet & h )
inline

Differentiate wet closure area, width and pressure integral with respect to depth.

Uses the shared closureEval primal, maps dA/dh=width and dI1/dh=area, and derives dwidth/dh from the active polynomial/cubic panel (zero above crown). At panel/branch boundaries this is the selected one-sided derivative. Dry width clamping is not differentiated as an independent nonsmooth operator; callers restrict admissible wet states. No allocation or mutation.

Parameters
[in]cInitialized immutable monotone native closure, with positive panel spacing and valid samples.
[in]hStrictly positive finite wet depth jet in ft; dry branches are outside this differentiation contract.
Returns
Area ft2, width ft and moment ft3 jets, including all five directional derivatives.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ finite()

bool openswmm::fv::implicit_wet::finite ( const Jet & x)
inline

Check a primal value and every directional derivative for finite arithmetic.

Parameters
[in]xJet to inspect; no fields are modified.
Returns
True only if x.v and all five entries of x.d are finite.

◆ flux()

Flux openswmm::fv::implicit_wet::flux ( const State & l,
const State & r )
inline

Differentiate the active wet HLL hydraulic flux and pressure-bore bounds.

Selects the same primal branches as wet waveSpeeds/riemannFlux, including rankine-hugoniot min/max pressure bounds and first-operand ties. Supersonic branches use physical flux; a straddling fan requires nonzero sr-sl. Branch derivatives include changing wave speeds rather than frozen coefficients. Dry-state rarefaction branches, gates, positivity factors and hydrostatic side corrections are not included; this routine is valid only on an admissible wet branch.

Parameters
[in]lFinite strictly wet left differentiated face state in native aggregate units.
[in]rFinite strictly wet right state in the same geometry/orientation and derivative basis.
Returns
Volume flux jet in ft3/s and momentum flux jet in ft4/s2.
Here is the call graph for this function:

◆ mapped()

Jet openswmm::fv::implicit_wet::mapped ( double value,
double slope,
const Jet & x )
inline

Lift a known scalar function value and slope through an input jet.

Parameters
[in]valuePrimal f(x.v), supplied by the caller.
[in]slopeScalar derivative df/dx at x.v, in output/input units.
[in]xInput jet supplying five directional derivatives.
Returns
Jet with primal value and derivatives slope*x.d; no scalar function is evaluated here.
Here is the caller graph for this function:

◆ maximum()

Jet openswmm::fv::implicit_wet::maximum ( const Jet & a,
const Jet & b )
inline

Select the local maximum branch and preserve that branch derivative.

Matches std::max first-operand tie behavior; does not freeze the selected numerical derivative.

Parameters
[in]aLeft primal value and five derivatives in the current local variable basis.
[in]bRight primal value and derivatives using the same basis.
Returns
A copy of b if a.v<b.v, otherwise a; ties select the first operand.
Here is the caller graph for this function:

◆ minimum()

Jet openswmm::fv::implicit_wet::minimum ( const Jet & a,
const Jet & b )
inline

Select the local minimum branch and preserve that branch derivative.

No generalized derivative across the branch boundary is formed; NaN comparisons follow ordinary floating-point rules.

Parameters
[in]aLeft primal value and five derivatives in the current local variable basis.
[in]bRight primal value and derivatives using the same basis.
Returns
A copy of b if b.v
Here is the caller graph for this function:

◆ operator*()

Jet openswmm::fv::implicit_wet::operator* ( const Jet & a,
const Jet & b )
inline

Multiply two forward-mode values using the product rule.

Units multiply; overflow/nonfinite values propagate.

Parameters
[in]aLeft primal value and five derivatives in the current local variable basis.
[in]bRight primal value and derivatives using the same basis.
Returns
Primal product with derivative a.d*b.v+a.v*b.d.

◆ operator+()

Jet openswmm::fv::implicit_wet::operator+ ( const Jet & a,
const Jet & b )
inline

Add two forward-mode values.

No validation, mutation or heap allocation.

Parameters
[in]aLeft primal value and five derivatives in the current local variable basis.
[in]bRight primal value and derivatives using the same basis.
Returns
Primal sum and componentwise derivative sum.

◆ operator-()

Jet openswmm::fv::implicit_wet::operator- ( const Jet & a,
const Jet & b )
inline

Subtract two forward-mode values.

No validation, mutation or heap allocation.

Parameters
[in]aLeft primal value and five derivatives in the current local variable basis.
[in]bRight primal value and derivatives using the same basis.
Returns
Primal difference and componentwise derivative difference.

◆ operator/()

Jet openswmm::fv::implicit_wet::operator/ ( const Jet & a,
const Jet & b )
inline

Divide two forward-mode values using the quotient rule.

Requires finite nonzero b.v for finite arithmetic; zero/overflow is not diagnosed.

Parameters
[in]aLeft primal value and five derivatives in the current local variable basis.
[in]bRight primal value and derivatives using the same basis.
Returns
Primal a.v/b.v with derivative (a.d-result.v*b.d)/b.v.

◆ radiusSlope()

double openswmm::fv::implicit_wet::radiusSlope ( const FvClosure & c,
double h )
inline

Evaluate the active wet friction-radius derivative with respect to depth.

Does not apply a dry floor, denominator safeguard or nonfinite validation. Table-panel ties use the panel selected by closureLocate.

Parameters
[in]cInitialized immutable native closure; polynomial perimeter must be nonzero.
[in]hPositive finite depth in ft; valid table-locate range is required below crown.
Returns
dR/dh, dimensionless, from the polynomial quotient or active linear R panel; zero at/above crown.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state()

State openswmm::fv::implicit_wet::state ( const FvClosure & table,
const Jet & h,
const Jet & velocity,
uint8_t press )
inline

Construct a differentiated wet face state from depth and velocity.

Celerity derivatives divide by both wet area and width. A dry/zero-width state can therefore produce nonfinite derivatives even when the shared scalar celerity returns zero; callers must reject such states before using this wet-only derivative path. Does not select a TPA closure from press; the supplied table closure is always evaluated.

Parameters
[in]tableInitialized immutable closure with positive wet area/top width.
[in]hStrictly wet depth jet in ft; scalar area must exceed kDryArea.
[in]velocityVelocity jet in ft/s using the same local derivative basis.
[in]pressRegime flag copied into the result: 0 free, 1 pressure, 2 excluded node ghost.
Returns
Jets for aggregate area ft2, discharge ft3/s, velocity/celerity ft/s and moment ft3.
Here is the call graph for this function: