february 9th modelling to next level pycon colombia eafit ... · epa - swmm intermission:...
TRANSCRIPT
![Page 1: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/1.jpg)
Take your Stormwater Modelling to next level
with PySWMM and the Open Water Analytics initiative
Gonzalo Andrés Peña-Castellanos @goanpeca
PyCon ColombiaEAFIT, Medellín
February 9th, 2018
![Page 2: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/2.jpg)
● About● The (Urban) Water Cycle● On Modelling… (How, What, Why, How)● On Hydrology, Hydraulics and Water Quality
Intermission: on the perils of CFD
● EPA - SWMM
Intermission: networking, lying and coding
● OWA● SWMM API● PySWMM API● Expanded PySWMM API (Under Construction)● Roadmap and future work
Content
![Page 3: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/3.jpg)
About@goanpeca
Civil Engineer
● MSc Hydroinformatics (2010)● MSc Sanitary Engineering (2012)
● PhD dropout (2015)
![Page 4: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/4.jpg)
About@goanpeca
‘Software Engineer’Civil Engineer
● Python developer since 2009● Spyder IDE Core Developer since 2014 http://spyder-ide.org
● PyBee Project Area leader since 2017 https://pybee.org
● MSc Hydroinformatics (2010)● MSc Sanitary Engineering (2012)
● PhD dropout (2015)
![Page 5: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/5.jpg)
About@goanpeca
‘Software Engineer’Civil Engineer
● Python developer since 2009● Spyder IDE Core Developer since 2014 http://spyder-ide.org
● PyBee Project Area leader since 2017 https://pybee.org
PySWMM core developer since 2017
● MSc Hydroinformatics (2010)● MSc Sanitary Engineering (2012)
● PhD dropout (2015)
![Page 6: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/6.jpg)
● Different processes
● Different flows and interactions
The Water Cycle
Source: http://www.blueplanet.nsw.edu.au/SiteFiles/blueplanetnsweduau/Watercycle.gif
![Page 7: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/7.jpg)
The UrbanWater Cycle
Similar as the water cycle we were taught at school, but with humans messing things up with dams, pipes, roads, crops and varying loadings of
Source: http://constantine.typepad.com/.a/6a0120a7fc3be9970b016305b9674c970d-800wi
![Page 8: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/8.jpg)
The UrbanWater Cycle
Similar as the water cycle we were taught at school, but with humans messing things up with dams, pipes, roads, crops and varying loadings of
Source: http://constantine.typepad.com/.a/6a0120a7fc3be9970b016305b9674c970d-800wi
![Page 9: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/9.jpg)
How do we model this system?
![Page 10: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/10.jpg)
Whatis a model?
Is a way to understand,
define, quantify, visualize
reality by referencing to
existing and usually commonly
accepted knowledge.
<Insert Pipe Here>
![Page 11: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/11.jpg)
Is a way to understand,
define, quantify, visualize
reality by referencing to
existing and usually commonly
accepted knowledge.
Whatis a model?
![Page 12: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/12.jpg)
Is a way to understand,
define, quantify, visualize
reality by referencing to
existing and usually commonly
accepted knowledge.
The Treachery of Images
(This is not a pipe)
René Magritte
Source: https://en.wikipedia.org/wiki/File:MagrittePipe.jpgWhatis a model?
![Page 13: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/13.jpg)
● Evaluate influence of climate change
Why model urban water cycle?
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://news.nationalgeographic.com/content/dam/news/2017/02/12/conservative-climate-
change/
![Page 14: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/14.jpg)
Why model urban water cycle?● Evaluate influence of climate change● Designing and sizing of drainage system
components
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://news.nationalgeographic.com/content/dam/news/2017/02/12/conservative-climate-
change/
![Page 15: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/15.jpg)
Why model urban water cycle?● Evaluate influence of climate change● Designing and sizing of drainage system
components● Sizing detention facilities
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://news.nationalgeographic.com/content/dam/news/2017/02/12/conservative-climate-
change/
![Page 16: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/16.jpg)
Why model urban water cycle?● Evaluate influence of climate change● Designing and sizing of drainage system
components● Sizing detention facilities ● Mapping flood plains of natural channel
systems
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://news.nationalgeographic.com/content/dam/news/2017/02/12/conservative-climate-
change/
![Page 17: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/17.jpg)
Why model urban water cycle?● Evaluate influence of climate change● Designing and sizing of drainage system
components● Sizing detention facilities ● Mapping flood plains of natural channel
systems● Designing control strategies for minimizing
combined sewer overflows.● Evaluating the impact of inflow and
infiltration on sanitary sewer overflows.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://news.nationalgeographic.com/content/dam/news/2017/02/12/conservative-climate-
change/
![Page 18: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/18.jpg)
OutputsInputs
How do we model this system?Initial conditions Boundary conditions
![Page 19: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/19.jpg)
OutputsInputs
How do we model this system?
Hydrology
Hydraulics
Water Quality
Initial conditions Boundary conditions
![Page 20: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/20.jpg)
OutputsInputs
How do we model this system?
Hydrology
Hydraulics
Water Quality
Initial conditions Boundary conditions
Interactions
Interactions
Parameters
Parameters
Parameters
State (for a given time step)
State (for a given time step)
State (for a given step)
![Page 21: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/21.jpg)
Inputs
T0
How do we model this system?
Hydrology
Hydraulics
Water Quality
Initial conditions Boundary conditions
Outputs
Flow rates
Flows
Mass flowsConcentrations
Interactions
Interactions
Parameters
Parameters
Parameters
State (for a given time step)
State (for a given time step)
State (for a given step)
![Page 22: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/22.jpg)
Inputs
T0T1
How do we model this system?
Hydrology
Hydraulics
Water Quality
Initial conditions Boundary conditions
Outputs
Flow rates
Flows
Mass flowsConcentrations
Interactions
Interactions
Parameters
Parameters
Parameters
State (for a given time step)
State (for a given time step)
State (for a given step)
![Page 23: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/23.jpg)
Inputs
T0T1
How do we model this system?
Hydrology
Hydraulics
Water Quality
Initial conditions Boundary conditions
Outputs
Flow rates
Flows
Mass flowsConcentrations
Interactions
Interactions
Parameters
Parameters
Parameters
State (for a given time step)
State (for a given time step)
State (for a given step)
![Page 24: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/24.jpg)
Inputs
T0T1.....
Tn
How do we model this system?
Hydrology
Hydraulics
Water Quality
Initial conditions Boundary conditions
Outputs
Flow rates
Flows
Mass flowsConcentrations
Interactions
Interactions
Parameters
Parameters
Parameters
State (for a given time step)
State (for a given time step)
State (for a given step)
![Page 25: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/25.jpg)
Hydrological modelling● Rainfall● Evaporation ● Snow accumulation● Storage● Infiltration ● Percolation ● Interflow ● Overland flow
Source: https://cdn.pixabay.com/photo/2016/09/04/07/02/bucket-1643406_960_720.pnghttps://www.epa.gov/water-research/storm-water-management-model-swmm
![Page 26: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/26.jpg)
Hydrological modelling● Rainfall● Evaporation ● Snow accumulation● Storage● Infiltration ● Percolation ● Interflow ● Overland flow
Source: https://cdn.pixabay.com/photo/2016/09/04/07/02/bucket-1643406_960_720.pnghttps://www.epa.gov/water-research/storm-water-management-model-swmm
“Buckets”
![Page 27: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/27.jpg)
Hydrological modelling● Rainfall● Evaporation ● Snow accumulation● Storage● Infiltration ● Percolation ● Interflow ● Overland flow
Source: https://cdn.pixabay.com/photo/2016/09/04/07/02/bucket-1643406_960_720.pnghttps://www.epa.gov/water-research/storm-water-management-model-swmm
“Buckets”
![Page 28: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/28.jpg)
Hydraulicmodelling
● Drainage networks● Natural channel flows ● Model special elements, such
as:○ Storage○ Flow dividers○ Pumps, weirs, and
orifices.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
The 1D Saint-Venant Equations(Derived from the Navier Stokes Equations)
![Page 29: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/29.jpg)
Hydraulicmodelling
● Drainage networks● Natural channel flows ● Model special elements, such
as:○ Storage○ Flow dividers○ Pumps, weirs, and
orifices.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
Links and nodes
The 1D Saint-Venant Equations(Derived from the Navier Stokes Equations)
![Page 30: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/30.jpg)
Hydraulicmodelling
● Drainage networks● Natural channel flows ● Model special elements, such
as:○ Storage○ Flow dividers○ Pumps, weirs, and
orifices.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
Links and nodes
The 1D Saint-Venant Equations(Derived from the Navier Stokes Equations)
![Page 31: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/31.jpg)
Hydraulicmodelling
● Drainage networks● Natural channel flows ● Model special elements, such
as:○ Storage○ Flow dividers○ Pumps, weirs, and
orifices.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
Geometry 1
Geometry 2
Links and nodes
The 1D Saint-Venant Equations(Derived from the Navier Stokes Equations)
![Page 32: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/32.jpg)
Water quality modelling
● Pollutant build up ● Pollutant wash-off ● Routing of water quality
constituents through the system.
● Changes in constituent concentration through treatment in storage units or by natural processes in pipes and channels.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
The 1-D Advection Dispersion Equation
![Page 33: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/33.jpg)
Water quality modelling
● Pollutant build up ● Pollutant wash-off ● Routing of water quality
constituents through the system.
● Changes in constituent concentration through treatment in storage units or by natural processes in pipes and channels.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
The 1-D Advection Dispersion Equation
X
t0
![Page 34: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/34.jpg)
Water quality modelling
● Pollutant build up ● Pollutant wash-off ● Routing of water quality
constituents through the system.
● Changes in constituent concentration through treatment in storage units or by natural processes in pipes and channels.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
The 1-D Advection Dispersion Equation
X
t0
t1
![Page 35: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/35.jpg)
Water quality modelling
● Pollutant build up ● Pollutant wash-off ● Routing of water quality
constituents through the system.
● Changes in constituent concentration through treatment in storage units or by natural processes in pipes and channels.
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
The 1-D Advection Dispersion Equation
X
t0
t1
t2
![Page 36: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/36.jpg)
<intermission name=”navier-stokes”>
![Page 37: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/37.jpg)
Hydraulicmodelling
In Computational Fluid Dynamics (CFD) we have a deity:
The Navier-Stokes Equations
Source: https://www.simscale.com/docs/_images/2-Newton-Navier-Stokes.jpghttps://www.grc.nasa.gov/www/k-12/airplane/Images/nseqs.gif
![Page 38: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/38.jpg)
Hydraulicmodelling
In Computational Fluid Dynamics (CFD) we have a deity:
The Navier-Stokes Equations
Describe viscous flows
Source: https://www.simscale.com/docs/_images/2-Newton-Navier-Stokes.jpghttps://www.grc.nasa.gov/www/k-12/airplane/Images/nseqs.gif
![Page 39: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/39.jpg)
Hydraulicmodelling
In Computational Fluid Dynamics (CFD) we have a deity:
The Navier-Stokes Equations
The Kelvin–Helmholtz instability
Source: https://www.quantamagazine.org/mathematicians-find-wrinkle-in-famed-fluid-equations-20171221
Source: https://www.metoffice.gov.uk/
![Page 40: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/40.jpg)
Hydraulicmodelling
In Computational Fluid Dynamics (CFD) we have a deity:
The Navier-Stokes Equations
Source: http://www.claymath.org/millennium-problems
![Page 41: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/41.jpg)
Hydraulicmodelling
In Computational Fluid Dynamics (CFD) we have a deity:
The Navier-Stokes Equations
Source: http://www.claymath.org/millennium-problems
Do solutions exist?Are they unique?
![Page 42: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/42.jpg)
Hydraulicmodelling
But last September / October
Source: https://arxiv.org/abs/1709.10033
![Page 43: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/43.jpg)
Hydraulicmodelling
But last September / October
Source: https://arxiv.org/abs/1709.10033
![Page 44: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/44.jpg)
Hydraulicmodelling
Deobfuscating the title:
Source: https://www.quantamagazine.org/mathematicians-find-wrinkle-in-famed-fluid-equations-20171221
Source: https://arxiv.org/abs/1709.10033
![Page 45: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/45.jpg)
Hydraulicmodelling
Deobfuscating the title:
Output nonsenseSource: https://www.quantamagazine.org/mathematicians-find-wrinkle-in-famed-fluid-equations-20171221
Source: https://arxiv.org/abs/1709.10033
![Page 46: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/46.jpg)
</intermission>
![Page 47: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/47.jpg)
US EPA: United States Environmental Protection Agency
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://www.epa.gov/water-research/epanet
![Page 48: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/48.jpg)
US EPA: United States Environmental Protection Agency
EPANET(Water distribution) EPANET first appeared in 1993
SWMM(Sewers) First developed between 1969–1971
Source: https://www.epa.gov/water-research/storm-water-management-model-swmmhttps://www.epa.gov/water-research/epanet
![Page 49: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/49.jpg)
SWMM: StormWater Management Model
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
![Page 50: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/50.jpg)
SWMM:So where isthe API?
Source: https://www.openswmm.org/Forum
How to automate modeling?
![Page 51: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/51.jpg)
(EPA) SWMM:Is on GitHub
Source: https://www.github.com/USEPA
For some years already...
![Page 52: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/52.jpg)
Go check them out!https://github.com/usepa
Plus a bunch of other tools!
Katy Huff Keynote PyCon US 2017https://www.youtube.com/watch?v=kaGS4YXwciQ
![Page 53: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/53.jpg)
Limitations:
● Originally Windows only● (until 2015) no API to interact
programmatically with models● No bindings for a higher level
language● This GUI is showing its age…● Control Language not flexible
enough for fast pace iteration
SWMM: StormWater Management Model
Source: https://www.epa.gov/water-research/storm-water-management-model-swmm
![Page 54: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/54.jpg)
<intermission name=”networking-and-lying”>
![Page 55: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/55.jpg)
Back in 2012
● https://pypi.python.org/pypi/SWMM5 (SWIG)
● https://pypi.python.org/pypi/SWMM5_EA
GonzaloDoing MSc. thesis “Evaluating the impact of climate change on urban scale extreme rainfall events”
Assela PATHIRANA Associate Professor of Integrated Urban Water Cycle Management
![Page 56: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/56.jpg)
Back in 2012
● https://pypi.python.org/pypi/SWMM5 (SWIG)
● https://pypi.python.org/pypi/SWMM5_EA
GonzaloDoing MSc. thesis “Evaluating the impact of climate change on urban scale extreme rainfall events”
Assela PATHIRANA Associate Professor of Integrated Urban Water Cycle Management
Downscaling
Urban Modelling
Python
Global climate models
![Page 57: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/57.jpg)
Back in 2012
Assela PATHIRANA Associate Professor of Integrated Urban Water Cycle Management
GonzaloDoing MSc. thesis “Evaluating the impact of climate change on urban scale extreme rainfall events: Coupling of multiple global circulation models with a stochastic rainfall generator”
He is not gonna make it...
![Page 58: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/58.jpg)
I like the pyswmm name, let’s register
that on PyPI
Back in 2012
https://pypi.python.org/pypi/PySWMM
![Page 59: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/59.jpg)
Back in 2016: networking...
![Page 60: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/60.jpg)
Back in 2016: networking… and lying
It’s my preciousssss
![Page 61: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/61.jpg)
Back in 2017: networking… and codinghttps://pypi.python.org/pypi/PySWMM
![Page 62: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/62.jpg)
</intermission>
![Page 63: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/63.jpg)
Sam Hatchet
Open Water Analytics (2015)
Bryant McDonnell
Source: https://github.com/OpenWaterAnalytics/
![Page 64: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/64.jpg)
Sam Hatchet
Open Water Analytics (2015)
Bryant McDonnell
Source: https://github.com/OpenWaterAnalytics/
2018/02/06
![Page 65: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/65.jpg)
Open Water Analytics (2015)
Source: https://github.com/OpenWaterAnalytics/
Why should we care about Open Source?● Let’s move our
community away from a single developer’s vision
● Else, Research Projects Grow and Die
● Combine Industry with Academia and Open Source developers
![Page 66: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/66.jpg)
● Exposing the Data Model
● Observe Simulated Results During Run
SWMM API:
![Page 67: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/67.jpg)
SWMM API: General Framework
Input APISWMM
Computational engine
Output API
ToolKit API
*.out Binary File*.inp
Geometry & data
Python Bindings
![Page 68: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/68.jpg)
● Run Simulation● Link Settings● Control Rules in Python● Set Node Inflows
PySWMM API:
![Page 69: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/69.jpg)
SWMM API: Run a simulation
![Page 70: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/70.jpg)
SWMM API: Adjust Link Settings
![Page 71: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/71.jpg)
Control based on varying conditions
SWMM API: Adjust Link Settings
Query information for every time step
![Page 72: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/72.jpg)
SWMM API: Build Custom Control Rules
![Page 73: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/73.jpg)
● No API (yet) to construct a network programmatically
● Needs to generate an input file “manually” or using the GUI.
Expanded PySWMM API:
Source: https://www.sciencedirect.com/science/article/pii/S1877705815025941
![Page 74: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/74.jpg)
● No API (yet) to construct a network programmatically
● Needs to generate an input file “manually” or using the GUI.
Expanded PySWMM API:
Source: https://www.sciencedirect.com/science/article/pii/S1877705815025941
![Page 75: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/75.jpg)
Example input file *.inp
![Page 76: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/76.jpg)
APIProofofConcept
![Page 77: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/77.jpg)
Why should you care about the API?
● Gives you a window to your model● Optimization packages● New Inflow algorithms● Control Rules in Python● Get more out of your model● Watch simulated results while running
● Something we haven’t thought of yet
![Page 78: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/78.jpg)
Roadmap and future work - Devs
Create a common core for EpaNet and SWMM
C -> C++
![Page 79: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/79.jpg)
Roadmap and future work - Devs
1. Unit tests2. Create Conda Packages3. Continuous Integration4. Official cross platform
supporta. Linuxb. Mac
![Page 80: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/80.jpg)
Roadmap and future work - Academia
Create a pythonic interface to allow so that new models can be created in Python and plugged to the numerical engine.
SWMMComputational
engine
ToolKit API
Python Bindings
Custom Infiltration model
Custom Quality Model
Custom Optimization
Rules
![Page 81: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/81.jpg)
We are NOT hiring (yet!)But if you…❏ Like C?❏ Like C.I.?❏ Like C++?❏ Like SWIG?❏ Like Python?❏ Like Bindings?❏ Like Hydrology?❏ Like Hydraulics?❏ Like Unit Testing?❏ Like Modelling?❏ Like Open Source?❏ Like Water Quality?
… let’s talk!
![Page 82: February 9th Modelling to next level PyCon Colombia EAFIT ... · EPA - SWMM Intermission: networking, lying and coding OWA SWMM API PySWMM API Expanded PySWMM API (Under Construction)](https://reader030.vdocuments.mx/reader030/viewer/2022041000/5ea0a03131e8370ae247e1d9/html5/thumbnails/82.jpg)
Questions &(hopefully) Answers
@goanpeca
Source: http://www.revistalaocaloca.com/2017/04/el-poporo-quimbaya