BioSTEAMDevelopmentGroup / Bioindustrial-Park

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

Questions about corn stover model in Biosteam #58

Closed zasddsgg closed 1 year ago

zasddsgg commented 1 year ago

Hello, may I ask you a question. For corn stover to ethanol model in cellulosic biorefinery, lignin and glucan in feed are liquid state, glucose and glucose oligomer are solid state. According to the report's description (Process Design and Economics for Biochemical Conversion of Lignocellulosic Biomass to Ethanol), in the pretreatment reactor, the solid-state glucan is converted into dissolved glucose and dissolved glucose oligomer, and the solid-state lignin is converted into dissolved lignin. However, the lignin and glucan in the feed are liquid state in biosteam, glucose and glucose oligomer are solid state, so why is that. May I trouble you for an answer. Thank you. Wish you a good day.

yoelcortes commented 1 year ago

@zasddsgg, thanks for you question. You make a good point. The designation of liquid or solid for those components (Glucan, Lignin, SolubleLignin, Glucose, and GlucoseOligomer) in the cornstover biorefinery actually does not matter because of how we are modelling them. These components are not changing phase (we are not making dried sugar) and many of their properties are assumed to be similar to water (while others like the volume and heat capacity are given as constants).

If anyone would like to change the phase of glucan and lignin to solid (s) to avoid such confusions, I would gladly accept the contribution.

zasddsgg commented 1 year ago

Thank you very much for your answer. I still have some questions when using BioSTEAM. May I ask you to give some answers for the following questions

1)If lignin, which should be solid, is set to the dissolved state, and glucose, which should be dissolved, is set to the solid state, will it affect the gas-liquid balance? Because solid substances do not participate in the gas-liquid balance.

2)I haven't found anything in Biosteam's tutorials or code that calls for physical property method, such as NRTL, UNIQUAC, SRK etc. Have biosteam considered about physical property method selection like in Aspen model?

3)About thermo set, the default settings is the Gamma = DortmundActivityCoefficients, but in the alkali pretreatment of code like T201 M202 and R201 is set as thermo = ideal (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/systems/pretreatment/alkaline.py), why set up like this? Does considering DortmundActivityCoefficients is more accurate than the thermo = ideal? Is it better to use DortmundActivityCoefficients than thermo = ideal in the process?

4)Finally, I would like to ask you about VLE. The tutorial "Gotchas"( https://biosteam.readthedocs.io/en/latest/tutorial/Gotchas.html) mentioned that the stream, heat exchanger, mixer is set to not perform VLE by default, while the implementation of VLE and non-implementation lead to different results in the composition of outlet stream. Should VLE be considered in the actual biorefinery process? Then why the default setting is not to execute VLE? In corn stover code (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/units.py ), just PretreatmentReactorSystem unit is set up run_vle = True, does this mean that only PretreatmentReactorSystem implemented VLE, while other units do not perform VLE? Besides, streams, acid pretreatment system, as well as the fermentation system are also not set run_vle = True (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/tree/master/biorefineries/cellulosic), does this mean that VLE was only performed in PretreatmentReactorSystem during the whole process?

May I trouble you for some answers. Thank you very much. Wish you a good day.

yoelcortes commented 1 year ago

Sure thing, here are the answers to your questions:

1) When the phase of a chemical is given, only that phase exists (so they do not participate in equilibrium). The only exception is if <Chemical>.N_solutes is given. In this case, Glucose.N_solutes is set to 1, so the presence of Glucose increases the boiling point of a mixture (but no Glucose actually ends up in the vapor). Lignocellulosic fractions do not affect equilibrium in our case. 2) BioSTEAM uses UNIFAC, specifically the modified Dortmund 2016 interaction parameters. This is available in Aspen and is a good model for biorefineries in general, which to do not work with supercritical components. New models are added to BioSTEAM as needed. 3) Computing activity coefficients is the most computationally burdensome part of VLE (especially when running 10,000+ simulations). In many cases, the effect of activity coefficients is negligible and we can ignore it (just use Raoult's law). I strongly recommend making sure results do not change when using ideal. 4) I do agree that performing VLE by default is a better idea for heat exchangers. Avoiding the need to compute VLE saves computational time, but it should be up to the user. However, we need to keep the default as VLE=False due to dependencies in old biorefineries and for other users. I am open to change the default to True, but a deprecation warning needs to be added first for a couple of months, then we can update the default in BioSTEAM along with all tests (biorefineries included).

VLE is performed in flash vessels, distillation columns, and the fermentor. These objects must always perform VLE and do not have an option not to. The only objects with optional VLE are heat exchangers and mixers. Mixers might perform VLE (even if VLE=False) if it is having trouble solving the energy balance without phase changes.

I am happy to answer questions, especially thoughtful and detailed ones like these. Thanks!

yoelcortes commented 1 year ago

@zasddsgg, I updated my reply, you may want to refresh if you are reading it now. Thanks!

zasddsgg commented 1 year ago

Thank you very much for your answer, which is very helpful to me. I am very sorry that I still have the following questions, may I consult you again.

1) For creating or initializing Stream (https://biosteam.readthedocs.io/en/latest/API/thermosteam/Stream.html), the default setting is not to consider VLE (vlle=False). For Stream, is it more accurate to perfom VLE than not to perfom VLE? When creating stream, should I always add vlle=True? Is the same for heat exchangers and mixers? Is it more accurate to consider VLE than not for heat exchangers and mixers? Should I always add rigorous=True when creating a heat exchanger or mixer?

2) For the creation of Tank, there seems to be no option to set VLE. Does this mean that VLE does not need to be considered when creating a Tank?

3) For PretreatmentReactorSystem, the default setting is run_vle = True (https://biosteam.readthedocs.io/en/latest/API/biorefineries/cellulosic/units.html), does this mean that PretreatmentReactorSystem performs the VLE by default? But why in the alkali pretreatment code, PretreatmentReactorSystem is set to run_vle = False (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/systems/pretreatmen t/alkaline.py)? Is it because whether the VLE is executed or not makes no difference to the result, and so run_vle=False is set to save computation time?

4) For the creation of Reactor, PretreatmentReactorSystem is created with bst. units. design_tools. PressureVessel (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/units.py). Is the PressureVessel designed used to create a reactor? Is Rstoic and RYield reactor also created with PressureVessel for other parts of the process that require a reactor, such as I want to create the Rstoic and RYield reactor equivalent in Aspen. Because I don't seem to find Reactor in the units of Equipment in tutorial (https://biosteam.readthedocs.io/en/latest/API/units/index.html).

5) Last question, I did not seem to find how to set the Henry component in the tutorial. Did biosteam not consider the settings of Henry component?

I'm sorry to have so many questions. May I trouble you again for some answers. Thank you very much. Wish you a good day.

yoelcortes commented 1 year ago

Sure thing:

  1. There is no harm in adding vlle=True or rigorous=True, it just takes more computation time.
  2. The outlet for a tank is the same as the inlet, there is no need to perform VLE. If your inlet to your tank comes from a heat exchanger, mixer, flash vessel, or distillation (or any other unit operation) VLE will have been performed already if needed (optionally for mixers/hx). If you expect some gas to come along with your liquid, you should be using a flash vessel (not a tank) because the gas will make your tank very big (which are sized by residence time).
  3. Your assertions are all correct.
  4. You can create your own Rstoic or Ryield Aspen equivalent by subclassing from PressureVessel and Unit. However, BioSTEAM does have a CSTR class that acts like a pressure vessel with an auxiliary heat exchanger, pump, and a vacuum system if needed (https://biosteam.readthedocs.io/en/latest/API/units/cstr.html).
  5. You can set the vapor pressure model (<Chemical>.Psat) as a constant to simulate a Henry component. The tutorial shows how to set a pure component model with <Chemical>.add_method (https://biosteam.readthedocs.io/en/latest/tutorial/Thermosteam_101.html#Pure-component-chemical-models).

Thanks!

zasddsgg commented 1 year ago

Thank you very much for your answer. I see what you mean. It helps me a lot. Wish you a good day.