Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consultation about kind setting in uncertainty analysis in BioSTEAM #120

Closed
zasddsgg opened this issue Apr 25, 2024 · 6 comments
Closed

Comments

@zasddsgg
Copy link

zasddsgg commented Apr 25, 2024

Hello, could I ask you some questions about kind setting in uncertainty analysis in BioSTEAM. Thanks for your help. Wish you a good day.

  1. Are the design, coupled and isolated parameters in https://biosteam.readthedocs.io/en/latest/API/evaluation/Parameter.html#:~:text=kind%20(str,in%20any%20way the same as the decision variables, technology parameters, and contextual parameters in the article “BioSTEAM-LCA: An Integrated Modeling Framework for Agile Life Cycle Assessment of Biorefineries under Uncertainty”?

  2. In lactic acid models.py (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L303-L309), solids loading will not only affect the mass and energy balance of the process, but also the unit design, why kind is coupled instead of design?

  3. The different loads (Pretreatment solids loading, Pretreatment sulfuric acid loading, Enzymatic hydrolysis solids loading, Enzyme loading) (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L304-L316, https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L331-L343), the kind are set to coupled, but how does the different loads (Pretreatment solids loading, Pretreatment sulfuric acid loading, Enzymatic hydrolysis solids loading, Enzyme loading) affect the mass and energy balance of the process, including the yield?

  4. For @param(name='Enzymatic hydrolysis time') (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L347), why kind is 'coupled'? Shouldn't the enzymatic hydrolysis time only affect the unit design, how does it affect the energy balance and mass balance?

  5. How do Acidulation time and Enzymatic hydrolysis time affect the mass balance and energy balance of the process (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L411-L416, https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/models.py#L345-L350)? It seems that they only affect the unit design, so should the kind be design?

  6. Which kind=cost (https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#:~:text=of%20reactors%27%2C-,element%3DR301%2C%20kind%3D%27cost%27%2C,-distribution%3Dshape
    ) in the tutorial corresponds to design, coupled, isolated in the API (https://biosteam.readthedocs.io/en/latest/API/evaluation/Parameter.html#:~:text=kind%20(str,in%20any%20way.)?

@yalinli2
Copy link
Member

yalinli2 commented May 4, 2024

  1. No, those two concepts are not related.
    2 and following coupled means the parameter affects mass/energy and design, isolated is usually used when the parameter only affects TEA/LCA.

@yalinli2 yalinli2 closed this as completed May 4, 2024
@zasddsgg
Copy link
Author

zasddsgg commented May 5, 2024

Thank you for your answer. May I ask you the following questions. Thanks for your help. Wish you a good day.

a) In https://biosteam.readthedocs.io/en/latest/API/evaluation/Model.html#biosteam.evaluation.Model.get_distribution_summary:~:text=kind%20(%7B%27coupled%27%2C%20%27isolated%27%2C%20%27design%27%2C%20%27cost%27%7D%2C%20optional)%20%E2%80%93, when do we choose kind=cost?

b) For kind=coupled, will it re-run the system? Is it running the entire process range?
For kind=design, will it re-run the system? Is it running the entire process range?
For kind= isolated, it will not re-run the system, right?

c) When do we use kind=design? that is, only the design is affected, and the mass balance and energy balance are not affected.

d) If it only affects the mass balance and energy balance, but does not affect the design, is the kind chosen as coupled?

e) If I am not sure whether it will affect the design, mass balance and energy balance, is it better to use coupled than design and isolated?

f) For the top questions 3, 4, 5and 6, could I trouble you to look at them?

@yalinli2
Copy link
Member

yalinli2 commented May 5, 2024

a. When the parameter only affects price (i.e., not mass/energy flow).
b. Please see my previous replies on how the resimulation scope is determined.
c. Yes
d. Yes.
e. Yes.
Top 3. Loading affects mass.
Top 4 and 5. I think it can be changed to design. When the lactic acid module was developed, the design option was not available.
Top 6. cost is a different option, @yoelcortes maybe the doc should be updated?

@yoelcortes
Copy link
Member

yoelcortes commented May 5, 2024

@yalinli2, @zasddsgg,

Parameter kind='cost' and kind='design' are the same. Regardless if you pass 'cost' or 'design', both the design and cost algorithms are rerun when the parameter is simulated. Long ago, they meant different things, but the decision was made to simplify it. This was necessary because of how many times it is not possible to decouple design from costing (e.g., some new unit operations need to optimize their design to minimize cost). I will update the documentation to note that 'design' and 'cost' mean the same thing and both options are kept for backwards compatibility.

Update
@yalinli2 , sorry I forgot to update you regarding this change:
When running <Model>.evaluate() the complete system always simulates regardless of what kinds of parameters it has ('coupled', 'isolated', or 'design'; it does not matter).

The only time the choice of 'coupled', 'isolated', vs. 'design' comes into play is when:

I will update the documentation to make this more clear later today.

@zasddsgg, for your purposes, don't worry about the kind argument... there is no need to pass any value.

@yalinli2
Copy link
Member

yalinli2 commented May 5, 2024 via email

@zasddsgg
Copy link
Author

zasddsgg commented May 6, 2024

I got it. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants