Different results between epanet2.dll and runepanet.exe

Hi everyone,

I’m new to programming in c and working with DLL files. Lately, I’ve been asked to modify the EPANET source code. I needed to change the method used to calculate the quality into junctions. I downloaded the programmer kit on GitHub (https://github.com/OpenWaterAnalytics/EPANET/releases/tag/v2.2) and then modified the source code. Mostly, I modified the “evalnodeoutflow” function and make it call my new function “evalnodeoutflow_junction” in “qualroute.c”. My code gives the right concentration with the runepanet.exe file but gives me completely different results with the epanet2.dll. In other words, when I run a simulation using a .inp file the results are different when I’m using the runepanet.exe or the epanet2w.exe linked to my new DLL file. I was wondering if someone has an idea of where this problem is coming from. Is it the GUI, the DLL file, or my source code?

Thanks a lot!

Hello, I am new to programming c too. And I am going to use EPANET in agricultural irrigation network design, and I am going to use the source code to do some recoding. But when I attached the source code to VisualStudio 2022, there will be lots of syntax errors. I think it may be due to the version of the compiler​. Maybe you can give me some guidance about the project.
Thanks a lot!

Hi @laemo10,
I suggest you validate your problem with a benchmark network. Maybe, there are some detailed differences in the results but not very much.