Skip to content

Commit 7b93b13

Browse files
authored
refs #1202: Remove unused parameter (#2887)
1 parent 3d22499 commit 7b93b13

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

Modelica/Resources/Scripts/Conversion/ConvertModelica_from_3.2.3_to_4.0.0.mos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ convertElement({"Modelica.Mechanics.Rotational.Sources.SignTorque"},
4848
convertElement("Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableConductor",
4949
"variableResistor", "variableConductor");
5050

51+
convertModifiers({"Modelica.Thermal.HeatTransfer.Rankine.ToKelvin",
52+
"Modelica.Thermal.HeatTransfer.Rankine.FromKelvin",
53+
"Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvin"},
54+
{"n"}, fill("", 0), true);
5155
convertModifiers({"Modelica.Blocks.Nonlinear.Limiter",
5256
"Modelica.Blocks.Nonlinear.VariableLimiter",
5357
"Modelica.Blocks.Continuous.LimPID"},

Modelica/Thermal/HeatTransfer.mo

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,6 @@ and provides is as output signal.
23682368
end ToKelvin;
23692369

23702370
model FromKelvin "Conversion from Kelvin to degFahrenheit"
2371-
parameter Integer n=1 "Only kept for backwards compatibility (parameter is not used in the model and will be removed in a future version)" annotation(Dialog(enable=false));
23722371
Modelica.Blocks.Interfaces.RealInput Kelvin(unit="K")
23732372
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
23742373
Modelica.Blocks.Interfaces.RealOutput Fahrenheit(unit="degF")
@@ -2652,7 +2651,6 @@ Example:
26522651
extends Modelica.Icons.VariantsPackage;
26532652

26542653
model ToKelvin "Conversion block from degRankine to Kelvin"
2655-
parameter Integer n=1 "Only kept for backwards compatibility (parameter is not used in the model and will be removed in a future version)" annotation(Dialog(enable=false));
26562654
Modelica.Blocks.Interfaces.RealInput Rankine(unit="degRk")
26572655
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
26582656
Modelica.Blocks.Interfaces.RealOutput Kelvin(unit="K")
@@ -2702,7 +2700,6 @@ and provides them as output signals.
27022700
end ToKelvin;
27032701

27042702
model FromKelvin "Conversion from Kelvin to degRankine"
2705-
parameter Integer n=1 "Only kept for backwards compatibility (parameter is not used in the model and will be removed in a future version)" annotation(Dialog(enable=false));
27062703
Modelica.Blocks.Interfaces.RealInput Kelvin(unit="K")
27072704
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
27082705
Modelica.Blocks.Interfaces.RealOutput Rankine(unit="degRk")

ModelicaTestConversion4.mo

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,29 @@ Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrar
324324
end Issue978;
325325
end Math;
326326

327+
package Thermal
328+
extends Modelica.Icons.ExamplesPackage;
329+
package HeatTransfer
330+
extends Modelica.Icons.ExamplesPackage;
331+
model Issue1202 "Conversion test for #1202"
332+
extends Modelica.Icons.Example;
333+
Modelica.Thermal.HeatTransfer.Rankine.ToKelvin toKelvin(n=1);
334+
Modelica.Thermal.HeatTransfer.Rankine.FromKelvin fromKelvin1(n=2);
335+
Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvin fromKelvin2(n=-3);
336+
Modelica.Blocks.Sources.Constant const(k=10);
337+
equation
338+
connect(const.y, fromKelvin1.Kelvin);
339+
connect(const.y, toKelvin.Rankine);
340+
connect(const.y, fromKelvin2.Kelvin);
341+
annotation(experiment(StopTime=1), Documentation(info="<html>
342+
<p>
343+
Conversion test for <a href=\"https://github.com/modelica/ModelicaStandardLibrary/issues/1202\">#1202</a>.
344+
</p>
345+
</html>"));
346+
end Issue1202;
347+
end HeatTransfer;
348+
end Thermal;
349+
327350
package SIunits
328351
extends Modelica.Icons.ExamplesPackage;
329352
model Issue385 "Conversion test for #385"

0 commit comments

Comments
 (0)