Menu

DWSIM Simulation Tutorial (Video)

Alex M
2014-09-25
2014-09-27
  • Alex M

    Alex M - 2014-09-25

    I’m a Chemical Engineer in the process of evaluating DWSIM to see if our company can use it for thermodynamic and material balance calculations. We need to do these from time to time, but the projects are too infrequent to justify acquiring an Aspen license (or something comparable).

    I’ve gone through the DWSIM Simulation Tutorial (Parts 1 and 2) here:

    http://dwsim.inforside.com.br/wiki/index.php?title=Category%3ATutorials

    I realize the tutorials were obviously done on an older version of DWSIM (I’m thinking 2.1), but it bothers me that I can’t get the same results. Thermo should be thermo regardless of software. At the beginning of the Part 1 simulation (just with the separator vessel and pump in place, before implementing the recycle stream) the tutorial shows a liquid flow rate of 1316.9 g/s and vapor flow rate of 8683.1 g/s, vs. 1335.5 g/s liquid and 8664.4 g/s vapor in my simulation.

    Now those are not tremendous differences if all I'm trying to do is get a flow rate and size pipe, but the viscosity is a major issue. The tutorial shows a liquid kinematic viscosity of 0.3898 cSt and dynamic viscosity of 0.2489 cP, vs. 0.0054 cSt and 0.0034 cP in my simulation. I can’t come up with a good reason why those would be so far off.

    Possibly related, my simulation yields a pump power requirement of 2434 kcal/h, while the tutorial is at only 1311 kcal/h. Given that the stream compositions and mass and volumetric flows are very close, with the exact same pressure difference, I can't understand why the pump power calculation would be so drastically different.

    The only input difference I can see is that “Propane” isn’t an option in 3.2 – I have to choose “Propane (C3)”, but I can’t imagine why that would actually be causing such a problem. For that matter, if I do the same simulation using all the properties with the carbon counts in the component name ("Methane (C1)" instead of "Methane", "Isobutane (iC4)" instead of "IsoButane", etc.) I get different answers. If I try to use n-propane instead of propane it won't even run (Volumetric flow rate is listed as "NaN" and other calculated properties are 0). Using all the carbon count component names got my liquid viscosities much closer to the tutorial (0.3885 cST and 0.2494 cP), but the pump power is still way off (2448 kcal/h).

    Obviously my simulation and the tutorial can't both be right (though they might both be wrong), but either way I don't see why the program has multiple entries in the component library creating significantly different behaviors for what appear to be the same components. Nor am I inclined to trust a program with a major difference on a pump power calculation between versions 2.1 and 3.2. Even if it's an issue that's been fixed in 3.2 and the old version was incorrect, I'm concerned that such a major error with such a fundamental function could have persisted so long. The tool isn't useful if we have to manually verify every single calculation anyway.

    Is there a simple explanation here that I've completely missed? I readily admit I've not done a deep dive into the guts of the program and its documentation, but I expected these simple cases (which is all I'll likely use the program for anyway) to be straight-forward out of the box. Given how intuitive the UI is, I was surprised to stumble across the calculation discrepancies. From what I can see there are a fair number of people using this program, and I can't imagine that it's as inconsistent as it appears to me at first glance.

     

    Last edit: Alex M 2014-09-25
  • Daniel Medeiros

    Daniel Medeiros - 2014-09-25

    Can you attach your simulation file?

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-09-25

    The tutorial was probably wrong, I remember fixing the pump model after v2.1. Maybe it is time to update it...

    The difference in viscosities may be related to your regional settings, can you take a look at which settings do you have on your Windows Control Panel (for decimal and thousands separators)?

    I agree that the tool is not useful if you have to check every single calculation, but as a Chemical Engineer you should be able to check a simulator result and tell if it is right or wrong. If not, then you're not capable of using simulators to help you with your job. Theoretically, you should be aware of every model used by the simulator you're running. You don't have to know how to program them, but you MUST know how they work, what they do, and what they're supposed to give you as a result.

    I suppose you're capable of that because you've quickly noticed the abnormally low viscosity value, which is obviously incorrect.

    The compounds are read from different XML databases and I'm suspecting that this might be a locale issue. I'll see if I can find the simulation used to create the tutorial and track down the viscosity value difference. If necessary, I'll release a patch ASAP.

    Thanks,
    Daniel

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-09-25

    I just realized that you might be using compounds from the CoolProp database. They must be used only with the CoolProp Property Package, because the property values are not in the compounds themselves but are rather calculated by the property package.

    Try using the compounds from DWSIM or ChemSep database only if you're not going to work with the CoolProp PP.

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-09-25

    Yes you are. "n-Hexane" is from CoolProp DB, "N-hexane" is from ChemSep DB and "n-Hexane (nC6)" is from DWSIM DB.

    Remove all CoolProp compounds from your simulation and replace them with ChemSep ones.

     

    Last edit: Daniel Medeiros 2014-09-25
  • Alex M

    Alex M - 2014-09-25

    Alright, let's see:

    I've attached a print screen of the regional numbers settings. I'm located in US CST if that helps with reference databases.

    I just did the standard installation settings ("DWSIM" and "Register DWSIM Types"), so I don't currently have the ChemSep installed.

    You are correct about the CoolProp components. I simply typed in the component name in the search field (as shown in the tutorial) and arrowed down to the matching name (trying to do my simulation exactly identical to the tutorial so I could compare the results). That procedure does not show you which database you're picking from. Consequently "Methane", "Ethane", "IsoButane", "n-Hexane" and "n-Propane" are from the CoolProp database. You might want to point that out in the tutorial (which I now realize is using the ChemSep database). That being said, I've tried it with the CoolProp Property Package and it still doesn't produce a volume value (using all CoolProp database components), so I guess that's just a CoolProp limitation.

    That also explains why the version with the carbon counts in the names (which I now see are all from the DWSIM database) produced the better-looking viscosity numbers (I haven't checked them to say they are correct, but they at least look reasonable).

    And yes I take your point about understanding and checking simulator models and outputs. This is not the first simulator I've used (Aspen some time ago, and WinGEMS more recently). I'm just not going to start out doing that on a tutorial simulation. I would obviously put some work into validating the output before putting it in front of a client - hence this conversation. There's no point in checking accuracy until I'm satisfied with the program's consistency and am sure I'm using it as intended.

    I will definitely say the program LOOKS really good. The UI is pretty intuitive, and it seems a lot more polished than I expected from an open source program on that front.

     

    Last edit: Alex M 2014-09-25
  • Alex M

    Alex M - 2014-09-25

    One other annoyance I caught when making that simulation to compare the model using the different component selections:

    With the pump block, if you accidentally type an outlet stream name for a stream that already exists elsewhere (such as VAPOR in the tutorial example), the whole block breaks. You can't correct your mistake, and you can't delete the block. I have to hit "Save and Quit" on the error when I try to delete the pump, then reboot DWSIM and open the saved file to type the correct outlet stream name and get things moving again.

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-09-25

    I'm aware that there are some "holes" that leave users without knowing what to do and/or expect like this CoolProp database restriction, and that's something I should've worked a little bit more, like showing a message about compatibility between databases and property packages... I'm glad that we've found a situation where this was indeed important, and be sure that I'll do something about it in the next release.

    This stream name typing thing through the property grid is really tricky, very complicated to get working. I thought that it was working just fine, but I'll take a look at it also.

    Please let me know if you find something else, DWSIM is already so big that there's always a loose end hidden somewhere, and I count on the users to help me to fix them. :-)

    Thanks,
    Daniel

     
  • Alex M

    Alex M - 2014-09-25

    I definitely understand, and thanks for your help.

     
  • Daniel Medeiros

    Daniel Medeiros - 2014-09-27

    Hi Alex,

    Pump power is being calculated by this equation: http://en.wikipedia.org/wiki/Pump#Pumping_power

    I guess that at the time when the tutorial was done, it was being calculated as an enthalpy difference but it was wrong.

    I fixed the connection bug, it will be ok in the next release. I'll also add a message box warning the user about CoolProp compounds compatibility.

    CoolProp is still a work in progress, they're about to release version 5 and I'll see if there are improvements that can be useful to DWSIM users.

    Regards,
    Daniel

     

Log in to post a comment.