Menu

Computing density from composition using DTL/Python

Tom
2019-02-25
2019-02-25
  • Tom

    Tom - 2019-02-25

    I wrote a DTL/Python based script that simulates an oil/gas separator. Right now, I need to input the bulk density of the live oil in order to compute the overall molar flowrate (the volumetric flow rate is also input) which is needed by the TP flash to return proper oil and gas phase rates.

    I notice that, in DWSIM, the simulator can automatically determine the bulk density of the pre-flashed fluid. I haven't yet been able to find in the DTL documentation a property that I can access to get the individual compound molar densities at arbitrary T,p. Is there some other way to derive the molar or mass density of a mixture before flashing it? Or should I just use a dummy flowrate and do an initial flash to get the mixture density and then compute the real phase rates with a second flash? But, that is kind of expensive, right?

     
  • Daniel Medeiros

    Daniel Medeiros - 2019-02-25

    Hi Tom,

    If I got you right, you will need the relative amounts of vapor and liquid phases in the inlet mixture to compute the overall density, so yes, you will need to flash it beforehand.

    Regards
    Daniel

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.