Skip to content

Commit 8e7876b

Browse files
Merge pull request #4461 from HansOlsson/MinPorts
MassFlowSource_T and MassFlowSource_h only work if there are at least one port
2 parents 35ad28d + 260de64 commit 8e7876b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modelica/Fluid/Sources.mo

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ with exception of boundary pressure, do not have an effect.
415415
model MassFlowSource_T
416416
"Ideal flow source that produces a prescribed mass flow with prescribed temperature, mass fraction and trace substances"
417417
import Modelica.Media.Interfaces.Choices.IndependentVariables;
418-
extends Sources.BaseClasses.PartialFlowSource;
418+
extends Sources.BaseClasses.PartialFlowSource(nPorts(min=1));
419419
parameter Boolean use_m_flow_in = false
420420
"Get the mass flow rate from the input connector"
421421
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
@@ -562,7 +562,7 @@ with exception of boundary flow rate, do not have an effect.
562562
model MassFlowSource_h
563563
"Ideal flow source that produces a prescribed mass flow with prescribed specific enthalpy, mass fraction and trace substances"
564564
import Modelica.Media.Interfaces.Choices.IndependentVariables;
565-
extends Sources.BaseClasses.PartialFlowSource;
565+
extends Sources.BaseClasses.PartialFlowSource(nPorts(min=1));
566566
parameter Boolean use_m_flow_in = false
567567
"Get the mass flow rate from the input connector"
568568
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));

0 commit comments

Comments
 (0)