Software to design a storm sewer system

Submitted by Nicola Rainiero on 2012-07-02 (last updated on 2013-06-26)

I publish an open source code that calculates line by line the suitable diameter for a given sewer system, using the linear reservoir model. It can design according to three different variables: speed, shear stress or slope of the line. It gives a final report, useful for calculus relations or following elaborations.

Written for an old programmable calculator, as described here, then converted or better patched up to make it usable in every PC, now finally is ready for internet. This software is under GPLv3 license, because I like the idea that everyone can contribute to improve it and above all to adapt it at own necessity without any annoying royalties.

The source code

Originally it functioned only with the Sharp PC-E500S in a BASIC dialect optimized for this calculating machine. I update the code and now it is compiled using FreeBASIC (quickbasic compatible). In its history the code rows have been quadrupled, forcing me to use many times the GOTO instruction and a programming construction not very well. I tried to add some comment but the reading of the code is very difficult, I am sorry!

Here is the zip archive of the software: Storm_sewer_0_9_2.zip
New releases are available here(10/10/2012) I have begun the conversion of Storm Sewer into a web application, to see how it will work and the progress of this project, go here: Storm sewer webapp: concept.

Limitations

  • The storm_sewer.exe binary must contain in the same folder:
    • circular_duct.dat, the dimensionless table for this kind of ducts;
    • input_system.dat, geometrical and hydrological data of the sawer system.
  • The system geometry can have more external lines (only a single line), but everyone must flow into same node. After this node it is possible to have more lines, but only internals. If the system is complex, I suggest to subdivide it into little sections according to this limitations and verify step by step going to downstream.
  • If the software did not converge quickly (for example in the design of little residential system), it could change the tolerance value or v0 (variable between 30 to 50 m3/ha)
  • The binary compiled on Linux does not function very well, because does not parse correctly the input file. A practical solution is Wine.
  • The duct sections must be circular.

Development plan

  • clean, optimize and correct these limitations;
  • give it a GUI;
  • add a module to automatic drawing of the corresponding longitudinal sections in DXF format;
  • make localization more easy.

In a few words SCIENCE FICTION!

Handy example

I take data from this article:

Schematization
Line Surface Length Φ
Diameter Slope
- ha m - m -
AB 0.45 60 0.35 ? 0.00322
BC 0.65 70 0.40 ? 0.00274

The input_system.dat becomes (I highlight in green the portion changed):

"|system data|"
"|on the left the values, on the right the description|"
75	"|KS - Gauckler-Strickler in m^(1/3)/s|"
51.40	"|a of IFD curve [mm hour^-n|"
0.375	"|n of IFD curve [-]|"
1	"|1 if n must multiplicated by 4/3 or 0|"
40	"|VO in m^3/ha|"
0.005	"|tolerance|"
2	"|number of lines to design|"
"|description of single line|"
"A"	"|label upstream|"
4500	"|surface in m^2|"
60	"|length in m|"
0.35	"|degree of permeability|"
0	"|if line is internal [1] otherwise [0]|"
"B"	"|label upstream|"
6500	"|surface in m^2|"
70	"|length in m|"
0.40	"|degree of permeability|"
1	"|if line is internal [1] otherwise [0]|"

Run the storm_sewer.exe file and this is the visual sequence:


  
  
   

The final report: line_from_A_to_B.txt

***************************************************************************
*               PROGRAMMING TO DESIGN A STORM SEWER SYSTEM                *
*                     USING LINEAR RESERVOIR MODEL                        *
***************************************************************************
                                                            (Version 0.9.2)
 
              Software open source by Nicola Rainiero, under GPLv3 license
                 \\--->  rainnic.altervista.org  <---//
 
 
___________________________________________________________________________
                  The system is defined by input_system.dat
 
First value of v0                          v0  =  40 m^3/ha
Coefficients of IFD curve                  a   =  51.4 mm hour^-n
                                           n   =  0.375
                                           n'  =  0.5
Gauckler-Strickler roughness coefficient   KS  =  75 m^(1/3)/s
Numbers of lines to design                 N   =  2
Tolerance value                            MIN =  0.005
___________________________________________________________________________
                         SUMMARY OF LINES INSERTED
Label         Surface       Length        PHI           INT/EXT
    -            ha             m          -              1/0
    A           0.45           60          0.35            0 
    B           0.65           70          0.4             1 
 
_______________
  Line from A
  L           S aff.        S tot.        PHI tot.          Kc
  m             ha            ha             -               -
 60            0.45          0.45           0.35           3661
 
Line dimensioned by fixing the slope of the line in  0.00322
 
                                       Q        A RH^2/3
   VO       U       Q      D       ----------   ---------       y/D     V_OP
                                    KS i^1/2      D^8/3
 m^3/ha   l/s,ha   l/s     m          m^8/3         -            -       mc
 40.00     91.53  41.19  0.250       0.0097       0.390        0.80  1000.000 
 40.00     91.53  41.19  0.300       0.0097       0.240        0.80  1000.000 
 46.60     78.57  35.36  0.300       0.0083       0.206        0.66     2.969 
 45.79     79.96  35.98  0.300       0.0085       0.210        0.59     2.604 
 45.90     79.76  35.89  0.300       0.0084       0.209        0.60     2.657 
 
For line from A:
   D       y/D      v       Q       i         TAU  
   m        -      m/s     l/s      -        N/m^2
  0.300    0.60   0.880   35.89  0.003220     2.7
 
_______________
  Line from B
  L           S aff.        S tot.        PHI tot.          Kc
  m             ha            ha             -               -
 70            0.65          1.1            0.3795455      4305
 
Line dimensioned by fixing the slope of the line in  0.00274
 
                                       Q        A RH^2/3
   VO       U       Q      D       ----------   ---------       y/D     V_OP
                                    KS i^1/2      D^8/3
 m^3/ha   l/s,ha   l/s     m          m^8/3         -            -       mc
 42.42    101.51 111.66  0.400       0.0284       0.327        0.80  1000.000 
 49.80     86.45  95.10  0.400       0.0242       0.279        0.87     8.124 
 48.76     88.30  97.13  0.400       0.0247       0.285        0.74     6.979 
 48.85     88.14  96.95  0.400       0.0247       0.284        0.75     7.077 
 
For line from B:
   D       y/D      v       Q       i         TAU  
   m        -      m/s     l/s      -        N/m^2
  0.400    0.75   1.090   96.95  0.002740     3.3
 
___________________________________________________________________________
                              SUMMARY
 
Line from   L           ST      D      y/D      v      Q       i      TAU
    -       m          m^2      m       -      m/s    l/s      -     N/m^2
    A     60.00     4500.00  0.300    0.60   0.880  35.89  0.00322  2.652
    B     70.00    11000.00  0.400    0.75   1.090  96.95  0.00274  3.251
 
 
<<For systems to reassemble>>
Total length of the line is   [m]             130.00
Total surface of the line is [m^2]          11000.00

 

 

 


References:




Related Content:

Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.