Readit News logoReadit News
lbutler commented on Epanet-JS   macwright.com/2025/07/03/... · Posted by u/surprisetalk
jalk · 2 months ago
I was under the impression that municipalities use GIS systems to contain "everything" (sewers, water and gas pipes, and the electricity,telephone,fiber cables etc) Is that just a pipe dream (no pun intended) or do those lack the simulation part ?
lbutler · 2 months ago
The GIS system is generally the base for a hydraulic model. You use that data to build a connected graph structure that the hydraulic engine, EPANET, uses to run calculations to figure out the pressure at the nodes and also flow rates in pipes.

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.

[0] https://www.epa.gov/water-research/epanet

[1] https://www.cityofkyle.com/media/69766

lbutler commented on Epanet-JS   macwright.com/2025/07/03/... · Posted by u/surprisetalk
lbutler · 2 months ago
Currently the two largest vendors of hydraulic modelling software are Autodesk and Bentley. Both have taken the EPANET engine and created private forks in the 90s/2000s and never contributed back.

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

lbutler commented on Epanet-JS   macwright.com/2025/07/03/... · Posted by u/surprisetalk
lbutler · 2 months ago
One of the two authors of epanet-js here - you can check out the source code for the app here:

https://github.com/epanet-js/epanet-js

lbutler commented on Show HN: Epanet-JS – A local-first, FSL-licensed app for water network sims   app.epanetjs.com/... · Posted by u/lbutler
lbutler · 2 months ago
We created this from a fork of Placemark[0] to give water utilities an alternative choice to the big players, Autodesk and Bentley.

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].

[0] https://github.com/placemark/placemark

[1] https://github.com/epanet-js/epanet-js

lbutler commented on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale   rivet.gg/blog/2025-02-16-... · Posted by u/PaulHoule
lbutler · 6 months ago
I’m building a local-first web app, and SQLite works well for my case since a single project can be contained in one database file, just like users are used to with existing desktop applications.

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.

lbutler commented on Ask HN: Did you change your software architecture due to monetary constraints?    · Posted by u/_448
lbutler · 2 years ago
At the start up I work at [0], we use an open source library I developed to run hydraulic models of water networks in JavaScript [1].

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)

[0] https://qatium.com/

[1] https://github.com/modelcreate/epanet-js

lbutler commented on I splurged for the fanciest dishwasher and it was worth it   bonappetit.com/story/miel... · Posted by u/f_allwein
lbutler · 2 years ago
For those that haven't seen them, the two Technology Connection videos on dishwashers are must watch

1 - https://www.youtube.com/watch?v=_rBO8neWw04

2 - https://www.youtube.com/watch?v=Ll6-eGDpimU

u/lbutler

KarmaCake day236May 11, 2018
About
I make water distribution network models for water utilities.

Check out the software I make to help me build, run and calibrate models:

https://github.com/modelcreate/

https://github.com/lbutler/

https://epanetjs.com

luke at iterating dot ca

View Original