From b7ffad6eeca63f6a48e7a8fc5cd3600c58f2e2cc Mon Sep 17 00:00:00 2001 From: Tobias Reischl Date: Wed, 10 Dec 2025 09:50:31 +0100 Subject: [PATCH 1/4] > Adding Documentation to the Topology/package.mo --- ThermofluidStream/Topology/DynamicJunctionN.mo | 2 +- ThermofluidStream/Topology/DynamicJunctionNM.mo | 2 +- ThermofluidStream/Topology/DynamicSplitterN.mo | 2 +- ThermofluidStream/Topology/JunctionN.mo | 5 ++++- ThermofluidStream/Topology/JunctionNM.mo | 5 ++++- ThermofluidStream/Topology/JunctionT1.mo | 5 ++++- ThermofluidStream/Topology/JunctionT2.mo | 5 ++++- ThermofluidStream/Topology/JunctionX1.mo | 1 + ThermofluidStream/Topology/JunctionX2.mo | 6 +++++- ThermofluidStream/Topology/JunctionX3.mo | 6 +++++- ThermofluidStream/Topology/SplitterN.mo | 5 ++++- ThermofluidStream/Topology/SplitterT1.mo | 7 ++++++- ThermofluidStream/Topology/SplitterT2.mo | 6 +++++- ThermofluidStream/Topology/SplitterX.mo | 5 ++++- ThermofluidStream/Topology/package.mo | 4 ++++ 15 files changed, 53 insertions(+), 13 deletions(-) diff --git a/ThermofluidStream/Topology/DynamicJunctionN.mo b/ThermofluidStream/Topology/DynamicJunctionN.mo index 131e8e1e..6799de90 100644 --- a/ThermofluidStream/Topology/DynamicJunctionN.mo +++ b/ThermofluidStream/Topology/DynamicJunctionN.mo @@ -86,7 +86,7 @@ equation because velocity can directly be set, instead of A, that will need regularization for low massflow.")}), Documentation(info=" -

Junction that takes dynamic pressure into account.

+

Dynamic variant of the generic N-to-1 junction. This model includes dynamic pressure/momentum effects and is intended for transient simulations of merging nodes.

This junction model (see fig. 1) mixes fluids of different velocity entering the mixing chamber by different cross section areas and outputs the mixed fluid on an outlet with a separate area.

The pressure balance is done on the steady-state pressure, and mixing (red) assumes to preserve the kinetic energy of the fluid, resulting in an effective mixing velocity and area. This implies, that the mixing area A_mix changes during the simulation, which can be interpreted as narrowing down the mixing area by flow separation.

After mixing the fluid is accelerated to match the outlet area.

diff --git a/ThermofluidStream/Topology/DynamicJunctionNM.mo b/ThermofluidStream/Topology/DynamicJunctionNM.mo index fdd8c7d8..fa80ee6a 100644 --- a/ThermofluidStream/Topology/DynamicJunctionNM.mo +++ b/ThermofluidStream/Topology/DynamicJunctionNM.mo @@ -87,7 +87,7 @@ equation lineColor={170,255,170})}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Junction/Splitter that takes into account dynamic pressure.

+

Dynamic multiport N-to-M junction for transient manifold behavior. Use this model in complex distribution/collection nodes where dynamic pressure effects are important.

In general the component has four non-linear equation systems of size 1. This can be resolved by setting Advanced->assumeConstantDensity=true (default: false).

")); end DynamicJunctionNM; diff --git a/ThermofluidStream/Topology/DynamicSplitterN.mo b/ThermofluidStream/Topology/DynamicSplitterN.mo index 1bf71030..2fec3ea7 100644 --- a/ThermofluidStream/Topology/DynamicSplitterN.mo +++ b/ThermofluidStream/Topology/DynamicSplitterN.mo @@ -84,7 +84,7 @@ equation lineColor={170,255,170})}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Splitter that takes dynamic pressure into account.

+

Dynamic variant of the generic splitter with one upstream connection and N downstream connections. This model accounts for dynamic pressure/momentum effects and is suitable for transient analyses where inertial behavior in branching nodes is relevant. Be aware that dynamic formulations can increase model stiffness and nonlinear complexity.

In general the component has two non-linear equation systems of size 1. This can be resolved by setting Advanced->assumeConstantDensity=true (default: false).

")); end DynamicSplitterN; diff --git a/ThermofluidStream/Topology/JunctionN.mo b/ThermofluidStream/Topology/JunctionN.mo index 2d510fca..45123892 100644 --- a/ThermofluidStream/Topology/JunctionN.mo +++ b/ThermofluidStream/Topology/JunctionN.mo @@ -99,5 +99,8 @@ equation extent={{-120,-20},{-80,-60}}, textColor={175,175,175}, textString="%N")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Generic junction with an array of N upstream connections and one downstream connection. Use this model for parameterized merge structures.

+")); end JunctionN; diff --git a/ThermofluidStream/Topology/JunctionNM.mo b/ThermofluidStream/Topology/JunctionNM.mo index 789b2489..65d5bc42 100644 --- a/ThermofluidStream/Topology/JunctionNM.mo +++ b/ThermofluidStream/Topology/JunctionNM.mo @@ -92,5 +92,8 @@ equation extent={{120,-20},{80,-60}}, textColor={175,175,175}, textString="%M")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Generic N-to-M junction for manifold-style networks with multiple inlets and multiple outlets. Use this model to represent compact distribution or collection nodes in scalable architectures where both the number of incoming and outgoing branches is configurable.

+")); end JunctionNM; diff --git a/ThermofluidStream/Topology/JunctionT1.mo b/ThermofluidStream/Topology/JunctionT1.mo index 4134bada..60d23cfe 100644 --- a/ThermofluidStream/Topology/JunctionT1.mo +++ b/ThermofluidStream/Topology/JunctionT1.mo @@ -73,5 +73,8 @@ equation extent={{20,-80},{60,-120}}, textColor={175,175,175}, textString="B")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Three-port junction for merging two upstream streams into one downstream stream. Use this model to represent a directed merge of two branches into a single line. The component is intended for steady (non-dynamic) topology definition and helps maintain consistent and readable network architecture.

+")); end JunctionT1; diff --git a/ThermofluidStream/Topology/JunctionT2.mo b/ThermofluidStream/Topology/JunctionT2.mo index b8a36444..aacf2ae6 100644 --- a/ThermofluidStream/Topology/JunctionT2.mo +++ b/ThermofluidStream/Topology/JunctionT2.mo @@ -73,5 +73,8 @@ equation extent={{-120,60},{-80,20}}, textColor={175,175,175}, textString="B")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Alternative three-port junction for combining two inlet branches into one outlet branch. Functionally equivalent to JunctionT1 in terms of topology, but implemented with an alternative internal formulation.

+")); end JunctionT2; diff --git a/ThermofluidStream/Topology/JunctionX1.mo b/ThermofluidStream/Topology/JunctionX1.mo index 17ebb579..fe69a778 100644 --- a/ThermofluidStream/Topology/JunctionX1.mo +++ b/ThermofluidStream/Topology/JunctionX1.mo @@ -105,6 +105,7 @@ equation textString="b")}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" +

Multiport junction for X-type connection patterns where several branches meet and redistribute flow. Use this component to model compact, directed interconnections in networks that would otherwise require multiple sequential T-junctions.

Medium package used in the component. Make sure it is the same one as all the components connected to all fluid ports are using.

")); end JunctionX1; diff --git a/ThermofluidStream/Topology/JunctionX2.mo b/ThermofluidStream/Topology/JunctionX2.mo index f4553287..aa054169 100644 --- a/ThermofluidStream/Topology/JunctionX2.mo +++ b/ThermofluidStream/Topology/JunctionX2.mo @@ -101,5 +101,9 @@ equation extent={{80,-60},{120,-20}}, textColor={175,175,175}, textString="b")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Alternative multiport X-junction with the same primary topology role as JunctionX1.

+

Use it as a drop-in alternative during model refinement if needed.

+")); end JunctionX2; diff --git a/ThermofluidStream/Topology/JunctionX3.mo b/ThermofluidStream/Topology/JunctionX3.mo index 2390f906..9a73791d 100644 --- a/ThermofluidStream/Topology/JunctionX3.mo +++ b/ThermofluidStream/Topology/JunctionX3.mo @@ -96,5 +96,9 @@ equation extent={{60,-120},{20,-80}}, textColor={175,175,175}, textString="C")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Higher-order junction for merging multiple upstream branches into a single downstream branch within an X-type topology family.

+

Use this model when you need a compact representation of a multi-inlet merge.

+")); end JunctionX3; diff --git a/ThermofluidStream/Topology/SplitterN.mo b/ThermofluidStream/Topology/SplitterN.mo index b922fb93..b66e437d 100644 --- a/ThermofluidStream/Topology/SplitterN.mo +++ b/ThermofluidStream/Topology/SplitterN.mo @@ -58,5 +58,8 @@ equation extent={{120,-20},{80,-60}}, textColor={175,175,175}, textString="%N")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Generic splitter with one upstream connection and an array of N downstream connections. Use this model to parameterize the number of branches and avoid building large splitter trees manually. This is the recommended approach for scalable network templates.

+")); end SplitterN; diff --git a/ThermofluidStream/Topology/SplitterT1.mo b/ThermofluidStream/Topology/SplitterT1.mo index 3f51a5fc..8e4359da 100644 --- a/ThermofluidStream/Topology/SplitterT1.mo +++ b/ThermofluidStream/Topology/SplitterT1.mo @@ -73,5 +73,10 @@ equation extent={{-60,-80},{-20,-120}}, textColor={175,175,175}, textString="B")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Three-port splitter for branching a single flow path into two downstream branches.

+

Use this model to create a clear, directed network structure when dividing mass flow into two parallel paths.

+

The component is intended for steady (non-dynamic) topology definition within ThermoFluidStream networks.

+")); end SplitterT1; diff --git a/ThermofluidStream/Topology/SplitterT2.mo b/ThermofluidStream/Topology/SplitterT2.mo index d26f5e5d..d5312d78 100644 --- a/ThermofluidStream/Topology/SplitterT2.mo +++ b/ThermofluidStream/Topology/SplitterT2.mo @@ -67,5 +67,9 @@ equation extent={{80,60},{120,20}}, textColor={175,175,175}, textString="B")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Alternative three-port splitter for dividing one upstream stream into two downstream branches.

+

This model provides the same functional topology role as SplitterT1 but with an alternative internal formulation.

+")); end SplitterT2; diff --git a/ThermofluidStream/Topology/SplitterX.mo b/ThermofluidStream/Topology/SplitterX.mo index 5922ccd9..5d6ccbd9 100644 --- a/ThermofluidStream/Topology/SplitterX.mo +++ b/ThermofluidStream/Topology/SplitterX.mo @@ -85,5 +85,8 @@ equation extent={{80,-20},{120,-60}}, textColor={175,175,175}, textString="C")}), - Diagram(coordinateSystem(preserveAspectRatio=true))); + Diagram(coordinateSystem(preserveAspectRatio=true)), + Documentation(info=" +

Multi-branch splitter for distributing one upstream stream into multiple downstream branches in an X-type topology. Use this component when you need a compact representation of a higher-order split without cascading several T-splitters.

+")); end SplitterX; diff --git a/ThermofluidStream/Topology/package.mo b/ThermofluidStream/Topology/package.mo index 696eeab9..2883c5ee 100644 --- a/ThermofluidStream/Topology/package.mo +++ b/ThermofluidStream/Topology/package.mo @@ -5,6 +5,10 @@ package Topology annotation (Documentation(revisions="

(c) 2020-2021, DLR, Institute of System Dynamics and Control

+", info=" +

This package provides dedicated splitter and junction models for building directed ThermoFluidStream network topologies.

+

The library explicitly recommends composing branches and merges using these elements rather than splitting flows purely via connector equations (except for sensor-only use cases).

Using dedicated topology components is also a key structural difference compared to the Modelica Standard Library approach, improving robustness and clarity of network formulation.

(Reference: https://doi.org/10.3390/electronics11223790)

+

All models rely on a consistent medium definition across connected ports. Ensure the selected Medium matches that of all connected components.

"), Icon(graphics={ Line( points={{-80,0},{12,0}}, From 5e56f7707c94f5ec4e57d553a5a641362d0a95b3 Mon Sep 17 00:00:00 2001 From: Tobias Reischl Date: Wed, 10 Dec 2025 13:25:54 +0100 Subject: [PATCH 2/4] > instead of --- ThermofluidStream/Topology/DynamicJunctionN.mo | 2 +- ThermofluidStream/Topology/DynamicJunctionNM.mo | 2 +- ThermofluidStream/Topology/DynamicSplitterN.mo | 2 +- ThermofluidStream/Topology/JunctionN.mo | 2 +- ThermofluidStream/Topology/JunctionNM.mo | 2 +- ThermofluidStream/Topology/SplitterN.mo | 2 +- ThermofluidStream/Topology/package.mo | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ThermofluidStream/Topology/DynamicJunctionN.mo b/ThermofluidStream/Topology/DynamicJunctionN.mo index 6799de90..69ef67b3 100644 --- a/ThermofluidStream/Topology/DynamicJunctionN.mo +++ b/ThermofluidStream/Topology/DynamicJunctionN.mo @@ -86,7 +86,7 @@ equation because velocity can directly be set, instead of A, that will need regularization for low massflow.")}), Documentation(info=" -

Dynamic variant of the generic N-to-1 junction. This model includes dynamic pressure/momentum effects and is intended for transient simulations of merging nodes.

+

Dynamic variant of the generic N-to-1 junction. This model includes dynamic pressure/momentum effects and is intended for transient simulations of merging nodes.

This junction model (see fig. 1) mixes fluids of different velocity entering the mixing chamber by different cross section areas and outputs the mixed fluid on an outlet with a separate area.

The pressure balance is done on the steady-state pressure, and mixing (red) assumes to preserve the kinetic energy of the fluid, resulting in an effective mixing velocity and area. This implies, that the mixing area A_mix changes during the simulation, which can be interpreted as narrowing down the mixing area by flow separation.

After mixing the fluid is accelerated to match the outlet area.

diff --git a/ThermofluidStream/Topology/DynamicJunctionNM.mo b/ThermofluidStream/Topology/DynamicJunctionNM.mo index fa80ee6a..d4e1e59f 100644 --- a/ThermofluidStream/Topology/DynamicJunctionNM.mo +++ b/ThermofluidStream/Topology/DynamicJunctionNM.mo @@ -87,7 +87,7 @@ equation lineColor={170,255,170})}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Dynamic multiport N-to-M junction for transient manifold behavior. Use this model in complex distribution/collection nodes where dynamic pressure effects are important.

+

Dynamic multiport N-to-M junction for transient manifold behavior. Use this model in complex distribution/collection nodes where dynamic pressure effects are important.

In general the component has four non-linear equation systems of size 1. This can be resolved by setting Advanced->assumeConstantDensity=true (default: false).

")); end DynamicJunctionNM; diff --git a/ThermofluidStream/Topology/DynamicSplitterN.mo b/ThermofluidStream/Topology/DynamicSplitterN.mo index 2fec3ea7..b4c7336f 100644 --- a/ThermofluidStream/Topology/DynamicSplitterN.mo +++ b/ThermofluidStream/Topology/DynamicSplitterN.mo @@ -84,7 +84,7 @@ equation lineColor={170,255,170})}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Dynamic variant of the generic splitter with one upstream connection and N downstream connections. This model accounts for dynamic pressure/momentum effects and is suitable for transient analyses where inertial behavior in branching nodes is relevant. Be aware that dynamic formulations can increase model stiffness and nonlinear complexity.

+

Dynamic variant of the generic splitter with one upstream connection and N downstream connections. This model accounts for dynamic pressure/momentum effects and is suitable for transient analyses where inertial behavior in branching nodes is relevant. Be aware that dynamic formulations can increase model stiffness and nonlinear complexity.

In general the component has two non-linear equation systems of size 1. This can be resolved by setting Advanced->assumeConstantDensity=true (default: false).

")); end DynamicSplitterN; diff --git a/ThermofluidStream/Topology/JunctionN.mo b/ThermofluidStream/Topology/JunctionN.mo index 45123892..6384d677 100644 --- a/ThermofluidStream/Topology/JunctionN.mo +++ b/ThermofluidStream/Topology/JunctionN.mo @@ -101,6 +101,6 @@ equation textString="%N")}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Generic junction with an array of N upstream connections and one downstream connection. Use this model for parameterized merge structures.

+

Generic junction with an array of N upstream connections and one downstream connection. Use this model for parameterized merge structures.

")); end JunctionN; diff --git a/ThermofluidStream/Topology/JunctionNM.mo b/ThermofluidStream/Topology/JunctionNM.mo index 65d5bc42..0a76feb3 100644 --- a/ThermofluidStream/Topology/JunctionNM.mo +++ b/ThermofluidStream/Topology/JunctionNM.mo @@ -94,6 +94,6 @@ equation textString="%M")}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Generic N-to-M junction for manifold-style networks with multiple inlets and multiple outlets. Use this model to represent compact distribution or collection nodes in scalable architectures where both the number of incoming and outgoing branches is configurable.

+

Generic N-to-M junction for manifold-style networks with multiple inlets and multiple outlets. Use this model to represent compact distribution or collection nodes in scalable architectures where both the number of incoming and outgoing branches is configurable.

")); end JunctionNM; diff --git a/ThermofluidStream/Topology/SplitterN.mo b/ThermofluidStream/Topology/SplitterN.mo index b66e437d..37178967 100644 --- a/ThermofluidStream/Topology/SplitterN.mo +++ b/ThermofluidStream/Topology/SplitterN.mo @@ -60,6 +60,6 @@ equation textString="%N")}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Generic splitter with one upstream connection and an array of N downstream connections. Use this model to parameterize the number of branches and avoid building large splitter trees manually. This is the recommended approach for scalable network templates.

+

Generic splitter with one upstream connection and an array of N downstream connections. Use this model to parameterize the number of branches and avoid building large splitter trees manually. This is the recommended approach for scalable network templates.

")); end SplitterN; diff --git a/ThermofluidStream/Topology/package.mo b/ThermofluidStream/Topology/package.mo index 2883c5ee..4ed8902a 100644 --- a/ThermofluidStream/Topology/package.mo +++ b/ThermofluidStream/Topology/package.mo @@ -8,7 +8,7 @@ annotation (Documentation(revisions=" ", info="

This package provides dedicated splitter and junction models for building directed ThermoFluidStream network topologies.

The library explicitly recommends composing branches and merges using these elements rather than splitting flows purely via connector equations (except for sensor-only use cases).

Using dedicated topology components is also a key structural difference compared to the Modelica Standard Library approach, improving robustness and clarity of network formulation.

(Reference: https://doi.org/10.3390/electronics11223790)

-

All models rely on a consistent medium definition across connected ports. Ensure the selected Medium matches that of all connected components.

+

All models rely on a consistent medium definition across connected ports. Ensure the selected Medium matches that of all connected components.

"), Icon(graphics={ Line( points={{-80,0},{12,0}}, From 55e8d81e84b704fa4743ecca1a7511c63a4e6586 Mon Sep 17 00:00:00 2001 From: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:58:34 +0100 Subject: [PATCH 3/4] Update JunctionT2.mo The models are equivalent --- ThermofluidStream/Topology/JunctionT2.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThermofluidStream/Topology/JunctionT2.mo b/ThermofluidStream/Topology/JunctionT2.mo index aacf2ae6..a0d00669 100644 --- a/ThermofluidStream/Topology/JunctionT2.mo +++ b/ThermofluidStream/Topology/JunctionT2.mo @@ -75,6 +75,6 @@ equation textString="B")}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

Alternative three-port junction for combining two inlet branches into one outlet branch. Functionally equivalent to JunctionT1 in terms of topology, but implemented with an alternative internal formulation.

+

Alternative three-port junction for combining two inlet branches into one outlet branch. Functionally equivalent to JunctionT1 in terms of topology.

")); end JunctionT2; From 449df25bb96bc26f58e5feffc7d90c031c4b0c91 Mon Sep 17 00:00:00 2001 From: Raphael Gebhart Date: Fri, 13 Feb 2026 15:48:38 +0100 Subject: [PATCH 4/4] Revert "Merge branch 'main' into TFS_Doku_SplitterandJunctions" This reverts commit 760a440bdf7fc044977a430f204762a8aaf47be4, reversing changes made to 55e8d81e84b704fa4743ecca1a7511c63a4e6586. --- README.md | 2 +- ThermofluidStream/DropOfCommons.mo | 18 +- ThermofluidStream/Examples/HeatPump.mo | 13 +- ThermofluidStream/Examples/ReverseHeatPump.mo | 2 +- .../Examples/SimpleGasTurbine.mo | 5 +- .../Examples/Utilities/Tests/Piston.mo | 14 +- ThermofluidStream/Examples/VenturiPump.mo | 3 +- ThermofluidStream/Examples/WaterHammer.mo | 3 +- ThermofluidStream/FlowControl/MCV.mo | 2 +- .../HeatExchangers/Internal/PartialNTU.mo | 22 +- .../HeatExchangers/Tests/CounterFlowNTU.mo | 2 +- .../HeatExchangers/Tests/CrossFlowNTU.mo | 2 +- .../Processes/CentrifugalPump.mo | 20 +- .../Processes/ConductionElement.mo | 90 +++----- .../Auxiliaries/InternalCoefficients.mo | 4 +- .../internalCoefficientsFromCoefficients.mo | 4 +- .../internalCoefficientsFromMeasurements.mo | 2 - .../CalculateCoefficientsFromMeasurements.mo | 6 +- .../laminarTurbulentPressureLoss.mo | 2 +- .../laminarTurbulentPressureLossHaaland.mo | 2 +- .../TurboComponent/dp_tau_const_isentrop.mo | 4 +- .../Tests/CentrifugalPumpCharacteristics.mo | 158 ------------- .../Tests/ConductionElementVariable.mo | 218 ------------------ .../Processes/Tests/package.order | 2 - ThermofluidStream/Processes/TransportDelay.mo | 2 +- ThermofluidStream/Processes/package.order | 2 +- ... => ThermofluidStream.FlowControl.MCV.PNG} | Bin ...sistance.laminarTurbulentPressureLoss.PNG} | Bin ...tream.Topology.Internal.SplitterRatio.PNG} | Bin ...ream.Topology.Internal.SplitterRatio2.PNG} | Bin ThermofluidStream/Topology/Internal.mo | 2 +- .../Tests/TestDiscretizedHEX.mo | 19 +- .../Tests/TestDiscretizedHEXvsDir.mo | 32 ++- .../Undirected/Processes/TransportDelay.mo | 2 +- ThermofluidStream/Utilities/showRealValue.mo | 2 +- ThermofluidStream/package.mo | 15 +- ...uidCover.png => VideoThermoFluidCover.PNG} | Bin 37 files changed, 115 insertions(+), 561 deletions(-) delete mode 100644 ThermofluidStream/Processes/Tests/CentrifugalPumpCharacteristics.mo delete mode 100644 ThermofluidStream/Processes/Tests/ConductionElementVariable.mo rename ThermofluidStream/Resources/Doku/{ThermofluidStream.FlowControl.MCV.png => ThermofluidStream.FlowControl.MCV.PNG} (100%) rename ThermofluidStream/Resources/Doku/{ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss.png => ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss.PNG} (100%) rename ThermofluidStream/Resources/Doku/{ThermofluidStream.Topology.Internal.SplitterRatio.png => ThermofluidStream.Topology.Internal.SplitterRatio.PNG} (100%) rename ThermofluidStream/Resources/Doku/{ThermofluidStream.Topology.Internal.SplitterRatio2.png => ThermofluidStream.Topology.Internal.SplitterRatio2.PNG} (100%) rename doc/{VideoThermoFluidCover.png => VideoThermoFluidCover.PNG} (100%) diff --git a/README.md b/README.md index d82c500c..fc2fffdd 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The DLR ThermoFluid Stream Library uses a [innovative computational scheme](http Watch the introductory video from the 2021 Modelica Conference and read the corresponding paper in MDPI electronics (short version): -IMAGE ALT TEXT HERE ## License, Terms of Use, Literature diff --git a/ThermofluidStream/DropOfCommons.mo b/ThermofluidStream/DropOfCommons.mo index 1fb66d70..41e2a712 100644 --- a/ThermofluidStream/DropOfCommons.mo +++ b/ThermofluidStream/DropOfCommons.mo @@ -20,9 +20,9 @@ model DropOfCommons "Model for global parameters" parameter AssertionLevel assertionLevel = AssertionLevel.error "Global assertion level"; - parameter Boolean displayInstanceNames = true "= true, if ThermofluidStream instance names are displayed" annotation(Dialog(group="Layout"),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displayParameters = true "= true, if displaying parameters is enabled" annotation(Dialog(group="Layout"),Evaluate=true, HideResult=true, choices(checkBox=true)); - final parameter Integer instanceNameColor[3] = {28,108,200}; // Default Color: {28,108,200} + parameter Boolean displayInstanceNames = false "= true, if ThermofluidStream instance names are displayed" annotation(Dialog(group="Layout"),Evaluate=true, HideResult=true, choices(checkBox=true)); + parameter Boolean displayParameters = false "= true, if displaying parameters is enabled" annotation(Dialog(group="Layout"),Evaluate=true, HideResult=true, choices(checkBox=true)); + final parameter Integer instanceNameColor[3] = {28,108,200}; // {28,108,200} annotation (defaultComponentName="dropOfCommons", defaultComponentPrefixes="inner", @@ -57,17 +57,5 @@ to specify system properties.",Icon(coordinateSystem(preserveAspectRatio=false), coordinateSystem(preserveAspectRatio=false)), Documentation(revisions="

(c) 2020-2021, DLR, Institute of System Dynamics and Control

-", info=" -

The DropOfCommons defines global parameters and settings for simulation models. This model serves several purposes:

-
    -
  • It provides default physical constants (e.g., gravity acceleration) and flow properties (e.g., inertance) that are used by all components in the model.
  • -
  • It defines regularization parameters (e.g., minimal density, minimal pressure, mass flow threshold, angular velocity, and volume damping factor) that ensure numerical stability of transient simulations. These parameters must be adjusted to match the characteristics of the simulated system, for example, if the system’s design involves mass flows on the order of magnitude of the regularization threshold (m_flow_reg), or angular velocities near omega_reg, their values should be updated to prevent artificial inaccuracies. Detailed information on the volume damping factor is available in the PartialVolume documentation.
  • -
  • It defines global assertion and error handling behavior via the assertionLevel parameter.
  • -
  • It provides layout and visualization settings for model diagrams, such as displaying instance names and parameter values.
  • -
-

Since the global parameters defined in DropOfCommons are used by multiple ThermofluidStream components, exactly one instance of this model needs to be present at the top level of a simulation model. The basic declaration is:

-

inner ThermofluidStream.DropOfCommons dropOfCommons

-

Note, it must be an inner declaration with instance name dropOfCommons so that all components of a ThermofluidStream model can reference it. When dragging the "DropOfCommons" object from the package browser into the diagram layer, this declaration is automatically generated (defined via annotations in the model).

-

All flow, density, pressure, and visualization parameters in a simulation model are resolved relative to the settings in this dropOfCommons instance. Adjusting these parameters allows controlling global simulation behavior, visualization preferences, and regularization methods consistently across all components.

")); end DropOfCommons; diff --git a/ThermofluidStream/Examples/HeatPump.mo b/ThermofluidStream/Examples/HeatPump.mo index b601b3df..b7da5641 100644 --- a/ThermofluidStream/Examples/HeatPump.mo +++ b/ThermofluidStream/Examples/HeatPump.mo @@ -81,7 +81,7 @@ model HeatPump Boundaries.Source source(redeclare package Medium = Air, T0_par=293.15, p0_par=100000) - annotation (Placement(transformation(extent={{-160,86},{-140,106}}))); + annotation (Placement(transformation(extent={{-160,78},{-140,98}}))); Processes.FlowResistance flowResistance1( redeclare package Medium = Air, r=1, @@ -93,7 +93,7 @@ model HeatPump annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={-110,96}))); + origin={-110,88}))); Processes.FlowResistance flowResistance2( redeclare package Medium = Air, r=1, @@ -218,8 +218,7 @@ model HeatPump Sensors.SingleSensorSelect singleSensorSelect3( redeclare package Medium = Air, digits=1, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.T_C) annotation (Placement(transformation(extent={{-120, - 108},{-100,128}}))); + quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.T_C) annotation (Placement(transformation(extent={{-120,100},{-100,120}}))); Sensors.SingleSensorSelect singleSensorSelect4( redeclare package Medium = Air, digits=1, @@ -304,11 +303,11 @@ equation color={28,108,200}, thickness=0.5)); connect(source.outlet, flowResistance1.inlet) annotation (Line( - points={{-140,96},{-120,96}}, + points={{-140,88},{-120,88}}, color={28,108,200}, thickness=0.5)); connect(flowResistance1.outlet, condenser.inletA) annotation (Line( - points={{-100,96},{-94,96},{-94,88},{-90,88}}, + points={{-100,88},{-90,88}}, color={28,108,200}, thickness=0.5)); connect(condenser.outletA, fan.inlet) annotation (Line( @@ -389,7 +388,7 @@ equation thickness=0.5)); connect(singleSensorSelect3.inlet, flowResistance1.inlet) annotation (Line( - points={{-120,118},{-126,118},{-126,96},{-120,96}}, + points={{-120,110},{-126,110},{-126,88},{-120,88}}, color={28,108,200}, thickness=0.5)); connect(singleSensorSelect4.inlet, flowResistance2.inlet) diff --git a/ThermofluidStream/Examples/ReverseHeatPump.mo b/ThermofluidStream/Examples/ReverseHeatPump.mo index 25ce4a3a..c9c6e89d 100644 --- a/ThermofluidStream/Examples/ReverseHeatPump.mo +++ b/ThermofluidStream/Examples/ReverseHeatPump.mo @@ -558,7 +558,7 @@ equation thickness=0.5)); connect(multiSensor_Tpm6.rear, TEVcooling.fore) annotation (Line( - points={{70,130},{60,130},{60,180},{50,180}}, + points={{70,130},{70,180},{50,180}}, color={28,108,200}, thickness=0.5)); connect(junctionT1_1.inletB, multiSensor_Tpm.outlet) diff --git a/ThermofluidStream/Examples/SimpleGasTurbine.mo b/ThermofluidStream/Examples/SimpleGasTurbine.mo index c067345b..c8d27fb2 100644 --- a/ThermofluidStream/Examples/SimpleGasTurbine.mo +++ b/ThermofluidStream/Examples/SimpleGasTurbine.mo @@ -72,8 +72,7 @@ model SimpleGasTurbine "Simple version of a Gas Turbine" Sensors.MultiSensor_Tp multiSensor_Tp2( redeclare package Medium = Medium, digits=3, - pressureUnit="bar") annotation (Placement(transformation(extent={{-104,0},{ - -84,20}}))); + pressureUnit="bar") annotation (Placement(transformation(extent={{-104,-4},{-84,16}}))); Modelica.Blocks.Continuous.LimPID PI( controllerType=Modelica.Blocks.Types.SimpleController.PI, k=2000, @@ -110,7 +109,7 @@ equation annotation (Line(points={{-110,-60},{-80,-60},{-80,-20}}, color={0,0,0})); connect(multiSensor_Tp2.inlet, source.outlet) annotation (Line( - points={{-104,10},{-110,10},{-110,-10},{-120,-10}}, + points={{-104,6},{-110,6},{-110,-10},{-120,-10}}, color={28,108,200}, thickness=0.5)); connect(speedSensor.flange, turbine.flange) diff --git a/ThermofluidStream/Examples/Utilities/Tests/Piston.mo b/ThermofluidStream/Examples/Utilities/Tests/Piston.mo index eeee89dc..85b00c00 100644 --- a/ThermofluidStream/Examples/Utilities/Tests/Piston.mo +++ b/ThermofluidStream/Examples/Utilities/Tests/Piston.mo @@ -56,8 +56,7 @@ model Piston "Test for Piston model" extent={{-10,-10},{10,10}}, rotation=0, origin={10,10}))); - FlowControl.Switch switch(redeclare package Medium = Medium, - initializeOneMassflowSplit=false) + FlowControl.Switch switch(redeclare package Medium = Medium, initializeOneMassflowSplit=true) annotation (Placement(transformation(extent={{-10,10},{10,-10}}, rotation=0, origin={-66,10}))); @@ -84,7 +83,6 @@ model Piston "Test for Piston model" Processes.FlowResistance flowResistance2( redeclare package Medium = Medium, m_flowStateSelect=StateSelect.prefer, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, computeL=false, L_value=1e-3, r=0.1, @@ -127,19 +125,17 @@ initial equation equation - connect(linearSpeedDependentForce.flange, piston2_1.flange) annotation (Line(points={{40,-50}, - {40,-50},{14,-50}}, color={0,127,0})); + connect(linearSpeedDependentForce.flange, piston2_1.flange) annotation (Line(points={{40,-50},{40,-50.2},{14,-50.2}}, color={0,127,0})); - connect(piston2_1.x_out, showRealValue.numberPort) annotation (Line(points={{10, - -54.8},{10,-72},{30,-72}}, color={0,0,127})); + connect(piston2_1.x_out, showRealValue.numberPort) annotation (Line(points={{10,-55},{10,-72},{30.5,-72}}, color={0,0,127})); connect(switchConnector.fore, piston2_1.port_left) annotation (Line( - points={{-10,-30},{-10,-45.8},{-6,-45.8}}, + points={{-10,-30},{-10,-46},{-6,-46}}, color={28,108,200}, thickness=0.5)); connect(switchConnector1.fore, piston2_1.port_right) annotation (Line( - points={{10,0},{10,-10},{20,-10},{20,-45.8},{14,-45.8}}, + points={{10,0},{10,-10},{20,-10},{20,-46},{14,-46}}, color={28,108,200}, thickness=0.5)); connect(pulse.y, firstOrder.u) annotation (Line(points={{-43,56},{-32,56}}, color={0,0,127})); diff --git a/ThermofluidStream/Examples/VenturiPump.mo b/ThermofluidStream/Examples/VenturiPump.mo index 2ac87bd1..627b5c28 100644 --- a/ThermofluidStream/Examples/VenturiPump.mo +++ b/ThermofluidStream/Examples/VenturiPump.mo @@ -88,8 +88,7 @@ model VenturiPump "Pumping of liquid water using the venturi effect" extent={{-10,-10},{10,10}}, rotation=270, origin={0,50}))); - inner DropOfCommons dropOfCommons(p_min(displayUnit="Pa") = 612, - displayInstanceNames=true) + inner DropOfCommons dropOfCommons(p_min(displayUnit="Pa") = 612, displayInstanceNames=false) annotation (Placement(transformation(extent={{-90,12},{-70,32}}))); ThermofluidStream.Utilities.Icons.DLRLogo dLRLogo annotation (Placement(transformation(extent={{82,62},{118,98}}))); equation diff --git a/ThermofluidStream/Examples/WaterHammer.mo b/ThermofluidStream/Examples/WaterHammer.mo index 99aa7fd6..9a9fc997 100644 --- a/ThermofluidStream/Examples/WaterHammer.mo +++ b/ThermofluidStream/Examples/WaterHammer.mo @@ -8,8 +8,7 @@ model WaterHammer "Pump water by using dynamic pressures" "Medium model" annotation(choicesAllMatching=true); - inner ThermofluidStream.DropOfCommons dropOfCommons(assertionLevel = AssertionLevel.warning, - displayInstanceNames=true) + inner ThermofluidStream.DropOfCommons dropOfCommons(assertionLevel = AssertionLevel.warning, displayInstanceNames=false) annotation (Placement(transformation(extent={{-100,60},{-80,80}}))); ThermofluidStream.Boundaries.Source source( redeclare package Medium = Medium, diff --git a/ThermofluidStream/FlowControl/MCV.mo b/ThermofluidStream/FlowControl/MCV.mo index 8602944e..afdc1f1c 100644 --- a/ThermofluidStream/FlowControl/MCV.mo +++ b/ThermofluidStream/FlowControl/MCV.mo @@ -154,6 +154,6 @@ equation

This component can be used to emulate a mass- or volume-flow regulated valve, depending on its mode.

The mass- or volume-flow-setpoint can be set or given by a real input signal, and the valve tries to enforce a PT1- dynamic on this setpoint, within its pressure limits. The valve will not create pressure, or let the outlet pressure drop below p_min. To avoid this, the internally integrated pressure-drop is clipped. If it is clipped and hence the setpoint cannot be reached, an optional output leaves its "zero" value and a visual wanring is shown (circle becomes red).

Documentation of the used equations:

-

+

")); end MCV; diff --git a/ThermofluidStream/HeatExchangers/Internal/PartialNTU.mo b/ThermofluidStream/HeatExchangers/Internal/PartialNTU.mo index c34a0fb7..3addbf88 100644 --- a/ThermofluidStream/HeatExchangers/Internal/PartialNTU.mo +++ b/ThermofluidStream/HeatExchangers/Internal/PartialNTU.mo @@ -9,7 +9,7 @@ partial model PartialNTU "Partial heat exchanger model using the epsilon-NTU met annotation (choicesAllMatching=true); parameter Modelica.Units.SI.Area A "Heat transfer area"; - parameter Modelica.Units.SI.CoefficientOfHeatTransfer k_NTU=50 "Overall heat transfer coefficient"; + parameter Modelica.Units.SI.CoefficientOfHeatTransfer k_NTU=50 "Thermal transmittance"; parameter Utilities.Units.Inertance L=dropOfCommons.L "Inertance" annotation (Dialog(tab="Advanced")); parameter Modelica.Units.SI.MassFlowRate m_flow_reg=dropOfCommons.m_flow_reg "Nominal mass flow rate for regularization" @@ -19,7 +19,7 @@ partial model PartialNTU "Partial heat exchanger model using the epsilon-NTU met // ------ Parameter Display Configuration ------------------------ parameter Boolean displayArea = true "= true, if the heat transfer area A is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); - parameter Boolean displaykNTU = true "= true, if the overall heat transfer coefficient k_NTU is displayed" + parameter Boolean displaykNTU = true "= true, if the thermal transmittance k_NTU is displayed" annotation(Dialog(tab="Layout",group="Display parameters",enable=displayParameters),Evaluate=true, HideResult=true, choices(checkBox=true)); final parameter Boolean d1A = displayParameters and displayArea "displayArea at position 1" annotation(Evaluate=true, HideResult=true); //d1A -> Display at position 1 A=Area @@ -53,7 +53,7 @@ partial model PartialNTU "Partial heat exchanger model using the epsilon-NTU met Modelica.Units.SI.SpecificEnthalpy dh_A "Specific enthalpy difference medium A"; Modelica.Units.SI.SpecificEnthalpy dh_B "Specific enthalpy difference medium B"; - SI.HeatFlowRate q_flow "Heat flow rate A to B (Q_flow)"; + SI.HeatFlowRate q_flow "Heat flow rate (Q_flow)"; Real effectiveness(unit="1") "Heat exchanger efficiency"; Real NTU(unit="1") "Number of transfer units"; @@ -78,9 +78,9 @@ protected Modelica.Units.SI.SpecificEnthalpy h_out_A "Specific enthalpy at outlet A"; Modelica.Units.SI.SpecificEnthalpy h_out_B "Specific enthalpy at outlet B"; - SI.HeatFlowRate q_max "Maximum heat flow rate A to B (Q_flow_max)"; - SI.HeatFlowRate q_flowA "Heat flow rate A to B (Q_flowA)"; - SI.HeatFlowRate q_flowB "Heat flow rate B to A (Q_flowB)"; + SI.HeatFlowRate q_max "Maximum heat flow rate (Q_max)"; + SI.HeatFlowRate q_flowA "Heat flow rate side A (Q_flowA)"; + SI.HeatFlowRate q_flowB "Heat flow rate side B (Q_flowB)"; Real C_A(unit="J/(K.s)") "Heat capacity flow rate of Medium A"; Real C_B(unit="J/(K.s)") "Heat capacity flow rate of Medium B"; @@ -166,6 +166,9 @@ equation //Based on regularization for mass flow dh_B = (m_flow_B*q_flowB)/(m_flow_B^2 + (m_flow_reg/10)^2); + der(h_out_A)*TC = h_in_A - dh_A - h_out_A; + der(h_out_B)*TC = h_in_B - dh_B - h_out_B; + else //No heat is transferred, if both mass flow rates are smaller than regularization mass flow rate @@ -180,10 +183,11 @@ equation //Based on regularization for mass flow dh_A = (m_flow_A*q_flowA)/(m_flow_A^2 + (m_flow_reg/10)^2); - end if; - der(h_out_A)*TC = h_in_A - dh_A - h_out_A; - der(h_out_B)*TC = h_in_B - dh_B - h_out_B; + der(h_out_A)*TC = h_in_A - dh_A - h_out_A; + der(h_out_B)*TC = h_in_B - dh_B - h_out_B; + + end if; outletA.state = MediumA.setState_phX( p_A, diff --git a/ThermofluidStream/HeatExchangers/Tests/CounterFlowNTU.mo b/ThermofluidStream/HeatExchangers/Tests/CounterFlowNTU.mo index a814e192..9fffed66 100644 --- a/ThermofluidStream/HeatExchangers/Tests/CounterFlowNTU.mo +++ b/ThermofluidStream/HeatExchangers/Tests/CounterFlowNTU.mo @@ -55,7 +55,7 @@ model CounterFlowNTU Medium = MediumB, outputMassFlowRate=false, temperatureUnit="degC") annotation (Placement(transformation(extent={{60,20},{40,40}}))); - inner DropOfCommons dropOfCommons + inner DropOfCommons dropOfCommons(displayInstanceNames=false, displayParameters=false) annotation (Placement(transformation(extent={{-158,-98},{-138,-78}}))); ThermofluidStream.HeatExchangers.CounterFlowNTU counterFlowNTU( redeclare package MediumA = MediumA, diff --git a/ThermofluidStream/HeatExchangers/Tests/CrossFlowNTU.mo b/ThermofluidStream/HeatExchangers/Tests/CrossFlowNTU.mo index b850240b..64bab039 100644 --- a/ThermofluidStream/HeatExchangers/Tests/CrossFlowNTU.mo +++ b/ThermofluidStream/HeatExchangers/Tests/CrossFlowNTU.mo @@ -65,7 +65,7 @@ model CrossFlowNTU annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90, origin={-10,32}))); - inner DropOfCommons dropOfCommons + inner DropOfCommons dropOfCommons(displayInstanceNames=false) annotation (Placement(transformation(extent={{-156,-98},{-136,-78}}))); ThermofluidStream.HeatExchangers.CrossFlowNTU crossFlowNTU( redeclare package MediumA = MediumA, diff --git a/ThermofluidStream/Processes/CentrifugalPump.mo b/ThermofluidStream/Processes/CentrifugalPump.mo index d12070df..95e60c6b 100644 --- a/ThermofluidStream/Processes/CentrifugalPump.mo +++ b/ThermofluidStream/Processes/CentrifugalPump.mo @@ -43,7 +43,7 @@ model CentrifugalPump "Model of a centrifugal pump" parameter SI.MassFlowRate m_flow_reg = dropOfCommons.m_flow_reg "Mass flow rate for regularization" annotation(Dialog(tab="Advanced")); - parameter SI.Power P_reg = 1 "Power for regularization (eta = 0 for P < P_reg)" + parameter SI.Power P_reg = dropOfCommons.m_flow_reg/1000*1e5 "Power for regularization (eta = 0 for P < eps_P)" annotation(Dialog(tab="Advanced")); // ------ Parameter Display Configuration ------------------------ @@ -174,14 +174,14 @@ equation if pumpMode == PumpMode.flowControlled or pumpMode == PumpMode.pressureControlled then w_n = 1/(2*c_head[1])*(-c_head[2]*V_n + sqrt(c_head[2]^2*V_n^2 - 4*c_head[1]*(c_head[3]*V_n^2 - h_n))); // To avoid systems of nonlinear equations the quadratic equation head_n = f(w_n) is solved for w_n explicitly elseif pumpMode == PumpMode.speedControlled or pumpMode == PumpMode.flange then - h_n = c_head[1]*w_n^2 + c_head[2]*abs(w_n)*V_n + c_head[3]*V_n*abs(V_n); // Simple extension for negative flow + h_n = c_head[1]*w_n^2 + c_head[2]*w_n*V_n + c_head[3]*V_n*abs(V_n); // Simple extension for negative flow end if; - tau_n = smooth(0, if noEvent(V_n > 0) then rho_n*(c_power[1]*w_n^2 + c_power[2]*abs(w_n)*V_n + c_power[3]*V_n^2) else rho_n*c_power[1]*w_n^2); // Simple extension for negative flow + tau_n = smooth(0, if noEvent(V_n > 0) then rho_n*(c_power[1]*w_n^2 + c_power[2]*w_n*V_n + c_power[3]*V_n^2) else rho_n*c_power[1]*w_n^2); // Simple extension for negative flow dp = head*rho*Modelica.Constants.g_n; P = tau*w; h_out = h_in + w_t; Xi_out = Xi_in; - eta_is = if noEvent(P >= P_reg) then dp*V_flow/P else 0; + eta_is = dp*V_flow/max(P,P_reg); w_t = P/max(m_flow,m_flow_reg); annotation (Icon(graphics={ Text(visible=displayInstanceName, @@ -318,11 +318,11 @@ further modifications are necessary.

", revisions=" -
    -
  • - May 2025, by Raphael Gebhart (raphael.gebhart@dlr.de):
    - Initial version. -
  • -
+
    +
  • +May 2025, by Raphael Gebhart (raphael.gebhart@dlr.de):
    +Initial version. +
  • +
")); end CentrifugalPump; diff --git a/ThermofluidStream/Processes/ConductionElement.mo b/ThermofluidStream/Processes/ConductionElement.mo index 8b81a643..61b34a86 100644 --- a/ThermofluidStream/Processes/ConductionElement.mo +++ b/ThermofluidStream/Processes/ConductionElement.mo @@ -3,17 +3,15 @@ model ConductionElement "Model of quasi-stationary mass and heat transfer" extends Internal.PartialConductionElement; - parameter Boolean useHeatTransferPropertyInput = false "= true, if input connector for either U or k_par is enabled" - annotation(Dialog(group="Thermal Conductance"),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter Boolean resistanceFromAU = true "= true, if thermal conductance is given by U*A" annotation(Dialog(group="Thermal Conductance"),Evaluate=true, HideResult=true, choices(checkBox=true)); parameter SI.Area A = 1 "Heat transfer area" annotation(Dialog(group="Thermal Conductance", enable=resistanceFromAU)); - parameter SI.CoefficientOfHeatTransfer U = 200 "Overall heat transfer coefficient" - annotation(Dialog(group="Thermal Conductance", enable=(resistanceFromAU and not useHeatTransferPropertyInput))); + parameter SI.CoefficientOfHeatTransfer U = 200 "Thermal transmittance" + annotation(Dialog(group="Thermal Conductance", enable=resistanceFromAU)); parameter SI.ThermalConductance k_par = 200 "Thermal conductance" - annotation(Dialog(group="Thermal Conductance", enable=(not resistanceFromAU and not useHeatTransferPropertyInput))); - //final parameter SI.ThermalConductance k_internal = if resistanceFromAU then A*U else k_par; + annotation(Dialog(group="Thermal Conductance", enable=not resistanceFromAU)); + final parameter SI.ThermalConductance k_internal = if resistanceFromAU then A*U else k_par; // ------ Parameter Display Configuration ------------------------ parameter Boolean displayVolume = true "= true, if volume V is displayed" @@ -31,71 +29,45 @@ model ConductionElement "Model of quasi-stationary mass and heat transfer" conductionString else "" annotation(Evaluate=true, HideResult=true); final parameter String conductionString= - if useHeatTransferPropertyInput and resistanceFromAU then "A=%A" - elseif not useHeatTransferPropertyInput and resistanceFromAU then "A=%A, U=%U" - elseif not useHeatTransferPropertyInput and not resistanceFromAU then "k=%k_par" - else "" annotation(Evaluate=true, HideResult=true); + if resistanceFromAU then "A=%A, U=%U" + else "k=%k_par" annotation(Evaluate=true, HideResult=true); //----------------------------------------------------------------- - Modelica.Blocks.Interfaces.RealInput U_var(unit = "W/(m2.K)") if (useHeatTransferPropertyInput and resistanceFromAU) "Overall heat transfer coefficient input connector [W/(m2.K)]" - annotation (Placement(transformation(extent={{-20,20},{20,-20}}, - rotation=90, - origin={-60,-120}))); - Modelica.Blocks.Interfaces.RealInput k_var(unit="W/K") if (useHeatTransferPropertyInput and not resistanceFromAU) "Thermal conductance input connector [W/K]" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=90, - origin={-60,-120}))); - -protected - Modelica.Blocks.Interfaces.RealInput U_internal(unit = "W/(m2.K)") "Internal connector for overall heat transfer coefficient"; - Modelica.Blocks.Interfaces.RealInput k_internal(unit="W/K") "Internal connector for thermal conductance"; - equation - connect(U_var, U_internal); - if resistanceFromAU and not useHeatTransferPropertyInput then - U_internal = U; - end if; - - connect(k_var, k_internal); - if not resistanceFromAU and not useHeatTransferPropertyInput then - k_internal = k_par; - end if; - - k_internal = A*U_internal; k = k_internal; + annotation (Icon(coordinateSystem(preserveAspectRatio=true), graphics={ Text( extent={{-150,-60},{150,-90}}, textColor={0,0,0}, textString=parameterString), + Line(visible=displayAnything, points={{0,-60},{0,-65}}, + color={191,0,0}), + Line(visible=displayAnything, points={{0,-85},{0,-100}}, + color={191,0,0}), Line( + visible=not displayAnything, points={{0,-60},{0,-100}}, - color={191,0,0}, - pattern=LinePattern.Dot), - Line(visible = useHeatTransferPropertyInput, - points={{-60,-100},{0,-100}}, color={0,0,127})}), + color={191,0,0})}), Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info=" -

- This model represents an element with a fixed volume (fig. 1). The mass inside the volume is assumed quasi-stationary, meaning it is computed statically using the volume and density, and the inlet mass flow is coupled to the outlet mass flow. -

-

- Because of this, the ConductionElement cannot be used as a loop breaker. -

-

- The advantage of this approach is that multiple ConductionElements can be connected in series without causing oscillations or fast eigenvalues between their masses. The ConductionElement implements conservation of mass and energy equations for the fluid contained within the component. -

-

- For further details, see the documentation of the base class Internal.PartialConductionElement. -

-

- The useHeatTransferPropertyInput option can be selected to enable input connectors for the overall heat transfer coefficient U or the thermal conductance k = U*A. The resistanceFromAU checkbox determines which quantity is activated: -

-
    -
  • useHeatTransferPropertyInput = true and resistanceFromAU = true: enables the U input (overall heat transfer coefficient)
  • -
  • useHeatTransferPropertyInput = true and resistanceFromAU = false: enables the k input (thermal conductance)
  • -
  • useHeatTransferPropertyInput = false and resistanceFromAU = true: enables the U parameter (overall heat transfer coefficient)
  • -
  • useHeatTransferPropertyInput = false and resistanceFromAU = false: enables the k parameter (thermal conductance)
  • -
+

+This model is an element with a fixed volume (fig. 1). The mass in the volume is +assumed quasi-stationary (statically computed with volume and density), and the +inlet massflow is coupled to the outlet massflow. +

+

+Because of this the ConductionElement cannot be used as a loop breaker. +

+

+The advantage is that multiple ConductionElements can be put behind each other +without worrying about oscillations or fast eigenvalues between their masses. +The ConductionElement implements equations for conservation of mass and energy +for the fluid mass contained in the component. +

+

+For further documentation see the documentation of the +motherclass. +

")); end ConductionElement; diff --git a/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/InternalCoefficients.mo b/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/InternalCoefficients.mo index 133bfc11..0978c90f 100644 --- a/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/InternalCoefficients.mo +++ b/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/InternalCoefficients.mo @@ -13,8 +13,8 @@ record InternalCoefficients "Coefficient record used in CentrifugalPump" parameter Real c_head[3] = {1,0.23,-1.23} "Coefficients of second order head approximation polynomial"; parameter Real c_power[3] = {0.20, 0.55,-0.28} "Coefficients of second order torque approximation polynomial (P=tau*w)"; - parameter SI.Power P_ref = rho_ref*Modelica.Constants.g_n*head_ref*V_flow_ref/eta_ref "Reference power"; - parameter SI.Torque tau_ref = P_ref/w_ref "Reference torque"; + final parameter SI.Power P_ref = rho_ref*Modelica.Constants.g_n*head_ref*V_flow_ref/eta_ref "Reference power"; + final parameter SI.Torque tau_ref = P_ref/w_ref "Reference torque"; annotation(defaultComponentPrefixes = "parameter", Documentation(info="

diff --git a/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromCoefficients.mo b/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromCoefficients.mo index 822059cc..cb7979ae 100644 --- a/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromCoefficients.mo +++ b/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromCoefficients.mo @@ -10,9 +10,7 @@ function internalCoefficientsFromCoefficients "Calculates InteralCoefficients re V_flow_ref=data.V_flow_peak, eta_ref=data.eta_peak, c_head={ch0,ch1,ch2}, - c_power={cp0,cp1,cp2}, - P_ref = data.rho_ref*Modelica.Constants.g_n*data.head_ref_internal* data.V_flow_peak/data.eta_peak, - tau_ref = data.rho_ref*Modelica.Constants.g_n*data.head_ref_internal* data.V_flow_peak/data.eta_peak/data.w_ref) "Internal pump coefficients"; + c_power={cp0,cp1,cp2}) "Internal pump coefficients"; protected Real ch0 = data.h_0n "First head coefficient"; diff --git a/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromMeasurements.mo b/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromMeasurements.mo index 54e4d9be..f0663b97 100644 --- a/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromMeasurements.mo +++ b/ThermofluidStream/Processes/Internal/CentrifugalPump/Auxiliaries/internalCoefficientsFromMeasurements.mo @@ -51,8 +51,6 @@ algorithm coefficients.V_flow_ref:=V_flow_ref; coefficients.c_head:=c_head; coefficients.c_power:=c_power; - coefficients.P_ref:=P_ref; - coefficients.tau_ref:=P_ref/data.w_ref; annotation (Documentation(info="

diff --git a/ThermofluidStream/Processes/Internal/CentrifugalPump/CalculateCoefficientsFromMeasurements.mo b/ThermofluidStream/Processes/Internal/CentrifugalPump/CalculateCoefficientsFromMeasurements.mo index 0b681fc5..9b8f5a9c 100644 --- a/ThermofluidStream/Processes/Internal/CentrifugalPump/CalculateCoefficientsFromMeasurements.mo +++ b/ThermofluidStream/Processes/Internal/CentrifugalPump/CalculateCoefficientsFromMeasurements.mo @@ -2,9 +2,7 @@ within ThermofluidStream.Processes.Internal.CentrifugalPump; model CalculateCoefficientsFromMeasurements "Determine and print pump coefficients based on measurements" extends Modelica.Icons.Example; import Modelica.Utilities.Streams.print; - replaceable parameter ThermofluidStream.Processes.Internal.CentrifugalPump.Measurements.Wilo.Stratos25slash1to4 measurements - constrainedby ThermofluidStream.Processes.Internal.CentrifugalPump.Measurements.GenericPump "Measurements" - annotation (Dialog(group="Data"), choicesAllMatching=true); + replaceable parameter ThermofluidStream.Processes.Internal.CentrifugalPump.Measurements.Wilo.CronolineIL80slash220dash4slash4 measurements "Measurements" annotation (Dialog(group="Data"), choicesAllMatching=true); final parameter ThermofluidStream.Processes.Internal.CentrifugalPump.Auxiliaries.InternalCoefficients c=ThermofluidStream.Processes.Internal.CentrifugalPump.Auxiliaries.internalCoefficientsFromMeasurements(measurements) "Pump coefficients internally used in the centrifugal pump model"; final parameter ThermofluidStream.Processes.Internal.CentrifugalPump.Coefficients.GenericPump coefficients=ThermofluidStream.Processes.Internal.CentrifugalPump.Auxiliaries.coefficientsFromInternalCoefficients(c); @@ -31,7 +29,7 @@ algorithm //print("Analytical zero = " + String(u_analytical[1], format="2.16f")); //print("Numerical zero = " + String(u_numerical[1], format="2.16f")); //print("Absolute difference = " + String(u_err[1], format="2.0e")); - annotation (experiment(StopTime=1.0, Tolerance=1e-6, Interval=1e-3, __Dymola_Algorithm="Dassl"), Documentation(revisions=" + annotation (Documentation(revisions="

  • May 2025, by Raphael Gebhart (raphael.gebhart@dlr.de):
    diff --git a/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLoss.mo b/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLoss.mo index b470d4d7..c6b92c85 100644 --- a/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLoss.mo +++ b/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLoss.mo @@ -54,7 +54,7 @@ algorithm

    Pressure loss according to Darcy–Weisbach, for laminar, transient and turbulent flow.

    In order to avoid a 0^0 for Re=0 (and therefore a = 1) in the computation of lambda_aux, we add epsilon=0.01 to Re to lower bound it in a smooth way.

    ks_input defines the pipe roughness. It can be selected from a list of materials or given directly.

    -

    +


    Cheng, Nian-Sheng (2008). Formulas for friction factor in transitional regimes. In:Journal of Hydraulic Engineering134.9, pp. 1357-1362

    Elmqvist, Hilding, Hubertus Tummescheit, and Martin Otter (2003). Object-orientedmodeling of thermo-fluid systems. In:3rd International Modelica Conference,pp. 269-286.

    ")); diff --git a/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLossHaaland.mo b/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLossHaaland.mo index 7bd7466a..be8dd9a8 100644 --- a/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLossHaaland.mo +++ b/ThermofluidStream/Processes/Internal/FlowResistance/laminarTurbulentPressureLossHaaland.mo @@ -54,7 +54,7 @@ algorithm //absolute Reynolds number Re_abs := abs(m_flow)*diameter/(area*mu); - Re_abs_limited := max(Re_small, Re_abs); + Re_abs_limited := max(Re_small, min(1, Re_abs)); friction_factor := (-1.8/n*log10((6.9/Re_abs_limited)^n + (relative_roughness/3.75)^(1.11*n)))^(-2); diff --git a/ThermofluidStream/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo b/ThermofluidStream/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo index 7f0348e3..0c1c1373 100644 --- a/ThermofluidStream/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo +++ b/ThermofluidStream/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo @@ -130,14 +130,14 @@ When pr < 1, the reciprocal pressure ratio 1/pr = p_inlet/p_ou is more interesting. It can be seen for different values of skew in fig. 2.

    - +

    Fig. 1: different skewness factors for omega/omega_ref=1. pressure ratio pr over m_dot/m_dot_ref

    - +

    Fig. 2: different skewness factors for omega/omega_ref=1. Reciprocal pressure ratio diff --git a/ThermofluidStream/Processes/Tests/CentrifugalPumpCharacteristics.mo b/ThermofluidStream/Processes/Tests/CentrifugalPumpCharacteristics.mo deleted file mode 100644 index 576a5e0c..00000000 --- a/ThermofluidStream/Processes/Tests/CentrifugalPumpCharacteristics.mo +++ /dev/null @@ -1,158 +0,0 @@ -within ThermofluidStream.Processes.Tests; -model CentrifugalPumpCharacteristics "Test model for CentrifugalPump" - extends Modelica.Icons.Example; - - replaceable package Medium = ThermofluidStream.Media.myMedia.Examples.TwoPhaseWater constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium - annotation(choicesAllMatching = true); - parameter Real w_n=0.2 "Normalized speed"; - parameter SI.Temperature T=293.15 - "Temperature"; - parameter SI.Pressure p=100000 - "Pressue"; - final parameter Medium.ThermodynamicState state = Medium.setState_pT(p,T); - final parameter SI.Density rho = Medium.density(state); - - inner ThermofluidStream.DropOfCommons dropOfCommons(displayInstanceNames=true, displayParameters=true) annotation (Placement(transformation(extent={{80,80},{100,100}}))); - ThermofluidStream.Boundaries.Source source( - redeclare package Medium = Medium, - p0_par=p, - T0_par=T) annotation (Placement(transformation(extent={{-130,20},{-110,40}}))); - Boundaries.Sink sink(redeclare package Medium = Medium, pressureFromInput=true) annotation (Placement(transformation(extent={{-10,20},{10,40}}))); - - ThermofluidStream.Processes.CentrifugalPump coefficients( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - dataFromMeasurements=false, - redeclare ThermofluidStream.Processes.Internal.CentrifugalPump.Coefficients.Wilo.Stratos25slash1to4 coefficients(rho_ref=rho), - redeclare ThermofluidStream.Processes.Internal.CentrifugalPump.Measurements.Wilo.Stratos25slash1to4 measurements, - pumpMode=ThermofluidStream.Processes.Internal.Types.PumpMode.speedControlled, - setpointFromInput=true, - P_reg=0.01, - phi(fixed=true)) annotation (Placement(transformation(extent={{-90,20},{-70,40}}))); - Modelica.Blocks.Sources.RealExpression rotationalSpeed(y=w_n*coefficients.coefficients.w_ref) annotation (Placement(transformation(extent={{-110,-10},{-90,10}}))); - Modelica.Blocks.Sources.Ramp massFlowRamp(height=coefficients.coefficients.V_flow_peak*coefficients.coefficients.V_0n*rho*w_n, duration=1) annotation (Placement(transformation(extent={{130,-10},{110,10}}))); - ThermofluidStream.Boundaries.Source source1( - redeclare package Medium = Medium, - p0_par=p, - T0_par=T) annotation (Placement(transformation(extent={{-130,-40},{-110,-20}}))); - Boundaries.Sink sink1(redeclare package Medium = Medium, pressureFromInput=true) annotation (Placement(transformation(extent={{-10,-40},{10,-20}}))); - ThermofluidStream.Processes.CentrifugalPump measurements( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - dataFromMeasurements=true, - redeclare ThermofluidStream.Processes.Internal.CentrifugalPump.Coefficients.Wilo.Stratos25slash1to4 coefficients(rho_ref=rho), - redeclare ThermofluidStream.Processes.Internal.CentrifugalPump.Measurements.Wilo.Stratos25slash1to4 measurements(rho_ref=rho), - pumpMode=ThermofluidStream.Processes.Internal.Types.PumpMode.speedControlled, - setpointFromInput=true, - P_reg=0.01, - phi(fixed=true)) annotation (Placement(transformation(extent={{-90,-20},{-70,-40}}))); - Sensors.SingleFlowSensor massFlowSensor( - displayInstanceName=true, - redeclare package Medium = Medium, - quantity=ThermofluidStream.Sensors.Internal.Types.MassFlowQuantities.m_flow_kgps, - outputValue=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); - Sensors.SingleFlowSensor singleFlowSensor1( - displayInstanceName=true, - redeclare package Medium = Medium, - quantity=ThermofluidStream.Sensors.Internal.Types.MassFlowQuantities.m_flow_kgps, - outputValue=true) annotation (Placement(transformation(extent={{-50,-40},{-30,-20}}))); - Modelica.Blocks.Continuous.PI PI( - k=-1e6, - T=0.1, - initType=Modelica.Blocks.Types.Init.InitialOutput, - y_start=p) annotation (Placement(transformation(extent={{50,20},{30,40}}))); - Modelica.Blocks.Math.Feedback feedback annotation (Placement(transformation(extent={{90,40},{70,20}}))); - Modelica.Blocks.Continuous.PI PI1( - k=-1e6, - T=0.1, - initType=Modelica.Blocks.Types.Init.InitialOutput, - y_start=p) annotation (Placement(transformation(extent={{50,-40},{30,-20}}))); - Modelica.Blocks.Math.Feedback feedback1 annotation (Placement(transformation(extent={{90,-20},{70,-40}}))); -equation - connect(source.outlet, coefficients.inlet) annotation (Line( - points={{-110,30},{-90,30}}, - color={28,108,200}, - thickness=0.5)); - connect(source1.outlet, measurements.inlet) annotation (Line( - points={{-110,-30},{-90,-30}}, - color={28,108,200}, - thickness=0.5)); - connect(rotationalSpeed.y, coefficients.setpoint_var) annotation (Line(points={{-89,0},{-80,0},{-80,22}}, color={0,0,127})); - connect(measurements.setpoint_var, rotationalSpeed.y) annotation (Line(points={{-80,-22},{-80,0},{-89,0}}, color={0,0,127})); - connect(coefficients.outlet, massFlowSensor.inlet) annotation (Line( - points={{-70,30},{-50,30}}, - color={28,108,200}, - thickness=0.5)); - connect(massFlowSensor.outlet, sink.inlet) annotation (Line( - points={{-30,30},{-10,30}}, - color={28,108,200}, - thickness=0.5)); - connect(measurements.outlet, singleFlowSensor1.inlet) annotation (Line( - points={{-70,-30},{-50,-30}}, - color={28,108,200}, - thickness=0.5)); - connect(singleFlowSensor1.outlet, sink1.inlet) annotation (Line( - points={{-30,-30},{-10,-30}}, - color={28,108,200}, - thickness=0.5)); - connect(sink.p0_var, PI.y) annotation (Line(points={{2,30},{29,30}}, color={0,0,127})); - connect(PI.u, feedback.y) annotation (Line(points={{52,30},{71,30}}, color={0,0,127})); - connect(feedback.u1, massFlowRamp.y) annotation (Line(points={{88,30},{101.5,30},{101.5,0},{109,0}}, - color={0,0,127})); - connect(feedback.u2, massFlowSensor.value_out) annotation (Line(points={{80,38},{80,50},{-20,50},{-20,36},{-32,36}}, color={0,0,127})); - connect(sink1.p0_var, PI1.y) annotation (Line(points={{2,-30},{29,-30}}, color={0,0,127})); - connect(PI1.u, feedback1.y) annotation (Line(points={{52,-30},{71,-30}}, color={0,0,127})); - connect(feedback1.u2, singleFlowSensor1.value_out) annotation (Line(points={{80,-22},{80,-10},{-20,-10},{-20,-24},{-32,-24}}, color={0,0,127})); - connect(massFlowRamp.y, feedback1.u1) annotation (Line(points={{109,0},{101.5,0},{101.5,-30},{88,-30}}, - color={0,0,127})); - annotation (experiment(StartTime=-0.1, StopTime=1.0, Tolerance=1e-6, Interval=1e-3, __Dymola_Algorithm="Dassl"), - Icon(coordinateSystem(extent={{-100,-80},{100,100}})), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-100},{140,100}}), graphics={Text( - extent={{-40,100},{38,82}}, - textColor={28,108,200}, - textString="Use the same pump (coefficients, measurements)")}), - experiment(StopTime=1), - Documentation(info=" -

    - Test model for centrifugal pump characteristics used in the - - CentrifugalPump - model. -

    - -

    - The model compares the measurements option - (dataFromMeasurements = true) with the coefficients option - (dataFromMeasurements = false). -

    - -

    - In particular, the pump pressure rise - measurements.dp is compared against - coefficients.dp for varying flow rates at design rotational speed. -

    - -

    - Time is used as a proxy for the mass flow rate (linear relation): time = 0 corresponds to zero mass flow rate, and time = 1 corresponds to the reference mass flow rate.
    - Time time < 0 is used for \"start up\". -

    - -

    - Time is used as a proxy for the mass flow rate (linear relation): time = 0 corresponds to zero mass flow rate, and time = 1 corresponds to the reference mass flow rate.
    - Time time < 0 is used for \"start up\". -

    - -

    - measurements and coefficients may differ slightly. - Their difference depends on the number of significant used to create the coeffiencts records, see - CalculateCoefficientsFromMeasurements. -

    -", revisions=" -
      -
    • - 2026, by Raphael Gebhart (raphael.gebhart@dlr.de):
      - Initial version. -
    • -
    -")); -end CentrifugalPumpCharacteristics; diff --git a/ThermofluidStream/Processes/Tests/ConductionElementVariable.mo b/ThermofluidStream/Processes/Tests/ConductionElementVariable.mo deleted file mode 100644 index ceacf020..00000000 --- a/ThermofluidStream/Processes/Tests/ConductionElementVariable.mo +++ /dev/null @@ -1,218 +0,0 @@ -within ThermofluidStream.Processes.Tests; -model ConductionElementVariable - "Test the thermal conduction of ConductionElement, could be removed" - extends Modelica.Icons.Example; - replaceable package Medium = ThermofluidStream.Media.myMedia.Examples.TwoPhaseWater constrainedby - Media.myMedia.Interfaces.PartialMedium "Medium model" - annotation (choicesAllMatching=true, Documentation(info=" -

    -Medium package used in the Source. Make sure it is the same as the one -the inlet the source is connected to. -

    -")); - - Boundaries.Source source( - redeclare package Medium = Medium, - p0_par=200000, T0_par=293.15) - annotation (Placement(transformation(extent={{-240,40},{-220,60}}))); - Boundaries.Sink sink(redeclare package Medium = Medium, - p0_par=100000) annotation (Placement(transformation(extent={{-100,40},{-80,60}}))); - Processes.FlowResistance flowResistance( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=0, k2=1e5) "Linear-quadratic", - l=10, - r=0.01) - annotation (Placement(transformation(extent={{-200,40},{-180,60}}))); - - Processes.ConductionElement conductionElement(redeclare package Medium = Medium) - annotation (Placement(transformation(extent={{-140,40},{-120,60}}))); - inner DropOfCommons dropOfCommons(displayInstanceNames=true, displayParameters=true) - annotation (Placement(transformation(extent={{-20,182},{0,202}}))); - Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T=323.15) - annotation (Placement(transformation(extent={{-240,-10},{-220,10}}))); - Boundaries.Source source1( - redeclare package Medium = Medium, - p0_par=200000, - T0_par=293.15) - annotation (Placement(transformation(extent={{-240,-60},{-220,-40}}))); - Boundaries.Sink sink1(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); - Processes.FlowResistance flowResistance1( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=0, k2=1e5) "Linear-quadratic", - l=10, - r=0.01) - annotation (Placement(transformation(extent={{-200,-60},{-180,-40}}))); - Processes.ConductionElement conductionElement1(redeclare package Medium = Medium, resistanceFromAU=false) - annotation (Placement(transformation(extent={{-140,-40},{-120,-60}}))); - Boundaries.Source source2( - redeclare package Medium = Medium, - p0_par=200000, - T0_par=293.15) - annotation (Placement(transformation(extent={{-60,40},{-40,60}}))); - Boundaries.Sink sink2(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{80,40},{100,60}}))); - Processes.FlowResistance flowResistance2( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=0, k2=1e5) "Linear-quadratic", - l=10, - r=0.01) - annotation (Placement(transformation(extent={{-20,40},{0,60}}))); - Processes.ConductionElement conductionElement2( - redeclare package Medium = Medium, - useHeatTransferPropertyInput=true, - A=2) annotation (Placement(transformation(extent={{40,40},{60,60}}))); - Modelica.Blocks.Sources.RealExpression heatTransferCoefficient(y=100) - annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - Boundaries.Source source3( - redeclare package Medium = Medium, - p0_par=200000, - T0_par=293.15) - annotation (Placement(transformation(extent={{-60,-40},{-40,-60}}))); - Boundaries.Sink sink3(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{80,-40},{100,-60}}))); - Processes.FlowResistance flowResistance3( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=0, k2=1e5) "Linear-quadratic", - l=10, - r=0.01) - annotation (Placement(transformation(extent={{-20,-40},{0,-60}}))); - Processes.ConductionElement conductionElement3( - redeclare package Medium = Medium, - useHeatTransferPropertyInput=true, - resistanceFromAU=false, - A=2) annotation (Placement(transformation(extent={{40,-40},{60,-60}}))); - Modelica.Blocks.Sources.RealExpression thermalConductance(y=200) - annotation (Placement(transformation(extent={{-20,-14},{0,-34}}))); - Boundaries.Source source4( - redeclare package Medium = Medium, - p0_par=200000, - T0_par=293.15) - annotation (Placement(transformation(extent={{120,40},{140,60}}))); - Boundaries.Sink sink4(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{260,40},{280,60}}))); - Processes.FlowResistance flowResistance4( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=0, k2=1e5) "Linear-quadratic", - l=10, - r=0.01) - annotation (Placement(transformation(extent={{160,40},{180,60}}))); - Processes.ConductionElement conductionElement4( - redeclare package Medium = Medium, - useHeatTransferPropertyInput=true, - A=2) annotation (Placement(transformation(extent={{220,40},{240,60}}))); - Modelica.Blocks.Sources.Step heatTransferCoefficient_step( - height=100, - offset=100, - startTime=5) annotation (Placement(transformation(extent={{160,10},{180,30}}))); -equation - connect(source.outlet, flowResistance.inlet) - annotation (Line( - points={{-220,50},{-200,50}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance.outlet, conductionElement.inlet) - annotation (Line( - points={{-180,50},{-140,50}}, - color={28,108,200}, - thickness=0.5)); - connect(conductionElement.outlet, sink.inlet) - annotation (Line( - points={{-120,50},{-100,50}}, - color={28,108,200}, - thickness=0.5)); - connect(fixedTemperature.port, conductionElement.heatPort) - annotation (Line(points={{-220,0},{-130,0},{-130,40}}, color={191,0,0})); - connect(source1.outlet, flowResistance1.inlet) - annotation (Line( - points={{-220,-50},{-200,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance1.outlet, conductionElement1.inlet) - annotation (Line( - points={{-180,-50},{-140,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(conductionElement1.outlet, sink1.inlet) - annotation (Line( - points={{-120,-50},{-100,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(fixedTemperature.port, conductionElement1.heatPort) - annotation (Line(points={{-220,0},{-130,0},{-130,-40}}, color={191,0,0})); - connect(source2.outlet, flowResistance2.inlet) - annotation (Line( - points={{-40,50},{-20,50}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance2.outlet, conductionElement2.inlet) - annotation (Line( - points={{0,50},{40,50}}, - color={28,108,200}, - thickness=0.5)); - connect(conductionElement2.outlet, sink2.inlet) - annotation (Line( - points={{60,50},{80,50}}, - color={28,108,200}, - thickness=0.5)); - connect(heatTransferCoefficient.y, conductionElement2.U_var) - annotation (Line(points={{1,30},{44,30},{44,38}}, color={0,0,127})); - connect(source3.outlet, flowResistance3.inlet) - annotation (Line( - points={{-40,-50},{-20,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance3.outlet, conductionElement3.inlet) - annotation (Line( - points={{0,-50},{40,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(conductionElement3.outlet, sink3.inlet) - annotation (Line( - points={{60,-50},{80,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(thermalConductance.y, conductionElement3.k_var) - annotation (Line(points={{1,-24},{44,-24},{44,-38}}, color={0,0,127})); - connect(source4.outlet, flowResistance4.inlet) - annotation (Line( - points={{140,50},{160,50}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance4.outlet, conductionElement4.inlet) - annotation (Line( - points={{180,50},{220,50}}, - color={28,108,200}, - thickness=0.5)); - connect(conductionElement4.outlet, sink4.inlet) - annotation (Line( - points={{240,50},{260,50}}, - color={28,108,200}, - thickness=0.5)); - connect(heatTransferCoefficient_step.y, conductionElement4.U_var) - annotation (Line(points={{181,20},{224,20},{224,38}}, color={0,0,127})); - connect(conductionElement2.heatPort, fixedTemperature.port) - annotation (Line(points={{50,40},{50,0},{-220,0}}, color={191,0,0})); - connect(conductionElement3.heatPort, fixedTemperature.port) - annotation (Line(points={{50,-40},{50,0},{-220,0}}, color={191,0,0})); - connect(conductionElement4.heatPort, fixedTemperature.port) - annotation (Line(points={{230,40},{230,0},{-220,0}}, color={191,0,0})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false, - extent={{-300,-200},{300,200}})), - Documentation(info=" -

    - This test verifies the four possible ways to define the thermal conductance: - resistanceFromAU = true/false and useHeatTransferPropertyInput = true/false. - All four configurations produce the same result in a simple test and do not generate warnings or errors. -

    - -

    - Additionally, the test confirms that a step change in the heat transfer coefficient is handled correctly. -

    -")); -end ConductionElementVariable; diff --git a/ThermofluidStream/Processes/Tests/package.order b/ThermofluidStream/Processes/Tests/package.order index 7c0a950b..558c75ac 100644 --- a/ThermofluidStream/Processes/Tests/package.order +++ b/ThermofluidStream/Processes/Tests/package.order @@ -1,13 +1,11 @@ Flow_Resistance CentrifugalPump -CentrifugalPumpCharacteristics Pump Compressor Turbine ConvectivePipe ConvectivePipe_serial ConductionElement -ConductionElementVariable TransportDelay Nozzle Power diff --git a/ThermofluidStream/Processes/TransportDelay.mo b/ThermofluidStream/Processes/TransportDelay.mo index 9d72c71b..9492f9e7 100644 --- a/ThermofluidStream/Processes/TransportDelay.mo +++ b/ThermofluidStream/Processes/TransportDelay.mo @@ -75,7 +75,7 @@ equation annotation (Documentation(info="

    Delays the temperature and massFraction, not pressure, since pressure differences propagate with speed of sound, and since delaying only steady state pressure p not inertial pressure r might lead to undesirable behavior.

    Note that this component uses the spatialDistribution operator, that has some artefacts (see Fig. 1) for high and low non-dimensional speeds v (possibly due to inerpolation or extrapolation of the function). Therefore minimum and maximum speed in the non-dimensional coordinate x (inlet @ x=0, outlet @ x=1) is limited. The default limits are [0.01, 50], so the delay is limited by default to [0.02s, 100s]. This limit can be adjusted in the advanced parameters tab.

    -

    +

    Fig. 1: artefacts of the TransportDelay

    "), Icon(coordinateSystem(preserveAspectRatio=true), graphics={ diff --git a/ThermofluidStream/Processes/package.order b/ThermofluidStream/Processes/package.order index 89f88769..9ec7eff3 100644 --- a/ThermofluidStream/Processes/package.order +++ b/ThermofluidStream/Processes/package.order @@ -9,6 +9,6 @@ Fan ThermalConvectionPipe ConductionElement Nozzle -StaticHead Internal Tests +StaticHead diff --git a/ThermofluidStream/Resources/Doku/ThermofluidStream.FlowControl.MCV.png b/ThermofluidStream/Resources/Doku/ThermofluidStream.FlowControl.MCV.PNG similarity index 100% rename from ThermofluidStream/Resources/Doku/ThermofluidStream.FlowControl.MCV.png rename to ThermofluidStream/Resources/Doku/ThermofluidStream.FlowControl.MCV.PNG diff --git a/ThermofluidStream/Resources/Doku/ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss.png b/ThermofluidStream/Resources/Doku/ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss.PNG similarity index 100% rename from ThermofluidStream/Resources/Doku/ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss.png rename to ThermofluidStream/Resources/Doku/ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss.PNG diff --git a/ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio.png b/ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio.PNG similarity index 100% rename from ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio.png rename to ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio.PNG diff --git a/ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio2.png b/ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio2.PNG similarity index 100% rename from ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio2.png rename to ThermofluidStream/Resources/Doku/ThermofluidStream.Topology.Internal.SplitterRatio2.PNG diff --git a/ThermofluidStream/Topology/Internal.mo b/ThermofluidStream/Topology/Internal.mo index cc166a67..071dd3d2 100644 --- a/ThermofluidStream/Topology/Internal.mo +++ b/ThermofluidStream/Topology/Internal.mo @@ -157,7 +157,7 @@ package Internal Diagram(coordinateSystem(preserveAspectRatio=true)), Documentation(info="


    Splitter, that uses a directly set split ratio. In order to have stationary r that goes to zero, a pressure difference between outlet A and B is calculated, that is applied to one of the outlets, until r->0.


    The idear builds on the splitter with an enforeced regime of Zimmer Real-Time Simulation of an Aircraft Electric Driven Environmental Control System for Virtual Testing Purposes Sec 3.4

    -

    +

    ")); end SplitterRatio; diff --git a/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEX.mo b/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEX.mo index 6e7eea74..aa3f7900 100644 --- a/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEX.mo +++ b/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEX.mo @@ -30,8 +30,7 @@ model TestDiscretizedHEX pressureFromInput=true, h0_par=300e3, T0_par=278.15, - p0_par=400000) annotation (Placement(transformation(extent={{-74,-20},{-94, - 0}}))); + p0_par=400000) annotation (Placement(transformation(extent={{-82,0},{-102,20}}))); Boundaries.BoundaryRear boundary_rear1( redeclare package Medium = MediumRefrigerant, setEnthalpy=true, @@ -84,7 +83,7 @@ model TestDiscretizedHEX l=1, redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss ( material=ThermofluidStream.Processes.Internal.Material.steel)) - annotation (Placement(transformation(extent={{-42,-20},{-62,0}}))); + annotation (Placement(transformation(extent={{-50,0},{-70,20}}))); Modelica.Blocks.Continuous.PI PI1( k=-10000, T=0.1, @@ -112,7 +111,7 @@ model TestDiscretizedHEX redeclare package Medium = MediumRefrigerant, temperatureUnit="degC", pressureUnit="bar") - annotation (Placement(transformation(extent={{-18,-10},{-38,-30}}))); + annotation (Placement(transformation(extent={{-20,10},{-40,-10}}))); Modelica.Blocks.Continuous.PI PI( k=10000, T=0.001, @@ -134,13 +133,12 @@ model TestDiscretizedHEX height=-26e5, duration=10, offset=30e5, - startTime=15) annotation (Placement(transformation(extent={{-120,-14},{-100, - 6}}))); + startTime=15) annotation (Placement(transformation(extent={{-148,6},{-128,26}}))); equation connect(boundary_rear.p0_var, const1.y) annotation (Line(points={{-84,28},{-92,28},{-92,32},{-99,32}}, color={0,0,127})); connect(boundary_fore1.rear, flowResistanceB.fore) annotation (Line( - points={{-74,-10},{-62,-10}}, + points={{-82,10},{-70,10}}, color={28,108,200}, thickness=0.5)); connect(PI1.y,limiter1. u) annotation (Line(points={{115,56},{136,56},{136,28},{127.2,28}}, @@ -155,7 +153,7 @@ equation color={28,108,200}, thickness=0.5)); connect(multiSensor_Tpm3.fore, flowResistanceB.rear) annotation (Line( - points={{-38,-10},{-42,-10}}, + points={{-40,10},{-50,10}}, color={28,108,200}, thickness=0.5)); connect(feedback.y,PI. u) @@ -177,12 +175,11 @@ equation points={{-38,22},{-42,22}}, color={28,108,200}, thickness=0.5)); - connect(boundary_fore1.p0_var, ramp3.y) annotation (Line(points={{-86,-4},{ - -99,-4}}, color={0,0,127})); + connect(boundary_fore1.p0_var, ramp3.y) annotation (Line(points={{-94,16},{-127,16}}, color={0,0,127})); connect(ramp2.y, feedback1.u1) annotation (Line(points={{9,56},{40,56}}, color={0,0,127})); connect(feedback.u1, ramp1.y) annotation (Line(points={{0,-48},{-19,-48}}, color={0,0,127})); connect(discretizedHEX.foreB, multiSensor_Tpm3.rear) annotation (Line( - points={{-14,10},{-16,10},{-16,-10},{-18,-10}}, + points={{-14,10},{-20,10}}, color={28,108,200}, thickness=0.5)); connect(multiSensor_Tpm.fore, discretizedHEX.rearA) annotation (Line( diff --git a/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEXvsDir.mo b/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEXvsDir.mo index 230a7842..c141aa77 100644 --- a/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEXvsDir.mo +++ b/ThermofluidStream/Undirected/HeatExchangers/Tests/TestDiscretizedHEXvsDir.mo @@ -18,8 +18,7 @@ model TestDiscretizedHEXvsDir Boundaries.BoundaryRear boundary_rear( redeclare package Medium = MediumAir, pressureFromInput=true, - T0_par=311.15) annotation (Placement(transformation(extent={{-114,210},{-94, - 230}}))); + T0_par=311.15) annotation (Placement(transformation(extent={{-104,196},{-84,216}}))); Boundaries.BoundaryFore boundary_fore( redeclare package Medium = MediumAir, pressureFromInput=true, @@ -42,7 +41,7 @@ model TestDiscretizedHEXvsDir Sensors.MultiSensor_Tpm multiSensor_Tpm(redeclare package Medium = MediumAir, temperatureUnit="degC", pressureUnit="bar") - annotation (Placement(transformation(extent={{-50,220},{-30,240}}))); + annotation (Placement(transformation(extent={{-40,206},{-20,226}}))); Sensors.MultiSensor_Tpm multiSensor_Tpm1(redeclare package Medium = MediumAir, temperatureUnit="degC", pressureUnit="bar", @@ -55,13 +54,12 @@ model TestDiscretizedHEXvsDir l=1, redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss ( material=ThermofluidStream.Processes.Internal.Material.steel)) - annotation (Placement(transformation(extent={{-86,210},{-66,230}}))); + annotation (Placement(transformation(extent={{-76,196},{-56,216}}))); Modelica.Blocks.Sources.Ramp rampPressure( height=1e5, duration=1, offset=1e5, - startTime=15) annotation (Placement(transformation(extent={{-164,222},{-144, - 242}}))); + startTime=15) annotation (Placement(transformation(extent={{-138,206},{-118,226}}))); inner DropOfCommons dropOfCommons annotation (Placement(transformation(extent={{76,258},{96,278}}))); Modelica.Blocks.Sources.Ramp ramp1( height=-0.5, @@ -89,7 +87,7 @@ model TestDiscretizedHEXvsDir l=1, redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss ( material=ThermofluidStream.Processes.Internal.Material.steel)) - annotation (Placement(transformation(extent={{-66,184},{-86,204}}))); + annotation (Placement(transformation(extent={{-46,184},{-66,204}}))); Modelica.Blocks.Continuous.PI PI1( k=-10000, T=0.1, @@ -107,7 +105,7 @@ model TestDiscretizedHEXvsDir annotation (Placement(transformation(extent={{40,194},{20,174}}))); Sensors.MultiSensor_Tpm multiSensor_Tpm3( redeclare package Medium = MediumRefrigerant, temperatureUnit="degC") - annotation (Placement(transformation(extent={{-30,194},{-50,174}}))); + annotation (Placement(transformation(extent={{-20,194},{-40,174}}))); Modelica.Blocks.Continuous.PI PI( k=10000, T=0.001, @@ -412,7 +410,7 @@ model TestDiscretizedHEXvsDir startTime=15) annotation (Placement(transformation(extent={{-6,230},{14,250}}))); equation connect(boundary_fore1.rear, flowResistanceB.fore) annotation (Line( - points={{-94,194},{-86,194}}, + points={{-94,194},{-66,194}}, color={28,108,200}, thickness=0.5)); connect(PI1.y,limiter1. u) annotation (Line(points={{117,240},{138,240},{138,212},{127.2,212}}, @@ -429,7 +427,7 @@ equation color={28,108,200}, thickness=0.5)); connect(multiSensor_Tpm3.fore, flowResistanceB.rear) annotation (Line( - points={{-50,194},{-66,194}}, + points={{-40,194},{-46,194}}, color={28,108,200}, thickness=0.5)); connect(feedback.y,PI. u) @@ -444,11 +442,11 @@ equation color={28,108,200}, thickness=0.5)); connect(boundary_rear.fore, flowResistanceA.rear) annotation (Line( - points={{-94,220},{-86,220}}, + points={{-84,206},{-76,206}}, color={28,108,200}, thickness=0.5)); connect(multiSensor_Tpm.rear, flowResistanceA.fore) annotation (Line( - points={{-50,220},{-66,220}}, + points={{-40,206},{-56,206}}, color={28,108,200}, thickness=0.5)); connect(ramp1.y, feedback.u1) annotation (Line(points={{-13,136},{2,136}}, color={0,0,127})); @@ -485,7 +483,7 @@ equation color={28,108,200}, thickness=0.5)); connect(sourceB.outlet,multiSensor_Tpm7. inlet) annotation (Line( - points={{-58,-30},{-58,-40},{-44,-40},{-44,-50},{-40,-50}}, + points={{-58,-30},{-58,-50},{-40,-50}}, color={28,108,200}, thickness=0.5)); connect(PI2.y, limiter2.u) annotation (Line(points={{-43,16},{-52,16},{-52,5.2}}, color={0,0,127})); @@ -616,15 +614,15 @@ equation color={28,108,200}, thickness=0.5)); connect(limiter4.y, sourceB1.p0_var) annotation (Line(points={{76.6,-244},{86,-244},{86,-208}}, color={0,0,127})); - connect(rampPressure.y, boundary_rear.p0_var) annotation (Line(points={{-143, - 232},{-120,232},{-120,226},{-106,226}}, color={0,0,127})); + connect(rampPressure.y, boundary_rear.p0_var) annotation (Line(points={{-117,216},{-106,216},{-106,212},{-96,212}}, + color={0,0,127})); connect(feedback1.u1, rampMassflow.y) annotation (Line(points={{42,240},{15,240}}, color={0,0,127})); connect(discretizedHEXUndir.rearA, multiSensor_Tpm.fore) annotation (Line( - points={{-12,206},{-12,208},{-30,208},{-30,220}}, + points={{-12,206},{-20,206}}, color={28,108,200}, thickness=0.5)); connect(discretizedHEXUndir.foreB, multiSensor_Tpm3.rear) annotation (Line( - points={{-12,194},{-30,194}}, + points={{-12,194},{-20,194}}, color={28,108,200}, thickness=0.5)); connect(discretizedHEXUndir.rearB, multiSensor_Tpm2.fore) annotation (Line( diff --git a/ThermofluidStream/Undirected/Processes/TransportDelay.mo b/ThermofluidStream/Undirected/Processes/TransportDelay.mo index 1ea49840..b45f64a8 100644 --- a/ThermofluidStream/Undirected/Processes/TransportDelay.mo +++ b/ThermofluidStream/Undirected/Processes/TransportDelay.mo @@ -86,7 +86,7 @@ equation

    Undirected implementation of the transport delay.

    Delays the temperature and massFraction, not pressure, since pressure differences propagate with speed of sound, and since delaying only steady state pressure p not inertial pressure r might lead to undesirable behavior.

    Note that this component uses the spatialDistribution operator, that has some artefacts (see Fig. 1) for high and low non-dimensional speeds v (possibly due to inerpolation or extrapolation of the function). Therefore minimum and maximum speed in the non-dimensional coordinate x (inlet @ x=0, outlet @ x=1) is limited. The default limits are [0.01, 50], so the delay is limited by default to [0.02s, 100s]. This limit can be adjusted in the advanced parameters tab.

    -

    +

    Fig. 1: artefacts of the TransportDelay

    "), Icon(coordinateSystem(preserveAspectRatio=true), graphics={ diff --git a/ThermofluidStream/Utilities/showRealValue.mo b/ThermofluidStream/Utilities/showRealValue.mo index 5f772971..8472d82e 100644 --- a/ThermofluidStream/Utilities/showRealValue.mo +++ b/ThermofluidStream/Utilities/showRealValue.mo @@ -61,7 +61,7 @@ name of the variable value that is displayed is also shown below the icon):

    -\"RealValue.png\"

    diff --git a/ThermofluidStream/package.mo b/ThermofluidStream/package.mo index f92344c3..52efbe72 100644 --- a/ThermofluidStream/package.mo +++ b/ThermofluidStream/package.mo @@ -22,20 +22,7 @@ package ThermofluidStream "Library for the modeling of thermofluid streams" from( version="0.2.1", to="0.3.0", - script="modelica://ThermofluidStream/Resources/Scripts/Conversion/ConvertTFS_from_0.2.1_to_0.3.0.mos.mos"), - from( - version="1.1.0", - to="Intermediate", - change( - item=convertClass("ThermofluidStream.TestConductionElement", "ThermofluidStream.TestConductionElementIcon"), - item=convertElement("ThermofluidStream.TestConductionElement", "realExpression", "heatTransferCoefficient"), - item=convertElement("ThermofluidStream.TestConductionElement", "heatTransferCoefficient1", - "thermalTransmittance"), - item=convertElement("ThermofluidStream.TestConductionElement", "step", "heatTransferCoefficient_step"), - item=convertClass("ThermofluidStream.TestConductionElement", - "ThermofluidStream.Processes.Tests.TestConductionElement"), - item=convertClass("ThermofluidStream.Processes.Tests.TestConductionElement", - "ThermofluidStream.Processes.Tests.ConductionElement2")))), + script="modelica://ThermofluidStream/Resources/Scripts/Conversion/ConvertTFS_from_0.2.1_to_0.3.0.mos.mos")), Documentation(info="

    The DLR ThermofluidStream Library is a free open-source library for the diff --git a/doc/VideoThermoFluidCover.png b/doc/VideoThermoFluidCover.PNG similarity index 100% rename from doc/VideoThermoFluidCover.png rename to doc/VideoThermoFluidCover.PNG