lbutler
The goal is to replace clunky, expensive enterprise desktop tools (which often charge $10k+ for a wrapped version of the open-source US EPA engine). We want our version to be frictionless: login optional, runs entirely in the browser, and saves files locally to your device.
We are using the Functional Source License (FSL) to keep it sustainable while remaining open.
There is also a water quality component where you can calculate the age of water in the system or chemical, such as chlorine, or other by-products you may or may not want in the system.
The US EPA site goes into technical details on what the engine can do [0], but the vast majority of modeling is done as part of a water master plan for a water utility.
A water utility will build a hydraulic model of their network and calculate and model the growth of their city over a 30-year period. The model will highlight areas of concern, generally low pressure, and the water utility can propose new infrastructure like larger pipes, tanks, or pumps, and will schedule future capital works to keep service levels acceptable.
They generally repeat this process every 3–5 years, rebuilding the model and rewriting their master plans. Here is an example of a master plan by the City of Kyle [1].
Generally, a water utility is proposing tens of millions of capital works, if not more. So traditionally, the high price tag has just been accepted. But obviously, this doesn't scale down to smaller utilities, and normally consultants will do the work on their behalf, including holding the right software license.
The commercial tools have made it easier for engineers at consultancies and utilities to build hydraulic models by integrating GIS and providing support for scenarios to compare different states of the model or future developments of a city.
Though as Tom points out, this comes at a huge price.
The US EPA does offer a simple GUI which can be used for smaller systems but without a connection to GIS, its usage has been limited.
These commercial versions have become enterprise monsters, they are very complex and expensive.
We wanted to create the right balance between what the US EPA already gives away for free and what the big vendors offer. We believe that releasing the software as FSL which transitions to MIT gives us the right head start and for the advanced features we're charging about 10% of what Autodesk and Bentley do - and for those that think that's too much, they of course can download and host their own private version too.
For those that are still curious, here are some extra links and context.
https://app.epanetjs.com/ – Try the app, it's local first and registration optional
https://github.com/epanet-js/epanet-js – Here is all the source code
https://github.com/epanet-js/epanet-js-toolkit – See how we converted the C engine to WASM
https://epanetjs.com/ – Read a landing page to see what we're doing and why, also our pricing
https://www.autodesk.com/products/infowater-pro/overview – Autodesk's product $10k/yr/user
https://en.virtuosity.com/openflows-water – Bentley's product $16k/yr/user
The majority of commercial modeling software uses the U.S. EPA's engine and adds a nicer interface. They all fork the engine to add enhancements but don't contribute back.
This is our attempt to create an open-source alternative for water engineers and contribute back to the core engine at the same time.
You can check out the source code on GitHub[1].
Show HN: Epanet-JS – A local-first, FSL-licensed app for water network sims
What I’d really like is an easy way to sync the SQLite database state to a cloud service. Most existing options expect you to query against a remotely hosted database and charge per read/write.
Since the database will have around 100,000 rows and you're typically working with all the data at once, streaming parts of it doesn’t make sense for my use case.
The closest I’ve found is Turso, which has offline writes in private beta, and SQLite Cloud, which lists local-first and offline sync as "coming soon."
The simplest approach might be letting users push to S3 storage with versioning. Ideally, it would also support point-in-time restores, tracking incremental updates alongside full snapshots.
Even better, I’d manage minimal server-side infrastructure and just pull the SQLite database from a service that handles syncing and management.
Big Companies Cashed in on Mississippi's Water. Small Towns Paid the Price
Placemark is now open source
A hydraulic model may be between 1-10MB and the simulation results can end up being 100+MB of time series data.
Other vendors with proprietary engines have to scale up servers to run their simulation engineers and will store and serve up results from a database.
Having everything done locally means we only have to store a static file and offload the simulation to the client.
Because we've architected it this way our hosting costs are low and users generally have faster access to results (assuming they're running a moderately decent machine)
Making the videos run much faster than normal, at least 1.5x and up to 3x in parts means you can provide a lot more density of information.
It does require the first pass to be visually interesting, and if you don't do something to stand out in the first three seconds you risk being scrolled past.
I also use subtitles to fill in the gaps and assume it will auto replay and if they make it through one replay, that further viewings will be easier to understand what is going on.
I have a relatively small following on LinkedIn ~2.5k but can get between 200-400 likes.
I then use these short clips on my GitHub pages for my work as well.
Some examples below:
https://www.linkedin.com/posts/lukepbutler_water-epanet-qati...
https://www.linkedin.com/posts/lukepbutler_water-epanet-inno...
I would also recommend the Egghead instructor videos, while much longer, they still try to push the idea of short videos to get the point across
A water utility in Spain spun off a start up called Qatium [2] and they used my library as the engine of their simulations and asked me to join.
A water utility in Spain spun off a start up to create a similar web based water modelling application and they used my open source library.
They approached me and I joined them and have been able to maintain the open source library as part of my role.
A big part of that is calibrating them which can be time consuming, you look through hundreds of options. I create a few web based apps to help grind through these tasks but ultimately they were for my own use as a consultant to close projects quickly.
I did pull out the engine as its own open source library for other to use, and that ended up helping me get my current role where I can now maintain it and be paid at the same time.
He has requested the full amount be donated to Nine Lives Foundation, proof of donation can be seen here: https://ninelivesfoundation.networkforgood.com/
I'll be posting the script and the format documentation shortly
If you email me how you know it is a SQLite file and what is missing, I can also send you the data that is contained within the files if that will be helpful to you.
I'm working on an open-source library in a niche civil engineering field. I have a proprietary file format that I would like to decode and support.
I am almost certain the file is an SQLite database with the header changed, though my attempts to reconstruct the header and find any other changes have failed.
If you think you are up to the challenge, I've linked to some example files below, the first person who can share the procedure to update the file that it will open in a native SQLite reader I will pay a $2,000USD bounty or donate to a charity (your choice).
Email in profile, I'll post below if an answer has been accepted.
edit: This has been decoded and the bounty will be donated! Waiting for confirmation from the person who provided the script to decode the file and I will share results and proof of donation
Show HN: Simulate Water Network Shutdowns
Chances are the water network that's connect to your home was modelled using this FOSS by the US EPA.
Unfortunately, it was probably done using a commercial tool by Bentley or Innovyze/Autodesk but the underlying modeling engine was from the EPA.
In my example these sites are unmanned 99% of the time but if there was an operator on site and someone back in the head office went on the loud speaker to tell off some trespassers I can't imagine OH&S or the on-site operator would be the slightest bit impressed.
When you just want people off your site ASAP we found providing the operators with remote loudspeakers and allowing them to say "Hey we can see you, we've called the police" was a very effective way to convince anyone that was trespassing to leave.
Though we did lose a few cameras when kids decided to throw rocks at the CCTV system before they left...
The original concept was in excel and VBA.
I ended up pulling out the engine as a separate open source library which I've used on a few other projects.
While I'm not the best engineer or programmer out there, blending both skills has been a massive advantage for my career.
My boring advice is to just start solving your own problems with code in your existing field.
My brother has a YouTube channel full of content-aware scaling videos:
I maintain a JS conversion of the EPA's simulation engine EPANET. https://epanetjs.com/ https://github.com/modelcreate/epanet-js
I've built a few open source apps and few other little projects to help automate my workflow.
There are only a handful of providers of modelling software, most are commercial and one recently sold to Autodesk for $1B.
Not sure I'll convince the industry to change but I'm enjoying tinkering around and making my own small difference.
Can't imagine there are too many civil engineers here specializing in water modelling, it's a pretty niche field!
I'll eventually convert part of one of these into a B2B app to keep what I do sustainable but I want to keep as much free and open source.
[1] https://www.linkedin.com/pulse/seven-water-modelling-apps-on...