BioSTEAMDevelopmentGroup / BioSTEAMDevelopmentGroup/Bioindustrial-Park

Consultation about SSCF calling

Open
#132 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
53
Forks
27
PR merge metrics
No merged PRs in 30d

Description

a) Hello, when I try to call ```SSCF```, I will encounter the following error, could I ask you how to solve it? There is no error when calling ```kind= "SCF"``` or ```kind= "IB"```.

The code is as follows.
```
from biorefineries import cellulosic
import biosteam as bst
bst.nbtutorial()
cs = cellulosic.Biorefinery('corn stover ethanol')
chemicals = cs.chemicals
bst.settings.set_thermo(chemicals)
Feedstock = bst.Stream(
ID='Feedstock',
price=0.0516,
total_flow=1000,
units='kg/hr',
Glucose=1,
)
fermentation_sys = cellulosic.create_cellulosic_fermentation_system(
ins=Feedstock,
mockup=True,
kind="SSCF"
)
```
The error information is as follows.
```
TypeError Traceback (most recent call last)
Cell In[5], line 17
7 bst.settings.set_thermo(chemicals)
9 Feedstock = bst.Stream(
10 ID='Feedstock',
11 price=0.0516,
(...)
14 Glucose=1,
15 )
---> 17 fermentation_sys = cellulosic.create_cellulosic_fermentation_system(
18 ins=Feedstock,
19 mockup=True,
20 kind="SSCF"
21 )

File D:\anaconda\envs\zddd\lib\site-packages\biosteam\process_tools\system_factory.py:254, in SystemFactory.__call__(self, ID, ins, outs, mockup, area, udct, autorename, operating_hours, lang_factor, algorithm, method, maxiter, molar_tolerance, relative_molar_tolerance, temperature_tolerance, relative_temperature_tolerance, **kwargs)
243 rename = area is not None
244 options = dict(
245 ID=ID or self.ID,
246 operating_hours=operating_hours,
(...)
252 relative_temperature_tolerance=relative_temperature_tolerance,
253 )
--> 254 with (bst.MockSystem() if mockup else bst.System(**options)) as system:
255 if rename:
256 unit_registry = system.flowsheet.unit

File D:\anaconda\envs\zddd\lib\site-packages\biosteam\_system.py:557, in MockSystem.__exit__(self, type, exception, traceback)
555 dump = unit_registry.close_context_level()
556 self.units = dump
--> 557 if exception: raise exception

File D:\anaconda\envs\zddd\lib\site-packages\biosteam\process_tools\system_factory.py:259, in SystemFactory.__call__(self, ID, ins, outs, mockup, area, udct, autorename, operating_hours, lang_factor, algorithm, method, maxiter, molar_tolerance, relative_molar_tolerance, temperature_tolerance, relative_temperature_tolerance, **kwargs)
257 irrelevant_units = tuple(unit_registry)
258 unit_registry.untrack(irrelevant_units)
--> 259 self.f(ins, outs, **kwargs)
260 system.load_inlet_ports(ins, {k: i for i, j in enumerate(self.ins) if (k:=get_name(j)) is not None})
261 system.load_outlet_ports(outs, {k: i for i, j in enumerate(self.outs) if (k:=get_name(j)) is not None})

File D:\anaconda\envs\zddd\lib\site-packages\biorefineries\cellulosic\systems\fermentation\general_interface.py:238, in create_cellulosic_fermentation_system(ins, outs, include_scrubber, solids_loading, insoluble_solids_loading, nonsolids, insoluble_solids, kind, Saccharification, ContinuousPresaccharification, SeedTrain, CoFermentation, SaccharificationAndCoFermentation, saccharification_reactions, seed_train_reactions, cofermentation_reactions, add_nutrients)
236 elif kind in ('SSCF', 'Simultaneous Saccharification and Co-Fermentation'):
237 outs.remove(lignin)
--> 238 create_simultaneous_saccharification_and_cofermentation_system(
239 ins=[saccharification_sys-0, DAP, CSL],
240 outs=[vent, beer],
241 mockup=True,
242 include_scrubber=include_scrubber,
243 seed_train_reactions=seed_train_reactions,
244 cofermentation_reactions=cofermentation_reactions,
245 add_nutrients=add_nutrients,
246 )
247 elif kind in SCF_keys:
248 T303 = bst.StorageTank('T303', saccharification_sys-0, tau=4)

File D:\anaconda\envs\zddd\lib\site-packages\biosteam\process_tools\system_factory.py:254, in SystemFactory.__call__(self, ID, ins, outs, mockup, area, udct, autorename, operating_hours, lang_factor, algorithm, method, maxiter, molar_tolerance, relative_molar_tolerance, temperature_tolerance, relative_temperature_tolerance, **kwargs)
243 rename = area is not None
244 options = dict(
245 ID=ID or self.ID,
246 operating_hours=operating_hours,
(...)
252 relative_temperature_tolerance=relative_temperature_tolerance,
253 )
--> 254 with (bst.MockSystem() if mockup else bst.System(**options)) as system:
255 if rename:
256 unit_registry = system.flowsheet.unit

File D:\anaconda\envs\zddd\lib\site-packages\biosteam\_system.py:557, in MockSystem.__exit__(self, type, exception, traceback)
555 dump = unit_registry.close_context_level()
556 self.units = dump
--> 557 if exception: raise exception

File D:\anaconda\envs\zddd\lib\site-packages\biosteam\process_tools\system_factory.py:259, in SystemFactory.__call__(self, ID, ins, outs, mockup, area, udct, autorename, operating_hours, lang_factor, algorithm, method, maxiter, molar_tolerance, relative_molar_tolerance, temperature_tolerance, relative_temperature_tolerance, **kwargs)
257 irrelevant_units = tuple(unit_registry)
258 unit_registry.untrack(irrelevant_units)
--> 259 self.f(ins, outs, **kwargs)
260 system.load_inlet_ports(ins, {k: i for i, j in enumerate(self.ins) if (k:=get_name(j)) is not None})
261 system.load_outlet_ports(outs, {k: i for i, j in enumerate(self.outs) if (k:=get_name(j)) is not None})

TypeError: create_simultaneous_saccharification_and_cofermentation_system() got an unexpected keyword argument 'cofermentation_reactions'
```

b) Could I ask you what is the difference betweem ```mockup=True``` and ```mockup=False``` when calling above ```fermentation_sys```, does ```mockup=True``` or ```mockup=False``` make any difference to the result (simulation result, TEA result, LCA result).

c) In addition, could I ask you what is the difference between ```SaccharificationAndCoFermentation``` (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/units.py#L511) and ```SimultaneousSaccharificationAndCoFermentation``` (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/units.py#L620)? It seems that both units are Saccharification and CoFermentation occurring simultaneously.

Thanks for your help. Wish you a good day.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.