Skip to main content

EPANET-JS

Epanet JS is a Javascript Library that allows access to OWA EPANET funtions in Javascript.

Repo and Documentation.

GitHub Repo

Api Documentation

alt text

Examples

git hub react example

Demo React example

Simple React example

Simple Example

Watermain Demo

About EPANET-JS

This is from the about page from EPANET-JS:

  • Epanet-js is a full port of version 2.2 OWA-EPANET Toolkit in Typescript, providing access to all 122 functions within the toolkit.

  • The JavaScript library is for engineers, developers and academics to run and share hydraulic analyses or create custom front end or server-side applications.

  • epanet-js allows you to simulate water distribution networks in javascript using the EPANET engine. If you're not familiar with either water modelling or EPANET, have a read through what is water modelling.

  • Both epanet-js and @model-create/epanet-engine are MIT licenced, which allows the library to be used in comerical applications. The hydraulic engine used within the epanet-js library is OWA-EPANET 2.2, which is also MIT licenced, with contributions by the following authors.

  • The source code for the project is hosted on GitHub and external contributions are welcome! You can learn more about the development process, our roadmap and also visit the Github repo.

  • To get started in using epanet-js, follow the instruction below to install the library in your applicant. To see complex applications built on top of epanet-js, check out the showcase. If you have a project which uses epanet-js and want to share it, please let us know!

How to use it EPANET-JS

The easiest way to use it is to create node application and import the library. At this point we can do the EPANET work using the API. We still have to do everything similarly to how we use EPANET. We need to create a project run it and pull out the data we want while running EPANET. It will likely be easier to connect to React and other front ends than the C code of EPANET. Unless we are going to modify the source code for the epanet-js we will likely just add the package to our application.