diff --git a/ThermofluidStream/Boundaries/DynamicPressureInflow.mo b/ThermofluidStream/Boundaries/DynamicPressureInflow.mo index 216307fa..4e60f983 100644 --- a/ThermofluidStream/Boundaries/DynamicPressureInflow.mo +++ b/ThermofluidStream/Boundaries/DynamicPressureInflow.mo @@ -25,8 +25,8 @@ model DynamicPressureInflow "Extension of (p,T) source to (p,T,velocity)" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter Boolean displayOutletArea = true "= true, if outlet cross section area A_par is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "= true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean dv_in = displayParameters and not velocityFromInput and displayInletVelocity "Display inlet velocity" annotation(Evaluate=true, HideResult=true); final parameter Boolean displayA = displayParameters and displayOutletArea and not areaFromInput "Display outlet cross section area" @@ -38,18 +38,10 @@ model DynamicPressureInflow "Extension of (p,T) source to (p,T,velocity)" compressibilityString elseif displayA then "A_out = %A_par" - elseif displayInertance then - "L = %L" else "" annotation(Evaluate=true, HideResult=true); final parameter String displayPos2= if displayCompressibilityApproach and displayA then "A_out = %A_par" - elseif displayInertance and not displayPos1 == "L = %L" then - "L = %L" - else "" annotation(Evaluate=true, HideResult=true); - final parameter String displayPos3= - if displayCompressibilityApproach and displayA and displayInertance then - "L = %L" else "" annotation(Evaluate=true, HideResult=true); //---------------------------------------------------------------- @@ -70,6 +62,11 @@ protected SI.Velocity v_mean "Mean velocity"; SI.Velocity delta_v "Velocity difference"; +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(A_var, A); @@ -121,10 +118,6 @@ equation extent={{-150,-140},{150,-170}}, textColor={0,0,0}, textString=displayPos2), - Text(visible=displayParameters, - extent={{-150,-180},{150,-210}}, - textColor={0,0,0}, - textString=displayPos3), Text(visible=dv_in, extent={{-210,-45},{-10,-75}}, textColor={0,0,0}, diff --git a/ThermofluidStream/Boundaries/DynamicPressureOutflow.mo b/ThermofluidStream/Boundaries/DynamicPressureOutflow.mo index 1e2cfb20..0c5943e4 100644 --- a/ThermofluidStream/Boundaries/DynamicPressureOutflow.mo +++ b/ThermofluidStream/Boundaries/DynamicPressureOutflow.mo @@ -25,8 +25,8 @@ model DynamicPressureOutflow "Extension of (p) sink to (p,velocity)" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter Boolean displayOutletVelocity = true "= true, if outlet velocity v_out_par is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "= true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean displayA = displayParameters and displayInletArea and not areaFromInput annotation(Evaluate=true, HideResult=true); final parameter Boolean dv_out = displayParameters and displayOutletVelocity and not velocityFromInput @@ -38,20 +38,11 @@ model DynamicPressureOutflow "Extension of (p) sink to (p,velocity)" compressibilityString elseif displayA then "A_in = %A_par" - elseif displayInertance then - "L = %L" else "" annotation(Evaluate=true, HideResult=true); final parameter String displayPos2= if displayCompressibilityApproach and displayA then "A_in = %A_par" - elseif displayInertance and not displayPos1 == "L = %L" then - "L = %L" - else "" - annotation(Evaluate=true, HideResult=true); - final parameter String displayPos3= - if displayCompressibilityApproach and displayA and displayInertance then - "L = %L" else "" annotation(Evaluate=true, HideResult=true); //---------------------------------------------------------------- @@ -74,6 +65,11 @@ protected Medium.Density rho_out "Outlet density"; Medium.Density rho_mean "Mean density"; +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(A_var, A); if not areaFromInput then @@ -123,10 +119,6 @@ equation extent={{-150,-140},{150,-170}}, textColor={0,0,0}, textString=displayPos2), - Text(visible=displayParameters, - extent={{-150,-180},{150,-210}}, - textColor={0,0,0}, - textString=displayPos3), Text(visible=dv_out, extent={{210,-45},{15,-75}}, textColor={0,0,0}, diff --git a/ThermofluidStream/Boundaries/Sink.mo b/ThermofluidStream/Boundaries/Sink.mo index c4428c63..e76af8dc 100644 --- a/ThermofluidStream/Boundaries/Sink.mo +++ b/ThermofluidStream/Boundaries/Sink.mo @@ -21,19 +21,13 @@ the outlet the sink is connected to. // ------ Parameter Display Configuration ------------------------ parameter Boolean displayPressure = true "= true, if pressure p0_par is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not pressureFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "= true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean displayP = displayPressure and not pressureFromInput annotation(Evaluate=true, HideResult=true); final parameter String displayPos1= if displayP then "p = %p0_par" - elseif displayInertance then - "L = %L" - else ""; - final parameter String displayPos2= - if displayP and displayInertance then - "L = %L" else ""; //----------------------------------------------------------------- @@ -47,6 +41,11 @@ protected SI.Pressure r "Inertial pressure"; Medium.AbsolutePressure p = Medium.pressure(inlet.state) "Steady state pressure"; +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(p0_var, p0); if not pressureFromInput then @@ -68,10 +67,6 @@ equation extent={{-150,-90},{150,-120}}, textColor={0,0,0}, textString=displayPos1), - Text(visible=displayParameters, - extent={{-150,-130},{150,-160}}, - textColor={0,0,0}, - textString=displayPos2), Rectangle( extent={{-56,76},{4,-84}}, lineColor={28,108,200}, diff --git a/ThermofluidStream/Boundaries/Source.mo b/ThermofluidStream/Boundaries/Source.mo index e6e7190c..a66970eb 100644 --- a/ThermofluidStream/Boundaries/Source.mo +++ b/ThermofluidStream/Boundaries/Source.mo @@ -41,8 +41,8 @@ the inlet the source is connected to. annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not xiFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); // parameter Boolean displayTemperatureOrEnthalpy = true "= true, if temperature T0_par or specific enthalpy h0_par is displayed" // annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not temperatureFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "= true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean displayP = displayPressure and not pressureFromInput annotation(Evaluate=true, HideResult=true); final parameter Boolean displayT = displayTemperature and not temperatureFromInput and not setEnthalpy @@ -61,8 +61,6 @@ the inlet the source is connected to. "h = %h0_par" elseif displayXi then "Xi = %Xi0_par" - elseif displayInertance then - "L = %L" else ""; final parameter String displayPos2= if displayP and displayT then @@ -71,19 +69,11 @@ the inlet the source is connected to. "h = %h0_par" elseif displayXi and (displayP or displayT or displayH) then "Xi = %Xi0_par" - elseif displayInertance and (displayP or displayT or displayH or displayXi) then - "L = %L" else ""; final parameter String displayPos3= if displayXi and displayP and (displayT or displayH) then "Xi = %Xi0_par" - elseif displayInertance and not displayPos2 == "L = %L" and not displayPos1 == "L = %L" then - "L = %L" else ""; - final parameter String displayPos4= - if displayP and (displayT or displayH) and displayXi and displayInertance then - "L = %L" - else "" annotation(Evaluate=true, HideResult=true); //----------------------------------------------------------------- Modelica.Blocks.Interfaces.RealInput p0_var(unit="Pa") if pressureFromInput "Pressure input connector [Pa]" @@ -103,6 +93,11 @@ protected Modelica.Blocks.Interfaces.RealInput h0(unit = "J/kg") "Internal enthalpy connector"; Modelica.Blocks.Interfaces.RealInput Xi0[Medium.nXi](each unit = "kg/kg") "Internal mass fractions connector"; +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(T0_var, T0); if not temperatureFromInput or setEnthalpy then @@ -147,10 +142,6 @@ equation extent={{-150,-170},{150,-200}}, textColor={0,0,0}, textString=displayPos3), - Text(visible=displayParameters, - extent={{-150,-240},{150,-210}}, - textColor={0,0,0}, - textString=displayPos4), Rectangle( extent={{0,76},{64,-84}}, lineColor={28,108,200}, diff --git a/ThermofluidStream/Processes/Nozzle.mo b/ThermofluidStream/Processes/Nozzle.mo index baf290bb..175d01cd 100644 --- a/ThermofluidStream/Processes/Nozzle.mo +++ b/ThermofluidStream/Processes/Nozzle.mo @@ -22,8 +22,8 @@ model Nozzle "Model for dynamic pressure difference" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter Boolean displayOutletArea = true "= true, if outlet area A_out is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "=true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean dA_in = displayParameters and displayInletArea and not area_in_FromInput "Display inlet area" annotation(Evaluate=true, HideResult=true); final parameter Boolean dA_out = displayParameters and displayOutletArea and not area_out_FromInput "Display outlet area" @@ -45,18 +45,10 @@ model Nozzle "Model for dynamic pressure difference" compressibilityString elseif displayA then AreaString - elseif displayInertance then - "L = %L_value" else "" annotation(Evaluate=true, HideResult=true); final parameter String displayPos2= if displayCompressibilityApproach and displayA then AreaString - elseif displayInertance and not displayPos1 == "L = %L" then - "L = %L_value" - else "" annotation(Evaluate=true, HideResult=true); - final parameter String displayPos3= - if displayCompressibilityApproach and displayA and displayInertance then - "L = %L_value" else "" annotation(Evaluate=true, HideResult=true); //----------------------------------------------------------------- @@ -76,6 +68,12 @@ protected SI.Velocity v_in "Inlet velocity"; SI.Velocity v_out "Outlet velocity"; //Medium.Density rho_mean; + +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(A_in_var, A_in_internal); @@ -115,10 +113,6 @@ equation extent={{-150,-110},{150,-140}}, textColor={0,0,0}, textString=displayPos2), - Text(visible=displayParameters, - extent={{-150,-150},{150,-180}}, - textColor={0,0,0}, - textString=displayPos3), Ellipse( extent={{-56,54},{64,-66}}, lineColor={28,108,200}, diff --git a/ThermofluidStream/Undirected/Boundaries/BoundaryFore.mo b/ThermofluidStream/Undirected/Boundaries/BoundaryFore.mo index 96cf418c..c6c170f2 100644 --- a/ThermofluidStream/Undirected/Boundaries/BoundaryFore.mo +++ b/ThermofluidStream/Undirected/Boundaries/BoundaryFore.mo @@ -35,8 +35,8 @@ model BoundaryFore "Generic Boundary model (may act as source or sink)" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not pressureFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter Boolean displayTemperature = true "= true, if temperature T0_par is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not temperatureFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "= true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean displayP = displayPressure and not pressureFromInput annotation(Evaluate=true, HideResult=true); final parameter Boolean displayT = displayTemperature and not temperatureFromInput and not setEnthalpy @@ -46,19 +46,11 @@ model BoundaryFore "Generic Boundary model (may act as source or sink)" "p = %p0_par" elseif displayT then "T = %T0_par" - elseif displayInertance then - "L = %L" else ""; final parameter String displayPos2= if displayP and displayT then "T = %T0_par" - elseif displayInertance and (displayP or displayT) then - "L = %L" else ""; - final parameter String displayPos3= - if displayP and displayT and displayInertance then - "L = %L" - else "" annotation(Evaluate=true, HideResult=true); //----------------------------------------------------------------- Modelica.Blocks.Interfaces.RealInput p0_var(unit="Pa") if pressureFromInput "Pressure input connector [Pa]" @@ -83,6 +75,11 @@ protected SI.Pressure r "Inertial pressure"; +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(T0_var, T0); if not temperatureFromInput or setEnthalpy then @@ -124,10 +121,6 @@ equation extent={{-150,-130},{150,-160}}, textColor={0,0,0}, textString=displayPos2), - Text(visible=displayParameters, - extent={{-150,-170},{150,-200}}, - textColor={0,0,0}, - textString=displayPos3), Rectangle( extent={{4,76},{-60,-84}}, lineColor={28,108,200}, diff --git a/ThermofluidStream/Undirected/Boundaries/BoundaryRear.mo b/ThermofluidStream/Undirected/Boundaries/BoundaryRear.mo index 2f2d7c61..ec8bf128 100644 --- a/ThermofluidStream/Undirected/Boundaries/BoundaryRear.mo +++ b/ThermofluidStream/Undirected/Boundaries/BoundaryRear.mo @@ -35,8 +35,8 @@ model BoundaryRear "Generic Boundary model (may act as source or sink)" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not pressureFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter Boolean displayTemperature = true "= true, if temperature T0_par is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters and not temperatureFromInput),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayInertance = false "= true, if inertance L is displayed" - annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayInertance = false "DEPRECATED: =true will cause a warning, no longer has any other effect and will be removed in the next major release v2.0.0" + annotation(Dialog(tab="Layout",group="Display parameters"),Evaluate=true, HideResult=true); final parameter Boolean displayP = displayPressure and not pressureFromInput annotation(Evaluate=true, HideResult=true); final parameter Boolean displayT = displayTemperature and not temperatureFromInput and not setEnthalpy @@ -46,19 +46,11 @@ model BoundaryRear "Generic Boundary model (may act as source or sink)" "p = %p0_par" elseif displayT then "T = %T0_par" - elseif displayInertance then - "L = %L" else ""; final parameter String displayPos2= if displayP and displayT then "T = %T0_par" - elseif displayInertance and (displayP or displayT) then - "L = %L" else ""; - final parameter String displayPos3= - if displayP and displayT and displayInertance then - "L = %L" - else "" annotation(Evaluate=true, HideResult=true); //----------------------------------------------------------------- Modelica.Blocks.Interfaces.RealInput p0_var(unit="Pa") if pressureFromInput "Pressure input connector [Pa]" @@ -82,6 +74,11 @@ protected SI.Pressure r "Inertial pressure"; +initial equation + assert(not displayInertance, + "Parameter displayInertance is deprecated and has no effect. It will be removed in the next major release. Please remove modifier.", + level=AssertionLevel.warning); + equation connect(T0_var, T0); if not temperatureFromInput or setEnthalpy then @@ -123,10 +120,6 @@ equation extent={{-150,-130},{150,-160}}, textColor={0,0,0}, textString=displayPos2), - Text(visible=displayParameters, - extent={{-150,-170},{150,-200}}, - textColor={0,0,0}, - textString=displayPos3), Rectangle( extent={{0,76},{64,-84}}, lineColor={28,108,200},