[HN Gopher] Epanet-JS
___________________________________________________________________
Epanet-JS
Author : surprisetalk
Score : 196 points
Date : 2025-07-04 13:57 UTC (4 days ago)
(HTM) web link (macwright.com)
(TXT) w3m dump (macwright.com)
| lbutler wrote:
| 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
| xnx wrote:
| > And epanet-js is a tool that you can run in a browser - full
| simulations with a WASM-based engine. It's competing with
| expensive old-school software that costs $16,000 a year, runs
| exclusively on Windows, is priced by "pipes", and uses the same
| engine, EPANET. This is so much better in comparison. A radical
| improvement.
|
| I have absolutely no use for epanet-js, but this is so cool.
| Exactly what free software is supposed to do.
| jessekv wrote:
| I suppose it's correct to say EPANET competes with expensive
| commercial offerings, but it's actually available completely
| free:
|
| https://www.epa.gov/water-research/epanet
|
| I know someone who uses it to design clean drinking water
| distribution systems in rural communities in Central America.
| They would not be able to do what they do if they had to pay
| for an expensive commercial licence.
|
| Desktop EPANET is still windows-only though, so having a
| browser version is pretty cool.
| iachilo wrote:
| Never heard of EPANET nor did I know that drinkable water systems
| had a specialized software. That's a great early hour knowledge.
| bilekas wrote:
| This is really cool and fair play to him/them for doing this..
|
| One thing I don't understand though is the license.
|
| > Fully open source (MIT) after two years under our Functional
| Source License (FSL).
|
| What exactly does this mean?
| 9dev wrote:
| It grants them a two-year headspace in which licensees are
| prohibited to create a competing offering based on the open
| sourced code--so e.g. Amazon can't just take the source code
| and create a paid offering within AWS without contributing to
| upstream--at least for two years after officially licensing the
| software.
|
| You can read the FSL license text here:
| https://github.com/getsentry/fsl.software/blob/main/FSL-1.1-...
|
| Sounds like a reasonable tradeoff to ensure companies don't
| have immediate disadvantages from open sourcing their code.
| jalk wrote:
| 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 ?
| p_l wrote:
| Some might in fact contain everything, but the core difference
| is that this is a simulation engine not a GIS tool.
| WouterSpaak wrote:
| I'm no physicist, but I've worked as a software engineer on
| energy (and drinking water, which EPANET simulates)
| infrastructure network design tooling for the last six or so
| years. It has been my understanding that simulating and
| validating multimodal network designs, which take into account
| electricity, gas consumption, district heating, is extremely
| difficult.
|
| Municipalities definitely have systems that document where
| everything already is under the ground (though especially in
| Europe there are many older cities where the data of old pipes
| is lacking), but for designing new energy networks, an
| "everything" simulation and solving model is very, very
| complex.
| lbutler wrote:
| 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
| stared wrote:
| My first thought - is it possible to use Epanet.JS to create a
| browser-based SimCity-like game?
| neurostimulant wrote:
| Epanet is used to stimulate water flow and pressure loss (head
| loss) in a pipe network so you can design a pipe network that
| meets your water flow and pressure requirements. It probably
| can be used in a city game if that game has water distribution
| network component.
| stared wrote:
| Yes, I mean precisely using it for simulating pipe network.
| samschooler wrote:
| I love the idea of a SimCity type game with a ton of
| details. Having the level of detail of simulating a water
| distribution system is some dwarf fortress type detail.
| Make sure to also add a permitting office, building permit
| system, and HOAs that protest your building permits.
| PoissonVache wrote:
| What's the business plan ? Why don't make it like 20$ a month ?
| Are your working in a company that needs this 16000$ software, so
| they are just happy to cut the fees and don't care about making
| it opensource ?
| jannes wrote:
| So cool! I wonder if I can use this software to plan an
| irrigation system for my garden.
|
| Does the simulation also work on a smaller scale?
| jessekv wrote:
| At a smaller scale, the efficiencies gained from properly
| designing the system are not a major savings.
|
| That said, if I had a garden with a big fountain I absolutely
| would try to model it in EPANET ;)
|
| Just how fancy is your irrigation system?
| kwk1 wrote:
| You can (I've used it to design an irrigation system in the
| Yucatan) but at small scale, a spreadsheet is probably
| sufficient.
| lbutler wrote:
| 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
| ic_fly2 wrote:
| Very neat looking tool.
|
| Do you expose an api to set and get network information like
| valve placement, demand at nodes or pump schedules?
|
| In my old research group we ran a forked versions of epanet to
| do some of these things and there was a previous effort called
| oompnet that tried to bring oo into working with epanet.
|
| If researchers can use epanet-js to give their researched algos
| and methods for wdn control or management, the combination
| could actually give Bentley a run for their money.
|
| You might want to present this at ewri and ewra or ccwi, there
| are usually quite a few people working with epanet there.
| vinnymac wrote:
| Surprised how well this worked on my 8 year old phone despite
| mobile support being in preview, very well done.
| cab404 wrote:
| ne doljno!
___________________________________________________________________
(page generated 2025-07-08 23:01 UTC)