Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions ThermofluidStream/Examples/SimpleCoolingCycle.mo
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extends Modelica.Icons.Example;
ThermofluidStream.Processes.Pump pump(
redeclare package Medium = Medium_liquid,
initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state,
redeclare function dp_tau_pump = ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal)
redeclare function dp_tau_pump = ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal (useLegacyReynolds=false))
annotation (Placement(transformation(extent={{-20,10},{-40,30}})));
ThermofluidStream.Processes.ThermalConvectionPipe thermalConvectionPipe(
redeclare package Medium = Medium_liquid,
Expand Down Expand Up @@ -157,7 +157,7 @@ extends Modelica.Icons.Example;
Modelica.Blocks.Math.Feedback feedback
annotation (Placement(transformation(extent={{-90,-40},{-70,-60}})));
Modelica.Blocks.Continuous.PI PI(
k=3000,
k=300,
T=0.1,
initType=Modelica.Blocks.Types.Init.InitialState)
annotation (Placement(transformation(extent={{-60,-60},{-40,-40}})));
Expand Down Expand Up @@ -242,7 +242,7 @@ equation
annotation (Line(points={{-30,10},{-30,-8}}, color={0,0,0}));
connect(speed1.w_ref, gain.y) annotation (Line(points={{58,-80},{41,-80}},
color={0,0,127}));
connect(PID.y, showRealValue.numberPort) annotation (Line(points={{-139,-50},{-130,-50},{-130,-16},{-121.5,-16}},
connect(PID.y, showRealValue.numberPort) annotation (Line(points={{-139,-50},{-130,-50},{-130,-16},{-122,-16}},
color={0,0,127}));
connect(PID.u_s, pump_speed.y)
annotation (Line(points={{-162,-50},{-170,-50},{-170,-20},{-161,-20}},
Expand All @@ -262,7 +262,7 @@ equation
annotation (Line(points={{-71,-50},{-62,-50}}, color={0,0,127}));
connect(PID.y, gain.u) annotation (Line(points={{-139,-50},{-130,-50},{-130,-80},{18,-80}},
color={0,0,127}));
connect(showRealValue2.numberPort, feedback.u1) annotation (Line(points={{-98.5,-30},{-92,-30},{-92,-50},{-88,-50}},
connect(showRealValue2.numberPort, feedback.u1) annotation (Line(points={{-98,-30},{-92,-30},{-92,-50},{-88,-50}},
color={0,0,127}));
connect(prescribedHeatFlow.Q_flow, combiTimeTable.y[1])
annotation (Line(points={{-150,50},{-159,50}}, color={0,0,127}));
Expand All @@ -279,5 +279,13 @@ equation
Documentation(info="<html>
<p>This cooling cycle is regulated to hit a temperature target. The load is a prescribed heatflow and comes from a table.</p>
<p><br>Owner: <a href=\"mailto:niels.weber@dlr.de\">Niels Weber</a></p>
</html>", revisions="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Decreased <code>PI.k</code> from 3000 to 300.<br>
Changed model to use new version of <code>dp_tau_const_isentrop</code> pump function.
</li>
</ul>
</html>"));
end SimpleCoolingCycle;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Icon display in package browser not homogenous (icon layer size is currently based on graphic layer)
  • Documentation missing (at least explain the purpose of the model)
  • Short description next to model name missing
  • Mirror horizontally conduction element
  • Clean connection lines
  • inlet_temp block not connected

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ within ThermofluidStream.Media.additionalMedia.Incompressible;
model TestLiqLoopDowcal100

replaceable package SecondaryMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package RefrigerantMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package TertiaryMedium =
ThermofluidStream.Media.additionalMedia.Incompressible.Dowcal100
constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

ThermofluidStream.Sensors.MultiSensor_Tpm multiSensor_Tpm1(
Expand Down Expand Up @@ -53,7 +50,7 @@ model TestLiqLoopDowcal100
TertiaryMedium,
omega_from_input=true,
redeclare function dp_tau_pump =
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal)
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal(useLegacyReynolds = false))
annotation (Placement(transformation(extent={{92,-82},{112,-62}})));

ThermofluidStream.Processes.ConductionElement conductionElement(redeclare
Expand Down Expand Up @@ -242,5 +239,13 @@ equation
fillPattern = FillPattern.Solid,
points={{-18,74},{170,-46},{-18,-158},{-18,74}})}),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-180,-180},{260,
100}})));
100}})),
Documentation(info="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Introduced new version of <code>dp_tau_const_isentrop</code> pump function.
</li>
</ul>
</html>"));
end TestLiqLoopDowcal100;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Icon display in package browser not homogenous (icon layer size is currently based on graphic layer)
  • Documentation missing (at least explain the purpose of the model)
  • Short description next to model name missing
  • Mirror horizontally conduction element
  • inlet_temp block not connected

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ within ThermofluidStream.Media.additionalMedia.Incompressible;
model TestLiqLoopJP8

replaceable package SecondaryMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package RefrigerantMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package TertiaryMedium =
ThermofluidStream.Media.additionalMedia.Incompressible.JP8
constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

ThermofluidStream.Sensors.MultiSensor_Tpm multiSensor_Tpm1(
Expand Down Expand Up @@ -53,7 +50,7 @@ model TestLiqLoopJP8
TertiaryMedium,
omega_from_input=true,
redeclare function dp_tau_pump =
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal)
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal(useLegacyReynolds = false))
annotation (Placement(transformation(extent={{92,-82},{112,-62}})));

ThermofluidStream.Processes.ConductionElement conductionElement(redeclare
Expand Down Expand Up @@ -248,5 +245,12 @@ Simulation and Thermal Analysis,
Vehicle Systems,
SAAB Aerosystems, 2024
</p>
</html>", info="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Introduced new version of <code>dp_tau_const_isentrop</code> pump function.
</li>
</ul>
</html>"));
end TestLiqLoopJP8;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Icon display in package browser not homogenous (icon layer size is currently based on graphic layer)
  • Documentation missing (at least explain the purpose of the model)
  • Short description next to model name missing
  • Mirror horizontally conduction element
  • inlet_temp block not connected

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ within ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.Exampl
model TestLiqLoopJP8DryAir

replaceable package SecondaryMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package RefrigerantMedium =
Expand All @@ -12,8 +11,7 @@ model TestLiqLoopJP8DryAir
annotation(choicesAllMatching=true);

replaceable package TertiaryMedium =
ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.JP8DryAir
constrainedby
ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.JP8DryAir constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

Expand Down Expand Up @@ -53,7 +51,7 @@ model TestLiqLoopJP8DryAir
TertiaryMedium,
omega_from_input=true,
redeclare function dp_tau_pump =
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal)
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal(useLegacyReynolds = false))
annotation (Placement(transformation(extent={{100,-80},{120,-60}})));

ThermofluidStream.Processes.ConductionElement conductionElement(redeclare
Expand Down Expand Up @@ -247,5 +245,12 @@ Simulation and Thermal Analysis,
Vehicle Systems,
SAAB Aerosystems, 2024
</p>
</html>", info="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Introduced new version of <code>dp_tau_const_isentrop</code> pump function.
</li>
</ul>
</html>"));
end TestLiqLoopJP8DryAir;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Icon display in package browser not homogenous (icon layer size is currently based on graphic layer)
  • Documentation missing (at least explain the purpose of the model)
  • Short description next to model name missing
  • Mirror horizontally conduction element

Controller does not allow to reach the setpoint (maybe heat load to small). But maybe it is intended or at least not an issue

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ within ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.Exampl
model TestSimpleLoopJP8DryAir

replaceable package SecondaryMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package RefrigerantMedium =
Expand All @@ -12,8 +11,7 @@ model TestSimpleLoopJP8DryAir
annotation(choicesAllMatching=true);

replaceable package TertiaryMedium =
ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.JP8DryAir
constrainedby
ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.JP8DryAir constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);
// TertiaryMedium.BaseProperties terMedium;
Expand All @@ -32,7 +30,7 @@ model TestSimpleLoopJP8DryAir
TertiaryMedium,
omega_from_input=true,
redeclare function dp_tau_pump =
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal)
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal(useLegacyReynolds = false))
annotation (Placement(transformation(extent={{88,-80},{108,-60}})));

ThermofluidStream.Processes.ConductionElement conductionElement(redeclare
Expand Down Expand Up @@ -139,5 +137,12 @@ Simulation and Thermal Analysis,
Vehicle Systems,
SAAB Aerosystems, 2024
</p>
</html>", info="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Introduced new version of <code>dp_tau_const_isentrop</code> pump function.
</li>
</ul>
</html>"));
end TestSimpleLoopJP8DryAir;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Icon display in package browser not homogenous (icon layer size is currently based on graphic layer)
  • Documentation missing (at least explain the purpose of the model)
  • Short description next to model name missing
  • Mirror horizontally conduction element

The controller does not allow to reach the setpoints (maybe because the heat source is too small) and when simulated on a longer time the loop starts to oscillate.

Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@ within ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.Exampl
model TestSimpleLoopWithStaticHeadJP8DryAir

replaceable package SecondaryMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package RefrigerantMedium =
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.XRGMedia.CO2_ph constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);

replaceable package TertiaryMedium =

ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.JP8DryAir
constrainedby
ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
ThermofluidStream.Media.additionalMedia.SingleGasAndIncompressible.JP8DryAir constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
annotation(choicesAllMatching=true);
// TertiaryMedium.BaseProperties terMedium;

Expand All @@ -33,7 +28,7 @@ model TestSimpleLoopWithStaticHeadJP8DryAir
TertiaryMedium,
omega_from_input=true,
redeclare function dp_tau_pump =
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal)
ThermofluidStream.Processes.Internal.TurboComponent.dp_tau_centrifugal(useLegacyReynolds = false))
annotation (Placement(transformation(extent={{92,-90},{112,-70}})));

ThermofluidStream.Processes.ConductionElement conductionElement(redeclare
Expand Down Expand Up @@ -222,5 +217,12 @@ Simulation and Thermal Analysis,
Vehicle Systems,
SAAB Aerosystems, 2024
</p>
</html>", info="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Introduced new version of <code>dp_tau_const_isentrop</code> pump function.
</li>
</ul>
</html>"));
end TestSimpleLoopWithStaticHeadJP8DryAir;
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ protected
SI.Torque tau "Torque";
SI.Torque tau_normalized "Normalized torque";


initial equation
if initOmega == InitializationMethods.state then
omega = omega_0;
Expand Down Expand Up @@ -173,5 +172,12 @@ equation
<li>If one wants to prescribe a speed of the component, instead of being interested in the omega dynamics, enable omegaFromInput.</li>
<li>The heatport is only of interest, if the overall energy of the system must be conserved.</li>
</ul>
</html>", revisions="<html>
<ul>
<li>
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):<br>
Added showLegacyWarning, required for warning of legacy dp_tau_const_isentrop function.
</li>
</ul>
</html>"));
end PartialTurboComponent;
Loading