OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
Global Mass Balance Methods

Global mass balance methods. More...

Collaboration diagram for Global Mass Balance Methods:

Functions

int massbal_open (void)
 Opens and initializes mass balance continuity checking.
 
void massbal_close (void)
 Frees memory used by mass balance system.
 
void massbal_report (void)
 Reports mass balance results.
 
void massbal_updateRunoffTotals (int flowType, double v)
 Updates runoff totals after current time step.
 
void massbal_updateLoadingTotals (int type, int pollutIndex, double w)
 Adds inflow mass loading to loading totals for current time step.
 
void massbal_updateGwaterTotals (double vInfil, double vUpperEvap, double vLowerEvap, double vLowerPerc, double vGwater)
 Updates groundwater totals after current time step.
 
void massbal_updateRoutingTotals (double tStep)
 Updates overall routing totals with totals from current time step.
 
void massbal_initTimeStepTotals (void)
 Initializes routing totals for current time step.
 
void massbal_addInflowFlow (int type, double q)
 Adds flow inflow to routing totals for current time step.
 
void massbal_addInflowQual (int type, int pollutIndex, double w)
 Adds quality inflow to routing totals for current time step.
 
void massbal_addOutflowFlow (double q, int isFlooded)
 Adds flow outflow over current time step to routing totals.
 
void massbal_addOutflowQual (int pollutIndex, double mass, int isFlooded)
 Adds pollutant outflow over current time step to routing totals.
 
void massbal_addNodeLosses (double evapLoss, double infilLoss)
 Adds node losses over current time step to routing totals.
 
void massbal_addLinkLosses (double evapLoss, double infilLoss)
 Adds link losses over current time step to routing totals.
 
void massbal_addReactedMass (int pollutIndex, double mass)
 Adds mass reacted during current time step to routing totals.
 
void massbal_addSeepageLoss (int pollutIndex, double seepLoss)
 Adds mass lost to seepage during current time step to routing totals.
 
void massbal_addToFinalStorage (int pollutIndex, double mass)
 Adds mass remaining on dry surface to routing totals.
 
double massbal_getStepFlowError (void)
 Computes flow routing mass balance error at current time step.
 
double massbal_getRunoffError (void)
 Computes runoff mass balance error.
 
double massbal_getFlowError (void)
 Computes flow routing mass balance error.
 

Detailed Description

Global mass balance methods.

Function Documentation

◆ massbal_addInflowFlow()

void massbal_addInflowFlow ( int  type,
double  q 
)

Adds flow inflow to routing totals for current time step.

Parameters
[in]typeType of inflow
[in]qInflow rate (cfs)
Here is the caller graph for this function:

◆ massbal_addInflowQual()

void massbal_addInflowQual ( int  type,
int  pollutIndex,
double  w 
)

Adds quality inflow to routing totals for current time step.

Parameters
[in]typeType of inflow
[in]pollutIndexPollutant index
[in]wMass flow rate (mass/sec)
Here is the caller graph for this function:

◆ massbal_addLinkLosses()

void massbal_addLinkLosses ( double  evapLoss,
double  seepLoss 
)

Adds link losses over current time step to routing totals.

Parameters
[in]evapLossEvaporation loss from all links (ft3/sec)
[in]infilLossInfiltration loss from all links (ft3/sec)

◆ massbal_addNodeLosses()

void massbal_addNodeLosses ( double  evapLoss,
double  seepLoss 
)

Adds node losses over current time step to routing totals.

Parameters
[in]evapLossEvaporation loss from all nodes (ft3/sec)
[in]infilLossSeepage loss from all nodes (ft3/sec)

◆ massbal_addOutflowFlow()

void massbal_addOutflowFlow ( double  q,
int  isFlooded 
)

Adds flow outflow over current time step to routing totals.

Parameters
[in]qOutflow rate (cfs)
[in]isFloodedTRUE if outflow represents internal flooding

◆ massbal_addOutflowQual()

void massbal_addOutflowQual ( int  p,
double  w,
int  isFlooded 
)

Adds pollutant outflow over current time step to routing totals.

Parameters
[in]pollutIndexPollutant index
[in]massMass outflow rate (mass/sec)
[in]isFloodedTRUE if outflow represents internal flooding

◆ massbal_addReactedMass()

void massbal_addReactedMass ( int  pollutIndex,
double  w 
)

Adds mass reacted during current time step to routing totals.

Parameters
[in]pollutIndexPollutant index
[in]massRate of mass reacted (mass/sec)
Here is the caller graph for this function:

◆ massbal_addSeepageLoss()

void massbal_addSeepageLoss ( int  pollutIndex,
double  w 
)

Adds mass lost to seepage during current time step to routing totals.

Parameters
[in]pollutIndexPollutant index
[in]seepLossMass seepage rate (mass/sec)

◆ massbal_addToFinalStorage()

void massbal_addToFinalStorage ( int  pollutIndex,
double  w 
)

Adds mass remaining on dry surface to routing totals.

Parameters
[in]pollutIndexPollutant index
[in]massPollutant mass

◆ massbal_close()

void massbal_close ( void  )

Frees memory used by mass balance system.

◆ massbal_getFlowError()

double massbal_getFlowError ( void  )

Computes flow routing mass balance error.

Returns
Returns percent flow routing mass balance error.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ massbal_getRunoffError()

double massbal_getRunoffError ( void  )

Computes runoff mass balance error.

Returns
Returns percent runoff mass balance error.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ massbal_getStepFlowError()

double massbal_getStepFlowError ( void  )

Computes flow routing mass balance error at current time step.

Returns
Returns fractional difference between total inflow and outflow.
Here is the caller graph for this function:

◆ massbal_initTimeStepTotals()

void massbal_initTimeStepTotals ( void  )

Initializes routing totals for current time step.

Here is the caller graph for this function:

◆ massbal_open()

int massbal_open ( void  )

Opens and initializes mass balance continuity checking.

Returns
Error code
Here is the call graph for this function:

◆ massbal_report()

void massbal_report ( void  )

Reports mass balance results.

Here is the call graph for this function:

◆ massbal_updateGwaterTotals()

void massbal_updateGwaterTotals ( double  vInfil,
double  vUpperEvap,
double  vLowerEvap,
double  vLowerPerc,
double  vGwater 
)

Updates groundwater totals after current time step.

Parameters
[in]vInfilVolume depth of infiltration (ft)
[in]vUpperEvapVolume depth of upper zone evaporation (ft)
[in]vLowerEvapVolume depth of lower zone evaporation (ft)
[in]vLowerPercVolume depth of percolation to deep GW (ft)
[in]vGwaterVolume depth of groundwater outflow (ft)

◆ massbal_updateLoadingTotals()

void massbal_updateLoadingTotals ( int  type,
int  p,
double  w 
)

Adds inflow mass loading to loading totals for current time step.

Parameters
[in]typeType of inflow
[in]pollutIndexPollutant index
[in]wMass loading
Here is the caller graph for this function:

◆ massbal_updateRoutingTotals()

void massbal_updateRoutingTotals ( double  tStep)

Updates overall routing totals with totals from current time step.

Parameters
[in]tStepTime step (sec)
Here is the caller graph for this function:

◆ massbal_updateRunoffTotals()

void massbal_updateRunoffTotals ( int  flowType,
double  v 
)

Updates runoff totals after current time step.

Parameters
[in]flowTypeType of flow (RUNOFF_RAINFALL, RUNOFF_EVAP, RUNOFF_RUNOFF, etc.)
[in]vVolume of flow (ft3)
Here is the caller graph for this function: