1818
1919"""
2020import biosteam as bst
21- from .abstract_stirred_tank_reactor import (
22- AbstractStirredTankReactor ,
23- description_doc ,
24- parameters_doc ,
25- notes_doc ,
26- )
21+ from .abstract_stirred_tank_reactor import AbstractStirredTankReactor
2722from math import pi
2823import numpy as np
2924from scipy .constants import g
3833)
3934
4035class AeratedBioreactor (AbstractStirredTankReactor ):
41- f """
36+ """
4237 Create an aerated bioreactor which satisfies the oxygen mass tranfer
4338 requirement of the mass balance.
4439
@@ -399,9 +394,54 @@ def _design(self):
399394
400395class GasFedBioreactor (AbstractStirredTankReactor ):
401396 """
402- Same as AbstractStirredTankReactor but includes multiple gas feeds. The agitator power may
403- vary to minimize the total power requirement of both the compressor and agitator
404- yet achieve the required oxygen transfer rate.
397+ Create an gas-fed bioreactor which satisfies the substrate mass tranfer
398+ requirement of the mass balance. The gas-fed bioreactor may include
399+ multiple gas feeds. The user-specified `titer` will be satisfied by varying
400+ the flow rates of the `variable_gas_feeds` so long as the
401+ `backward_reactions` are specified. Otherwise, the titer will be estimated
402+ assuming constant gas flow rates.
403+
404+ {description_doc}
405+
406+ Parameters
407+ ----------
408+ gas_substrates :
409+ Substrates within the gas phase.
410+ titer :
411+ Dictionary of substrate/titer pairs [g / L].
412+ backward_reactions :
413+ Backwards reactions to get the substrate mass transfer requirement.
414+ variable_gas_feeds :
415+ Feeds that can be varied to meet mass transfer requirement.
416+ theta :
417+ Fraction of gas substrate saturation in the broth. Defaults to 0.5.
418+ Q_consumption :
419+ Forced duty per gas substrate consummed [kJ/kmol].
420+ optimize_power :
421+ If true, the agitator power is solved to minimize the total power
422+ requirement of both the compressor and agitator such that the
423+ required oxygen transfer rate is met.
424+ design :
425+ Bioreactor design configuration. Valid options include 'Stirred tank'
426+ and 'Bubble column'. Defaults to the former.
427+ method :
428+ Method to calculate the overall mass transfer coefficient, kLa.
429+ Can be a name or a function. Valid method names are listed in
430+ `biosteam.aeration.kLa_methods`.
431+ For stirred tanks, defaults to the 'Riet'.
432+ For bubble columns, defaults to 'Dewes'.
433+ kLa_kwargs:
434+ Additional arguments to pass to the kLa method.
435+ cooler_pressure_drop :
436+ Pressure drop at the cooler [Pa]. Defaults to 20684.28 Pa,
437+ a heuristic value for a gas.
438+ compressor_isentropic_efficiency :
439+ Isentropic efficiency of the compressor. Defaults to 0.85.
440+ {parameters_doc}
441+
442+ Notes
443+ -----
444+ {notes_doc}
405445
406446 Examples
407447 --------
@@ -417,7 +457,7 @@ class GasFedBioreactor(AbstractStirredTankReactor):
417457 ... 'R1', ins=[media, H2, fluegas], outs=('vent', 'product'), tau=68, V_max=500,
418458 ... reactions=rxn, backward_reactions=brxn,
419459 ... gas_substrates=('H2', 'CO2'),
420- ... titer={' AceticAcid': 5} ,
460+ ... titer=dict( AceticAcid=5) ,
421461 ... optimize_power=False,
422462 ... kW_per_m3=0.,
423463 ... )
@@ -479,10 +519,14 @@ def _init(self,
479519 design = None , method = None , kLa_kwargs = None ,
480520 theta = 0.5 , Q_consumption = None ,
481521 cooler_pressure_drop = None ,
522+ compressor_isentropic_efficiency = None ,
482523 # Only for agitated bioreactors (not bubble column)
483524 optimize_power = None ,
484525 ** kwargs ,
485526 ):
527+ if compressor_isentropic_efficiency is None : compressor_isentropic_efficiency = 0.85
528+ #: Isentropic efficiency of the compressor. Defaults to 0.85.
529+ self .compressor_isentropic_efficiency = compressor_isentropic_efficiency
486530 self .cooler_pressure_drop = 20684.28 if cooler_pressure_drop is None else cooler_pressure_drop
487531 self .reactions = reactions
488532 self .backward_reactions = backward_reactions
@@ -562,7 +606,8 @@ def load_auxiliaries(self):
562606 for inlet in self .ins :
563607 if inlet .phase != 'g' : continue
564608 compressor = self .auxiliary (
565- 'compressors' , bst .IsentropicCompressor , inlet , eta = 0.85 , P = 2 * 101325
609+ 'compressors' , bst .IsentropicCompressor , inlet ,
610+ eta = self .compressor_isentropic_efficiency , P = 2 * 101325
566611 )
567612 self .auxiliary (
568613 'gas_coolers' , bst .HXutility , compressor - 0 , T = self .T
0 commit comments