OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
massbal.c File Reference
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "headers.h"
Include dependency graph for massbal.c:

Macros

#define _CRT_SECURE_NO_DEPRECATE
 

Functions

double massbal_getBuildup (int pollut)
 
double massbal_getStorage (char isFinalStorage)
 
double massbal_getStoredMass (int pollut)
 
double massbal_getLoadingError (void)
 
double massbal_getGwaterError (void)
 
double massbal_getQualError (void)
 
int massbal_open ()
 Opens and initializes mass balance continuity checking.
 
void massbal_close ()
 Frees memory used by mass balance system.
 
void massbal_report ()
 Reports mass balance results.
 
void massbal_updateRunoffTotals (int flowType, double v)
 Updates runoff totals after 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_initTimeStepTotals ()
 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_updateLoadingTotals (int type, int p, double w)
 Adds inflow mass loading to loading 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 p, double w, int isFlooded)
 Adds pollutant outflow over current time step to routing totals.
 
void massbal_addReactedMass (int pollutIndex, double w)
 Adds mass reacted during current time step to routing totals.
 
void massbal_addSeepageLoss (int pollutIndex, double w)
 Adds mass lost to seepage during current time step to routing totals.
 
void massbal_addToFinalStorage (int pollutIndex, double w)
 Adds mass remaining on dry surface to routing totals.
 
void massbal_addNodeLosses (double evapLoss, double seepLoss)
 Adds node losses over current time step to routing totals.
 
void massbal_addLinkLosses (double evapLoss, double seepLoss)
 Adds link losses over current time step to routing totals.
 
void massbal_updateRoutingTotals (double tStep)
 Updates overall routing totals with totals from current time step.
 
void massbal_getSysFlows (double f, double sysFlows[])
 
double massbal_getRunoffError ()
 Computes runoff mass balance error.
 
double massbal_getFlowError ()
 Computes flow routing mass balance error.
 
double massbal_getStepFlowError ()
 Computes flow routing mass balance error at current time step.
 

Variables

TRunoffTotals RunoffTotals
 
TLoadingTotalsLoadingTotals
 
TGwaterTotals GwaterTotals
 
TRoutingTotals FlowTotals
 
TRoutingTotalsQualTotals
 
TRoutingTotals StepFlowTotals
 
TRoutingTotals OldStepFlowTotals
 
TRoutingTotalsStepQualTotals
 
double * NodeInflow
 
double * NodeOutflow
 
double TotalArea
 

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_DEPRECATE

Function Documentation

◆ massbal_getBuildup()

double massbal_getBuildup ( int  pollut)
Here is the caller graph for this function:

◆ massbal_getGwaterError()

double massbal_getGwaterError ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ massbal_getLoadingError()

double massbal_getLoadingError ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ massbal_getQualError()

double massbal_getQualError ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ massbal_getStorage()

double massbal_getStorage ( char  isFinalStorage)
Here is the caller graph for this function:

◆ massbal_getStoredMass()

double massbal_getStoredMass ( int  pollut)
Here is the caller graph for this function:

◆ massbal_getSysFlows()

void massbal_getSysFlows ( double  f,
double  sysFlows[] 
)
Here is the call graph for this function:

Variable Documentation

◆ FlowTotals

TRoutingTotals FlowTotals

◆ GwaterTotals

TGwaterTotals GwaterTotals

◆ LoadingTotals

TLoadingTotals* LoadingTotals

◆ NodeInflow

double* NodeInflow

◆ NodeOutflow

double* NodeOutflow

◆ OldStepFlowTotals

TRoutingTotals OldStepFlowTotals

◆ QualTotals

TRoutingTotals* QualTotals

◆ RunoffTotals

TRunoffTotals RunoffTotals

◆ StepFlowTotals

TRoutingTotals StepFlowTotals

◆ StepQualTotals

TRoutingTotals* StepQualTotals

◆ TotalArea

double TotalArea