New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MassFlowSource_T with 2 ports does not balance flow among port[1]+port[2] #739
Comments
Comment by fcasella on 26 Mar 2009 00:16 UTC Conversely, the semantics of a flow source with multiple connectors is more ambiguous, as Michael's remark shows. I would resemble it to a sort of ideal volumetric pump with an outlet header having many flanges, so for me it is obvious that the prescribed flow is just the sum of all the flows which are going out of the ideal source, and that the pressures of all of those ports have to be equal. Michael's interpretation is instead a bunch of parallel pumps, each with one N-th of the total flow, and thus each having a different pressure. In my view, the most obvious semantics is the first one, because there is just one source (even though it might have multiple ports). Maybe the documentation should be improved to make it clear. Comments? |
Comment by mwetter on 26 Mar 2009 04:42 UTC First, regarding the semantics, what led me to my interpretation (ideal parallel flow sources) of the semantics is the vector FluidPorts_b, which caused me to believe that there is no mixing between the fluid streams. Isn't that what we try to convene when using this graphical annotation? I suggest -- if we go with Francesco's interpretation of the semantics -- to use a FluidPort_b (no vector) because we want the user to think that there is mixing in the port, and to update the documentation. Second, regarding the bug, check the attached TestSources2PortsTotalVersion2.mo. |
Comment by fcasella on 9 May 2012 14:46 UTC |
Modified by fcasella on 9 May 2012 14:55 UTC |
Modified by rfranke on 21 Jan 2013 09:02 UTC |
Changelog removed by rfranke on 21 Jan 2013 09:02 UTC |
Comment by rfranke on 21 Jan 2013 10:42 UTC This is why SVN e9d8473 introduces the new base class Moreover an assertion has been added to ensure that there is at most one connection with fluid flow:
All examples and tests are running without change. If someone has made a model using a MassFlowSource with more than one connection with fluid flow, then this model has wrong energy and substance balances. The new assertion would fail and the model needs revisal. The attached screen shot of Once MSL_withConversionScript will be available (hopefully soon), also the implementation could be changed from vector |
Reported by mwetter on 25 Mar 2009 22:53 UTC
If MassFlowSource_T is used with nPorts=2, then
ports[1].m_flow is not equal to ports[2].m_flow.
I expect the behavior
ports[1].m_flow = ports[2].m_flow = m_flow/nPorts.
The attached total model shows a configuration in which
m_flow = 0.1 kg/s
ports[1].m_flow = 1.0 kg/s
ports[2].m_flow = -1.1 kg/s
The root cause seems to be that the model only specifies
sum(ports.m_flow) = -m_flow_in_internal;
which does not guarantee equality of the flows in the ports.
Migrated-From: https://trac.modelica.org/Modelica/ticket/739
The text was updated successfully, but these errors were encountered: