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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Simulation file:
Try
after setting the overall molar composition.
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.
Thanks, works now. Awesome support.
This should be done automatically now: https://github.com/DanWBR/dwsim4/commit/74ab89af936686e79cbd21942cc9bf9af579bf90
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?
This happens while saving or solving the flowsheet?
It happens when solving. I can save it without any issues.
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