You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have been trying to work on a xylitol biorefinery using yeast. However, every time I call the 'Fermentation' unit the program uses the by default hydrolysis reaction in the 'NRELBioreactor.py'. How do I replace the reactions in the code for the xylitol biorefinery? Here's what I have been trying so far:
Hello,
I have been trying to work on a xylitol biorefinery using yeast. However, every time I call the 'Fermentation' unit the program uses the by default hydrolysis reaction in the 'NRELBioreactor.py'. How do I replace the reactions in the code for the xylitol biorefinery? Here's what I have been trying so far:
Code:
R301 = units.Fermentation ('R301',M101-0, outs=('CO2', ''), tau=9, efficiency=0.90, N=4)
def _init(self, tau, N=None, V=None, T=305.15, P=101325., Nmin=2, Nmax=36,
efficiency=None, iskinetic=False, fermentation_reaction=None,
cell_growth_reaction=None):
R301._init(self, tau=tau, N=N, V=V, T=T, P=P, Nmin=Nmin, Nmax=Nmax)
self._load_components()
self.iskinetic = iskinetic
chemicals = self.chemicals
self.hydrolysis_reaction = Reaction('Xylose -> Xylitol', 'Xylose', efficiency, chemicals)
if fermentation_reaction is None:
if efficiency is None: efficiency = 0.9
fermentation_reaction = Reaction('Xylose -> Xylitol', 'Xylose', efficiency, chemicals, basis='wt')
else:
efficiency = fermentation_reaction.X
self.fermentation_reaction = fermentation_reaction
if cell_growth_reaction is None:
cell_growth_reaction = Reaction('Xylose -> Yeast', 'Xylose', 0.70, chemicals, basis='wt')
cell_growth_reaction.basis = 'mol'
self.cell_growth_reaction = cell_growth_reaction
self.efficiency = efficiency
Output:
Traceback (most recent call last):
Cell In[7], line 1
R301 = units.Fermentation ('R301',M101-0, outs=('CO2', ''), tau=9, efficiency=0.90, N=4)
File ~\AppData\Local\anaconda3\Lib\site-packages\biosteam_unit.py:390 in init
super().init(ID, ins, outs, thermo, **kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\thermosteam\network.py:1038 in init
self._init(**kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\biosteam\units\nrel_bioreactor.py:372 in _init
self.hydrolysis_reaction = Reaction('Sucrose + Water -> 2Glucose', 'Sucrose', 1.00, chemicals)
File ~\AppData\Local\anaconda3\Lib\site-packages\thermosteam\reaction_reaction.py:314 in init
self._stoichiometry = prs.get_stoichiometric_array(reaction, chemicals)
File ~\AppData\Local\anaconda3\Lib\site-packages\thermosteam\reaction_parse.py:26 in get_stoichiometric_array
stoichiometric_array = dct2arr(stoichiometry_dict, chemicals)
File ~\AppData\Local\anaconda3\Lib\site-packages\thermosteam\reaction_parse.py:50 in dct2arr
raise UndefinedChemical(ID)
UndefinedChemicalAlias: 'Sucrose'
The text was updated successfully, but these errors were encountered: