Giter Club home page Giter Club logo

Comments (4)

yalinli2 avatar yalinli2 commented on August 28, 2024 1

Great, thanks! I'll close this off.

from biosteam.

yoelcortes avatar yoelcortes commented on August 28, 2024

It's not too hard to change an existing biorefinery configuration:

>>> from biosteam.biorefineries.cornstover import system
>>> import biosteam as bst
>>> # Find saccharification and co-fermentation unit operation
>>> R301 = bst.find('R301') 
>>> # Create instance with the same input and output streams
>>> R301 = NewUnitOperationSubclass(ID=R301.ID, ins=R301.ins, outs=R301.outs) 

However, the System and TEA objects would need to be recreated for the biorefinery. One workaround for this is to (instead) cast the existing unit operation to another unit operation:

>>> # This workaround is NOT recommended
>>> R301.__class__ = NewUnitOperationSubclass

But this may present odd problems later, and I do not recommend it. Preferably, its best if you copy the biosteam.biorefinery.cornstover.system script, and replace the line where R301 is created. Because this represents a new configuration, I also recommend setting the flowsheet name at the start of the script:

>>> new_flowsheet = bst.Flowsheet('cornstover_with_new_fermentation_model')
>>> bst.find.set_flowsheet(new_flowsheet )

Hope this helps!

from biosteam.

yalinli2 avatar yalinli2 commented on August 28, 2024

Thanks for the help! I agree it'll be easier to copy the script and change what I need to.
A side question - is the "NewUnitOperationSubclass" a really function or you just used it to indicate whatever new unit I want to create?

from biosteam.

yoelcortes avatar yoelcortes commented on August 28, 2024

"NewUnitOperationSubclass" just indicates the unit you'd like to create :)

from biosteam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.