I need to convert the unit of Net2.inp (in EPANET) by using MATLAB.
For example, I would like to change the flow of all nodes from GMP unit to LPS unit.
So, how to execute the code in MATLAB. Kindly, help me. I am the beginner in MATLAB.
Thank you so much.
EPANET- how to convert the unit in EPANET using MATLAB
Hello,
use the following code after loading your network:
- d.setBinFlowUnitsLPS
Regards.
Hello,
In my experience this code only modifies units, not values
You have to do this manually. I’ve converted the three EPANET example networks to SI units and you can download them from here: https://www.dropbox.com/sh/ua92rpf5e4awr2j/AAC1kjECinJVqY6TBI_jhlW_a?dl=0
EPANET 2.2 includes an API to change the units EN_setflowunits(). I guess it was included in the Matlab class. If it doesn’t work please open an issue on GitHub or report the issue here.
Hi
You can use my tool which also allows you to convert flow units directly without programming a single line of code. It is in Spanish, but it is very easy to use.
Download link here
Hi @TRJ, you can try the following example:
d.setFlowUnitsLPS;
% or save in new file
d.setFlowUnitsLPS('NET1_LPS.inp');
Regards,
Marios
Thank you so much. It is really awesome tool!!
Thank you so much for your suggestion!!
Thank you so much for your suggestion
Thank you so much. They are really useful!!