Sunday, August 12, 2018

Moment Calculations in the SWMM4 Stats Block

   Subject:  This is the code from the Stats Routine of SWMM3 and SWMM4

SUBROUTINE MOMENT(J,NLABEL)
C=======================================================================
C     This subroutine is called by the STATS Block.  For a given series
C     of event data, it computes and print the mean, variance, standard
C     deviation, coefficient of variation, and coefficient of skewness.
C
C     Updated September, 1990 by Laura B. Terrell (CDM).
C     Updated December,  1990 by Bob Dickinson.
C     WCH, 8/1/95.  Change rainfall station ID (LOCRN) to character.
C=======================================================================
      INCLUDE 'TAPES.INC'
      INCLUDE 'INTER.INC'
      INCLUDE 'STCOM.INC'
      DOUBLE PRECISION XEVNTS,SUMX,SUMX2,SUMX3,AMED,ACV,AXBAR,
     1                 ASDX,NUMER,FACTOR,DENOM,DPARM
C=======================================================================
C     Compute sum, sum of squares, and sum of cubes.
C=======================================================================
      JTEMP    = 0
      SUMX     = 0.0
      SUMX2    = 0.0
      SUMX3    = 0.0
      DO 100 I = 1,NEVNTS
      DPARM    = PARAM(I,J)
      IF(INLOG.GT.0.AND.DPARM.NE.0.0) DPARM = DLOG(DPARM)
      SUMX     = SUMX  + DPARM
      SUMX2    = SUMX2 + DPARM*DPARM
      SUMX3    = SUMX3 + DPARM*DPARM*DPARM
100   CONTINUE
C=======================================================================
C     Calculate moments.
C=======================================================================
      XEVNTS = DFLOAT(NEVNTS)
      XBAR   = SUMX/XEVNTS
      IF(NEVNTS.GT.1) THEN
                      VARX   = (SUMX2 - XEVNTS*(XBAR)**2)/(XEVNTS-1.0)
                      SDX    = SQRT(ABS(VARX))
                                      CV  = 0.0
                      IF(XBAR.NE.0.0) CV  = SDX/XBAR
                      ELSE
                      CV     = 0.0
                      SDX    = 0.0
                      VARX   = 0.0
                      ENDIF
      IF(NEVNTS.GT.2.AND.XBAR.NE.0.0) THEN
                   NUMER  = SUMX3/XEVNTS - 3.0*SUMX2*XBAR/XEVNTS +
     1                      2.0*(XBAR)**3
                   FACTOR = DSQRT(XEVNTS*(XEVNTS-1.0)) / (XEVNTS-2.0)
                   DENOM  = SUMX2/XEVNTS - XBAR*XBAR
                   IF(DENOM.LE.0.0) DENOM  = 1.0
                   DENOM  = DENOM**1.5
                   COSKEW = NUMER * FACTOR / DENOM
                   ELSE
                   COSKEW = 0.0
                   ENDIF
C=======================================================================
C     If analysis is for a pollutant, go to print statement for pollutants
C=======================================================================
      IF(NLABEL.EQ.0) THEN
                      J1    = J
                      JTEMP = 1
C#### WCH, 8/1/95.  LOCRN NOW CHARACTER.
C####                      IF(LOCRN.GT.0) J1 = J + 10
                      IF(LOCRN.NE.' ') J1 = J + 10
                      ELSE
                      J1    = J + 5
                      ENDIF
C=======================================================================
C     Print parameter identifier.
C=======================================================================
C     Perform log transform calculations on log emc data if desired.
C     This will override other flow and pollutant output.
C
C     From previously calculated log data (XBAR & SDX), arithmetic
C     statistics may be calculated.
C
C     XBAR  = Logarithmetic mean
C     SDX   = Logarithmetic standard deviation
C     AXBAR = Arithmetic mean
C     ACV   = Arithmetic coefficient of variation
C     ASDX  = Arithmetic standard deviation
C     AMED  = Arithmetic median
C=======================================================================
      IF(INLOG.EQ.1) THEN
           AXBAR = DEXP(XBAR + 0.5*SDX*SDX)
           ACV   = DSQRT(EXP(SDX*SDX) - 1.0)
           ASDX  = AXBAR * ACV
           AMED  = DEXP(XBAR)
           IF(JTEMP.EQ.1) THEN
              IF(LOCRQ.GT.0) WRITE(N6,1000) RAINF(2),PARLAB(J1),
     +                               XBAR,SDX,AXBAR,ASDX,ACV,AMED
C#### WCH, 8/1/95.  LOCRN NOW CHARACTER.
C####              IF(LOCRN.GT.0) WRITE(N6,1000) RAINF(1),PARLAB(J1),
              IF(LOCRN.NE.' ') WRITE(N6,1000) RAINF(1),PARLAB(J1),
     +                               XBAR,SDX,AXBAR,ASDX,ACV,AMED
              ELSE
              WRITE(N6,1000) PNAME(NLABEL),PARLAB(J1),
     +                               XBAR,SDX,AXBAR,ASDX,ACV,AMED
              ENDIF
           ELSE
           IF(JTEMP.EQ.1) THEN
              IF(LOCRQ.GT.0) WRITE(N6,1000) RAINF(2),PARLAB(J1),XBAR,
     +                                            VARX,SDX,CV,COSKEW
C#### WCH, 8/1/95.  LOCRN NOW CHARACTER.
C####            IF(LOCRN.GT.0) WRITE(N6,1000) RAINF(1),PARLAB(J1),XBAR,
              IF(LOCRN.NE.' ') WRITE(N6,1000) RAINF(1),PARLAB(J1),XBAR,
     +                                            VARX,SDX,CV,COSKEW
              ELSE
              WRITE(N6,1000) PNAME(NLABEL),PARLAB(J1),XBAR,VARX,
     +                                            SDX,CV,COSKEW
              ENDIF
           ENDIF
C=======================================================================
C     Print note regarding magnitude units for NDIM = 2.
C=======================================================================
      IF(NLABEL.EQ.0)       RETURN
      IF(NDIM(NLABEL).NE.2) RETURN
      IF(J.EQ.1) THEN
                 IF(METRIC.EQ.1) THEN
                                 WRITE(N6,1022) PUNIT(NLABEL)
                                 ELSE
                                 WRITE(N6,1026) PUNIT(NLABEL)
                                 ENDIF
                 ENDIF
      IF(J.GE.2.AND.J.LE.3) THEN
                 IF(METRIC.EQ.1) THEN
                                 WRITE(N6,1110) PUNIT(NLABEL)
                                 ELSE
                                 WRITE(N6,1130) PUNIT(NLABEL)
                                 ENDIF
                 ENDIF
      IF(J.GE.4) WRITE(N6,1160) PUNIT(NLABEL)
      RETURN
C=======================================================================
1000  FORMAT(1X,A8,A20,6(1X,1PG11.4))
1022  FORMAT(/,1X,'Note:  Magnitude has units of (cubic feet) * ',
     +   A8,'.  See user''s manual for explanation.')
1026  FORMAT(/,1X,'Note:  Magnitude has units of (liters) * ',
     +   A8,'.  See user''s manual for explanation.')
1110  FORMAT(/,1X,'Note:  Magnitude has units of (cfs) * ',
     +   A8,'  See user''s manual for explanation.')
1130  FORMAT(/,1X,'Note:  Magnitude has units of (liters/s) * ',
     +   A8,'.  See user''s manual for explanation.')
1160  FORMAT(/,1X,'Note:  Magnitude has units of ',
     +   A8,'.  See user''s manual for explanation.')
C=======================================================================
      END

Privileged and Confidential Communication: This electronic mail communication and any documents included hereto may contain confidential and privileged material for the sole use of the intended recipient(s) named above. If you are not the intended recipient (or authorized to receive for the recipient) of this message, any review, use, distribution or disclosure by you or others is strictly prohibited. Please contact the sender by reply email and delete and/or destroy the accompanying message.

Legacy SWMM3 and SWMM4 Fortran Code and Engines on Box

A note for those trying to find past Legacy SWMM 3 and SWMM4 Fortran Code and Engines. 
You can contact me at robert.dickinson@gmail.com or at red@ncimm.org and I will make you an Editor of this Box Account: 
https://app.box.com/folder/51591545827
Thanks, Robert Dickinson
NCIMM ( Center for Infrastructure Modeling and Management)




A Summary of Blogs on Force Mains and Pumps in InfoSWMM and InfoSewer

A few blogs on Force Mains and Pumps in InfoSWMM and InfoSewer:

The all-important Break Node

Basic Rules

Siphons

Hazen Williams

Force Mains

Theory behind FM Transitions

Pump Summary Table

RTC Rules


Privileged and Confidential Communication: This electronic mail communication and any documents included hereto may contain confidential and privileged material for the sole use of the intended recipient(s) named above. If you are not the intended recipient (or authorized to receive for the recipient) of this message, any review, use, distribution or disclosure by you or others is strictly prohibited. Please contact the sender by reply email and delete and/or destroy the accompanying message.

The Seven Learning Styles and how they apply to blogs and help files

The Seven Learning Styles and How They are facilitated by the Help Files and links to Blogs.

·         Visual (spatial):You prefer using pictures, images, and spatial understanding. A key element in the help files and blogs as well as email.
·         Aural (auditory-musical): You prefer using sound and music.  Telephone and YouTube Videos.
·         Verbal (linguistic): You prefer using words, both in speech and writing.  Telephone and YouTube Videos.
·         Physical (kinesthetic): You prefer using your body, hands and sense of touch.  Tutorials and following the steps in a Tutorial.
·         Logical (mathematical): You prefer using logic, reasoning and systems.  Theory, user guides and links to the EPA SWMM5 Reference Manuals.
·         Social (interpersonal): You prefer to learn in groups or with other people.  Attend training, send emails or participate in a Webex.
·         Solitary (intrapersonal): You prefer to work alone and use self-study. Theory, user guides and links to the EPA SWMM5 Reference Manuals.

Camtasia, TechSmith and SWMM5 and InfoSWMM YouTube Videos

One more great aspect of Camtasia, you can add voice narration AFTER recording the video and add many Callouts to help explain what you are trying to show..  It helps me at least; it is hard to move the mouse and find the words to describe the mouse movements at the same time.  Using Camtasia I can separate the video, verbal descriptions and callouts into three events.



Wednesday, July 4, 2018

Visual INSTRUCTIONS FOR COMPILING SWMM5.EXE USING MICROSOFT VISUAL STUDIO 2017

Visual INSTRUCTIONS FOR COMPILING SWMM5.EXE USING MICROSOFT VISUAL STUDIO 2017
=======================================================================

1. Create a sub-directory named VS2017-CLE under the directory where
   the SWMM 5 Engine source code files are stored and copy SWMM5.DEF
   and VS2017-DLL.VCPROJ to it.
2. Launch Visual Studio 2017 and use the File Open command to open
   the VS2017-DLL.VCPROJ file.
3. Issue the Build Configuration Manager command and select the
   Release configuration.
4. Issue the Build VS2017-DLL command to build SWMM5.DLL
   (which will appear in the Release subdirectory underneath the
   VC2017-DLL directory).


Import a SWMM5 INP File to InfoSWMM and InfoSWMM SA

Import a SWMM5 INP File to InfoSWMM and InfoSWMM SA

Steps to Import SWMM 5 to InfoSWMM and InfoSWMM SA
A import the SWMM 5 File using Exchange
B Select the SWMM 5 INP file
C Update the Map by using the Utility Update Map from DB / Force All Network


How to See the Highest Continuity Errors Table in the Output Report Manager In InfoSWMM and SWMM5

How to See the Highest Continuity Errors Table in the Output Report Manager
In the output text report file of InfoSWMM, InfoSWMM SA and SWMM5 there is the Highest Node Continuity Error Table.   The Table shows the highest 20 Nodes for  percent node continuity errors and the actual continuity error as defined by Node Outflow - Node Inflow.   This  table is  also shown in the Output Report Manger  table  
The same value of Node Outflow - Node Inflow is shown in the Junction Summary table under the column flow volume difference.  The units of flow volume difference will be the same as the RPT file if the units are changed in the Output Unit Manger.


How to change the volume units  in  the Output Unit Manger.  Change the volume to MG or ML (for SI units).


The flow volume difference can also be seen in Map Display by picking the Active Output variable Vol_Diff or Flow Volume Difference.


Tuesday, July 3, 2018

InfoSWMM and InfoSewer from Innovyze both are Extensions inside of Arc Map (versions 10 to 10.6 and counting)

InfoSWMM and InfoSewer from Innovyze both are Extensions inside of Arc Map (versions 10 to 10.6 and counting).   As Innovyze Arc GIS products they (and InfoWater) share a common menu structure: Project, Edit, View, Exchange, Scenario, Tools, Utilities, Applications and Help.  InfoSewer only has one Application, InfoSewer Load Allocator, whereas InfoSWMM has many additional Applications.  These series of blogs attempts to show the commonality in tools between InfoSWMM and InfoSewer.


Monday, June 11, 2018

From 1998 - XP Software 20 years of water resource software experience


XP Software 20 years of water resource software experience

XP Software is one of the longest established water resource software
organisations in the world. Having started operations in 1974 with the development of the Regional Stormwater Model (RSWM), a rainfall/ runoff networked program for simulating stormwater runoff, XP Software has had a long tradition in the development, marketing and support of water resource software. The RSWM, or RAFTS program as it was later retitled, is still in use today by over 400 organisations. Currently over 2000 organisations, ranging from a few staff to over 5000, around the world are licensed users of software marketed by XP Software.
Approximately 50
organisations are currently licensed with XP Software products in New Zealand. At this time software is
distributed to New Zealand directly from Australia with support via phone, fax, e-mail and web facilities. Workshops are provided on specific software with the most recent being a two-day, hands-on workshop focusing on XP-SWMM in Auckland which was conducted in March 1998.
It is expected that regular workshops and user forums will play a major role in the future with the increasing acceptance of the XP-SWMM and XP-UDD software programs throughout New Zealand

XP Software has been involved in the full ambit of software and hardware trends since the early 1970s. This started with main frame computers using Unix type operating systems, through to the early phases of the Apple Macintosh, up to the current dominance of PCs utilising Microsoft's DOS, Windows 3, 95, 98 and NT operating systems.
To better respond to ever increasing changes XP Software's North American office has recently merged with Caice Software, a leading civil engineering software developer specialising in digital terrain, road and civil design, survey and Geographical Information Systems integration. Development is well advanced to integrate parts of our respective software packages to greatly improve the productivity of many of our users throughout the world.
XP Software's global approach, which utilises partners currently in Australia, North America, France and Japan, is allowing XP Software to be at the leading edge of water resource software with rapidly evolving associated management systems including GIS, FIS, SCADA and Asset Management Systems. Integration with our Caice partners in North America also allows a far more efficient system by tying together both road and site design with advanced stormwater and wastewater management within a common software package and database.
XP-SWMM/UDD is a truly integrated management tool developed to allow a holistic approach to the analysis or design of stormwater and wastewater systems including combined systems.
Modules are available within the stormwater areas to estimate either design floods or simulate historical events including both water quantity and quality. Both urban and rural or mixed areas can also be modelled. Within the wastewater elements both dry weather and wet weather flow can be estimated. Treatment models are included to treat wastewater through traditional treatment plants as well as both point and non-point source pollutants from stormwater through less traditional wetlands, gross pollutant traps and water quality control ponds.
XP-SWMM provides world best practice hydraulic modelling to simulate the transport of flows, including pollutants, throughout the drainage network.
The hydraulic model also allows the combined use of both open and closed conduits. This is particularly useful in urban stormwater involving both underground pipes as well as on ground surcharge facilities including roads and channels.

Friday, June 1, 2018

Building Sewer Collection System models using InfoSewer

Building Sewer Collection System models using InfoSewer

InfoSewer is developed to take full advantage of the capabilities of GIS and relational database management systems (RDBMS) technology. By embedding GIS mapping functions and utilizing proven and efficient tools for information exchange and graphical data entry, maintenance and display, InfoSewer provides the user with an efficient easy-to-use vehicle for network model construction and management.

 

In InfoSewer , a sanitary and storm sewer collection system model consists of two major components:

 

   Network schematic - The network schematic provides a critical role as a model input, providing information on the connectivity, length, and shape of network components and it also plays an important role in the display and analysis of model results, acting as the vehicle for results presentation.

Modeling attributes - Information associated with network elements act as the primary input to the hydraulic network simulator. This information includes a set of required attributes describing critical components of system operations and a set of user-defined attributes for integration with other infrastructure management applications.

 

InfoSewer stores the network schematic and modeling attributes in GIS Shapefile and DBF format. It provides the following tools to build and maintain sewer collection system models.

 

 

 

 

Thursday, May 31, 2018

Head loss due to Transitions and Fittings (Local loss) for InfoSWMM and SWMM5

Head loss due to Transitions and Fittings (Local loss)
Whenever flow velocity changes direction or magnitude in a conduit (e.g., at fittings, bends, and other appurtenances) added turbulence is induced. The energy associated with that turbulence is eventually dissipated into heat that produces a minor head loss, or local (or form) loss. The local (minor) loss associated with a particular fitting can be evaluated by
                                                                                                      
where   V         =          mean velocity in the conduit (m/s, ft/s)
                K         =          loss coefficient for the particular fitting involved.
The table given below provides the loss coefficients (K) for various transitions and fittings.
 
Table 3-3: Typical Minor Loss Coefficients
Type of form loss
K
Expansion
Sudden
D1 < D2
Gradual
D1/D2 = 0.8
0.03
D1/D2 = 0.5
0.08
D1/D2 = 0.2
0.13
Contraction
Sudden
D1 > D2
Gradual
D2/D1 = 0.8
0.05
D2/D1 = 0.5
0.065
D2/D1 = 0.2
0.08
Pipe entrance
Square-edge
0.5
Rounded
0.25
Projecting
0.8
Pipe exit
Submerged pipe to still water
1.0
Tee
Flow through run
0.6
Flow through side outlet
1.8
Orifice
(Pipe diameter
 /orifice diameter)
D/d = 4
4.8
D/d = 2
1.0
D/d = 1.33
0.24
Venturi (long-tube)
(Pipe diameter
 /throat diameter)
D/d = 3
1.1
D/d = 2
0.5
D/d = 1.33
0.2
Bend
90o miter bend with vanes
0.2
90o miter bend without vanes
1.1
45o miter bend
0.2
Type of form loss (continued)
K
Bend
45o smooth bend:
     (bend radius
 /pipe diameter)
r/D = 1
0.37
r/D = 2
0.22
r/D = 4
0.2
90o smooth bend
r/D = 1
0.5
r/D = 2
0.3
r/D = 4
0.25
Closed return bend
2.2
Sluice
Submerged port in wall
0.8
As conduit contraction
0.5
Without top submergence
0.2
Valve
Globe valve, fully open
10
Angel valve, fully open
5.0
Swing check valve, fully open
2.5
Gate valve, fully open
0.2
Gate valve, half open
5.6
Butterfly valve, fully open
1.2
Ball valve, fully open
0.1
       Source: Nicklow and Boulos (2005)

AI Rivers of Wisdom about ICM SWMM

Here's the text "Rivers of Wisdom" formatted with one sentence per line: [Verse 1] 🌊 Beneath the ancient oak, where shadows p...