From 260de6487a493d4ac1d06294588b19705e70d7cc Mon Sep 17 00:00:00 2001 From: HOS Date: Thu, 5 Sep 2024 15:15:42 +0200 Subject: [PATCH] These two sources only work if there are at least one port. --- Modelica/Fluid/Sources.mo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modelica/Fluid/Sources.mo b/Modelica/Fluid/Sources.mo index dd0a97999e..553055db43 100644 --- a/Modelica/Fluid/Sources.mo +++ b/Modelica/Fluid/Sources.mo @@ -415,7 +415,7 @@ with exception of boundary pressure, do not have an effect. model MassFlowSource_T "Ideal flow source that produces a prescribed mass flow with prescribed temperature, mass fraction and trace substances" import Modelica.Media.Interfaces.Choices.IndependentVariables; - extends Sources.BaseClasses.PartialFlowSource; + extends Sources.BaseClasses.PartialFlowSource(nPorts(min=1)); parameter Boolean use_m_flow_in = false "Get the mass flow rate from the input connector" annotation(Evaluate=true, HideResult=true, choices(checkBox=true)); @@ -562,7 +562,7 @@ with exception of boundary flow rate, do not have an effect. model MassFlowSource_h "Ideal flow source that produces a prescribed mass flow with prescribed specific enthalpy, mass fraction and trace substances" import Modelica.Media.Interfaces.Choices.IndependentVariables; - extends Sources.BaseClasses.PartialFlowSource; + extends Sources.BaseClasses.PartialFlowSource(nPorts(min=1)); parameter Boolean use_m_flow_in = false "Get the mass flow rate from the input connector" annotation(Evaluate=true, HideResult=true, choices(checkBox=true));