# based on wood as an approximiation [4]. Also, assume # structural carbohydrates have the same heat of combustion # as cellulose. # These properties match NREL's Hc_lignin = 21e3 # (J/g) Hc_cellulosic = 17000 # (J/g) cal2joule = 4.184 # %% Initialize species object and define functions lcspecies = bst.Species.tospecies([ *lcspecies.biodiesel_species, *lcspecies.ethanol_species, *lcspecies.pretreatment_species ]) sp = bst.Species() def remove(ID): try: missing.remove(ID) except ValueError: raise ValueError(f"'{ID}' not a required species") def addspecies(*IDs, cls=None, **kwargs): if cls is None: cls = bst.Chemical sp.extend([cls(i, **kwargs) for i in IDs]) for ID in IDs: remove(ID)
# bst.Stream.default_ID_number = 500 M501 = bst.Mixer('M501', ins=(S603 - 1, S401 - 0)) BT = bst.facilities.BoilerTurbogenerator('BT', ins=M501 - 0, turbogenerator_efficiency=0.85) BT.outs[1].T = 373.15 BT.cost_items['Turbogenerator'].n = 0.6 # bst.Stream.default_ID_number = 700 CWP = bst.facilities.ChilledWaterPackage('CWP') CT = bst.facilities.CoolingTower('CT') CT.outs[1].T = 273.15 + 28 process_water = bst.Stream(ID='process_water', species=bst.Species('Water')) # flow # index process_water_data = ((caustic.mol, caustic.index('Water')), (stripping_water.mol, stripping_water.index('Water')), (warm_process_water.mol, warm_process_water.index('Water')), (steam.mol, steam.index('Water')), (BT.outs[1].mol, BT.outs[1].index('Water')), (CT.outs[1].mol, CT.outs[1].index('Water'))) def update_water_loss(): process_water.mol[0] = sum([i[j] for i, j in process_water_data])