Menu

Equilibrium reactor

2017-03-07
2017-03-07
  • Jelle Caestecker

    Hi,

    First I'd like to thank you for making this software.

    I've been trying to get to know the software by testing out some simple scenario's. I used a conversion reactor, no problem. But then I wanted to use an equilibrium reactor and didn't get it to work. My first try was:

    (Tried UNIQUAC and extended UNIQUAC + VLE Nested Loops)
    A stream of NaOH and a stream of HCl (both 1mol/l), they come together and mix, go into an equilibrium reactor, and then material streams outwards. I didn't get this to work at all. I tried just having "H2O HCl NaOH NaCl" as reactants and made the base equation: NaOH + HCl <-> H2O + NaCl, didn't work. I then tried to also add the seperate ions and reactions: "Na+ Cl- OH- H+ OH-" and "NaOH <-> Na+ + OH-" and "HCl <-> H+ + Cl-" and "H2O <-> H+ + OH-". This just gave me different errors etc. (Is the K so big it's considered a conversion?)


    Then I thought I'd learn by analysing an example: "Gibbs and Equilibrium Reactors". But just pressing F5 (calculate) after loading the sample gives me a red: RG-000 + 2 + 3 + 5 + 6 and error:

    10 7/03/2017 15:47:36 Error RG-000: Este recurso utiliza uma biblioteca nativa (não-.NET) da plataforma em execução, e não funciona com o modo de cálculo em paralelo na CPU ativado. por favor desative esse recurso e tente novamente.

    I don't even understand any of it.

    The equilibrium reactor seems to work (it's blue) but the output streams are red. The Gibbs reactor seems to not work at all (it's red and so are the output streams.)


    So... I'd like to ask what am I doing wrong? Or if there's a good tutorial out there somewhere that shows how to use equilibrium (and Gibbs) reactors. I just want to be able to understand how these work so I can make more complicated processes which include equilibrium reactions.

    Thanks for taking your time to read this.

    Jelle

    (The added file is one of several tries to get things working)

     

    Last edit: Jelle Caestecker 2017-03-07
  • Jelle Caestecker

    To help you find my mistake I also tried to completely replicate a different sample that works fine when I open it, but after I try to rebuild it, it doesn't work. I attached the original and my copy to this post, so maybe you'll find my mistake easily in here.

    ( 7 7/03/2017 16:35:06 Error RE-002: No solution found - reached a stationary point of the objective function (singular gradient matrix). )

     

    Last edit: Jelle Caestecker 2017-03-07
  • Daniel Medeiros

    Daniel Medeiros - 2017-03-07

    First question: Which DWSIM version are you running?

     
  • Jelle Caestecker

    4.2 update 3

     
  • Daniel Medeiros

    Daniel Medeiros - 2017-03-07

    For the first issue, you should consider using a conversion reactor because the reactants are very strong (acid/base), the solver will have difficulties finding a solution. You should've used the Extended UNIQUAC model, but I'm not sure if it would work anyway.

    For the second issue, you should've gotten the translated message in English:

    "This feature uses a platform-specific, unmanaged (non-.NET) native library, which doesn't work with CPU Parallel Processing enabled. Please disable CPU Parallel Processing and try again."

    What the above means? The Gibbs solver uses IPOPT to find a solution, whose code is in a native DLL file, that is, a file which is compiled specifically for the system where it is running (32 or 64-bit on Windows or Linux). This library doesn't support parallel calculations. If I call the solver twice at the same time from different parts of the code, it will freeze DWSIM and possibly your computer. That's why you need to disable CPU Parallel Processing on General Settings and try again.

    You may ask, why don't you do that automatically? The simple answer is, the code may already be parallelized when the execution engine gets to point where IPOPT is called.

    For the third issue, you've defined a reaction in the liquid phase and all of your compounds are in the vapor phase at the reactor inlet stream conditions.

    Regards
    Daniel

     
  • Daniel Medeiros

    Daniel Medeiros - 2017-03-07

    You've asked about a specific tutorial for the equilibrium and gibbs reactors, but there are no special instructions, except that the Gibbs reactor may work as an equilibrium reactor or in gibbs minimization mode. In the latter, you'll need to define the element matrix so DWSIM can calculate the mass balance, and it only works with an all-vapor inlet stream.

     
  • Jelle Caestecker

    Thank you very much for your anwsers, I will try these out tomorrow and report :)

     
  • Gregor Reichert

    Gregor Reichert - 2017-03-08

    Hi Jelle,
    there is even one more issue to consider with Gibbs reactor.
    This reactor has two different minimization methods "Direct Gibbs Minimization" and "Reaction Extend".
    Due to my experience the first method is running into difficulties when the equilibrium is near to 100% or 0%. Once i tried to model the burning of methane with air. There were two parallel reactions CH4->CO2 and CH4->CO defined. I got the second "Reaction Extend" method to calculate this nicely eventually. But i had to optimise the code. The first method was not optimised for such situations yet.

    Gregor

     
  • Jelle Caestecker

    Hi,

    All the anwsers fixed all of my problems, thanks Daniel.

    Thank you Gregor for the additional info. (My first experiment was combustion of CH4 but I just used ideal circumstances and conversion reactor)

    Jelle

     

    Last edit: Jelle Caestecker 2017-03-08

Log in to post a comment.