Skip to content
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

MassFlowSources require nPorts>=1 #2281

Closed
wants to merge 1 commit into from

Conversation

HansOlsson
Copy link
Contributor

@HansOlsson HansOlsson commented Jul 19, 2017

Underlying issue: If the mass flow source has nPorts=0 (the default) the model is singular (since the mass-flow is given in some way and also zero since there is nothing connected). Note that the other fluid-boundary elements do not have this restriction, and flow-sources in other domains at least have the connector-elements.

In general this can be complicated to detect - but in this case we can just set a minimum for nPorts to document that the model requires nPorts>=1 (the actual value of nPorts should be indirectly set by connecting to the ports), and help tools test this model and detect when it is used incorrectly. That's what I did.

It might be that this modifier should be on the original declaration in PartialFlowSource instead, and/or that an assertion would be clearer.

@HansOlsson HansOlsson added L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) enhancement New feature or enhancement labels Jul 19, 2017
@beutlich beutlich added this to the MSL_next-MINOR-version milestone Sep 18, 2017
@beutlich
Copy link
Member

@casella Any comment on this?

@beutlich beutlich closed this Jan 21, 2018
@beutlich beutlich reopened this Jan 21, 2018
@beutlich beutlich removed the request for review from casella January 21, 2018 11:43
@beutlich beutlich modified the milestones: MSL3.2.3, never Jun 3, 2018
@HansOlsson HansOlsson deleted the ConnectBoundary branch April 8, 2020 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants