I have a problem with the attached simulation flashing a stream with solids.
I created a compound (SiO2), forced the property package (NRTL) to treat as solid and used SVLE+Eutectic Flash algorithm.
The inlet stream MSTR01 is correct and also the stream exiting the heater MSTR02 (for testing purpose I set dT= 0): in both streams there is one liquid and one solid phase and all SiO2 is in solid.
In the flash tank liquid outlet (MSTR03) instead solid phase is not recognized and the in-out streams are slightly different while they shouldn't because into this separator nothing happens.
I checked the gas-liquid separator code and understood (at line 557) that the solid phase in the inlet stream is distributed in outlet between the liquid phases according to their ratio, but I could not understand if, when solid is in the inlet, the code sets a solid phase also in the outlet liquid stream.
For this I wrote a script that checks it, and I got that on outlet the solid phase molfracion is None.
I also tried to force the outlet materialstream flash type to PT flash instead of PH to replicate the material stream calculation of inlet but without success.
Hi Luca,
i am the "inventor" of that behavior and this behaviour is "by design".
Some years ago i wrote the code of that unit to handle a solid phase. The flash tank is used for separating liquid and vapour phases, but not for separating solid phases. Let's explain the idea behind that.
Imagine a stream with one or two liquid phases, a solid and a vapour phase entering a flash tank in real live. The vapour phase is always leaving at the top and liquid phase at bottom. The flash tank is equipped with two liquid outlets. I had to decide which exit a solid phase will take in case of two liquid phases. I had a well mixed emulsion in mind, where the solid phase is suspended in equally with same solid concentration. This probably would not resemble a real live tank.
A realistic behaviour would work like this: In case of a single liquid outlet connected, both liquid phases and the solid phase is leaving here. In case of two liquid outlets the light phase is leaving at liquid outlet 1 and heavy liquid at outlet phase 2. In order to work this way the tank will have to work as a mixer/settler where the emulsion is splitting up in two liquid phases. Now the solid will either settle down or swim up, depending on solid density compared to density of liquid phases. The solid would leave either with light or heavy liquid phase. To make it even more complicated, the solid phase could be composed of several different solid components with different densities.
Any suggestions on how to implement all these issues into the existing falsh vessel unit operation?
Regards
Gregor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I fully agree with your concept of distributing solids between the flashed liquid outlets according to their ratio as one possible option.
However, when thinking to a flash tank in presence of solids I also have in mind a kind of solid settling effect to occur in the liquid phase(s) inside the separator as counterpart of the gas-liquid disengaging effect occurring in the vapor space.
So, if I were to design it, in case of a single liquid phase, solids would of course stay in the liquid (or better... would exit from the bottom outlet, should 100% liquid be flashed in an extreme case).
In case of light and heavy liquids, I would make solids to leave with the heavy in case of density higher than the heavy phase's density (I'm thinking to sand in the liquid), or with the light in case of solid density lower than the light phase's density (I'm thinking to a floating suspension or foam); for intermediate solid densities, I would distribute between the light and heavy phases based on their flow-ratio. This breakdown to be applied to all types of solids entering the flash.
However, this solids distribution's concept was not the my original post's main question.
That is, instead, whatever solid distribution is implemented in the flash routine, how this information is transferred downstream to the outlet material streams.
To be clearer: in my model the flash inlet stream contains sand (SiO2) and this is correctly recognized by the SVLS+Eutectic flash algorithm when the solver performs a PT flash on the flah feed stream MSTR-02 (btw, if I change it to a PH flash it returns an error, why?).
Then the flash routine does its job: separates the vapor from the liquid and distributes the solid, but apparently it does not initialize anything to trigger the presence of a solid phase in the outlet stream. I've made a script that runs after the flash routine and it returns the correct solid molar fraction entering the flash and None as solid outlet molar fraction.
So I supposed that the outlet stream's solid phase identification was ultimately addressed to the MSTR-03 material stream's flash routine, but surprisingly the same flash algoritm failed to recognize a solid phase, even with outlet liquid composition and consitions the same as the inlet because in this test nothing happens in the flash separator.
I tried also to force the material stream flash to a PT instead of PH (that fails, see above), but the results are still uncorrect.
Today I run it with r6.2u4 but no changes.
Thanks for any suggestion on how to fix this problem.
Luca
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Got it working after some tweaks. NRTL doesn't work with forced solids, DWSIM still includes the solid in the activity coefficients calculation for the liquid phase and this can lead to erroneous results. Better to use Raoult's Law.
Also, for some reason the liquid outlet from the separator had a different compound ordering, which lead to a wrong molar fraction assignment. I've fix that in code already, but for the attached sim to work I had to remove the stream and add another one.
Check the composition of the inlet and liquid outlet. You'll see that two of them are switched. Don't know exactly why but you may have reordered the compounds before adding the liquid stream.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Daniel,
I have a problem with the attached simulation flashing a stream with solids.
I created a compound (SiO2), forced the property package (NRTL) to treat as solid and used SVLE+Eutectic Flash algorithm.
The inlet stream MSTR01 is correct and also the stream exiting the heater MSTR02 (for testing purpose I set dT= 0): in both streams there is one liquid and one solid phase and all SiO2 is in solid.
In the flash tank liquid outlet (MSTR03) instead solid phase is not recognized and the in-out streams are slightly different while they shouldn't because into this separator nothing happens.
I checked the gas-liquid separator code and understood (at line 557) that the solid phase in the inlet stream is distributed in outlet between the liquid phases according to their ratio, but I could not understand if, when solid is in the inlet, the code sets a solid phase also in the outlet liquid stream.
For this I wrote a script that checks it, and I got that on outlet the solid phase molfracion is None.
I also tried to force the outlet materialstream flash type to PT flash instead of PH to replicate the material stream calculation of inlet but without success.
What is wrong here?
Thanks for your help.
Luca
Hi Luca,
i am the "inventor" of that behavior and this behaviour is "by design".
Some years ago i wrote the code of that unit to handle a solid phase. The flash tank is used for separating liquid and vapour phases, but not for separating solid phases. Let's explain the idea behind that.
Imagine a stream with one or two liquid phases, a solid and a vapour phase entering a flash tank in real live. The vapour phase is always leaving at the top and liquid phase at bottom. The flash tank is equipped with two liquid outlets. I had to decide which exit a solid phase will take in case of two liquid phases. I had a well mixed emulsion in mind, where the solid phase is suspended in equally with same solid concentration. This probably would not resemble a real live tank.
A realistic behaviour would work like this:
In case of a single liquid outlet connected, both liquid phases and the solid phase is leaving here.
In case of two liquid outlets the light phase is leaving at liquid outlet 1 and heavy liquid at outlet phase 2. In order to work this way the tank will have to work as a mixer/settler where the emulsion is splitting up in two liquid phases. Now the solid will either settle down or swim up, depending on solid density compared to density of liquid phases. The solid would leave either with light or heavy liquid phase. To make it even more complicated, the solid phase could be composed of several different solid components with different densities.
Any suggestions on how to implement all these issues into the existing falsh vessel unit operation?
Regards
Gregor
Hello Gregor,
thank you very much for your detailed reply.
I fully agree with your concept of distributing solids between the flashed liquid outlets according to their ratio as one possible option.
However, when thinking to a flash tank in presence of solids I also have in mind a kind of solid settling effect to occur in the liquid phase(s) inside the separator as counterpart of the gas-liquid disengaging effect occurring in the vapor space.
So, if I were to design it, in case of a single liquid phase, solids would of course stay in the liquid (or better... would exit from the bottom outlet, should 100% liquid be flashed in an extreme case).
In case of light and heavy liquids, I would make solids to leave with the heavy in case of density higher than the heavy phase's density (I'm thinking to sand in the liquid), or with the light in case of solid density lower than the light phase's density (I'm thinking to a floating suspension or foam); for intermediate solid densities, I would distribute between the light and heavy phases based on their flow-ratio. This breakdown to be applied to all types of solids entering the flash.
However, this solids distribution's concept was not the my original post's main question.
That is, instead, whatever solid distribution is implemented in the flash routine, how this information is transferred downstream to the outlet material streams.
To be clearer: in my model the flash inlet stream contains sand (SiO2) and this is correctly recognized by the SVLS+Eutectic flash algorithm when the solver performs a PT flash on the flah feed stream MSTR-02 (btw, if I change it to a PH flash it returns an error, why?).
Then the flash routine does its job: separates the vapor from the liquid and distributes the solid, but apparently it does not initialize anything to trigger the presence of a solid phase in the outlet stream. I've made a script that runs after the flash routine and it returns the correct solid molar fraction entering the flash and None as solid outlet molar fraction.
So I supposed that the outlet stream's solid phase identification was ultimately addressed to the MSTR-03 material stream's flash routine, but surprisingly the same flash algoritm failed to recognize a solid phase, even with outlet liquid composition and consitions the same as the inlet because in this test nothing happens in the flash separator.
I tried also to force the material stream flash to a PT instead of PH (that fails, see above), but the results are still uncorrect.
Today I run it with r6.2u4 but no changes.
Thanks for any suggestion on how to fix this problem.
Luca
I know what's going on. Sorry about that. Will fix it in the next update.
Got it working after some tweaks. NRTL doesn't work with forced solids, DWSIM still includes the solid in the activity coefficients calculation for the liquid phase and this can lead to erroneous results. Better to use Raoult's Law.
Also, for some reason the liquid outlet from the separator had a different compound ordering, which lead to a wrong molar fraction assignment. I've fix that in code already, but for the attached sim to work I had to remove the stream and add another one.
https://github.com/DanWBR/dwsim6/commit/d71dfdf59d10b89fe9e04953ea9d4ea15d4537c3
Thank you Daniel, great job.
I tried to replicate your corrected model, but I couldn't.
What was the trick?
uca
Check the composition of the inlet and liquid outlet. You'll see that two of them are switched. Don't know exactly why but you may have reordered the compounds before adding the liquid stream.