BioSTEAMDevelopmentGroup / Bioindustrial-Park

BioSTEAM's Premier Repository for Biorefinery Models and Results
MIT License
38 stars 18 forks source link

Question about the rectification tower #74

Closed zasddsgg closed 11 months ago

zasddsgg commented 1 year ago

Hello, I have learned the use and source code of rectifying tower in BioSTEAM, while I encountered the following problems in the use process. May I ask you for help? I am very sorry that there are too many problems below. Since the energy consumption of distillation tower is high in the process, I would like to learn it deeply. Thank you for your help. Wish you a good day.

a) Why does a scrubber remove all oxygen and carbon dioxide? The source code (https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/biosteam/units/_vent_scrubber.py) seems to set the remove efficiency to 100%. In fact, the pdf report sets the CO2 removal in D501 (page 122 and 44). But BioSTEAM seems to assume that all CO2 is removed by the scrubber. The heat load of the condenser for the CO2 removal in Aspen's RadFrac (setting part of the gasification-liquefaction condenser) is still very large, while it is neglected in BioSTEAM? b) Can BioSTEAM perform parameter optimization of the rectification column (such as sensitivity analysis, NQ curve), or are the results produced (in sys.save_report) already optimal? c) The binary rectifying column appears to have a fixed reflux ratio (by setting the ratio of the actual reflux ratio to the minimum reflux ratio and the minimum reflux ratio). Shouldn't we vary the reflux ratio to find the proper one, while reflux ratio is directly fixed in BioSTEAM? Can sensitivity analysis be used to examine the relationship between the reflux ratio and the number of stages to find the proper reflux ratio? d) Can binary distillation column also be used to simulate distillation for azeotrope components? e) As mentioned in the article (BioSTEAM: A Fast and Flexible Platform for the Design, Simulation, and Techno-Economic Analysis of Biorefineries under Uncertainty), BioSTEAM does not yet have strict multi-component distillation, so is binary distillation strict? f) Can the pressure drop be set for binary distillation tower? The tutorial (https://biosteam.readthedocs.io/en/latest/API/units/distillation.html) seems to set the tower pressure, that is, the pressure at the top and bottom of the tower are the same. g) The D402 result of corn stover model does not give the actual feed stage, but only the theoretical feed stage? h) Could I consult you that is the reflux ratio of binary rectifying column mass reflux ratio or molar reflux ratio? When facing new process, such as the change of feed ethanol concentration, could I consult you how to select the appropriate ratio of actual reflux ratio to minimum reflux ratio and minimum reflux ratio when setting parameters of binary rectifying column in BioSTEAM (In Aspen, sensitivity analysis and NQ curve can be used to find the appropriate reflux ratio)? i) Do the parameters of D402 and D403 need to be changed when the feed ethanol concentration changes? j) In corn stover model, the actual reflux ratio of D402 to the minimum reflux ratio is 1.4 (0.401/0.286), not 1.1 set in D402 (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/ethanol/systems.py)? k) If the feed position in BioSTEAM is 1, does the 0 tray refer to the condenser? Or does the 0 tray refer to the first tray after the condenser? l) In corn stover model, the feed pressure of D403 is 1 atmosphere, and the pressure in the tower is 10 atmospheres. The feed pressure seems to be less than the pressure in the tower. Is it impossible for materials to enter the tower? m) For BioSTEAM binary distillation column, can two feeds be fed on different stages? n) I called create_ethanol_purification_system to create D403, run it, and input the number of stages (23), feed stage (14), reflux ratio, bottom production-to-feed ratio, and tower pressure into Aspen's RadFrac. But the reboiler heat load obtained after operation was different from that obtained by BioSTEAM (168629kJ/h for BioSTEAM and 139208 kJ/h for Aspen)? The optimal feed stage (the one with the lowest reboiler heat load and the highest ethanol concentration at the top of the tower) is also not the feed stage obtained by BioSTEAM (14 for BioSTEAM’s feed stage, but 21 for Aspen’s optimal feed stage)? o) I called create_ethanol_purification_system to create D403, run it, and then I used the feed of the obtained D403 to create D403 separately through the following code, the resulting tray number, reflux ratio, and the heat load seems to be different than with that obtained by calling create_ethanol_purification_system? And the resulting minimum reflux ratio is not 0.01 as set in create_ethanol_purification_system (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/ethanol/systems.py), but 1.34? The code is as follows: from biorefineries import cellulosic import biosteam as bst bst.nbtutorial() cs = cellulosic.Biorefinery('corn stover ethanol') chemicals = cs.chemicals bst.settings.set_thermo(chemicals) Inlet=bst.Stream('Inlet', units='kg/hr', Water=160.9, Ethanol=171.3, T=389.17, ) D403 = bst.BinaryDistillation('D403',ins=Inlet, x_bot=3.9106e-06, y_top=0.80805, k=1.25, Rmin=0.01, LHK=('Ethanol', 'Water'), P=1013250., is_divided=True) ethanol_sys = bst.main_flowsheet.create_system('ethanol_sys') ethanol_sys.simulate() print(D403.results())

yoelcortes commented 1 year ago

@zasddsgg, no worries, I am happy to help.

I would like to let you know that I will not be available from tomorrow to early August due to many things happening during that time (finishing Ph.D, moving to new job, some personal family stuff, etc.). Feel free to keep posting issues. Maybe other members may help until I become available again in August. BioSTEAM is serviced by open-source developers without any monetary incentive, but hopefully as the community grows it may become easier to provide support.

Here are answers to your questions:

a) The scrubber does not have a condenser, it just works with water. The amount of CO2 removed is about 99.9%. In the BioSTEAM model, that small amount of CO2 is neglected. Feel free to change this, but you will need to make sure that CO2 can also have a liquid phase (not just be a gas phase chemical).

b) BioSTEAM does not have any optimization features. You can try Scipy's optimization algorithms, which are pretty good.

c) Please checkout some literature on the McCabe-Thiele binary distillation model. The number of stages is solved for given R / Rmin. You can just do a for loop to simulate the column across different R / Rmin to see how number of stages change.

d) Yes, the azeotrope is also visible in the McCabe thiele plot https://biosteam.readthedocs.io/en/latest/tutorial/Unit_operation_results.html#References.

e) BioSTEAM has a shortcut column (https://biosteam.readthedocs.io/en/latest/API/units/distillation.html#biosteam.units.distillation.ShortcutColumn; Fenske-Underwood-Gilliland algorithm) for multi-component distillation (this is also available in most process simulators). Algorithms have different levels of rigor. I recommend reading up on them and checking to see if it is suitable for your case. Many times shortcut algorithms give the same results as extremely rigorous algorithms.

f) No, it cannot yet.

g) The theoretical feed stage is the actual stage used in the distillation algorithm.

h) It is by mol. A good heuristic value is R / Rmin = 1.2 (literature shows this usually gives optimum stages and utility cost).

i) No unless you want a different recovery (if specifying Lr and Hr) or composition (if specifying y_top and x_bot).

j) Nice catch. Feel free to switch it. I believe 1.1 is more optimal so I will look into only changing this value for the cornstover model (for consistency with Humbird).

k) A 0 feed stage is the condenser only if it is a partial condenser.

L) Nice catch, I'll add a pump to correct this.

m) Unfortunately not. BioSTEAM does not have that capability yet. I have started working on a rigorous equilibrium model using the bubble point method and I may get back to working on it in August.

n) I don't understand how are you doing this. The number of stages is not an input to the model. Also, make sure you are using the same model in both Aspen and BioSTEAM (you must use either McCabe-Thiele or Fenske-Underwood-Gilliland in both Aspen and BioSTEAM).

o) The following fails in your code. Make sure all parameter values are the same and you should get the exact same results. Also, Rmin is the user enforced minimum value for the reflux ratio. If the actual minimum reflux ratio is less than Rmin, this enforced value is ignored (https://biosteam.readthedocs.io/en/latest/API/units/distillation.html#biosteam.units.distillation.BinaryDistillation).

import biosteam as bst
cs = cellulosic.Biorefinery('corn stover ethanol')
chemicals = cs.chemicals
bst.settings.set_thermo(chemicals)
Inlet=bst.Stream('Inlet',
units='kg/hr',
Water=160.9,
Ethanol=171.3,
T=389.17,
)
original_feed = cs.D403.ins[0]
assert (Inlet.mol == original_feed .mol).all() # This fails
assert (Inlet.T== original_feed .T)
D403 = bst.BinaryDistillation('D403',ins=Inlet,
x_bot=3.9106e-06, y_top=0.80805, k=1.25, Rmin=0.01,
LHK=('Ethanol', 'Water'),
P=1013250.,
is_divided=True)
ethanol_sys = bst.main_flowsheet.create_system('ethanol_sys')
ethanol_sys.simulate()
print(D403.results())

Thanks,

zasddsgg commented 1 year ago

Thank you for your help and information. May I confirm with you for the following questions again? In the above answer ‘o’, you mentioned "If the actual minimum reflux ratio is less than Rmin, this enforced value is ignored". But the tutorials (https://biosteam.readthedocs.io/en/latest/API/units/distillation.html) refer “If the actual minimum reflux ratio is more than Rmin, this enforced value is ignored”, which is right? In the source code (https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/biosteam/units/distillation.py), self._x_stages = x_stages = [x_bot] and self._y_stages = y_stages = [x_bot] both use [x_bot]. Is this correct? In addition, I would like to confirm with you that will you continue the development and maintenance of BioSTEAM after August, or will you stop this work? Thank you very much for your help. I wish you a happy PhD graduation and a happy and smooth career in your new job. Thanks.

yoelcortes commented 1 year ago

@zasddsgg, thanks for the good wishes. I will keep working on BioSTEAM during my postdoc and, as a future professor, I plan on centering my research program around BioSTEAM. My current lab will also be leveraging BioSTEAM in the long run. So you can be sure that this platform will continue to grow.

In my answer to "o" is actually the same as the documentation, haha. The given user Rmin is ignored if the actual Rmin computed by McCabe-Thiele is greater.

Yes, both x_stages and y_stages start with x_bot. These correspond to the staircase seen in the McCabe-Thiele diagram.

Thanks,

zasddsgg commented 1 year ago

That's fantastic. Thank you for your help. Once again, wish you a happy PhD graduation and a happy life. Thanks.