Menu

Gas storage issue

Felipe
2022-03-17
2022-05-03
  • Felipe

    Felipe - 2022-03-17

    Hi, I want to simulate the increase of the pressure and temperature inside a storage cylinder. Is this scenario possible in DWSim? How can I modelate it ?

    Thanks

     
    • Gregor Reichert

      Gregor Reichert - 2022-03-22

      Hi Felipe,
      this can be done in a very simple way.
      Just take a feed stream and run it through the compressor.
      As this is a continuous simulation you may transfer this to your batch operation by changing the flow units by removing the division by time in your mind.
      For instance: Feed with 1000 m³/h is compressed to 5 bar in DWSIM. You will find temperature and volume flow m³/h in output stream. Now you can interpret this as a batch process in following way that 1000 m³ of feed are compressed to 5 bar with the corresponding volume m³.
      Now you may define a sensitivity analysis where you run the pressure from low to high value of final pressure.

      Gregor

       
      👍
      1
  • Luca Finardi

    Luca Finardi - 2022-03-18

    Hi Felipe,

    yes it is (I assume you are referring to gas flow charging a cylinder) .
    I did it with a Python script solving the differential equations given by the mass balance, possibly coupled with the gas flow pressure drops equation.
    Regarding the temperature profile, you can define if your process as slow enough to be considered an isothermal or fast to be an adiabatic process. In the latter you can solve the temperature profile through the non-steady heat balance taking also into account the heat exchanged through the cylinder's wall.

    Luca

     
    👍
    1
    • Felipe

      Felipe - 2022-03-18

      Thanks for your help Luca ! can we integrate these Python scripts into the DWSim simulation or we will have to do it separately?
      do you have any documentation/tips on how to put into dwsim the python scripts ?

      Thanks again
      Felipe

       
  • Luca Finardi

    Luca Finardi - 2022-03-18

    Hi Felipe,

    yes DWSIM directly supports Python scripts within its model.
    I'll get back to you with one sample of what I did, as soon as I am able to find some time.

    Luca

     
    👍
    1
  • Luca Finardi

    Luca Finardi - 2022-03-20

    Hi Felipe,

    attached is a model I built to simulate the charging of a 100 litres cylinder with methane.
    Please have a look: model's details are described in the flowsheet and in the Python Script's comments.
    Let me know if you need any futher information.

    Hope it helps.

    Luca

     
    ❤️
    1
    • Felipe

      Felipe - 2022-03-21

      Wow, grazie mille Luca ! I'm going to check your example, I will not hesitate to ask you further information if I need it. Have a great week :)

       
  • Luca Finardi

    Luca Finardi - 2022-03-26

    Hello Felipe,

    I revised the gas model, as I found that the assumption of ideal gas (ie U =Cv * T and H = Cp * T) to solve the transient in terms of gas temperature only, did not give me credible results.
    Therefore I changed the approach to solve the governing ODE by coupling the internal energy balance with the density balance and solving the non-linear equations system via the Simplex Optimization technique included in the MathNet.Numerics package.

    Attached is the revised model that I believe is more robust. Let me know if I can be of help on this.
    Have a nice weekend.

    Luca

     
    ❤️
    1
    • Felipe

      Felipe - 2022-03-28

      Oh, thanks Luca, I was studying how to improve the temperature equation on the first version. Thanks for the update, the results are more crediable now.
      I will take a closer look on the script during the week if something blocks me, I will send you a message.

      Thanks again ! have a nice week !

       
    • Felipe

      Felipe - 2022-03-29

      Hello Luca, I was using the model to simulate some examples of gas filling with gaseous hydrogen found in the literature. But I have some discrepancies with the T results. The example of a cylinder of 29L can be found the article https://www.sciencedirect.com/science/article/pii/S0360319918340837. Can you give a look at the model and the results? I know that some errors will be associate to the heat losses through the vessel wall, etc. But still, the temperature is too big. I checked in a excel file differents thermo eq using differents experimental points and the are not that much discrapancies in the results.

      Thanks for your help !

       
  • Luca Finardi

    Luca Finardi - 2022-04-05

    Hello Felipe,

    sorry for this delayed answer. I checked your model and the referenced document.
    The main discrepancies in the results are of course due to: (a) the different thermo-package used in my file (Peng Robinson) and in the paper (Noble-Abel EOS for H2 ); (b) the heat exchanged through the cylinder's walls (neglected in my simulation).
    I am checking how to better represent the H2 gas behaviour during the cylinder charging and I hope to get back shortly with a revised model.

    Luca

     
    ❤️
    1
  • Luca Finardi

    Luca Finardi - 2022-04-28

    Hello Felipe,

    I finally found some time to revise the gas filling model and to adapt it for the hydrogen cylinder filling (only).
    The attached model is based on the paper you referenced earlier and applies the Abel-Noble real gas EOS for H2.
    The heat transfer from H2 to the cylinder internal wall and from the external wall to the ambient is also simulated by solving the 1D heat diffusion equation discretized in time and space.
    The charts in the flowsheet show the profiles of cylinder pressure, temperature and inlet flow: moreover the metal temperatures are calculated and in case available for plotting.
    Several parameters can be modified in the flowsheet and in the Script1 as shown in the script's code.

    I did not compare in details the results of this model with the graphs included in the referenced paper, so let me know any comment on possibile discrepancies.

    Hope it helps.

    Luca

     
    ❤️
    1
    • Felipe

      Felipe - 2022-05-03

      Oh thank you for your help Luca. :)
      I will check it out!
      Have a great week !

       

Log in to post a comment.