BioSTEAMDevelopmentGroup / Bioindustrial-Park

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

Inquiry about flow calculation of cooling water, low pressure steam, chilled water #139

Closed zasddsgg closed 1 week ago

zasddsgg commented 1 week ago

Hello, could I consult you how to calculate the flow of cooling water, low-pressure steam, and chilled water from their duty? The figure below shows the results of TEA in the cellulosic model. It seems that the flow of cooling water is more appropriately calculated using m=duty/Cp/(temperature change of cooling water). 1

yoelcortes commented 1 week ago

@zasddsgg,

It's a little more complex than that. First, you need to take into account the heat transfer efficiency. Then, if the utility agent uses sensible heat (like cooling water; not latent like steam) you need to find the pinch point temperature between the process and utility stream. If the pinch point temperature crosses the set temperature limit of the utility agent (e.g., cooling water should not get exceedingly hot), then the temperature limit of the utility agent is used. Lastly the flow of the utility is found using an energy balance directly m = duty / (h_out - h_in), note that this is more exact because it does not assume a constant heat capacity. This calculation is performed for every utility. You can find the code in https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/25e0a96e9192408bfed19607a1ec447166eeaaad/biosteam/_heat_utility.py#L638.

Thanks,

zasddsgg commented 1 week ago

Thanks for your answer.

a) In my own process, I buy cooling water and chilled water by myself, and the price unit is USD/ton. Is my following setting correct?

bst.settings.get_agent('cooling_water').heat_transfer_price = 0
bst.settings.get_agent('cooling_water').regeneration_price = 0.5
bst.settings.get_agent('chilled_water').heat_transfer_price = 0
bst.settings.get_agent('chilled_water').regeneration_price = 0.6

b) Does the flow calculated by m = duty/(h_out-h_in) refer to the flow of cooling water, chilled water, low pressure steam, medium pressure steam, high pressure steam in the Utilities data table in the exported excel as in the following picture (https://biosteam.readthedocs.io/en/latest/_modules/biosteam/_heat_utility.html#UtilityAgent:~:text=%23%23%20Calculate%20utility%20requirement%20%23%23,phase%20%3D%20%27l%27)? The flow get this way is more accurate than the flow get by m=duty/Cp/(temperature change of cooling water), right? 1

c) In my own process, I purchase cooling water and chilled water by myself. Therefore, by multiplying the flow of cooling water and chilled water in the Utilities data table in exported excel by the regeneration price set in the codes, then we get the cost of cooling water and chilled water in the process, right?

bst.settings.get_agent('cooling_water').heat_transfer_price = 0
bst.settings.get_agent('cooling_water').regeneration_price = 0.5
bst.settings.get_agent('chilled_water').heat_transfer_price = 0
bst.settings.get_agent('chilled_water').regeneration_price = 0.6

d) In my own process, I purchased cooling water and chilled water by myself, and got T_limit 310.15K through bst.settings.get_agent('cooling_water').T_limit. But https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/25e0a96e9192408bfed19607a1ec447166eeaaad/biosteam/_heat_utility.py#L638 is 325K. So in my own process, do I need to set the following parameters in the tutorial(https://biosteam.readthedocs.io/en/latest/API/UtilityAgent.html#:~:text=class%20UtilityAgent(ID%3D%27%27%2C%20phase%3D%27l%27%2C%20T%3D298.15%2C%20P%3D101325.0%2C%20units%3DNone%2C%20thermo%3DNone%2C%20T_limit%3DNone%2C%20heat_transfer_price%3D0.0%2C%20regeneration_price%3D0.0%2C%20heat_transfer_efficiency%3D1.0%2C%20**chemical_flows), or just set the price through the code below, do not need to set the other parameters by additional codes, just keep them default?

bst.settings.get_agent('cooling_water').heat_transfer_price = 0
bst.settings.get_agent('cooling_water').regeneration_price = 0.5
bst.settings.get_agent('chilled_water').heat_transfer_price = 0
bst.settings.get_agent('chilled_water').regeneration_price = 0.6

e) If I produce steam through the boiler by purchasing natural gas, I just set the regeneration price and heat transfer price of each steam (low pressure, medium pressure, high pressure) to 0 by using the following code, is it OK? Is it OK to keep the other parameters as default (https://biosteam.readthedocs.io/en/latest/API/UtilityAgent.html#:~:text=class%20UtilityAgent(ID%3D%27%27%2C%20phase%3D%27l%27%2C%20T%3D298.15%2C%20P%3D101325.0%2C%20units%3DNone%2C%20thermo%3DNone%2C%20T_limit%3DNone%2C%20heat_transfer_price%3D0.0%2C%20regeneration_price%3D0.0%2C%20heat_transfer_efficiency%3D1.0%2C%20**chemical_flows)), that is to say, not set the other parameters by additional codes?

bst.settings.get_agent('low_pressure_steam').heat_transfer_price = 0
bst.settings.get_agent('low_pressure_steam').regeneration _price = 0
bst.settings.get_agent('medium_pressure_steam').heat_transfer_price = 0
bst.settings.get_agent(medium_pressure_steam').regeneration _price = 0
bst.settings.get_agent('high_pressure_steam').heat_transfer_price = 0
bst.settings.get_agent('high_pressure_steam').regeneration _price = 0