BioSTEAMDevelopmentGroup / Bioindustrial-Park

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

Requests for error that cannot solve for pressure yet #60

Closed zasddsgg closed 1 year ago

zasddsgg commented 1 year ago
     Hello, when I called class PretreatmentReactorSystem, I changed self.reactions.adiabatic_reaction(liquid) in the code to self.reactions(liquid) (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/units.py). At the same time, I added V=0 in def __init__(self, ID='', ins=None, outs=(), T=130+273.15, V=0, thermos=None, tau=0.166, V_wf=0.8, length_to_diameter=2, vessel_material='Stainless steel 316', vessel_type='Horizontal',reactions=None, run_vle=True) and added self.V = V after self.T = T. 
     Because I want the gas fraction of the outlet stream to be zero, and I don't want the reaction to be adiabatic (I want to look at the heat duty of the pretreatment reaction). But when I do that, an error (NotImplementedError: <PretreatmentReactorSystem: R201> cannot solve for pressure yet) was reported. I analyzed the reason, it’s because that dH_bubble = (H - H_bubble) if dH_bubble <= 0:

raise NotImplementedError('cannot solve for pressure yet') was set in the VLE source code (https://biosteam.readthedocs.io/en/latest/_modules/thermosteam/equilibrium/vle.html#). Does that mean that when having an exothermic reaction, an error that cannot solve for pressure yet was reported? Because I want to see the heat duty of the actual pretreatment (not necessarily 0), I don't want to set the reaction under adiabatic condition. But if I don't set the adiabatic, the above error will be reported. May I ask if you have any solution for that. Thank you very much. Wish you a good day.