I just noticed a comment in an older blog post with some negative, yet valid criticism about DWSIM. here is what "Jose" wrote:
"I am quite reluctant to write negative comments but after some testing I can only say that DWSIM has absolutelly unconsistent thermodynamics, you have added many options but the most part don't work or produce wrong results, even two phase flash operations doesn't work...., If I am permitted to add a note you should stop adding new features and concentrate your efforts to make existing code reliable, a good solution would be as for COCO to find an agreement and integrate external code for thermodynamics, you have done a good work with graphics why do not concentrate your efforts in that area ?"
And here is my answer to that comment:
I disagree when you say that DWSIM thermodynamics is highly inconsistent. As far as I use DWSIM in my work, the calculations are correct and consistent. Obviously I can't test everything, nor guarantee that everything will be giving consistent results. This ain't possible now and never will be. The software itself is always in continuous improvement.
Something that I think is vital to the user is to have good knowledge about the process he is simulating. If you mix water with oil and gas and DWSIM only calculates one liquid phase, this is expected and documented behavior. DWSIM cannot - yet - calculate equilibrium with two liquid phases.
All DWSIM thermodynamic packages have been tested to some extent and the calculated values were within expectations. The main source of your comment that the thermodynamics is inconsistent, I guess, is in the algorithm used to perform the flash calculation, which is based on the procedure of Rachford and Rice with some improvements. The procedure is quite simple and works well only for mixtures that do not deviate too much from the ideal behavior.
Also, It is of my knowledge that the current bubble/dew point calculation algorithms are very, very unreliable. You can see what I'm talking about in the phase envelope utilities...
Regarding the graphics, it is really easier to work on the interface than in thermodynamic algorithms. My priorities are set according to the time I have available, since I'm the only active developer in the project. My priority now is to finish the basic set of unit operations - the gibbs reactor is the only one left on the list. Then I'll focus on solving known problems and rewriting the entire thermodynamic part of DWSIM, including support for two liquid phases, and possibly for solids. Halfway there some interesting and easy to implement ideas appear, and by doing this it doesn't mean that I am not interested in enhancing robustness of what is already implemented. It is just me practicing my interest on learning new things. As you already should know, thermodynamics is not an easy thing to get done and demands a lot of time and dedication only to be understood.
Finally, remember that commercial simulators like HYSYS and ASPEN Plus took decades to become what they are today. And I'm sure this wasn't achieved with only one person working for free in their spare time. Therefore, I only ask for your patience, because my only intention is to make DWSIM a better open-source simulator on every new release.
Just to clarify, the current roadmap is:
- Version 1.7: Finish gibbs reactor, correct some known bugs, review petroleum characterization utilities.
After that I'll concentrate on DWSIM 2. Only 1.7 maintenance releases with bug fixes should be expected before version 2 sees the light of the day:
- Version 2.0: Rewrite the entire DWSIM thermo from scratch; Include phase stability tests and 2/3-phase Inside-Out Flash (all types - P/T/H/S/VF); Include support for CAPE-OPEN thermo and unit operations; Include support for scripting and running external applications; Implement a plugin system; Read and write data from and to external files.
Oh, and let's not forget: If I only use external thermodynamics on DWSIM, it will lose all the fun. I also don't know of any open-source thermodynamic package that can be used in a process simulator. Even Sim42, on its glorious days, didn't have its own thermo implementation but rather had to rely on VMG's closed-source property packages.
Now you can see that thermo coding is not an easy thing to do. If DWSIM's version/build history isn't enough, take a look at the COCO changelog and see what I'm talking about.
/Daniel