Menu

Component losses in custom UO

Chris Shea
2017-01-25
2017-01-25
  • Chris Shea

    Chris Shea - 2017-01-25

    I am attempting to model some empirical correlations for a biomass process in a custom UO. I modified the flowsheet to the basics and will attach it below.

    Inside the custom UO I am specifying (the model uses empirical correlations but the example is just hard coded) the mass flow, temperture, pressure and mole fractions of Stream 4 (called New_Stream on the flowsheet). When I calculate the flowsheet, Stream 4 gets most properties but when I look at Compounds -> Amounts -> Mass Flows under the Mixture tab all values are zero but in the Vapor tab I get good mass flow numbers. There is no Liquid tab.

    I then send this stream to a mixer and the resultant mixed stream is missing the specified compounds in Stream 4. It seems that overall mass is conserved but when I look at the Mixed stream Compounds -> Amounts -> Mass Flows the numbers are differnent for Mixture and Vapor with no liquid phase. When I look at mole flow or mole fraction the numbers are the same for the Mixture and Vapor tabs

    Any help on why this is happening would be appreciated.

     
  • Chris Shea

    Chris Shea - 2017-01-25

    Simulation file:

     
  • Daniel Medeiros

    Daniel Medeiros - 2017-01-25

    Try

    outlet4.CalcOverallCompMassFractions()
    

    after setting the overall molar composition.

     
  • Daniel Medeiros

    Daniel Medeiros - 2017-01-25

    Mass fractions are not automatically calculated when you set the mole fractions... maybe I should change that...

    You could try using the original variable names (oms1, oms2, oms3...), you'll get some basic intellisense if you do so. Will make your life easier.

     
  • Chris Shea

    Chris Shea - 2017-01-25

    Thanks, works now. Awesome support.

     
  • Chris Shea

    Chris Shea - 2017-01-25

    I'm intergarting this into an existing flowsheet with a convesion reactor (CatOx) that I know works and I'm now getting this error on the reactor when I replace one of the reactor feed streams with the output of the custom UO:

    CatOx: Type 'Microsoft.Scripting.Hosting.ScriptEngine' in Assembly 'Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e' is not marked as serializable

    Any thoughts?

     
  • Daniel Medeiros

    Daniel Medeiros - 2017-01-25

    This happens while saving or solving the flowsheet?

     
  • Chris Shea

    Chris Shea - 2017-01-25

    It happens when solving. I can save it without any issues.

     
  • Daniel Medeiros

    Daniel Medeiros - 2017-01-25

    Add a dummy unit operation (i.e. valve) between the inlet stream and the reactor itself. This should work until a fix is available on the next release.

     

    Last edit: Daniel Medeiros 2017-01-25
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.