-
-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Location: Vessel.vb, RunDynamicModel(),
this is code that needs to be fixed
For i = 0 To 5
If Me.GraphicObject.InputConnectors(i).IsAttached Then
Dim imsx = GetInletMaterialStream(i)
If imsmix Is Nothing Then imsmix = imsx.CloneXML
imsmix = imsmix.Add(imsx)
End If
Next
Problem: The first inlet stream is added twice:
- First: imsmix = imsx.CloneXML (contains stream 1)
- Then: imsmix = imsmix.Add(imsx) (adds stream 1 AGAIN)
Evidence: Material balance around separator consistently shows
outlet/inlet ratio of 2.00xxx (within numerical tolerance).
Fix: Add Else clause to only Add() subsequent streams, not the first one.
I noticed the recent commit (10 days ago) attempted to address this but
accidentally made it worse by adding a third addition. The fix is
straightforward - happy to submit a PR if helpful.
This bug affects all dynamic separator simulations and breaks fundamental
material balance.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working