Menu

Introduction

Marco
2013-05-14
2013-05-25
  • Marco

    Marco - 2013-05-14

    Hello everyone....
    my name is Marco. I'm a Chem Engi and now I'm starting with the job for my Master thesis.
    I'm introducing myself inside the use of DWSIM to abandon completely the use of Aspen or Chemcad.
    The topic of my thesis is the improvement of the process simulator by using Cape-open.
    I found the script of the Gibbs reactor in:

    http://dwsim.git.sourceforge.net/git/gitweb.cgi?p=dwsim/dwsim;a=blob_plain;f=DWSIM/Objects/Reactors/Gibbs.vb;hb=3e10df8ed4eabd600d9d7d443763fe437ee36fc3

    I would like to use it to create a cape-open unit to insert inside DWSIM. I know that the same code is already installed inside it, but I need to improve the approach to this kind of problem.
    If anyone knows how can I do this or where I can find some information, please help me....:(

    Thanks for all

     
  • Gregor Reichert

    Gregor Reichert - 2013-05-17

    Hi Marco,
    please have a look to tutorials page on project Wiki:
    http://dwsim.inforside.com.br/wiki/index.php?title=Category%3ATutorials

    There you will find information on how to use scripting unit. With that unit you can program any desired procedure for user objects. As DWSIM is Cape-open compliant it should be possible to export this model via that interface to any other Cape-open process simulator.

    Regards
    Gregor

     
    • Marco

      Marco - 2013-05-25

      Thanks Gregor,
      I saw these tutorials and their a good way to start my work,
      but they explain only how I can use the software,
      I should improve a part of the software so I need to study also
      the base of the software and the external approach to the CAPE-OPEN, by the way the tutorials have been a good approach to inizialize that.

      Regards
      Marco

       
  • Daniel Medeiros

    Daniel Medeiros - 2013-05-18

    Hi Marco,

    Just to add to what Gregor wrote in the above:

    • If you want to create an external CAPE-OPEN unit operation and load it in DWSIM, you can use the CAPE-OPEN .NET library that ships with it (http://www.epa.gov/nrmrl/std/cape/cape.htm). You can ask Bill (the creator of the DLL) for help on how to use it because I think that he did all the dirty work and you'll need to write/code the reactor model only, nothing more than that.

    • The Gibbs Reactor model is based on the solution scheme proposed by Michelsen in his book entitled "Thermodynamic Models: Fundamentals and Computational Aspects" (http://www.tie-tech.com/more.php?id=32_0_1_0_M13). It is a very interesting read. The model itself is a little complicated as you can see from my code, it uses a linear solver to estimate the initial mole flows for the compounds and to calculate the lagrange coefficients, then it uses a Newton loop to converge the equilibrium mole flows using numerical derivatives.

    • You can also rewrite the model in IronPython using the Custom Script Unit Operation, but it would be much more difficult because you would need to use some external python numerical solvers. It could work, anyway. If you use the CAPE-OPEN interfaces in such a model, you would be able to run it in other CAPE-OPEN compliant simulators because the Script Unit Op is exposed to them as a CAPE-OPEN component.

    If you need more help to understand the model, I can do some code commenting and send it to you.

    Also, the latest DWSIM 3 code is located here => https://github.com/DanWBR/dwsim3. We've been working with the code located in this repository for a while, as it will be the basis for the third major DWSIM release in the next months.

    Regards,
    Daniel

     
  • Marco

    Marco - 2013-05-25

    Thanks Daniel,
    I'm following your ways, probably I'll contact Bill to ask him who are
    the best ways to create a cape-open unit.
    If I can't understand the model I won't hesitate to contact you.
    Let you know about my progress.
    And thank you again.

    Regards
    Marco

     

Log in to post a comment.