Closed Omotola94 closed 8 months ago
@Omotola94, could you ctrl+paste the code (not images), including all the code used to get the outputs you are getting as well as the output? I need to be able to reproduce what you are seeing.
Thanks,
Ammonia_utility=bst.UtilityAgent('Referigerant', phase= 'g', T= 263.15, P = 101325*3,units=None, thermo = None,T_limit=None, heat_transfer_price =1.32e-05, heat_transfer_efficiency = 1, regeneration_price=0,)
K1 = bst.PolytropicCompressor('K1', ins=Feed, outs = ('Outlet'), P=101325*1.25, eta=0.8, method = 'schultz', vle= False)
@yoelcortes Water_utility=bst.UtilityAgent('cooling_water', phase= 'l', T= 298.15, P = 101325*3,units=None, thermo = None,T_limit=None, heat_transfer_price =1.32e-05, heat_transfer_efficiency = 1, regeneration_price=0, )
i think cooling water automatically becomes a cooling agent when using a cooler.
Just Reading your message well
some issues with the reactor as well
The third issue you mentioned -- the one with the 'label' -- is fixed as of commit 63f2248867751a479d812ab33968692a8cf84c4f. I would suggest pulling the most recent changes to the master branch (git pull origin master).
Thank you ,I have been able to sort that out.
tmo.settings.set_thermo(['Methane', 'Carbon-dioxide','Nitrogen', 'Oxygen',],cache=True)
Feed = tmo.Stream('Feed', Methane= 900, CO2 = 500, Nitrogen=300, Oxygen=200, units ='m3/hr', T=307, P=101325, phase='g') Feed.show(flow ='m3/hr') Feed.cost
Water_utility=bst.UtilityAgent('cooling_water', phase= 'l', T= 298.15, P = 1013253,units=None, thermo = None,T_limit=None, heat_transfer_price =1.32e-05, heat_transfer_efficiency = 1, regeneration_price=0, ) Ammonia_utility=bst.UtilityAgent('Referigerant', phase= 'g', T= 263.15, P = 1013253,units=None, thermo = None,T_limit=None, heat_transfer_price =1.32e-05, heat_transfer_efficiency = 1, regeneration_price=0,)
K1 = bst.PolytropicCompressor('K1', ins=Feed, outs = ('Outlet'), P=101325*1.25, eta=0.8, method = 'schultz', vle= False)
recycle = bst.Stream('Ammonia_recycle') V_recycled= bst.Stream('Vapour_Ammonia')
V1= valve.IsenthalpicValve('V1',ins=recycle, outs = ('Expanded_vapor'), P=101325, vle= 0)
E1 = HXprocess('Evaporator', ins=(K1-0, V1-0), outs=('out_Outlet', V_recycled))
K2 = bst.PolytropicCompressor('K2', ins= V_recycled,outs = ('Compressed_ammonia'), P=101325*3, eta=0.8, method = 'hundseid', vle= False)
C1 = HXprocess('Condenser', ins=(E1-0, K2-0), outs=('Biogas', recycle))
@Omotola94,
Thanks for the clarifications. Please follow the new example in the tutorial for how to remove/add utility agents (it is at the end of the Process settings chapter):
https://biosteam.readthedocs.io/en/latest/tutorial/Getting_started.html#Process-settings
Please follow these instructions for additional help:
Unfortunately, the code you sent does not run. You need to include all imports (including import biosteam as bst
) so that I can ctrl paste the code and reproduce what you are seeing.
When you say "also selecting a compressor type for example blower", what was the output in BioSTEAM and what did you expect to see. Keep in mind that depending which biosteam version (for example, the latest on github or a version in PyPI), we can see different results.
I do not understand what you mean by "some issues with the reactor as well". Please provide a concise explanation of what you expected biosteam to do and clearly show what it actually returned (this could be in a photo or a comment).
As a rule to find the time to help as many users as I can, I do not fill-in any missing code or try to guess what is the error. Here are some examples of issues people post. Note that their code can reproduce what they saw and a concise explanation is included.
https://github.com/BioSTEAMDevelopmentGroup/biosteam/issues/187 https://github.com/BioSTEAMDevelopmentGroup/biosteam/issues/135 https://github.com/BioSTEAMDevelopmentGroup/biosteam/issues/115
Thanks,
@yoelcortes Sorry about the inconvenience, this is the code below attached with the results I am getting
import biosteam as bst from biosteam import main_flowsheet as F
from biosteam import settings import thermosteam as tmo from biosteam import PowerUtility from biosteam import HeatUtility from thermosteam import Stream, Chemical from biosteam import units import warnings
tmo.settings.set_thermo(['Methane', 'Carbon-dioxide','Nitrogen', 'Oxygen',],cache=True) Feed = tmo.Stream('Feed', Methane= 9900, CO2 = 5100, Nitrogen=3000, Oxygen=2000, units ='m3/hr', T=307, P=101325, price=0.305, phase='g') Feed.show(flow ='m3/hr') bst.settings.CEPCI = 790.8 bst.settings.electricity_price = 0.1619
K1 = bst.PolytropicCompressor('K1', ins=Feed, outs = ('Outlet'), P=101325*1.25, eta=0.8, method = 'schultz', vle= False, type = 'blower')
However when the argument "type" is removed and i run code this is the result I get, it defaults to screw.
Thank you
@Omotola94,
This helps a ton. There was an error in the documentation: it should be compressor_type
, not type
. Thanks for letting me know about the bug.
Unfortunately, blowers are still not implemented in biosteam. You'll get the following error if you try "Blower":
ValueError: compressor type 'Blower' not available; only 'Screw', 'Centrifugal', and 'Reciprocating' are available
Fortunately, implementing blowers is not that difficult. I should be able to find the time within the next two weeks.
Thanks,
@yoelcortes Once again sorry for not put out the explanation well
About the reactor it had to with the CSTR operating at an high temperature say 500K, I added a line of code to the compressor code,Attached is the error i got.
K1 = bst.PolytropicCompressor('K1', ins=Feed, outs = ('Outlet'), P=1013251.25, eta=0.8, method = 'schultz', vle= False) R1 = bst.CSTR('R1' , tau = 8, ins = (K1-0) , outs= ('Product'), T = 500, P=1013251.25, vessel_type= 'Horizontal', V_max = 100 )
please what do suggest?
As for the refrigerant, I will make adjustments to that Thank you so much
@Omotola94, Please read the documentation on StirredTankReactor (i.e. CSTR) , it is an abstract class. You need to subclass and define the _run
method to dictate the mass and energy balance. Please read the tutorial for subclassing for detailed instructions.
The code you posted for the new reactor issue does not run (missing imports) and it doesn't actually run the reactor (does not reproduce the error). Additionally, this question is unrelated to your original issue. Please do not stack multiple issues in a single post on github. We can try to figure out your issue, but it will lead to a delayed response. If an issue is too unclear, we simply will ask to clarify (but this leads to more delays).
1) I tried creating ammonia as a cooling agent and adding it but it did not work 2) Also selecting a compressor type for example blower 3) I have issues loading my flow diagram, it brings an a error 'label'