From 51a2568bc1e71978c2887d9167292b1a7395ee73 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Fri, 16 May 2025 17:17:21 +0200
Subject: [PATCH 001/213] #125 Initial commit for MediumImplementation in
ThermoSysPro
---
.../SimpleExamples/TestAirHumidity.mo | 55 --
.../Fluid/Examples/SimpleExamples/TestBend.mo | 49 --
.../SimpleExamples/TestBoilerSystem.mo | 69 --
.../TestCHPEngineBarkantineSystem.mo | 49 --
.../SimpleExamples/TestCentrifugalPump1.mo | 86 ---
.../Examples/SimpleExamples/TestCheckValve.mo | 101 ---
.../SimpleExamples/TestCombustionTurbine.mo | 66 --
.../Examples/SimpleExamples/TestCompressor.mo | 61 --
.../Examples/SimpleExamples/TestDiaphragm.mo | 50 --
.../TestDiffusion_DynamicOnePhaseFlowPipe.mo | 140 ----
...TestDiffusion_DynamicPlateHeatExchanger.mo | 62 --
.../TestDiffusion_DynamicTwoPhaseFlowPipe.mo | 187 -----
.../SimpleExamples/TestDiffusion_VolumeA.mo | 71 --
.../SimpleExamples/TestDynamicCheckValve.mo | 58 --
.../SimpleExamples/TestDynamicCondenser.mo | 119 ---
.../SimpleExamples/TestDynamicDrum.mo | 183 -----
.../SimpleExamples/TestDynamicDrum_CC.mo | 190 -----
...DynamicFlueGasesMultiFluidHeatExchanger.mo | 89 ---
.../TestDynamicMultiFluidHeatExchanger.mo | 85 --
...TestDynamicMultiFluidHeatExchangerShell.mo | 87 ---
.../TestDynamicOnePhaseFlowPipe.mo | 62 --
.../TestDynamicOnePhaseFlowShell.mo | 80 --
.../TestDynamicPlateHeatExchanger.mo | 89 ---
.../SimpleExamples/TestDynamicReliefValve.mo | 103 ---
.../TestDynamicTwoPhaseFlowPipe.mo | 120 ---
.../TestDynamicTwoPhaseFlowRiser.mo | 79 --
.../SimpleExamples/TestDynamicWaterHeating.mo | 306 --------
.../TestDynamicWaterHeatingOnePipe.mo | 298 -------
...ynamicWaterSteamMultiFluidHeatExchanger.mo | 84 --
.../TestFixedPowerHeatExchanger.mo | 53 --
.../SimpleExamples/TestFossilFuelBoiler.mo | 82 --
.../SimpleExamples/TestFresnelField.mo | 172 -----
.../SimpleExamples/TestGTCombustionChamber.mo | 83 --
.../Examples/SimpleExamples/TestGasTurbine.mo | 105 ---
.../SimpleExamples/TestGenericCombustion.mo | 86 ---
.../SimpleExamples/TestGenericCombustion1D.mo | 144 ----
.../SimpleExamples/TestGridFurnace.mo | 90 ---
.../SimpleExamples/TestHeatPumpCompressor.mo | 53 --
.../SimpleExamples/TestIdealCheckValve.mo | 111 ---
.../SimpleExamples/TestIdealSwitchValve.mo | 65 --
.../TestInternalCombustionEngine.mo | 113 ---
.../TestInvSingularPressureLoss.mo | 38 -
.../Examples/SimpleExamples/TestJunctions1.mo | 115 ---
.../Examples/SimpleExamples/TestJunctions2.mo | 131 ----
.../Examples/SimpleExamples/TestJunctions3.mo | 121 ---
.../Examples/SimpleExamples/TestJunctions4.mo | 59 --
.../SimpleExamples/TestLoopBreaker.mo | 73 --
.../SimpleExamples/TestMassFlowMultiplier.mo | 47 --
.../SimpleExamples/TestNTUWaterHeater0.mo | 105 ---
.../SimpleExamples/TestPostCombustionGas.mo | 93 ---
.../SimpleExamples/TestPressurizer.mo | 149 ----
.../Fluid/Examples/SimpleExamples/TestRefP.mo | 62 --
.../Examples/SimpleExamples/TestRefP1.mo | 56 --
.../Examples/SimpleExamples/TestSensors.mo | 61 --
.../TestSimpleDynamicCondenser.mo | 122 ---
.../TestSimpleDynamicCondenser1.mo | 95 ---
...TestSimpleEvaporatorWaterSteamFlueGases.mo | 71 --
.../TestSimpleStaticCondenser.mo | 53 --
.../TestSingularPressureLoss.mo | 51 --
.../SimpleExamples/TestStaticAerocondenser.mo | 97 ---
.../TestStaticCentrifugalPump1.mo | 52 --
.../SimpleExamples/TestStaticCondenser.mo | 123 ---
.../SimpleExamples/TestStaticCondenserHEI.mo | 126 ---
.../SimpleExamples/TestStaticDrum1.mo | 92 ---
.../SimpleExamples/TestStaticDrum2.mo | 77 --
.../TestStaticExchangerDTorWorEff.mo | 63 --
.../SimpleExamples/TestStaticExchangerKS.mo | 53 --
.../Examples/SimpleExamples/TestStaticFan.mo | 223 ------
.../TestStaticPlateHeatExchanger.mo | 55 --
.../TestStaticWallFlueGasesExchanger.mo | 68 --
.../SimpleExamples/TestSteamDryer1.mo | 62 --
.../SimpleExamples/TestSteamDryer2.mo | 62 --
.../SimpleExamples/TestSteamEngine.mo | 51 --
.../TestSteamExtractionSplitter.mo | 61 --
.../SimpleExamples/TestStodolaTurbine1.mo | 92 ---
.../SimpleExamples/TestStodolaTurbine2.mo | 53 --
.../SimpleExamples/TestSwitchValve.mo | 67 --
.../Fluid/Examples/SimpleExamples/TestTank.mo | 67 --
.../SimpleExamples/TestTankHorizontal.mo | 69 --
.../SimpleExamples/TestThreeWayValve.mo | 64 --
.../SimpleExamples/TestTwoPhaseCavity.mo | 116 ---
.../TestTwoPhaseCavityOnePipe.mo | 122 ---
.../SimpleExamples/TestTwoPhaseVolume.mo | 116 ---
.../Examples/SimpleExamples/TestVolumeA.mo | 112 ---
.../Examples/SimpleExamples/TestVolumeA1.mo | 78 --
.../Examples/SimpleExamples/TestVolumeI.mo | 111 ---
.../Examples/SimpleExamples/package.order | 86 ---
.../Fluid/Interfaces/Connectors/FluidInlet.mo | 17 +-
.../Interfaces/Connectors/FluidOutlet.mo | 17 +-
.../DryAirIdealGas/DryAirIdealGas.mo | 2 +-
.../Properties/FlueGases/FlueGases_h.mo | 2 +-
.../Properties/FlueGases/FlueGases_h_Ps.mo | 2 +-
.../Properties/FlueGases/FlueGases_s.mo | 2 +-
ThermoSysPro/Properties/FlueGases/XSat.mo | 2 +-
ThermoSysPro/Properties/Fluid/Density_Ph.mo | 2 +-
.../Properties/Fluid/Density_derh_Ph.mo | 2 +-
.../Properties/Fluid/Density_derp_Ph.mo | 2 +-
.../Properties/Fluid/DynamicViscosity_Ph.mo | 2 +-
ThermoSysPro/Properties/Fluid/Prandtl_Ph.mo | 2 +-
.../Properties/Fluid/Reynolds_PhvD.mo | 2 +-
.../Fluid/SpecificHeatCapacityCp_PT.mo | 2 +-
.../Fluid/SpecificHeatCapacityCp_Ph.mo | 2 +-
.../SpecificInternalEnergy_Ph_DO_NOT_USE.mo | 2 +-
.../Properties/Fluid/Temperature_Ph.mo | 2 +-
.../Fluid/ThermalConductivity_Ph.mo | 2 +-
.../Properties/Fluid/derDensity_derP_derh.mo | 2 +-
.../Fluid/derDensity_derh_derP_derh.mo | 2 +-
.../Fluid/derDynamicViscosity_derP_derh.mo | 2 +-
.../derDynamicViscosity_derP_derh_old.mo | 2 +-
.../Fluid/derDynamicViscosity_derT_derrho.mo | 2 +-
.../Fluid/derSpecificEnthalpy_derP_derT.mo | 2 +-
.../Fluid/derTemperature_derP_derh.mo | 2 +-
.../Fluid/derderDensity_derderP_derderh.mo | 2 +-
.../derderDensity_derh_derderP_derderh.mo | 2 +-
.../derderTemperature_derderP_derderh.mo | 2 +-
.../Media/PartialSubCMedium/C_BiPhase.mo | 6 +
.../HomogeneousPhasesSeparation.mo | 18 +
.../Media/PartialSubCMedium/noSaS.mo | 6 +
.../Media/PartialSubCMedium/package.mo | 5 +
.../Media/PartialSubCMedium/package.order | 6 +
.../partialPhasesSeparation.mo | 64 ++
.../Media/PartialSubCMedium/partialSaS.mo | 5 +
.../PartialThermoSysProMedium/package.mo | 5 +
.../PartialThermoSysProMedium/package.order | 0
.../package.mo | 5 +
.../package.order | 0
.../Properties/Media/WaterSteam/package.mo | 730 ++++++++++++++++++
.../Properties/Media/WaterSteam/package.order | 53 ++
ThermoSysPro/Properties/Media/package.mo | 115 +++
ThermoSysPro/Properties/Media/package.order | 4 +
.../MoltenSalt/DynamicViscosity_T.mo | 2 +-
.../MoltenSalt/ThermalConductivity_T.mo | 2 +-
.../ThermoPropertiesFunction_T_2.mo | 2 +-
.../Oil_TherminolVP1/TherminolVP1_Data.mo | 2 +-
.../WaterSolution/MassFraction_eq_PT.mo | 2 +-
.../WaterSolution/Pressure_eq_TX.mo | 2 +-
.../Properties/WaterSteam/BaseIF97.mo | 2 +-
ThermoSysPro/Properties/WaterSteam/Common.mo | 2 +-
.../Properties/WaterSteam/IF97_packages.mo | 4 +-
.../SimpleWater/SpecificEnthalpy_PT_der.mo | 2 +-
.../SimpleWater/Water_Ph_der.mo | 2 +-
ThermoSysPro/Properties/package.order | 1 +
142 files changed, 1075 insertions(+), 8213 deletions(-)
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/C_BiPhase.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/HomogeneousPhasesSeparation.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/noSaS.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/package.order
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/partialPhasesSeparation.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialSubCMedium/partialSaS.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.order
create mode 100644 ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.mo
create mode 100644 ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.order
create mode 100644 ThermoSysPro/Properties/Media/WaterSteam/package.mo
create mode 100644 ThermoSysPro/Properties/Media/WaterSteam/package.order
create mode 100644 ThermoSysPro/Properties/Media/package.mo
create mode 100644 ThermoSysPro/Properties/Media/package.order
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo
deleted file mode 100644
index 8798a071..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo
+++ /dev/null
@@ -1,55 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestAirHumidity
-
- ThermoSysPro.Fluid.BoundaryConditions.AirHumidity airHumidity(hum0=0.9,
- ppvap0(start=2085.0),
- rho_air(start=1.14),
- rho_vap(start=0.015))
- annotation (Placement(transformation(extent={{-10,0},{10,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss(K=1.e-5, rho(start=1.17))
- annotation (Placement(transformation(extent={{40,0},{
- 60,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases
- annotation (Placement(transformation(extent={{80,0},{100,20}},rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceFlueGasesPQ(
- option_temperature=true,
- Xco2=0,
- Xh2o=0.0132625,
- Xo2=0.217282,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=100000,
- T0=293) annotation (Placement(transformation(extent={{-80,0},{-60,20}},
- rotation=0)));
-
-equation
- connect(airHumidity.C2, singularPressureLoss.C1)
- annotation (Line(points={{10,10},{40,10}}, color={0,0,0}));
- connect(singularPressureLoss.C2, sinkFlueGases.C)
- annotation (Line(points={{60,10},{80,10}}, color={0,0,0}));
- connect(sourceFlueGasesPQ.C, airHumidity.C1)
- annotation (Line(points={{-60,10},{-10,10}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestAirHumidity;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo
deleted file mode 100644
index ed5108df..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo
+++ /dev/null
@@ -1,49 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestBend
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-100,26},{-80,46}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1
- annotation (Placement(transformation(
- extent={{60,0},{80,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.Bend Bend annotation (Placement(
- transformation(extent={{-20,26},{0,46}}, rotation=0)));
-equation
- connect(Bend.C2, SinkP1.C)
- annotation (Line(points={{-10,26},{-10,10},{60,10}}, color={0,0,255}));
- connect(SourceP1.C, Bend.C1)
- annotation (Line(points={{-80,36},{-20,36}}, color={0,0,255}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestBend;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo
deleted file mode 100644
index 25ed08f0..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo
+++ /dev/null
@@ -1,69 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestBoilerSystem
- import ThermoSysPro;
- ThermoSysPro.Fluid.Boilers.BoilerSystem BoilerSystem(
- Wloss=0,
- Ke=1.e6,
- Tsf=386.16)
- annotation (Placement(transformation(extent={{-45,-51},{45,51}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(
- Xco2=0,
- Xh2o=0.01,
- Q0=27.,
- Xo2=0.233,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- T0=298.16,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-102,-92},{-63,-55}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP annotation (Placement(transformation(
- extent={{-56,51},{-98,90}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
- Q0=24.,
- h0=600e3,
- P0=14000000)
- annotation (Placement(transformation(extent={{105,-88},{69,-54}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation(
- extent={{70,53},{106,89}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(K=1e-3)
- annotation (Placement(transformation(extent={{60,-77},{52,-65}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(K=1e-3)
- annotation (Placement(transformation(extent={{53,65},{61,77}}, rotation=0)));
-equation
- connect(singularPressureLoss1.C2, sink.C)
- annotation (Line(points={{61,71},{70,71}}, color={0,0,255}));
- connect(BoilerSystem.OutletWaterSteam, singularPressureLoss1.C1) annotation (
- Line(points={{38.5714,51},{38.5714,71},{53,71}}, color={0,0,0}));
- connect(BoilerSystem.InletWaterSteam, singularPressureLoss.C2) annotation (
- Line(points={{38.5714,-51},{38.5714,-71},{52,-71}}, color={0,0,0}));
- connect(singularPressureLoss.C1, sourcePQ.C) annotation (Line(points={{60,-71},
- {66,-71},{66,-71},{69,-71}}, color={0,0,0}));
- connect(sinkP.C, BoilerSystem.OutletFlueGases) annotation (Line(points={{-56,
- 70.5},{-38.5714,70.5},{-38.5714,51}}, color={0,0,0}));
- connect(sourceQ.C, BoilerSystem.InletFlueGases) annotation (Line(points={{-63,
- -73.5},{-38.5714,-73.5},{-38.5714,-51}}, color={0,0,0}));
- annotation ( Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestBoilerSystem;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo
deleted file mode 100644
index def6128b..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo
+++ /dev/null
@@ -1,49 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestCHPEngineBarkantineSystem
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{60,20},{80,40}}, rotation=0)));
- Machines.CHPEngineBarkantineSystem CHPBarkantine annotation (Placement(
- transformation(extent={{-40,0},{20,60}}, rotation=0)));
-equation
- connect(SourceP1.C, CHPBarkantine.inletWaterSteam) annotation (Line(points={{
- -80,30},{-50,30},{-50,45},{-40,45}}, color={0,0,0}));
- connect(CHPBarkantine.outletWaterSteam, PuitsP1.C)
- annotation (Line(points={{20,45},{30,45},{30,30},{60,30}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestCHPEngineBarkantineSystem;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo
deleted file mode 100644
index 7d3302cc..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo
+++ /dev/null
@@ -1,86 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestCentrifugalPump1
-
- ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump(
- mode_car=1,
- mode_car_hn=1,
- mode_car_Cr=1,
- dynamic_mech_equation=false)
- annotation (Placement(transformation(extent={{-20,20},{0,
- 40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(Q0=0)
- annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink
- annotation (Placement(transformation(extent={{40,20},{60,40}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe(
- Starttime=10,
- Duration=100,
- Initialvalue=1400,
- Finalvalue=0) annotation (Placement(transformation(extent={{-100,-20},{-80,
- 0}}, rotation=0)));
- ThermoSysPro.ElectroMechanics.BoundaryConditions.SourceAngularVelocity
- sourceAngularVelocity annotation (Placement(transformation(extent={{-60,-20},
- {-40,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ1( Q0=0)
- annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump1(
- mode_car=1,
- mode_car_hn=1,
- mode_car_Cr=1) annotation (Placement(transformation(extent={{-20,-60},{0,
- -40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink1
- annotation (Placement(transformation(extent={{40,-60},{60,-40}}, rotation=0)));
-equation
- connect(sourcePQ.C, centrifugalPump.C1)
- annotation (Line(points={{-60,30},{-20,30}}, color={0,0,255}));
- connect(centrifugalPump.C2, sink.C)
- annotation (Line(points={{0,30},{40,30}}, color={0,0,255}));
- connect(sourceAngularVelocity.M, centrifugalPump.M)
- annotation (Line(points={{-39,-10},{-10,-10},{-10,19}}));
- connect(sourcePQ1.C, centrifugalPump1.C1)
- annotation (Line(points={{-60,-50},{-20,-50}}, color={0,0,255}));
- connect(centrifugalPump1.C2, sink1.C)
- annotation (Line(points={{0,-50},{40,-50}}, color={0,0,255}));
- connect(rampe.y, sourceAngularVelocity.IAngularVelocity)
- annotation (Line(points={{-79,-10},{-55,-10}}));
- annotation (experiment(StopTime=1000),
- Diagram(graphics={
- Text(
- extent={{-100,100},{-60,80}},
- lineColor={0,0,255},
- textString=
- "w=1 ==> w=0"),
- Text(
- extent={{-100,80},{-60,60}},
- lineColor={0,0,255},
- textString=
- "q=0"),
- Text(
- extent={{-100,60},{-60,40}},
- lineColor={0,0,255},
- textString=
- "theta=0 ==> theta=-180")}),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestCentrifugalPump1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo
deleted file mode 100644
index f6c47b31..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo
+++ /dev/null
@@ -1,101 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestCheckValve
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent=
- {{-104,20},{-84,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(
- P0=6e5) annotation (Placement(transformation(
- extent={{84,20},{104,40}}, rotation=0)));
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump1
- annotation (Placement(transformation(extent={{-30,60},{-10,80}}, rotation=0)));
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump2
- annotation (Placement(transformation(extent={{-30,-20},{-10,0}}, rotation=0)));
- ThermoSysPro.Fluid.Volumes.VolumeD volumeD annotation (Placement(
- transformation(extent={{-50,20},{-30,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve1
- annotation (Placement(transformation(extent={{10,60},{30,80}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve2
- annotation (Placement(transformation(extent={{8,-20},{28,0}}, rotation=0)));
- ThermoSysPro.Fluid.Volumes.VolumeC volumeC annotation (Placement(
- transformation(extent={{30,20},{50,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP
- annotation (Placement(transformation(
- extent={{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1
- annotation (Placement(transformation(
- extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1
- annotation (Placement(transformation(
- extent={{-60,-80},{-40,-60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1(
- P0=6e5) annotation (Placement(transformation(
- extent={{20,-80},{40,-60}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Pulse pulse(
- amplitude=6e5,
- width=50,
- period=100,
- offset=3e5) annotation (Placement(transformation(extent={{-100,-80},{-80,
- -60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve3
- annotation (Placement(transformation(extent={{-20,-80},{0,-60}}, rotation=0)));
-equation
- connect(staticCentrifugalPump1.C2, checkValve1.C1) annotation (Line(points={{-10,70},
- {9,70}}, color={0,0,255}));
- connect(staticCentrifugalPump2.C2, checkValve2.C1) annotation (Line(points={{
- -10,-10},{0,-10},{0,-10},{7,-10}}, color={0,0,255}));
- connect(perteDP1.C2, puitsP.C)
- annotation (Line(points={{80,30},{84,30}}, color={0,0,255}));
- connect(sourceP.C, perteDP.C1)
- annotation (Line(points={{-84,30},{-80,30}}, color={0,0,255}));
- connect(sourceP1.C, checkValve3.C1)
- annotation (Line(points={{-40,-70},{-21,-70}}, color={0,0,255}));
- connect(checkValve3.C2, puitsP1.C)
- annotation (Line(points={{1,-70},{20,-70}}, color={0,0,255}));
- connect(pulse.y, sourceP1.IPressure) annotation (Line(points={{-79,-70},{-55,
- -70}}));
- connect(volumeD.Cs1, staticCentrifugalPump1.C1)
- annotation (Line(points={{-40,40},{-40,70},{-30,70}}, color={0,0,0}));
- connect(volumeD.Cs2, staticCentrifugalPump2.C1)
- annotation (Line(points={{-40,20},{-40,-10},{-30,-10}}, color={0,0,0}));
- connect(checkValve1.C2, volumeC.Ce2)
- annotation (Line(points={{31,70},{40,70},{40,40}}, color={0,0,0}));
- connect(checkValve2.C2, volumeC.Ce3)
- annotation (Line(points={{29,-10},{40,-10},{40,20}}, color={0,0,0}));
- connect(volumeC.Cs, perteDP1.C1)
- annotation (Line(points={{50,30},{60,30}}, color={0,0,0}));
- connect(perteDP.C2, volumeD.Ce)
- annotation (Line(points={{-60,30},{-50,30}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Window(
- x=0.28,
- y=0.03,
- width=0.5,
- height=0.6),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestCheckValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo
deleted file mode 100644
index 3472fb86..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo
+++ /dev/null
@@ -1,66 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestCombustionTurbine
- parameter Real is_eff_n1(fixed=false,start=0.85) "Nominal isentropic efficiency";
- parameter Real Qred1(fixed=false,start=0.01) "Reduced mass flow rate";
-
- ThermoSysPro.Fluid.Machines.CombustionTurbine CombustionTurbine(
- tau_n=0.065,
- is_eff_n=is_eff_n1,
- Qred=Qred1,
- Pe(fixed=true, start=1500000),
- Ts(fixed=true, start=830)) annotation (Placement(transformation(extent={{
- -42,-42},{36,42}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ SourceQ1(
- Xso2=0,
- Q0=430,
- Xco2=0.06,
- Xh2o=0.06,
- Xo2=0.14,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- T0=1500,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-106,-10},{-86,10}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(P0=1e5)
- annotation (Placement(transformation(
- origin={94,0},
- extent={{10,-10},{-10,10}},
- rotation=180)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Wc1(k=-1.8e8)
- annotation (Placement(transformation(extent={{-100,-42},{-80,-22}},
- rotation=0)));
-equation
- connect(SourceQ1.C, CombustionTurbine.Ce) annotation (Line(
- points={{-86,0},{-42,0}},
- color={0,0,0},
- thickness=1));
- connect(CombustionTurbine.Cs, SinkP1.C) annotation (Line(
- points={{36,0},{84,0}},
- color={0,0,0},
- thickness=1));
- connect(Wc1.y, CombustionTurbine.CompressorPower)
- annotation (Line(points={{-79,-32},{-45.9,-32},{-45.9,-16.8}}));
- annotation (Diagram(graphics), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestCombustionTurbine;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo
deleted file mode 100644
index 79b7b6f8..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo
+++ /dev/null
@@ -1,61 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestCompressor
- parameter Real is_eff_n1(fixed=false,start=0.85) "Nominal isentropic efficiency";
-
- ThermoSysPro.Fluid.Machines.Compressor Compressor(
- Ps(fixed=false),
- tau_n=16,
- is_eff_n=is_eff_n1,
- Pe(fixed=false, start=100000),
- Ts(fixed=true, start=680)) annotation (Placement(transformation(extent={{
- -52,-52},{48,52}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourceQ1(
- Xso2=0,
- Xco2=0.0,
- Xh2o=0.003,
- Xo2=0.23,
- Q0=420,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=100000,
- T0=288,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-104,-10},{-84,10}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(P0=15.8e5)
- annotation (Placement(transformation(
- origin={96,0},
- extent={{10,-10},{-10,10}},
- rotation=180)));
-equation
- connect(SourceQ1.C, Compressor.Ce) annotation (Line(
- points={{-84,0},{-39.5,0}},
- color={0,0,0},
- thickness=1));
- connect(Compressor.Cs, SinkP1.C) annotation (Line(
- points={{35.5,0},{86,0}},
- color={0,0,0},
- thickness=1));
- annotation (Diagram(graphics), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestCompressor;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo
deleted file mode 100644
index 94163735..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo
+++ /dev/null
@@ -1,50 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDiaphragm
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-64,-10},{-44,10}},rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{44,-10},{64,10}},rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.Diaphragm Diaphragm
- annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- rotation=0)));
-equation
- connect(Diaphragm.C2, PuitsP1.C)
- annotation (Line(points={{10,0},{44,0}}, color={0,0,255}));
- connect(SourceP1.C, Diaphragm.C1)
- annotation (Line(points={{-44,0},{-10,0}}, color={0,0,255}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDiaphragm;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo
deleted file mode 100644
index f7e59a50..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo
+++ /dev/null
@@ -1,140 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDiffusion_DynamicOnePhaseFlowPipe
-
- HeatExchangers.DynamicOnePhaseFlowPipe
- dynamicOnePhaseFlowPipe(L=20,
- Q(start={5.492026593727256E-28,5.492026607285849E-28,5.492026607285849E-28,
- 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28,
- 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28,
- 5.492026607285849E-28,5.492026607285849E-28}),
- h(start={84011.8111671368,96057.08454715868,107718.52365349933,
- 119295.22918923412,130792.44987567255,142215.00322033433,
- 153567.34130353143,164853.6027022597,176077.65400298327,
- 187243.1234252416,198353.42841254506,209411.79856705698}),
- continuous_flow_reversal=true,
- inertia=false,
- dynamic_mass_balance=false,
- advection=true,
- dynamic_energy_balance=false,
- diffusion=true,
- P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983,
- 99999.999999985,99999.999999988,99999.99999999,99999.999999992,100000,
- 100000,100000,100000}))
- annotation (Placement(transformation(extent={{-10,30},
- {10,50}}, rotation=0)));
- BoundaryConditions.SourceP sourceP(
- continuous_flow_reversal=true,
- diffusion=true,
- P0=100000,
- T0=293.15)
- annotation (Placement(transformation(extent={{-80,30},{-60,50}}, rotation=0)));
-
- BoundaryConditions.SinkP sinkP(diffusion=true,
- T0=323.15)
- annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource(
- option_temperature=2,
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- W0={0,0,0,0,0,0,0,0,0,0})
- annotation (Placement(transformation(extent={{-10,70},{10,90}},rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,50},{10,70}},rotation=0)));
- PressureLosses.SwitchValve switchValve(Qmin=0)
- annotation (Placement(transformation(extent={{-40,36},{-20,56}})));
- InstrumentationAndControl.Blocks.Logique.Echelon echelon(startTime=1)
- annotation (Placement(transformation(extent={{-74,66},{-66,74}})));
- InstrumentationAndControl.Blocks.Logique.NONL nONL
- annotation (Placement(transformation(extent={{-54,66},{-46,74}})));
- HeatExchangers.DynamicOnePhaseFlowPipe
- dynamicOnePhaseFlowPipe1(
- L=20,
- Q(start={4.9243335191367076E-05,4.924351014778949E-05,4.924351014778949E-05,
- 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05,
- 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05,
- 4.924351014778949E-05,4.924351014778949E-05}),
- h(start={84011.8111671368,95792.53373784182,107482.21110144592,
- 119086.65906940492,130611.17116650468,142060.60442474802,
- 153439.44619534744,164751.8668430315,176001.7618457063,
- 187192.78587129858,198328.3807233511,209411.79856705698}),
- continuous_flow_reversal=true,
- inertia=false,
- dynamic_mass_balance=false,
- advection=true,
- dynamic_energy_balance=false,
- diffusion=true,
- P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983,
- 99999.999999985,99999.999999988,99999.99999999,99999.999999992,100000,
- 100000,100000,100000}))
- annotation (Placement(transformation(extent={{-10,-70},
- {10,-50}}, rotation=0)));
- BoundaryConditions.SourceQ sourceP1(
- continuous_flow_reversal=true,
- diffusion=true,
- Q0=0,
- T0=293.15,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-80,-70},{-60,-50}},
- rotation=0)));
- BoundaryConditions.SinkP sinkP1(
- diffusion=true,
- T0=323.15)
- annotation (Placement(transformation(extent={{30,-70},{50,-50}},
- rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource1(
- option_temperature=2,
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- W0={0,0,0,0,0,0,0,0,0,0})
- annotation (Placement(transformation(extent={{-10,-30},{10,-10}},
- rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1(
- Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,-50},{10,-30}},
- rotation=0)));
-equation
- connect(dynamicOnePhaseFlowPipe.C2,sinkP. C) annotation (Line(points={{10,40},
- {30,40}}, color={0,0,255}));
- connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,70.2},
- {0,62}}, color={191,95,0}));
- connect(sourceP.C, switchValve.C1)
- annotation (Line(points={{-60,40},{-40,40}}, color={0,0,0}));
- connect(switchValve.C2,dynamicOnePhaseFlowPipe. C1)
- annotation (Line(points={{-20,40},{-10,40}}, color={0,0,0}));
- connect(echelon.yL, nONL.uL)
- annotation (Line(points={{-65.6,70},{-54.4,70}}, color={0,0,255}));
- connect(nONL.yL, switchValve.Ouv) annotation (Line(points={{-45.6,70},{-30,70},
- {-30,53.2}}, color={0,0,255}));
- connect(heatExchangerWall.WT1,dynamicOnePhaseFlowPipe. CTh)
- annotation (Line(points={{0,58},{0,43}}, color={0,0,0}));
- connect(dynamicOnePhaseFlowPipe1.C2, sinkP1.C)
- annotation (Line(points={{10,-60},{30,-60}}, color={0,0,255}));
- connect(heatSource1.C, heatExchangerWall1.WT2)
- annotation (Line(points={{0,-29.8},{0,-38}}, color={191,95,0}));
- connect(heatExchangerWall1.WT1,dynamicOnePhaseFlowPipe1. CTh)
- annotation (Line(points={{0,-42},{0,-57}}, color={0,0,0}));
- connect(sourceP1.C,dynamicOnePhaseFlowPipe1. C1)
- annotation (Line(points={{-60,-60},{-10,-60}}, color={0,0,0}));
- annotation (experiment(StopTime=10), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDiffusion_DynamicOnePhaseFlowPipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo
deleted file mode 100644
index 84f4f856..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo
+++ /dev/null
@@ -1,62 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDiffusion_DynamicPlateHeatExchanger
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger
- echangeurAPlaques1D(
- region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- steady_state=true,
- Ns=10,
- dynamic_energy_balance=false,
- diffusion=true,
- continuous_flow_reversal=true)
- annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0)));
-
- BoundaryConditions.SourcePQ sourceP(
- option_temperature=true,
- diffusion=true,
- Q0=0,
- T0=340)
- annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0)));
- BoundaryConditions.SourcePQ sourceP1
- annotation (Placement(
- transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- BoundaryConditions.Sink puitsP(option_temperature=true,
- diffusion=true) annotation (Placement(transformation(
- extent={{40,40},{60,60}}, rotation=0)));
- BoundaryConditions.Sink puitsP1(diffusion=true, h0=200000)
- annotation (Placement(transformation(
- extent={{20,20},{40,40}}, rotation=0)));
-equation
- connect(sourceP.C, echangeurAPlaques1D.Ec)
- annotation (Line(points={{-60,50},{-20,50}}, color={0,0,255}));
- connect(sourceP1.C, echangeurAPlaques1D.Ef) annotation (Line(points={{-40,30},
- {-15,30},{-15,44}}, color={0,0,255}));
- connect(echangeurAPlaques1D.Sc, puitsP.C) annotation (Line(points={{0,50},{20,
- 50},{20,50},{40,50}}, color={0,0,255}));
- connect(echangeurAPlaques1D.Sf, puitsP1.C) annotation (Line(points={{-5,44},{
- -6,44},{-6,30},{20,30}}, color={0,0,255}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDiffusion_DynamicPlateHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo
deleted file mode 100644
index 6ca89991..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo
+++ /dev/null
@@ -1,187 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDiffusion_DynamicTwoPhaseFlowPipe
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe
- dynamicTwoPhaseFlowPipe(L=20,
- Q(start={5.492026593727256E-28,5.492026607285849E-28,5.492026607285849E-28,
- 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28,
- 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28,
- 5.492026607285849E-28,5.492026607285849E-28}),
- h(start={84011.8111671368,96057.08454715868,107718.52365349933,
- 119295.22918923412,130792.44987567255,142215.00322033433,
- 153567.34130353143,164853.6027022597,176077.65400298327,
- 187243.1234252416,198353.42841254506,209411.79856705698}),
- continuous_flow_reversal=true,
- inertia=false,
- dynamic_mass_balance=false,
- advection=true,
- dynamic_energy_balance=false,
- cpl2(start={4183.826265167646,4182.239614474996,4181.0130500668565,
- 4180.0726819587735,4179.380584625066,4178.908955510578,
- 4178.63729871947,4178.550389628282,4178.636803895239,
- 4178.887855575399,4179.29683238825}),
- cpv2(start={2049.2168798430116,2046.3449415228738,2043.4582034172774,
- 2040.5558258112756,2037.636860922887,2034.7002308786582,
- 2031.744699351002,2028.7688344361377,2025.770959168656,
- 2022.7490841743909,2019.518356822069}),
- kl2(start={0.5995743350581909,0.5995743350579683,0.5995743350571023,
- 0.5995743350562764,0.5995743350555206,0.5995743350548642,
- 0.5995743350543319,0.5995743350539415,0.5995743350536991,
- 0.599574335053346,0.5995743403506435}),
- kv2(start={0.024965829345847085,0.024990303852044017,0.025018417766029456,
- 0.02505065954620164,0.025087620205457677,0.025130023834108832,
- 0.025178770324693366,0.02523499664554269,0.025300167212669696,
- 0.02537621164077076,0.0254715737844706}),
- diffusion=true,
- pro2(T(start={294.61264959452353,297.4461204783121,300.22404336919567,
- 302.982702661547,305.7232156830587,308.44660714369365,
- 311.15382285197893,313.8457405734291,316.5231787363566,
- 319.18690350188376,321.8376345796106}), d(start={997.892715521068,
- 997.2253707910008,996.4959923473901,995.7017938222477,
- 994.8471177790162,993.9357736693299,992.9711212203756,
- 991.9561376232762,990.8934721677539,989.7854910510117,
- 988.6343144234495})),
- P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983,99999.999999985,
- 99999.999999988,99999.99999999,99999.999999992,100000,100000,100000,100000}))
- annotation (Placement(transformation(extent={{-10,30},
- {10,50}}, rotation=0)));
- BoundaryConditions.SourceP sourceP(
- continuous_flow_reversal=true,
- diffusion=true,
- P0=100000,
- T0=293.15)
- annotation (Placement(transformation(extent={{-80,30},{-60,50}}, rotation=0)));
-
- BoundaryConditions.SinkP sinkP(diffusion=true,
- T0=323.15)
- annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource(
- option_temperature=2,
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- W0={0,0,0,0,0,0,0,0,0,0})
- annotation (Placement(transformation(extent={{-10,70},{10,90}},rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,50},{10,70}},rotation=0)));
- PressureLosses.SwitchValve switchValve(Qmin=0)
- annotation (Placement(transformation(extent={{-40,36},{-20,56}})));
- InstrumentationAndControl.Blocks.Logique.Echelon echelon(startTime=1)
- annotation (Placement(transformation(extent={{-74,66},{-66,74}})));
- InstrumentationAndControl.Blocks.Logique.NONL nONL
- annotation (Placement(transformation(extent={{-54,66},{-46,74}})));
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe
- dynamicTwoPhaseFlowPipe1(
- L=20,
- Q(start={4.9243335191367076E-05,4.924351014778949E-05,4.924351014778949E-05,
- 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05,
- 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05,
- 4.924351014778949E-05,4.924351014778949E-05}),
- h(start={84011.8111671368,95792.53373784182,107482.21110144592,
- 119086.65906940492,130611.17116650468,142060.60442474802,
- 153439.44619534744,164751.8668430315,176001.7618457063,
- 187192.78587129858,198328.3807233511,209411.79856705698}),
- continuous_flow_reversal=true,
- inertia=false,
- dynamic_mass_balance=false,
- advection=true,
- cpl2(start={4183.8461052314415,4182.2694439224715,4181.033777873867,
- 4180.086463719214,4179.389099400846,4178.913555072556,
- 4178.639109839789,4178.550383980675,4178.6358456341095,
- 4178.886733579299,4179.2962820044995}),
- cpv2(start={2049.2168798430116,2046.3449415228738,2043.4582034172774,
- 2040.5558258112756,2037.636860922887,2034.7002308786582,
- 2031.744699351002,2028.7688344361377,2025.770959168656,
- 2022.7490841743909,2019.518356822069}),
- kl2(start={0.5995743350581909,0.5995743350579683,0.5995743350571023,
- 0.5995743350562764,0.5995743350555206,0.5995743350548642,
- 0.5995743350543319,0.5995743350539415,0.5995743350536991,
- 0.599574335053346,0.5995743403506435}),
- kv2(start={0.024965829345847085,0.024990303852044017,0.025018417766029456,
- 0.02505065954620164,0.025087620205457677,0.025130023834108832,
- 0.025178770324693366,0.02523499664554269,0.025300167212669696,
- 0.02537621164077076,0.0254715737844706}),
- diffusion=true,
- pro2(T(start={294.58103295016184,297.3862511962513,300.1708576823335,
- 302.9360907339107,305.6830771234792,308.4128498965468,
- 311.12636229776916,313.82449878754863,316.50808386868016,
- 319.1778892498971,321.83463973606456}), d(start={997.8997091804818,
- 997.2402860410343,996.5106311231898,995.7157728656836,
- 994.8600940026633,993.9474377103298,992.9811922410435,
- 991.9643590731059,990.8996082946633,989.7893240021328,
- 988.6356418174122})),
- dynamic_energy_balance=false,
- P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983,
- 99999.999999985,99999.999999988,99999.99999999,99999.999999992,100000,
- 100000,100000,100000}))
- annotation (Placement(transformation(extent={{-10,-70},
- {10,-50}}, rotation=0)));
- BoundaryConditions.SourceQ sourceP1(
- continuous_flow_reversal=true,
- diffusion=true,
- Q0=0,
- T0=293.15,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-80,-70},{-60,-50}},
- rotation=0)));
- BoundaryConditions.SinkP sinkP1(
- diffusion=true,
- T0=323.15)
- annotation (Placement(transformation(extent={{30,-70},{50,-50}},
- rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource1(
- option_temperature=2,
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- W0={0,0,0,0,0,0,0,0,0,0})
- annotation (Placement(transformation(extent={{-10,-30},{10,-10}},
- rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1(
- Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,-50},{10,-30}},
- rotation=0)));
-equation
- connect(dynamicTwoPhaseFlowPipe.C2,sinkP. C) annotation (Line(points={{10,40},
- {30,40}}, color={0,0,255}));
- connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,70.2},
- {0,62}}, color={191,95,0}));
- connect(sourceP.C, switchValve.C1)
- annotation (Line(points={{-60,40},{-40,40}}, color={0,0,0}));
- connect(switchValve.C2, dynamicTwoPhaseFlowPipe.C1)
- annotation (Line(points={{-20,40},{-10,40}}, color={0,0,0}));
- connect(echelon.yL, nONL.uL)
- annotation (Line(points={{-65.6,70},{-54.4,70}}, color={0,0,255}));
- connect(nONL.yL, switchValve.Ouv) annotation (Line(points={{-45.6,70},{-30,70},
- {-30,53.2}}, color={0,0,255}));
- connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowPipe.CTh)
- annotation (Line(points={{0,58},{0,43}}, color={0,0,0}));
- connect(dynamicTwoPhaseFlowPipe1.C2, sinkP1.C)
- annotation (Line(points={{10,-60},{30,-60}}, color={0,0,255}));
- connect(heatSource1.C, heatExchangerWall1.WT2)
- annotation (Line(points={{0,-29.8},{0,-38}}, color={191,95,0}));
- connect(heatExchangerWall1.WT1, dynamicTwoPhaseFlowPipe1.CTh)
- annotation (Line(points={{0,-42},{0,-57}}, color={0,0,0}));
- connect(sourceP1.C, dynamicTwoPhaseFlowPipe1.C1)
- annotation (Line(points={{-60,-60},{-10,-60}}, color={0,0,0}));
- annotation (experiment(StopTime=10), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDiffusion_DynamicTwoPhaseFlowPipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo
deleted file mode 100644
index a417bca8..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo
+++ /dev/null
@@ -1,71 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDiffusion_VolumeA
-
- BoundaryConditions.SourcePQ sourcePQ1(
- C(h_vol_2(start=63269.22110794237)),
- Q(start=0),
- continuous_flow_reversal=false,
- Q0=0,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteam,
- option_temperature=true,
- T0=293.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
-
- BoundaryConditions.Sink sink1(
- option_temperature=true,
- T0=333.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{80,-10},{100,10}})));
- PressureLosses.SwitchValve switchValve(Qmin=0)
- annotation (Placement(transformation(extent={{-60,-4},{-40,16}})));
- InstrumentationAndControl.Blocks.Logique.Constante constante(K=true)
- annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
- Volumes.VolumeA volumeA(
- continuous_flow_reversal=false,
- diffusion=true,
- dynamic_energy_balance=false,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteam)
- annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
-
- PressureLosses.SwitchValve switchValve1(Qmin=0, k=2000)
- annotation (Placement(transformation(extent={{40,-4},{60,16}})));
- InstrumentationAndControl.Blocks.Logique.Constante constante1(K=true)
- annotation (Placement(transformation(extent={{20,20},{40,40}})));
-equation
- connect(constante.yL, switchValve.Ouv)
- annotation (Line(points={{-59,30},{-50,30},{-50,13.2}}, color={0,0,255}));
- connect(sourcePQ1.C, switchValve.C1)
- annotation (Line(points={{-80,0},{-60,0}}, color={0,0,0}));
- connect(volumeA.Cs1, switchValve1.C1)
- annotation (Line(points={{10,0},{40,0}}, color={0,0,0}));
- connect(switchValve1.C2,sink1. C)
- annotation (Line(points={{60,0},{80,0}}, color={0,0,0}));
- connect(constante1.yL, switchValve1.Ouv)
- annotation (Line(points={{41,30},{50,30},{50,13.2}}, color={0,0,255}));
- connect(switchValve.C2, volumeA.Ce1)
- annotation (Line(points={{-40,0},{-10,0}}, color={0,0,0}));
- annotation (Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- experiment(StopTime=12),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDiffusion_VolumeA;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo
deleted file mode 100644
index 2a6c5e8b..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo
+++ /dev/null
@@ -1,58 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicCheckValve
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1
- annotation (Placement(transformation(
- extent={{-38,-10},{-18,10}},rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1(
- P0=6e5) annotation (Placement(transformation(
- extent={{42,-10},{62,10}},rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.DynamicCheckValve checkValve(J=10)
- annotation (Placement(transformation(extent={{2,-10},{22,10}},rotation=0)));
- InstrumentationAndControl.Blocks.Sources.Sinusoide pulse(
- period=100,
- amplitude=3e5,
- offset=6e5) annotation (Placement(transformation(extent={{-78,-10},{-58,10}},
- rotation=0)));
-equation
- connect(sourceP1.C, checkValve.C1)
- annotation (Line(points={{-18,0},{2,0}}, color={0,0,255}));
- connect(checkValve.C2, puitsP1.C) annotation (Line(points={{22,0},{32,0},{42,
- 0}}, color={0,0,255}));
- connect(sourceP1.IPressure, pulse.y)
- annotation (Line(points={{-33,0},{-57,0}}, color={28,108,200}));
- annotation (
- Diagram(graphics,
- coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Window(
- x=0.28,
- y=0.03,
- width=0.5,
- height=0.6),
- experiment(StopTime=300),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicCheckValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo
deleted file mode 100644
index 28f75489..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo
+++ /dev/null
@@ -1,119 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicCondenser
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(Pm(displayUnit = "Pa", start=
- 355000.00000015664), Q(fixed = false), hn(fixed = false, start=
- 71.08245675235786), p_rho(displayUnit = "kg/m3"), rho(displayUnit = "kg/m3"),
- a1(start=-88.67, fixed=false),
- C2(h(start=195297.69906611618), h_vol_1(start=195297.69906611618)),
- Qv(start=0.009081311621074862),
- h(start=193554.9971298399),
- C1(P(start=10000.0))) annotation (
- Placement(visible = true, transformation(origin={-10,-60}, extent={{10,-10},
- {-10,10}}, rotation = 0)));
- ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Pe(displayUnit = "Pa", fixed = true, start = 700000), Ps(displayUnit = "Pa", fixed = false), W_fric = 0, eta_is(fixed = false), eta_is_wet(fixed = false), rhos(displayUnit = "kg/m3", fixed = false),
- xm(fixed=false, start=0.9856238368898451),
- proe(x(start=1, fixed=true)),
- Ce(h_vol_2(start=3128840.013040668), h(start=3128840.0130323363)),
- pros(d(start=0.07018147245152216))) annotation (
- Placement(visible = true, transformation(origin={-10,60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
- ThermoSysPro.Fluid.HeatExchangers.DynamicCondenser Condenseur(
- dynamic_energy_balance=true,
- Rv=20,
- steady_state=false) annotation (
- Placement(visible = true, transformation(origin={40.5,-1}, extent = {{-20.5, -16}, {20.5, 16}}, rotation = 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur(P0 = 1e5, T0 = 373.05, option_temperature = true) annotation (
- Placement(visible = true, transformation(origin={91,-1}, extent = {{-11, -12}, {11, 12}}, rotation = 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePCaloporteur( h0 = 113e3,
- option_temperature=true,
- Q0=100) annotation (
- Placement(visible = true, transformation(origin={-10,-1}, extent = {{-10, -9}, {10, 9}}, rotation = 0)));
- ThermoSysPro.Fluid.Volumes.VolumeATh
- volumeA(
- P(start=70e5),
- h(start=2.e6),
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-70,10},{-50,-10}})));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource
- heatSource(W0(start={2e6}, each fixed=false),
- option_temperature=2) annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- rotation=90,
- origin={-88,12})));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Vapeur_GCT1(Table=[0,
- 0.0001; 22,0.0001; 24,2.02; 25,100; 26,150; 28,300; 29.7,590; 30.2,600;
- 30.5,590; 31,570; 35,250; 40,100; 45,15; 47,0.000001; 200,0.000001;
- 1000,0.000001])
- annotation (Placement(transformation(extent={{-56,34},{-44,46}},
- rotation=0)));
- BoundaryConditions.SourceQ Source_Vsup1(
- h0=2759.6e3, Q0=1)
- annotation ( Placement(transformation(
- extent={{-40,10},{-20,30}}, rotation=0)));
- PressureLosses.SingularPressureLoss
- PressureLoss_VapeurIn_in4(K=1e-4, Q(fixed=false, start=0.01))
- annotation (Placement(transformation(extent={{0,10},{
- 20,30}}, rotation=0)));
-equation
- connect(staticCentrifugalPump.C2,volumeA. Ce2)
- annotation (Line(points={{-20,-60},{-60,-60},{-60,-10}}, color={28,108,200}));
- connect(volumeA.Cs2,stodolaTurbine. Ce)
- annotation (Line(points={{-60,10},{-60,60},{-20.1,60}}, color={28,108,200}));
- connect(heatSource.C[1],volumeA. Cth) annotation (Line(points={{-78.2,12},{-64,
- 12},{-64,0},{-60,0}}, color={0,0,0}));
- connect(sourcePCaloporteur.C, Condenseur.Ce1) annotation (Line(points={{0,-1},{
- 2,-1},{2,-1.16},{20,-1.16}}, color={0,0,0}));
- connect(Condenseur.Ce2, puitsPCaloporteur.C) annotation (Line(points={{60.795,
- -1.16},{66.3975,-1.16},{66.3975,-1},{80,-1}}, color={0,0,0}));
- connect(Condenseur.C2ex, staticCentrifugalPump.C1)
- annotation (Line(points={{40.5,-17},{40.5,-60},{0,-60}}, color={0,0,0}));
- connect(stodolaTurbine.Cs, Condenseur.C1vap)
- annotation (Line(points={{0.1,60},{40.5,60},{40.5,15}}, color={0,0,0}));
- connect(Vapeur_GCT1.y, Source_Vsup1.IMassFlow)
- annotation (Line(points={{-43.4,40},{-30,40},{-30,25}}, color={0,0,255}));
- connect(Source_Vsup1.C, PressureLoss_VapeurIn_in4.C1)
- annotation (Line(points={{-20,20},{0,20}}, color={0,0,0}));
- connect(PressureLoss_VapeurIn_in4.C2, Condenseur.C2vap) annotation (Line(
- points={{20,20},{32.505,20},{32.505,13.72}}, color={0,0,0}));
- annotation (
- Diagram(graphics={
- Text(
- extent={{-94,34},{-64,24}},
- lineColor={28,108,200},
- textString="W: free"),
- Text(
- extent={{-26,-38},{8,-48}},
- lineColor={28,108,200},
- textString="a1: free"),
- Text(
- extent={{-28,94},{8,84}},
- lineColor={28,108,200},
- textString="Pe: fixed"),
- Text(
- extent={{-28,84},{10,72}},
- lineColor={28,108,200},
- textString="proe.x: fixed")}),
- Documentation(info="
-
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- experiment(StopTime=10000));
-end TestDynamicCondenser;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo
deleted file mode 100644
index 71794c51..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo
+++ /dev/null
@@ -1,183 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicDrum
- parameter Units.SI.MassFlowRate Qin(fixed=false, start=80) "Mass flow rate";
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=670)
- "Maximum CV (active if mode_caract=0)";
- parameter Real LambdaPipe(fixed=false,start=0.085)
- "Friction pressure loss coefficient (active if lambda_fixed=true)";
-
- Volumes.DynamicDrum Drum(
- Vv(start=39),
- Vertical=false,
- hl(start=1454177.7248984643),
- hv(start=2670002.8920646077),
- xv(start=0.01),
- rhol(start=670),
- rhov(start=78),
- zl(fixed=true, start=1.05),
- wsftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidType.WaterSteam,
- Cm(diff_res_1(start=8476939.240220599)),
- steady_state=true,
- dynamic_energy_balance=false,
- P0=13000000,
- diffusion=true,
- P(start=13000000, fixed=true),
- Pfond(start=13006991.905108),
- Tp(start=590.93934457637))
- annotation (Placement(transformation(extent={{-61,18},{1,
- 80}}, rotation=0)));
-
- PressureLosses.ControlValve feedwaterValve(
- Cv(start=335),
- C1(
- h_vol_1(start=1400e3),
- h(start=1400e3),
- P(start=13300000),
- Q(start=79.5)),
- Q(start=79.5),
- rho(start=888),
- h(start=1400000),
- Cvmax=CvmaxWater,
- Pm(start=13100000))
- annotation (Placement(transformation(extent={{-120,76},{
- -100,96}}, rotation=0)));
- PressureLosses.ControlValve steamValve(
- Cvmax(fixed=true) = 50000,
- Cv(start=25000),
- Q(start=79.5),
- rho(start=78.5),
- h(start=2657930),
- Pm(start=12998726.577779422))
- annotation (Placement(transformation(extent={{40,76},{60,96}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon(k(fixed=true) = 0.5)
- annotation (Placement(transformation(extent={{-160,122},{-140,142}},
- rotation=0)));
- HeatExchangers.DynamicTwoPhaseFlowPipe
- TubeEcranBoucleEvaporatoire(
- T0=fill(400, 10),
- heb(start={10409,10268,10127,9985,9842,9698,9552,9406,9258,9111}),
- advection=false,
- z2=10,
- simplified_dynamic_energy_balance=false,
- D=0.03,
- ntubes=1400,
- h(start={1454177.75,1531100.8018215413,1608023.8787446183,1684946.955667695,
- 1761870.032590772,1838793.109513849,1915716.186436926,
- 1992639.2633600028,2069562.3402830793,2146485.4172061565,
- 2223408.4941292335,1454177.75}),
- L=20,
- Q(start=fill(130, 11)),
- dynamic_mass_balance=false,
- inertia=false,
- dynamic_energy_balance=false,
- diffusion=true,
- P(start={13032002.884172,13025908.565037,13020089.245351,13015847.070697,
- 13012648.443752,13010064.118918,13007881.468256,13005979.718403,
- 13004283.685995,13002743.397189,13001323.948575,13000000}))
- annotation (Placement(transformation(
- origin={6,-26},
- extent={{-10,10},{10,-10}},
- rotation=90)));
- Thermal.BoundaryConditions.HeatSource
- SourceC3(
- option_temperature=2,
- W0={1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7},
- T0={290,290,290,290,290,290,290,290,290,290})
- annotation (Placement(transformation(
- origin={36,-26},
- extent={{-10,-10},{10,10}},
- rotation=270)));
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, L=20,
- D=0.03,
- ntubes=1400,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(
- origin={18,-26},
- extent={{-10,-10},{10,10}},
- rotation=90)));
- PressureLosses.LumpedStraightPipe lumpedStraightPipe(
- L=20,
- z1=20,
- Q(fixed=true, start=130),
- lambda=LambdaPipe)
- annotation (Placement(transformation(
- origin={-66,-26},
- extent={{10,-10},{-10,10}},
- rotation=90)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon1(k(fixed=true) = 0.5)
- annotation (Placement(transformation(extent={{0,122},{20,142}}, rotation=0)));
- BoundaryConditions.SourceP sourceP(h0=1400000,
- P0(fixed=true) = 13200000,
- option_temperature=false)
- annotation (Placement(transformation(extent={{-200,70},{-180,90}},
- rotation=0)));
- BoundaryConditions.SinkQ sinkQ(Q0=75)
- annotation (Placement(transformation(extent={{120,70},{140,90}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- SteamMassFlowRate(k=Qin)
- annotation (Placement(transformation(extent={{100,122},{120,142}}, rotation=
- 0)));
-equation
- connect(Drum.Cv,steamValve. C1)
- annotation (Line(points={{1,80},{40,80}}, color={0,0,255}));
- connect(feedwaterValve.C2, Drum.Ce1)
- annotation (Line(points={{-100,80},{-61,80}}, color={0,0,255}));
- connect(Drum.Cd, lumpedStraightPipe.C1) annotation (Line(points={{-61,18},{
- -66,18},{-66,-16}}, color={0,0,255}));
- connect(heatExchangerWall.WT1, SourceC3.C) annotation (Line(points={{20,-26},
- {26.2,-26}}, color={191,95,0}));
- connect(Drum.Cm, TubeEcranBoucleEvaporatoire.C2)
- annotation (Line(points={{1,18},{6,18},{6,-16}}));
- connect(TubeEcranBoucleEvaporatoire.CTh, heatExchangerWall.WT2) annotation (Line(
- points={{9,-26},{16,-26}}, color={191,95,0}));
- connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv)
- annotation (Line(points={{-139,132},{-110,132},{-110,97}}, smooth=Smooth.None));
- connect(sourceP.C,feedwaterValve. C1) annotation (Line(
- points={{-180,80},{-120,80}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(steamValve.C2, sinkQ.C) annotation (Line(
- points={{60,80},{120,80}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(TubeEcranBoucleEvaporatoire.C1, lumpedStraightPipe.C2)
- annotation (Line(points={{6,-36},{6,-68},{-66,-68},{-66,-36}}));
- connect(ConsigneNiveauBallon1.y,steamValve. Ouv)
- annotation (Line(points={{21,132},{50,132},{50,97}}, smooth=Smooth.None));
- connect(SteamMassFlowRate.y, sinkQ.IMassFlow)
- annotation (Line(points={{121,132},{130,132},{130,85}}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-100},{140,200}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicDrum;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo
deleted file mode 100644
index 72c9c76b..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo
+++ /dev/null
@@ -1,190 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicDrum_CC
- import ThermoSysPro;
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=670)
- "Maximum CV (active if mode_caract=0)";
- parameter Real LambdaPipe(fixed=false,start=0.085)
- "Friction pressure loss coefficient (active if lambda_fixed=true)";
-
- ThermoSysPro.Fluid.Volumes.DynamicDrum Drum(
- Vv(start=39),
- Vertical=false,
- hl(start=1454400),
- hv(start=2.658e6),
- xv(start=0.01),
- rhol(start=670),
- rhov(start=78),
- zl(fixed=true, start=1.05),
- wsftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidType.WaterSteam,
- P0=13000000,
- P(start=13000000, fixed=false),
- Tp(start=592.6)) annotation (Placement(transformation(extent={{-61,18},{1,
- 80}}, rotation=0)));
-
- ThermoSysPro.Fluid.PressureLosses.ControlValve FeedwaterValve(
- Cv(start=335),
- Q(start=79.5),
- rho(start=888),
- h(start=1400000),
- C1(
- h_vol_1(start=1400e3),
- h(start=1400e3),
- Q(start=79.5),
- P(start=13300000)),
- Cvmax=CvmaxWater,
- Pm(start=13100000))
- annotation (Placement(transformation(extent={{-120,76},{
- -100,96}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve SteamValve(
- Cv(start=25000),
- Q(start=79.5),
- rho(start=78.5),
- h(start=2657930),
- Cvmax=10000,
- Pm(start=12900000))
- annotation (Placement(transformation(extent={{40,76},{60,96}}, rotation=0)));
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe
- TubeEcranBoucleEvaporatoire(
- T0=fill(400, 10),
- heb(start={10409,10268,10127,9985,9842,9698,9552,9406,9258,9111}),
- advection=false,
- z2=10,
- simplified_dynamic_energy_balance=false,
- P(start={13007000,13006600,13006000,13005500,13005000,13004500,13004000,13003000,
- 13002000,13001000,13000000,12999990}),
- D=0.03,
- ntubes=1400,
- h(start={1400e3,1450e3,1500e3,1550e3,1600e3,1650e3,1700e3,1750e3,1800e3,1850e3,
- 1900e3,1950e3}),
- L=20,
- Q(start=fill(130, 11)))
- annotation (Placement(transformation(
- origin={6,-26},
- extent={{-10,10},{10,-10}},
- rotation=90)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC3(
- option_temperature=2,
- W0={1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7},
- T0={290,290,290,290,290,290,290,290,290,290})
- annotation (Placement(transformation(
- origin={36,-26},
- extent={{-10,-10},{10,10}},
- rotation=270)));
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, L=20,
- D=0.03,
- ntubes=1400)
- annotation (Placement(transformation(
- origin={18,-26},
- extent={{-10,-10},{10,10}},
- rotation=90)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe(
- L=20,
- z1=20,
- C1(P(start=130e5)),
- Q(fixed=true, start=130),
- lambda=LambdaPipe)
- annotation (Placement(transformation(
- origin={-66,-26},
- extent={{10,-10},{-10,10}},
- rotation=90)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceQ(h0=1400000,
- option_temperature=false,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteam,
- P0=13300000)
- annotation (Placement(transformation(extent={{-196,70},{-176,90}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(
- option_temperature=false,
- h0=2.650e6,
- P0=12700000)
- annotation (Placement(transformation(extent={{115,70},{135,90}}, rotation=0)));
- InstrumentationAndControl.Blocks.Sources.Constante SteamValve_O(k=0.5)
- annotation (Placement(transformation(extent={{20,102},{40,121}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Steam_Pressure(Table=[0,
- 128e5; 100,128e5; 110,124e5; 200,124e5; 400,128e5; 2000,128e5; 2010,
- 131e5; 2090,131e5; 2300,128e5; 3000,128e5])
- annotation (Placement(transformation(extent={{96,99},{120,123}}, rotation=
- 0)));
- ThermoSysPro.Examples.Control.Drum_LevelControl regulation_Niveau(
- add(k1=-1, k2=+1),
- Ti=50,
- pIsat(
- ureset0=0.5,
- Limiteur1(u(signal(start=0.5))),
- Ti=2000)) annotation (Placement(transformation(extent={{-56,106},{-84,132}},
- rotation=0)));
- InstrumentationAndControl.Blocks.Sources.Constante Level(k=1.05) annotation (
- Placement(transformation(extent={{-21,102},{-40,121}}, rotation=0)));
-equation
- connect(Drum.Cv, SteamValve.C1)
- annotation (Line(points={{1,80},{40,80}}, color={0,0,255}));
- connect(FeedwaterValve.C2, Drum.Ce1)
- annotation (Line(points={{-100,80},{-61,80}}, color={0,0,255}));
- connect(Drum.Cd, lumpedStraightPipe.C1) annotation (Line(points={{-61,18},{
- -66,18},{-66,-16}}, color={0,0,255}));
- connect(heatExchangerWall.WT1, SourceC3.C) annotation (Line(points={{20,-26},
- {26.2,-26}}, color={191,95,0}));
- connect(Drum.Cm, TubeEcranBoucleEvaporatoire.C2)
- annotation (Line(points={{1,18},{6,18},{6,-16}}));
- connect(TubeEcranBoucleEvaporatoire.CTh, heatExchangerWall.WT2) annotation (Line(
- points={{9,-26},{16,-26}}, color={191,95,0}));
- connect(sourceQ.C, FeedwaterValve.C1) annotation (Line(
- points={{-176,80},{-120,80}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(SteamValve.C2,sinkP. C) annotation (Line(
- points={{60,80},{115,80}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(TubeEcranBoucleEvaporatoire.C1, lumpedStraightPipe.C2)
- annotation (Line(points={{6,-36},{6,-68},{-66,-68},{-66,-36}}));
- connect(SteamValve_O.y, SteamValve.Ouv)
- annotation (Line(points={{41,111.5},{50,111.5},{50,97}}, color={0,0,255}));
- connect(Steam_Pressure.y, sinkP.IPressure) annotation (Line(points={{121.2,
- 111},{130,111},{130,80}}, color={0,0,255}));
- connect(Level.y, regulation_Niveau.ConsigneNiveauEau) annotation (Line(
- points={{-40.95,111.5},{-44,111.5},{-44,111.2},{-55.3,111.2}},
- color={0,0,0},
- pattern=LinePattern.Dash));
-
- connect(Drum.yLevel, regulation_Niveau.MesureNiveauEau) annotation (Line(
- points={{4.1,49},{10,49},{10,130.7},{-55.3,130.7}},
- color={0,0,0},
- pattern=LinePattern.Dash));
- connect(regulation_Niveau.SortieReelle1, FeedwaterValve.Ouv) annotation (Line(
- points={{-84.7,107.3},{-110,107.3},{-110,97}}, color={0,0,255}));
- annotation (experiment(StopTime=3000),
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(graphics,
- coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-100},{140,200}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicDrum_CC;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo
deleted file mode 100644
index 3bc15a51..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo
+++ /dev/null
@@ -1,89 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicFlueGasesMultiFluidHeatExchanger
-
- BoundaryConditions.SourceP sourceP(C(h_vol_2(start=
- 71016.12237181065)),
- option_temperature=true,
- P0=10000000,
- Q(start=190407.49090838886))
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- BoundaryConditions.SinkP sinkP(C(h_vol_1(start=
- 71016.1223718086)))
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- HeatExchangers.DynamicFlueGasesMultiFluidHeatExchanger dynamicMultiFluidHeatExchanger(
- steady_state=true,
- Cfg1(h_vol_2(start=1999458.3239137873)),
- Cfg2(h_vol_1(start=1997835.1051783948)),
- ExchangerFlueGasesMetal(
- P(start={5000000.0,5000000.0,5000000.0,5000000.0,5000000.0,5000000.0}),
- Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343,
- 2702.7912398488343,2702.7912398488343}),
- Tp(start={293.20684981473266,293.655268073503,294.1038710234491,
- 294.55265602776745}),
- h(start={2000000.0,1999458.375,1998916.9494222174,1998375.8765143699,
- 1997835.125,100000.0}),
- rho2(start={9.227614370571606,9.229671002969678,9.231727464730685,
- 9.23378375498367,9.235839872860517})),
- TwoPhaseFlowPipe(
- P(start={10000000.0,8023904.042494878,6045867.025005122,
- 4065878.0712931687,2083926.1359166082,100000.0}),
- Q(start={3482.228448926616,3482.228448926616,3482.228448926616,
- 3482.228448926616,3482.228448926616}),
- h(start={80196.484375,80197.90894929563,80199.3305700632,
- 80200.75139888813,80202.17143579095,70825.8984375})),
- ExchangerWall(Tp(start={291.91912560937857,292.368260847782,
- 292.81758075140095,293.26708268122}), Tp1(start={
- 290.60590026437563,291.055766680952,291.5058177362657,
- 291.9560507892685})),
- Ns=4,
- inertia=false,
- Ntubes=100,
- diffusion=true,
- dynamic_energy_balance=true)
- annotation (Placement(transformation(extent={{-20,20},{0,40}})));
- BoundaryConditions.SourcePQ sourceP1(
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- h0=2e6,
- P0=5000000,
- Q0=500,
- T0=1273.15)
- annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90,
- origin={-10,70})));
-
- BoundaryConditions.Sink sinkP1
- annotation (Placement(transformation(extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-10,-10})));
-equation
- connect(sourceP.C, dynamicMultiFluidHeatExchanger.Cws1)
- annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchanger.Cws2, sinkP.C)
- annotation (Line(points={{0,30},{20,30}}, color={0,0,0}));
- connect(sourceP1.C, dynamicMultiFluidHeatExchanger.Cfg1)
- annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchanger.Cfg2, sinkP1.C)
- annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicFlueGasesMultiFluidHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo
deleted file mode 100644
index b4a5492d..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo
+++ /dev/null
@@ -1,85 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicMultiFluidHeatExchanger
-
- BoundaryConditions.SourceQ sourceP(C(h_vol_2(start=
- 71016.12237181065)),
- Q0=10,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(C(h_vol_1(start=
- 71016.1223718086)))
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- HeatExchangers.DynamicMultiFluidHeatExchanger dynamicMultiFluidHeatExchanger(
- steady_state=true,
- diffusion=true,
- dynamic_energy_balance=false,
- Cfg1(h_vol_2(start=71016.12237181155)),
- Cfg2(h_vol_1(start=71016.12237181314)),
- DynamicOnePhaseFlowPipe_1(
- P(start={300000.0,260001.59713260198,220002.3957916478,180002.39588440701,
- 140001.5973181204,100000.0}),
- Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343,
- 2702.7912398488343,2702.7912398488343}),
- h(start={71016.125,71016.125,71016.12237180988,71016.1223718091,71016.125,
- 70825.8984375})),
- DynamicOnePhaseFlowPipe_2(
- P(start={300000.0,260001.59801114563,220002.39710936273,180002.3972020214,
- 140001.59819646296,100000.0}),
- Q(start={3482.228448926616,3482.228448926616,3482.228448926616,
- 3482.228448926616,3482.228448926616}),
- Tp(start={290.0310327031831,290.04018142634584,290.0493302229013,
- 290.05847909283045}),
- h(start={71016.125,71016.125,71016.12237181216,71016.12237181274,
- 71016.125,70825.8984375})),
- ExchangerWall(Tp(start={290.03103270324897,290.0401814264445,
- 290.0493302229999,290.05847909289605}), Tp1(start={
- 290.03103270331616,290.04018142654525,290.0493302231005,
- 290.0584790929629})),
- Ntubes=10,
- Ns=4,
- inertia=false)
- annotation (Placement(transformation(extent={{-20,20},{0,40}})));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=5000000,
- T0=1273.15)
- annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90,
- origin={-10,70})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1
- annotation (Placement(transformation(extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-10,-10})));
-equation
- connect(sourceP.C, dynamicMultiFluidHeatExchanger.Cws1)
- annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchanger.Cws2, sinkP.C)
- annotation (Line(points={{0,30},{20,30}}, color={0,0,0}));
- connect(sourceP1.C, dynamicMultiFluidHeatExchanger.Cfg1)
- annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchanger.Cfg2, sinkP1.C)
- annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicMultiFluidHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo
deleted file mode 100644
index 36781c7f..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo
+++ /dev/null
@@ -1,87 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicMultiFluidHeatExchangerShell
-
- BoundaryConditions.SourceQ sourceP(C(h_vol_2(start=
- 71016.12237181065)),
- Q0=10,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(C(h_vol_1(start=
- 71016.1223718086)))
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- HeatExchangers.DynamicMultiFluidHeatExchangerShell dynamicMultiFluidHeatExchangerShell(
- Cfg1(h_vol_2(start=71016.12237181155)),
- Cfg2(h_vol_1(start=71016.12237181314)),
- DynamicOnePhaseFlowPipe(
- P(start={300000.0,260001.59713260198,220002.3957916478,180002.39588440701,
- 140001.5973181204,100000.0}),
- Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343,
- 2702.7912398488343,2702.7912398488343}),
- h(start={71016.125,71016.125,71016.12237180988,71016.1223718091,71016.125,
- 70825.8984375})),
- dynamicOnePhaseFlowShell(
- P(start={300000.0,260001.59801114563,220002.39710936273,180002.3972020214,
- 140001.59819646296,100000.0}),
- Q(start={3482.228448926616,3482.228448926616,3482.228448926616,
- 3482.228448926616,3482.228448926616}),
- Tp(start={290.0310327031831,290.04018142634584,290.0493302229013,
- 290.05847909283045}),
- h(start={71016.125,71016.125,71016.12237181216,71016.12237181274,
- 71016.125,70825.8984375})),
- ExchangerWall(Tp(start={290.03103270324897,290.0401814264445,
- 290.0493302229999,290.05847909289605}), Tp1(start={
- 290.03103270331616,290.04018142654525,290.0493302231005,
- 290.0584790929629})),
- Ntubes=10,
- Ns=4,
- region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- Dext=0.01,
- inertia=false,
- dynamic_energy_balance=false,
- diffusion=true)
- annotation (Placement(transformation(extent={{-20,20},{0,40}})));
-
- BoundaryConditions.SourceP sourceP1(
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=5000000,
- T0=1273.15)
- annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90,
- origin={-10,70})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1
- annotation (Placement(transformation(extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-10,-10})));
-equation
- connect(sourceP.C, dynamicMultiFluidHeatExchangerShell.Cws1)
- annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchangerShell.Cws2, sinkP.C)
- annotation (Line(points={{0,30},{20,30}}, color={0,0,0}));
- connect(sourceP1.C, dynamicMultiFluidHeatExchangerShell.Cfg1)
- annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchangerShell.Cfg2, sinkP1.C)
- annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicMultiFluidHeatExchangerShell;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo
deleted file mode 100644
index 73556af2..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo
+++ /dev/null
@@ -1,62 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicOnePhaseFlowPipe
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe
- dynamicOnePhaseFlowPipe(
- Q(start={536.5750641592207,536.5750641592207,536.5750641592207,
- 536.5750641592207,536.5750641592207,536.5750641592207,
- 536.5750641592207,536.5750641592207,536.5750641592207,
- 536.5750641592207,536.5750641592207}),
- h(start={71016.12237181116,74743.46665892199,78470.81094603281,
- 82198.15523314364,85925.49952025448,89652.84380736532,
- 93380.18809447614,97107.53238158698,100834.8766686978,
- 104562.22095580865,108289.56524291947,70825.9016030344}),
- P(start={300000,281833.41863537,263664.30473175,245492.47958308,
- 227317.76827098,209139.99948382,190959.00534677,172774.621262,
- 154586.68575823,136395.04034906,118199.5293995,100000}))
- annotation (Placement(transformation(extent={{-20,
- 20},{0,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource(
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- option_temperature=2,
- W0={2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6})
- annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0)));
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10)
- annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0)));
-equation
- connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-40,
- 30},{-20,30}}, color={0,0,255}));
- connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{0,30},
- {20,30}}, color={0,0,255}));
- connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{-10,
- 60.2},{-10,52}}, color={191,95,0}));
- connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh)
- annotation (Line(points={{-10,48},{-10,33}}, color={191,95,0}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicOnePhaseFlowPipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo
deleted file mode 100644
index b34b26b2..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo
+++ /dev/null
@@ -1,80 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicOnePhaseFlowShell
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowShell
- dynamicOnePhaseFlowPipeShell(
- Q(start={30,30,30,30,30,30,30,30,30,30,30}),
- Ds=1,
- ntubes=520,
- L=12,
- P(start={2000000,1996000,1993000,1990000,1986000,1983000,1980000,1976000,
- 1973000,1965000,1955000,1950000})) annotation (Placement(
- transformation(extent={{-48,-36},{48,36}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(option_temperature=false, P0(fixed=
- false) = 1900000)
- annotation (Placement(transformation(extent={{74,-15},{102,15}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=600e3,
- P0=2000000,
- Q(start=500, fixed=true))
- annotation (Placement(transformation(extent={{-103,-15},{-75,15}},
- rotation=0)));
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(
- lambda=10,
- Ns=10,
- cpw=460,
- rhow=7900,
- D=0.017,
- e=0.002,
- ntubes=520,
- L=12) annotation (Placement(transformation(extent={{-54,30},{54,58}},
- rotation=0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource(
- option_temperature=2,
- W0={-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6},
- T0={300,300,300,300,300,300,300,300,300,300})
- annotation (Placement(transformation(extent={{-12,76},{12,98}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe(
- Initialvalue=20e5,
- Starttime=300,
- Duration=600,
- Finalvalue=19.8e5)
- annotation (Placement(transformation(extent={{-100,32},{
- -80,52}}, rotation=0)));
-equation
- connect(sourceP.C, dynamicOnePhaseFlowPipeShell.C1)
- annotation (Line(points={{-75,0},{-48,0}}, color={0,0,255}));
- connect(dynamicOnePhaseFlowPipeShell.C2, sinkP.C)
- annotation (Line(points={{48,0},{74,0}}, color={0,0,255}));
- connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipeShell.CTh)
- annotation (Line(points={{0,41.2},{0,10.8}}, color={191,95,0}));
- connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,
- 76.22},{0,46.8}}, color={191,95,0}));
- connect(rampe.y, sourceP.IPressure)
- annotation (Line(points={{-79,42},{-70,42},{-70,24},{-98,24},{-98,0},{-96,0}}));
- annotation (Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicOnePhaseFlowShell;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo
deleted file mode 100644
index 42f8e5ea..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo
+++ /dev/null
@@ -1,89 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicPlateHeatExchanger
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger
- echangeurAPlaques1D(
- region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- steady_state=true,
- Ns=10,
- dynamic_energy_balance=false,
- diffusion=true,
- continuous_flow_reversal=true)
- annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0)));
-
- BoundaryConditions.SourcePQ sourceP(
- option_temperature=true,
- diffusion=true,
- T0=340)
- annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0)));
- BoundaryConditions.SourcePQ sourceP1
- annotation (Placement(
- transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- BoundaryConditions.Sink puitsP(option_temperature=true,
- diffusion=true) annotation (Placement(transformation(
- extent={{40,40},{60,60}}, rotation=0)));
- BoundaryConditions.Sink puitsP1
- annotation (Placement(transformation(
- extent={{20,20},{40,40}}, rotation=0)));
- HeatExchangers.StaticPlateHeatExchanger echangeurAPlaques(region_c=
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1)
- annotation (Placement(transformation(extent={{-20,-40},{0,-20}}, rotation=0)));
- BoundaryConditions.SourcePQ sourceP2(T0=340,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-80,-40},{-60,-20}},
- rotation=0)));
- BoundaryConditions.SourcePQ sourceP3
- annotation (Placement(
- transformation(extent={{-60,-60},{-40,-40}},
- rotation=0)));
- BoundaryConditions.Sink puitsP2
- annotation (Placement(transformation(
- extent={{40,-40},{60,-20}},
- rotation=0)));
- BoundaryConditions.Sink puitsP3
- annotation (Placement(transformation(
- extent={{20,-60},{40,-40}},
- rotation=0)));
-equation
- connect(sourceP.C, echangeurAPlaques1D.Ec)
- annotation (Line(points={{-60,50},{-20,50}}, color={0,0,255}));
- connect(sourceP1.C, echangeurAPlaques1D.Ef) annotation (Line(points={{-40,30},
- {-15,30},{-15,44}}, color={0,0,255}));
- connect(echangeurAPlaques1D.Sc, puitsP.C) annotation (Line(points={{0,50},{20,
- 50},{20,50},{40,50}}, color={0,0,255}));
- connect(echangeurAPlaques1D.Sf, puitsP1.C) annotation (Line(points={{-5,44},{
- -6,44},{-6,30},{20,30}}, color={0,0,255}));
- connect(sourceP2.C, echangeurAPlaques.Ec)
- annotation (Line(points={{-60,-30},{-20,-30}}, color={0,0,255}));
- connect(sourceP3.C, echangeurAPlaques.Ef)
- annotation (Line(points={{-40,-50},{-15,-50},{-15,-36}}, color={0,0,255}));
- connect(echangeurAPlaques.Sc, puitsP2.C) annotation (Line(points={{0,-29.8},{20,
- -29.8},{20,-30},{40,-30}}, color={0,0,255}));
- connect(echangeurAPlaques.Sf, puitsP3.C) annotation (Line(points={{-5,-36},{-6,
- -36},{-6,-50},{20,-50}}, color={0,0,255}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicPlateHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo
deleted file mode 100644
index a650c999..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo
+++ /dev/null
@@ -1,103 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicReliefValve
- import ThermoSysPro;
- parameter ThermoSysPro.Units.SI.AbsolutePressure Pinitial=18e5
- "Initial pressure";
- parameter ThermoSysPro.Units.SI.AbsolutePressure Pfinal=Pinitial
- "Final pressure";
- parameter ThermoSysPro.Units.SI.AbsolutePressure Pmax=21e5 "Maximum pressure";
-
- ThermoSysPro.Fluid.PressureLosses.DynamicReliefValve reliefValve(
- mech_steady_state=false,
- caract=[0,0; 0.1,2745; 0.2,4915; 0.3,6391; 0.4,7339; 0.5,7949; 0.6,8351;
- 0.7,8625; 0.8,8818; 0.9,8958; 1,9063],
- Cvmax=9063,
- Q(start=0),
- Pm(start=Pinitial),
- Pout=sinkP.P0,
- mode_caract=2,
- A2=1.1*reliefValve.A1,
- A1=1.3*Modelica.Constants.pi*pipe.D^2/4,
- m=50,
- Cd=0.44,
- Popen=2000000,
- z_max=0.05)
- annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe pipe(
- Q(start=0),
- Pm(start=Pinitial),
- L=2,
- D=0.2) annotation (Placement(transformation(extent={{-40,-40},{-20,-20}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP
- annotation (Placement(transformation(extent={{80,0},{
- 100,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
- InstrumentationAndControl.Blocks.Sources.Rampe ramp1(
- Duration=200,
- Finalvalue=Pmax,
- Initialvalue=Pinitial)
- annotation (Placement(transformation(extent={{-100,40},{-80,60}})));
- InstrumentationAndControl.Blocks.Sources.Rampe ramp2(
- Duration=200,
- Starttime=300,
- Finalvalue=Pmax - Pfinal)
- annotation (Placement(transformation(extent={{-100,0},{-80,20}})));
- InstrumentationAndControl.Blocks.Math.Add add(k2=-1)
- annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
- ThermoSysPro.Fluid.PressureLosses.Bend bend(R0=0.2, D=pipe.D)
- annotation (Placement(transformation(extent={{0,-20},{20,-40}})));
- ThermoSysPro.Fluid.PressureLosses.Diaphragm diaphragm(Ouv=1, D=0.5)
- annotation (Placement(transformation(extent={{40,0},{60,20}})));
-equation
- connect(sourceP.C, pipe.C1)
- annotation (Line(points={{-60,-30},{-40,-30}}, color={0,0,255}));
- connect(ramp1.y, add.u1) annotation (Line(points={{-79,50},{-70,50},{-70,36},{
- -61,36}}, color={0,0,255}));
- connect(ramp2.y, add.u2) annotation (Line(points={{-79,10},{-70,10},{-70,24},{
- -61,24}}, color={0,0,255}));
- connect(add.y, sourceP.IPressure) annotation (Line(points={{-39,30},{-20,30},{
- -20,-10},{-90,-10},{-90,-30},{-75,-30}},
- color={0,0,255}));
- connect(pipe.C2, bend.C1)
- annotation (Line(points={{-20,-30},{0,-30}}, color={0,0,255}));
- connect(bend.C2,reliefValve. C1)
- annotation (Line(points={{10,-20},{10,0.2}},color={0,0,255}));
- connect(reliefValve.C2, diaphragm.C1)
- annotation (Line(points={{20,10},{40,10}}, color={0,0,255}));
- connect(diaphragm.C2,sinkP. C)
- annotation (Line(points={{60,10},{80,10}}, color={0,0,255}));
- annotation (
- Diagram(coordinateSystem(
- preserveAspectRatio=false, initialScale=0.1)),
- Window(
- x=0.1,
- y=0.08,
- width=0.5,
- height=0.6),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})},
- coordinateSystem(preserveAspectRatio=false, initialScale=0.1)),
- experiment(StopTime=600, Interval=1),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicReliefValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo
deleted file mode 100644
index e5e3e0e4..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo
+++ /dev/null
@@ -1,120 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicTwoPhaseFlowPipe
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe
- dynamicTwoPhaseFlowPipe(L=20, advection=false,
- Q(start={378.2555714391421,378.2555714391421,378.2555714391421,
- 378.2555714391421,378.2555714391421,378.2555714391421,
- 378.2555714391421,378.2555714391421,378.2555714391421,
- 378.2555714391421,378.2555714391421}),
- h(start={71016.12237181116,89522.1287033792,108028.13503495205,
- 126534.14136650086,145040.14769798872,163546.15402957145,
- 182052.16036112772,200558.16669267463,219064.17302421754,
- 237570.17935577242,256076.18568728055,70825.9016030344}),
- dynamic_energy_balance=false,
- diffusion=true,
- P(start={300000,281934.94102069,263857.29519348,245762.87920492,
- 227647.89301968,209508.84324089,191342.485106,173145.77779074,
- 154915.84935981,136649.96881108,118345.52340716,100000}))
- annotation (Placement(transformation(extent={{-10,30},
- {10,50}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent={{-50,30},{-30,50}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP
- annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource(
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- option_temperature=2,
- W0={7e6,7e6,7e6,7e6,7e6,7e6,7e6,7e6,7e6,7e6})
- annotation (Placement(transformation(extent={{-10,70},{10,90}},rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,50},{10,70}},rotation=0)));
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe1(
- L=10,
- D=0.03,
- dpfCorr(fixed=false,
- start=0.23963336533422905)=
- 1,
- inertia=true,
- P(start={2000000,1999571.7070274,1999140.9402168,1998707.6248919,
- 1998271.6837223,1997833.0364983,1997391.5998908,1996715.822109,
- 1995640.0182728,1994163.0145856,1992283.4952231,1990000}))
- annotation (Placement(transformation(extent={{-40,-90},
- {40,-32}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- C(Q(fixed=true, start=1)),
- option_temperature=false,
- h0=800e3,
- P0=2000000)
- annotation (Placement(transformation(extent={{-90,-70},{-70,-50}},rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1(
- option_temperature=false,
- h0=2000e3,
- P0=1990000)
- annotation (Placement(transformation(extent={{70,-70},{90,-50}},rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource1(
- option_temperature=2,
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- W0={2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4})
- annotation (Placement(transformation(extent={{-10,-11},{10,9}}, rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1( Ns=10,
- L=10,
- lambda=10,
- cpw=460,
- rhow=7900,
- e=0.005,
- D=0.03)
- annotation (Placement(transformation(extent={{-40,-70},{40,10}},rotation=0)));
- InstrumentationAndControl.Blocks.Sources.Rampe rampe(
- Initialvalue=20e5,
- Starttime=300,
- Duration=600,
- Finalvalue=19.8e5)
- annotation (Placement(transformation(extent={{-74,-46},{-86,
- -35}},
- rotation=0)));
-equation
- connect(sourceP.C,dynamicTwoPhaseFlowPipe. C1) annotation (Line(points={{-30,40},
- {-10,40}}, color={0,0,255}));
- connect(dynamicTwoPhaseFlowPipe.C2,sinkP. C) annotation (Line(points={{10,40},
- {30,40}}, color={0,0,255}));
- connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,70.2},
- {0,62}}, color={191,95,0}));
- connect(heatExchangerWall.WT1,dynamicTwoPhaseFlowPipe. CTh)
- annotation (Line(points={{0,58},{0,43}}, color={191,95,0}));
- connect(sourceP1.C,dynamicTwoPhaseFlowPipe1. C1) annotation (Line(points={{-70,-60},
- {-42,-60},{-42,-61},{-40,-61}}, color={0,
- 0,255}));
- connect(dynamicTwoPhaseFlowPipe1.C2,sinkP1. C) annotation (Line(points={{40,-61},
- {40,-60},{70,-60}}, color={0,0,255}));
- connect(heatSource1.C,heatExchangerWall1. WT2)
- annotation (Line(points={{0,-10.8},{0,-22}}, color={191,95,0}));
- connect(heatExchangerWall1.WT1,dynamicTwoPhaseFlowPipe1. CTh)
- annotation (Line(points={{0,-38},{0,-52.3}}, color={191,95,0}));
- connect(rampe.y,sourceP1. IPressure)
- annotation (Line(points={{-86.6,-40.5},{-92,-40.5},{-92,-60},{-85,-60}}));
- annotation (experiment(StopTime=1000), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicTwoPhaseFlowPipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo
deleted file mode 100644
index 236edda9..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo
+++ /dev/null
@@ -1,79 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicTwoPhaseFlowRiser
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowRiser dynamicTwoPhaseFlowRiser(
- L=20,
- inertia=false,
- advection=false,
- dynamic_energy_balance=true,
- Q(start={0.7975821689256883,0.7975821689256898,0.7975821689256883,
- 0.7975821689256885,0.7975821689256883,0.797582168925689,
- 0.7975821689256886,0.7975821689256887,0.7975821689256888,
- 0.7975821689256888,0.7975821689256886}),
- h(start={71016.12237181116,196401.3226637204,196412.6067675415,
- 196423.89087136256,196435.17497518365,196446.45907900474,
- 196457.7431828258,196469.0272866469,196480.31139046798,
- 196491.59549428907,196502.87959811013,70825.9016030344}),
- diffusion=true,
- P(start={300000,281879.25838975,263692.15565175,245504.87004838,
- 227317.40156239,209129.75017657,190941.91587368,172753.89863649,
- 154565.69844777,136377.31529027,118188.74914676,100000})) annotation (
- Placement(transformation(extent={{-10,30},{10,48}}, rotation=0)));
- BoundaryConditions.SourceP sourcePQ(ftype=
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteamSimple)
- annotation (Placement(transformation(extent={{-50,30},{-30,50}}, rotation=0)));
- BoundaryConditions.SinkP sinkP
- annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource(
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- option_temperature=2,
- W0={0,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0})
- annotation (Placement(transformation(extent={{-10,80},{10,100}},
- rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,60},{10,80}},rotation=0)));
- Thermal.BoundaryConditions.HeatSource heatSource1(
- T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900},
- option_temperature=2,
- W0={0,0,0,0,0,0,0,0,0,0})
- annotation (Placement(transformation(extent={{-10,0},{10,-20}},rotation=0)));
- Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1(Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,20},{10,0}}, rotation=0)));
-equation
- connect(sourcePQ.C, dynamicTwoPhaseFlowRiser.C1) annotation (Line(points={{-30,
- 40},{-20,40},{-20,39.9},{-10,39.9}}, color={0,0,255}));
- connect(dynamicTwoPhaseFlowRiser.C2, sinkP.C) annotation (Line(points={{10,
- 39.9},{20,39.9},{20,40},{30,40}}, color={0,0,255}));
- connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,80.2},
- {0,72}}, color={191,95,0}));
- connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowRiser.CTh1)
- annotation (Line(points={{0,68},{0,45.3}}, color={0,0,0}));
- connect(dynamicTwoPhaseFlowRiser.CTh2, heatExchangerWall1.WT1)
- annotation (Line(points={{0,34.5},{0,12}}, color={0,0,0}));
- connect(heatExchangerWall1.WT2, heatSource1.C)
- annotation (Line(points={{0,8},{0,-0.2}}, color={0,0,0}));
- annotation (experiment(StopTime=1000), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicTwoPhaseFlowRiser;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo
deleted file mode 100644
index a185b333..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo
+++ /dev/null
@@ -1,306 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicWaterHeating
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=68.5297)
- "Maximum CV (active if mode_caract=0)";
- parameter Real LambdaPipe(fixed=false,start=0.003003)
- "Friction pressure loss coefficient (active if lambda_fixed=true)";
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=2750.e3,
- P0=40e5)
- annotation (Placement(transformation(extent={{-192,110},{-150,150}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur1(
- option_temperature=false, P0(fixed=true) = 10e5)
- annotation (Placement(transformation(extent={{124,-202},{160,-162}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve ControlValve_eau(
- mode_caract=0,
- Cvmax=CvmaxWater,
- Q(fixed=false, start=38.0656),
- Pm(start=24.771e5),
- h(start=906345),
- C1(h_vol_1(start=906345), h(start=906345)),
- Cv(start=34.26, fixed=false))
- annotation (Placement(transformation(extent={{88,-186},
- {108,-166}}, rotation=0)));
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicWaterHeater WaterHeating(
- ec=2e-3,
- Ns=10,
- Rv=1.2,
- Lc=2.5,
- PasL=0.028,
- PasT=0.024,
- ntubes3=1500,
- Dc=0.018,
- ntubes1=400,
- ntubes2=400,
- L1=11,
- L2=11,
- L3=22,
- pipe_1(
- z2=0.4,
- Tp(start={500,501,502,503,504,505,506,507,508,510}),
- h(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3,
- 965e3,980e3}),
- hb(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3,
- 965e3}),
- Q(start={202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,
- 202.4}),
- P(start={222.700e5,222.690e5,222.680e5,222.670e5,222.660e5,222.650e5,
- 222.640e5,222.630e5,222.620e5,222.610e5,222.600e5,222.590e5})),
- pipe_2(
- z2=0.4,
- Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- h(start={965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,
- 1070e3,1080e3,1080e3}),
- hb(start={965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,
- 1070e3,1080e3}),
- Q(start={57.57,57.57,57.57,57.57,57.57,57.57,57.57,57.57,57.57,57.57,
- 57.57}),
- P(start={222.600e5,222.590e5,222.580e5,222.570e5,222.560e5,222.550e5,
- 222.540e5,222.530e5,222.520e5,222.51e5,222.50e5,222.48e5})),
- C2ex(P(start=3900000)),
- Wall_1(
- Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4})),
- Wall_2(
- Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4})),
- Wall_3(
- Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,516,
- 516.4,517,517.4,518,518.4,519,519.4}),
- Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,
- 516,516.4,517,517.4,518,518.4,519,519.4}),
- Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,
- 516,516.4,517,517.4,518,518.4,519,519.4})),
- volumeC(h(start=1082.65e3), P(start=222.48e5)),
- volumeD1(h(start=953939), P(start=222.48e5)),
- volumeD(h(start=812750), P(start=222.72e5)),
- WaterHeating(
- steady_state=true,
- Vertical=false,
- step_square=true,
- Kvl=1,
- Klp=1500,
- Kvp=1200,
- Kpa=0.2,
- V=70,
- Mp=50000,
- zl(fixed=true, start=0.5),
- P(fixed=true, start=39.5e5),
- Cv(Q(fixed=false, start=35), P(fixed=false, start=39.5e5)),
- hv(start=1463490),
- hl(start=906345),
- Pfond(start=39.542e5),
- Tp1(start={500,501,502,503,504,505,506,507,508,510}),
- Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- Tp3(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,
- 516,516.4,517,517.4,518,518.4,519,519.4}),
- Tp(start=509)),
- pipe_3(
- z2=1,
- Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,516,
- 516.4,517,517.4,518,518.4,519,519.4}),
- h(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3,
- 965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,1070e3,
- 1080e3,1080e3}),
- hb(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3,
- 965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,1070e3,
- 1080e3}),
- Q(start={202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,
- 202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4}),
- P(start={222.700e5,222.690e5,222.680e5,222.670e5,222.660e5,222.650e5,
- 222.640e5,222.630e5,222.620e5,222.610e5,222.600e5,222.590e5,
- 222.580e5,222.570e5,222.560e5,222.550e5,222.540e5,222.530e5,
- 222.520e5,222.51e5,222.50e5,222.48e5})),
- P0c=4000000) annotation (Placement(transformation(extent={{-58,-90},{162,96}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2
- annotation (Placement(transformation(extent={{-150,22},{-192,66}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossWaterIn( K=35, Q(fixed=false,
- start=250),
- Pm(start=227e5)) annotation (Placement(transformation(extent={{-99,
- -48},{-79,-28}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossWaterOut( K=30, Q(fixed=false,
- start=250),
- Pm(start=222.48e5),
- C2(h_vol_1(start=1082650), h(start=1082650)))
- annotation (Placement(transformation(extent={{
- -80,34},{-100,54}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- option_temperature=true,
- P0=220e5,
- h0=900e3,
- T0=482.87)
- annotation (Placement(transformation(extent={{-192,-60},{-150,-16}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(Q0=53, C1(h_vol_1(start=
- 1082.65e3), h(start=1082.65e3)))
- annotation (Placement(transformation(extent={{-115,34},{-135,54}}, rotation=
- 0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(
- Table=[0,260; 378,260; 390,238; 438,275; 507,135; 936,65; 1404,50; 1872,
- 50]) annotation (Placement(transformation(extent={{-195,78},{-175,
- 98}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Level(k=0.50)
- annotation (Placement(transformation(extent={{135,
- -152},{113,-130}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.IdealCheckValve checkValve(Qmin=0.5, C2(h_vol_1(
- start=2750.e3), h(start=2750.e3)))
- annotation (Placement(transformation(extent={{-100,122},{-84,138}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossPurge( K=1e-3,
- T(fixed=false, start=461.56),
- Q(fixed=false, start=35),
- Pm(start=3900000),
- C2(h_vol_1(start=906340), h(start=906340)))
- annotation (Placement(transformation(
- origin={54,-138},
- extent={{-10,-10},{10,10}},
- rotation=270)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps
- Pression_purge(Table=[0,10e5; 378,10e5; 418,7e5; 1145,3.9e5; 2000,3.9e5])
- annotation (Placement(transformation(extent={{162,-178},{182,
- -158}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PressureLoss_Steam(
- Q(fixed=false, start=35),
- L=10,
- D=0.1,
- lambda=LambdaPipe,
- Pm(start=40.34e5),
- C1(h_vol_1(start=2750e3), h(start=2750e3)))
- annotation (Placement(transformation(extent={{-48,162},
- {30,98}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_Turbine1(Table=
- [0,41.19e5; 378,41.19e5; 418,21.e5; 1145,5.e5; 2000,5.e5])
- annotation (Placement(transformation(extent={{-195,160},{
- -175,180}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA2(
- Table=[0,222.72e5; 378,222.72e5; 438,230e5; 597,217e5; 1000,
- 216e5; 1533,214e5; 1863,213.5e5; 2340,213e5; 2500,213e5])
- annotation (Placement(transformation(extent={{-195,-8},{-175,
- 12}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Temperature_eauA1(Table=
- [0,462; 448,462; 1155,420.0; 2000,420.0])
- annotation (Placement(transformation(extent={{-196,-84},{
- -176,-64}}, rotation=0)));
-equation
- connect(ControlValve_eau.C2, Puit_condenseur1.C)
- annotation (Line(points={{108,-182},{124,-182}}, color={0,0,255}));
- connect(Puit_condenseur2.C,refQ. C2) annotation (Line(
- points={{-150,44},{-135,44}},
- color={255,0,0},
- thickness=0.5));
- connect(refQ.C1, singularPressureLossWaterOut.C2)
- annotation (Line(
- points={{-115,44},{-100,44}},
- color={255,0,0},
- thickness=0.5));
- connect(sourceP1.C, singularPressureLossWaterIn.C1)
- annotation (Line(
- points={{-150,-38},{-99,-38}},
- color={0,0,255},
- thickness=0.5));
- connect(singularPressureLossWaterOut.C1, WaterHeating.Ce2)
- annotation (Line(
- points={{-80,44},{-64,44},{-64,43.92},{-58,43.92}},
- color={255,0,0},
- thickness=0.5));
- connect(singularPressureLossWaterIn.C2, WaterHeating.Ce1)
- annotation (Line(
- points={{-79,-38},{-58,-38},{-58,-38.85}},
- color={0,0,255},
- thickness=0.5));
- connect(sourceP.C, checkValve.C1) annotation (Line(
- points={{-150,130},{-100,130}},
- color={127,0,0},
- thickness=1));
- connect(singularPressureLossPurge.C1, WaterHeating.C2ex)
- annotation (Line(points={{54,-128},{54,-90},{52,-90}}));
- connect(Pression_purge.y, Puit_condenseur1.IPressure)
- annotation (Line(points={{183,-168},{196,-168},{196,-182},{151,-182}}));
- connect(checkValve.C2, PressureLoss_Steam.C1) annotation (Line(
- points={{-84,130},{-48,130}},
- color={127,0,0},
- thickness=1));
- connect(WaterHeating.C1vap, PressureLoss_Steam.C2) annotation (Line(
- points={{52,96},{52,130},{30,130}},
- color={127,0,0},
- thickness=1));
- connect(singularPressureLossPurge.C2, ControlValve_eau.C1) annotation (Line(
- points={{54,-148},{54,-182},{88,-182}}, color={0,0,255}));
- connect(Pression_Turbine1.y, sourceP.IPressure) annotation (Line(points={{
- -174,170},{-174,152},{-190,152},{-190,130},{-181.5,130}}));
- connect(Pression_eauA2.y, sourceP1.IPressure) annotation (Line(points={{-174,
- 2},{-174,-10},{-194,-10},{-194,-38},{-181.5,-38}}));
- connect(Debit_eauA.y, refQ.IMassFlow)
- annotation (Line(points={{-174,88},{-125,88},{-125,55}}));
- connect(Level.y, ControlValve_eau.Ouv)
- annotation (Line(points={{111.9,-141},{98,-141},{98,-165}}));
- connect(Temperature_eauA1.y, sourceP1.ISpecificEnthalpyOrTemperature)
- annotation (Line(points={{-175,-74},{-171,-74},{-171,-49}}, color={0,0,255}));
- annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,200}}),
- graphics={
- Text(
- extent={{-124,206},{130,146}},
- lineColor={0,0,255},
- textString=
- "1 Ouv et 1 Cvmax = false, Qvap et niveau=true ou P cavite"),
- Text(
- extent={{-74,-190},{118,-222}},
- lineColor={0,0,255},
- textString=
- "COP0l_coef_h =false , T_Dp_purge=true"),
- Text(
- extent={{-186,-198},{-84,-212}},
- lineColor={0,0,255},
- textString=
- "Qvap=true ==> Erreur"),
- Text(
- extent={{16,170},{130,156}},
- lineColor={0,0,255},
- textString=
- "checkValve Qmin =0.5"),
- Text(
- extent={{-136,168},{-18,154}},
- lineColor={0,0,255},
- textString="With guess values")}),
- experiment(StopTime=1000, Tolerance=1e-004),
- experimentSetupOutput,
- Icon(graphics={
- Rectangle(
- lineColor={128,128,128},
- extent={{-220,-240},{220,240}},
- radius=25.0),
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicWaterHeating;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo
deleted file mode 100644
index 9d9573f8..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo
+++ /dev/null
@@ -1,298 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicWaterHeatingOnePipe
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=68.5297)
- "Maximum CV (active if mode_caract=0)";
- parameter Real LambdaPipe(fixed=false,start=0.003003)
- "Friction pressure loss coefficient (active if lambda_fixed=true)";
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=2750.e3,
- P0=40e5)
- annotation (Placement(transformation(extent={{-192,110},{-150,150}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur1(
- option_temperature=false, P0(fixed=true) = 10e5)
- annotation (Placement(transformation(extent={{124,-202},{160,-162}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve ControlValve_eau(
- mode_caract=0,
- Cvmax=CvmaxWater,
- Q(fixed=false, start=38.0656),
- Pm(start=24.771e5),
- h(start=906345),
- C1(h_vol_1(start=906345), h(start=906345)),
- Cv(start=34.26, fixed=false))
- annotation (Placement(transformation(extent={{88,-186},
- {108,-166}}, rotation=0)));
-
- ThermoSysPro.Fluid.HeatExchangers.DynamicWaterHeaterOnePipe WaterHeating(
- ec=2e-3,
- Ns=10,
- Rv=1.2,
- Lc=2.5,
- PasL=0.028,
- PasT=0.024,
- ntubes3=1500,
- Dc=0.018,
- ntubes1=400,
- ntubes2=400,
- L1=11,
- L2=11,
- L3=22,
- C2ex(P(start=3953920.2674434385)),
- Wall_3(
- Tp(start={497.4216192636609,502.69423468274414,506.9759296757205,
- 510.4223715331536,513.1750788320363,515.3580718035844,
- 517.0775540203194,518.4230303861297,519.4690257033071,
- 520.2769753151857,520.8970764101637,521.3700027404278,
- 521.7284442755915,521.9984626845046,522.2006676867453,
- 522.3512258466948,522.4627164232634,522.5440949624972,
- 522.5983494885799,522.6391412946117}),
- Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,
- 516,516.4,517,517.4,518,518.4,519,519.4}),
- Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,
- 516,516.4,517,517.4,518,518.4,519,519.4})),
- volumeC(h(start=1083284.4675828198), P(start=22239324.06759518)),
- volumeD(h(start=812750.3853612987), P(start=222.72e5)),
- WaterHeating(
- steady_state=true,
- Vertical=false,
- step_square=true,
- Kvl=1,
- Klp=1500,
- Kvp=1200,
- Kpa=0.2,
- V=70,
- Mp=50000,
- zl(fixed=true, start=0.5),
- P(fixed=true, start=39.5e5),
- Cv(Q(fixed=false, start=35), P(fixed=false, start=39.5e5)),
- hv(start=1431115.3931413875),
- hl(start=1083784.8007690564),
- Pfond(start=39.542e5),
- Tp1(start={500,501,502,503,504,505,506,507,508,510}),
- Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}),
- Tp3(start={502.0668232342926,506.5603551100769,510.17517354535573,
- 513.0552006761686,515.3300849797615,517.1125155075463,
- 518.4982207642074,519.5672140241339,520.3855368446975,
- 521.0071208743625,521.475583235511,521.8258726586643,
- 522.0857355520467,522.276996946816,522.4166635499804,
- 522.5178617542946,522.5906259809204,522.6416937796047,
- 522.6717272169116,522.6943081560064}),
- Tp(start=522.7203786935834)),
- pipe_3(
- z2=1,
- Tp(start={492.2865845099074,498.42043682971996,503.43932965553495,
- 507.5119139438755,510.7928300582301,513.4186242679523,
- 515.5070797958261,517.1581940553467,518.4558696409629,
- 519.4698368458761,520.2575667844292,520.866061927203,
- 521.3334770960658,521.6905573412918,521.9618953291181,
- 522.1670184035046,522.3213189657012,522.4362044759667,
- 522.5172341741693,522.5781571584042}),
- h(start={812750.375,863278.0600600096,905331.3426571415,940130.751800155,
- 968769.0495620216,992209.8823638612,1011293.6430149649,
- 1026746.7829727756,1039192.5095809929,1049161.7546575891,
- 1057103.8294379094,1063396.4712379558,1068355.1441001317,
- 1072241.5390561111,1075271.2636377309,1077620.734010462,
- 1079433.2969658624,1080824.6185597836,1081886.238523024,
- 1082684.3963576336,1083284.4675828198,1083284.5}),
- hb(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3,
- 965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,1070e3,
- 1080e3}),
- Q(start={202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,
- 202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4}),
- P(start={22269346.0,22267948.39153832,22266544.294239394,
- 22265134.171108145,22263718.740660597,22262298.715698708,
- 22260874.773397826,22259447.536273584,22258017.56171816,
- 22256585.338030815,22255151.28511641,22253715.75831186,
- 22252279.054104224,22250841.416797128,22249403.045444023,
- 22247964.100585815,22246524.71050402,22245084.976831134,
- 22243644.979685582,22242204.783200525,22240764.436308913,22239324.0})),
- P0c=4000000) annotation (Placement(transformation(extent={{-58,-90},{162,96}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2
- annotation (Placement(transformation(extent={{-150,22},{-192,66}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossWaterIn( K=35, Q(fixed=false,
- start=250),
- Pm(start=22270672.891128033))
- annotation (Placement(transformation(extent={{-99,
- -48},{-79,-28}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossWaterOut( K=30, Q(fixed=false,
- start=250),
- Pm(start=22238086.493105933),
- C2(h_vol_1(start=1082650), h(start=1082650)))
- annotation (Placement(transformation(extent={{
- -80,34},{-100,54}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- option_temperature=true,
- P0=220e5,
- h0=900e3,
- T0=482.87)
- annotation (Placement(transformation(extent={{-192,-60},{-150,-16}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(Q0=53, C1(h_vol_1(start=
- 1082.65e3), h(start=1082.65e3)))
- annotation (Placement(transformation(extent={{-115,34},{-135,54}}, rotation=
- 0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(
- Table=[0,260; 378,260; 390,238; 438,275; 507,135; 936,65; 1404,50; 1872,
- 50]) annotation (Placement(transformation(extent={{-195,78},{-175,
- 98}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Level(k=0.50)
- annotation (Placement(transformation(extent={{135,
- -152},{113,-130}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.IdealCheckValve checkValve(Qmin=0.5, C2(h_vol_1(
- start=2750.e3), h(start=2750.e3)))
- annotation (Placement(transformation(extent={{-100,122},{-84,138}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossPurge( K=1e-3,
- T(fixed=false, start=461.56),
- Q(fixed=false, start=35),
- Pm(start=3953920.266328794),
- C2(h_vol_1(start=906340), h(start=906340)))
- annotation (Placement(transformation(
- origin={54,-138},
- extent={{-10,-10},{10,10}},
- rotation=270)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps
- Pression_purge(Table=[0,10e5; 378,10e5; 418,7e5; 1145,3.9e5; 2000,3.9e5])
- annotation (Placement(transformation(extent={{162,-178},{182,
- -158}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PressureLoss_Steam(
- Q(fixed=false, start=35),
- L=10,
- D=0.1,
- lambda=LambdaPipe,
- Pm(start=40.34e5),
- C1(h_vol_1(start=2750e3), h(start=2750e3)))
- annotation (Placement(transformation(extent={{-48,162},
- {30,98}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_Turbine1(Table=
- [0,41.19e5; 378,41.19e5; 418,21.e5; 1145,5.e5; 2000,5.e5])
- annotation (Placement(transformation(extent={{-195,160},{
- -175,180}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA2(
- Table=[0,222.72e5; 378,222.72e5; 438,230e5; 597,217e5; 1000,
- 216e5; 1533,214e5; 1863,213.5e5; 2340,213e5; 2500,213e5])
- annotation (Placement(transformation(extent={{-195,-8},{-175,
- 12}}, rotation=0)));
- InstrumentationAndControl.Blocks.Tables.Table1DTemps Temperature_eauA1(Table=
- [0,462; 448,462; 1155,420.0; 2000,420.0])
- annotation (Placement(transformation(extent={{-196,-84},{
- -176,-64}}, rotation=0)));
-equation
- connect(ControlValve_eau.C2, Puit_condenseur1.C)
- annotation (Line(points={{108,-182},{124,-182}}, color={0,0,255}));
- connect(Puit_condenseur2.C,refQ. C2) annotation (Line(
- points={{-150,44},{-135,44}},
- color={255,0,0},
- thickness=0.5));
- connect(refQ.C1, singularPressureLossWaterOut.C2)
- annotation (Line(
- points={{-115,44},{-100,44}},
- color={255,0,0},
- thickness=0.5));
- connect(sourceP1.C, singularPressureLossWaterIn.C1)
- annotation (Line(
- points={{-150,-38},{-99,-38}},
- color={0,0,255},
- thickness=0.5));
- connect(singularPressureLossWaterOut.C1, WaterHeating.Ce2)
- annotation (Line(
- points={{-80,44},{-64,44},{-64,43.92},{-58,43.92}},
- color={255,0,0},
- thickness=0.5));
- connect(singularPressureLossWaterIn.C2, WaterHeating.Ce1)
- annotation (Line(
- points={{-79,-38},{-58,-38},{-58,-38.85}},
- color={0,0,255},
- thickness=0.5));
- connect(sourceP.C, checkValve.C1) annotation (Line(
- points={{-150,130},{-100,130}},
- color={127,0,0},
- thickness=1));
- connect(singularPressureLossPurge.C1, WaterHeating.C2ex)
- annotation (Line(points={{54,-128},{54,-90},{52,-90}}));
- connect(Pression_purge.y, Puit_condenseur1.IPressure)
- annotation (Line(points={{183,-168},{196,-168},{196,-182},{151,-182}}));
- connect(checkValve.C2, PressureLoss_Steam.C1) annotation (Line(
- points={{-84,130},{-48,130}},
- color={127,0,0},
- thickness=1));
- connect(WaterHeating.C1vap, PressureLoss_Steam.C2) annotation (Line(
- points={{52,96},{52,130},{30,130}},
- color={127,0,0},
- thickness=1));
- connect(singularPressureLossPurge.C2, ControlValve_eau.C1) annotation (Line(
- points={{54,-148},{54,-182},{88,-182}}, color={0,0,255}));
- connect(Pression_Turbine1.y, sourceP.IPressure) annotation (Line(points={{
- -174,170},{-174,152},{-190,152},{-190,130},{-181.5,130}}));
- connect(Pression_eauA2.y, sourceP1.IPressure) annotation (Line(points={{-174,
- 2},{-174,-10},{-194,-10},{-194,-38},{-181.5,-38}}));
- connect(Debit_eauA.y, refQ.IMassFlow)
- annotation (Line(points={{-174,88},{-125,88},{-125,55}}));
- connect(Level.y, ControlValve_eau.Ouv)
- annotation (Line(points={{111.9,-141},{98,-141},{98,-165}}));
- connect(Temperature_eauA1.y, sourceP1.ISpecificEnthalpyOrTemperature)
- annotation (Line(points={{-175,-74},{-171,-74},{-171,-49}}, color={0,0,255}));
- annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,200}}),
- graphics={
- Text(
- extent={{-124,206},{130,146}},
- lineColor={0,0,255},
- textString=
- "1 Ouv et 1 Cvmax = false, Qvap et niveau=true ou P cavite"),
- Text(
- extent={{-74,-190},{118,-222}},
- lineColor={0,0,255},
- textString=
- "COP0l_coef_h =false , T_Dp_purge=true"),
- Text(
- extent={{-186,-198},{-84,-212}},
- lineColor={0,0,255},
- textString=
- "Qvap=true ==> Erreur"),
- Text(
- extent={{16,170},{130,156}},
- lineColor={0,0,255},
- textString=
- "checkValve Qmin =0.5"),
- Text(
- extent={{-136,168},{-18,154}},
- lineColor={0,0,255},
- textString="With guess values")}),
- experiment(StopTime=1000, Tolerance=1e-004),
- experimentSetupOutput,
- Icon(graphics={
- Rectangle(
- lineColor={128,128,128},
- extent={{-220,-240},{220,240}},
- radius=25.0),
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicWaterHeatingOnePipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo
deleted file mode 100644
index 2ec43ae6..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo
+++ /dev/null
@@ -1,84 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestDynamicWaterSteamMultiFluidHeatExchanger
-
- BoundaryConditions.SourceQ sourceP(C(h_vol_2(start=
- 71016.12237181065)),
- Q0=10,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(C(h_vol_1(start=
- 71016.1223718086)))
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- HeatExchangers.DynamicWaterSteamMultiFluidsHeatExchanger dynamicMultiFluidHeatExchanger(
- steady_state=true,
- Cfg1(h_vol_2(start=71016.12237181155)),
- Cfg2(h_vol_1(start=71016.12237181314)),
- ExchangerMultiFluids(
- P(start={300000.0,260001.59713260198,220002.3957916478,180002.39588440701,
- 140001.5973181204,100000.0}),
- Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343,
- 2702.7912398488343,2702.7912398488343}),
- h(start={71016.125,71016.125,71016.12237180988,71016.1223718091,71016.125,
- 70825.8984375})),
- TwoPhaseFlowPipe(
- P(start={300000.0,260001.59801114563,220002.39710936273,180002.3972020214,
- 140001.59819646296,100000.0}),
- Q(start={3482.228448926616,3482.228448926616,3482.228448926616,
- 3482.228448926616,3482.228448926616}),
- h(start={71016.125,71016.125,71016.12237181216,71016.12237181274,
- 71016.125,70825.8984375})),
- ExchangerWall(Tp(start={290.03103270324897,290.0401814264445,
- 290.0493302229999,290.05847909289605}), Tp1(start={
- 290.03103270331616,290.04018142654525,290.0493302231005,
- 290.0584790929629})),
- Ntubes=10,
- Ns=4,
- diffusion=true,
- dynamic_mass_balance=true,
- dynamic_energy_balance=false,
- inertia=false)
- annotation (Placement(transformation(extent={{-20,20},{0,40}})));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=5000000,
- T0=1273.15)
- annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90,
- origin={-10,70})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1
- annotation (Placement(transformation(extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-10,-10})));
-equation
- connect(sourceP.C, dynamicMultiFluidHeatExchanger.Cws1)
- annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchanger.Cws2, sinkP.C)
- annotation (Line(points={{0,30},{20,30}}, color={0,0,0}));
- connect(sourceP1.C, dynamicMultiFluidHeatExchanger.Cfg1)
- annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0}));
- connect(dynamicMultiFluidHeatExchanger.Cfg2, sinkP1.C)
- annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestDynamicWaterSteamMultiFluidHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo
deleted file mode 100644
index cb583f64..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo
+++ /dev/null
@@ -1,53 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestFixedPowerHeatExchanger
-
- ThermoSysPro.Fluid.HeatExchangers.FixedPowerHeatExchanger
- plateHeatExchanger(region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- DW=1.e6) annotation (Placement(transformation(extent={{-20,40},{0,60}},
- rotation=0)));
- BoundaryConditions.SourcePQ sourceP2(T0=340,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- BoundaryConditions.SourcePQ sourceP3(option_temperature=
- true)
- annotation (Placement(transformation(extent={{-60,40},{-40,60}}, rotation=0)));
- BoundaryConditions.Sink puitsP2
- annotation (Placement(transformation(
- extent={{20,20},{40,40}}, rotation=0)));
- BoundaryConditions.Sink puitsP3
- annotation (Placement(transformation(
- extent={{20,40},{40,60}}, rotation=0)));
-equation
- connect(sourceP3.C, plateHeatExchanger.Ef)
- annotation (Line(points={{-40,50},{-20,50}}, color={0,0,0}));
- connect(plateHeatExchanger.Sf, puitsP3.C) annotation (Line(points={{-0.2,50.1},
- {9.9,50.1},{9.9,50},{20,50}}, color={0,0,0}));
- connect(plateHeatExchanger.Sc, puitsP2.C) annotation (Line(points={{-4.2,44},
- {-4,44},{-4,30},{20,30}}, color={0,0,0}));
- connect(plateHeatExchanger.Ec, sourceP2.C) annotation (Line(points={{-15.8,44},
- {-16,44},{-16,30},{-40,30}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestFixedPowerHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo
deleted file mode 100644
index 95d64b9f..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo
+++ /dev/null
@@ -1,82 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestFossilFuelBoiler
- import ThermoSysPro;
- ThermoSysPro.Fluid.Boilers.FossilFuelBoiler FossilFuelBoiler(
- Wloss=0,
- Ke=1.e6,
- Tsf=386.16)
- annotation (Placement(transformation(extent={{-45,-51},{45,51}}, rotation=0)));
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ(
- T0=338.16,
- Cp=1282,
- Xh=0.24403,
- Xc=0.75323,
- Q0=1.45) annotation (Placement(transformation(extent={{-36,-78},{0,-41}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(
- Xco2=0,
- Xh2o=0.01,
- Q0=27.,
- Xo2=0.233,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- T0=298.16,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-110,-50},{-71,-13}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP annotation (Placement(transformation(
- extent={{68,-51},{110,-12}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
- Q0=24.,
- h0=600e3,
- P0=14000000)
- annotation (Placement(transformation(extent={{-107,14},{-71,48}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation(
- extent={{74,13},{110,49}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(K=1e-3)
- annotation (Placement(transformation(extent={{-64,25},{-56,37}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(K=1e-3)
- annotation (Placement(transformation(extent={{57,25},{65,37}}, rotation=0)));
-equation
- connect(sourceQ.C, FossilFuelBoiler.Cair) annotation (Line(
- points={{-71,-31.5},{-63.5,-31.5},{-63.5,-31.62},{-45,-31.62}},
- color={0,0,0},
- thickness=1));
- connect(FossilFuelBoiler.Cfg, sinkP.C) annotation (Line(
- points={{45,-31.62},{62,-31.62},{62,-31.5},{68,-31.5}},
- color={0,0,0},
- thickness=1));
- connect(fuelSourcePQ.C, FossilFuelBoiler.Cfuel) annotation (Line(points={
- {0,-59.5},{0,-40.8}}, color={0,0,0}));
- connect(sourcePQ.C, singularPressureLoss.C1)
- annotation (Line(points={{-71,31},{-64,31}}, color={0,0,255}));
- connect(singularPressureLoss.C2, FossilFuelBoiler.Cws1) annotation (Line(
- points={{-56,31},{-50,31},{-50,30.6},{-45,30.6}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, sink.C)
- annotation (Line(points={{65,31},{74,31}}, color={0,0,255}));
- connect(FossilFuelBoiler.Cws2, singularPressureLoss1.C1) annotation (Line(
- points={{45,30.6},{51,30.6},{51,31},{57,31}}, color={0,0,255}));
- annotation ( Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestFossilFuelBoiler;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo
deleted file mode 100644
index 17a20108..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo
+++ /dev/null
@@ -1,172 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestFresnelField
- parameter Integer Nt=3 "Number of trains";
-public
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(
- ntubes=1,
- steady_state=true,
- D=0.07,
- e=0.004,
- Ns=30,
- T0=500,
- lambda=20,
- cpw=500,
- rhow=8000,
- Tp(start={628.0843201819387,627.9310075597404,627.8220175907211,
- 627.7368992018166,627.6679716601412,627.6112649113921,
- 627.5643995456558,627.5258238160011,627.4944728950805,
- 627.4695948757801,627.4506537300122,627.4372716636091,
- 627.4291939746797,627.426267226699,627.428426585461,627.4356896138493,
- 627.4481553612113,627.4660085346942,627.4895290639054,
- 627.5191082002851,627.5552734790091,627.5987264837852,
- 627.6504001032708,627.7115474128314,627.7838847016081,
- 627.8698331666657,627.9729350144038,629.4253815385038,
- 633.135688507217,636.2622387488283}),
- Tp1(start={610.2709965207655,610.0984334604643,609.9757644369477,
- 609.8799665740102,609.8023932206363,609.7385750723525,
- 609.6858335131916,609.6424216866362,609.6071408778737,
- 609.5791446660139,609.5578296140685,609.5427704711935,
- 609.533680491646,609.5303869740989,609.5328169418054,609.540990157294,
- 609.5550181389947,609.5751088339957,609.6015773714007,
- 609.6348642175905,609.6755632868924,609.7244644309128,
- 609.7826179283193,609.8514345863706,609.9328467812495,
- 610.0295806069864,610.1456244663702,611.7808730290952,
- 615.9622431406954,619.4903247027197}),
- Tp2(start={644.9596553467713,644.824579502235,644.7285482944553,
- 644.6535470354397,644.592810046145,644.5428402353538,
- 644.5015416419557,644.4675473586904,644.4399193877858,
- 644.4179953736024,644.4013031238645,644.3895098327511,
- 644.3823911261306,644.3798118348441,644.3817148399042,644.38811560583,
- 644.3991013774125,644.4148348525065,644.4355626048274,
- 644.4616292617266,644.4934994867675,644.531791236838,
- 644.5773261834961,644.6312079828199,644.6949482231629,
- 644.7706792525222,644.8615205623447,646.1407907783827,
- 649.404839172216,652.1510013554424}),
- L=1e4/11.46)
- annotation (Placement(transformation(extent={{-40,-36},{40,-2}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP(Q0=11, h0=1500e3)
- annotation (Placement(transformation(extent={{-101,-55},{-81,-35}},
- rotation=0)));
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe
- dynamicTwoPhaseFlowPipe(
- ntubes=1,
- steady_state=true,
- rugosrel=0.00005,
- dpfCorr=1,
- Ns=30,
- P(start={12512365.778485337,12512269.4730028,12512159.010926897,
- 12512028.619141866,12511878.28140543,12511707.984695798,
- 12511517.718132183,12511307.472416837,12511077.239500606,
- 12510827.012364838,12510556.784871727,12510266.551658653,
- 12509956.30806284,12509626.050068311,12509275.774270097,
- 12508905.477852736,12508515.15858121,12508104.814803492,
- 12507674.445464557,12507224.050132478,12506753.629037917,
- 12506263.183129327,12505752.714147368,12505222.224723859,
- 12504671.718513375,12504101.200370008,12503510.676589508,
- 12502896.415784404,12502231.48634808,12501522.52554151,
- 12500776.553197166,12500000.0}),
- h(start={1500000.0,1536254.1810191544,1572547.5410785251,1608868.7411348266,
- 1645211.676359884,1681572.2077847784,1717947.2125321354,
- 1754334.1766730088,1790730.9833788855,1827135.788296852,
- 1863546.9394607474,1899962.9220483964,1936382.3178860326,
- 1972803.7739566958,2009225.9764870608,2045647.6282789519,
- 2082067.4276265746,2118484.0474634594,2154896.1134394333,
- 2191302.179544121,2227700.6996020116,2264089.9923674623,
- 2300468.196934767,2336833.213464297,2373182.6211112435,
- 2409513.559261445,2445822.5467506223,2482105.1942732874,
- 2518015.7979130256,2552967.680496474,2587102.355161259,
- 82548.43470391157}),
- D=0.07,
- inertia=false,
- L=1e4/11.46) annotation (Placement(transformation(extent={{-36,
- -67},{36,-20}}, rotation=0)));
- ThermoSysPro.Solar.Collectors.FresnelField champThermosolaireLFR_N(
- Ns=30,
- T(start=fill(500, 30)),
- F12=0.6366,
- A=1e4,
- T0=303)
- annotation (Placement(transformation(extent={{-40,-16},{40,72}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(
- h0=2000e3, P0=125e5) annotation (Placement(transformation(extent={{80,-54},
- {100,-34}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe DNI(
- Starttime=100,
- Initialvalue=100,
- Duration=3600,
- Finalvalue=900) annotation (Placement(transformation(extent={{72,39},{58,53}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Angles(
- Starttime=100,
- Initialvalue=45,
- Finalvalue=45,
- Duration=3600) annotation (Placement(transformation(extent={{-26,77},{-12,
- 90}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Q(
- Starttime=100,
- Duration=3600,
- Initialvalue=2,
- Finalvalue=3) annotation (Placement(transformation(extent={{7,-6.5},{-7,
- 6.5}}, rotation=90,
- origin={-90,-9.5})));
- Junctions.MassFlowMultiplier massFlowMultiplier1(alpha=1/Nt)
- annotation (Placement(transformation(extent={{-70,-54},{-50,-34}})));
- Junctions.MassFlowMultiplier massFlowMultiplier2(alpha=Nt)
- annotation (Placement(transformation(extent={{52,-54},{72,-34}})));
-equation
- connect(champThermosolaireLFR_N.P, heatExchangerWall.WT2)
- annotation (Line(points={{0,1.6},{0,-15.6}}, color={191,95,0}));
- connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowPipe.CTh) annotation (Line(
- points={{0,-22.4},{0,-36.45}}, color={191,95,0}));
- connect(champThermosolaireLFR_N.SunDNI, DNI.y)
- annotation (Line(points={{44,45.6},{51,45.6},{51,46},{57.3,46}}));
- connect(champThermosolaireLFR_N.SunA, Angles.y)
- annotation (Line(points={{36.8,58.8},{36.8,84},{28,84},{28,83.5},{-11.3,
- 83.5}}));
- connect(sourceP.C, massFlowMultiplier1.Ce) annotation (Line(points={{-81,-45},
- {-76.5,-45},{-76.5,-44},{-70,-44}}, color={0,0,0}));
- connect(massFlowMultiplier1.Cs, dynamicTwoPhaseFlowPipe.C1) annotation (Line(
- points={{-50,-44},{-44,-44},{-44,-43.5},{-36,-43.5}}, color={0,0,0}));
- connect(dynamicTwoPhaseFlowPipe.C2, massFlowMultiplier2.Ce) annotation (Line(
- points={{36,-43.5},{47,-43.5},{47,-44},{52,-44}}, color={0,0,0}));
- connect(massFlowMultiplier2.Cs, sinkP.C)
- annotation (Line(points={{72,-44},{80,-44}}, color={0,0,0}));
- connect(Q.y, sourceP.IMassFlow) annotation (Line(points={{-90,-17.2},{-91,
- -17.2},{-91,-40}}, color={0,0,255}));
- connect(Angles.y, champThermosolaireLFR_N.SunG) annotation (Line(points={{
- -11.3,83.5},{27.2,83.5},{27.2,58.8}}, color={0,0,255}));
- annotation (
- Documentation(revisions="
-Author
-
-", info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- experiment(StopTime=5000),
- Diagram(graphics={Text(
- extent={{-36,-64},{54,-82}},
- lineColor={28,108,200},
- textString="Fresnel field with Nt=%Nt trains")}));
-end TestFresnelField;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo
deleted file mode 100644
index c0db0246..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo
+++ /dev/null
@@ -1,83 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestGTCombustionChamber
- import ThermoSysPro;
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees2
- annotation (Placement(transformation(
- origin={149,-2},
- extent={{23,-24},{-23,24}},
- rotation=180)));
- ThermoSysPro.Fluid.Combustion.CombustionChambers.GTCombustionChamber GTCombustionChamber2(Cfg(P(
- fixed=true, start=14.1e5)), kcham(fixed=false, start=1)) annotation (
- Placement(transformation(extent={{-67,-68},{67,64}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ2(
- Q0=0,
- P0=15e5,
- h0=300e3)
- annotation (Placement(transformation(extent={{-112,48},{-72,88}},
- rotation=0)));
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceCombustible2(
- Hum=0,
- Xo=0,
- Xn=0,
- Xs=0,
- rho=0.838,
- Xc=0.755,
- Xh=0.245,
- Cp=2255,
- T0=410,
- Q0=9.30,
- LHV=47500e3) annotation (Placement(transformation(extent={{-107,-93},{-71,-57}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees2(
- Xso2=0,
- Xco2=0.0,
- Xo2=0.23,
- Xh2o=0.01,
- P0=15e5,
- Q0=415,
- T0=680,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-174,-26},{-128,22}},
- rotation=0)));
-
-equation
- connect(GTCombustionChamber2.Cws, sourcePQ2.C)
- annotation (Line(points={{-40.2,57.4},{-40.2,68},{-72,68}}));
- connect(GTCombustionChamber2.Cfuel, sourceCombustible2.C) annotation (Line(
- points={{0,-61.4},{0,-75},{-71,-75}}, color={0,0,0}));
- connect(GTCombustionChamber2.Cfg, Puits_Fumees2.C) annotation (Line(
- points={{60.3,-2},{126,-2}},
- color={0,0,0},
- thickness=1));
- connect(Source_Fumees2.C, GTCombustionChamber2.Ca) annotation (Line(
- points={{-128,-2},{-60.3,-2}},
- color={0,0,0},
- thickness=1));
- annotation (Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-200},{200,200}},
- initialScale=0.1)), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestGTCombustionChamber;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo
deleted file mode 100644
index fc8a96bb..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo
+++ /dev/null
@@ -1,105 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestGasTurbine
-
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
- P0=1.013e5,
- Q0=600,
- T0=29.4 + 273.16,
- option_temperature=true,
- Xco2=0,
- Xh2o=0,
- Xo2=0.20994,
- Xso2=0,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));
-
- BoundaryConditions.SinkP sink
- annotation (Placement(transformation(extent={{60,-10},{80,10}})));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante humidity(k=0.93)
- annotation (Placement(transformation(extent={{-100,30},{-80,50}})));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe fuel(
- Starttime=200,
- Duration=800,
- Initialvalue=13.507,
- Finalvalue=8.756)
- annotation (Placement(transformation(extent={{-40,60},{-20,80}})));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe air(
- Starttime=200,
- Duration=800,
- Initialvalue=592.7,
- Finalvalue=415.70)
- annotation (Placement(transformation(extent={{-98,0},{-78,20}})));
- Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ(
- Q0=13.4368286133,
- T0=185 + 273.16,
- LHV=46989e3,
- Cp=2255,
- Xc=0.755,
- Xh=0.245,
- rho=0.838) annotation (Placement(transformation(extent={{-20,40},{0,60}})));
- BoundaryConditions.SourcePQ water(Q0=0)
- annotation (Placement(transformation(extent={{-60,40},{-40,60}})));
- Machines.GasTurbine gasTurbine(
- comp_tau_n=14.0178,
- comp_eff_n=0.87004,
- exp_tau_n=0.06458,
- exp_eff_n=0.89045,
- TurbQred=0.0175634,
- Kcham=2.02088,
- Wpth=1e6,
- Compresseur(
- Ps(start=1404200.0),
- Te(start=302.56000000000006),
- Tis(start=630.0),
- Ts(start=729.0)),
- TurbineAgaz(Tis(start=847.0)),
- chambreCombustionTAC(
- Psf(start=1310000.0),
- Tea(start=729.0),
- Tsf(start=1532.57)),
- xAIR(
- ppvap0(start=4104.0),
- rho_air(start=1.0836),
- rho_vap(start=0.029)))
- annotation (Placement(transformation(extent={{-30,-28},{30,28}})));
-equation
- connect(air.y, sourcePQ.IMassFlow)
- annotation (Line(points={{-77,10},{-60,10},{-60,5}}, color={0,0,255}));
- connect(humidity.y, gasTurbine.Huminide) annotation (Line(points={{-79,40},{
- -60,40},{-60,16.8},{-31.2,16.8}},color={0,0,255}));
- connect(fuel.y, fuelSourcePQ.IMassFlow)
- annotation (Line(points={{-19,70},{-10,70},{-10,55}},
- color={0,0,255}));
- connect(sourcePQ.C, gasTurbine.Entree_air) annotation (Line(points={{-50,0},{
- -32,0},{-32,3.55271e-015},{-30,3.55271e-015}}, color={0,0,0}));
- connect(fuelSourcePQ.C, gasTurbine.Entree_combustible)
- annotation (Line(points={{0,50},{18,50},{18,28}}, color={0,0,0}));
- connect(water.C, gasTurbine.Entree_eau_combustion)
- annotation (Line(points={{-40,50},{-18,50},{-18,28}}, color={0,0,0}));
- connect(gasTurbine.Sortie_fumees, sink.C)
- annotation (Line(points={{30,3.55271e-015},{46,3.55271e-015},{46,0},{60,0}},
- color={0,0,0}));
- annotation ( Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- experiment(StopTime=1200));
-end TestGasTurbine;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo
deleted file mode 100644
index b5802c7d..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo
+++ /dev/null
@@ -1,86 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestGenericCombustion
-
- ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion genericCombustionCCS(
- kcham=0.1,
- Acham=275,
- Xbf=0,
- ImbCV=0.05,
- ImbBF=0.0,
- Psf(start=113275)) annotation (Placement(transformation(extent={{-32,-56},{
- 92,72}},
- rotation=0)));
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ(
- Xn=0.0208,
- Xashes=0.136,
- Cp=1200,
- rho=1100,
- LHV=29245e3,
- Xc=0.719,
- Xh=0.0414,
- Xo=0.086,
- Xs=0.0044,
- Vol=0.286,
- Q0=57.20,
- T0=358.15,
- Hum=0.08) annotation (Placement(transformation(extent={{24,-95},{58,-57}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(Q0=0, P0=100000)
- annotation (Placement(transformation(extent={{-83,-3},{-47,31}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir(
- Xso2=0,
- Q0=609.29,
- Xh2o=0.01,
- Xo2=0.230,
- Xco2=0,
- P0=191000,
- T0=524.89,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-54,-94},{-10,-54}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation(
- extent={{30,70},{74,112}},rotation=0)));
-equation
- connect(fuelSourcePQ.C, genericCombustionCCS.Cfuel) annotation (Line(points={{58,-76},
- {73.4,-76},{73.4,-49.6}}, color={0,0,0}));
- connect(SourcePQ_Water.C, genericCombustionCCS.Cws) annotation (Line(points={{-47,14},
- {-36,14},{-36,14.4},{-25.8,14.4}}, color={0,0,0}));
- connect(genericCombustionCCS.Ca, sourceAir.C) annotation (Line(
- points={{11.4,-49.6},{11.4,-74},{-10,-74}},
- color={0,0,0},
- thickness=1));
- connect(genericCombustionCCS.Cfg, sink.C) annotation (Line(
- points={{11.4,65.6},{11.4,91},{30,91}},
- color={0,0,0},
- thickness=1));
- annotation ( Documentation(revisions="
-Author
-
-", info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}));
-end TestGenericCombustion;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo
deleted file mode 100644
index 3407226d..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo
+++ /dev/null
@@ -1,144 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestGenericCombustion1D
-
- parameter Integer NCEL = 7;
-
- ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion1D genericCombustionCCS(
- NCEL=7,
- Qm(fixed=false),
- Qsf(fixed=false),
- kcham(fixed=true) = 0.1,
- Acham=275,
- Xbf=0,
- ImbCV=0.05,
- EPSPAR=0.7,
- Kec=8.8,
- SM={639.92,198.58,466.48,466.48,466.48,358.56,358.56},
- ImbBF=0.0,
- Psf(start=113275)) annotation (Placement(transformation(extent={{-62,-56},{62,
- 72}}, rotation=0)));
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ(
- Xn=0.0208,
- Xashes=0.136,
- Cp=1200,
- rho=1100,
- LHV=29245e3,
- Xc=0.719,
- Xh=0.0414,
- Xo=0.086,
- Xs=0.0044,
- Vol=0.286,
- Q0=57.20,
- T0=358.15,
- Hum=0.08) annotation (Placement(transformation(extent={{-106,-43},{-72,-5}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir(
- Xso2=0,
- Q0=609.29,
- Xh2o=0.01,
- Xo2=0.230,
- Xco2=0,
- P0=191000,
- T0=524.89,
- option_temperature=true,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-44,-98},{0,-58}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation(
- extent={{0,70},{44,112}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(Q0=0, P0=100000)
- annotation (Placement(transformation(extent={{-107,23},{-71,57}}, rotation=
- 0)));
- ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe PipeWaterSteam(
- Ns=7,
- z2=56,
- rugosrel=5e-5,
- ntubes=403,
- L=58,
- D=0.0327,
- C2(Q(fixed=false, start=486.69), P(
- fixed=false,
- start=1.96318e+07,
- displayUnit="Pa")),
- dpfCorr=3.5)
- annotation (Placement(transformation(
- origin={91,8},
- extent={{49,16},{-49,-16}},
- rotation=270)));
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall paroiEcrans(
- Ns=7,
- lambda=40,
- steady_state=true,
- ntubes=403,
- L=58,
- D=0.0327,
- e=0.001)
- annotation (Placement(transformation(
- origin={73,7.5},
- extent={{51.5,-15},{-51.5,15}},
- rotation=270)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam2(
- option_temperature=false,
- Q(start=486.69, fixed=true),
- h0=2.5e+06,
- P0(fixed=false) = 19621600)
- annotation (Placement(transformation(
- origin={90,90.5},
- extent={{14.5,-15},{-14.5,15}},
- rotation=270)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceEcrans(
- h0=1.292e+06,
- option_temperature=false,
- P0=20112000)
- annotation (Placement(transformation(
- origin={91,-81},
- extent={{15,-15},{-15,15}},
- rotation=270)));
-equation
- connect(fuelSourcePQ.C, genericCombustionCCS.Cfuel)
- annotation (Line(points={{-72,-24},{-55.8,-24}}, color={0,0,0}));
- connect(genericCombustionCCS.Cfg, sink.C) annotation (Line(
- points={{0,65.6},{0,91},{0,91}},
- color={0,0,0},
- thickness=1));
- connect(genericCombustionCCS.Ca, sourceAir.C) annotation (Line(
- points={{0,-49.6},{0,-78}},
- color={0,0,0},
- thickness=1));
- connect(SourcePQ_Water.C, genericCombustionCCS.Cws)
- annotation (Line(points={{-71,40},{-55.8,40}}, color={0,0,255}));
- connect(genericCombustionCCS.Cth,paroiEcrans. WT2) annotation (Line(points={{55.8,8},
- {68,8},{68,7.5},{76,7.5}}, color={191,95,0}));
- connect(paroiEcrans.WT1,PipeWaterSteam. CTh) annotation (Line(points={{70,7.5},
- {71,7.5},{71,8},{86.2,8}}, color={191,95,0}));
- connect(sourceEcrans.C,PipeWaterSteam. C1)
- annotation (Line(points={{91,-66},{91,-41}}, color={0,0,255}));
- connect(PipeWaterSteam.C2,sinkWaterSteam2. C) annotation (Line(points={{91,57},
- {91,76},{90,76}}, color={0,0,255}));
- annotation ( Documentation(revisions="
-Author
-
-", info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}));
-end TestGenericCombustion1D;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo
deleted file mode 100644
index 082d7f17..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo
+++ /dev/null
@@ -1,90 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestGridFurnace
- import ThermoSysPro;
-
- parameter Integer NCEL = 7;
-
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ(
- Xn=0.0208,
- Xashes=0.136,
- Cp=1200,
- rho=1100,
- LHV=29245e3,
- Xc=0.719,
- Xh=0.0414,
- Xo=0.086,
- Xs=0.0044,
- Vol=0.286,
- Q0=57.20,
- T0=358.15,
- Hum=0.08) annotation (Placement(transformation(extent={{-106,-23},{-72,15}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir(
- Xso2=0,
- Xh2o=0.01,
- Xo2=0.230,
- Xco2=0,
- T0=300,
- Q0=10,
- P0=1.9e5,
- option_temperature=true,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-74,-80},{-30,-40}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink(option_temperature=true)
- annotation (Placement(transformation(
- extent={{28,50},{72,92}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(P0=1.e5, Q0=1)
- annotation (Placement(transformation(extent={{89,13},{53,47}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Combustion.CombustionChambers.GridFurnace gridFurnace
- annotation (Placement(transformation(extent={{-40,-40},{40,40}})));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceAir1(
- Xso2=0,
- Xh2o=0.01,
- Xo2=0.230,
- Xco2=0,
- option_temperature=true,
- T0=300,
- Q0=10,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-90,4},{-46,44}}, rotation=0)));
-equation
- connect(fuelSourcePQ.C, gridFurnace.Com)
- annotation (Line(points={{-72,-4},{-36,-4}}, color={0,0,0}));
- connect(gridFurnace.Cfg, sink.C)
- annotation (Line(points={{0,36},{0,71},{28,71}}, color={0,0,0}));
- connect(SourcePQ_Water.C, gridFurnace.port_eau_refroid)
- annotation (Line(points={{53,30},{32,30},{32,12}}, color={0,0,0}));
- connect(sourceAir1.C, gridFurnace.Ca2)
- annotation (Line(points={{-46,24},{-20,24}}, color={0,0,0}));
- connect(sourceAir.C, gridFurnace.Ca1)
- annotation (Line(points={{-30,-60},{0,-60},{0,-36}}, color={0,0,0}));
- annotation ( Documentation(revisions="
-Author
-
-", info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}));
-end TestGridFurnace;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo
deleted file mode 100644
index b1db3c7a..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo
+++ /dev/null
@@ -1,53 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestHeatPumpCompressor
- ThermoSysPro.Fluid.Machines.HeatPumpCompressor Compressor(
- Pe(fixed=false, start=100000),
- Ts(fixed=false, start=680)) annotation (Placement(transformation(extent={{
- -52,-52},{48,52}}, rotation=0)));
- BoundaryConditions.SourceQ SourceQ1(
- Xso2=0,
- Xco2=0.0,
- Xh2o=0.003,
- Xo2=0.23,
- Q0=420,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.C3H3F5,
- h0=3.e4,
- T0=288,
- option_temperature=false)
- annotation (Placement(transformation(extent={{-104,-10},{-84,10}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(P0=1580000,
- option_temperature=false)
- annotation (Placement(transformation(
- origin={96,0},
- extent={{10,-10},{-10,10}},
- rotation=180)));
-equation
- connect(SourceQ1.C, Compressor.C1)
- annotation (Line(points={{-84,0},{-52,0}}, color={0,0,0}));
- connect(SinkP1.C, Compressor.C2)
- annotation (Line(points={{86,0},{48,0}}, color={0,0,0}));
- annotation ( Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestHeatPumpCompressor;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo
deleted file mode 100644
index 1ecc9dbf..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo
+++ /dev/null
@@ -1,111 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestIdealCheckValve
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1
- annotation (Placement(transformation(
- extent={{-60,-80},{-40,-60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1(
- P0=6e5) annotation (Placement(transformation(
- extent={{80,-80},{100,-60}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Pulse pulse(
- amplitude=6e5,
- width=50,
- period=100,
- offset=3e5) annotation (Placement(transformation(extent={{-100,-80},{-80,
- -60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve3
- annotation (Placement(transformation(extent={{10,-80},{30,-60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP2
- annotation (Placement(transformation(
- extent={{-30,-80},{-10,-60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP3
- annotation (Placement(transformation(
- extent={{50,-80},{70,-60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent=
- {{-104,20},{-84,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(
- P0=6e5) annotation (Placement(transformation(
- extent={{84,20},{104,40}}, rotation=0)));
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump1
- annotation (Placement(transformation(extent={{-30,60},{-10,80}}, rotation=0)));
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump2
- annotation (Placement(transformation(extent={{-30,-20},{-10,0}}, rotation=0)));
- ThermoSysPro.Fluid.Volumes.VolumeD volumeD annotation (Placement(
- transformation(extent={{-50,20},{-30,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve1
- annotation (Placement(transformation(extent={{10,60},{30,80}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve2
- annotation (Placement(transformation(extent={{8,-20},{28,0}}, rotation=0)));
- ThermoSysPro.Fluid.Volumes.VolumeC volumeC annotation (Placement(
- transformation(extent={{30,20},{50,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP
- annotation (Placement(transformation(
- extent={{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1
- annotation (Placement(transformation(
- extent={{60,20},{80,40}}, rotation=0)));
-equation
- connect(sourceP1.C, perteDP2.C1)
- annotation (Line(points={{-40,-70},{-30,-70}}, color={0,0,255}));
- connect(perteDP2.C2, idealCheckValve3.C1)
- annotation (Line(points={{-10,-70},{10,-70}}, color={0,0,255}));
- connect(idealCheckValve3.C2, perteDP3.C1)
- annotation (Line(points={{30,-70},{50,-70}}, color={0,0,255}));
- connect(perteDP3.C2, puitsP1.C)
- annotation (Line(points={{70,-70},{80,-70}}, color={0,0,255}));
- connect(pulse.y, sourceP1.IPressure) annotation (Line(points={{-79,-70},{-55,
- -70}}));
- connect(staticCentrifugalPump1.C2,idealCheckValve1. C1) annotation (Line(
- points={{-10,70},{-2,70},{-2,70},{10,70}}, color={0,0,255}));
- connect(staticCentrifugalPump2.C2,idealCheckValve2. C1) annotation (Line(
- points={{-10,-10},{0,-10},{0,-10},{8,-10}}, color={0,0,255}));
- connect(perteDP1.C2,puitsP. C)
- annotation (Line(points={{80,30},{84,30}}, color={0,0,255}));
- connect(sourceP.C,perteDP. C1)
- annotation (Line(points={{-84,30},{-80,30}}, color={0,0,255}));
- connect(perteDP.C2, volumeD.Ce)
- annotation (Line(points={{-60,30},{-50,30}}, color={0,0,0}));
- connect(volumeD.Cs1, staticCentrifugalPump1.C1)
- annotation (Line(points={{-40,40},{-40,70},{-30,70}}, color={0,0,0}));
- connect(volumeD.Cs2, staticCentrifugalPump2.C1)
- annotation (Line(points={{-40,20},{-40,-10},{-30,-10}}, color={0,0,0}));
- connect(idealCheckValve1.C2, volumeC.Ce2)
- annotation (Line(points={{30,70},{40,70},{40,40}}, color={0,0,0}));
- connect(volumeC.Cs, perteDP1.C1)
- annotation (Line(points={{50,30},{60,30}}, color={0,0,0}));
- connect(idealCheckValve2.C2, volumeC.Ce3)
- annotation (Line(points={{28,-10},{40,-10},{40,20}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Window(
- x=0.28,
- y=0.03,
- width=0.5,
- height=0.6),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestIdealCheckValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo
deleted file mode 100644
index a751ce0e..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo
+++ /dev/null
@@ -1,65 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestIdealSwitchValve
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.IdealSwitchValve SwitchValve
- annotation (Placement(transformation(
- extent={{-20,26},{0,46}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Pulse pulse(
- width=10, period=20)
- annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP2
- annotation (Placement(transformation(
- extent={{-60,20},{-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1
- annotation (Placement(transformation(
- extent={{20,20},{40,40}}, rotation=0)));
-equation
- connect(pulse.yL, SwitchValve.Ouv) annotation (Line(points={{-39,70},{-10,70},
- {-10,43}}));
- connect(SourceP1.C, perteDP2.C1) annotation (Line(points={{-80,30},{-60,30}},
- color={0,0,255}));
- connect(perteDP2.C2, SwitchValve.C1) annotation (Line(points={{-40,30},{-30,
- 30},{-30,30},{-20,30}}, color={0,0,255}));
- connect(SwitchValve.C2, perteDP1.C1) annotation (Line(points={{0,30},{20,30}},
- color={0,0,255}));
- connect(perteDP1.C2, PuitsP1.C) annotation (Line(points={{40,30},{60,30}},
- color={0,0,255}));
- annotation (experiment(StopTime=100),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestIdealSwitchValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo
deleted file mode 100644
index cb736e23..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo
+++ /dev/null
@@ -1,113 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestInternalCombustionEngine
- import ThermoSysPro;
-
- parameter Integer NCEL = 7;
-
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ(
- Hum=0,
- Xh=0.25,
- Xs=0,
- Xashes=0,
- Xc=0.75,
- Xo=0,
- Xn=0,
- Q0=0.0676,
- rho=0.744,
- LHV=50e6,
- T0(displayUnit="K") = 299,
- P0=210300,
- Vol=100) annotation (Placement(transformation(extent={{-106,-81},{-72,-43}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir(
- Xso2=0,
- Xco2=0,
- Xh2o=0.005,
- Xo2=0.23,
- Q0=1.9627,
- T0=30 + 273.16,
- option_temperature=true,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=191000)
- annotation (Placement(transformation(extent={{111,-79},{73,-45}},rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink(option_temperature=true)
- annotation (Placement(transformation(
- extent={{0,44},{44,86}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(
- Q0=15.3,
- h0=334.41e3,
- P0=410000)
- annotation (Placement(transformation(extent={{-107,-19},{-71,15}},rotation=
- 0)));
- ThermoSysPro.Fluid.Machines.InternalCombustionEngine alternatingEngine(
- mechanical_efficiency_type=2,
- Rmeca_nom=0.41,
- Coef_Rm_a=-5.4727e-9,
- Coef_Rm_b=4.9359e-5,
- Coef_Rm_c=0.30814,
- Xpth=0.05,
- MMg=20,
- DPe=1,
- RV=6.45,
- Kc=1.28,
- Kd=1.33,
- Wmeca(start=1400e3),
- Welec(start=1358e3),
- Wcomb(start=3.4942e6),
- exc(start=1.8),
- Gamma=1.2085,
- Tsf(start=1088.15))
- annotation (Placement(transformation(extent={{-44,-46},{44,42}})));
- ThermoSysPro.Fluid.BoundaryConditions.Sink Sink_Water1 annotation (Placement(
- transformation(extent={{75,-19},{111,15}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss
- annotation (Placement(transformation(extent={{-63,-8},{-51,4}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1
- annotation (Placement(transformation(extent={{51,-9},{65,5}})));
-equation
- connect(alternatingEngine.Cair, sourceAir.C) annotation (Line(
- points={{0,-41.6},{0,-62},{73,-62}},
- color={0,0,0},
- thickness=1));
- connect(alternatingEngine.Cfuel, fuelSourcePQ.C) annotation (Line(points={{-30.8,
- -41.6},{-30.8,-62},{-72,-62}}, color={0,0,0}));
- connect(SourcePQ_Water.C, singularPressureLoss.C1)
- annotation (Line(points={{-71,-2},{-63,-2}},
- color={0,0,255}));
- connect(alternatingEngine.Cws1, singularPressureLoss.C2) annotation (Line(
- points={{-39.6,-2},{-51,-2}}, color={0,0,255}));
- connect(alternatingEngine.Cws2, singularPressureLoss1.C1)
- annotation (Line(points={{39.6,-2},{48,-2},{51,-2}}, color={0,0,255}));
- connect(Sink_Water1.C, singularPressureLoss1.C2)
- annotation (Line(points={{75,-2},{75,-2},{65,-2}}, color={0,0,255}));
- connect(alternatingEngine.Cfg, sink.C) annotation (Line(
- points={{0,37.6},{0,65},{0,65}},
- color={0,0,0},
- thickness=1));
- annotation ( Documentation(revisions="
-Author
-
-", info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}));
-end TestInternalCombustionEngine;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo
deleted file mode 100644
index f889cea8..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo
+++ /dev/null
@@ -1,38 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestInvSingularPressureLoss
-
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ
- annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkQ
- annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.InvSingularPressureLoss
- invSingularPressureLoss annotation (Placement(transformation(extent={{-20,0},
- {0,20}}, rotation=0)));
-equation
- connect(sourcePQ.C, invSingularPressureLoss.C1) annotation (Line(points={{-60,
- 10},{-20,10}}, color={0,0,255}));
- connect(invSingularPressureLoss.C2, sinkQ.C) annotation (Line(points={{0,10},
- {40,10}}, color={0,0,255}));
-annotation(experiment(StopTime=1000), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestInvSingularPressureLoss;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo
deleted file mode 100644
index 987f9475..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo
+++ /dev/null
@@ -1,115 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestJunctions1
-
- ThermoSysPro.Fluid.Junctions.Splitter2 splitter2
- annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP(Q0=200)
- annotation (Placement(transformation(extent={{-100,40},{-80,60}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss annotation (Placement(transformation(extent={{-60,40},
- {-40,60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP
- annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1
- annotation (Placement(transformation(extent={{80,0},{100,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{40,80},
- {60,100}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2 annotation (Placement(transformation(extent={{40,0},{
- 60,20}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=
- 0.5) annotation (Placement(transformation(extent={{-40,60},{-20,80}},
- rotation=0)));
- ThermoSysPro.Fluid.Junctions.Splitter3 splitter3
- annotation (Placement(transformation(extent={{-20,-60},{0,-40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP1(Q0=400)
- annotation (Placement(transformation(extent={{-100,-60},{-80,-40}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3 annotation (Placement(transformation(extent={{-60,-60},
- {-40,-40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2
- annotation (Placement(transformation(extent={{80,-20},{100,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP3
- annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss4 annotation (Placement(transformation(extent={{40,-20},
- {60,0}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss5 annotation (Placement(transformation(extent={{40,-100},
- {60,-80}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k=
- 0) annotation (Placement(transformation(extent={{-40,-40},{-20,-20}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP4
- annotation (Placement(transformation(extent={{80,-60},{100,-40}}, rotation=
- 0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante2(k=
- 0) annotation (Placement(transformation(extent={{-40,-80},{-20,-60}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss6 annotation (Placement(transformation(extent={{40,-60},
- {60,-40}},
- rotation=0)));
-equation
- connect(sourceP.C, singularPressureLoss.C1)
- annotation (Line(points={{-80,50},{-60,50}}, color={0,0,255}));
- connect(singularPressureLoss.C2, splitter2.Ce)
- annotation (Line(points={{-40,50},{-20,50}}, color={0,0,255}));
- connect(splitter2.Cs1, singularPressureLoss1.C1) annotation (Line(points={{-6,
- 60},{-6,90},{40,90}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, sinkP.C)
- annotation (Line(points={{60,90},{80,90}}, color={0,0,255}));
- connect(splitter2.Cs2, singularPressureLoss2.C1) annotation (Line(points={{-6,
- 40},{-6,10},{40,10}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, sinkP1.C)
- annotation (Line(points={{60,10},{80,10}}, color={0,0,255}));
- connect(constante.y, splitter2.Ialpha1)
- annotation (Line(points={{-19,70},{-14,70},{-14,56},{-9,56}}));
- connect(sourceP1.C, singularPressureLoss3.C1)
- annotation (Line(points={{-80,-50},{-60,-50}}, color={0,0,255}));
- connect(singularPressureLoss3.C2, splitter3.Ce) annotation (Line(points={{-40,
- -50},{-19.8,-50}}, color={0,0,255}));
- connect(splitter3.Cs1, singularPressureLoss4.C1) annotation (Line(points={{-6,
- -40},{-6,-10},{40,-10}}, color={0,0,255}));
- connect(singularPressureLoss4.C2, sinkP2.C)
- annotation (Line(points={{60,-10},{80,-10}}, color={0,0,255}));
- connect(splitter3.Cs2, singularPressureLoss5.C1) annotation (Line(points={{-6,
- -60},{-6,-90},{40,-90}}, color={0,0,255}));
- connect(singularPressureLoss5.C2, sinkP3.C)
- annotation (Line(points={{60,-90},{80,-90}}, color={0,0,255}));
- connect(constante1.y, splitter3.Ialpha1)
- annotation (Line(points={{-19,-30},{-14,-30},{-14,-44},{-9,-44}}));
- connect(splitter3.Ialpha2, constante2.y)
- annotation (Line(points={{-9,-56},{-14,-56},{-14,-70},{-19,-70}}));
- connect(splitter3.Cs3, singularPressureLoss6.C1)
- annotation (Line(points={{0,-50},{40,-50}}, color={0,0,0}));
- connect(singularPressureLoss6.C2, sinkP4.C)
- annotation (Line(points={{60,-50},{80,-50}}, color={0,0,0}));
- annotation (experiment(StopTime=10),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestJunctions1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo
deleted file mode 100644
index c7162a60..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo
+++ /dev/null
@@ -1,131 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestJunctions2
-
- ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1
- annotation (Placement(transformation(extent={{0,60},{20,80}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss annotation (Placement(transformation(extent={{40,60},{
- 60,80}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{-40,80},
- {-20,100}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2 annotation (Placement(transformation(extent={{-40,40},
- {-20,60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Source sourceP
- annotation (Placement(transformation(extent={{-80,80},{-60,100}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1
- annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP
- annotation (Placement(transformation(extent={{80,60},{100,80}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=0)
- annotation (Placement(transformation(extent={{-40,60},{-20,80}},
- rotation=0)));
- ThermoSysPro.Fluid.Junctions.Mixer3 mixer2_2
- annotation (Placement(transformation(extent={{0,-60},{20,-40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3 annotation (Placement(transformation(extent={{40,-60},
- {60,-40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss4 annotation (Placement(transformation(extent={{-40,-40},
- {-20,-20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss5 annotation (Placement(transformation(extent={{-40,-80},
- {-20,-60}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Source sourceP2
- annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3
- annotation (Placement(transformation(extent={{-80,-80},{-60,-60}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1
- annotation (Placement(transformation(extent={{80,-60},{100,-40}}, rotation=
- 0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k=
- 0.5) annotation (Placement(transformation(extent={{-40,-20},{-20,0}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ
- annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss6 annotation (Placement(transformation(extent={{-40,-60},
- {-20,-40}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier(alpha=
- 2) annotation (Placement(transformation(extent={{0,20},{20,40}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ1
- annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss7 annotation (Placement(transformation(extent={{-40,20},
- {-20,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss8 annotation (Placement(transformation(extent={{40,20},
- {60,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP2
- annotation (Placement(transformation(extent={{80,20},{100,40}}, rotation=0)));
-equation
- connect(singularPressureLoss1.C2, mixer2_1.Ce1) annotation (Line(points={{-20,
- 90},{6,90},{6,80}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, mixer2_1.Ce2) annotation (Line(points={{-20,
- 50},{6,50},{6,60}}, color={0,0,255}));
- connect(mixer2_1.Cs, singularPressureLoss.C1)
- annotation (Line(points={{20,70},{40,70}}, color={0,0,255}));
- connect(sourceP.C, singularPressureLoss1.C1)
- annotation (Line(points={{-60,90},{-40,90}}, color={0,0,255}));
- connect(sourceP1.C, singularPressureLoss2.C1)
- annotation (Line(points={{-60,50},{-40,50}}, color={0,0,255}));
- connect(singularPressureLoss.C2, sinkP.C)
- annotation (Line(points={{60,70},{80,70}}, color={0,0,255}));
- connect(constante.y, mixer2_1.Ialpha1)
- annotation (Line(points={{-19,70},{-8,70},{-8,76},{3,76}}));
- connect(singularPressureLoss4.C2, mixer2_2.Ce1) annotation (Line(points={{-20,
- -30},{6,-30},{6,-40}}, color={0,0,255}));
- connect(singularPressureLoss5.C2, mixer2_2.Ce2) annotation (Line(points={{-20,
- -70},{6,-70},{6,-60}}, color={0,0,255}));
- connect(mixer2_2.Cs, singularPressureLoss3.C1)
- annotation (Line(points={{20,-50},{40,-50}}, color={0,0,255}));
- connect(sourceP2.C, singularPressureLoss4.C1)
- annotation (Line(points={{-60,-30},{-40,-30}}, color={0,0,255}));
- connect(sourceP3.C, singularPressureLoss5.C1)
- annotation (Line(points={{-60,-70},{-40,-70}}, color={0,0,255}));
- connect(singularPressureLoss3.C2, sinkP1.C)
- annotation (Line(points={{60,-50},{80,-50}}, color={0,0,255}));
- connect(sourceQ.C, singularPressureLoss6.C1)
- annotation (Line(points={{-60,-50},{-40,-50}}, color={0,0,255}));
- connect(singularPressureLoss6.C2, mixer2_2.Ce3) annotation (Line(points={{-20,-50},
- {-10,-50},{0,-50}}, color={0,0,255}));
- connect(constante1.y, mixer2_2.Ialpha1)
- annotation (Line(points={{-19,-10},{-8,-10},{-8,-44},{3,-44}}));
- connect(sourceQ1.C, singularPressureLoss7.C1)
- annotation (Line(points={{-60,30},{-40,30}}, color={0,0,255}));
- connect(singularPressureLoss7.C2, massFlowMultiplier.Ce)
- annotation (Line(points={{-20,30},{0,30}}, color={0,0,255}));
- connect(massFlowMultiplier.Cs, singularPressureLoss8.C1)
- annotation (Line(points={{20,30},{40,30}}, color={0,0,255}));
- connect(singularPressureLoss8.C2, sinkP2.C)
- annotation (Line(points={{60,30},{80,30}}, color={0,0,255}));
- annotation (experiment(StopTime=10), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestJunctions2;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo
deleted file mode 100644
index 7bb8c86c..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo
+++ /dev/null
@@ -1,121 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestJunctions3
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(
- extent={{-104,0},{-84,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( P0=2e5, Q(start=
- 323.48244470861454))
- annotation (Placement(transformation(extent={{-104,-60},{-84,-40}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve valve1(
- C2(h_vol_1(start=70977.89042837733)),
- Pm(start=120690.8728732298),
- C1(
- h_vol_1(start=71016.12237181116),
- Xco2(start=4.2755644765396636E-32),
- Xso2(start=2.0610804919205873E-32),
- h_vol_2(start=70977.89042837733),
- Xh2o(start=1.4925957069001078E-32),
- Xo2(start=1.8180778675015506E-31)))
- annotation (Placement(transformation(extent={{-10,6},{10,26}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve valve2(C1(h_vol_1(start=
- 70921.01678153824),
- Xco2(start=7.395570986446986E-32),
- Xh2o(start=1.9721522630525295E-31),
- Xo2(start=1.9721522630525295E-31),
- Xso2(start=6.998299036616324E-32)),
- Pm(start=118970.64778985853))
- annotation (Placement(transformation(extent={{-10,-54},{10,-34}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve valve3(Q(start=
- 804.6933031325926), Pm(start=108776.21727782265),
- C1(
- Xco2(start=3.4137108264263755E-31),
- Xo2(start=1.9413373839423337E-31),
- Xso2(start=1.7792131856876708E-31),
- Xh2o(start=2.3303752327085554E-31)))
- annotation (Placement(transformation(extent={{50,-24},{70,-4}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2
- annotation (Placement(transformation(
- extent={{82,-30},{102,-10}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe2(
- Duration=1,
- Initialvalue=1,
- Finalvalue=0.05)
- annotation (Placement(transformation(extent={{32,20},{52,40}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe3(
- Initialvalue=1,
- Starttime=2,
- Finalvalue=0.001)
- annotation (Placement(transformation(extent={{-30,30},{-10,50}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe4(
- Initialvalue=1,
- Starttime=1,
- Finalvalue=0.001)
- annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe pipe1
- annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe pipe2
- annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume
- annotation (Placement(transformation(extent={{-40,0},{-20,20}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume1
- annotation (Placement(transformation(extent={{20,-30},{40,-10}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume2
- annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}, rotation=
- 0)));
-equation
- connect(valve3.C2, puitsP2.C) annotation (Line(points={{70,-20},{82,
- -20}}, color={0,0,255}));
- connect(rampe2.y, valve3.Ouv)
- annotation (Line(points={{53,30},{60,30},{60,-3}}));
- connect(rampe3.y, valve1.Ouv) annotation (Line(points={{-9,40},{0,40},
- {0,27}}));
- connect(rampe4.y, valve2.Ouv) annotation (Line(points={{-9,-20},{0,
- -20},{0,-33}}));
- connect(sourceP.C, pipe1.C1)
- annotation (Line(points={{-84,10},{-80,10}}, color={0,0,255}));
- connect(sourceP1.C, pipe2.C1)
- annotation (Line(points={{-84,-50},{-80,-50}}, color={0,0,255}));
- connect(pipe1.C2, staticVolume.Ce4) annotation (Line(points={{-60,10},{-50,10},
- {-50,14},{-40.2,14}}, color={0,0,255}));
- connect(staticVolume.Cs, valve1.C1) annotation (Line(points={{-20,10},{-10,10}},
- color={0,0,255}));
- connect(staticVolume1.Cs, valve3.C1) annotation (Line(points={{40,-20},{50,
- -20}}, color={0,0,255}));
- connect(valve1.C2, staticVolume1.Ce1) annotation (Line(points={{10,10},{33,10},
- {33,-9.8}}, color={0,0,255}));
- connect(valve2.C2, staticVolume1.Ce8) annotation (Line(points={{10,-50},{33,
- -50},{33,-29.9}}, color={0,0,255}));
- connect(pipe2.C2, staticVolume2.Ce4) annotation (Line(points={{-60,-50},{-50,
- -50},{-50,-46},{-40.2,-46}}, color={0,0,255}));
- connect(staticVolume2.Cs, valve2.C1) annotation (Line(points={{-20,-50},{-10,
- -50}}, color={0,0,255}));
- annotation (experiment(StopTime=10), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestJunctions3;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo
deleted file mode 100644
index 510707f9..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo
+++ /dev/null
@@ -1,59 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestJunctions4
-
- ThermoSysPro.Fluid.Junctions.DeheaterMixer2 deheaterMixer2_1(Tmax=308)
- annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss annotation (Placement(transformation(extent={{-60,20},
- {-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{20,20},
- {40,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2 annotation (Placement(transformation(extent={{-60,-20},
- {-40,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP
- annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(T0=310)
- annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.Source source(h0=30000)
- annotation (Placement(transformation(extent={{-100,-20},{-80,0}}, rotation=
- 0)));
-equation
- connect(singularPressureLoss.C2, deheaterMixer2_1.Ce) annotation (Line(points=
- {{-40,30},{-30,30},{-30,36},{-20,36}}, color={0,0,255}));
- connect(deheaterMixer2_1.Cs, singularPressureLoss1.C1) annotation (Line(
- points={{0,36},{10,36},{10,30},{20,30}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, deheaterMixer2_1.Ce_mix) annotation (Line(
- points={{-40,-10},{-9.9,-10},{-9.9,20}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, sinkP.C)
- annotation (Line(points={{40,30},{60,30}}, color={0,0,255}));
- connect(sourceP.C, singularPressureLoss.C1)
- annotation (Line(points={{-80,30},{-60,30}}, color={0,0,255}));
- connect(source.C, singularPressureLoss2.C1)
- annotation (Line(points={{-80,-10},{-60,-10}}, color={0,0,255}));
- annotation (experiment(StopTime=10), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestJunctions4;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo
deleted file mode 100644
index 813d3b01..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo
+++ /dev/null
@@ -1,73 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestLoopBreaker
-
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ
- annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1
- annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2
- annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.Splitter2 splitter2_1 annotation (Placement(
- transformation(extent={{-56,0},{-36,20}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1 annotation (Placement(transformation(
- extent={{40,0},{60,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation(
- extent={{80,0},{100,20}}, rotation=0)));
- InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.5)
- annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0)));
- ThermoSysPro.Fluid.LoopBreakers.LoopBreakerP loopBreakerP
- annotation (Placement(transformation(extent={{10,-20},{30,0}}, rotation=0)));
-equation
- connect(sourcePQ.C, splitter2_1.Ce) annotation (Line(
- points={{-80,10},{-56,10}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(splitter2_1.Cs1, singularPressureLoss1.C1) annotation (Line(
- points={{-42,20},{-42,30},{-20,30}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(splitter2_1.Cs2, singularPressureLoss2.C1) annotation (Line(
- points={{-42,0},{-42,-10},{-20,-10}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(mixer2_1.Ce1, singularPressureLoss1.C2)
- annotation (Line(points={{46,20},{46,30},{0,30}}, smooth=Smooth.None));
- connect(mixer2_1.Cs, sink.C) annotation (Line(
- points={{60,10},{80,10}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(constante.y, splitter2_1.Ialpha1)
- annotation (Line(points={{-59,50},{-52,50},{-52,16},{-45,16}}, smooth=
- Smooth.None));
- connect(singularPressureLoss2.C2, loopBreakerP.C1) annotation (Line(
- points={{0,-10},{10,-10}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(loopBreakerP.C2, mixer2_1.Ce2) annotation (Line(
- points={{30,-10},{46,-10},{46,0}},
- color={0,0,255},
- smooth=Smooth.None));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestLoopBreaker;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo
deleted file mode 100644
index 8a7fd8ea..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo
+++ /dev/null
@@ -1,47 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestMassFlowMultiplier
-
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ
- annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink
- annotation (Placement(transformation(extent={{60,0},{80,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss annotation (Placement(transformation(extent={{-60,0},{
- -40,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{20,0},{
- 40,20}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier
- annotation (Placement(transformation(extent={{-20,0},{0,20}}, rotation=0)));
-equation
- connect(sourcePQ.C, singularPressureLoss.C1) annotation (Line(points={{-80,10},
- {-60,10}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, sink.C) annotation (Line(points={{40,10},{
- 60,10}}, color={0,0,255}));
- connect(singularPressureLoss.C2, massFlowMultiplier.Ce) annotation (Line(
- points={{-40,10},{-20,10}}, color={0,0,255}));
- connect(massFlowMultiplier.Cs, singularPressureLoss1.C1) annotation (Line(
- points={{0,10},{20,10}}, color={0,0,255}));
-annotation(experiment(StopTime=1000), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestMassFlowMultiplier;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo
deleted file mode 100644
index e2232d2f..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo
+++ /dev/null
@@ -1,105 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestNTUWaterHeater0
-
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_condenseur(
- P0=80.0e5,
- Q0=1780,
- h0=872.0e3)
- annotation (Placement(transformation(extent={{-182,-10},{-162,10}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur(C(h(start=
- 980281.0129225359)))
- annotation (Placement(transformation(extent={{152,-10},{172,10}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- P0=27.e5,
- h0=2.6e6,
- C(h_vol_2(start=883556.9736276601)),
- Q(start=112.29047515166533))
- annotation (Placement(transformation(extent={{-182,90},{-162,110}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2(K=1e-4, C2(P(start=7999999.633732218)))
- annotation (Placement(transformation(extent={{-106,
- -10},{-86,10}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=1e-4)
- annotation (Placement(transformation(extent={{-106,90},
- {-86,110}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1
- annotation (Placement(transformation(extent={{152,-106},{172,-86}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss4(K=1e-4,
- C1(P(start=7618062.482445708)),
- rho(start=834.862478836879))
- annotation (Placement(transformation(extent={{92,-10},
- {112,10}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss5(K=1e-4, rho(start=857.3159873035071))
- annotation (Placement(transformation(extent={{34,-106},
- {54,-86}}, rotation=0)));
-
- ThermoSysPro.Fluid.HeatExchangers.NTUWaterHeater nTUWaterHeating(
- lambdaE=102.5,
- SCondDes=6314,
- KCond=5024,
- SPurge=656,
- KPurge=1767,
- HeiF(start=878162.3337936474),
- HDesF(start=980281.0129225359),
- Hep(start=981240.7187349163),
- Ee(h_vol_2(start=880000), Q(start=1800), h(start=880000), P(start=80e5)),
- Ev(h_vol_1(start=3500000), P(start=27e5)),
- Ep(Q(start=10)),
- Se(P(start=80e5)),
- SDes(start=1E-09),
- continuous_flow_reversal=true)
- annotation (Placement(transformation(extent={{-44,-52},
- {64,54}}, rotation=0)));
-equation
- connect(Source_condenseur.C, singularPressureLoss2.C1)
- annotation (Line(points={{-162,0},{-106,0}}, color={0,0,255}));
- connect(sourceP.C, singularPressureLoss3.C1)
- annotation (Line(points={{-162,100},{-106,100}},
- color={0,0,255}));
- connect(singularPressureLoss4.C2, Puit_condenseur.C)
- annotation (Line(points={{112,0},{152,0}}, color={0,0,255}));
- connect(singularPressureLoss5.C2, Puit_condenseur1.C)
- annotation (Line(points={{54,-96},{152,-96}}, color={0,0,255}));
- connect(singularPressureLoss3.C2, nTUWaterHeating.Ev) annotation (Line(points={{-86,100},
- {42.4,100},{42.4,19.02}}, color={0,0,255}));
- connect(nTUWaterHeating.Se, singularPressureLoss4.C1)
- annotation (Line(points={{64,1},{68,1},{68,0},{92,0}},
- color={0,0,255}));
- connect(singularPressureLoss2.C2, nTUWaterHeating.Ee)
- annotation (Line(points={{-86,0},{-44,0},{-44,1}},
- color={0,0,255}));
- connect(singularPressureLoss5.C1, nTUWaterHeating.Sp)
- annotation (Line(points={{34,-96},{-18,-96},{-18,-16.49},{-22.4,-16.49}}));
- annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,
- -200},{200,200}})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestNTUWaterHeater0;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo
deleted file mode 100644
index 7eb31034..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo
+++ /dev/null
@@ -1,93 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestPostCombustionGas
- import ThermoSysPro;
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees2
- annotation (Placement(transformation(
- origin={151,-6},
- extent={{23,-24},{-23,24}},
- rotation=180)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees2(
- Xso2=0,
- Xco2=0.0,
- Xo2=0.23,
- Xh2o=0.01,
- P0=15e5,
- Q0=415,
- T0=680,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-174,-30},{-128,18}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePQ2(
- h0=300e3,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- Q0=10)
- annotation (Placement(transformation(extent={{-172,68},{-132,108}},
- rotation=0)));
-
- ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceCombustible2(
- Hum=0,
- Xo=0,
- Xn=0,
- Xs=0,
- rho=0.838,
- Xc=0.755,
- Xh=0.245,
- Cp=2255,
- T0=410,
- Q0=9.30,
- LHV=47500e3) annotation (Placement(transformation(extent={{-107,-109},{-71,
- -73}},
- rotation=0)));
-
- ThermoSysPro.Fluid.Combustion.CombustionChambers.PostCombustionGas
- postCombustionGas
- annotation (Placement(transformation(extent={{-52,-74},{74,50}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss
- annotation (Placement(transformation(extent={{-100,78},{-80,98}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1
- annotation (Placement(transformation(extent={{-102,-16},{-82,4}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2
- annotation (Placement(transformation(extent={{90,-16},{110,4}})));
-equation
- connect(sourceCombustible2.C, postCombustionGas.Cfuel) annotation (Line(
- points={{-71,-91},{-7.9,-91},{-7.9,-67.8}}, color={0,0,0}));
- connect(sourcePQ2.C, singularPressureLoss.C1)
- annotation (Line(points={{-132,88},{-100,88}}, color={0,0,0}));
- connect(singularPressureLoss.C2, postCombustionGas.Ca) annotation (Line(
- points={{-80,88},{-20.5,88},{-20.5,43.8}}, color={0,0,0}));
- connect(Source_Fumees2.C, singularPressureLoss1.C1)
- annotation (Line(points={{-128,-6},{-102,-6}}, color={0,0,0}));
- connect(singularPressureLoss1.C2, postCombustionGas.Cfg1) annotation (Line(
- points={{-82,-6},{-64,-6},{-64,-5.8},{-45.7,-5.8}}, color={0,0,0}));
- connect(postCombustionGas.Cfg2, singularPressureLoss2.C1) annotation (Line(
- points={{67.7,-5.8},{79.85,-5.8},{79.85,-6},{90,-6}}, color={0,0,0}));
- connect(singularPressureLoss2.C2, Puits_Fumees2.C)
- annotation (Line(points={{110,-6},{128,-6}}, color={0,0,0}));
- annotation (Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-200},{200,200}},
- initialScale=0.1)), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestPostCombustionGas;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo
deleted file mode 100644
index b4b47281..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo
+++ /dev/null
@@ -1,149 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestPressurizer
-
- parameter Units.SI.Power Wch(fixed=false) = 0.29e6
- "Power released by the electrical heaters";
- parameter Real OUVfeedwaterValve( fixed=false)=0.01
- "OUV feed water valve";
-
- ThermoSysPro.Fluid.PressureLosses.ControlValve FeedwaterValve(
- Cv(start=100),
- C1(
- P(start=160e5),
- h_vol_1(start=1270e3),
- Q(start=0.3),
- h(start=1270e3)),
- Q(fixed=false, start=0.32),
- Cvmax=5000) annotation (Placement(transformation(extent={{-110,130},{
- -90,150}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve SteamValve(
- Cv(start=25000),
- Cvmax(fixed=true) = 5000,
- Pm(start=15500000))
- annotation (Placement(transformation(extent={{58,130},{78,150}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante OuvFeedwaterValve1(k=
- OUVfeedwaterValve)
- annotation (Placement(transformation(extent={{-140,176},{-120,196}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe(
- L=1,
- D=1,
- z1=1,
- z2=0,
- C1(P(start=160e5)),
- C2(P(start=160e5)),
- Q(fixed=false, start=0))
- annotation (Placement(transformation(
- origin={-30,-42},
- extent={{10,-10},{-10,10}},
- rotation=90)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante OuvSteamrValve(k(fixed=
- true) = 0.5) annotation (Placement(transformation(extent={{0,176},{20,
- 196}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=1270e3,
- P0=160e5)
- annotation (Placement(transformation(extent={{-168,124},{-148,144}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(Q0=0, h0=3e6)
- annotation (Placement(transformation(extent={{106,124},{126,144}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Volumes.Pressurizer pressurizer(
- Zm=10.15,
- Klv=0.5e6,
- cpp=600,
- hl(start=1629887.98290107),
- hv(start=2596216.59571565),
- Zl(start=5.5900717167325),
- Yw0=60,
- V=61.12,
- Rp=1.27,
- Ae=96.23,
- Klp=1780,
- Kvp=7500,
- Mp=107e3,
- Kpa=5.63,
- Ccond=0.02,
- Cevap=0.05,
- Yw(start=32.92),
- y(start=0.3292, fixed=true),
- P0=15500000,
- P(start=15500000, fixed=true),
- Tp(start=617.94155291055)) annotation (Placement(transformation(extent={{-92,
- -12},{32,118}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ1( Q0=0, h0=1600000)
- annotation (Placement(transformation(extent={{-30,-76},{-10,-56}},
- rotation=0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC1(
- option_temperature=2,
- T0={310},
- W0={Wch})
- annotation (Placement(transformation(
- origin={-133,32},
- extent={{-17,17},{17,-17}},
- rotation=270)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC2(
- T0={310},
- W0={0.286e6},
- option_temperature=1)
- annotation (Placement(transformation(
- origin={-133,55},
- extent={{-17,17},{17,-17}},
- rotation=270)));
-equation
- connect(sourceP.C, FeedwaterValve.C1) annotation (Line(points={{-148,134},{
- -110,134}}, color={0,0,255}));
- connect(SteamValve.C2, sinkQ.C) annotation (Line(points={{78,134},{106,134}},
- color={0,0,255}));
- connect(OuvSteamrValve.y, SteamValve.Ouv)
- annotation (Line(points={{21,186},{68,186},{68,151}}));
- connect(FeedwaterValve.C2, pressurizer.Cas) annotation (Line(points={{-90,134},
- {-30,134},{-30,118}}, color={0,0,255}));
- connect(pressurizer.Cs, SteamValve.C1) annotation (Line(points={{32,116.7},{
- 32,134},{58,134}}, color={0,0,255}));
- connect(sinkQ1.C, lumpedStraightPipe.C2)
- annotation (Line(points={{-30,-66},{-30,-52}}));
- connect(lumpedStraightPipe.C1, pressurizer.Cex)
- annotation (Line(points={{-30,-32},{-30,-12}}));
- connect(SourceC2.C[1], pressurizer.Ca) annotation (Line(points={{-116.34,55},
- {-103.17,55},{-103.17,54.3},{-85.8,54.3}}, color={191,95,0}));
- connect(SourceC1.C[1], pressurizer.Cc) annotation (Line(points={{-116.34,32},
- {-73.17,32},{-73.17,32.2},{-30,32.2}}, color={191,95,0}));
- connect(OuvFeedwaterValve1.y, FeedwaterValve.Ouv) annotation (Line(points={{
- -119,186},{-100,186},{-100,151}}, color={0,0,255}));
- annotation (
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(graphics,
- coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-100},{140,200}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- experiment(StopTime=1000));
-end TestPressurizer;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo
deleted file mode 100644
index fe67477b..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo
+++ /dev/null
@@ -1,62 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestRefP
-
- ThermoSysPro.Fluid.BoundaryConditions.RefP refP
- annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(
- k=2.e5)
- annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump
- annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0)));
- ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ
- annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0)));
- ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH
- annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.RefT refT
- annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe
- annotation (Placement(transformation(extent={{60,0},{80,20}}, rotation=0)));
- Volumes.VolumeA volumeA(dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{10,-30},{-10,-10}})));
-equation
- connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color=
- {0,0,255}));
- connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color=
- {0,0,255}));
- connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,
- 70},{-60,34},{-80,34},{-80,21}}));
- connect(pump.C2, loopBreakerQ.C1)
- annotation (Line(points={{-10,10},{0,10}}, color={0,0,255}));
- connect(loopBreakerQ.C2, loopBreakerH.C1)
- annotation (Line(points={{20,10},{30,10}}, color={0,0,255}));
- connect(loopBreakerH.C2, lumpedStraightPipe.C1)
- annotation (Line(points={{50,10},{60,10}}, color={0,0,255}));
- connect(lumpedStraightPipe.C2, volumeA.Ce1) annotation (Line(points={{80,10},
- {100,10},{100,-20},{10,-20}}, color={0,0,0}));
- connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{
- -100,10},{-90,10}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestRefP;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo
deleted file mode 100644
index 7a704094..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo
+++ /dev/null
@@ -1,56 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestRefP1
-
- ThermoSysPro.Fluid.BoundaryConditions.RefP refP
- annotation (Placement(transformation(extent={{-70,0},{-50,20}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(
- k=2.e5)
- annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump
- annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe
- annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0)));
- BoundaryConditions.Source source
- annotation (Placement(transformation(extent={{-100,0},{-80,20}})));
- BoundaryConditions.Sink sink
- annotation (Placement(transformation(extent={{80,0},{100,20}})));
- BoundaryConditions.RefQ refQ
- annotation (Placement(transformation(extent={{-40,0},{-20,20}})));
-equation
- connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,
- 70},{-60,21}}));
- connect(source.C, refP.C1)
- annotation (Line(points={{-80,10},{-70,10}}, color={0,0,0}));
- connect(lumpedStraightPipe.C2, sink.C)
- annotation (Line(points={{60,10},{80,10}}, color={0,0,0}));
- connect(pump.C2, lumpedStraightPipe.C1)
- annotation (Line(points={{20,10},{40,10}}, color={0,0,0}));
- connect(refP.C2, refQ.C1)
- annotation (Line(points={{-50,10},{-40,10}}, color={0,0,0}));
- connect(pump.C1, refQ.C2)
- annotation (Line(points={{0,10},{-20,10}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestRefP1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo
deleted file mode 100644
index 520cba18..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo
+++ /dev/null
@@ -1,61 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSensors
-
- ThermoSysPro.Fluid.Sensors.SensorH specificEnthalpySensor
- annotation (Placement(transformation(extent={{-60,8},{-40,28}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorQ massFlowSensor
- annotation (Placement(transformation(extent={{-20,8},{0,28}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorQv volumetricFlowSensor
- annotation (Placement(transformation(extent={{20,8},{40,28}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorP pressureSensor
- annotation (Placement(transformation(extent={{-60,-32},{-40,-12}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Sensors.SensorT temperatureSensor
- annotation (Placement(transformation(extent={{-20,-32},{0,-12}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP
- annotation (Placement(transformation(
- extent={{60,-40},{80,-20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(
- extent={{-100,0},{-80,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP
- annotation (Placement(transformation(extent={{20,-40},{40,-20}}, rotation=0)));
-equation
- connect(sourceP.C, specificEnthalpySensor.C1)
- annotation (Line(points={{-80,10},{-60,10}}, color={0,0,255}));
- connect(specificEnthalpySensor.C2, massFlowSensor.C1)
- annotation (Line(points={{-39.8,10},{-20,10}}, color={0,0,255}));
- connect(massFlowSensor.C2, volumetricFlowSensor.C1)
- annotation (Line(points={{0.2,10},{20,10}}, color={0,0,255}));
- connect(volumetricFlowSensor.C2, pressureSensor.C1) annotation (Line(points={
- {40.2,10},{60,10},{60,0},{-80,0},{-80,-30},{-60,-30}}, color={0,0,255}));
- connect(pressureSensor.C2, temperatureSensor.C1) annotation (Line(points={{
- -39.8,-30},{-20,-30}}, color={0,0,255}));
- connect(temperatureSensor.C2, perteDP.C1)
- annotation (Line(points={{0.2,-30},{20,-30}}, color={0,0,255}));
- connect(perteDP.C2, puitsP.C)
- annotation (Line(points={{40,-30},{60,-30}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSensors;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo
deleted file mode 100644
index c9877780..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo
+++ /dev/null
@@ -1,122 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSimpleDynamicCondenser
-
-parameter Real L1 = 425 "Longueur de la première chaine de capteurs";
-parameter Integer Ns1 = 80
- "Nombre de mailles de la première chaine de capteurs";
-
-parameter Real L2 = 75 "Longueur de la deuxième chaine de capteurs";
-parameter Integer Ns2 = 1 "Nombre de mailles de la deuxième chaine de capteurs";
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur(
- P0=1e5,
- option_temperature=false) annotation (Placement(transformation(extent={{48,30},
- {88,70}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- PerteChargeCondPompe( K=1e-6, Q(start=
- 0.598447),
- C1(P(start=9035.18437098087)),
- rho(start=990.6632738884383))
- annotation (Placement(transformation(
- origin={-90,-38},
- extent={{-10,-10},{10,10}},
- rotation=180)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceRechauffeurEau(
- option_temperature=false,
- h0=2401e3,
- P0=15050) annotation (Placement(transformation(extent={{-207,
- 148},{-183,170}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ PuitsRechauffeurEau(
- h0=191812, Q0(start=192, fixed=false))
- annotation (Placement(transformation(extent={{-184,
- -52},{-208,-24}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePCaloporteur(Q0=29804.5, h0=113e3)
- annotation (Placement(transformation(extent={{-212,30},
- {-172,68}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- PerteChargeCondPompe1( K=1e-6, rho(
- start=995.5397398431962))
- annotation (Placement(transformation(
- origin={36,50},
- extent={{6,-10},{-6,10}},
- rotation=180)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- PerteChargeCondPompe2( K=1e-6, rho(
- start=996.552939890412))
- annotation (Placement(transformation(
- origin={-154,49},
- extent={{6,-10},{-6,10}},
- rotation=180)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- PerteChargeCondPompe3(K(fixed=false) = 1e-3, Q(start=192, fixed=true))
- annotation (Placement(transformation(
- origin={-120,159},
- extent={{10,-10},{-10,10}},
- rotation=180)));
- ThermoSysPro.Fluid.HeatExchangers.SimpleDynamicCondenser Condenseur( D=0.018,
- V=1000,
- A=100,
- lambda=0.01,
- ntubes=28700,
- yNiveau(signal(fixed=false, start=1.5)),
- Vf0=0.15,
- Vl(start=500, fixed=true),
- P(fixed=false, start=9035.18437098087),
- hl(start=183576.8570917718),
- hv(start=187278.68509678004),
- proe(d(start=996.0593559031695)))
- annotation (Placement(transformation(extent={{-118,6},{1,
- 116}}, rotation=0)));
-equation
-
- connect(sourcePCaloporteur.C, PerteChargeCondPompe2.C1) annotation (Line(
- points={{-172,49},{-160,49}}, color={0,0,255}));
- connect(PerteChargeCondPompe1.C2, puitsPCaloporteur.C) annotation (Line(
- points={{42,50},{48,50}}, color={0,0,255}));
- connect(SourceRechauffeurEau.C, PerteChargeCondPompe3.C1) annotation (Line(
- points={{-183,159},{-130,159}}, color={0,0,255}));
- connect(PuitsRechauffeurEau.C, PerteChargeCondPompe.C2)
- annotation (Line(points={{-184,-38},{-100,-38}}));
- connect(PerteChargeCondPompe2.C2, Condenseur.Cee) annotation (Line(points={{
- -148,49},{-133,49},{-133,48.9},{-118,48.9}}, color={0,0,255}));
- connect(PerteChargeCondPompe.C1, Condenseur.Cl)
- annotation (Line(points={{-80,-38},{-57.31,-38},{-57.31,6}}));
- connect(PerteChargeCondPompe3.C2, Condenseur.Cv) annotation (Line(points={{
- -110,159},{-58.5,159},{-58.5,116}}, color={0,0,255}));
- connect(PerteChargeCondPompe1.C1, Condenseur.Cse)
- annotation (Line(points={{30,50},{15.5,50},{15.5,50},{1,50}}));
- annotation (
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-250,-60},{130,180}},
- grid={2,2},
- initialScale=0.1)),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- experiment(StopTime=1000));
-end TestSimpleDynamicCondenser;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo
deleted file mode 100644
index 2a3bb2db..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo
+++ /dev/null
@@ -1,95 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSimpleDynamicCondenser1
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(Pm(displayUnit = "Pa", start=
- 355000.00000015664), Q(fixed = false), hn(fixed = false, start=
- 71.08245675235786), p_rho(displayUnit = "kg/m3"), rho(displayUnit = "kg/m3"),
- a1(start=-88.67, fixed=false),
- C2(h(start=195297.69906611618), h_vol_1(start=195297.69906611618)),
- Qv(start=0.009081311621074862),
- h(start=193554.9971298399),
- C1(P(start=10000.0))) annotation (
- Placement(visible = true, transformation(origin={-10,-60}, extent={{10,-10},
- {-10,10}}, rotation = 0)));
- ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Pe(displayUnit = "Pa", fixed = true, start = 700000), Ps(displayUnit = "Pa", fixed = false), W_fric = 0, eta_is(fixed = false), eta_is_wet(fixed = false), rhos(displayUnit = "kg/m3", fixed = false),
- xm(fixed=false, start=0.9856238368898451),
- proe(x(start=1, fixed=true)),
- Ce(h_vol_2(start=3128840.013040668), h(start=3128840.0130323363)),
- pros(d(start=0.07018147245152216))) annotation (
- Placement(visible = true, transformation(origin={-10,60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
- ThermoSysPro.Fluid.HeatExchangers.SimpleDynamicCondenser Condenseur(A = 100, D = 0.018,
- dynamic_energy_balance=true,
- P(fixed=false, start=10000),
- P0(displayUnit="Pa") = 1000, V = 1000, continuous_flow_reversal = true, lambda = 0.01, ntubes = 28700, rhol(displayUnit = "kg/m3"), rhom(displayUnit = "kg/m3"), rhov(displayUnit = "kg/m3"), yNiveau(signal(fixed = false, start = 1.5)),
- steady_state=false,
- proe(d(start=0.7468807684211932))) annotation (
- Placement(visible = true, transformation(origin={40.5,-1}, extent = {{-20.5, -16}, {20.5, 16}}, rotation = 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur(P0 = 1e5, T0 = 373.05, option_temperature = true) annotation (
- Placement(visible = true, transformation(origin={85,-1}, extent = {{-11, -12}, {11, 12}}, rotation = 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePCaloporteur(Q0 = 5, h0 = 113e3) annotation (
- Placement(visible = true, transformation(origin={-24,-1}, extent = {{-10, -9}, {10, 9}}, rotation = 0)));
- Volumes.VolumeATh volumeA(
- P(start=70e5),
- h(start=2.e6),
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-70,10},{-50,-10}})));
- Thermal.BoundaryConditions.HeatSource heatSource(W0(start={2e6}, each fixed=false),
- option_temperature=2) annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- rotation=90,
- origin={-88,12})));
-equation
- connect(Condenseur.Cv,stodolaTurbine. Cs) annotation (
- Line(points={{40.5,15},{40.5,60},{0.1,60}}, color = {0, 0, 255}));
- connect(Condenseur.Cse,puitsPCaloporteur. C) annotation (
- Line(points={{61,-4.2},{62,-4.2},{62,-1},{74,-1}},
- color = {0, 0, 255}));
- connect(sourcePCaloporteur.C,Condenseur. Cee) annotation (
- Line(points={{-14,-1},{-9,-1},{-9,-4.52},{20,-4.52}}, color = {0, 0, 255}));
- connect(Condenseur.Cl, staticCentrifugalPump.C1) annotation (Line(points={{40.91,
- -17},{40,-17},{40,-60},{0,-60}}, color={28,108,200}));
- connect(staticCentrifugalPump.C2, volumeA.Ce2)
- annotation (Line(points={{-20,-60},{-60,-60},{-60,-10}}, color={28,108,200}));
- connect(volumeA.Cs2, stodolaTurbine.Ce)
- annotation (Line(points={{-60,10},{-60,60},{-20.1,60}}, color={28,108,200}));
- connect(heatSource.C[1], volumeA.Cth) annotation (Line(points={{-78.2,12},{-64,
- 12},{-64,0},{-60,0}}, color={0,0,0}));
- annotation ( Diagram(graphics={
- Text(
- extent={{-94,34},{-64,24}},
- lineColor={28,108,200},
- textString="W: free"),
- Text(
- extent={{-26,-38},{8,-48}},
- lineColor={28,108,200},
- textString="a1: free"),
- Text(
- extent={{-28,94},{8,84}},
- lineColor={28,108,200},
- textString="Pe: fixed"),
- Text(
- extent={{-28,84},{10,72}},
- lineColor={28,108,200},
- textString="proe.x: fixed")}), Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- experiment(StopTime=1000, __Dymola_Algorithm="Dassl"));
-end TestSimpleDynamicCondenser1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo
deleted file mode 100644
index a2f4c5bf..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo
+++ /dev/null
@@ -1,71 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSimpleEvaporatorWaterSteamFlueGases
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink puits_Eau
- annotation (Placement(transformation(
- extent={{64,-17},{84,3}}, rotation=0)));
-
- ThermoSysPro.Fluid.HeatExchangers.SimpleEvaporatorWaterSteamFlueGases
- EchangeurEfficacite(Kdpf=1, Kdpe=1)
- annotation (Placement(transformation(extent={{-44,-35},{44,21}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ source_Eau(
- Q0=38.92/3.6,
- h0=1242080,
- P0=6527000)
- annotation (Placement(transformation(extent={{-84,-17},{-64,3}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees(
- Xso2=0,
- Q0=86.7429,
- Xco2=0.04725,
- Xh2o=0.051874,
- Xo2=0.15011,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=101000,
- T0=750.54,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-34,45},{0,75}}, rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees
- annotation (Placement(transformation(
- origin={16,-70},
- extent={{16,-15},{-16,15}},
- rotation=180)));
-equation
- connect(Source_Fumees.C, EchangeurEfficacite.Cfg1) annotation (Line(
- points={{0,60},{0,18.2}},
- color={0,0,0},
- thickness=1));
- connect(EchangeurEfficacite.Cfg2, Puits_Fumees.C) annotation (Line(
- points={{0,-32.2},{0,-70},{0,-70}},
- color={0,0,0},
- thickness=1));
- connect(EchangeurEfficacite.Cws2, puits_Eau.C) annotation (Line(points={{44,
- -7},{54,-7},{54,-7},{64,-7}}, color={0,0,255}));
- connect(EchangeurEfficacite.Cws1, source_Eau.C)
- annotation (Line(points={{-44,-7},{-54,-7},{-54,-7},{-64,-7}}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSimpleEvaporatorWaterSteamFlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo
deleted file mode 100644
index ef928dcd..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo
+++ /dev/null
@@ -1,53 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSimpleStaticCondenser
-
- ThermoSysPro.Fluid.HeatExchangers.SimpleStaticCondenser
- simpleStaticCondenser(
- Ec(h(start=532983.7176868258)),
- Ef(h(start=71016.12237181116)),
- Qc(start=1049.6385508765125),
- Qf(start=4469.84281279143),
- Sf(h(start=64330.208038325145)))
- annotation (Placement(transformation(extent={{-20,20},
- {0,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(T0=400)
- annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1
- annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0)));
-equation
- connect(sourceP.C, simpleStaticCondenser.Ef) annotation (Line(points={{-40,30},
- {-20,30}}, color={0,0,255}));
- connect(sourceP1.C, simpleStaticCondenser.Ec) annotation (Line(points={{-40,
- -10},{-16,-10},{-16,20}}, color={0,0,255}));
- connect(simpleStaticCondenser.Sf, sinkP.C) annotation (Line(points={{0,29.9},
- {10,29.9},{10,30},{20,30}}, color={0,0,255}));
- connect(simpleStaticCondenser.Sc, sinkP1.C) annotation (Line(points={{-4,20},
- {-4,-10},{20,-10}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSimpleStaticCondenser;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo
deleted file mode 100644
index f24da7e9..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo
+++ /dev/null
@@ -1,51 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSingularPressureLoss
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss( fluid=1)
- annotation (Placement(transformation(
- extent={{-20,20},{0,40}}, rotation=0)));
-equation
- connect(singularPressureLoss.C2, PuitsP1.C)
- annotation (Line(points={{0,30},{60,30}}, color={0,0,255}));
- connect(SourceP1.C, singularPressureLoss.C1)
- annotation (Line(points={{-80,30},{-20,30}}, color={0,0,255}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSingularPressureLoss;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo
deleted file mode 100644
index 079db785..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo
+++ /dev/null
@@ -1,97 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticAerocondenser
-
- parameter Units.SI.AbsolutePressure Pin_1=20000
- "Flow pressure at inlet 1 (sourceP)";
- parameter Units.SI.AbsolutePressure Pin_2=20000
- "Flow pressure at inlet 3 (sourceP2)";
-
- BoundaryConditions.SourcePQ Source_condenseur(
- Q0(fixed=true) = 4000,
- h0=15e3,
- option_temperature=true,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=100000,
- T0=287.15)
- annotation (Placement(transformation(extent={{190,-90},{170,-70}},
- rotation=0)));
-
- BoundaryConditions.Sink Puit_condenseur
- annotation (Placement(transformation(extent={{170,90},{190,110}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=2.5817e6,
- C(Q(fixed=false, start=100)),
- P0=Pin_1)
- annotation (Placement(transformation(extent={{-100,90},{-80,110}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- option_temperature=false,
- h0=2.5055e6,
- C(Q(fixed=false, start=1e-5)),
- P0=Pin_2) annotation (Placement(transformation(extent={{-182,
- -40},{-162,-20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1(K=10)
- annotation (Placement(transformation(extent={{-120,-40},
- {-100,-20}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=10)
- annotation (Placement(transformation(extent={{-38,90},
- {-18,110}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1
- annotation (Placement(transformation(extent={{-100,-90},{-120,-70}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss5(K=1e-4)
- annotation (Placement(transformation(extent={{-40,-90},
- {-60,-70}},rotation=0)));
-
- Fluid.HeatExchangers.StaticAerocondenser staticAerocondenser
- annotation (Placement(transformation(extent={{-64,-44},{66,70}})));
-equation
- connect(sourceP2.C, singularPressureLoss1.C1)
- annotation (Line(points={{-162,-30},{-120,-30}},
- color={0,0,255}));
- connect(sourceP.C, singularPressureLoss3.C1)
- annotation (Line(points={{-80,100},{-38,100}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, staticAerocondenser.Cw) annotation (Line(
- points={{-100,-30},{-70,-30},{-70,-29.75},{-58.5833,-29.75}},color={0,0,
- 0}));
- connect(singularPressureLoss3.C2, staticAerocondenser.Cws1)
- annotation (Line(points={{-18,100},{1,100},{1,65.25}}, color={0,0,0}));
- connect(Puit_condenseur1.C, singularPressureLoss5.C2)
- annotation (Line(points={{-100,-80},{-60,-80}},color={0,0,0}));
- connect(singularPressureLoss5.C1, staticAerocondenser.Cws2)
- annotation (Line(points={{-40,-80},{1,-80},{1,-39.25}}, color={0,0,0}));
- connect(Source_condenseur.C, staticAerocondenser.Cair1) annotation (Line(
- points={{170,-80},{60.5833,-80},{60.5833,-38.775}}, color={0,0,0}));
- connect(Puit_condenseur.C, staticAerocondenser.Cair2) annotation (Line(points={{170,100},
- {60.5833,100},{60.5833,65.25}}, color={0,0,0}));
- annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,
- -200},{200,200}})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticAerocondenser;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo
deleted file mode 100644
index 7f098428..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo
+++ /dev/null
@@ -1,52 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticCentrifugalPump1
-
- ThermoSysPro.Fluid.Machines.StaticCentrifugalPump StaticCentrifugalPump1(
- fixed_rot_or_power=2, MPower=0.15e6)
- annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP
- annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(P0=600000)
- annotation (Placement(transformation(extent={{40,20},{60,40}}, rotation=0)));
-equation
- connect(sourceP.C, StaticCentrifugalPump1.C1) annotation (Line(
- points={{-60,30},{-20,30}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(StaticCentrifugalPump1.C2, sinkP.C) annotation (Line(
- points={{0,30},{40,30}},
- color={0,0,255},
- smooth=Smooth.None));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.32,
- y=0.02,
- width=0.39,
- height=0.47),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticCentrifugalPump1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo
deleted file mode 100644
index 70340b52..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo
+++ /dev/null
@@ -1,123 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticCondenser
-
- parameter Units.SI.AbsolutePressure Pin_1(fixed=false, start=20000)
- "Flow pressure at inlet 1 (sourceP)";
- parameter Units.SI.AbsolutePressure Pin_2(fixed=false, start=20000)
- "Flow pressure at inlet 2 (sourceP1)";
- parameter Units.SI.AbsolutePressure Pin_3(fixed=false, start=20000)
- "Flow pressure at inlet 3 (sourceP2)";
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ Source_condenseur(
- h0=60e3, Q0(fixed=true) = 4000)
- annotation (Placement(transformation(extent={{-180,0},{-160,20}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur
- annotation (Placement(transformation(extent={{160,0},{180,20}},
- rotation=0)));
- ThermoSysPro.Fluid.HeatExchangers.StaticCondenser condenseur(
- CPCE=0,
- KCO=100,
- QC0=200,
- z=5,
- SCO=15e3,
- Qee(start=4000, fixed=false),
- Pcond(fixed=false, start=2154.77)) annotation (Placement(transformation(
- extent={{-20,-16},{72,82}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=2.5817e6,
- C(Q(fixed=true, start=100)),
- P0=Pin_1)
- annotation (Placement(transformation(extent={{-100,140},{-80,160}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- option_temperature=false,
- h0=2.5481e6,
- C(Q(fixed=true, start=1e-5)),
- P0=Pin_2) annotation (Placement(transformation(extent={
- {-182,80},{-162,100}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- option_temperature=false,
- h0=2.5055e6,
- C(Q(fixed=true, start=1e-5)),
- P0=Pin_3) annotation (Placement(transformation(extent=
- {{-180,40},{-160,60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss(K=10)
- annotation (Placement(transformation(extent={{-100,80},
- {-80,100}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1(K=10)
- annotation (Placement(transformation(extent={{-100,40},
- {-80,60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2(K=1e-4)
- annotation (Placement(transformation(extent={{-100,0},
- {-80,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=10)
- annotation (Placement(transformation(extent={{-40,140},
- {-20,160}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1
- annotation (Placement(transformation(extent={{100,-100},{120,-80}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss4(K=1e-4)
- annotation (Placement(transformation(extent={{100,0},
- {120,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss5(K=1e-4)
- annotation (Placement(transformation(extent={{40,-100},
- {60,-80}}, rotation=0)));
-
-equation
- connect(sourceP1.C, singularPressureLoss.C1)
- annotation (Line(points={{-162,90},{-100,90}}, color={0,0,255}));
- connect(singularPressureLoss.C2, condenseur.Cev) annotation (Line(points={{
- -80,90},{-50,90},{-50,62.89},{-20,62.89}}, color={0,0,255}));
- connect(sourceP2.C, singularPressureLoss1.C1)
- annotation (Line(points={{-160,50},{-100,50}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, condenseur.Cep) annotation (Line(points={{
- -80,50},{-52,50},{-52,42.31},{-20,42.31}}, color={0,0,255}));
- connect(Source_condenseur.C, singularPressureLoss2.C1)
- annotation (Line(points={{-160,10},{-100,10}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, condenseur.Cee) annotation (Line(points={{
- -80,10},{-52,10},{-52,3.11},{-20,3.11}}, color={0,0,255}));
- connect(sourceP.C, singularPressureLoss3.C1)
- annotation (Line(points={{-80,150},{-40,150}}, color={0,0,255}));
- connect(singularPressureLoss3.C2, condenseur.Cvt) annotation (Line(points={{
- -20,150},{26,150},{26,82.49}}, color={0,0,255}));
- connect(singularPressureLoss4.C2, Puit_condenseur.C)
- annotation (Line(points={{120,10},{160,10}}, color={0,0,255}));
- connect(condenseur.Cse, singularPressureLoss4.C1) annotation (Line(points={{
- 72.92,3.11},{86,3.11},{86,10},{100,10}}, color={0,0,255}));
- connect(singularPressureLoss5.C2, Puit_condenseur1.C)
- annotation (Line(points={{60,-90},{100,-90}}, color={0,0,255}));
- connect(singularPressureLoss5.C1, condenseur.Cex)
- annotation (Line(points={{40,-90},{26.46,-90},{26.46,-16}}));
- annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,
- -200},{200,200}})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticCondenser;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo
deleted file mode 100644
index a2628b2f..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo
+++ /dev/null
@@ -1,126 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticCondenserHEI
-
- parameter Units.SI.AbsolutePressure Pin_1(fixed=false, start=
- 179979.0023433965) "Flow pressure at inlet 1 (sourceP)";
- parameter Units.SI.AbsolutePressure Pin_2(fixed=false, start=
- 4691.365030963762) "Flow pressure at inlet 2 (sourceP1)";
- parameter Units.SI.AbsolutePressure Pin_3(fixed=false, start=
- 4691.365030911197) "Flow pressure at inlet 3 (sourceP2)";
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ Source_condenseur(
- h0=60e3, Q0(fixed=true) = 4000)
- annotation (Placement(transformation(extent={{-180,0},{-160,20}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur(C(h(start=
- 121216.39257552983)))
- annotation (Placement(transformation(extent={{160,0},{180,20}},
- rotation=0)));
- ThermoSysPro.Fluid.HeatExchangers.StaticCondenserHEI condenseur(
- Kf=0,
- z1c=5,
- Cee(
- Q( start=4000, fixed=false)),
- Pcond(fixed=false, start=2154.77),
- DPf(start=-7.816453667652961E-26),
- Wcut_off(start=116804805.25936648),
- procs(d(start=9.50351941496327))) annotation (Placement(transformation(
- extent={{-20,-16},{72,82}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- option_temperature=false,
- h0=2.5817e6,
- C(Q(fixed=true, start=100)),
- P0=Pin_1)
- annotation (Placement(transformation(extent={{-100,140},{-80,160}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- option_temperature=false,
- h0=2.5481e6,
- C(Q(fixed=true, start=1e-5)),
- P0=Pin_2) annotation (Placement(transformation(extent={
- {-182,80},{-162,100}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- option_temperature=false,
- h0=2.5055e6,
- C(Q(fixed=true, start=1e-5)),
- P0=Pin_3) annotation (Placement(transformation(extent=
- {{-180,40},{-160,60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss(K=10)
- annotation (Placement(transformation(extent={{-100,80},
- {-80,100}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1(K=10)
- annotation (Placement(transformation(extent={{-100,40},
- {-80,60}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2(K=1e-4, rho(start=999.2051327991054))
- annotation (Placement(transformation(extent={{-100,0},
- {-80,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=10)
- annotation (Placement(transformation(extent={{-40,140},
- {-20,160}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1
- annotation (Placement(transformation(extent={{100,-100},{120,-80}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss4(K=1e-4, rho(start=995.9727926518547))
- annotation (Placement(transformation(extent={{100,0},
- {120,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss5(K=1e-4, rho(start=9.502298036944223))
- annotation (Placement(transformation(extent={{40,-100},
- {60,-80}}, rotation=0)));
-
-equation
- connect(sourceP1.C, singularPressureLoss.C1)
- annotation (Line(points={{-162,90},{-100,90}}, color={0,0,255}));
- connect(singularPressureLoss.C2, condenseur.Cev) annotation (Line(points={{
- -80,90},{-50,90},{-50,62.89},{-20,62.89}}, color={0,0,255}));
- connect(sourceP2.C, singularPressureLoss1.C1)
- annotation (Line(points={{-160,50},{-100,50}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, condenseur.Cep) annotation (Line(points={{
- -80,50},{-52,50},{-52,42.31},{-20,42.31}}, color={0,0,255}));
- connect(Source_condenseur.C, singularPressureLoss2.C1)
- annotation (Line(points={{-160,10},{-100,10}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, condenseur.Cee) annotation (Line(points={{
- -80,10},{-52,10},{-52,3.11},{-20,3.11}}, color={0,0,255}));
- connect(sourceP.C, singularPressureLoss3.C1)
- annotation (Line(points={{-80,150},{-40,150}}, color={0,0,255}));
- connect(singularPressureLoss3.C2, condenseur.Cvt) annotation (Line(points={{
- -20,150},{26,150},{26,82.49}}, color={0,0,255}));
- connect(singularPressureLoss4.C2, Puit_condenseur.C)
- annotation (Line(points={{120,10},{160,10}}, color={0,0,255}));
- connect(condenseur.Cse, singularPressureLoss4.C1) annotation (Line(points={{
- 72.92,3.11},{86,3.11},{86,10},{100,10}}, color={0,0,255}));
- connect(singularPressureLoss5.C2, Puit_condenseur1.C)
- annotation (Line(points={{60,-90},{100,-90}}, color={0,0,255}));
- connect(singularPressureLoss5.C1, condenseur.Cex)
- annotation (Line(points={{40,-90},{26.46,-90},{26.46,-16}}));
- annotation (experiment(StopTime=1000), Diagram(graphics,
- coordinateSystem(preserveAspectRatio=false, extent={{-200,
- -200},{200,200}})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticCondenserHEI;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo
deleted file mode 100644
index b125b099..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo
+++ /dev/null
@@ -1,92 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticDrum1
-
- ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1
- annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossVALI1(K=1e-4)
- annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossVALI2(K=1e-4)
- annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(Q0=10)
- annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorT sensorT
- annotation (Placement(transformation(extent={{40,-82},{60,-62}}, rotation=0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource(
- option_temperature=2,
- W0={2.4e8},
- T0={290}) annotation (Placement(transformation(extent={{-80,20},{-60,40}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossVALI3(K=1e-4)
- annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0)));
- BoundaryConditions.PlugB sinkP2
- annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorT sensorT1
- annotation (Placement(transformation(extent={{20,58},{40,78}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.RefP refP(P0=3e5)
- annotation (Placement(transformation(extent={{-26,-90},{-6,-70}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(Q0=100)
- annotation (Placement(transformation(extent={{-56,-90},{-36,-70}}, rotation=
- 0)));
- BoundaryConditions.PlugA sourcePlug(C(h(fixed=true)))
- annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation=
- 0)));
- BoundaryConditions.RefXgas refXgas
- annotation (Placement(transformation(extent={{8,-90},{28,-70}})));
-equation
- connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco)
- annotation (Line(
- points={{-60,-40},{-60,0.6},{-48,0.6}}, color={0,0,255}));
- connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20,
- 0},{40,0}}, color={0,0,255}));
- connect(sensorT.C2, singularPressureLossVALI2.C1) annotation (Line(points={{60.2,
- -80},{80,-80},{80,-60},{-80,-60},{-80,-40}}, color={0,0,255}));
- connect(heatSource.C[1], StaticDrumTh1.Cth)
- annotation (Line(points={{-70,20.2},{
- -70,10},{-44,10}}, color={191,95,0}));
- connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1)
- annotation (Line(
- points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255}));
- connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1)
- annotation (Line(
- points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255}));
- connect(singularPressureLossVALI3.C2, sensorT1.C1)
- annotation (Line(points={{0,60},{20,60}}, color={0,0,255}));
- connect(sensorT1.C2, sinkP2.C)
- annotation (Line(points={{40.2,60},{60,60}}, color={0,0,255}));
- connect(refQ.C2, refP.C1) annotation (Line(points={{-36,-80},{-26,-80}},
- color={0,0,255}));
- connect(sourcePlug.C, refQ.C1) annotation (Line(points={{-70,-80},{-56,-80}},
- color={0,0,255}));
- connect(refP.C2, refXgas.C1)
- annotation (Line(points={{-6,-80},{8,-80}}, color={0,0,0}));
- connect(refXgas.C2, sensorT.C1)
- annotation (Line(points={{28,-80},{40,-80}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticDrum1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo
deleted file mode 100644
index f235cd28..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo
+++ /dev/null
@@ -1,77 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticDrum2
-
- ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1
- annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossVALI1(K=1e-4)
- annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossVALI2(K=1e-4)
- annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(Q0=10)
- annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorT sensorT
- annotation (Placement(transformation(extent={{-40,-82},{-20,-62}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(P0=100e5)
- annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation=
- 0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSink heatSource
- annotation (Placement(transformation(extent=
- {{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossVALI3(K=1e-4)
- annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2
- annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorT sensorT1
- annotation (Placement(transformation(extent={{20,58},{40,78}}, rotation=0)));
-equation
- connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco)
- annotation (Line(
- points={{-60,-40},{-48,-40},{-48,0.6}}, color={0,0,255}));
- connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20,
- 0},{40,0}}, color={0,0,255}));
- connect(sensorT.C2, singularPressureLossVALI2.C1) annotation (Line(points={{
- -19.8,-80},{-10,-80},{-10,-54},{-80,-54},{-80,-40}}, color={0,0,255}));
- connect(sourcePQ.C, sensorT.C1) annotation (Line(points={{-70,-80},{-40,-80}},
- color={0,0,255}));
- connect(heatSource.C[1], StaticDrumTh1.Cth)
- annotation (Line(points={{-70,20.2},{
- -70,10},{-44,10}}, color={191,95,0}));
- connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1)
- annotation (Line(
- points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255}));
- connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1)
- annotation (Line(
- points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255}));
- connect(singularPressureLossVALI3.C2, sensorT1.C1)
- annotation (Line(points={{0,60},{20,60}}, color={0,0,255}));
- connect(sensorT1.C2, sinkP2.C)
- annotation (Line(points={{40.2,60},{60,60}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticDrum2;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo
deleted file mode 100644
index a60588e8..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo
+++ /dev/null
@@ -1,63 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticExchangerDTorWorEff
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FF(
- C(P(start=219.E5)),
- Q0=481.07,
- h0=1067.9E3)
- annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FF(
- P0=217.68E5)
- annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FC(
- C(P(start=24E5)),
- Q0=23.377,
- h0=3420.3E3)
- annotation (Placement(transformation(
- origin={-30,30},
- extent={{10,-10},{-10,10}},
- rotation=180)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FC(
- P0=24.13E5)
- annotation (Placement(transformation(extent={{-2,20},{20,40}}, rotation=0)));
- ThermoSysPro.Fluid.HeatExchangers.StaticExchangerDTorWorEff
- exchangerWaterSteamDTorWorEFF(
- EffEch=1,
- Kf=597.832,
- Ec(P(start=23e5)),
- Ef(P(start=219E5)),
- exchanger_type=3) annotation (Placement(transformation(extent={{-20,-20},
- {0,0}}, rotation=0)));
-equation
- connect(sourceWaterSteam_FF.C, exchangerWaterSteamDTorWorEFF.Ef)
- annotation (Line(points={{-40,-10},{-20,-10}}, color={0,0,255}));
- connect(exchangerWaterSteamDTorWorEFF.Sf, sinkWaterSteam_FF.C) annotation (Line(
- points={{0,-9.9},{10.2,-9.9},{10.2,-10},{20,-10}}, color={0,0,255}));
- connect(sourceWaterSteam_FC.C, exchangerWaterSteamDTorWorEFF.Ec) annotation (Line(
- points={{-20,30},{-14,30},{-14,-5.9}}, color={0,0,255}));
- connect(exchangerWaterSteamDTorWorEFF.Sc, sinkWaterSteam_FC.C) annotation (Line(
- points={{-6,-5.9},{-6,30},{-2,30}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticExchangerDTorWorEff;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo
deleted file mode 100644
index a36c0d45..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo
+++ /dev/null
@@ -1,53 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticExchangerKS
-
- ThermoSysPro.Fluid.HeatExchangers.StaticExchangerKS
- plateHeatExchanger(region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1)
- annotation (Placement(transformation(extent={{-20,34},{20,66}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- T0=340)
- annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3
- annotation (Placement(transformation(extent={{-80,60},{-60,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2
- annotation (Placement(transformation(
- extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP3
- annotation (Placement(transformation(
- extent={{60,60},{80,80}}, rotation=0)));
-equation
- connect(sourceP2.C, plateHeatExchanger.Ec)
- annotation (Line(points={{-60,30},{-40,30},{-40,45.2},{-20,45.2}},
- color={0,0,255}));
- connect(sourceP3.C, plateHeatExchanger.Ef) annotation (Line(points={{-60,70},
- {-40,70},{-40,54.8},{-20,54.8}}, color={0,0,0}));
- connect(plateHeatExchanger.Sc, puitsP2.C) annotation (Line(points={{20,45.2},
- {26,45.2},{26,46},{40,46},{40,30},{60,30}}, color={0,0,0}));
- connect(plateHeatExchanger.Sf, puitsP3.C) annotation (Line(points={{20,54.8},
- {40,54.8},{40,70},{60,70}}, color={0,0,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticExchangerKS;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo
deleted file mode 100644
index 23c3c502..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo
+++ /dev/null
@@ -1,223 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticFan
-
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees(
- Xso2=0,
- Xco2=0.0,
- Xh2o=0.006,
- Xo2=0.23,
- Q0=4,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- P0=130000,
- T0=300,
- option_temperature=true)
- annotation (Placement(transformation(extent={{-210,-24},{-164,24}},
- rotation=0)));
-
- ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees
- annotation (Placement(transformation(
- origin={182,0},
- extent={{10,-10},{-10,10}},
- rotation=180)));
- ThermoSysPro.Fluid.Volumes.VolumeATh dynamicExchanger(ftype=
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-68,50},{-48,70}}, rotation=0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource(
- option_temperature=2, W0={1e4})
- annotation (Placement(transformation(extent={{-48,
- 90},{-28,110}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossFlueGases( Q(fixed=false, start=10), K=10)
- annotation (Placement(transformation(extent={
- {12,50},{32,70}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossFlueGases1( Q(fixed=false, start=
- 11), K=0.01) annotation (Placement(transformation(extent={
- {-108,50},{-88,70}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe(
- Starttime=50,
- Duration=50,
- Initialvalue=1e4,
- Finalvalue=2e5) annotation (Placement(transformation(extent={{0,100},{-20,
- 120}}, rotation=0)));
- ThermoSysPro.Fluid.Machines.StaticFan staticFan(
- VRotn=2700,
- rm=1,
- a2=0,
- b1=-1.315,
- b2=2.4593,
- VRot=2700,
- a1=-263.145,
- a3=500,
- Q(start=2),
- Qv(start=1.4),
- rho(start=1.4))
- annotation (Placement(transformation(extent={{52,50},{72,70}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.CheckValve
- singularPressureLossFlueGases2( Q(fixed=false, start=10))
- annotation (Placement(transformation(extent={
- {92,50},{112,70}}, rotation=0)));
- ThermoSysPro.Fluid.Volumes.VolumeATh dynamicExchanger1(ftype=
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-68,-70},{-48,-50}}, rotation=
- 0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource1(
- option_temperature=2, W0={1e4})
- annotation (Placement(transformation(extent={{-48,
- -90},{-28,-110}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossFlueGases3( Q(fixed=false, start=10), K=10)
- annotation (Placement(transformation(extent={
- {12,-70},{32,-50}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLossFlueGases4( Q(fixed=false, start=
- 11), K=0.01) annotation (Placement(transformation(extent={
- {-108,-70},{-88,-50}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe1(
- Starttime=50,
- Duration=50,
- Initialvalue=1e4,
- Finalvalue=2e5) annotation (Placement(transformation(extent={{0,-120},{-20,
- -100}}, rotation=0)));
- ThermoSysPro.Fluid.Machines.StaticFan staticFan1(
- VRotn=2700,
- rm=1,
- b2=2.4593,
- b1=-1.315,
- VRot=2700,
- a1=-263.145,
- a2=0,
- a3=500,
- Q(start=2),
- Qv(start=1.4),
- rho(start=1.4))
- annotation (Placement(transformation(extent={{52,-70},{72,-50}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.CheckValve
- singularPressureLossFlueGases5( Q(fixed=false, start=10))
- annotation (Placement(transformation(extent={
- {92,-70},{112,-50}}, rotation=0)));
- ThermoSysPro.Fluid.Junctions.Mixer2 mixerFlueGases2_1(ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{132,-10},{152,10}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Volumes.VolumeDTh volume2S(
- dynamic_composition_balance=true, ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-148,-10},{-128,10}},
- rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorT temperatureSensor
- annotation (Placement(transformation(extent={{-28,58},{-8,78}}, rotation=0)));
- ThermoSysPro.Fluid.Sensors.SensorT temperatureSensor1
- annotation (Placement(transformation(extent={{-28,-62},{-8,-42}}, rotation=
- 0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Qin(
- Starttime=50,
- Duration=50,
- Initialvalue=4,
- Finalvalue=1) annotation (Placement(transformation(extent={{-200,40},{
- -180,60}}, rotation=0)));
-equation
- connect(singularPressureLossFlueGases.C2, staticFan.C1) annotation (Line(
- points={{32,60},{52,60}},
- color={0,0,0},
- thickness=1));
- connect(staticFan.C2, singularPressureLossFlueGases2.C1) annotation (Line(
- points={{72,60},{91,60}},
- color={0,0,0},
- thickness=1));
- connect(singularPressureLossFlueGases3.C2, staticFan1.C1) annotation (Line(
- points={{32,-60},{52,-60}},
- color={0,0,0},
- thickness=1));
- connect(staticFan1.C2, singularPressureLossFlueGases5.C1) annotation (Line(
- points={{72,-60},{91,-60}},
- color={0,0,0},
- thickness=1));
- connect(singularPressureLossFlueGases2.C2, mixerFlueGases2_1.Ce1) annotation (Line(
- points={{113,60},{138,60},{138,10}},
- color={0,0,0},
- thickness=1));
- connect(singularPressureLossFlueGases5.C2, mixerFlueGases2_1.Ce2) annotation (Line(
- points={{113,-60},{138,-60},{138,-10}},
- color={0,0,0},
- thickness=1));
- connect(temperatureSensor1.C2, singularPressureLossFlueGases3.C1) annotation (Line(
- points={{-7.8,-60},{12,-60}},
- color={0,0,0},
- thickness=1));
- connect(temperatureSensor.C2, singularPressureLossFlueGases.C1) annotation (Line(
- points={{-7.8,60},{12,60}},
- color={0,0,0},
- thickness=1));
- connect(Source_Fumees.C, volume2S.Ce) annotation (Line(
- points={{-164,0},{-148,0}},
- color={0,0,0},
- thickness=1));
- connect(volume2S.Cs1, singularPressureLossFlueGases1.C1) annotation (Line(
- points={{-138,10},{-138,60},{-108,60}},
- color={0,0,0},
- thickness=1));
- connect(volume2S.Cs2, singularPressureLossFlueGases4.C1) annotation (Line(
- points={{-138,-10},{-138,-60},{-108,-60}},
- color={0,0,0},
- thickness=1));
- connect(heatSource.C[1], dynamicExchanger.Cth) annotation (Line(points={{-38,
- 90.2},{-58,60}}, color={191,95,0}));
- connect(heatSource1.C[1], dynamicExchanger1.Cth) annotation (Line(points={{
- -38,-90.2},{-58,-60}}, color={191,95,0}));
- connect(mixerFlueGases2_1.Cs, Puits_Fumees.C) annotation (Line(
- points={{152,0},{162,0},{162,-1.20011e-015},{172,-1.20011e-015}},
- color={0,0,0},
- thickness=1));
- connect(singularPressureLossFlueGases1.C2, dynamicExchanger.Ce1) annotation (Line(
- points={{-88,60},{-68,60}},
- color={0,0,0},
- thickness=1,
- smooth=Smooth.None));
- connect(dynamicExchanger.Cs1, temperatureSensor.C1) annotation (Line(
- points={{-48,60},{-28,60}},
- color={0,0,0},
- thickness=1,
- smooth=Smooth.None));
- connect(Qin.y, Source_Fumees.IMassFlow)
- annotation (Line(points={{-179,50},{-170,50},{-170,28},{-187,28},{-187,12}}));
- connect(singularPressureLossFlueGases4.C2, dynamicExchanger1.Ce1) annotation (
- Line(
- points={{-88,-60},{-68,-60}},
- color={0,0,0},
- thickness=1));
- connect(dynamicExchanger1.Cs1, temperatureSensor1.C1) annotation (Line(
- points={{-48,-60},{-38,-60},{-28,-60}},
- color={0,0,0},
- thickness=1));
- connect(rampe.y, heatSource.ISignal)
- annotation (Line(points={{-21,110},{-38,110},{-38,105}}, color={0,0,255}));
- connect(rampe1.y, heatSource1.ISignal) annotation (Line(points={{-21,-110},{
- -38,-110},{-38,-105}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-150},{200,150}},
- initialScale=0.1)),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticFan;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo
deleted file mode 100644
index 1deede17..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo
+++ /dev/null
@@ -1,55 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticPlateHeatExchanger
-
- ThermoSysPro.Fluid.HeatExchangers.StaticPlateHeatExchanger
- plateHeatExchanger(region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1,
- region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1)
- annotation (Placement(transformation(extent={{-20,44},{0,64}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- T0=340)
- annotation (Placement(transformation(extent={{-80,44},{-60,64}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3
- annotation (Placement(transformation(extent={{-60,24},{-40,44}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2
- annotation (Placement(transformation(
- extent={{40,44},{60,64}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP3
- annotation (Placement(transformation(
- extent={{20,24},{40,44}}, rotation=0)));
-equation
- connect(sourceP2.C, plateHeatExchanger.Ec)
- annotation (Line(points={{-60,54},{-20,54}}, color={0,0,255}));
- connect(sourceP3.C, plateHeatExchanger.Ef)
- annotation (Line(points={{-40,34},{
- -15,34},{-15,48}}, color={0,0,255}));
- connect(plateHeatExchanger.Sc, puitsP2.C)
- annotation (Line(points={{0,54.2},{
- 20,54.2},{20,54},{40,54}}, color={0,0,255}));
- connect(plateHeatExchanger.Sf, puitsP3.C)
- annotation (Line(points={{-5,48},{-6,
- 48},{-6,34},{20,34}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticPlateHeatExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo
deleted file mode 100644
index 8f971ba9..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo
+++ /dev/null
@@ -1,68 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStaticWallFlueGasesExchanger
-
- HeatExchangers.StaticWallFlueGasesExchanger
- dynamicOnePhaseFlowPipe(
- Q(start={536.5750641592207,536.5750641592207,536.5750641592207,
- 536.5750641592207,536.5750641592207,536.5750641592207,
- 536.5750641592207,536.5750641592207,536.5750641592207,
- 536.5750641592207,536.5750641592207}),
- h(start={71016.12237181116,74743.46665892199,78470.81094603281,
- 82198.15523314364,85925.49952025448,89652.84380736532,
- 93380.18809447614,97107.53238158698,100834.8766686978,
- 104562.22095580865,108289.56524291947,70825.9016030344}),
- p_rho=998,
- P(start={300000,281833.41863537,263664.30473175,245492.47958308,
- 227317.76827098,209139.99948382,190959.00534677,172774.621262,
- 154586.68575823,136395.04034906,118199.5293995,100000}))
- annotation (Placement(transformation(extent={{-20,
- 20},{0,40}}, rotation=0)));
- BoundaryConditions.SourcePQ sourceP(
- option_temperature=true,
- Q0=1,
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases)
- annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0)));
- BoundaryConditions.Sink sinkP
- annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0)));
- ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource(
- T0={273 + 400,273 + 400,273 + 400,273 + 400,273 + 400,273 + 400,273 + 400,
- 273 + 400,273 + 400,273 + 400},
- option_temperature=2,
- W0={6e4,6e4,6e4,6e4,6e4,6e4,6e4,6e4,6e4,6e4})
- annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0)));
- ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10,
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0)));
-equation
- connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-40,
- 30},{-20,30}}, color={0,0,255}));
- connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{0,30},
- {20,30}}, color={0,0,255}));
- connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{-10,
- 60.2},{-10,52}}, color={191,95,0}));
- connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh)
- annotation (Line(points={{-10,48},{-10,33}}, color={191,95,0}));
- annotation (experiment(StopTime=1000),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStaticWallFlueGasesExchanger;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo
deleted file mode 100644
index 22da154a..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo
+++ /dev/null
@@ -1,62 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSteamDryer1
-
- ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(
- eta=1,
- h(start=3e6),
- P(start=10000000))
- annotation (Placement(transformation(extent={{-20,20},{0,40}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(h0=3000000)
- annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2 annotation (Placement(transformation(extent={{-60,20},
- {-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(P0=100e5)
- annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{20,20},
- {40,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=2.e-3)
- annotation (Placement(transformation(extent={{0,-20},
- {20,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink
- annotation (Placement(transformation(extent={{40,-20},{60,0}}, rotation=0)));
-equation
- connect(sourceQ.C,singularPressureLoss2. C1) annotation (Line(points={{-80,30},
- {-60,30}}, color={0,0,255}));
- connect(singularPressureLoss1.C2,sinkP. C)
- annotation (Line(points={{40,30},{60,30}}, color={0,0,255}));
- connect(singularPressureLoss3.C2,sink. C)
- annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, steamDryer.Cev) annotation (Line(points={{
- -40,30},{-30,30},{-30,34},{-19.9,34}}, color={0,0,255}));
- connect(steamDryer.Csv, singularPressureLoss1.C1) annotation (Line(points={{
- -0.1,34},{10,34},{10,30},{20,30}}, color={0,0,255}));
- connect(steamDryer.Csl, singularPressureLoss3.C1) annotation (Line(points={{
- -9.9,20},{-10,20},{-10,-10},{0,-10}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSteamDryer1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo
deleted file mode 100644
index 00593ee7..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo
+++ /dev/null
@@ -1,62 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSteamDryer2
-
- ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(eta=0.9, P(start=
- 10000000)) annotation (Placement(transformation(extent={{-10,-8},{10,
- 12}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceQ(P0=10000000, h0=
- 2400000)
- annotation (Placement(transformation(extent={{-90,-4},{-70,16}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2 annotation (Placement(transformation(extent={{-50,-4},
- {-30,16}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP
- annotation (Placement(transformation(extent={{70,-4},{90,16}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{30,-4},
- {50,16}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=1.e-4)
- annotation (Placement(transformation(extent={{30,-44},
- {50,-24}},
- rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink
- annotation (Placement(transformation(extent={{70,-44},{90,-24}},
- rotation=0)));
-equation
- connect(sourceQ.C,singularPressureLoss2. C1) annotation (Line(points={{-70,6},
- {-50,6}}, color={0,0,255}));
- connect(singularPressureLoss1.C2,sinkP. C)
- annotation (Line(points={{50,6},{70,6}}, color={0,0,255}));
- connect(singularPressureLoss3.C2,sink. C)
- annotation (Line(points={{50,-34},{70,-34}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, steamDryer.Cev) annotation (Line(points={{-30,6},
- {-20,6},{-9.9,6}}, color={0,0,255}));
- connect(steamDryer.Csv, singularPressureLoss1.C1) annotation (Line(points={{9.9,6},
- {20,6},{30,6}}, color={0,0,255}));
- connect(steamDryer.Csl, singularPressureLoss3.C1) annotation (Line(points={{0.1,-8},
- {0,-8},{0,-34},{30,-34}}, color={0,0,255}));
- annotation (experiment(StopTime=10), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSteamDryer2;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo
deleted file mode 100644
index 92d0af3c..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo
+++ /dev/null
@@ -1,51 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSteamEngine
-
- ThermoSysPro.Fluid.Machines.SteamEngine steamEngine1
- annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(P0=100000)
- annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- h0=3.e6,
- option_temperature=false,
- P0=16e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}},
- rotation=0)));
-equation
- connect(sourceP.C, steamEngine1.C1)
- annotation (Line(points={{-80,70},{-57,70}}, color={0,0,255}));
- connect(steamEngine1.C2, puitsP.C)
- annotation (Line(points={{-43,70},{-31.5,70},{-31.5,70},{-20,70}}, color={0,
- 0,255}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.32,
- y=0.02,
- width=0.39,
- height=0.47),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSteamEngine;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo
deleted file mode 100644
index a80faebc..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo
+++ /dev/null
@@ -1,61 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSteamExtractionSplitter
-
- ThermoSysPro.Fluid.Junctions.SteamExtractionSplitter
- steamExtractionSplitter(alpha=0.9)
- annotation (Placement(transformation(extent={{-20,
- 20},{0,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(h0=2600000)
- annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss2 annotation (Placement(transformation(extent={{-60,20},
- {-40,40}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(P0=100e5)
- annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss1 annotation (Placement(transformation(extent={{20,20},
- {40,40}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss
- singularPressureLoss3(K=2.e-3)
- annotation (Placement(transformation(extent={{0,-20},
- {20,0}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkQ sink(Q0=10)
- annotation (Placement(transformation(extent={{40,-20},{60,0}}, rotation=0)));
-equation
- connect(sourceQ.C, singularPressureLoss2.C1) annotation (Line(points={{-80,30},
- {-60,30}}, color={0,0,255}));
- connect(singularPressureLoss2.C2, steamExtractionSplitter.Ce) annotation (Line(
- points={{-40,30},{-20.3,30}}, color={0,0,255}));
- connect(steamExtractionSplitter.Cs, singularPressureLoss1.C1) annotation (Line(
- points={{0.3,30},{20,30}}, color={0,0,255}));
- connect(steamExtractionSplitter.Cex, singularPressureLoss3.C1) annotation (Line(
- points={{-6,20},{-6,-10},{0,-10}}, color={0,0,255}));
- connect(singularPressureLoss1.C2, sinkP.C)
- annotation (Line(points={{40,30},{60,30}}, color={0,0,255}));
- connect(singularPressureLoss3.C2, sink.C)
- annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255}));
- annotation (experiment(StopTime=1000), Diagram(graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSteamExtractionSplitter;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo
deleted file mode 100644
index e1c0bdb3..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo
+++ /dev/null
@@ -1,92 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStodolaTurbine1
- parameter Units.SI.AbsolutePressure PoutPump(fixed=false, start=13e5)
- "Flow pressure at the outlet of the pump";
- ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(pros1(x(start=
- 1)), Hrs(start=2931e3),
- pros(d(start=19.715136086827403)),
- Ce(h(start=3000000.0)),
- proe(T(start=613.0), x(start=1.0)))
- annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(P0=45e5,
- C(h_vol_1(start=75002)))
- annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- h0=3.e6,
- option_temperature=false,
- P0=6500000,
- region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_2)
- annotation (Placement(transformation(extent={{-100,60},{-80,80}},
- rotation=0)));
- ThermoSysPro.Fluid.Machines.CentrifugalPump
- DynamicCentrifugalPump1(
- Q(fixed=true, start=50),
- Qv(start=23.0),
- Pm(start=1158163.6),
- h(start=3041170.0441966015),
- C1(P(start=10e5)),
- C2(P(start=3.e6), h(start=3082340.088393203)),
- hn(start=7119.0),
- w_a(start=20.0))
- annotation (Placement(transformation(extent={{20,-40},{40,-20}}, rotation=0)));
- ThermoSysPro.ElectroMechanics.Machines.Shaft Shaft1
- annotation (Placement(transformation(extent={{-20,-90},{0,-70}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1(P0=13e5)
- annotation (Placement(transformation(extent={{60,-40},{80,-20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- h0=3.e6,
- option_temperature=false,
- P0=1000000,
- region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_2)
- annotation (Placement(transformation(extent={{-20,-40},{0,-20}},
- rotation=0)));
- InstrumentationAndControl.Blocks.Sources.Constante Pout(k=PoutPump)
- annotation (Placement(transformation(extent={{56,-12},{68,0}}, rotation=0)));
-equation
- connect(Shaft1.C2, DynamicCentrifugalPump1.M)
- annotation (Line(points={{1,-80},{30,-80},{30,-41}}));
- connect(stodolaTurbine.M, Shaft1.C1)
- annotation (Line(points={{-50,60},{-50,-80},{-21,-80}}));
- connect(sourceP1.C, DynamicCentrifugalPump1.C1)
- annotation (Line(points={{0,-30},{20,-30}}, color={0,0,255}));
- connect(DynamicCentrifugalPump1.C2, puitsP1.C) annotation (Line(points={{40,-30},
- {50,-30},{50,-30},{60,-30}}, color={0,0,255}));
- connect(sourceP.C, stodolaTurbine.Ce)
- annotation (Line(points={{-80,70},{-60.1,70}}, color={0,0,255}));
- connect(stodolaTurbine.Cs, puitsP.C)
- annotation (Line(points={{-39.9,70},{-20,70}}, color={0,0,255}));
- connect(Pout.y, puitsP1.IPressure)
- annotation (Line(points={{68.6,-6},{88,-6},{88,-30},{75,-30}}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.32,
- y=0.02,
- width=0.39,
- height=0.47),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStodolaTurbine1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo
deleted file mode 100644
index 79bba323..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo
+++ /dev/null
@@ -1,53 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestStodolaTurbine2
-
- ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Ce(h(start=
- 3000000.0)))
- annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(P0=5000)
- annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- h0=3.e6,
- option_temperature=false,
- P0=300000,
- region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_2)
- annotation (Placement(transformation(extent={{-100,60},{-80,80}},
- rotation=0)));
-equation
- connect(sourceP.C, stodolaTurbine.Ce)
- annotation (Line(points={{-80,70},{-60.1,70}}, color={0,0,255}));
- connect(stodolaTurbine.Cs, puitsP.C)
- annotation (Line(points={{-39.9,70},{-20,70}}, color={0,0,255}));
- annotation (experiment(StopTime=1000),
- Window(
- x=0.32,
- y=0.02,
- width=0.39,
- height=0.47),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2}), graphics),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestStodolaTurbine2;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo
deleted file mode 100644
index d36a372d..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo
+++ /dev/null
@@ -1,67 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestSwitchValve
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-100,-10},{-80,10}},rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{80,-10},{100,10}},
- rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.SwitchValve SwitchValve
- annotation (Placement(transformation(
- extent={{-10,-4},{10,16}},rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Pulse pulse(
- width=10, period=20)
- annotation (Placement(transformation(extent={{-60,50},{-40,70}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP2
- annotation (Placement(transformation(
- extent={{-60,-10},{-39,10}},rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1
- annotation (Placement(transformation(
- extent={{40,-10},{60,10}},rotation=0)));
-equation
- connect(pulse.yL, SwitchValve.Ouv) annotation (Line(points={{-39,60},{0,60},{
- 0,13.2}}));
- connect(SourceP1.C, perteDP2.C1)
- annotation (Line(points={{-80,0},{-60,0}}, color={0,0,255}));
- connect(perteDP2.C2, SwitchValve.C1) annotation (Line(points={{-39,0},{-10,0}},
- color={0,0,255}));
- connect(SwitchValve.C2, perteDP1.C1) annotation (Line(points={{10,0},{40,0}},
- color={0,0,255}));
- connect(perteDP1.C2, PuitsP1.C)
- annotation (Line(points={{60,0},{80,0}}, color={0,0,255}));
- annotation (experiment(StopTime=100),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(graphics,
- coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestSwitchValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo
deleted file mode 100644
index 75adcf07..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo
+++ /dev/null
@@ -1,67 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestTank
-
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP1(C1(P(start=
- 400000.0)), Q(start=600.0))
- annotation (Placement(transformation(extent={{30,-50},{50,-30}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1(Pm(start=
- 200000.0), Q(start=0.0))
- annotation (Placement(transformation(extent={{-50,2},{-30,22}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(
- transformation(extent={{-90,-4},{-70,16}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{70,-50},{90,-30}}, rotation=0)));
- ThermoSysPro.Fluid.Volumes.Tank Tank1(z(fixed=false, start=5), Cs1(Q(start=
- 0.0)),
- steady_state=true)
- annotation (Placement(transformation(extent={{-10,-10},{10,10}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1
- annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP2
- annotation (Placement(transformation(extent={{30,-4},{50,16}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2
- annotation (Placement(transformation(
- extent={{70,-4},{90,16}}, rotation=0)));
-equation
- connect(PerteDP1.C2, PuitsP1.C)
- annotation (Line(points={{50,-40},{70,-40}}, color={0,0,255}));
- connect(SourceP1.C, VanneReglante1.C1)
- annotation (Line(points={{-70,6},{-50,6}}, color={0,0,255}));
- connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{10,-6},{20,-6},{20,
- -40},{30,-40}}, color={0,0,255}));
- connect(Rampe1.y, VanneReglante1.Ouv)
- annotation (Line(points={{-69,40},{-40,40},{-40,23}}));
- connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,6},{-20,6},
- {-10,6}}, color={0,0,255}));
- connect(Tank1.Cs1, PerteDP2.C1)
- annotation (Line(points={{10.2,6},{20,6},{30,6}}, color={0,0,255}));
- connect(PerteDP2.C2, PuitsP2.C)
- annotation (Line(points={{50,6},{50,6},{70,6}}, color={0,0,255}));
- annotation (experiment(StopTime=20),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestTank;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo
deleted file mode 100644
index 67788b89..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo
+++ /dev/null
@@ -1,69 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestTankHorizontal
-
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP1(C1(P(start=
- 400000.0)), Q(start=600.0))
- annotation (Placement(transformation(extent={{32,-20},{52,0}}, rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1(Pm(start=
- 200000.0), Q(start=0.0))
- annotation (Placement(transformation(extent={{-50,6},{-30,26}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(
- transformation(extent={{-90,0},{-70,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{70,-20},{90,0}}, rotation=0)));
- Volumes.TankHorizontal Tank1(z(fixed=false, start=5), Cs1(Q(start=
- 0.0)),
- diffusion=true,
- dynamic_mass_balance=true)
- annotation (Placement(transformation(extent={{-20,-20},{20,20}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1
- annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation=
- 0)));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP2
- annotation (Placement(transformation(extent={{32,0},{52,20}}, rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2
- annotation (Placement(transformation(
- extent={{70,0},{90,20}}, rotation=0)));
-equation
- connect(PerteDP1.C2, PuitsP1.C)
- annotation (Line(points={{52,-10},{70,-10}}, color={0,0,255}));
- connect(SourceP1.C, VanneReglante1.C1)
- annotation (Line(points={{-70,10},{-50,10}}, color={0,0,255}));
- connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{20,-10},{32,-10}},
- color={0,0,255}));
- connect(Rampe1.y, VanneReglante1.Ouv)
- annotation (Line(points={{-69,40},{-40,40},{-40,27}}));
- connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,10},{-20,
- 10}}, color={0,0,255}));
- connect(Tank1.Cs1, PerteDP2.C1)
- annotation (Line(points={{20.4,9.8},{20.4,10},{32,10}},
- color={0,0,255}));
- connect(PerteDP2.C2, PuitsP2.C)
- annotation (Line(points={{52,10},{70,10}}, color={0,0,255}));
- annotation (experiment(StopTime=20),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestTankHorizontal;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo
deleted file mode 100644
index f473116f..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo
+++ /dev/null
@@ -1,64 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestThreeWayValve
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1
- annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=
- 0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1
- annotation (Placement(transformation(
- extent={{70,-10},{90,10}},rotation=0)));
- ThermoSysPro.Fluid.PressureLosses.ThreeWayValve threeWayValve(
- C2(Q(start=-7.902947109890763E-33)),
- C3(Q(start=2716.4138702433384)),
- Valve1(Pm(start=200000.0)),
- VolumeA1(h(start=71016.12237181117)))
- annotation (Placement(transformation(extent={{-10,-6},{10,14}},rotation=0)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2
- annotation (Placement(transformation(
- extent={{70,-50},{90,-30}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe
- annotation (Placement(transformation(
- extent={{-50,30},{-30,50}}, rotation=0)));
-equation
- connect(rampe.y, threeWayValve.Ouv)
- annotation (Line(points={{-29,40},{0,40},{0,15}}));
- connect(SourceP1.C, threeWayValve.C1)
- annotation (Line(points={{-70,0},{-10,0}}, color={0,0,0}));
- connect(threeWayValve.C2, PuitsP1.C)
- annotation (Line(points={{10,0},{70,0}}, color={0,0,0}));
- connect(threeWayValve.C3, PuitsP2.C)
- annotation (Line(points={{0,-6},{0,-40},{70,-40}}, color={0,0,0}));
- annotation (experiment(StopTime=5),
- Window(
- x=0.45,
- y=0.01,
- width=0.35,
- height=0.49),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-100,-100},{100,100}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestThreeWayValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo
deleted file mode 100644
index 094b27d6..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo
+++ /dev/null
@@ -1,116 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestTwoPhaseCavity
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater=670
- "Maximum CV (active if mode_caract=0)";
- PressureLosses.ControlValve feedwaterValve(
- Cv(start=335),
- C1(
- h_vol_1(start=1400e3),
- h(start=1400e3),
- P(start=13300000),
- h_vol_2(start=1975433.4222685455)),
- rho(start=888),
- h(start=1400000),
- Cvmax=CvmaxWater,
- Q(start=10),
- Pm(start=13200000.029884))
- annotation (Placement(transformation(extent={{-98,96},{-78,
- 116}}, rotation=0)));
- PressureLosses.ControlValve steamValve(
- Cv(start=25000),
- Q(start=0.0),
- rho(start=78.5),
- h(start=2657930),
- C1(h_vol_2(start=2655313.7785675577)),
- Cvmax(fixed=false),
- Pm(start=12998726.577779))
- annotation (Placement(transformation(extent={{-60,136},{-40,156}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon(k=0.5)
- annotation (Placement(transformation(extent={{-138,120},{-118,140}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon1(k=0.5)
- annotation (Placement(transformation(extent={{-100,160},{-80,180}},
- rotation=0)));
- BoundaryConditions.SourceP sourceP(h0=1400000,
- option_temperature=false,
- P0=13200000)
- annotation (Placement(transformation(extent={{-138,90},{-118,110}},
- rotation=0)));
- BoundaryConditions.SinkP sinkQ(P0=13200000, Q(start=
- 51.00572315373906))
- annotation (Placement(transformation(extent={{0,-60},{20,-40}}, rotation=0)));
- Volumes.TwoPhaseCavity twoPhaseVolume(
- Vv(start=0.5, fixed=true),
- diffusion=true,
- dynamic_energy_balance=false,
- P0=13200000,
- Pfond(start=13200000))
- annotation (Placement(transformation(extent={{-60,20},{20,100}})));
- PressureLosses.LumpedStraightPipe lumpedStraightPipe annotation (Placement(
- transformation(
- extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-20,-10})));
- BoundaryConditions.SourceP sourceP1(
- P0(fixed=true) = 13200000,
- option_temperature=false,
- h0=2600000)
- annotation (Placement(transformation(extent={{-100,130},{-80,150}},
- rotation=0)));
-equation
- connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv)
- annotation (Line(points={{-117,130},{-88,130},{-88,117}}, smooth=Smooth.None));
- connect(sourceP.C,feedwaterValve. C1) annotation (Line(
- points={{-118,100},{-98,100}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(ConsigneNiveauBallon1.y,steamValve. Ouv)
- annotation (Line(points={{-79,170},{-50,170},{-50,157}},
- smooth=Smooth.None));
- connect(lumpedStraightPipe.C2, sinkQ.C)
- annotation (Line(points={{-20,-20},{-20,-50},{0,-50}}, color={0,0,0}));
- connect(sourceP1.C, steamValve.C1)
- annotation (Line(points={{-80,140},{-60,140}}, color={0,0,0}));
- connect(twoPhaseVolume.Cl, lumpedStraightPipe.C1) annotation (Line(points={{
- -19.5556,30.6667},{-19.5556,15.3333},{-20,15.3333},{-20,0}}, color={0,
- 0,0}));
- connect(steamValve.C2, twoPhaseVolume.Cv) annotation (Line(points={{-40,140},
- {-19.5556,140},{-19.5556,89.3333}}, color={0,0,0}));
- connect(feedwaterValve.C2, twoPhaseVolume.Ce) annotation (Line(points={{-78,100},
- {-35.5556,100},{-35.5556,89.3333}}, color={0,0,0}));
- annotation (experiment(__Dymola_Algorithm="Dassl"),
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-100},{140,200}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestTwoPhaseCavity;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo
deleted file mode 100644
index a70d61b5..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo
+++ /dev/null
@@ -1,122 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestTwoPhaseCavityOnePipe
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater=670
- "Maximum CV (active if mode_caract=0)";
- PressureLosses.ControlValve feedwaterValve(
- Cv(start=335),
- C1(
- h_vol_1(start=1400e3),
- h(start=1400e3),
- P(start=13300000),
- h_vol_2(start=1399988.8233534198)),
- rho(start=888),
- h(start=1400000),
- Cvmax=CvmaxWater,
- Q(start=58.005768798668484),
- Pm(start=13146647.912081594))
- annotation (Placement(transformation(extent={{-98,96},{-78,
- 116}}, rotation=0)));
- PressureLosses.ControlValve steamValve(
- Cv(start=25000),
- Q(start=6.303270420619601E-10),
- rho(start=78.5),
- h(start=2657930),
- C1(h_vol_2(start=2658519.5634182408)),
- Cvmax(fixed=false),
- Pm(start=12998726.577779))
- annotation (Placement(transformation(extent={{-60,136},{-40,156}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon(k=0.5)
- annotation (Placement(transformation(extent={{-138,120},{-118,140}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon1(k=0.5)
- annotation (Placement(transformation(extent={{-100,160},{-80,180}},
- rotation=0)));
- BoundaryConditions.SourceP sourceP(h0=1400000,
- option_temperature=false,
- P0=13200000)
- annotation (Placement(transformation(extent={{-138,90},{-118,110}},
- rotation=0)));
- BoundaryConditions.SinkP sinkQ(P0=13200000, Q(start=
- 51.00572315373906))
- annotation (Placement(transformation(extent={{0,-60},{20,-40}}, rotation=0)));
- Volumes.TwoPhaseCavityOnePipe
- twoPhaseVolume(
- Vv(start=0.5, fixed=true),
- diffusion=true,
- hl(start=1400000.0),
- hv(start=2410000.0),
- Cal_hcond=false,
- dynamic_energy_balance=false,
- P0=13200000,
- Pfond(start=13203663.545897305),
- Tp(start=583.6846968972088),
- hvIn(start=2400966.7047930923))
- annotation (Placement(transformation(extent={{-60,20},{20,100}})));
- PressureLosses.LumpedStraightPipe lumpedStraightPipe annotation (Placement(
- transformation(
- extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-20,-10})));
- BoundaryConditions.SourceP sourceP1(
- P0(fixed=true) = 13200000,
- option_temperature=false,
- h0=2600000)
- annotation (Placement(transformation(extent={{-100,130},{-80,150}},
- rotation=0)));
-equation
- connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv)
- annotation (Line(points={{-117,130},{-88,130},{-88,117}}, smooth=Smooth.None));
- connect(sourceP.C,feedwaterValve. C1) annotation (Line(
- points={{-118,100},{-98,100}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(ConsigneNiveauBallon1.y,steamValve. Ouv)
- annotation (Line(points={{-79,170},{-50,170},{-50,157}},
- smooth=Smooth.None));
- connect(lumpedStraightPipe.C2, sinkQ.C)
- annotation (Line(points={{-20,-20},{-20,-50},{0,-50}}, color={0,0,0}));
- connect(sourceP1.C, steamValve.C1)
- annotation (Line(points={{-80,140},{-60,140}}, color={0,0,0}));
- connect(twoPhaseVolume.Cl, lumpedStraightPipe.C1) annotation (Line(points={{-20,
- 30.6667},{-20,15.3333},{-20,15.3333},{-20,0}}, color={0,
- 0,0}));
- connect(feedwaterValve.C2, twoPhaseVolume.Ce) annotation (Line(points={{-78,100},
- {-50.6286,100},{-50.6286,81.0667}}, color={0,0,0}));
- connect(steamValve.C2, twoPhaseVolume.CvBP) annotation (Line(points={{-40,140},
- {-20.2286,140},{-20.2286,89.3333}}, color={0,0,0}));
- annotation (experiment(__Dymola_Algorithm="Dassl"),
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-100},{140,200}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestTwoPhaseCavityOnePipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo
deleted file mode 100644
index 15f1f896..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo
+++ /dev/null
@@ -1,116 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestTwoPhaseVolume
- parameter ThermoSysPro.Units.xSI.Cv CvmaxWater=670
- "Maximum CV (active if mode_caract=0)";
- PressureLosses.ControlValve feedwaterValve(
- Cv(start=335),
- C1(
- h_vol_1(start=1400e3),
- h(start=1400e3),
- P(start=13300000),
- h_vol_2(start=1975433.4222685455)),
- rho(start=888),
- h(start=1400000),
- Cvmax=CvmaxWater,
- Q(start=10),
- Pm(start=13200000.029884))
- annotation (Placement(transformation(extent={{-120,76},{
- -100,96}}, rotation=0)));
- PressureLosses.ControlValve steamValve(
- Cv(start=25000),
- Q(start=0.0),
- rho(start=78.5),
- h(start=2657930),
- C1(h_vol_2(start=2655313.7785675577)),
- Cvmax(fixed=false),
- Pm(start=12998726.577779))
- annotation (Placement(transformation(extent={{-120,136},{-100,156}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon(k=0.5)
- annotation (Placement(transformation(extent={{-160,100},{-140,120}},
- rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante
- ConsigneNiveauBallon1(k=0.5)
- annotation (Placement(transformation(extent={{-160,160},{-140,180}},
- rotation=0)));
- BoundaryConditions.SourceP sourceP(h0=1400000,
- option_temperature=false,
- P0=13200000)
- annotation (Placement(transformation(extent={{-200,70},{-180,90}},
- rotation=0)));
- BoundaryConditions.SinkP sinkQ(P0=13200000, Q(start=
- 51.00572315373906))
- annotation (Placement(transformation(extent={{-38,-40},{-18,-20}},
- rotation=0)));
- Volumes.TwoPhaseVolume twoPhaseVolume(diffusion=true,
- steady_state=true,
- Vv(start=0.5, fixed=true),
- dynamic_energy_balance=true,
- P0=13200000,
- Pfond(start=13200000))
- annotation (Placement(transformation(extent={{-80,50},{-20,110}})));
- PressureLosses.LumpedStraightPipe lumpedStraightPipe annotation (Placement(
- transformation(
- extent={{10,-10},{-10,10}},
- rotation=90,
- origin={-50,10})));
- BoundaryConditions.SourceP sourceP1(
- P0(fixed=true) = 13200000,
- option_temperature=false,
- h0=2600000)
- annotation (Placement(transformation(extent={{-200,130},{-180,150}},
- rotation=0)));
-equation
- connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv)
- annotation (Line(points={{-139,110},{-110,110},{-110,97}}, smooth=Smooth.None));
- connect(sourceP.C,feedwaterValve. C1) annotation (Line(
- points={{-180,80},{-120,80}},
- color={0,0,255},
- smooth=Smooth.None));
- connect(ConsigneNiveauBallon1.y,steamValve. Ouv)
- annotation (Line(points={{-139,170},{-110,170},{-110,157}},
- smooth=Smooth.None));
- connect(feedwaterValve.C2, twoPhaseVolume.Ce)
- annotation (Line(points={{-100,80},{-80,80}}, color={0,0,0}));
- connect(lumpedStraightPipe.C2, sinkQ.C)
- annotation (Line(points={{-50,0},{-50,-30},{-38,-30}}, color={0,0,0}));
- connect(sourceP1.C, steamValve.C1)
- annotation (Line(points={{-180,140},{-120,140}}, color={0,0,0}));
- connect(steamValve.C2, twoPhaseVolume.Cv)
- annotation (Line(points={{-100,140},{-50,140},{-50,110}}, color={0,0,0}));
- connect(twoPhaseVolume.Cl, lumpedStraightPipe.C1)
- annotation (Line(points={{-50,50},{-50,20}}, color={0,0,0}));
- annotation (experiment(__Dymola_Algorithm="Dassl"),
- Window(
- x=0.43,
- y=0,
- width=0.57,
- height=0.63),
- Diagram(coordinateSystem(
- preserveAspectRatio=false,
- extent={{-200,-100},{140,200}},
- grid={2,2})),
- Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestTwoPhaseVolume;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo
deleted file mode 100644
index e7d070a4..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo
+++ /dev/null
@@ -1,112 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestVolumeA
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- continuous_flow_reversal=true,
- T0=288.15,
- diffusion=true,
- C(h_vol_2(start=63269.22110794238)))
- annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(
- Q(start=356.3142593657128),
- P0=300000,
- T0=369.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{80,-10},{100,10}})));
- ThermoSysPro.Fluid.Volumes.VolumeA volumeA(
- dynamic_composition_balance=false,
- steady_state=true,
- V=1.e-6,
- Ce2(Q(start=-4.6367791499652465E-36)),
- continuous_flow_reversal=true,
- dynamic_mass_balance=false,
- dynamic_energy_balance=false,
- diffusion=true,
- P(start=200002.5108577))
- annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
-
- InstrumentationAndControl.Blocks.Sources.Rampe rampe(
- Duration=10,
- Initialvalue=1e5,
- Finalvalue=5e5)
- annotation (Placement(transformation(extent={{60,-40},{80,-20}})));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe1(gamma_diff(
- start=4.4340701734837724E-07))
- annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe3(
- gamma_diff(start=4.4336099270975624E-07))
- annotation (Placement(transformation(extent={{50,-10},{70,10}})));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe2(inertia=
- false)
- annotation (Placement(transformation(extent={{-70,40},{-50,60}})));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- continuous_flow_reversal=false,
- T0=288.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{-100,40},{-80,60}})));
-
- PressureLosses.ControlValve controlValve1(Pm(start=201722.05301761828))
- annotation (Placement(transformation(extent={{-40,-4},{-20,16}})));
- PressureLosses.ControlValve controlValve2(C2(Q(start=0)), Pm(start=
- 250001.25542885027))
- annotation (Placement(transformation(extent={{-40,46},{-20,66}})));
- PressureLosses.ControlValve controlValve3(Pm(start=198282.96276544))
- annotation (Placement(transformation(extent={{20,-4},{40,16}})));
- InstrumentationAndControl.Blocks.Sources.Constante constante1(k=1)
- annotation (Placement(transformation(extent={{-56,24},{-44,36}})));
- InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0)
- annotation (Placement(transformation(extent={{-56,74},{-44,86}})));
- InstrumentationAndControl.Blocks.Sources.Constante constante3
- annotation (Placement(transformation(extent={{4,22},{16,34}})));
-equation
- connect(rampe.y, sinkP.IPressure) annotation (Line(points={{81,-30},{100,-30},
- {100,0},{95,0}}, color={0,0,255}));
- connect(sourceP1.C, lumpedStraightPipe1.C1)
- annotation (Line(points={{-80,0},{-70,0}}, color={0,0,0}));
- connect(lumpedStraightPipe3.C2, sinkP.C)
- annotation (Line(points={{70,0},{80,0}}, color={0,0,0}));
- connect(sourceP2.C, lumpedStraightPipe2.C1)
- annotation (Line(points={{-80,50},{-70,50}}, color={0,0,0}));
- connect(lumpedStraightPipe1.C2, controlValve1.C1)
- annotation (Line(points={{-50,0},{-40,0}}, color={0,0,0}));
- connect(lumpedStraightPipe2.C2, controlValve2.C1)
- annotation (Line(points={{-50,50},{-40,50}}, color={0,0,0}));
- connect(controlValve2.C2, volumeA.Ce2)
- annotation (Line(points={{-20,50},{0,50},{0,10}}, color={0,0,0}));
- connect(volumeA.Cs1, controlValve3.C1)
- annotation (Line(points={{10,0},{20,0}}, color={0,0,0}));
- connect(controlValve3.C2, lumpedStraightPipe3.C1)
- annotation (Line(points={{40,0},{50,0}}, color={0,0,0}));
- connect(constante1.y, controlValve1.Ouv)
- annotation (Line(points={{-43.4,30},{-30,30},{-30,17}}, color={0,0,255}));
- connect(constante2.y, controlValve2.Ouv)
- annotation (Line(points={{-43.4,80},{-30,80},{-30,67}}, color={0,0,255}));
- connect(constante3.y, controlValve3.Ouv)
- annotation (Line(points={{16.6,28},{30,28},{30,17}}, color={0,0,255}));
- connect(volumeA.Ce1, controlValve1.C2)
- annotation (Line(points={{-10,0},{-20,0}}, color={0,0,255}));
- annotation (Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- experiment(StopTime=12),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestVolumeA;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo
deleted file mode 100644
index 94c923e8..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo
+++ /dev/null
@@ -1,78 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestVolumeA1
-
- ThermoSysPro.Fluid.Volumes.VolumeA volumeA(ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- Ce2(Q(start=5381683.17323685)),
- Cs1(Q(start=5381683.173236847)),
- Cs2(Q(start=5381683.173236847)),
- Xo2(start=0.22),
- h(start=999999.9999999997),
- dynamic_energy_balance=false)
- annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(rho(start=
- 164.8075648419657))
- annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1
- annotation (Placement(transformation(extent={{-60,-40},{-40,-20}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2
- annotation (Placement(transformation(extent={{40,20},{60,40}})));
- ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3
- annotation (Placement(transformation(extent={{40,-40},{60,-20}})));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- option_temperature=false,
- h0=1e6,
- P0=600e5)
- annotation (Placement(transformation(extent={{-100,20},{-80,40}})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases,
- T0=1000,
- option_temperature=false,
- h0=1e6,
- P0=600e5)
- annotation (Placement(transformation(extent={{-100,-40},{-80,-20}})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(option_temperature=false)
- annotation (Placement(transformation(extent={{80,20},{100,40}})));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1(option_temperature=false)
- annotation (Placement(transformation(extent={{80,-40},{100,-20}})));
-equation
- connect(singularPressureLoss.C2, volumeA.Ce2)
- annotation (Line(points={{-40,30},{0,30},{0,10}}, color={0,0,0}));
- connect(singularPressureLoss1.C2, volumeA.Ce1) annotation (Line(points={{-40,
- -30},{-20,-30},{-20,0},{-10,0}}, color={0,0,0}));
- connect(volumeA.Cs1, singularPressureLoss2.C1) annotation (Line(points={{10,0},
- {10,0},{20,0},{20,30},{40,30},{40,30}}, color={0,0,0}));
- connect(volumeA.Cs2, singularPressureLoss3.C1) annotation (Line(points={{0,
- -10},{0,-10},{0,-30},{40,-30},{40,-30}}, color={0,0,0}));
- connect(sourceP.C, singularPressureLoss.C1)
- annotation (Line(points={{-80,30},{-60,30}}, color={0,0,0}));
- connect(sourceP1.C, singularPressureLoss1.C1)
- annotation (Line(points={{-80,-30},{-60,-30}}, color={0,0,0}));
- connect(singularPressureLoss2.C2, sinkP.C)
- annotation (Line(points={{60,30},{70,30},{70,30},{80,30}}, color={0,0,0}));
- connect(singularPressureLoss3.C2, sinkP1.C) annotation (Line(points={{60,-30},
- {70,-30},{70,-30},{80,-30}}, color={0,0,0}));
- annotation (Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}));
-end TestVolumeA1;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo
deleted file mode 100644
index 8b52572c..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo
+++ /dev/null
@@ -1,111 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-model TestVolumeI
-
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(
- continuous_flow_reversal=true,
- T0=288.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
-
- ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(
- Q(start=356.3142593657128),
- P0=300000,
- T0=369.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{80,-10},{100,10}})));
- Volumes.VolumeI volumeA(
- dynamic_composition_balance=false,
- steady_state=true,
- V=1.e-6,
- Ce2(Q(start=-1.2064107019298721E-33)),
- continuous_flow_reversal=true,
- dynamic_mass_balance=false,
- diffusion=false,
- dynamic_energy_balance=true,
- P(start=200002.5108577),
- h(start=63269.22110794238))
- annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
-
- InstrumentationAndControl.Blocks.Sources.Rampe rampe(
- Duration=10,
- Initialvalue=1e5,
- Finalvalue=5e5)
- annotation (Placement(transformation(extent={{60,-40},{80,-20}})));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe1(gamma_diff(
- start=4.4340701734837724E-07))
- annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe3
- annotation (Placement(transformation(extent={{50,-10},{70,10}})));
- ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe2(inertia=
- false)
- annotation (Placement(transformation(extent={{-70,40},{-50,60}})));
- ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(
- continuous_flow_reversal=false,
- T0=288.15,
- diffusion=true)
- annotation (Placement(transformation(extent={{-100,40},{-80,60}})));
-
- PressureLosses.ControlValve controlValve1(Pm(start=201722.05301761828))
- annotation (Placement(transformation(extent={{-40,-4},{-20,16}})));
- PressureLosses.ControlValve controlValve2(C2(Q(start=0)), Pm(start=
- 250001.25542885027))
- annotation (Placement(transformation(extent={{-40,46},{-20,66}})));
- PressureLosses.ControlValve controlValve3(Pm(start=198282.96276544))
- annotation (Placement(transformation(extent={{20,-4},{40,16}})));
- InstrumentationAndControl.Blocks.Sources.Constante constante1(k=1)
- annotation (Placement(transformation(extent={{-56,24},{-44,36}})));
- InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0)
- annotation (Placement(transformation(extent={{-56,74},{-44,86}})));
- InstrumentationAndControl.Blocks.Sources.Constante constante3
- annotation (Placement(transformation(extent={{4,22},{16,34}})));
-equation
- connect(rampe.y, sinkP.IPressure) annotation (Line(points={{81,-30},{100,-30},
- {100,0},{95,0}}, color={0,0,255}));
- connect(sourceP1.C, lumpedStraightPipe1.C1)
- annotation (Line(points={{-80,0},{-70,0}}, color={0,0,0}));
- connect(lumpedStraightPipe3.C2, sinkP.C)
- annotation (Line(points={{70,0},{80,0}}, color={0,0,0}));
- connect(sourceP2.C, lumpedStraightPipe2.C1)
- annotation (Line(points={{-80,50},{-70,50}}, color={0,0,0}));
- connect(lumpedStraightPipe1.C2, controlValve1.C1)
- annotation (Line(points={{-50,0},{-40,0}}, color={0,0,0}));
- connect(lumpedStraightPipe2.C2, controlValve2.C1)
- annotation (Line(points={{-50,50},{-40,50}}, color={0,0,0}));
- connect(controlValve3.C2, lumpedStraightPipe3.C1)
- annotation (Line(points={{40,0},{50,0}}, color={0,0,0}));
- connect(constante1.y, controlValve1.Ouv)
- annotation (Line(points={{-43.4,30},{-30,30},{-30,17}}, color={0,0,255}));
- connect(constante2.y, controlValve2.Ouv)
- annotation (Line(points={{-43.4,80},{-30,80},{-30,67}}, color={0,0,255}));
- connect(constante3.y, controlValve3.Ouv)
- annotation (Line(points={{16.6,28},{30,28},{30,17}}, color={0,0,255}));
- connect(controlValve1.C2, volumeA.Ce2)
- annotation (Line(points={{-20,0},{-10,0}}, color={0,0,0}));
- connect(controlValve2.C2, volumeA.Ce1) annotation (Line(points={{-20,50},{-14,
- 50},{-14,8},{-10,8}}, color={0,0,0}));
- connect(volumeA.Cs2, controlValve3.C1)
- annotation (Line(points={{10,0},{20,0}}, color={0,0,0}));
- annotation (Icon(graphics={
- Rectangle(
- lineColor={200,200,200},
- fillColor={248,248,248},
- fillPattern=FillPattern.HorizontalCylinder,
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Rectangle(
- lineColor={128,128,128},
- extent={{-100.0,-100.0},{100.0,100.0}},
- radius=25.0),
- Polygon(
- origin={8.0,14.0},
- lineColor={78,138,73},
- fillColor={78,138,73},
- pattern=LinePattern.None,
- fillPattern=FillPattern.Solid,
- points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}),
- experiment(StopTime=12),
- Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
-end TestVolumeI;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
index f1d67d76..e69de29b 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
@@ -1,86 +0,0 @@
-TestAirHumidity
-TestBend
-TestBoilerSystem
-TestCentrifugalPump1
-TestCheckValve
-TestCHPEngineBarkantineSystem
-TestCombustionTurbine
-TestCompressor
-TestDiaphragm
-TestDiffusion_DynamicOnePhaseFlowPipe
-TestDiffusion_DynamicPlateHeatExchanger
-TestDiffusion_DynamicTwoPhaseFlowPipe
-TestDiffusion_VolumeA
-TestDynamicCheckValve
-TestDynamicCondenser
-TestDynamicDrum
-TestDynamicDrum_CC
-TestDynamicFlueGasesMultiFluidHeatExchanger
-TestDynamicMultiFluidHeatExchanger
-TestDynamicMultiFluidHeatExchangerShell
-TestDynamicOnePhaseFlowPipe
-TestDynamicOnePhaseFlowShell
-TestDynamicPlateHeatExchanger
-TestDynamicReliefValve
-TestDynamicTwoPhaseFlowPipe
-TestDynamicTwoPhaseFlowRiser
-TestDynamicWaterHeating
-TestDynamicWaterHeatingOnePipe
-TestDynamicWaterSteamMultiFluidHeatExchanger
-TestFixedPowerHeatExchanger
-TestFossilFuelBoiler
-TestFresnelField
-TestGasTurbine
-TestGenericCombustion
-TestGenericCombustion1D
-TestGridFurnace
-TestGTCombustionChamber
-TestHeatPumpCompressor
-TestIdealCheckValve
-TestIdealSwitchValve
-TestInternalCombustionEngine
-TestInvSingularPressureLoss
-TestJunctions1
-TestJunctions2
-TestJunctions3
-TestJunctions4
-TestLoopBreaker
-TestMassFlowMultiplier
-TestNTUWaterHeater0
-TestPostCombustionGas
-TestPressurizer
-TestRefP
-TestRefP1
-TestSensors
-TestSimpleDynamicCondenser
-TestSimpleDynamicCondenser1
-TestSimpleEvaporatorWaterSteamFlueGases
-TestSimpleStaticCondenser
-TestSingularPressureLoss
-TestStaticAerocondenser
-TestStaticCentrifugalPump1
-TestStaticCondenser
-TestStaticCondenserHEI
-TestStaticDrum1
-TestStaticDrum2
-TestStaticExchangerDTorWorEff
-TestStaticExchangerKS
-TestStaticFan
-TestStaticPlateHeatExchanger
-TestStaticWallFlueGasesExchanger
-TestSteamDryer1
-TestSteamDryer2
-TestSteamEngine
-TestSteamExtractionSplitter
-TestStodolaTurbine1
-TestStodolaTurbine2
-TestSwitchValve
-TestTank
-TestTankHorizontal
-TestThreeWayValve
-TestTwoPhaseCavity
-TestTwoPhaseCavityOnePipe
-TestTwoPhaseVolume
-TestVolumeA
-TestVolumeA1
-TestVolumeI
diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
index 0b4a67c1..f88c9d63 100644
--- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
+++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
@@ -1,5 +1,8 @@
within ThermoSysPro.Fluid.Interfaces.Connectors;
connector FluidInlet "Fluid inlet connector"
+ replaceable package Medium =
+ ThermoSysPro.Properties.Media.WaterSteam constrainedby Modelica.Media.Interfaces.PartialMedium
+ "Medium model" annotation (choicesAllMatching=true, Dialog(group="Medium"));
Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume";
Units.SI.MassFlowRate Q(start=500)
"Mass flow rate of the fluid crossing the boundary of the control volume";
@@ -9,16 +12,10 @@ connector FluidInlet "Fluid inlet connector"
"Fluid specific enthalpy in the control volume 1";
Units.SI.SpecificEnthalpy h_vol_2(start=1.e5)
"Fluid specific enthalpy in the control volume 2";
- input ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType ftype
- "Fluid type";
- ThermoSysPro.Units.SI.MassFraction Xco2(start=0.01)
- "CO2 mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xh2o
- "H2O mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xo2(start=0.2)
- "O2 mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xso2(start=0)
- "SO2 mass fraction of the fluid crossing the boundary of the control volume";
+ Medium.ExtraProperty SubC[Medium.nC]
+ "Properties c_i/m of the fluid crossing the boundary of the control volume";
+ Medium.MassFraction Xi[Medium.nXi]
+ "Independent mixture mass fractions m_i/m of the fluid crossing the boundary of the control volume";
input Real diff_res_1(start=1e4)
"Diffusion resistance from control volume 1";
output Real diff_res_2(start=1e4)
diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
index 3579500b..52c98b76 100644
--- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
+++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
@@ -1,5 +1,8 @@
within ThermoSysPro.Fluid.Interfaces.Connectors;
connector FluidOutlet "Fluid outlet connector"
+ replaceable package Medium =
+ ThermoSysPro.Properties.Media.WaterSteam constrainedby Modelica.Media.Interfaces.PartialMedium
+ "Medium model" annotation (choicesAllMatching=true, Dialog(group="Medium"));
Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume";
Units.SI.MassFlowRate Q(start=500)
"Mass flow rate of the fluid crossing the boundary of the control volume";
@@ -9,16 +12,10 @@ connector FluidOutlet "Fluid outlet connector"
"Fluid specific enthalpy in the control volume 1";
Units.SI.SpecificEnthalpy h_vol_2(start=1.e5)
"Fluid specific enthalpy in the control volume 2";
- output ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType ftype
- "Fluid type";
- ThermoSysPro.Units.SI.MassFraction Xco2(start=0.01)
- "CO2 mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xh2o
- "H2O mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xo2(start=0.2)
- "O2 mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xso2(start=0)
- "SO2 mass fraction of the fluid crossing the boundary of the control volume";
+ Medium.ExtraProperty SubC[Medium.nC]
+ "Properties c_i/m of the fluid crossing the boundary of the control volume";
+ Medium.MassFraction Xi[Medium.nXi]
+ "Independent mixture mass fractions m_i/m of the fluid crossing the boundary of the control volume";
output Real diff_res_1(start=1e4)
"Diffusion resistance from control volume 1";
input Real diff_res_2(start=1e4)
diff --git a/ThermoSysPro/Properties/DryAirIdealGas/DryAirIdealGas.mo b/ThermoSysPro/Properties/DryAirIdealGas/DryAirIdealGas.mo
index b9a2d5d5..df6d9698 100644
--- a/ThermoSysPro/Properties/DryAirIdealGas/DryAirIdealGas.mo
+++ b/ThermoSysPro/Properties/DryAirIdealGas/DryAirIdealGas.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.DryAirIdealGas;
+within ThermoSysPro.Properties.DryAirIdealGas;
record DryAirIdealGas "Data for Dry Air Ideal Gas from STEPHANIE Library"
// STEPHANIE Dry Air Ideal Gas
// "Air Data Package - valid temperature ranges 200K - 1000K and 1000K - 6000K. Source: NASA/TP-2002-211556 Coefficients for Calculating Thermodynamic Properties"
diff --git a/ThermoSysPro/Properties/FlueGases/FlueGases_h.mo b/ThermoSysPro/Properties/FlueGases/FlueGases_h.mo
index ab362f41..fe208445 100644
--- a/ThermoSysPro/Properties/FlueGases/FlueGases_h.mo
+++ b/ThermoSysPro/Properties/FlueGases/FlueGases_h.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.FlueGases;
+within ThermoSysPro.Properties.FlueGases;
function FlueGases_h "Specific enthalpy"
input Units.SI.AbsolutePressure PMF "Flue gases average pressure";
input Units.SI.Temperature TMF "Flue gases average temperature";
diff --git a/ThermoSysPro/Properties/FlueGases/FlueGases_h_Ps.mo b/ThermoSysPro/Properties/FlueGases/FlueGases_h_Ps.mo
index 83a4f173..848f5202 100644
--- a/ThermoSysPro/Properties/FlueGases/FlueGases_h_Ps.mo
+++ b/ThermoSysPro/Properties/FlueGases/FlueGases_h_Ps.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.FlueGases;
+within ThermoSysPro.Properties.FlueGases;
function FlueGases_h_Ps "Specific enthalpy"
//extends ThermoSysPro.Properties.FlueGases.unSafeForJacobian;
diff --git a/ThermoSysPro/Properties/FlueGases/FlueGases_s.mo b/ThermoSysPro/Properties/FlueGases/FlueGases_s.mo
index aa770442..a41aee8f 100644
--- a/ThermoSysPro/Properties/FlueGases/FlueGases_s.mo
+++ b/ThermoSysPro/Properties/FlueGases/FlueGases_s.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.FlueGases;
+within ThermoSysPro.Properties.FlueGases;
function FlueGases_s "Specific entropy"
input Units.SI.AbsolutePressure PMF "Flue gases average pressure";
input Units.SI.Temperature TMF "Flue gases average temperature";
diff --git a/ThermoSysPro/Properties/FlueGases/XSat.mo b/ThermoSysPro/Properties/FlueGases/XSat.mo
index 246d2fa0..21b62c16 100644
--- a/ThermoSysPro/Properties/FlueGases/XSat.mo
+++ b/ThermoSysPro/Properties/FlueGases/XSat.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.FlueGases;
+within ThermoSysPro.Properties.FlueGases;
function XSat
//---------------------------------------------------------------------------
// Fonction de l'humidité absolue a saturation xs(T)
diff --git a/ThermoSysPro/Properties/Fluid/Density_Ph.mo b/ThermoSysPro/Properties/Fluid/Density_Ph.mo
index b2b77157..2a12405d 100644
--- a/ThermoSysPro/Properties/Fluid/Density_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/Density_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function Density_Ph "Density computation for all fluids (inputs: P, h, fluid)"
input Units.SI.AbsolutePressure P "Pressure (Pa)";
diff --git a/ThermoSysPro/Properties/Fluid/Density_derh_Ph.mo b/ThermoSysPro/Properties/Fluid/Density_derh_Ph.mo
index 11771944..4a316c65 100644
--- a/ThermoSysPro/Properties/Fluid/Density_derh_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/Density_derh_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function Density_derh_Ph
"Density derivative w.r.t enthalpy computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/Density_derp_Ph.mo b/ThermoSysPro/Properties/Fluid/Density_derp_Ph.mo
index b19bb8ca..c2d198ff 100644
--- a/ThermoSysPro/Properties/Fluid/Density_derp_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/Density_derp_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function Density_derp_Ph
"Density derivative w.r.t pressure computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/DynamicViscosity_Ph.mo b/ThermoSysPro/Properties/Fluid/DynamicViscosity_Ph.mo
index a4ef447c..c2184494 100644
--- a/ThermoSysPro/Properties/Fluid/DynamicViscosity_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/DynamicViscosity_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function DynamicViscosity_Ph
"Dynamic Viscosity computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/Prandtl_Ph.mo b/ThermoSysPro/Properties/Fluid/Prandtl_Ph.mo
index d43990ff..7126474f 100644
--- a/ThermoSysPro/Properties/Fluid/Prandtl_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/Prandtl_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function Prandtl_Ph
"Prandtl number computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/Reynolds_PhvD.mo b/ThermoSysPro/Properties/Fluid/Reynolds_PhvD.mo
index 28b8bb19..767f4126 100644
--- a/ThermoSysPro/Properties/Fluid/Reynolds_PhvD.mo
+++ b/ThermoSysPro/Properties/Fluid/Reynolds_PhvD.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function Reynolds_PhvD
"Reynolds number computation for all fluids (inputs: P, h, fluid, v, D)"
diff --git a/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_PT.mo b/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_PT.mo
index c7b8766a..62998709 100644
--- a/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_PT.mo
+++ b/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_PT.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function SpecificHeatCapacityCp_PT
"Specific Heat Capacity at constant P computation for all fluids (inputs: P, T, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_Ph.mo b/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_Ph.mo
index 456a9cfa..ff6dbf2f 100644
--- a/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/SpecificHeatCapacityCp_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function SpecificHeatCapacityCp_Ph
"Specific Heat Capacity at constant P computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/SpecificInternalEnergy_Ph_DO_NOT_USE.mo b/ThermoSysPro/Properties/Fluid/SpecificInternalEnergy_Ph_DO_NOT_USE.mo
index c75fcaf6..0c8d9f29 100644
--- a/ThermoSysPro/Properties/Fluid/SpecificInternalEnergy_Ph_DO_NOT_USE.mo
+++ b/ThermoSysPro/Properties/Fluid/SpecificInternalEnergy_Ph_DO_NOT_USE.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function SpecificInternalEnergy_Ph_DO_NOT_USE
"Specific Internal Energy computation for all fluids (inputs: P, h, fluid). DO NOT USE (does not work with use-case 'DistributedVolumePartialModel'. Use u = h - P/rho instead)"
diff --git a/ThermoSysPro/Properties/Fluid/Temperature_Ph.mo b/ThermoSysPro/Properties/Fluid/Temperature_Ph.mo
index 1eb75751..67957b28 100644
--- a/ThermoSysPro/Properties/Fluid/Temperature_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/Temperature_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function Temperature_Ph
"Temperature computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/ThermalConductivity_Ph.mo b/ThermoSysPro/Properties/Fluid/ThermalConductivity_Ph.mo
index 2eb74379..fdefea13 100644
--- a/ThermoSysPro/Properties/Fluid/ThermalConductivity_Ph.mo
+++ b/ThermoSysPro/Properties/Fluid/ThermalConductivity_Ph.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function ThermalConductivity_Ph
"Thermal Conductivity computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derDensity_derP_derh.mo b/ThermoSysPro/Properties/Fluid/derDensity_derP_derh.mo
index b81c30cc..13873391 100644
--- a/ThermoSysPro/Properties/Fluid/derDensity_derP_derh.mo
+++ b/ThermoSysPro/Properties/Fluid/derDensity_derP_derh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derDensity_derP_derh
"der(Density) computation for all fluids (inputs: P, h, der(P), der(h), fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derDensity_derh_derP_derh.mo b/ThermoSysPro/Properties/Fluid/derDensity_derh_derP_derh.mo
index 1d1bb632..c6d2a49e 100644
--- a/ThermoSysPro/Properties/Fluid/derDensity_derh_derP_derh.mo
+++ b/ThermoSysPro/Properties/Fluid/derDensity_derh_derP_derh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derDensity_derh_derP_derh
"der(Density derivative w.r.t enthalpy) computation for all fluids (inputs: P, h, der(P), der(h), fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh.mo b/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh.mo
index 03dc4510..85def033 100644
--- a/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh.mo
+++ b/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derDynamicViscosity_derP_derh
"Dynamic Viscosity computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh_old.mo b/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh_old.mo
index 8fb979e2..6ef1228d 100644
--- a/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh_old.mo
+++ b/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derP_derh_old.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derDynamicViscosity_derP_derh_old
"Dynamic Viscosity computation for all fluids (inputs: P, h, fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derT_derrho.mo b/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derT_derrho.mo
index fc3d1e1f..8e767e34 100644
--- a/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derT_derrho.mo
+++ b/ThermoSysPro/Properties/Fluid/derDynamicViscosity_derT_derrho.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derDynamicViscosity_derT_derrho
"Dynamic Viscosity computation for all fluids"
diff --git a/ThermoSysPro/Properties/Fluid/derSpecificEnthalpy_derP_derT.mo b/ThermoSysPro/Properties/Fluid/derSpecificEnthalpy_derP_derT.mo
index e04c7924..f0fbb8af 100644
--- a/ThermoSysPro/Properties/Fluid/derSpecificEnthalpy_derP_derT.mo
+++ b/ThermoSysPro/Properties/Fluid/derSpecificEnthalpy_derP_derT.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derSpecificEnthalpy_derP_derT
"der(Specific enthalpy) computation for all fluids (inputs: P, h, der(P), der(T), fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derTemperature_derP_derh.mo b/ThermoSysPro/Properties/Fluid/derTemperature_derP_derh.mo
index 03c1dfad..5b19641a 100644
--- a/ThermoSysPro/Properties/Fluid/derTemperature_derP_derh.mo
+++ b/ThermoSysPro/Properties/Fluid/derTemperature_derP_derh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derTemperature_derP_derh
"der(Temperature) computation for all fluids (inputs: P, h, fluid, der(P), der(h))"
diff --git a/ThermoSysPro/Properties/Fluid/derderDensity_derderP_derderh.mo b/ThermoSysPro/Properties/Fluid/derderDensity_derderP_derderh.mo
index 5182f596..f37df39e 100644
--- a/ThermoSysPro/Properties/Fluid/derderDensity_derderP_derderh.mo
+++ b/ThermoSysPro/Properties/Fluid/derderDensity_derderP_derderh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derderDensity_derderP_derderh
"der(der(Density)) computation for all fluids (inputs: P, h, der(P), der(h), der(der(P)), der(der(h)), fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derderDensity_derh_derderP_derderh.mo b/ThermoSysPro/Properties/Fluid/derderDensity_derh_derderP_derderh.mo
index 17554e9b..53e0a91a 100644
--- a/ThermoSysPro/Properties/Fluid/derderDensity_derh_derderP_derderh.mo
+++ b/ThermoSysPro/Properties/Fluid/derderDensity_derh_derderP_derderh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derderDensity_derh_derderP_derderh
"der(der(Density derivative w.r.t enthalpy)) computation for all fluids (inputs: P, h, der(P), der(h), der(der(P)), der(der(h)), fluid)"
diff --git a/ThermoSysPro/Properties/Fluid/derderTemperature_derderP_derderh.mo b/ThermoSysPro/Properties/Fluid/derderTemperature_derderP_derderh.mo
index 278bf515..efdabaca 100644
--- a/ThermoSysPro/Properties/Fluid/derderTemperature_derderP_derderh.mo
+++ b/ThermoSysPro/Properties/Fluid/derderTemperature_derderP_derderh.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Fluid;
+within ThermoSysPro.Properties.Fluid;
function derderTemperature_derderP_derderh
"der(der(Temperature)) computation for all fluids (inputs: P, h, der(P), der(h), der(der(P)), der(der(h)), fluid)"
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/C_BiPhase.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/C_BiPhase.mo
new file mode 100644
index 00000000..e117fa5c
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/C_BiPhase.mo
@@ -0,0 +1,6 @@
+within ThermoSysPro.Properties.Media.PartialSubCMedium;
+record C_BiPhase
+ Real Cl[nSubC];
+ Real Cg[nSubC];
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end C_BiPhase;
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/HomogeneousPhasesSeparation.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/HomogeneousPhasesSeparation.mo
new file mode 100644
index 00000000..7aebdec9
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/HomogeneousPhasesSeparation.mo
@@ -0,0 +1,18 @@
+within ThermoSysPro.Properties.Media.PartialSubCMedium;
+function HomogeneousPhasesSeparation
+ extends partialPhasesSeparation;
+// input Real x(min=0, max=1) "Title";
+
+algorithm
+ // HomogeneousSubstance
+ C_record.Cl := SubC;
+ C_record.Cg := SubC;
+
+// // Non-volatile
+// C_record.Cl := SubC / (1-x);
+// C_record.Cg := fill(0,size(SubC,1));
+
+// // Fully-volatile
+// C_record.Cl := fill(0,size(SubC,1));
+// C_record.Cg := SubC / x;
+end HomogeneousPhasesSeparation;
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/noSaS.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/noSaS.mo
new file mode 100644
index 00000000..e00d5bc8
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/noSaS.mo
@@ -0,0 +1,6 @@
+within ThermoSysPro.Properties.Media.PartialSubCMedium;
+function noSaS
+ extends partialSaS;
+algorithm
+ C := fill(0,nSubC);
+end noSaS;
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo
new file mode 100644
index 00000000..133f5bc5
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo
@@ -0,0 +1,5 @@
+within ThermoSysPro.Properties.Media;
+partial package PartialSubCMedium
+ constant Integer nSubC;
+
+end PartialSubCMedium;
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order
new file mode 100644
index 00000000..d5bff50f
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order
@@ -0,0 +1,6 @@
+nSubC
+partialPhasesSeparation
+HomogeneousPhasesSeparation
+C_BiPhase
+partialSaS
+noSaS
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/partialPhasesSeparation.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/partialPhasesSeparation.mo
new file mode 100644
index 00000000..4f208f63
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/partialPhasesSeparation.mo
@@ -0,0 +1,64 @@
+within ThermoSysPro.Properties.Media.PartialSubCMedium;
+partial function partialPhasesSeparation
+ input Real SubC[:] "Total Species Concentrations";
+ output C_BiPhase C_record;
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
+ Ellipse(
+ extent={{-60,60},{60,-60}},
+ lineColor={0,0,255},
+ fillColor={28,108,200},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{60,0},{58,14},{54,26},{48,36},{38,46},{26,54},{14,58},{0,60},
+ {0,0},{60,0}},
+ fillColor={170,255,255},
+ fillPattern=FillPattern.Solid,
+ pattern=LinePattern.None),
+ Polygon(
+ points={{-60,0},{-58,14},{-54,26},{-48,36},{-38,46},{-26,54},{-14,58},
+ {0,60},{0,0},{-60,0}},
+ fillColor={170,255,255},
+ fillPattern=FillPattern.Solid,
+ pattern=LinePattern.None),
+ Ellipse(
+ extent={{-42,28},{-26,12}},
+ lineColor={28,108,200},
+ fillColor={28,108,200},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{-18,48},{-6,36}},
+ lineColor={28,108,200},
+ fillColor={28,108,200},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{-4,24},{16,4}},
+ lineColor={28,108,200},
+ fillColor={28,108,200},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{26,34},{42,18}},
+ lineColor={28,108,200},
+ fillColor={28,108,200},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{24,-12},{40,-28}},
+ lineColor={28,108,200},
+ fillColor={85,255,255},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{-40,-22},{-24,-38}},
+ lineColor={28,108,200},
+ fillColor={85,255,255},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{10,-36},{22,-48}},
+ lineColor={28,108,200},
+ fillColor={85,255,255},
+ fillPattern=FillPattern.Solid),
+ Ellipse(
+ extent={{-20,-4},{2,-26}},
+ lineColor={28,108,200},
+ fillColor={85,255,255},
+ fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem(
+ preserveAspectRatio=false)));
+end partialPhasesSeparation;
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/partialSaS.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/partialSaS.mo
new file mode 100644
index 00000000..69547374
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/partialSaS.mo
@@ -0,0 +1,5 @@
+within ThermoSysPro.Properties.Media.PartialSubCMedium;
+partial function partialSaS
+ input Real SubC[:] "Total Species Concentrations";
+ output Real C[size(SubC,1)];
+end partialSaS;
diff --git a/ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.mo b/ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.mo
new file mode 100644
index 00000000..5f292163
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.mo
@@ -0,0 +1,5 @@
+within ThermoSysPro.Properties.Media;
+partial package PartialThermoSysProMedium
+ extends Modelica.Media.Interfaces.PartialMedium;
+ extends PartialSubCMedium(nSubC=nC);
+end PartialThermoSysProMedium;
diff --git a/ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.order b/ThermoSysPro/Properties/Media/PartialThermoSysProMedium/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.mo b/ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.mo
new file mode 100644
index 00000000..eb2a9267
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.mo
@@ -0,0 +1,5 @@
+within ThermoSysPro.Properties.Media;
+partial package PartialTwoPhaseThermoSysProMedium
+ extends Modelica.Media.Interfaces.PartialTwoPhaseMedium;
+ extends PartialSubCMedium(nSubC=nC);
+end PartialTwoPhaseThermoSysProMedium;
diff --git a/ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.order b/ThermoSysPro/Properties/Media/PartialTwoPhaseThermoSysProMedium/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Properties/Media/WaterSteam/package.mo b/ThermoSysPro/Properties/Media/WaterSteam/package.mo
new file mode 100644
index 00000000..b47b1c4c
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/WaterSteam/package.mo
@@ -0,0 +1,730 @@
+within ThermoSysPro.Properties.Media;
+package WaterSteam "1 - Water/steam properties library (IAPWS-IF97)"
+
+ extends PartialTwoPhaseThermoSysProMedium(
+ mediumName="WaterIF97",
+ substanceNames={"water"},
+ singleState=false,
+ SpecificEnthalpy(start=1.0e5, nominal=5.0e5),
+ Density(start=150, nominal=500),
+ AbsolutePressure(
+ start=50e5,
+ nominal=10e5,
+ min=611.657,
+ max=100e6),
+ Temperature(
+ start=500,
+ nominal=500,
+ min=273.15,
+ max=2273.15),
+ smoothModel=false,
+ onePhase=false,
+ fluidConstants=Modelica.Media.Water.waterConstants,
+ ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.ph);
+
+ redeclare record extends SaturationProperties
+ end SaturationProperties;
+
+ redeclare record extends ThermodynamicState "Thermodynamic state"
+ SpecificEnthalpy h "Specific enthalpy";
+ Density d "Density";
+ Temperature T "Temperature";
+ AbsolutePressure p "Pressure";
+ end ThermodynamicState;
+ constant Integer Region = 0 "IF97 region. 0:automatic";
+
+ redeclare replaceable model extends BaseProperties(
+ h(stateSelect= StateSelect.prefer),
+ d(stateSelect= StateSelect.default),
+ T(stateSelect= StateSelect.default),
+ p(stateSelect= StateSelect.prefer))
+ "Base properties of waterBase properties (p, d, T, h, u, R_s, MM and, if applicable, X and Xi) of a medium"
+ Integer phase(
+ min=0,
+ max=2,
+ start=1,
+ fixed=false) "2 for two-phase, 1 for one-phase, 0 if not known";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+ equation
+ pro = ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(p, h, Region);
+ MM = fluidConstants[1].molarMass;
+ R_s = Modelica.Constants.R/fluidConstants[1].molarMass;
+
+ phase = if ((h < ThermoSysPro.Properties.WaterSteam.BaseIF97.Regions.hl_p(p))
+ or (h > ThermoSysPro.Properties.WaterSteam.BaseIF97.Regions.hv_p(p))
+ or (p >ThermoSysPro.Properties.WaterSteam.BaseIF97.data.PCRIT)) then 1 else 2;
+
+ sat = setSat_p(state.p);
+ state = setState_ph(p, h, phase);
+
+ d=pro.d;
+ T=pro.T;
+ u = pro.u;
+ end BaseProperties;
+
+ redeclare function density_ph
+ "Computes density as a function of pressure and specific enthalpy"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEnthalpy h "Specific enthalpy";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output Density d "Density";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ p,
+ h,
+ region);
+ d := pro.d;
+ annotation (Inline=true);
+ end density_ph;
+
+ redeclare function temperature_ph
+ "Computes temperature as a function of pressure and specific enthalpy"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEnthalpy h "Specific enthalpy";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output Temperature T "Temperature";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ p,
+ h,
+ region);
+ T := pro.T;
+ annotation (Inline=true);
+ end temperature_ph;
+
+ redeclare function extends setState_phX
+ "Return thermodynamic state of water as function of p, h, and optional region"
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ algorithm
+ state := ThermodynamicState(
+ d=density_ph(
+ p,
+ h,
+ region=Region),
+ T=temperature_ph(
+ p,
+ h,
+ region=Region),
+ phase=if region == 0 then 0 else if region==4 then 2 else 1,
+ h=h,
+ p=p);
+ annotation (Inline=true);
+ end setState_phX;
+
+ redeclare function temperature_ps
+ "Compute temperature from pressure and specific enthalpy"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEntropy s "Specific entropy";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output Temperature T "Temperature";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps pro;
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ps(
+ p,
+ s,
+ region);
+ T := pro.T;
+ annotation (Inline=true);
+ end temperature_ps;
+
+ redeclare function density_ps
+ "Computes density as a function of pressure and specific enthalpy"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEntropy s "Specific entropy";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output Density d "Density";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps pro;
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ps(
+ p,
+ s,
+ region);
+ d := pro.d;
+ annotation (Inline=true);
+ end density_ps;
+
+ redeclare function specificEnthalpy_pT
+ "Computes specific enthalpy as a function of pressure and temperature"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input Temperature T "Temperature";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output SpecificEnthalpy h "Specific enthalpy";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_pT
+ pro;
+ algorithm
+
+ pro := ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_PT(p, T, region);
+ h := pro.h;
+ annotation (Inline=true);
+ end specificEnthalpy_pT;
+
+ redeclare function specificEnthalpy_ps
+ "Computes specific enthalpy as a function of pressure and temperature"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input SpecificEntropy s "Specific entropy";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output SpecificEnthalpy h "Specific enthalpy";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps pro;
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ps(
+ p,
+ s,
+ region);
+ h := pro.h;
+ annotation (Inline=true);
+ end specificEnthalpy_ps;
+
+ redeclare function density_pT
+ "Computes density as a function of pressure and temperature"
+ extends Modelica.Icons.Function;
+ input AbsolutePressure p "Pressure";
+ input Temperature T "Temperature";
+ input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ output Density d "Density";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_pT
+ pro;
+ algorithm
+
+ pro := ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_PT(p, T, region);
+ d := pro.d;
+
+ annotation (Inline=true);
+ end density_pT;
+
+ redeclare function extends dewEnthalpy "Dew curve specific enthalpy of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat;
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat;
+
+ algorithm
+ (lsat,vsat):=ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_sat_P(sat.psat);
+ hv := vsat.h;
+ annotation (Inline=true);
+ end dewEnthalpy;
+
+ redeclare function extends dewDensity "Dew curve specific density of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat;
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat;
+ algorithm
+ (lsat,vsat):=ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_sat_P(sat.psat);
+ dv := vsat.rho;
+ annotation (Inline=true);
+ end dewDensity;
+
+ redeclare function extends setDewState
+ "Set the thermodynamic state on the dew line"
+ algorithm
+ state := ThermodynamicState(
+ phase=phase,
+ p=sat.psat,
+ T=sat.Tsat,
+ h=dewEnthalpy(sat),
+ d=dewDensity(sat));
+
+ annotation (Inline=true);
+ end setDewState;
+
+ redeclare function extends bubbleEnthalpy
+ "Boiling curve specific enthalpy of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat;
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat;
+
+ algorithm
+ (lsat,vsat):=ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_sat_P(sat.psat);
+ hl := lsat.h;
+ annotation (Inline=true);
+ end bubbleEnthalpy;
+
+ redeclare function extends bubbleDensity
+ "Boiling curve specific density of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat;
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat;
+
+ algorithm
+ (lsat,vsat):=ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_sat_P(sat.psat);
+ dl := lsat.rho;
+ annotation (Inline=true);
+ end bubbleDensity;
+
+ redeclare function extends setBubbleState
+ "Set the thermodynamic state on the bubble line"
+ algorithm
+ state := ThermodynamicState(
+ phase=phase,
+ p=sat.psat,
+ T=sat.Tsat,
+ h=bubbleEnthalpy(sat),
+ d=bubbleDensity(sat));
+ annotation (Inline=true);
+ end setBubbleState;
+
+ redeclare function extends dynamicViscosity "Dynamic viscosity of water"
+ algorithm
+
+ // Water/Steam /// FONCTIONNE EN DIPHASIQUE ???
+ // if fluid==1 then
+ eta := ThermoSysPro.Properties.WaterSteam.IF97.DynamicViscosity_rhoT(rho=state.d,T=state.T);
+ annotation (Inline=true);
+ end dynamicViscosity;
+
+ redeclare function extends thermalConductivity
+ "Thermal conductivity of water"
+ input Integer region=Region;
+ algorithm
+ lambda := ThermoSysPro.Properties.WaterSteam.IF97.ThermalConductivity_rhoT(rho=state.d,T=state.T,P=state.p,region=region);
+
+ annotation (Inline=true);
+ end thermalConductivity;
+
+ redeclare function extends surfaceTension
+ "Surface tension in two phase region of water"
+ algorithm
+ sigma := ThermoSysPro.Properties.WaterSteam.IF97.SurfaceTension_T(sat.Tsat);
+ annotation (Inline=true);
+ end surfaceTension;
+
+ redeclare function extends pressure "Return pressure of ideal gas"
+ algorithm
+ p := state.p;
+ annotation (Inline=true);
+ end pressure;
+
+ redeclare function extends temperature "Return temperature of ideal gas"
+ algorithm
+ T := state.T;
+ annotation (Inline=true);
+ end temperature;
+
+ redeclare function extends density "Return density of ideal gas"
+ algorithm
+ d := state.d;
+ annotation (Inline=true);
+ end density;
+
+ redeclare function extends specificEnthalpy "Return specific enthalpy"
+ extends Modelica.Icons.Function;
+ algorithm
+ h := state.h;
+ annotation (Inline=true);
+ end specificEnthalpy;
+
+ redeclare function extends specificInternalEnergy
+ "Return specific internal energy"
+ extends Modelica.Icons.Function;
+ algorithm
+ u := state.h - state.p/state.d;
+ annotation (Inline=true);
+ end specificInternalEnergy;
+
+ redeclare function extends specificEntropy "Specific entropy of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ state.p,
+ state.h,
+ Region);
+ s := pro.s;
+
+ annotation (Inline=true);
+ end specificEntropy;
+
+ redeclare function extends specificGibbsEnergy "Return specific Gibbs energy"
+ extends Modelica.Icons.Function;
+ algorithm
+ g := state.h - state.T*specificEntropy(state);
+ annotation (Inline=true);
+ end specificGibbsEnergy;
+
+ redeclare function extends specificHelmholtzEnergy
+ "Return specific Helmholtz energy"
+ extends Modelica.Icons.Function;
+ algorithm
+ f := state.h - state.p/state.d - state.T*specificEntropy(state);
+ annotation (Inline=true);
+ end specificHelmholtzEnergy;
+
+ redeclare function extends specificHeatCapacityCp
+ "Specific heat capacity at constant pressure of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ state.p,
+ state.h,
+ Region);
+ cp := pro.cp;
+ annotation (Inline=true);
+ end specificHeatCapacityCp;
+
+ redeclare function extends specificHeatCapacityCv
+ "Specific heat capacity at constant volume of water"
+ algorithm
+ cv := Modelica.Media.Water.IF97_Utilities.cv_ph(
+ state.p,
+ state.h,
+ state.phase,
+ Region);
+ annotation (Inline=true);
+ end specificHeatCapacityCv;
+
+ redeclare function extends velocityOfSound
+ "Return velocity of sound as a function of the thermodynamic state record"
+ algorithm
+ a := ThermoSysPro.Properties.WaterSteam.IF97_Utilities.AnalyticDerivatives.velocityOfSound_pT(state.p,state.T,Region);
+ annotation (Inline=true);
+ end velocityOfSound;
+
+ redeclare function extends isentropicEnthalpy "Compute h(s,p)"
+ algorithm
+ // h_is := Modelica.Media.Water.IF97_Utilities.isentropicEnthalpy(p_downstream, specificEntropy(refState), 0);
+ h_is := ThermoSysPro.Properties.WaterSteam.IF97_Utilities.AnalyticDerivatives.dynamicIsentropicEnthalpy(p_downstream, specificEntropy(refState), refState.d, refState.T, refState.phase);
+ annotation (Inline=true);
+ end isentropicEnthalpy;
+
+ redeclare function extends density_derh_p
+ "Density derivative by specific enthalpy"
+
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+ algorithm
+ pro := ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ state.p,
+ state.h,
+ Region);
+ ddhp:=pro.ddhp;
+ annotation (Inline=true);
+ end density_derh_p;
+
+ redeclare function extends density_derp_h "Density derivative by pressure"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+ algorithm
+ pro := ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ state.p,
+ state.h,
+ Region);
+ ddph:=pro.ddph;
+ annotation (Inline=true);
+ end density_derp_h;
+ // redeclare function extends density_derT_p
+ // "Density derivative by temperature"
+ // algorithm
+ // ddTp := IF97_Utilities.ddTp(state.p, state.h, state.phase);
+ // end density_derT_p;
+ //
+ // redeclare function extends density_derp_T
+ // "Density derivative by pressure"
+ // algorithm
+ // ddpT := IF97_Utilities.ddpT(state.p, state.h, state.phase);
+ // end density_derp_T;
+
+ redeclare function extends bubbleEntropy
+ "Boiling curve specific entropy of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat;
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat;
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+
+ algorithm
+ (lsat,vsat):=ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_sat_P(sat.psat);
+ pro := ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ sat.psat,
+ lsat.h,
+ Region);
+ sl:=pro.s;
+ annotation (Inline=true);
+ end bubbleEntropy;
+
+ redeclare function extends dewEntropy "Dew curve specific entropy of water"
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat;
+ ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat;
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro;
+
+ algorithm
+ (lsat,vsat):=ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_sat_P(sat.psat);
+ pro := ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(
+ sat.psat,
+ vsat.h,
+ Region);
+ sv := pro.s;
+ annotation (Inline=true);
+ end dewEntropy;
+
+ redeclare function extends saturationTemperature
+ "Saturation temperature of water"
+ algorithm
+ T := ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.tsat(p);
+ annotation (Inline=true);
+ end saturationTemperature;
+
+ redeclare function extends saturationTemperature_derp
+ "Derivative of saturation temperature w.r.t. pressure"
+ algorithm
+ dTp := ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.dtsatofp(p);
+ annotation (Inline=true);
+ end saturationTemperature_derp;
+
+ redeclare function extends saturationPressure "Saturation pressure of water"
+ algorithm
+ p := ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.psat(T);
+ annotation (Inline=true);
+ end saturationPressure;
+
+ redeclare function extends dBubbleDensity_dPressure
+ "Bubble point density derivative"
+ // algorithm
+ // ddldp := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhol_dp(sat.psat);
+ annotation (Inline=true);
+ end dBubbleDensity_dPressure;
+
+ redeclare function extends dDewDensity_dPressure
+ "Dew point density derivative"
+ // algorithm
+ // ddvdp := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhov_dp(sat.psat);
+ annotation (Inline=true);
+ end dDewDensity_dPressure;
+
+ redeclare function extends dBubbleEnthalpy_dPressure
+ "Bubble point specific enthalpy derivative"
+ // algorithm
+ // dhldp := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhl_dp(sat.psat);
+ annotation (Inline=true);
+ end dBubbleEnthalpy_dPressure;
+
+ redeclare function extends dDewEnthalpy_dPressure
+ "Dew point specific enthalpy derivative"
+ // algorithm
+ // dhvdp := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhv_dp(sat.psat);
+ annotation (Inline=true);
+ end dDewEnthalpy_dPressure;
+
+ redeclare function extends setState_psX
+ "Return thermodynamic state of water as function of p, s, and optional region"
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps pro;
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_Ps(
+ p,
+ s,
+ region);
+ state := ThermodynamicState(
+ d=pro.d,
+ T=pro.T,
+ phase=if region == 0 then 0 else if region==4 then 2 else 1,
+ h=pro.h,
+ p=p);
+ annotation (Inline=true);
+ end setState_psX;
+
+ redeclare function extends setState_pTX
+ "Return thermodynamic state of water as function of p, T, and optional region"
+ input Integer region=Region
+ "If 0, region is unknown, otherwise known and this input";
+ protected
+ ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_pT pro;
+ algorithm
+ pro :=ThermoSysPro.Properties.WaterSteam.IF97.Water_PT(
+ p,
+ T,
+ region);
+ state := ThermodynamicState(
+ d=pro.d,
+ T=T,
+ phase=1,
+ h=pro.h,
+ p=p);
+ annotation (Inline=true);
+ end setState_pTX;
+
+ redeclare function extends setSmoothState
+ "Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b"
+ import Modelica.Media.Common.smoothStep;
+ algorithm
+ state := ThermodynamicState(
+ p=smoothStep(
+ x,
+ state_a.p,
+ state_b.p,
+ x_small),
+ h=smoothStep(
+ x,
+ state_a.h,
+ state_b.h,
+ x_small),
+ d=density_ph(smoothStep(
+ x,
+ state_a.p,
+ state_b.p,
+ x_small), smoothStep(
+ x,
+ state_a.h,
+ state_b.h,
+ x_small)),
+ T=temperature_ph(smoothStep(
+ x,
+ state_a.p,
+ state_b.p,
+ x_small), smoothStep(
+ x,
+ state_a.h,
+ state_b.h,
+ x_small)),
+ phase=0);
+ annotation (Inline=true);
+ end setSmoothState;
+
+ redeclare function extends setState_dTX
+ "Return thermodynamic state of water as function of d, T, and optional region"
+ // input Integer region=Region
+ // "If 0, region is unknown, otherwise known and this input";
+ // algorithm
+ // state := ThermodynamicState(
+ // d=d,
+ // T=T,
+ // phase=if region == 0 then 0 else if
+ // region == 4 then 2 else 1,
+ // h=specificEnthalpy_dT(
+ // d,
+ // T,
+ // region=region),
+ // p=pressure_dT(
+ // d,
+ // T,
+ // region=region));
+ // annotation (Inline=true);
+ end setState_dTX;
+
+ redeclare function extends specificEnthalpy_dT
+ "Computes specific enthalpy as a function of density and temperature"
+ // extends Modelica.Icons.Function;
+ // input Density d "Density";
+ // input Temperature T "Temperature";
+ // input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ // input Integer region=Region
+ // "If 0, region is unknown, otherwise known and this input";
+ // output SpecificEnthalpy h "Specific enthalpy";
+ // algorithm
+ // h := Modelica.Media.Water.IF97_Utilities.h_dT(
+ // d,
+ // T,
+ // phase,
+ // region);
+ // annotation (Inline=true);
+
+ end specificEnthalpy_dT;
+
+ redeclare function extends pressure_dT
+ "Computes pressure as a function of density and temperature"
+ // extends Modelica.Icons.Function;
+ // input Density d "Density";
+ // input Temperature T "Temperature";
+ // input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";
+ // input Integer region=Region
+ // "If 0, region is unknown, otherwise known and this input";
+ // output AbsolutePressure p "Pressure";
+ // algorithm
+ // p := Modelica.Media.Water.IF97_Utilities.p_dT(
+ // d,
+ // T,
+ // phase,
+ // region);
+ // annotation (Inline=true);
+
+ end pressure_dT;
+
+ redeclare function extends isentropicExponent "Return isentropic exponent"
+ // algorithm
+ // gamma := if dT_explicit then Modelica.Media.Water.IF97_Utilities.isentropicExponent_dT(
+ // state.d,
+ // state.T,
+ // state.phase,
+ // Region) else if pT_explicit then Modelica.Media.Water.IF97_Utilities.isentropicExponent_pT(
+ // state.p,
+ // state.T,
+ // Region) else Modelica.Media.Water.IF97_Utilities.isentropicExponent_ph(
+ // state.p,
+ // state.h,
+ // state.phase,
+ // Region);
+ // annotation (Inline=true);
+ end isentropicExponent;
+
+ redeclare function extends isothermalCompressibility
+ "Isothermal compressibility of water"
+ // algorithm
+ // // assert(state.phase <> 2, "Isothermal compressibility can not be computed with 2-phase inputs!");
+ // kappa := if dT_explicit then Modelica.Media.Water.IF97_Utilities.kappa_dT(
+ // state.d,
+ // state.T,
+ // state.phase,
+ // Region) else if pT_explicit then Modelica.Media.Water.IF97_Utilities.kappa_pT(
+ // state.p,
+ // state.T,
+ // Region) else Modelica.Media.Water.IF97_Utilities.kappa_ph(
+ // state.p,
+ // state.h,
+ // state.phase,
+ // Region);
+ // annotation (Inline=true);
+ end isothermalCompressibility;
+
+ redeclare function extends isobaricExpansionCoefficient
+ "Isobaric expansion coefficient of water"
+ // algorithm
+ // // assert(state.phase <> 2, "The isobaric expansion coefficient can not be computed with 2-phase inputs!");
+ // beta := if dT_explicit then Modelica.Media.Water.IF97_Utilities.beta_dT(
+ // state.d,
+ // state.T,
+ // state.phase,
+ // Region) else if pT_explicit then Modelica.Media.Water.IF97_Utilities.beta_pT(
+ // state.p,
+ // state.T,
+ // Region) else Modelica.Media.Water.IF97_Utilities.beta_ph(
+ // state.p,
+ // state.h,
+ // state.phase,
+ // Region);
+ // annotation (Inline=true);
+ end isobaricExpansionCoefficient;
+end WaterSteam;
diff --git a/ThermoSysPro/Properties/Media/WaterSteam/package.order b/ThermoSysPro/Properties/Media/WaterSteam/package.order
new file mode 100644
index 00000000..0b73fe30
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/WaterSteam/package.order
@@ -0,0 +1,53 @@
+SaturationProperties
+ThermodynamicState
+Region
+BaseProperties
+density_ph
+temperature_ph
+setState_phX
+temperature_ps
+density_ps
+specificEnthalpy_pT
+specificEnthalpy_ps
+density_pT
+dewEnthalpy
+dewDensity
+setDewState
+bubbleEnthalpy
+bubbleDensity
+setBubbleState
+dynamicViscosity
+thermalConductivity
+surfaceTension
+pressure
+temperature
+density
+specificEnthalpy
+specificInternalEnergy
+specificEntropy
+specificGibbsEnergy
+specificHelmholtzEnergy
+specificHeatCapacityCp
+specificHeatCapacityCv
+velocityOfSound
+isentropicEnthalpy
+density_derh_p
+density_derp_h
+bubbleEntropy
+dewEntropy
+saturationTemperature
+saturationTemperature_derp
+saturationPressure
+dBubbleDensity_dPressure
+dDewDensity_dPressure
+dBubbleEnthalpy_dPressure
+dDewEnthalpy_dPressure
+setState_psX
+setState_pTX
+setSmoothState
+setState_dTX
+specificEnthalpy_dT
+pressure_dT
+isentropicExponent
+isothermalCompressibility
+isobaricExpansionCoefficient
diff --git a/ThermoSysPro/Properties/Media/package.mo b/ThermoSysPro/Properties/Media/package.mo
new file mode 100644
index 00000000..921e6fe5
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/package.mo
@@ -0,0 +1,115 @@
+within ThermoSysPro.Properties;
+package Media
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Media;
diff --git a/ThermoSysPro/Properties/Media/package.order b/ThermoSysPro/Properties/Media/package.order
new file mode 100644
index 00000000..e9f32b99
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/package.order
@@ -0,0 +1,4 @@
+PartialSubCMedium
+PartialThermoSysProMedium
+PartialTwoPhaseThermoSysProMedium
+WaterSteam
diff --git a/ThermoSysPro/Properties/MoltenSalt/DynamicViscosity_T.mo b/ThermoSysPro/Properties/MoltenSalt/DynamicViscosity_T.mo
index 9ffc3a67..6d167cde 100644
--- a/ThermoSysPro/Properties/MoltenSalt/DynamicViscosity_T.mo
+++ b/ThermoSysPro/Properties/MoltenSalt/DynamicViscosity_T.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.MoltenSalt;
+within ThermoSysPro.Properties.MoltenSalt;
function DynamicViscosity_T "Dynamic Viscosity computation for Salt (input T)"
input Units.SI.Temperature T "Temperature (K)";
diff --git a/ThermoSysPro/Properties/MoltenSalt/ThermalConductivity_T.mo b/ThermoSysPro/Properties/MoltenSalt/ThermalConductivity_T.mo
index 2adc751b..278c4a3c 100644
--- a/ThermoSysPro/Properties/MoltenSalt/ThermalConductivity_T.mo
+++ b/ThermoSysPro/Properties/MoltenSalt/ThermalConductivity_T.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.MoltenSalt;
+within ThermoSysPro.Properties.MoltenSalt;
function ThermalConductivity_T
"Thermal Conductivity computation for Salt (input T)"
diff --git a/ThermoSysPro/Properties/MoltenSalt/ThermoPropertiesFunction_T_2.mo b/ThermoSysPro/Properties/MoltenSalt/ThermoPropertiesFunction_T_2.mo
index df9e3978..d35e8c21 100644
--- a/ThermoSysPro/Properties/MoltenSalt/ThermoPropertiesFunction_T_2.mo
+++ b/ThermoSysPro/Properties/MoltenSalt/ThermoPropertiesFunction_T_2.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.MoltenSalt;
+within ThermoSysPro.Properties.MoltenSalt;
function ThermoPropertiesFunction_T_2 "ThermoPropertiesFunction of Solt: KNO3-NaNO3
"
input Units.SI.Temperature T
diff --git a/ThermoSysPro/Properties/Oil_TherminolVP1/TherminolVP1_Data.mo b/ThermoSysPro/Properties/Oil_TherminolVP1/TherminolVP1_Data.mo
index e63ad72c..e49a13a4 100644
--- a/ThermoSysPro/Properties/Oil_TherminolVP1/TherminolVP1_Data.mo
+++ b/ThermoSysPro/Properties/Oil_TherminolVP1/TherminolVP1_Data.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.Oil_TherminolVP1;
+within ThermoSysPro.Properties.Oil_TherminolVP1;
record TherminolVP1_Data "Data for Oil from STEPHANIE Library"
// STEPHANIE TherminolVP1
diff --git a/ThermoSysPro/Properties/WaterSolution/MassFraction_eq_PT.mo b/ThermoSysPro/Properties/WaterSolution/MassFraction_eq_PT.mo
index 29e697e3..40ffcb0e 100644
--- a/ThermoSysPro/Properties/WaterSolution/MassFraction_eq_PT.mo
+++ b/ThermoSysPro/Properties/WaterSolution/MassFraction_eq_PT.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSolution;
+within ThermoSysPro.Properties.WaterSolution;
function MassFraction_eq_PT
"Equilibrium mass fraction of the H2O/LiBr solution as a function of T et Xh2o"
input Units.SI.AbsolutePressure P "Pressure";
diff --git a/ThermoSysPro/Properties/WaterSolution/Pressure_eq_TX.mo b/ThermoSysPro/Properties/WaterSolution/Pressure_eq_TX.mo
index 896332c2..263d7a1d 100644
--- a/ThermoSysPro/Properties/WaterSolution/Pressure_eq_TX.mo
+++ b/ThermoSysPro/Properties/WaterSolution/Pressure_eq_TX.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSolution;
+within ThermoSysPro.Properties.WaterSolution;
function Pressure_eq_TX
"Equilibrium pressure of the H2O/LiBr solution as a funciton of T and Xh2o"
input Units.SI.Temperature T "Temperature";
diff --git a/ThermoSysPro/Properties/WaterSteam/BaseIF97.mo b/ThermoSysPro/Properties/WaterSteam/BaseIF97.mo
index 7e9b0de0..da9703e4 100644
--- a/ThermoSysPro/Properties/WaterSteam/BaseIF97.mo
+++ b/ThermoSysPro/Properties/WaterSteam/BaseIF97.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSteam;
+within ThermoSysPro.Properties.WaterSteam;
package BaseIF97
"Modelica Physical Property Model: the new industrial formulation IAPWS-IF97"
diff --git a/ThermoSysPro/Properties/WaterSteam/Common.mo b/ThermoSysPro/Properties/WaterSteam/Common.mo
index 2484169b..344df89d 100644
--- a/ThermoSysPro/Properties/WaterSteam/Common.mo
+++ b/ThermoSysPro/Properties/WaterSteam/Common.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSteam;
+within ThermoSysPro.Properties.WaterSteam;
package Common
import ThermoSysPro.Units.SI;
diff --git a/ThermoSysPro/Properties/WaterSteam/IF97_packages.mo b/ThermoSysPro/Properties/WaterSteam/IF97_packages.mo
index db33afc2..8efbcf66 100644
--- a/ThermoSysPro/Properties/WaterSteam/IF97_packages.mo
+++ b/ThermoSysPro/Properties/WaterSteam/IF97_packages.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSteam;
+within ThermoSysPro.Properties.WaterSteam;
package IF97_packages
package IF97_wAJ
@@ -2975,7 +2975,7 @@ package IF97_packages
end if;
Util.Streams.print("end IF97_spline;",fileName);
status := true;
- annotation ();
+ annotation();
end dumpOneSpline;
package Modelica_Interpolation
diff --git a/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/SpecificEnthalpy_PT_der.mo b/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/SpecificEnthalpy_PT_der.mo
index 95fa3ae3..741fe13a 100644
--- a/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/SpecificEnthalpy_PT_der.mo
+++ b/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/SpecificEnthalpy_PT_der.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSteamSimple.SimpleWater;
+within ThermoSysPro.Properties.WaterSteamSimple.SimpleWater;
function SpecificEnthalpy_PT_der
input Units.SI.AbsolutePressure p "pressure";
input Units.SI.Temperature T "Temperature";
diff --git a/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/Water_Ph_der.mo b/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/Water_Ph_der.mo
index 7a4bd342..1788ea8e 100644
--- a/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/Water_Ph_der.mo
+++ b/ThermoSysPro/Properties/WaterSteamSimple/SimpleWater/Water_Ph_der.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Properties.WaterSteamSimple.SimpleWater;
+within ThermoSysPro.Properties.WaterSteamSimple.SimpleWater;
function Water_Ph_der "Derivative function of Water_Ph"
input Units.SI.AbsolutePressure p "Pressure";
input Units.SI.SpecificEnthalpy h "Specific enthalpy";
diff --git a/ThermoSysPro/Properties/package.order b/ThermoSysPro/Properties/package.order
index 46af4f53..9ac6910e 100644
--- a/ThermoSysPro/Properties/package.order
+++ b/ThermoSysPro/Properties/package.order
@@ -10,3 +10,4 @@ WaterSolution
SolarSalt
ModelicaMediaFlueGases
Common
+Media
From 81201fc0c264fda7bb765b4720ac1ef80ae9870c Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Fri, 16 May 2025 17:30:41 +0200
Subject: [PATCH 002/213] #125 Organize architecture for
Fluid/Example/SimpleExamples for new fluid examples
---
.gitignore | 2 +-
.../ConcentratedSolarPowerPlant_PTSC.mo | 2 +-
.../CombinedCycle_Load_100_50.mo | 4 +-
.../Fluid/Examples/Control/MassFlowControl.mo | 2 +-
.../Examples/Control/Pump_VelocityControl.mo | 2 +-
.../Examples/Control/TemperatureControl.mo | 2 +-
.../SimpleExamples/Boilers/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Boilers/package.order | 0
.../BoundaryConditions/package.mo | 116 ++++++++++++++++++
.../BoundaryConditions/package.order | 0
.../SimpleExamples/Combustion/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Combustion/package.order | 0
.../SimpleExamples/Examples/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Examples/package.order | 0
.../SimpleExamples/HeatExchangers/package.mo | 116 ++++++++++++++++++
.../HeatExchangers/package.order | 0
.../SimpleExamples/Interfaces/package.order | 0
.../SimpleExamples/Junctions/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Junctions/package.order | 0
.../SimpleExamples/LoopBreakers/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/LoopBreakers/package.order | 0
.../SimpleExamples/Machines/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Machines/package.order | 0
.../SimpleExamples/PressureLosses/package.mo | 116 ++++++++++++++++++
.../PressureLosses/package.order | 0
.../SimpleExamples/Sensors/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Sensors/package.order | 0
.../SimpleExamples/Volumes/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Volumes/package.order | 0
.../Fluid/Examples/SimpleExamples/package.mo | 22 +---
.../Examples/SimpleExamples/package.order | 11 ++
31 files changed, 1300 insertions(+), 23 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Interfaces/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
diff --git a/.gitignore b/.gitignore
index 3f0d8671..e5321807 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,4 @@ status*
*.mof
*.c
buildlog.txt
-
+*.bak-mo
diff --git a/ThermoSysPro/Fluid/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo b/ThermoSysPro/Fluid/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo
index 5bb5b9dc..9e28186c 100644
--- a/ThermoSysPro/Fluid/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo
+++ b/ThermoSysPro/Fluid/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.Book.PowerPlants;
+within ThermoSysPro.Fluid.Examples.Book.PowerPlants;
model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plant with PTSC"
parameter Real L1 = 500 "Longueur de la première chaine de capteurs";
diff --git a/ThermoSysPro/Fluid/Examples/CombinedCyclePowerPlant/CombinedCycle_Load_100_50.mo b/ThermoSysPro/Fluid/Examples/CombinedCyclePowerPlant/CombinedCycle_Load_100_50.mo
index ebf7222d..386da98d 100644
--- a/ThermoSysPro/Fluid/Examples/CombinedCyclePowerPlant/CombinedCycle_Load_100_50.mo
+++ b/ThermoSysPro/Fluid/Examples/CombinedCyclePowerPlant/CombinedCycle_Load_100_50.mo
@@ -946,8 +946,8 @@ model CombinedCycle_Load_100_50 "CCPP model to simulate a load variation from 10
extent={{20,-20},{-20,20}},
rotation=90)));
- ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsFumees(P0=1.013e5, C(h_vol_1
- (start=329093.3007791504)))
+ ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsFumees(P0=1.013e5, C(h_vol_1(
+ start=329093.3007791504)))
annotation (Placement(transformation(
origin={722,-50},
extent={{10,-10},{-10,10}},
diff --git a/ThermoSysPro/Fluid/Examples/Control/MassFlowControl.mo b/ThermoSysPro/Fluid/Examples/Control/MassFlowControl.mo
index 39040c01..0e447c9b 100644
--- a/ThermoSysPro/Fluid/Examples/Control/MassFlowControl.mo
+++ b/ThermoSysPro/Fluid/Examples/Control/MassFlowControl.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.Control;
+within ThermoSysPro.Fluid.Examples.Control;
model MassFlowControl "Pump_MassFlowControl"
parameter Real k=1 "Gain";
parameter Real Ti=1 "Time constant (s)";
diff --git a/ThermoSysPro/Fluid/Examples/Control/Pump_VelocityControl.mo b/ThermoSysPro/Fluid/Examples/Control/Pump_VelocityControl.mo
index 74066be1..4fb4d413 100644
--- a/ThermoSysPro/Fluid/Examples/Control/Pump_VelocityControl.mo
+++ b/ThermoSysPro/Fluid/Examples/Control/Pump_VelocityControl.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.Control;
+within ThermoSysPro.Fluid.Examples.Control;
model Pump_VelocityControl "Drum level control"
parameter Real k=1 "Gain";
parameter Real Ti=1 "Time constant (s)";
diff --git a/ThermoSysPro/Fluid/Examples/Control/TemperatureControl.mo b/ThermoSysPro/Fluid/Examples/Control/TemperatureControl.mo
index 21ee184c..ba32fc4a 100644
--- a/ThermoSysPro/Fluid/Examples/Control/TemperatureControl.mo
+++ b/ThermoSysPro/Fluid/Examples/Control/TemperatureControl.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.Control;
+within ThermoSysPro.Fluid.Examples.Control;
model TemperatureControl "Temperature_Control"
parameter Real k=1 "Gain";
parameter Real Ti=1 "Time constant (s)";
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.mo
new file mode 100644
index 00000000..57e2eaa8
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Boilers
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Boilers;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Boilers/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo
new file mode 100644
index 00000000..2950299c
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package BoundaryConditions
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end BoundaryConditions;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo
new file mode 100644
index 00000000..38ce2164
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Combustion
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Combustion;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo
new file mode 100644
index 00000000..d4ba3cbb
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Examples
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Examples;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo
new file mode 100644
index 00000000..8a9e5e13
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package HeatExchangers
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end HeatExchangers;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Interfaces/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Interfaces/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo
new file mode 100644
index 00000000..92e0061d
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Junctions
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Junctions;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo
new file mode 100644
index 00000000..b905e02d
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package LoopBreakers
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end LoopBreakers;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo
new file mode 100644
index 00000000..5a53e2bf
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Machines
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Machines;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo
new file mode 100644
index 00000000..877bf752
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package PressureLosses
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end PressureLosses;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo
new file mode 100644
index 00000000..1493b189
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Sensors
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Sensors;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo
new file mode 100644
index 00000000..b6942729
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Volumes
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Volumes;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
new file mode 100644
index 00000000..e69de29b
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo
index 1a2191ef..bb934deb 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo
@@ -1,7 +1,6 @@
within ThermoSysPro.Fluid.Examples;
package SimpleExamples
-
-annotation (Icon(graphics={
+ annotation (Icon(graphics={
Text(
extent={{-102,0},{24,-26}},
lineColor={242,148,0},
@@ -13,21 +12,17 @@ annotation (Icon(graphics={
textString=
"SysPro"),
Polygon(
- points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},
- {52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{
- -62,2}},
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
lineColor={46,170,220},
fillColor={46,170,220},
fillPattern=FillPattern.Solid),
Polygon(
- points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{
- -42,22},{-42,30},{-44,38}},
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
lineColor={46,170,220},
fillColor={46,170,220},
fillPattern=FillPattern.Solid),
Polygon(
- points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},
- {-26,12},{-28,12},{-26,20}},
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
lineColor={46,170,220},
fillColor={46,170,220},
fillPattern=FillPattern.Solid),
@@ -87,9 +82,7 @@ annotation (Icon(graphics={
fillColor={46,170,220},
fillPattern=FillPattern.Solid),
Polygon(
- points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},
- {52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,
- 2}},
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
lineColor={242,148,0},
fillColor={242,148,0},
fillPattern=FillPattern.Solid),
@@ -118,8 +111,5 @@ annotation (Icon(graphics={
Line(
points={{80,80},{100,100}},
color={0,0,255},
- smooth=Smooth.None)}), Documentation(info="
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"));
+ smooth=Smooth.None)}));
end SimpleExamples;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
index e69de29b..37aecad4 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
@@ -0,0 +1,11 @@
+Boilers
+BoundaryConditions
+Combustion
+HeatExchangers
+Junctions
+LoopBreakers
+Machines
+PressureLosses
+Sensors
+Volumes
+Examples
From aeb77048209bd5ca4752c108e6f4422163289544 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Tue, 20 May 2025 17:21:15 +0200
Subject: [PATCH 003/213] #125 SubC name in connectors description
---
.../SimpleExamples/Examples/package.mo | 116 ------------------
.../Examples/SimpleExamples/package.order | 1 -
.../Fluid/Interfaces/Connectors/FluidInlet.mo | 4 +-
.../Interfaces/Connectors/FluidOutlet.mo | 4 +-
4 files changed, 4 insertions(+), 121 deletions(-)
delete mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo
deleted file mode 100644
index d4ba3cbb..00000000
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.mo
+++ /dev/null
@@ -1,116 +0,0 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples;
-package Examples
-
- annotation (Icon(graphics={
- Text(
- extent={{-102,0},{24,-26}},
- lineColor={242,148,0},
- textString=
- "Thermo"),
- Text(
- extent={{-4,8},{68,-34}},
- lineColor={46,170,220},
- textString=
- "SysPro"),
- Polygon(
- points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-8,30},{-6,26}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-8,36},{-6,32}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-8,42},{-6,38}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-8,48},{-6,44}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-4,32},{-2,28}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-4,38},{-2,34}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-4,44},{-2,40}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Rectangle(
- extent={{-4,50},{-2,46}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Polygon(
- points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
- lineColor={242,148,0},
- fillColor={242,148,0},
- fillPattern=FillPattern.Solid),
- Line(
- points={{22,12},{22,14},{22,16},{24,14},{20,18}},
- color={46,170,220},
- thickness=0.5),
- Line(
- points={{26,12},{26,14},{26,16},{28,14},{24,18}},
- color={46,170,220},
- thickness=0.5),
- Line(
- points={{30,10},{30,12},{30,14},{32,12},{28,16}},
- color={46,170,220},
- thickness=0.5),
- Polygon(
- points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
- lineColor={46,170,220},
- fillColor={46,170,220},
- fillPattern=FillPattern.Solid),
- Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
- Line(
- points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
- color={0,0,255},
- smooth=Smooth.None),
- Line(
- points={{80,80},{100,100}},
- color={0,0,255},
- smooth=Smooth.None)}));
-end Examples;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
index 37aecad4..4d0be736 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
@@ -8,4 +8,3 @@ Machines
PressureLosses
Sensors
Volumes
-Examples
diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
index f88c9d63..12cef6b9 100644
--- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
+++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
@@ -1,7 +1,7 @@
within ThermoSysPro.Fluid.Interfaces.Connectors;
connector FluidInlet "Fluid inlet connector"
replaceable package Medium =
- ThermoSysPro.Properties.Media.WaterSteam constrainedby Modelica.Media.Interfaces.PartialMedium
+ ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium
"Medium model" annotation (choicesAllMatching=true, Dialog(group="Medium"));
Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume";
Units.SI.MassFlowRate Q(start=500)
@@ -13,7 +13,7 @@ connector FluidInlet "Fluid inlet connector"
Units.SI.SpecificEnthalpy h_vol_2(start=1.e5)
"Fluid specific enthalpy in the control volume 2";
Medium.ExtraProperty SubC[Medium.nC]
- "Properties c_i/m of the fluid crossing the boundary of the control volume";
+ "Substances concentration (ppm) of the fluid crossing the boundary of the control volume";
Medium.MassFraction Xi[Medium.nXi]
"Independent mixture mass fractions m_i/m of the fluid crossing the boundary of the control volume";
input Real diff_res_1(start=1e4)
diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
index 52c98b76..2f5dd7d3 100644
--- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
+++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
@@ -1,7 +1,7 @@
within ThermoSysPro.Fluid.Interfaces.Connectors;
connector FluidOutlet "Fluid outlet connector"
replaceable package Medium =
- ThermoSysPro.Properties.Media.WaterSteam constrainedby Modelica.Media.Interfaces.PartialMedium
+ ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium
"Medium model" annotation (choicesAllMatching=true, Dialog(group="Medium"));
Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume";
Units.SI.MassFlowRate Q(start=500)
@@ -13,7 +13,7 @@ connector FluidOutlet "Fluid outlet connector"
Units.SI.SpecificEnthalpy h_vol_2(start=1.e5)
"Fluid specific enthalpy in the control volume 2";
Medium.ExtraProperty SubC[Medium.nC]
- "Properties c_i/m of the fluid crossing the boundary of the control volume";
+ "Substances concentration (ppm) of the fluid crossing the boundary of the control volume";
Medium.MassFraction Xi[Medium.nXi]
"Independent mixture mass fractions m_i/m of the fluid crossing the boundary of the control volume";
output Real diff_res_1(start=1e4)
From 80e58c474f4b2c75e033cc606b86d74ac2050e94 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Wed, 21 May 2025 19:22:04 +0200
Subject: [PATCH 004/213] #125 Added h_offset to a FlueGases media
---
.../Properties/Media/FlueGases/package.mo | 24 +++++++++++++++++++
.../Properties/Media/FlueGases/package.order | 1 +
ThermoSysPro/Properties/Media/package.order | 1 +
3 files changed, 26 insertions(+)
create mode 100644 ThermoSysPro/Properties/Media/FlueGases/package.mo
create mode 100644 ThermoSysPro/Properties/Media/FlueGases/package.order
diff --git a/ThermoSysPro/Properties/Media/FlueGases/package.mo b/ThermoSysPro/Properties/Media/FlueGases/package.mo
new file mode 100644
index 00000000..98475975
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/FlueGases/package.mo
@@ -0,0 +1,24 @@
+within ThermoSysPro.Properties.Media;
+package FlueGases "Flue gases library inherited from Modelica.Media"
+ import Modelica.Media.Interfaces.Choices.ReferenceEnthalpy;
+
+ extends PartialSubCMedium(nSubC=nC);
+ extends Modelica.Media.IdealGases.Common.MixtureGasNasa(
+ mediumName="MediaMonomeld",
+ data={Modelica.Media.IdealGases.Common.SingleGasesData.N2,Modelica.Media.IdealGases.Common.SingleGasesData.O2,
+ Modelica.Media.IdealGases.Common.SingleGasesData.H2O,Modelica.Media.IdealGases.Common.SingleGasesData.CO2,
+ Modelica.Media.IdealGases.Common.SingleGasesData.SO2},
+ fluidConstants={Modelica.Media.IdealGases.Common.FluidData.N2,Modelica.Media.IdealGases.Common.FluidData.O2,
+ Modelica.Media.IdealGases.Common.FluidData.H2O,Modelica.Media.IdealGases.Common.FluidData.CO2,
+ Modelica.Media.IdealGases.Common.FluidData.SO2},
+ substanceNames={"Nitrogen","Oxygen","Water","Carbondioxide","Sulfurdioxide"},
+ reference_X={0.768,0.232,0.0,0.0,0.0},
+ referenceChoice=ReferenceEnthalpy.UserDefined,
+ h_offset=hr);
+
+ constant Units.SI.SpecificEnthalpy hr=2501569 "ThermoSysPro Water/steam reference specific enthalpy at 0.01°C";
+
+ annotation (Documentation(info="
+
+"));
+end FlueGases;
diff --git a/ThermoSysPro/Properties/Media/FlueGases/package.order b/ThermoSysPro/Properties/Media/FlueGases/package.order
new file mode 100644
index 00000000..fcb5e9c6
--- /dev/null
+++ b/ThermoSysPro/Properties/Media/FlueGases/package.order
@@ -0,0 +1 @@
+hr
diff --git a/ThermoSysPro/Properties/Media/package.order b/ThermoSysPro/Properties/Media/package.order
index e9f32b99..8d9e6275 100644
--- a/ThermoSysPro/Properties/Media/package.order
+++ b/ThermoSysPro/Properties/Media/package.order
@@ -2,3 +2,4 @@ PartialSubCMedium
PartialThermoSysProMedium
PartialTwoPhaseThermoSysProMedium
WaterSteam
+FlueGases
From d6f15cbdc0edd7dec7f3542bc1add57876a1b03d Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 11:32:05 +0200
Subject: [PATCH 005/213] #125 modification of h_offset to be equal to old
FlueGases implementation
---
ThermoSysPro/Properties/Media/FlueGases/package.mo | 3 ++-
ThermoSysPro/Properties/Media/FlueGases/package.order | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ThermoSysPro/Properties/Media/FlueGases/package.mo b/ThermoSysPro/Properties/Media/FlueGases/package.mo
index 98475975..11e4197f 100644
--- a/ThermoSysPro/Properties/Media/FlueGases/package.mo
+++ b/ThermoSysPro/Properties/Media/FlueGases/package.mo
@@ -14,9 +14,10 @@ package FlueGases "Flue gases library inherited from Modelica.Media"
substanceNames={"Nitrogen","Oxygen","Water","Carbondioxide","Sulfurdioxide"},
reference_X={0.768,0.232,0.0,0.0,0.0},
referenceChoice=ReferenceEnthalpy.UserDefined,
- h_offset=hr);
+ h_offset = hr - hr_FlueGases + Modelica.Media.IdealGases.Common.SingleGasesData.H2O.H0);
constant Units.SI.SpecificEnthalpy hr=2501569 "ThermoSysPro Water/steam reference specific enthalpy at 0.01°C";
+ constant Units.SI.SpecificEnthalpy hr_FlueGases=503298 "FlueGases reference specific enthalpy, computed from ThermoSysPro.Properties.ModelicaMediaFlueGases.specificEnthalpy(state0) at (0.006112 bars, 0.01°C)";
annotation (Documentation(info="
diff --git a/ThermoSysPro/Properties/Media/FlueGases/package.order b/ThermoSysPro/Properties/Media/FlueGases/package.order
index fcb5e9c6..9965a189 100644
--- a/ThermoSysPro/Properties/Media/FlueGases/package.order
+++ b/ThermoSysPro/Properties/Media/FlueGases/package.order
@@ -1 +1,2 @@
hr
+hr_FlueGases
From 9a4c1d653616e81959222e5c9e9190a81e1f2e7c Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 15:16:03 +0200
Subject: [PATCH 006/213] #125 SourcePQ PipePressureLoss and Sink with examples
---
ThermoSysPro/Fluid/BoundaryConditions/Sink.mo | 50 +++---------
.../Fluid/BoundaryConditions/SourcePQ.mo | 79 +++++--------------
.../PressureLosses/TestPipePressureLoss.mo | 13 +++
.../TestPipePressureLoss_FlueGases.mo | 20 +++++
.../TestPipePressureLoss_Traces.mo | 14 ++++
.../PressureLosses/package.order | 3 +
.../Fluid/Interfaces/Connectors/FluidInlet.mo | 2 +-
.../Interfaces/Connectors/FluidOutlet.mo | 2 +-
.../Fluid/PressureLosses/PipePressureLoss.mo | 29 +++----
ThermoSysPro/UsersGuide.mo | 24 ++++++
10 files changed, 119 insertions(+), 117 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo b/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo
index dd6fc780..f2e804a2 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo
@@ -1,43 +1,23 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model Sink "MultiFluids sink"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeVariableInterface;
- extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- parameter Units.SI.Temperature T0=290
- "Source temperature (active if option_temperature=true)"
- annotation (Evaluate=true, Dialog(enable=option_temperature));
- parameter Units.SI.SpecificEnthalpy h0=100000
- "Source specific enthalpy (active if option_temperature=false)"
- annotation (Evaluate=true, Dialog(enable=not option_temperature));
- parameter Boolean option_temperature=false
- "true:temperature fixed - false:specific enthalpy fixed";
- parameter Boolean diffusion=false
- "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ extends ThermoSysPro.Fluid.Interfaces.IconColors;
-protected
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
+ parameter Units.SI.SpecificEnthalpy h0=100000 "Source specific enthalpy (active if option_temperature=false)" annotation (Evaluate=true, Dialog(enable=not option_temperature));
+ parameter Boolean option_temperature=false "true:temperature fixed - false:specific enthalpy fixed";
+ parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
Units.SI.Temperature T "Fluid temperature";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
- Real Xco2(start=0.01)
- "CO2 mass fraction of the fluid crossing the boundary of the control volume";
- Real Xh2o
- "H2O mass fraction of the fluid crossing the boundary of the control volume";
- Real Xo2(start=0.2)
- "O2 mass fraction of the fluid crossing the boundary of the control volume";
- Real Xso2(start=0)
- "SO2 mass fraction of the fluid crossing the boundary of the control volume";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Trace substances";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
"Fixed specific enthalpy or temperature according to option_temperature"
@@ -54,12 +34,8 @@ equation
C.diff_res_2 = 0;
C.diff_on_2 = diffusion;
- ftype = C.ftype;
-
- Xco2 = C.Xco2;
- Xh2o = C.Xh2o;
- Xo2 = C.Xo2;
- Xso2 = C.Xso2;
+ X = C.Xi;
+ SubC = C.SubC;
/* Specific enthalpy or temperature */
if (cardinality(ISpecificEnthalpyOrTemperature) == 0) then
@@ -72,10 +48,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X);
end if;
annotation (
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo
index 40e3e63b..29d16491 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo
@@ -1,53 +1,22 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model SourcePQ "MultiFluids source with fixed pressure and mass flow rate"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
-
- parameter Units.SI.AbsolutePressure P0=300000
- "Fluid pressure (active if IPressure connector is not connected)";
- parameter Units.SI.MassFlowRate Q0=100
- "Mass flow (active if IMassFlow connector is not connected)";
- parameter Units.SI.Temperature T0=290
- "Source temperature (active if option_temperature=true)"
- annotation (Evaluate=true, Dialog(enable=option_temperature));
- parameter Units.SI.SpecificEnthalpy h0=100000
- "Source specific enthalpy (active if option_temperature=false)"
- annotation (Evaluate=true, Dialog(enable=not option_temperature));
- parameter Boolean option_temperature=false
- "true:temperature fixed - false:specific enthalpy fixed";
- parameter Boolean continuous_flow_reversal=false
- "true: continuous flow reversal - false: discontinuous flow reversal";
- parameter Boolean diffusion=false
- "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
-
- parameter ThermoSysPro.Units.SI.MassFraction Xco2= 0.01 "CO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o=if ftype == FluidType.FlueGases then 0.05 else 0 "H2O mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo2= 0.22 "O2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ parameter Units.SI.AbsolutePressure P0=300000 "Fluid pressure (active if IPressure connector is not connected)";
+ parameter Units.SI.MassFlowRate Q0=100 "Mass flow (active if IMassFlow connector is not connected)";
+ parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
+ parameter Units.SI.SpecificEnthalpy h0=100000 "Source specific enthalpy (active if option_temperature=false)" annotation (Evaluate=true, Dialog(enable=not option_temperature));
+ parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso2= 0 "SO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ group="Medium"));
+ parameter Medium.ExtraProperty X0[Medium.nX]= Medium.X_default "Source mass fraction" annotation (Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
-
-protected
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ group="Medium"));
+ parameter Boolean option_temperature=false "true:temperature fixed - false:specific enthalpy fixed";
+ parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal";
+ parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
@@ -72,7 +41,7 @@ public
origin={0,-50},
extent={{10,-10},{-10,10}},
rotation=270)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
equation
@@ -83,19 +52,9 @@ equation
C.diff_res_1 = 0;
C.diff_on_1 = diffusion;
- ftype = C.ftype;
+ C.SubC=SubC0;
- if flue_gases then
- C.Xco2 = Xco2;
- C.Xh2o = Xh2o;
- C.Xo2 = Xo2;
- C.Xso2 = Xso2;
- else
- C.Xco2 = 0;
- C.Xh2o = 0;
- C.Xo2 = 0;
- C.Xso2 = 0;
- end if;
+ C.Xi = X0[1:Medium.nXi];
/* Mass flow */
if (cardinality(IMassFlow) == 0) then
@@ -122,10 +81,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X0);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X0);
end if;
/* Flow reversal */
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo
new file mode 100644
index 00000000..59b00b69
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo
@@ -0,0 +1,13 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestPipePressureLoss
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(pipePressureLoss.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(pipePressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestPipePressureLoss;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo
new file mode 100644
index 00000000..728fb69a
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo
@@ -0,0 +1,20 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestPipePressureLoss_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.FlueGases;
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(
+ redeclare replaceable package Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
+ redeclare replaceable package Medium = Medium,
+ P0=4500000,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(pipePressureLoss.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(pipePressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestPipePressureLoss_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo
new file mode 100644
index 00000000..baebf5cd
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo
@@ -0,0 +1,14 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestPipePressureLoss_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam (extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2});
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3})
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(pipePressureLoss.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(pipePressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestPipePressureLoss_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
index e69de29b..eb3436e6 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
@@ -0,0 +1,3 @@
+TestPipePressureLoss
+TestPipePressureLoss_FlueGases
+TestPipePressureLoss_Traces
diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
index 12cef6b9..cf97ea60 100644
--- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
+++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo
@@ -2,7 +2,7 @@ within ThermoSysPro.Fluid.Interfaces.Connectors;
connector FluidInlet "Fluid inlet connector"
replaceable package Medium =
ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium
- "Medium model" annotation (choicesAllMatching=true, Dialog(group="Medium"));
+ "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",group="Medium"));
Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume";
Units.SI.MassFlowRate Q(start=500)
"Mass flow rate of the fluid crossing the boundary of the control volume";
diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
index 2f5dd7d3..913ee8dd 100644
--- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
+++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo
@@ -2,7 +2,7 @@ within ThermoSysPro.Fluid.Interfaces.Connectors;
connector FluidOutlet "Fluid outlet connector"
replaceable package Medium =
ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium
- "Medium model" annotation (choicesAllMatching=true, Dialog(group="Medium"));
+ "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",group="Medium"));
Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume";
Units.SI.MassFlowRate Q(start=500)
"Mass flow rate of the fluid crossing the boundary of the control volume";
diff --git a/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo b/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo
index 6623b609..c9d337fd 100644
--- a/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo
@@ -1,8 +1,9 @@
within ThermoSysPro.Fluid.PressureLosses;
model PipePressureLoss "Pipe generic pressure loss"
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+ extends ThermoSysPro.Fluid.Interfaces.IconColors;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Real K=10 "Friction pressure loss coefficient";
parameter Units.SI.Position z1=0 "Inlet altitude";
parameter Units.SI.Position z2=0 "Outlet altitude";
@@ -10,11 +11,8 @@ model PipePressureLoss "Pipe generic pressure loss"
"Diffusion conductance (active if diffusion=true in neighbouring volumes)";
parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
-
protected
constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
parameter Real eps=1.e-3 "Small number for pressure loss equation";
public
@@ -26,13 +24,12 @@ public
Units.SI.Temperature T(start=290) "Fluid temperature";
Units.SI.AbsolutePressure Pm(start=1.e5) "Average fluid pressure";
Units.SI.SpecificEnthalpy h(start=100000) "Fluid specific enthalpy";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
public
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
equation
@@ -48,19 +45,15 @@ equation
C2.diff_res_1 = C1.diff_res_1 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
C1.diff_res_2 = C2.diff_res_2 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
- C1.ftype = C2.ftype;
+ C1.Xi = C2.Xi;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.SubC = C2.SubC;
Q = C1.Q;
h = C1.h;
+ X = C1.Xi;
deltaP = C1.P - C2.P;
- ftype = C1.ftype;
-
/* Pressure loss */
deltaPf = K*ThermoSysPro.Functions.ThermoSquare(Q, eps)/rho;
deltaPg = rho*g*(z2 - z1);
@@ -69,12 +62,12 @@ equation
/* Fluid thermodynamic properties */
Pm = (C1.P + C2.P)/2;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ T = Medium.temperature_phX(p=Pm, h=h, X=X);
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ rho = Medium.density_phX(p=Pm, h=h, X=X);
end if;
annotation (
diff --git a/ThermoSysPro/UsersGuide.mo b/ThermoSysPro/UsersGuide.mo
index 304dda34..380d583d 100644
--- a/ThermoSysPro/UsersGuide.mo
+++ b/ThermoSysPro/UsersGuide.mo
@@ -1268,6 +1268,30 @@ action. This section shall survive the termination of this License.
extent={{-12.5,-12.5},{12.5,12.5}})}));
end ThermoSysProDocumentation;
+
+ package Icons
+
+ partial model Example
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
+ Rectangle(
+ lineColor={200,200,200},
+ fillColor={248,248,248},
+ fillPattern=FillPattern.HorizontalCylinder,
+ extent={{-100,-100},{100,100}},
+ radius=25.0),
+ Rectangle(
+ lineColor={128,128,128},
+ extent={{-100,-100},{100,100}},
+ radius=25.0),
+ Polygon(
+ origin={8,14},
+ lineColor={78,138,73},
+ fillColor={78,138,73},
+ pattern=LinePattern.None,
+ fillPattern=FillPattern.Solid,
+ points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), Diagram(coordinateSystem(preserveAspectRatio=false)));
+ end Example;
+ end Icons;
annotation (DocumentationClass=true, Documentation(info="
Users Guide of the ThermoSysPro Library
ThermoSysPro is a library for the modelling and simulation of power plants and energy systems. It is developed with the Modelica language from the Modelica Association. It provides components in various disciplines related to the modelling of power plants and energy systems.
From a58f96fd055b013aa2d912cb5784653e64f0fd2a Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 16:39:19 +0200
Subject: [PATCH 007/213] #125 SourceQ and VolumeC
---
.../Fluid/BoundaryConditions/SourceQ.mo | 63 ++-----
.../PressureLosses/TestVolumeC.mo | 15 ++
.../PressureLosses/TestVolumeC_FlueGases.mo | 25 +++
.../PressureLosses/TestVolumeC_Traces.mo | 17 ++
.../PressureLosses/package.order | 3 +
ThermoSysPro/Fluid/Volumes/VolumeC.mo | 176 ++++++------------
6 files changed, 130 insertions(+), 169 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo
index 1443d760..6ef3492e 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo
@@ -1,11 +1,9 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model SourceQ "Multi-fluid source with fixed mass flow rate"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.MassFlowRate Q0=100
"Mass flow (active if IMassFlow connector is not connected)";
parameter Units.SI.Temperature T0=290
@@ -20,32 +18,12 @@ model SourceQ "Multi-fluid source with fixed mass flow rate"
"true: continuous flow reversal - false: discontinuous flow reversal";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
-
- parameter ThermoSysPro.Units.SI.MassFraction Xco2= 0.01 "CO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o=if ftype == FluidType.FlueGases then 0.05 else 0 "H2O mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo2= 0.22 "O2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso2= 0 "SO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ group="Medium"));
+ parameter Medium.ExtraProperty X0[Medium.nX]= Medium.X_default "Source mass fraction" annotation (Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
-
-protected
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ group="Medium"));
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
@@ -54,17 +32,12 @@ public
Units.SI.Temperature T(start=300) "Fluid temperature";
public
- ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow
- "Fixed mass flow rate"
- annotation (Placement(transformation(
+ ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow "Fixed mass flow rate" annotation (Placement(transformation(
origin={0,50},
extent={{-10,-10},{10,10}},
rotation=270)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C annotation (Placement(
- transformation(extent={{90,-10},{110,10}}, rotation=0)));
- InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
- "Fixed specific enthalpy or temperature according to option_temperature"
- annotation (Placement(transformation(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{90,-10},{110,10}}, rotation=0)));
+ InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature "Fixed specific enthalpy or temperature according to option_temperature" annotation (Placement(transformation(
origin={0,-50},
extent={{10,-10},{-10,10}},
rotation=270)));
@@ -77,19 +50,9 @@ equation
C.diff_res_1 = 0;
C.diff_on_1 = diffusion;
- ftype = C.ftype;
+ C.SubC=SubC0;
- if flue_gases then
- C.Xco2 = Xco2;
- C.Xh2o = Xh2o;
- C.Xo2 = Xo2;
- C.Xso2 = Xso2;
- else
- C.Xco2 = 0;
- C.Xh2o = 0;
- C.Xo2 = 0;
- C.Xso2 = 0;
- end if;
+ C.Xi = X0[1:Medium.nXi];
/* Mass flow rate */
if (cardinality(IMassFlow) == 0) then
@@ -109,10 +72,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X0);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X0);
end if;
/* Flow reversal */
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo
new file mode 100644
index 00000000..32a60055
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo
@@ -0,0 +1,15 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestVolumeC
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
+equation
+ connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(sink.C, volumeC.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0}));
+ connect(volumeC.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestVolumeC;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo
new file mode 100644
index 00000000..1b40a056
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo
@@ -0,0 +1,25 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestVolumeC_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.FlueGases;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(
+ redeclare replaceable package Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
+ redeclare replaceable package Medium = Medium,
+ P0=4500000,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(
+ redeclare replaceable package Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
+equation
+ connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(sink.C, volumeC.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0}));
+ connect(volumeC.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestVolumeC_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo
new file mode 100644
index 00000000..c455a404
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo
@@ -0,0 +1,17 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestVolumeC_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2});
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.2})
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.1})
+ annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
+equation
+ connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(sink.C, volumeC.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0}));
+ connect(volumeC.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestVolumeC_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
index eb3436e6..52916924 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
@@ -1,3 +1,6 @@
TestPipePressureLoss
TestPipePressureLoss_FlueGases
TestPipePressureLoss_Traces
+TestVolumeC
+TestVolumeC_FlueGases
+TestVolumeC_Traces
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeC.mo b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
index 8f999f96..c67202f8 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeC.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
@@ -1,11 +1,10 @@
-within ThermoSysPro.Fluid.Volumes;
+within ThermoSysPro.Fluid.Volumes;
model VolumeC "Mixing volume with 3 inlets and 1 outlet"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = Medium.noSaS (SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
"true: dynamic energy balance equation - false: static energy balance equation";
parameter Units.SI.Volume V=1
@@ -29,42 +28,17 @@ model VolumeC "Mixing volume with 3 inlets and 1 outlet"
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
parameter Boolean dynamic_composition_balance=false
- "true: dynamic fluid composition balance equation
false: static fluid composition balance equation (active for flue gases)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.FlueGases), tab="Fluid", group="Fluid properties"));
-
- parameter ThermoSysPro.Units.SI.MassFraction Xco20=0.0
- "Initial CO2 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o0=if ftype == FluidType.FlueGases then 0.05 else 0
- "Initial H20 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo20=0.23
- "Initial O2 mass fraction" annotation (Evaluate=true, Dialog(
+ "true: dynamic fluid composition balance equation
false: static fluid composition balance equation (active for flue gases)" annotation(Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
+ parameter Medium.ExtraProperty X0[Medium.nX]=Medium.X_default "Initial composition values" annotation (Evaluate=true, Dialog(
enable=dynamic_composition_balance,
tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso20=0
- "Initial SO2 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
+ group="Medium"));
protected
- constant Units.SI.SpecificEnthalpy hr=2501569
- "Water/steam reference specific enthalpy at 0.01°C";
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
+ constant Boolean isCompressible = Medium.isCompressible;
parameter Units.SI.MassFlowRate gamma0=1.e-4
"Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
public
Units.SI.Temperature T "Fluid temperature";
@@ -77,15 +51,12 @@ public
"density derivative wrt pressure at constant specific enthalpy";
Units.SI.DerDensityByEnthalpy ddhp
"density derivative wrt specific enthalpy at constant pressure";
- FluidType fluids[5] "Fluids mixing in volume";
- Units.SI.MassFlowRate BXco2 "Right hand side of the CO2 balance equation";
- Units.SI.MassFlowRate BXh2o "Right hand side of the H2O balance equation";
- Units.SI.MassFlowRate BXo2 "Right hand side of the O2 balance equation";
- Units.SI.MassFlowRate BXso2 "Right hand side of the SO2 balance equation";
- ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction";
+ Units.SI.MassFlowRate BX[Medium.nXi] "Right hand side of the X balance equation";
+ Medium.ExtraProperty X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Boundary trace substances";
+ Medium.ExtraProperty BSubC[Medium.nC](quantity=Medium.extraPropertiesNames) "Right hand side of the trace balance equation";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Boundary trace substances";
+ Medium.ExtraProperty SubCSaS[Medium.nC](quantity=Medium.extraPropertiesNames) "Trace modification in the trace balance equation";
+ Medium.ThermodynamicState state;
Units.SI.Power Je1 "Thermal power diffusion from inlet e1";
Units.SI.Power Je2 "Thermal power diffusion from inlet e2";
Units.SI.Power Je3 "Thermal power diffusion from inlet e3";
@@ -100,15 +71,15 @@ public
Real re3 "Value of r(Q/gamma) for inlet e3";
Real rs "Value of r(Q/gamma) for outlet s";
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0),
iconTransformation(extent={{-110,-10},{-90,10}})));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-10,90},{10,110}}, rotation=0),
iconTransformation(extent={{-10,90},{10,110}})));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce3 annotation (Placement(transformation(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce3(redeclare package Medium = Medium) annotation (Placement(transformation(
extent={{-10,-110},{10,-90}}), iconTransformation(extent={{-10,-110},{
10,-90}})));
initial equation
@@ -128,19 +99,11 @@ initial equation
end if;
end if;
- if flue_gases then
- if dynamic_composition_balance then
- if steady_state then
- der(Xco2) = 0;
- der(Xh2o) = 0;
- der(Xo2) = 0;
- der(Xso2) = 0;
- else
- Xco2 = Xco20;
- Xh2o = Xh2o0;
- Xo2 = Xo20;
- Xso2 = Xso20;
- end if;
+ if dynamic_composition_balance then
+ if steady_state then
+ der(X) = fill(0,Medium.nX);
+ else
+ X = X0[1:Medium.nXi];
end if;
end if;
@@ -150,16 +113,6 @@ equation
assert(V > 0, "Volume non-positive");
end if;
- /* Check that incoming fluids are compatible with fluid in volume */
- fluids[1] = ftype;
- fluids[2] = Ce1.ftype;
- fluids[3] = Ce2.ftype;
- fluids[4] = Ce3.ftype;
- fluids[5] = Cs.ftype;
-
- assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids),
- "VolumeC: fluids mixing in volume are not compatible with each other");
-
/* Unconnected connectors */
if (cardinality(Ce1) == 0) then
Ce1.Q = 0;
@@ -167,11 +120,8 @@ equation
Ce1.h_vol_1 = 1.e5;
Ce1.diff_res_1 = 0;
Ce1.diff_on_1 = false;
- Ce1.ftype = ftype;
- Ce1.Xco2 = 0;
- Ce1.Xh2o = 0;
- Ce1.Xo2 = 0;
- Ce1.Xso2 = 0;
+ Ce1.Xi = Medium.X_default[1:Medium.nXi];
+ Ce1.SubC = Medium.C_default;
end if;
if (cardinality(Ce2) == 0) then
@@ -180,11 +130,8 @@ equation
Ce2.h_vol_1 = 1.e5;
Ce2.diff_res_1 = 0;
Ce2.diff_on_1 = false;
- Ce2.ftype = ftype;
- Ce2.Xco2 = 0;
- Ce2.Xh2o = 0;
- Ce2.Xo2 = 0;
- Ce2.Xso2 = 0;
+ Ce2.Xi = Medium.X_default[1:Medium.nXi];
+ Ce2.SubC = Medium.C_default;
end if;
if (cardinality(Ce3) == 0) then
@@ -193,11 +140,8 @@ equation
Ce3.h_vol_1 = 1.e5;
Ce3.diff_res_1 = 0;
Ce3.diff_on_1 = false;
- Ce3.ftype = ftype;
- Ce3.Xco2 = 0;
- Ce3.Xh2o = 0;
- Ce3.Xo2 = 0;
- Ce3.Xso2 = 0;
+ Ce3.Xi = Medium.X_default[1:Medium.nXi];
+ Ce3.SubC = Medium.C_default;
end if;
if (cardinality(Cs) == 0) then
@@ -211,7 +155,7 @@ equation
BQ = Ce1.Q + Ce2.Q + Ce3.Q - Cs.Q;
if isCompressible and dynamic_energy_balance and dynamic_mass_balance then
- V*(ddph*der(P) + ddhp*der(h - Xh2o*hr)) = BQ;
+ V*(ddph*der(P) + ddhp*der(h)) = BQ;
else
0 = BQ;
end if;
@@ -222,13 +166,13 @@ equation
P = Cs.P;
/* Energy balance equation */
- BH = Ce1.Q*(Ce1.h - Ce1.Xh2o*hr) + Ce2.Q*(Ce2.h - Ce2.Xh2o*hr) + Ce3.Q*(Ce3.h - Ce3.Xh2o *hr) - Cs.Q*(Cs.h - Cs.Xh2o*hr) + J;
+ BH = Ce1.Q*Ce1.h + Ce2.Q*Ce2.h + Ce3.Q*Ce3.h - Cs.Q*Cs.h + J;
if dynamic_energy_balance then
if dynamic_mass_balance then
- V*(((h - Xh2o*hr)*ddph - 1)*der(P) + ((h - Xh2o*hr)*ddhp + rho)*der(h - Xh2o*hr)) = BH;
+ V*((h*ddph - 1)*der(P) + (h*ddhp + rho)*der(h)) = BH;
else
- V*rho*der(h - Xh2o*hr) = BH;
+ V*rho*der(h) = BH;
end if;
else
BH = 0;
@@ -240,36 +184,28 @@ equation
Cs.h_vol_1 = h;
/* Fluid composition balance equations */
- BXco2 = Ce1.Xco2*Ce1.Q + Ce2.Xco2*Ce2.Q + Ce3.Xco2*Ce3.Q - Cs.Xco2*Cs.Q;
- BXh2o = Ce1.Xh2o*Ce1.Q + Ce2.Xh2o*Ce2.Q + Ce3.Xh2o*Ce3.Q - Cs.Xh2o*Cs.Q;
- BXo2 = Ce1.Xo2*Ce1.Q + Ce2.Xo2*Ce2.Q + Ce3.Xo2*Ce3.Q - Cs.Xo2*Cs.Q;
- BXso2 = Ce1.Xso2*Ce1.Q + Ce2.Xso2*Ce2.Q + Ce3.Xso2*Ce3.Q - Cs.Xso2*Cs.Q;
-
- if flue_gases then
- if dynamic_composition_balance then
- V*rho*der(Xco2) + Xco2*BQ = BXco2;
- V*rho*der(Xh2o) + Xh2o*BQ = BXh2o;
- V*rho*der(Xo2) + Xo2*BQ = BXo2;
- V*rho*der(Xso2) + Xso2*BQ = BXso2;
- else
- Xco2*BQ = BXco2;
- Xh2o*BQ = BXh2o;
- Xo2*BQ = BXo2;
- Xso2*BQ = BXso2;
- end if;
+ BX = Ce1.Xi*Ce1.Q + Ce2.Xi*Ce2.Q + Ce3.Xi*Ce3.Q - Cs.Xi*Cs.Q;
+
+ if dynamic_composition_balance then
+ V*rho*der(X) + X*BQ = BX;
+ else
+ X*BQ = BX;
+ end if;
+
+
+ /* Traces composition balance equations */
+ BSubC = Ce1.Q*Ce1.SubC + Ce2.Q*Ce2.SubC + Ce3.Q*Ce3.SubC - Cs.Q*Cs.SubC;
+
+ SubCSaS = SaS();
+ if dynamic_mass_balance then
+ V*rho*der(SubC) + SubC*BQ + V*rho*SubCSaS = BSubC;
else
- Xco2 = 0;
- Xh2o = 0;
- Xo2 = 0;
- Xso2 = 0;
+ V*rho*SubCSaS = BSubC;
end if;
- Cs.ftype = ftype;
+ Cs.SubC = SubC;
- Cs.Xco2 = Xco2;
- Cs.Xh2o = Xh2o;
- Cs.Xo2 = Xo2;
- Cs.Xso2 = Xso2;
+ Cs.Xi = X;
/* Flow reversal */
if continuous_flow_reversal then
@@ -325,19 +261,21 @@ equation
/* Fluid thermodynamic properties */
if isCompressible and dynamic_mass_balance then
- ddph = ThermoSysPro.Properties.Fluid.Density_derp_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
- ddhp = ThermoSysPro.Properties.Fluid.Density_derh_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ ddph = Medium.density_derp_h(state);
+ ddhp = Medium.density_derh_p(state);
else
ddph = 0;
ddhp = 0;
end if;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ state = Medium.setState_phX(p=P, h=h, X=X);
+
+ T = Medium.temperature(state);
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ rho = Medium.density(state);
end if;
annotation (
From 518792661be75fea3f6798d9d5f337e81341509a Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 16:39:38 +0200
Subject: [PATCH 008/213] #125 SourceQ and VolumeC
---
ThermoSysPro/Properties/Media/FlueGases/package.mo | 2 +-
ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo | 1 +
ThermoSysPro/Properties/Media/PartialSubCMedium/package.order | 1 +
ThermoSysPro/Properties/Media/WaterSteam/package.mo | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ThermoSysPro/Properties/Media/FlueGases/package.mo b/ThermoSysPro/Properties/Media/FlueGases/package.mo
index 11e4197f..514261ef 100644
--- a/ThermoSysPro/Properties/Media/FlueGases/package.mo
+++ b/ThermoSysPro/Properties/Media/FlueGases/package.mo
@@ -2,7 +2,7 @@ within ThermoSysPro.Properties.Media;
package FlueGases "Flue gases library inherited from Modelica.Media"
import Modelica.Media.Interfaces.Choices.ReferenceEnthalpy;
- extends PartialSubCMedium(nSubC=nC);
+ extends PartialSubCMedium(nSubC=nC,isCompressible=true);
extends Modelica.Media.IdealGases.Common.MixtureGasNasa(
mediumName="MediaMonomeld",
data={Modelica.Media.IdealGases.Common.SingleGasesData.N2,Modelica.Media.IdealGases.Common.SingleGasesData.O2,
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo
index 133f5bc5..c689fdcb 100644
--- a/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.mo
@@ -1,5 +1,6 @@
within ThermoSysPro.Properties.Media;
partial package PartialSubCMedium
constant Integer nSubC;
+ constant Boolean isCompressible;
end PartialSubCMedium;
diff --git a/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order
index d5bff50f..62ead749 100644
--- a/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order
+++ b/ThermoSysPro/Properties/Media/PartialSubCMedium/package.order
@@ -1,4 +1,5 @@
nSubC
+isCompressible
partialPhasesSeparation
HomogeneousPhasesSeparation
C_BiPhase
diff --git a/ThermoSysPro/Properties/Media/WaterSteam/package.mo b/ThermoSysPro/Properties/Media/WaterSteam/package.mo
index b47b1c4c..12e82bc9 100644
--- a/ThermoSysPro/Properties/Media/WaterSteam/package.mo
+++ b/ThermoSysPro/Properties/Media/WaterSteam/package.mo
@@ -2,6 +2,7 @@ within ThermoSysPro.Properties.Media;
package WaterSteam "1 - Water/steam properties library (IAPWS-IF97)"
extends PartialTwoPhaseThermoSysProMedium(
+ isCompressible=true,
mediumName="WaterIF97",
substanceNames={"water"},
singleState=false,
From b71ba451aaa87a75764b2336e413b7f485bf6156 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 16:49:00 +0200
Subject: [PATCH 009/213] #125 VolumeC examples moved to the correct folder
---
.../Fluid/Examples/SimpleExamples/PressureLosses/package.order | 3 ---
.../SimpleExamples/{PressureLosses => Volumes}/TestVolumeC.mo | 2 +-
.../{PressureLosses => Volumes}/TestVolumeC_FlueGases.mo | 2 +-
.../{PressureLosses => Volumes}/TestVolumeC_Traces.mo | 2 +-
.../Fluid/Examples/SimpleExamples/Volumes/package.order | 3 +++
5 files changed, 6 insertions(+), 6 deletions(-)
rename ThermoSysPro/Fluid/Examples/SimpleExamples/{PressureLosses => Volumes}/TestVolumeC.mo (94%)
rename ThermoSysPro/Fluid/Examples/SimpleExamples/{PressureLosses => Volumes}/TestVolumeC_FlueGases.mo (95%)
rename ThermoSysPro/Fluid/Examples/SimpleExamples/{PressureLosses => Volumes}/TestVolumeC_Traces.mo (95%)
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
index 52916924..eb3436e6 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
@@ -1,6 +1,3 @@
TestPipePressureLoss
TestPipePressureLoss_FlueGases
TestPipePressureLoss_Traces
-TestVolumeC
-TestVolumeC_FlueGases
-TestVolumeC_Traces
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo
similarity index 94%
rename from ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo
rename to ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo
index 32a60055..31eb2b99 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes;
model TestVolumeC
extends ThermoSysPro.UsersGuide.Icons.Example;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
similarity index 95%
rename from ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo
rename to ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
index 1b40a056..0c4f3674 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_FlueGases.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes;
model TestVolumeC_FlueGases
extends ThermoSysPro.UsersGuide.Icons.Example;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo
similarity index 95%
rename from ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo
rename to ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo
index c455a404..457a8afe 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestVolumeC_Traces.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo
@@ -1,4 +1,4 @@
-within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes;
model TestVolumeC_Traces
extends ThermoSysPro.UsersGuide.Icons.Example;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
index e69de29b..f5870693 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
@@ -0,0 +1,3 @@
+TestVolumeC
+TestVolumeC_FlueGases
+TestVolumeC_Traces
From 4fd0c0a1b0aef1628f1eca7d4b37c66d41ed7865 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 16:55:21 +0200
Subject: [PATCH 010/213] #125 VolumeC FlueGases with startValue for
OpenModelica
---
.../Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
index 0c4f3674..fe58ef01 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
@@ -12,7 +12,7 @@ model TestVolumeC_FlueGases
P0=4500000,
T0=573.15,
option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(
redeclare replaceable package Medium = Medium,
T0=573.15,
From 408236adb6c0b799cab588235ec23a6485f8cdf0 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Thu, 22 May 2025 17:11:18 +0200
Subject: [PATCH 011/213] #125 SaS in VolumeC defined from Properties so that
no Warnings
---
ThermoSysPro/Fluid/Volumes/VolumeC.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeC.mo b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
index c67202f8..ff559ee6 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeC.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
@@ -4,7 +4,7 @@ model VolumeC "Mixing volume with 3 inlets and 1 outlet"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
- replaceable function SaS = Medium.noSaS (SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = ThermoSysPro.Properties.Media.PartialSubCMedium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
"true: dynamic energy balance equation - false: static energy balance equation";
parameter Units.SI.Volume V=1
From ab9b85a7d4e7f1820645a58c6efe8d38e72e1ff4 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Fri, 23 May 2025 09:11:08 +0200
Subject: [PATCH 012/213] #125 Modified TSP version to 5.0
---
ThermoSysPro/package.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ThermoSysPro/package.mo b/ThermoSysPro/package.mo
index 3c7dee3b..42837b37 100644
--- a/ThermoSysPro/package.mo
+++ b/ThermoSysPro/package.mo
@@ -126,5 +126,5 @@ annotation (
Copyright © EDF 2002 - 2024
ThermoSysPro version 4.1
"),
- version="4.1");
+ version="5.0");
end ThermoSysPro;
From 6b678e5844e5f1d086103c28667a933ce37fb3f9 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Fri, 23 May 2025 10:12:07 +0200
Subject: [PATCH 013/213] #125 Dryer
---
.../SimpleExamples/Junctions/TestDryer.mo | 16 +++
.../Junctions/TestDryer_Traces.mo | 16 +++
.../SimpleExamples/Junctions/package.order | 2 +
.../PhasesSeparation.mo | 18 +++
.../WaterSteam_NonVolatileTrace/package.mo | 5 +
.../WaterSteam_NonVolatileTrace/package.order | 1 +
.../Examples/SimpleExamples/Media/package.mo | 116 ++++++++++++++++++
.../SimpleExamples/Media/package.order | 1 +
.../Examples/SimpleExamples/package.order | 1 +
ThermoSysPro/Fluid/Junctions/SteamDryer.mo | 76 +++++-------
ThermoSysPro/Fluid/Volumes/VolumeC.mo | 4 +-
11 files changed, 206 insertions(+), 50 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo
new file mode 100644
index 00000000..ed49127a
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo
@@ -0,0 +1,16 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions;
+model TestDryer
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, h0=2e6)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-14},{10,6}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink_cond(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-40},{50,-20}})));
+equation
+ connect(sourcePQ.C, steamDryer.Cev) annotation (Line(points={{-30,0},{-9.9,0}}, color={0,0,0}));
+ connect(sink.C, steamDryer.Csv) annotation (Line(points={{30,0},{9.9,0}}, color={0,0,0}));
+ connect(steamDryer.Csl, sink_cond.C) annotation (Line(points={{0.1,-14},{0.1,-30},{30,-30}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestDryer;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo
new file mode 100644
index 00000000..72b8fd1f
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo
@@ -0,0 +1,16 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions;
+model TestDryer_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, h0=2e6,
+ SubC0={1}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare replaceable package Medium = Medium, redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=steamDryer.xe)) annotation (Placement(transformation(extent={{-10,-14},{10,6}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink_cond(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-40},{50,-20}})));
+equation
+ connect(sourcePQ.C, steamDryer.Cev) annotation (Line(points={{-30,0},{-9.9,0}}, color={0,0,0}));
+ connect(sink.C, steamDryer.Csv) annotation (Line(points={{30,0},{9.9,0}}, color={0,0,0}));
+ connect(steamDryer.Csl, sink_cond.C) annotation (Line(points={{0.1,-14},{0.1,-30},{30,-30}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestDryer_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order
index e69de29b..0779eefb 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order
@@ -0,0 +1,2 @@
+TestDryer
+TestDryer_Traces
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo
new file mode 100644
index 00000000..d1d7026a
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo
@@ -0,0 +1,18 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace;
+function PhasesSeparation
+ extends partialPhasesSeparation;
+ input Real x(min=0, max=1) "Title";
+
+algorithm
+ // // HomogeneousSubstance
+ // C_record.Cl := SubC;
+ // C_record.Cg := SubC;
+
+ // Non-volatile
+ C_record.Cl := SubC/(1 - x);
+ C_record.Cg := fill(0, size(SubC, 1));
+
+ // // Fully-volatile
+ // C_record.Cl := fill(0,size(SubC,1));
+ // C_record.Cg := SubC / x;
+end PhasesSeparation;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo
new file mode 100644
index 00000000..09644f8a
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo
@@ -0,0 +1,5 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Media;
+package WaterSteam_NonVolatileTrace
+ extends Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2});
+
+end WaterSteam_NonVolatileTrace;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order
new file mode 100644
index 00000000..11ebc226
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order
@@ -0,0 +1 @@
+PhasesSeparation
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo
new file mode 100644
index 00000000..92af1d3a
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo
@@ -0,0 +1,116 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples;
+package Media
+
+ annotation (Icon(graphics={
+ Text(
+ extent={{-102,0},{24,-26}},
+ lineColor={242,148,0},
+ textString=
+ "Thermo"),
+ Text(
+ extent={{-4,8},{68,-34}},
+ lineColor={46,170,220},
+ textString=
+ "SysPro"),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,30},{-6,26}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,36},{-6,32}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,42},{-6,38}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-8,48},{-6,44}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,32},{-2,28}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,38},{-2,34}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,44},{-2,40}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Rectangle(
+ extent={{-4,50},{-2,46}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Polygon(
+ points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}},
+ lineColor={242,148,0},
+ fillColor={242,148,0},
+ fillPattern=FillPattern.Solid),
+ Line(
+ points={{22,12},{22,14},{22,16},{24,14},{20,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{26,12},{26,14},{26,16},{28,14},{24,18}},
+ color={46,170,220},
+ thickness=0.5),
+ Line(
+ points={{30,10},{30,12},{30,14},{32,12},{28,16}},
+ color={46,170,220},
+ thickness=0.5),
+ Polygon(
+ points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}},
+ lineColor={46,170,220},
+ fillColor={46,170,220},
+ fillPattern=FillPattern.Solid),
+ Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}),
+ Line(
+ points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}},
+ color={0,0,255},
+ smooth=Smooth.None),
+ Line(
+ points={{80,80},{100,100}},
+ color={0,0,255},
+ smooth=Smooth.None)}));
+end Media;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order
new file mode 100644
index 00000000..cc36f421
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order
@@ -0,0 +1 @@
+WaterSteam_NonVolatileTrace
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
index 4d0be736..6f19330f 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order
@@ -8,3 +8,4 @@ Machines
PressureLosses
Sensors
Volumes
+Media
diff --git a/ThermoSysPro/Fluid/Junctions/SteamDryer.mo b/ThermoSysPro/Fluid/Junctions/SteamDryer.mo
index b6956a1a..4bd0555c 100644
--- a/ThermoSysPro/Fluid/Junctions/SteamDryer.mo
+++ b/ThermoSysPro/Fluid/Junctions/SteamDryer.mo
@@ -1,33 +1,32 @@
within ThermoSysPro.Fluid.Junctions;
model SteamDryer "Steam dryer"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = ThermoSysPro.Properties.Media.PartialSubCMedium.noSaS(SubC = Cev.SubC) annotation (choicesAllMatching=true,Dialog(tab="Fluid", group="Medium"));
+ replaceable function PhasesSeparationFunction = ThermoSysPro.Properties.Media.PartialSubCMedium.HomogeneousPhasesSeparation(SubC = Cev.SubC) annotation (choicesAllMatching=true,Dialog(tab="Fluid", group="Medium"));
parameter Real eta=1 "Steam dryer efficiency (0 <= eta <= 1)";
parameter Boolean continuous_flow_reversal=false
"true: continuous flow reversal - false: discontinuous flow reversal";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region_e=IF97Region.All_regions "IF97 region at the inlet (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ parameter IF97Region region_e=IF97Region.All_regions "IF97 region at the inlet (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
protected
parameter Units.SI.MassFlowRate gamma0=1.e-4
"Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)";
parameter Integer mode_e=Integer(region_e) - 1 "IF97 region at the inlet. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
- parameter Integer fluid=Integer(ftype) "Fluid number";
+ Medium.C_BiPhase C_record;
public
Units.SI.AbsolutePressure P(start=10e5) "Fluid pressure";
Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy";
+ Units.SI.Density rho(start=1.0) "Fluid density at inlet";
Real xe(start=1.0) "Vapor mass fraction at the inlet";
- FluidType fluids[4] "Fluids mixing in volume";
- ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction";
+ Medium.ExtraProperty X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Fluid mass fraction";
+ Medium.ExtraProperty SubCSaS[Medium.nC](quantity=Medium.extraPropertiesNames) "Trace modification in the trace balance equation";
Units.SI.Power Jev "Thermal power diffusion from inlet ev";
Units.SI.Power Jsv "Thermal power diffusion from outlet sv";
Units.SI.Power Jsl "Thermal power diffusion from outlet sl";
@@ -40,31 +39,16 @@ public
Real rsl "Value of r(Q/gamma) for outlet sl";
public
- ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proe
- annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cev annotation (Placement(
+ Medium.SaturationProperties sat;
+ Medium.ThermodynamicState state_e;
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cev(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-109,30},{-89,50}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Csv annotation (
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Csv(redeclare package Medium = Medium) annotation (
Placement(transformation(extent={{89,30},{109,50}}, rotation=0)));
- ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat1
- annotation (Placement(transformation(extent={{-100,-98},{-80,-78}},
- rotation=0)));
- ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat1
- annotation (Placement(transformation(extent={{-76,-98},{-56,-78}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Csl annotation (
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Csl(redeclare package Medium = Medium) annotation (
Placement(transformation(extent={{-9,-110},{11,-90}}, rotation=0)));
equation
- /* Check that incoming fluids are compatible with fluid in volume */
- fluids[1] = ftype;
- fluids[2] = Cev.ftype;
- fluids[3] = Csv.ftype;
- fluids[4] = Csl.ftype;
-
- assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids),
- "SteamDryer: fluids mixing in volume are not compatible with each other");
/* Check that eta is between 0 and 1 */
assert((eta >= 0) and (eta <= 1), "SteamDryer - Parameter eta should be >= 0 and <= 1");
@@ -84,26 +68,21 @@ equation
Cev.h_vol_2 = h;
Csv.h_vol_1 = h;
- Csl.h_vol_1 = noEvent(if (xe > 0) then lsat1.h else Cev.h);
+ Csl.h_vol_1 = noEvent(if (xe > 0) then Medium.bubbleEnthalpy(sat) else Cev.h);
/* Fluid composition balance equations*/
- 0 = Cev.Xco2*Cev.Q - Csv.Xco2*Csv.Q - Csl.Xco2*Csl.Q;
- 0 = Cev.Xh2o*Cev.Q - Csv.Xh2o*Csv.Q - Csl.Xh2o*Csl.Q;
- 0 = Cev.Xo2*Cev.Q - Csv.Xo2*Csv.Q - Csl.Xo2*Csl.Q;
- 0 = Cev.Xso2*Cev.Q - Csv.Xso2*Csv.Q - Csl.Xso2*Csl.Q;
+ Cev.Xi*Cev.Q = Csv.Xi*Csv.Q + Csl.Xi*Csl.Q;
+
+ Csv.Xi = X;
+ Csl.Xi = X;
- Csv.ftype = ftype;
- Csl.ftype = ftype;
+ /* Traces composition balance equations */
+ C_record = PhasesSeparationFunction();
+ Csv.SubC = C_record.Cg;
- Csv.Xco2 = Xco2;
- Csv.Xh2o = Xh2o;
- Csv.Xo2 = Xo2;
- Csv.Xso2 = Xso2;
+ Csv.Q*Csv.SubC + Csl.Q*Csl.SubC = Cev.Q*Cev.SubC + SubCSaS * Cev.Q;
- Csl.Xco2 = Xco2;
- Csl.Xh2o = Xh2o;
- Csl.Xo2 = Xo2;
- Csl.Xso2 = Xso2;
+ SubCSaS = SaS();
/* Flow reversal */
if continuous_flow_reversal then
@@ -152,13 +131,14 @@ equation
Csl.diff_on_1 = diffusion;
/* Fluid thermodynamic properties */
- proe = ThermoSysPro.Properties.Fluid.Ph(Cev.P, Cev.h, mode_e, fluid);
+ state_e=Medium.setState_phX(p=Cev.P, h=Cev.h, X=Cev.Xi, region=mode_e);
+ rho = state_e.d;
/* Vapor mass fraction at the inlet */
- xe = proe.x;
+ xe=Medium.vapourQuality(state_e);
/* Fluid thermodynamic properties at the saturation point */
- (lsat1,vsat1) = ThermoSysPro.Properties.Fluid.Water_sat_P(Cev.P, fluid);
+ sat = Medium.setSat_p(Cev.P);
annotation (
Diagram(coordinateSystem(
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeC.mo b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
index ff559ee6..1de3a36a 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeC.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
@@ -52,9 +52,9 @@ public
Units.SI.DerDensityByEnthalpy ddhp
"density derivative wrt specific enthalpy at constant pressure";
Units.SI.MassFlowRate BX[Medium.nXi] "Right hand side of the X balance equation";
- Medium.ExtraProperty X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Boundary trace substances";
+ Medium.ExtraProperty X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Fluid mass fraction";
Medium.ExtraProperty BSubC[Medium.nC](quantity=Medium.extraPropertiesNames) "Right hand side of the trace balance equation";
- Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Boundary trace substances";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Fluid trace substances";
Medium.ExtraProperty SubCSaS[Medium.nC](quantity=Medium.extraPropertiesNames) "Trace modification in the trace balance equation";
Medium.ThermodynamicState state;
Units.SI.Power Je1 "Thermal power diffusion from inlet e1";
From 06cb25922bf7d9cef91d921e03c8f0beea017f0e Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Fri, 23 May 2025 10:53:15 +0200
Subject: [PATCH 014/213] #125 no more replaceable in redeclaration example so
that no warnings, and no partial lookup for OpenModelica
---
.../Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo | 2 +-
.../Examples/SimpleExamples/Junctions/TestDryer_Traces.mo | 2 +-
.../Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo | 2 +-
.../Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo | 2 +-
.../Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo | 2 +-
ThermoSysPro/Fluid/Junctions/SteamDryer.mo | 4 ++--
ThermoSysPro/Fluid/Volumes/VolumeC.mo | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo
index ed49127a..6bb1a642 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo
@@ -6,7 +6,7 @@ model TestDryer
ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, h0=2e6)
annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-14},{10,6}})));
+ ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-14},{10,6}})));
ThermoSysPro.Fluid.BoundaryConditions.Sink sink_cond(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-40},{50,-20}})));
equation
connect(sourcePQ.C, steamDryer.Cev) annotation (Line(points={{-30,0},{-9.9,0}}, color={0,0,0}));
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo
index 72b8fd1f..a78582a8 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo
@@ -6,7 +6,7 @@ model TestDryer_Traces
ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, h0=2e6,
SubC0={1}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare replaceable package Medium = Medium, redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=steamDryer.xe)) annotation (Placement(transformation(extent={{-10,-14},{10,6}})));
+ ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare package Medium = Medium, redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=steamDryer.xe)) annotation (Placement(transformation(extent={{-10,-14},{10,6}})));
ThermoSysPro.Fluid.BoundaryConditions.Sink sink_cond(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-40},{50,-20}})));
equation
connect(sourcePQ.C, steamDryer.Cev) annotation (Line(points={{-30,0},{-9.9,0}}, color={0,0,0}));
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo
index 31eb2b99..60ba1d38 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo
@@ -5,7 +5,7 @@ model TestVolumeC
replaceable package Medium = Properties.Media.WaterSteam;
ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
equation
connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
index fe58ef01..e17f46c6 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo
@@ -12,7 +12,7 @@ model TestVolumeC_FlueGases
P0=4500000,
T0=573.15,
option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(
redeclare replaceable package Medium = Medium,
T0=573.15,
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo
index 457a8afe..77037832 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo
@@ -6,7 +6,7 @@ model TestVolumeC_Traces
ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.2})
annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.1})
annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
equation
diff --git a/ThermoSysPro/Fluid/Junctions/SteamDryer.mo b/ThermoSysPro/Fluid/Junctions/SteamDryer.mo
index 4bd0555c..a0363f2d 100644
--- a/ThermoSysPro/Fluid/Junctions/SteamDryer.mo
+++ b/ThermoSysPro/Fluid/Junctions/SteamDryer.mo
@@ -5,8 +5,8 @@ model SteamDryer "Steam dryer"
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
- replaceable function SaS = ThermoSysPro.Properties.Media.PartialSubCMedium.noSaS(SubC = Cev.SubC) annotation (choicesAllMatching=true,Dialog(tab="Fluid", group="Medium"));
- replaceable function PhasesSeparationFunction = ThermoSysPro.Properties.Media.PartialSubCMedium.HomogeneousPhasesSeparation(SubC = Cev.SubC) annotation (choicesAllMatching=true,Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = Medium.noSaS(SubC = Cev.SubC) annotation (choicesAllMatching=true,Dialog(tab="Fluid", group="Medium"));
+ replaceable function PhasesSeparationFunction = Medium.HomogeneousPhasesSeparation(SubC = Cev.SubC) annotation (choicesAllMatching=true,Dialog(tab="Fluid", group="Medium"));
parameter Real eta=1 "Steam dryer efficiency (0 <= eta <= 1)";
parameter Boolean continuous_flow_reversal=false
"true: continuous flow reversal - false: discontinuous flow reversal";
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeC.mo b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
index 1de3a36a..5d9b59ac 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeC.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
@@ -4,7 +4,7 @@ model VolumeC "Mixing volume with 3 inlets and 1 outlet"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
- replaceable function SaS = ThermoSysPro.Properties.Media.PartialSubCMedium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = Medium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
"true: dynamic energy balance equation - false: static energy balance equation";
parameter Units.SI.Volume V=1
From 5f858097556a9062e583e6519007e83b0ed3be89 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Fri, 23 May 2025 11:51:43 +0200
Subject: [PATCH 015/213] #125 SingularPressureLoss
---
.../TestSingularPressureLoss.mo | 22 ++++++++++++++
.../TestSingularPressureLoss_Traces.mo | 22 ++++++++++++++
...stSingularPressureLoss_Traces_FlueGases.mo | 24 +++++++++++++++
.../PressureLosses/package.order | 3 ++
.../PressureLosses/SingularPressureLoss.mo | 30 +++++++++----------
5 files changed, 85 insertions(+), 16 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo
new file mode 100644
index 00000000..2b78a5a7
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo
@@ -0,0 +1,22 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestSingularPressureLoss
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+ ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(
+ redeclare replaceable package Medium = Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium)
+ annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(singularPressureLoss.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(singularPressureLoss.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestSingularPressureLoss;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo
new file mode 100644
index 00000000..c67d6dd3
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo
@@ -0,0 +1,22 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestSingularPressureLoss_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+ ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(
+ redeclare replaceable package Medium = Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium)
+ annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium, SubC0={10,20,30})
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(singularPressureLoss.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(singularPressureLoss.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestSingularPressureLoss_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo
new file mode 100644
index 00000000..a13b12e3
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo
@@ -0,0 +1,24 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestSingularPressureLoss_Traces_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+ ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(
+ redeclare replaceable package Medium = Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium, option_temperature=true)
+ annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium, SubC0={10,20,30},
+ X0={0.1,0.2,0.3,0.2,0.2},
+ option_temperature=true)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(singularPressureLoss.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(singularPressureLoss.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestSingularPressureLoss_Traces_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
index eb3436e6..21b7a582 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
@@ -1,3 +1,6 @@
TestPipePressureLoss
TestPipePressureLoss_FlueGases
TestPipePressureLoss_Traces
+TestSingularPressureLoss
+TestSingularPressureLoss_Traces
+TestSingularPressureLoss_Traces_FlueGases
diff --git a/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo b/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
index e055743c..c9f6a9b7 100644
--- a/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
@@ -1,17 +1,15 @@
within ThermoSysPro.Fluid.PressureLosses;
model SingularPressureLoss "Singular pressure loss"
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Real K=1.e-4 "Pressure loss coefficient";
parameter Units.SI.MassFlowRate gamma_diff=1e-4
"Diffusion conductance (active if diffusion=true in neighbouring volumes)";
parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
protected
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
parameter Real eps=1.e-3 "Small number for pressure loss equation";
public
@@ -21,13 +19,14 @@ public
Units.SI.Temperature T(start=290) "Fluid temperature";
Units.SI.AbsolutePressure Pm(start=1.e5) "Average fluid pressure";
Units.SI.SpecificEnthalpy h(start=100000) "Fluid specific enthalpy";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
+
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
+
equation
C1.Q = C2.Q;
@@ -42,18 +41,17 @@ equation
C2.diff_res_1 = C1.diff_res_1 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
C1.diff_res_2 = C2.diff_res_2 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
- C1.ftype = C2.ftype;
+ C1.Xi = C2.Xi;
+
+ X = C1.Xi;
+
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.SubC = C2.SubC;
Q = C1.Q;
h = C1.h;
deltaP = C1.P - C2.P;
- ftype = C1.ftype;
/* Pressure loss */
deltaP = K*ThermoSysPro.Functions.ThermoSquare(Q, eps)/rho;
@@ -61,12 +59,12 @@ equation
/* Fluid thermodynamic properties */
Pm = (C1.P + C2.P)/2;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ T = Medium.temperature_phX(p=Pm, h=h, X=X);
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ rho = Medium.density_phX(p=Pm, h=h, X=X);
end if;
annotation (
From 0ebe873bcb9c6dc06080da1aaa9b8ccce76eeade Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Fri, 23 May 2025 13:15:44 +0200
Subject: [PATCH 016/213] #125-SingularPressureLoss added color extend for OM
compatibility
---
ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo b/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
index c9f6a9b7..583f3511 100644
--- a/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
@@ -1,6 +1,6 @@
within ThermoSysPro.Fluid.PressureLosses;
model SingularPressureLoss "Singular pressure loss"
-
+extends ThermoSysPro.Fluid.Interfaces.IconColors;
replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Real K=1.e-4 "Pressure loss coefficient";
From f8be2834afcc4776561074fbd47b110cf7dc57ff Mon Sep 17 00:00:00 2001
From: HOCINE-RASTIC Sarah
Date: Wed, 28 May 2025 12:05:15 +0200
Subject: [PATCH 017/213] #125 VolumeA
---
.../SimpleExamples/Volumes/TestVolumeA.mo | 19 ++
.../Volumes/TestVolumeA_FlueGases.mo | 26 +++
.../Volumes/TestVolumeA_Traces.mo | 26 +++
.../SimpleExamples/Volumes/package.order | 3 +
ThermoSysPro/Fluid/Volumes/VolumeA.mo | 178 ++++++------------
5 files changed, 133 insertions(+), 119 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo
new file mode 100644
index 00000000..13e231d2
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo
@@ -0,0 +1,19 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes;
+model TestVolumeA
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
+equation
+ connect(sourcePQ.C,volumeA. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(volumeA.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0}));
+ connect(volumeA.Cs1, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestVolumeA;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo
new file mode 100644
index 00000000..fe764acd
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo
@@ -0,0 +1,26 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes;
+model TestVolumeA_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.FlueGases;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium,
+ P0=4500000,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
+equation
+ connect(sourcePQ.C,volumeA. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(volumeA.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0}));
+ connect(volumeA.Cs1, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestVolumeA_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo
new file mode 100644
index 00000000..35f5de29
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo
@@ -0,0 +1,26 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes;
+model TestVolumeA_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam (extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2});
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium,
+ Q0=100,
+ SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium,
+ V=1,
+ dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-10,-10},
+ {10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package Medium = Medium,
+ SubC0={0.2}) annotation (Placement(transformation(extent={{-50,20},{-30,40}})));
+equation
+ connect(sourcePQ.C,volumeA. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(volumeA.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,
+ 30}}, color={0,0,0}));
+ connect(volumeA.Cs1, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
+end TestVolumeA_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
index f5870693..f71ca450 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
@@ -1,3 +1,6 @@
TestVolumeC
TestVolumeC_FlueGases
TestVolumeC_Traces
+TestVolumeA
+TestVolumeA_FlueGases
+TestVolumeA_Traces
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeA.mo b/ThermoSysPro/Fluid/Volumes/VolumeA.mo
index 4677b61e..fad042ec 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeA.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeA.mo
@@ -1,10 +1,10 @@
-within ThermoSysPro.Fluid.Volumes;
+within ThermoSysPro.Fluid.Volumes;
model VolumeA "Mixing volume with 2 inlets and 2 outlets"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = Medium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
"true: dynamic energy balance equation - false: static energy balance equation";
@@ -29,42 +29,19 @@ model VolumeA "Mixing volume with 2 inlets and 2 outlets"
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+
parameter Boolean dynamic_composition_balance=false
"true: dynamic fluid composition balance equation
false: static fluid composition balance equation (active for flue gases)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.FlueGases), tab="Fluid", group="Fluid properties"));
- parameter ThermoSysPro.Units.SI.MassFraction Xco20=0.0
- "Initial CO2 mass fraction" annotation (Evaluate=true, Dialog(
+ parameter Medium.ExtraProperty X0[Medium.nX]=Medium.X_default "Initial composition values" annotation (Evaluate=true, Dialog(
enable=dynamic_composition_balance,
tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o0=if ftype == FluidType.FlueGases then 0.05 else 0
- "Initial H20 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo20=0.23
- "Initial O2 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso20=0
- "Initial SO2 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
+ group="Medium"));
protected
- constant Units.SI.SpecificEnthalpy hr=2501569
- "Water/steam reference specific enthalpy at 0.01°C";
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
- parameter Units.SI.MassFlowRate gamma0=1.e-4
+ constant Boolean isCompressible = Medium.isCompressible;
+ parameter Units.SI.MassFlowRate gamma0=1.e-4
"Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
public
Units.SI.Temperature T "Fluid temperature";
@@ -77,15 +54,12 @@ public
"density derivative wrt pressure at constant specific enthalpy";
Units.SI.DerDensityByEnthalpy ddhp
"density derivative wrt specific enthalpy at constant pressure";
- FluidType fluids[5] "Fluids mixing in volume";
- Units.SI.MassFlowRate BXco2 "Right hand side of the CO2 balance equation";
- Units.SI.MassFlowRate BXh2o "Right hand side of the H2O balance equation";
- Units.SI.MassFlowRate BXo2 "Right hand side of the O2 balance equation";
- Units.SI.MassFlowRate BXso2 "Right hand side of the SO2 balance equation";
- ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction";
+ Units.SI.MassFlowRate BX[Medium.nXi] "Right hand side of the X balance equation";
+ Medium.ExtraProperty X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Fluid mass fraction";
+ Medium.ExtraProperty BSubC[Medium.nC](quantity=Medium.extraPropertiesNames) "Right hand side of the trace balance equation";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Fluid trace substances";
+ Medium.ExtraProperty SubCSaS[Medium.nC](quantity=Medium.extraPropertiesNames) "Trace modification in the trace balance equation";
+ Medium.ThermodynamicState state;
Units.SI.Power Je1 "Thermal power diffusion from inlet e1";
Units.SI.Power Je2 "Thermal power diffusion from inlet e2";
Units.SI.Power Js1 "Thermal power diffusion from outlet s1";
@@ -101,14 +75,14 @@ public
Real rs2 "Value of r(Q/gamma) for outlet s2";
public
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1( redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2( redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-10,90},{10,110}}, rotation=0),
iconTransformation(extent={{-10,90},{10,110}})));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs1 annotation (
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs1( redeclare package Medium = Medium) annotation (
Placement(transformation(extent={{90,-10},{110,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs2 annotation (
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs2( redeclare package Medium = Medium) annotation (
Placement(transformation(extent={{-10,-110},{10,-90}}, rotation=0)));
initial equation
if dynamic_energy_balance and dynamic_mass_balance then
@@ -127,19 +101,11 @@ initial equation
end if;
end if;
- if flue_gases then
- if dynamic_composition_balance then
- if steady_state then
- der(Xco2) = 0;
- der(Xh2o) = 0;
- der(Xo2) = 0;
- der(Xso2) = 0;
- else
- Xco2 = Xco20;
- Xh2o = Xh2o0;
- Xo2 = Xo20;
- Xso2 = Xso20;
- end if;
+ if dynamic_composition_balance then
+ if steady_state then
+ der(X) = fill(0,Medium.nX);
+ else
+ X = X0[1:Medium.nXi];
end if;
end if;
@@ -149,16 +115,6 @@ equation
assert(V > 0, "Volume non-positive");
end if;
- /* Check that incoming fluids are compatible with fluid in volume */
- fluids[1] = ftype;
- fluids[2] = Ce1.ftype;
- fluids[3] = Ce2.ftype;
- fluids[4] = Cs1.ftype;
- fluids[5] = Cs2.ftype;
-
- assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids),
- "VolumeA: fluids mixing in volume are not compatible with each other");
-
/* Unconnected connectors */
if (cardinality(Ce1) == 0) then
Ce1.Q = 0;
@@ -166,11 +122,8 @@ equation
Ce1.h_vol_1 = 1.e5;
Ce1.diff_res_1 = 0;
Ce1.diff_on_1 = false;
- Ce1.ftype = ftype;
- Ce1.Xco2 = 0;
- Ce1.Xh2o = 0;
- Ce1.Xo2 = 0;
- Ce1.Xso2 = 0;
+ Ce1.Xi = Medium.X_default[1:Medium.nXi];
+ Ce1.SubC = Medium.C_default;
end if;
if (cardinality(Ce2) == 0) then
@@ -179,11 +132,8 @@ equation
Ce2.h_vol_1 = 1.e5;
Ce2.diff_res_1 = 0;
Ce2.diff_on_1 = false;
- Ce2.ftype = ftype;
- Ce2.Xco2 = 0;
- Ce2.Xh2o = 0;
- Ce2.Xo2 = 0;
- Ce2.Xso2 = 0;
+ Ce2.Xi = Medium.X_default[1:Medium.nXi];
+ Ce2.SubC = Medium.C_default;
end if;
if (cardinality(Cs1) == 0) then
@@ -204,7 +154,7 @@ equation
BQ = Ce1.Q + Ce2.Q - Cs1.Q - Cs2.Q;
if isCompressible and dynamic_energy_balance and dynamic_mass_balance then
- V*(ddph*der(P) + ddhp*der(h - Xh2o*hr)) = BQ;
+ V*(ddph*der(P) + ddhp*der(h)) = BQ;
else
0 = BQ;
end if;
@@ -215,13 +165,13 @@ equation
P = Cs2.P;
/* Energy balance equation */
- BH = Ce1.Q*(Ce1.h - Ce1.Xh2o*hr) + Ce2.Q*(Ce2.h - Ce2.Xh2o*hr) - Cs1.Q*(Cs1.h - Cs1.Xh2o*hr) - Cs2.Q*(Cs2.h - Cs2.Xh2o*hr) + J;
+ BH = Ce1.Q*Ce1.h + Ce2.Q*Ce2.h - Cs1.Q*Cs1.h - Cs2.Q*Cs2.h + J;
if dynamic_energy_balance then
if dynamic_mass_balance then
- V*(((h - Xh2o*hr)*ddph - 1)*der(P) + ((h - Xh2o*hr)*ddhp + rho)*der(h - Xh2o*hr)) = BH;
+ V*((h*ddph - 1)*der(P) + (h*ddhp + rho)*der(h)) = BH;
else
- V*rho*der(h - Xh2o*hr) = BH;
+ V*rho*der(h) = BH;
end if;
else
BH = 0;
@@ -233,42 +183,30 @@ equation
Cs2.h_vol_1 = h;
/* Fluid composition balance equations */
- BXco2 = Ce1.Xco2*Ce1.Q + Ce2.Xco2*Ce2.Q - Cs1.Xco2*Cs1.Q - Cs2.Xco2*Cs2.Q;
- BXh2o = Ce1.Xh2o*Ce1.Q + Ce2.Xh2o*Ce2.Q - Cs1.Xh2o*Cs1.Q - Cs2.Xh2o*Cs2.Q;
- BXo2 = Ce1.Xo2*Ce1.Q + Ce2.Xo2*Ce2.Q - Cs1.Xo2*Cs1.Q - Cs2.Xo2*Cs2.Q;
- BXso2 = Ce1.Xso2*Ce1.Q + Ce2.Xso2*Ce2.Q - Cs1.Xso2*Cs1.Q - Cs2.Xso2*Cs2.Q;
-
- if flue_gases then
- if dynamic_composition_balance then
- V*rho*der(Xco2) + Xco2*BQ = BXco2;
- V*rho*der(Xh2o) + Xh2o*BQ = BXh2o;
- V*rho*der(Xo2) + Xo2*BQ = BXo2;
- V*rho*der(Xso2) + Xso2*BQ = BXso2;
- else
- Xco2*BQ = BXco2;
- Xh2o*BQ = BXh2o;
- Xo2*BQ = BXo2;
- Xso2*BQ = BXso2;
- end if;
+ BX = Ce1.Xi*Ce1.Q + Ce2.Xi*Ce2.Q - Cs1.Xi*Cs1.Q - Cs2.Xi*Cs2.Q;
+
+ if dynamic_composition_balance then
+ V*rho*der(X) + X*BQ = BX;
else
- Xco2 = 0;
- Xh2o = 0;
- Xo2 = 0;
- Xso2 = 0;
+ X*BQ = BX;
end if;
- Cs1.ftype = ftype;
- Cs2.ftype = ftype;
+ Cs1.Xi = X;
- Cs1.Xco2 = Xco2;
- Cs1.Xh2o = Xh2o;
- Cs1.Xo2 = Xo2;
- Cs1.Xso2 = Xso2;
+ Cs2.Xi = X;
- Cs2.Xco2 = Xco2;
- Cs2.Xh2o = Xh2o;
- Cs2.Xo2 = Xo2;
- Cs2.Xso2 = Xso2;
+ /* Traces composition balance equations */
+ BSubC = Ce1.Q*Ce1.SubC + Ce2.Q*Ce2.SubC - Cs1.Q*Cs1.SubC - Cs2.Q*Cs2.SubC;
+
+ SubCSaS = SaS();
+ if dynamic_mass_balance then
+ V*rho*der(SubC) + SubC*BQ + V*rho*SubCSaS = BSubC;
+ else
+ V*rho*SubCSaS = BSubC;
+ end if;
+
+ Cs1.SubC = SubC;
+ Cs2.SubC = SubC;
/* Flow reversal */
if continuous_flow_reversal then
@@ -325,20 +263,22 @@ equation
Cs2.diff_on_1 = diffusion;
/* Fluid thermodynamic properties */
- if isCompressible and dynamic_mass_balance then
- ddph = ThermoSysPro.Properties.Fluid.Density_derp_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
- ddhp = ThermoSysPro.Properties.Fluid.Density_derh_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ if isCompressible and dynamic_mass_balance then
+ ddph = Medium.density_derp_h(state);
+ ddhp = Medium.density_derh_p(state);
else
ddph = 0;
ddhp = 0;
end if;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ state = Medium.setState_phX(p=P, h=h, X=X);
+
+ T = Medium.temperature(state);
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ rho = Medium.density(state);
end if;
annotation (
From 1145b4e5281d5930f7c673ca33ca1da87b96395b Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 15:30:04 +0200
Subject: [PATCH 018/213] #125 StodolaTurbine
---
.../Machines/TestStodolaTurbine.mo | 22 +++++++
.../SimpleExamples/Machines/package.order | 1 +
ThermoSysPro/Fluid/Machines/StodolaTurbine.mo | 59 ++++++++-----------
3 files changed, 48 insertions(+), 34 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
new file mode 100644
index 00000000..4d29ef69
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
@@ -0,0 +1,22 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines;
+model TestStodolaTurbine
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Cst=400000)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
+ P0=4500000,
+ Q0=1800,
+ T0=573.15,
+ option_temperature=true)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink
+ annotation (Placement(transformation(extent={{26,-10},{46,10}})));
+equation
+ connect(sourcePQ.C, stodolaTurbine.Ce)
+ annotation (Line(points={{-30,0},{-10.1,0}}, color={0,0,0}));
+ connect(stodolaTurbine.Cs, sink.C)
+ annotation (Line(points={{10.1,0},{26,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestStodolaTurbine;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
index e69de29b..4bf87c1a 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
@@ -0,0 +1 @@
+TestStodolaTurbine
diff --git a/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo b/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
index 486fc51b..0d8405f8 100644
--- a/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
+++ b/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
@@ -1,6 +1,8 @@
within ThermoSysPro.Fluid.Machines;
model StodolaTurbine "Multistage turbine group using Stodola's ellipse"
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
+extends ThermoSysPro.Fluid.Interfaces.IconColors;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
parameter Real Cst=1.e7 "Stodola's ellipse coefficient";
@@ -27,6 +29,7 @@ model StodolaTurbine "Multistage turbine group using Stodola's ellipse"
parameter IF97Region region_s=IF97Region.All_regions "IF97 region after expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
parameter IF97Region region_ps=IF97Region.All_regions "IF97 region after isentropic expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+
protected
parameter Integer mode_e=Integer(region_e) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
parameter Integer mode_s=Integer(region_s) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
@@ -52,23 +55,17 @@ public
Units.SI.Velocity Vs "Fluid velocity at the outlet";
Units.SI.Density rhos(start=200) "Fluid density at the outlet";
Real xm(start=1.0,min=0) "Average vapor mass fraction";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
public
- ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proe
- annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation=
- 0)));
- ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pros
- annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation=
- 0)));
- Interfaces.Connectors.FluidInlet Ce annotation (Placement(transformation(
+ Medium.ThermodynamicState state_e;
+ Medium.ThermodynamicState state_s1;
+ Medium.ThermodynamicState state_s;
+ Medium.ThermodynamicState state_ps;
+ Interfaces.Connectors.FluidInlet Ce(redeclare package Medium = Medium) annotation (Placement(transformation(
extent={{-111,-10},{-91,10}}, rotation=0)));
- Interfaces.Connectors.FluidOutlet Cs annotation (Placement(transformation(
+ Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (Placement(transformation(
extent={{91,-10},{111,10}}, rotation=0)));
- ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps props
- annotation (Placement(transformation(extent={{-100,-100},{-80,-80}},
- rotation=0)));
ThermoSysPro.ElectroMechanics.Connectors.MechanichalTorque M
annotation (Placement(transformation(
origin={0,-100},
@@ -79,11 +76,7 @@ public
origin={110,-90},
extent={{10,-10},{-10,10}},
rotation=180)));
- ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pros1
- annotation (Placement(transformation(extent={{-20,80},{0,100}}, rotation=0)));
equation
- /* Check that the fluid type is water/steam */
- assert((ftype == FluidType.WaterSteam) or (ftype == FluidType.WaterSteamSimple), "StodolaTurbine: the fluid type must be water/steam");
if (cardinality(M) == 0) then
M.Ctr = 0;
@@ -103,18 +96,16 @@ equation
Cs.diff_res_1 = Ce.diff_res_1 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
Ce.diff_res_2 = Cs.diff_res_2 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
- Ce.ftype = Cs.ftype;
- Ce.Xco2 = Cs.Xco2;
- Ce.Xh2o = Cs.Xh2o;
- Ce.Xo2 = Cs.Xo2;
- Ce.Xso2 = Cs.Xso2;
+ /* Fluid composition balance equations*/
+ Ce.Xi = Cs.Xi;
+ X = Ce.Xi;
+
Q = Ce.Q;
Pe = Ce.P;
Ps = Cs.P;
- ftype = Ce.ftype;
/* Isentropic efficiency */
eta_is = if (Q < Qmax) then (max(eta_is_min,(a*(Q/Qmax)^2 + b*(Q/Qmax) + c))) else eta_is_nom;
@@ -124,14 +115,14 @@ equation
if noEvent((Pe > pcrit) or (Te > Tcrit)) then
xm = 1;
else
- xm = (proe.x + pros1.x)/2.0;
+ xm = (Medium.vapourQuality(state_e) + Medium.vapourQuality(state_s1))/2.0;
end if;
/* Stodola's ellipse law */
if noEvent((Pe > pcrit) or (Te > Tcrit)) then
Q = sqrt((Pe^2 - Ps^2)/(Cst*Te));
else
- Q = sqrt((Pe^2 - Ps^2)/(Cst*Te*proe.x));
+ Q = sqrt((Pe^2 - Ps^2)/(Cst*Te*Medium.vapourQuality(state_e)));
end if;
/* Fluid specific enthalpy after the expansion */
@@ -146,22 +137,22 @@ equation
MechPower.signal = W;
/* Fluid thermodynamic properties before the expansion */
- proe = ThermoSysPro.Properties.Fluid.Ph(Pe, Ce.h, mode_e, fluid);
+ state_e=Medium.setState_phX(p=Pe, h=Ce.h, X=Ce.Xi, region=mode_e);
- Te = proe.T;
+ Te = state_e.T;
/* Fluid thermodynamic properties after the expansion */
- pros1 = ThermoSysPro.Properties.Fluid.Ph(Ps, Hrs, mode_s, fluid);
+ state_s1 = Medium.setState_phX(p=Ps, h=Hrs, X=Cs.Xi, region=mode_s); // X=Cs.Xi ????????????????? Hrs.Xi ??
/* Fluid thermodynamic properties at the outlet of the nozzle */
- pros = ThermoSysPro.Properties.Fluid.Ph(Ps, Cs.h, mode_s, fluid);
+ state_s = Medium.setState_phX(p=Ps, h=Cs.h, X=Cs.Xi, region=mode_s);
- Ts = pros.T;
- rhos = pros.d;
+ Ts = state_s.T;
+ rhos = state_s.d;
/* Fluid thermodynamic properties after the isentropic expansion */
- props = ThermoSysPro.Properties.Fluid.Ps(Ps, proe.s, mode_ps, fluid);
- His = props.h;
+ state_ps = Medium.setState_psX(p=Ps, s=Medium.specificEntropy(state_e), X=Cs.Xi, region=mode_ps); // X=Cs.Xi ?????????????????????
+ His = state_ps.h;
annotation (
Diagram(coordinateSystem(
From ee4063ca622bcf4d04279ce47613f5f15b5d4df2 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 15:58:54 +0200
Subject: [PATCH 019/213] #125 SourceP
---
.../Fluid/BoundaryConditions/SourceP.mo | 65 +++++--------------
1 file changed, 18 insertions(+), 47 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo b/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo
index a9a3641d..8156d294 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo
@@ -1,10 +1,9 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model SourceP "Multi-fluid source with fixed pressure"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.AbsolutePressure P0=300000 "Source pressure";
parameter Units.SI.Temperature T0=290
@@ -19,32 +18,13 @@ model SourceP "Multi-fluid source with fixed pressure"
"true: continuous flow reversal - false: discontinuous flow reversal";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
- parameter ThermoSysPro.Units.SI.MassFraction Xco2=0.01 "CO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o=if ftype == FluidType.FlueGases then 0.05 else 0 "H2O mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo2=0.22 "O2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso2=0 "SO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ group="Medium"));
+ parameter Medium.ExtraProperty X0[Medium.nX]= Medium.X_default "Source mass fraction" annotation (Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
-
-protected
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ group="Medium"));
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
@@ -53,12 +33,12 @@ public
Units.SI.Temperature T(start=300) "Fluid temperature";
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IPressure
- "Fixed pressure"
- annotation (Placement(transformation(extent={{-60,-10},{-40,10}}, rotation=
- 0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C annotation (Placement(
- transformation(extent={{90,-10},{110,10}}, rotation=0)));
- InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
+ "Fixed pressure" annotation (Placement(transformation(extent={{-60,-10},{-40,
+ 10}}, rotation=0)));
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C(redeclare package
+ Medium = Medium) annotation (Placement(transformation(extent={{90,-10},{110,
+ 10}}, rotation=0)));
+ InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
"Fixed specific enthalpy or temperature according to option_temperature"
annotation (Placement(transformation(
origin={0,-50},
@@ -73,19 +53,10 @@ equation
C.diff_res_1 = 0;
C.diff_on_1 = diffusion;
- C.ftype = ftype;
+ C.SubC=SubC0;
+
+ C.Xi = X0[1:Medium.nXi];
- if flue_gases then
- C.Xco2 = Xco2;
- C.Xh2o = Xh2o;
- C.Xo2 = Xo2;
- C.Xso2 = Xso2;
- else
- C.Xco2 = 0;
- C.Xh2o = 0;
- C.Xo2 = 0;
- C.Xso2 = 0;
- end if;
if (cardinality(IPressure) == 0) then
IPressure.signal = P0;
@@ -104,10 +75,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X0);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X0);
end if;
/* Flow reversal */
From dcd8c526c4f1551209893c88ba126a6d69edfc0a Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 16:26:57 +0200
Subject: [PATCH 020/213] #125 SinkQ
---
.../Fluid/BoundaryConditions/SinkQ.mo | 45 +++++++------------
1 file changed, 15 insertions(+), 30 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
index a9a8fc5f..a484d188 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
@@ -1,9 +1,9 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model SinkQ "Multi-fluids sink with fixed mass flow rate"
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.MassFlowRate Q0=100
"Mass flow (active if IMassFlow connector is not connected)";
parameter Units.SI.Temperature T0=290
@@ -16,39 +16,27 @@ model SinkQ "Multi-fluids sink with fixed mass flow rate"
"true:temperature fixed - false:specific enthalpy fixed";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
-
-protected
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog(
+ tab="Fluid",
+ group="Medium"));
+ parameter Medium.ExtraProperty X0[Medium.nX]= Medium.X_default "Source mass fraction" annotation (Dialog(
+ tab="Fluid",
+ group="Medium"));
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
Units.SI.Temperature T "Fluid temperature";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
- Real Xco2(start=0.01)
- "CO2 mass fraction of the fluid crossing the boundary of the control volume";
- Real Xh2o
- "H2O mass fraction of the fluid crossing the boundary of the control volume";
- Real Xo2(start=0.2)
- "O2 mass fraction of the fluid crossing the boundary of the control volume";
- Real Xso2(start=0)
- "SO2 mass fraction of the fluid crossing the boundary of the control volume";
public
- ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow
- "Fixed mass flow rate"
- annotation (Placement(transformation(
+ ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow "Fixed mass flow rate" annotation (Placement(transformation(
origin={0,50},
extent={{-10,-10},{10,10}},
rotation=270)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
- "Fixed specific enthalpy or temperature according to option_temperature"
- annotation (Placement(transformation(
+ InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature "Fixed specific enthalpy or temperature according to option_temperature" annotation (Placement(transformation(
origin={0,-50},
extent={{10,-10},{-10,10}},
rotation=270)));
@@ -61,12 +49,9 @@ equation
C.diff_res_2 = 0;
C.diff_on_2 = diffusion;
- ftype = C.ftype;
+ C.SubC=SubC0;
- Xco2 = C.Xco2;
- Xh2o = C.Xh2o;
- Xo2 = C.Xo2;
- Xso2 = C.Xso2;
+ C.Xi = X0[1:Medium.nXi];
/* Mass flow */
if (cardinality(IMassFlow) == 0) then
@@ -86,10 +71,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X0);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X0);
end if;
annotation (
From a61aa089f513b2667b310e294eb58073cbac09e4 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 16:32:29 +0200
Subject: [PATCH 021/213] #125 SinQ correction
---
.../Fluid/BoundaryConditions/SinkQ.mo | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
index a484d188..fc18d9f9 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
@@ -16,18 +16,16 @@ model SinkQ "Multi-fluids sink with fixed mass flow rate"
"true:temperature fixed - false:specific enthalpy fixed";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog(
- tab="Fluid",
- group="Medium"));
- parameter Medium.ExtraProperty X0[Medium.nX]= Medium.X_default "Source mass fraction" annotation (Dialog(
- tab="Fluid",
- group="Medium"));
+
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
Units.SI.Temperature T "Fluid temperature";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Trace substances";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fraction of the fluid crossing the boundary of the control volume";
+
public
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow "Fixed mass flow rate" annotation (Placement(transformation(
@@ -49,9 +47,10 @@ equation
C.diff_res_2 = 0;
C.diff_on_2 = diffusion;
- C.SubC=SubC0;
+ X = C.Xi;
+ SubC = C.SubC;
+
- C.Xi = X0[1:Medium.nXi];
/* Mass flow */
if (cardinality(IMassFlow) == 0) then
@@ -71,10 +70,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X0);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = Medium.temperature_phX(p=P, h=h, X=X0);
+ T = Medium.temperature_phX(p=P, h=h, X=X);
end if;
annotation (
From 2e5559d7737c8ba9d2fd593337f4cdc0342f7c29 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 16:47:33 +0200
Subject: [PATCH 022/213] #125 StodolaTurbine added SubC
---
ThermoSysPro/Fluid/Machines/StodolaTurbine.mo | 1 +
1 file changed, 1 insertion(+)
diff --git a/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo b/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
index 0d8405f8..63e6186b 100644
--- a/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
+++ b/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
@@ -101,6 +101,7 @@ equation
Ce.Xi = Cs.Xi;
X = Ce.Xi;
+ Ce.SubC = Cs.SubC;
Q = Ce.Q;
Pe = Ce.P;
From 533944ab31eeaaf052df771cf13f3814f41baf3a Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 17:05:05 +0200
Subject: [PATCH 023/213] #125 SinkP
---
.../Fluid/BoundaryConditions/SinkP.mo | 36 ++++++-------------
1 file changed, 10 insertions(+), 26 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo
index 5a7507e2..69898d68 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo
@@ -1,11 +1,9 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model SinkP "Multi-fluid sink with fixed pressure"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeVariableInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.AbsolutePressure P0=100000 "Sink pressure";
parameter Units.SI.Temperature T0=290
"Source temperature (active if option_temperature=true)"
@@ -17,26 +15,16 @@ model SinkP "Multi-fluid sink with fixed pressure"
"true:temperature fixed - false:specific enthalpy fixed";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Trace substances";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fraction of the fluid crossing the boundary of the control volume";
-protected
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
Units.SI.Temperature T "Fluid temperature";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
- ThermoSysPro.Units.SI.MassFraction Xco2(start=0.01)
- "CO2 mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xh2o
- "H2O mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xo2(start=0.2)
- "O2 mass fraction of the fluid crossing the boundary of the control volume";
- ThermoSysPro.Units.SI.MassFraction Xso2(start=0)
- "SO2 mass fraction of the fluid crossing the boundary of the control volume";
+
public
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IPressure
"Fixed pressure"
@@ -44,7 +32,7 @@ public
origin={50,0},
extent={{-10,-10},{10,10}},
rotation=180)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
"Fixed specific enthalpy or temperature according to option_temperature"
@@ -61,12 +49,8 @@ equation
C.diff_res_2 = 0;
C.diff_on_2 = diffusion;
- ftype = C.ftype;
-
- Xco2 = C.Xco2;
- Xh2o = C.Xh2o;
- Xo2 = C.Xo2;
- Xso2 = C.Xso2;
+ X = C.Xi;
+ SubC = C.SubC;
if (cardinality(IPressure) == 0) then
IPressure.signal = P0;
@@ -85,10 +69,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X);
end if;
annotation (
From 3b5140dade765783b10d2e48c870f74701c799d4 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 17:18:24 +0200
Subject: [PATCH 024/213] #125 SinkPQ
---
.../Fluid/BoundaryConditions/SinkPQ.mo | 67 ++++++-------------
1 file changed, 20 insertions(+), 47 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo
index 8b874a0a..070d0124 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo
@@ -1,61 +1,38 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model SinkPQ "MultiFluids sink with fixed pressure and mass flow rate"
- extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- parameter Units.SI.AbsolutePressure P0=100000
- "Fluid pressure (active if IPressure connector is not connected)";
- parameter Units.SI.MassFlowRate Q0=100
- "Mass flow (active if IMassFlow connector is not connected)";
- parameter Units.SI.Temperature T0=290
- "Source temperature (active if option_temperature=true)"
- annotation (Evaluate=true, Dialog(enable=option_temperature));
- parameter Units.SI.SpecificEnthalpy h0=100000
- "Source specific enthalpy (active if option_temperature=false)"
- annotation (Evaluate=true, Dialog(enable=not option_temperature));
- parameter Boolean option_temperature=false
- "true:temperature fixed - false:specific enthalpy fixed";
- parameter Boolean diffusion=false
- "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ extends ThermoSysPro.Fluid.Interfaces.IconColors;
-protected
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",
+ group="Medium"));
+ parameter Units.SI.AbsolutePressure P0=100000 "Fluid pressure (active if IPressure connector is not connected)";
+ parameter Units.SI.MassFlowRate Q0=100 "Mass flow (active if IMassFlow connector is not connected)";
+ parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
+ parameter Units.SI.SpecificEnthalpy h0=100000 "Source specific enthalpy (active if option_temperature=false)" annotation (Evaluate=true, Dialog(enable=not option_temperature));
+ parameter Boolean option_temperature=false "true:temperature fixed - false:specific enthalpy fixed";
+ parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
Units.SI.Temperature T "Fluid temperature";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
- Real Xco2(start=0.01)
- "CO2 mass fraction of the fluid crossing the boundary of the control volume";
- Real Xh2o
- "H2O mass fraction of the fluid crossing the boundary of the control volume";
- Real Xo2(start=0.2)
- "O2 mass fraction of the fluid crossing the boundary of the control volume";
- Real Xso2(start=0)
- "SO2 mass fraction of the fluid crossing the boundary of the control volume";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Trace substances";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fraction of the fluid crossing the boundary of the control volume";
+
public
- ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow
- "Fixed mass flow rate"
- annotation (Placement(transformation(
+ ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow "Fixed mass flow rate" annotation (Placement(transformation(
origin={0,50},
extent={{-10,-10},{10,10}},
rotation=270)));
- ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IPressure
- "Fixed pressure"
- annotation (Placement(transformation(
+ ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IPressure "Fixed pressure" annotation (Placement(transformation(
origin={50,0},
extent={{-10,-10},{10,10}},
rotation=180)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
- "Fixed specific enthalpy or temperature according to option_temperature"
+ InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature "Fixed specific enthalpy or temperature according to option_temperature"
annotation (Placement(transformation(
origin={0,-50},
extent={{10,-10},{-10,10}},
@@ -69,12 +46,8 @@ equation
C.diff_res_2 = 0;
C.diff_on_2 = diffusion;
- ftype = C.ftype;
-
- Xco2 = C.Xco2;
- Xh2o = C.Xh2o;
- Xo2 = C.Xo2;
- Xso2 = C.Xso2;
+ X = C.Xi;
+ SubC = C.SubC;
/* Mass flow */
if (cardinality(IMassFlow) == 0) then
@@ -101,10 +74,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X);
end if;
annotation (
From 00551385f42eff89b31f2d864bb0aad8246f19d0 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Thu, 5 Jun 2025 17:35:35 +0200
Subject: [PATCH 025/213] #125 Source
---
.../Fluid/BoundaryConditions/Source.mo | 71 +++++--------------
1 file changed, 16 insertions(+), 55 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/Source.mo b/ThermoSysPro/Fluid/BoundaryConditions/Source.mo
index b28eb04f..16a1eea2 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/Source.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/Source.mo
@@ -1,49 +1,20 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model Source "MultiFluids Source"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
- extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
- parameter Units.SI.Temperature T0=290
- "Source temperature (active if option_temperature=true)"
- annotation (Evaluate=true, Dialog(enable=option_temperature));
- parameter Units.SI.SpecificEnthalpy h0=100000
- "Source specific enthalpy (active if option_temperature=false)"
- annotation (Evaluate=true, Dialog(enable=not option_temperature));
- parameter Boolean option_temperature=false
- "true:temperature fixed - false:specific enthalpy fixed";
- parameter Boolean continuous_flow_reversal=false
- "true: continuous flow reversal - false: discontinuous flow reversal";
- parameter Boolean diffusion=false
- "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter IF97Region region=IF97Region.All_regions "IF97 regions (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ extends ThermoSysPro.Fluid.Interfaces.IconColors;
- parameter ThermoSysPro.Units.SI.MassFraction Xco2= 0.01 "CO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o=if ftype == FluidType.FlueGases then 0.05 else 0 "H2O mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
- tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo2= 0.22 "O2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
+ parameter Units.SI.SpecificEnthalpy h0=100000 "Source specific enthalpy (active if option_temperature=false)" annotation (Evaluate=true, Dialog(enable=not option_temperature));
+ parameter Boolean option_temperature=false "true:temperature fixed - false:specific enthalpy fixed";
+ parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal";
+ parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion";
+ parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso2= 0 "SO2 mass fraction"
- annotation (Evaluate=true, Dialog(
- enable=(ftype == FluidType.FlueGases),
+ group="Medium"));
+ parameter Medium.ExtraProperty X0[Medium.nX]= Medium.X_default "Source mass fraction" annotation (Dialog(
tab="Fluid",
- group="Composition values (active for flue gases only)"));
-
-protected
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ group="Medium"));
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
@@ -51,7 +22,7 @@ public
Units.SI.SpecificEnthalpy h(start=100000) "Fluid specific enthalpy";
Units.SI.Temperature T(start=300) "Fluid temperature";
- Interfaces.Connectors.FluidOutlet C annotation (Placement(transformation(
+ Interfaces.Connectors.FluidOutlet C(redeclare package Medium = Medium) annotation (Placement(transformation(
extent={{90,-10},{110,10}}, rotation=0)));
InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpyOrTemperature
"Fixed specific enthalpy or temperature according to option_temperature"
@@ -68,19 +39,9 @@ equation
C.diff_res_1 = 0;
C.diff_on_1 = diffusion;
- ftype = C.ftype;
+ C.SubC=SubC0;
- if flue_gases then
- C.Xco2 = Xco2;
- C.Xh2o = Xh2o;
- C.Xo2 = Xo2;
- C.Xso2 = Xso2;
- else
- C.Xco2 = 0;
- C.Xh2o = 0;
- C.Xo2 = 0;
- C.Xso2 = 0;
- end if;
+ C.Xi = X0[1:Medium.nXi];
/* Specific enthalpy or temperature */
if (cardinality(ISpecificEnthalpyOrTemperature) == 0) then
@@ -93,10 +54,10 @@ equation
if option_temperature then
T = ISpecificEnthalpyOrTemperature.signal;
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, T, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=T, X=X0);
else
h = ISpecificEnthalpyOrTemperature.signal;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ T = Medium.temperature_phX(p=P, h=h, X=X0);
end if;
/* Flow reversal */
From 2b30c3c0c38a033e9969dca890abd017dbd7fb4a Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Wed, 11 Jun 2025 10:55:53 +0200
Subject: [PATCH 026/213] #125 StodolaTurbine corrected example and added
traces example
---
.../Machines/TestStodolaTurbine.mo | 20 ++++++++----
.../Machines/TestStodolaTurbine_Traces.mo | 31 +++++++++++++++++++
.../SimpleExamples/Machines/package.order | 1 +
3 files changed, 46 insertions(+), 6 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
index 4d29ef69..b549ea80 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
@@ -2,15 +2,23 @@ within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines;
model TestStodolaTurbine
extends ThermoSysPro.UsersGuide.Icons.Example;
- ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Cst=400000)
+replaceable package Medium = Properties.Media.WaterSteam;
+
+ ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(
+ redeclare replaceable package Medium = Medium,
+ Cst=4100,
+ Ps(start=5000),
+ rhos(start=1.22))
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
- P0=4500000,
- Q0=1800,
- T0=573.15,
- option_temperature=true)
+ redeclare replaceable package Medium = Medium,
+ P0=300000,
+ Q0=200,
+ h0=3e6,
+ option_temperature=false)
annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium)
annotation (Placement(transformation(extent={{26,-10},{46,10}})));
equation
connect(sourcePQ.C, stodolaTurbine.Ce)
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo
new file mode 100644
index 00000000..adcb506f
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo
@@ -0,0 +1,31 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines;
+model TestStodolaTurbine_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3", "Trace4"}, C_nominal={0.1, 0.2, 0.3, 0.4}, C_default={0.2, 0.3, 0.4, 0.5});
+
+ ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(
+ redeclare replaceable package Medium = Medium,
+ Cst=4100,
+ Ps(start=5000),
+ rhos(start=1.22))
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
+ redeclare replaceable package Medium = Medium,
+ P0=300000,
+ Q0=200,
+ h0=3e6,
+ SubC0={40,50,60,70},
+ option_temperature=false)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium)
+ annotation (Placement(transformation(extent={{26,-10},{46,10}})));
+equation
+ connect(sourcePQ.C, stodolaTurbine.Ce)
+ annotation (Line(points={{-30,0},{-10.1,0}}, color={0,0,0}));
+ connect(stodolaTurbine.Cs, sink.C)
+ annotation (Line(points={{10.1,0},{26,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestStodolaTurbine_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
index 4bf87c1a..7733024e 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
@@ -1 +1,2 @@
TestStodolaTurbine
+TestStodolaTurbine_Traces
From f53c3f5d82df5fb21f52fcc70f810db3ea1cd6ac Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Wed, 11 Jun 2025 12:08:36 +0200
Subject: [PATCH 027/213] #125 ControlValve
---
.../PressureLosses/TestControlValve.mo | 29 ++++++++++++++++
.../PressureLosses/TestControlValve_Traces.mo | 30 ++++++++++++++++
.../TestControlValve_Traces_FlueGases.mo | 34 +++++++++++++++++++
.../PressureLosses/package.order | 3 ++
.../Fluid/PressureLosses/ControlValve.mo | 26 +++++++-------
5 files changed, 109 insertions(+), 13 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo
new file mode 100644
index 00000000..28e578c2
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo
@@ -0,0 +1,29 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestControlValve
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+
+ ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve(
+ redeclare replaceable package Medium = Medium, caract=[0,0; 0.5,3000; 0.75,
+ 7000; 1,8000])
+ annotation (Placement(transformation(extent={{-10,-4},{10,16}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium)
+ annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium, Q0=2580)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ InstrumentationAndControl.Blocks.Tables.Table1DTemps Constante1(Table=[0,0.9;
+ 5,0.9; 15,0.5; 25,0.5; 50,0.2; 100,0.2])
+ annotation (Placement(transformation(extent={{-30,34},{-10,54}}, rotation=0)));
+equation
+ connect(controlValve.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(controlValve.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ connect(Constante1.y, controlValve.Ouv)
+ annotation (Line(points={{-9,44},{0,44},{0,17}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestControlValve;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo
new file mode 100644
index 00000000..f79d0787
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo
@@ -0,0 +1,30 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestControlValve_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2"}, C_nominal={0.1, 2}, C_default={0.2, 5});
+
+ ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve(
+ redeclare replaceable package Medium = Medium, caract=[0,0; 0.5,3000; 0.75,
+ 7000; 1,8000])
+ annotation (Placement(transformation(extent={{-10,-4},{10,16}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium)
+ annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium,
+ SubC0={10,20}, Q0=2580)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ InstrumentationAndControl.Blocks.Tables.Table1DTemps Constante1(Table=[0,0.9;
+ 5,0.9; 15,0.5; 25,0.5; 50,0.2; 100,0.2])
+ annotation (Placement(transformation(extent={{-30,34},{-10,54}}, rotation=0)));
+equation
+ connect(controlValve.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(controlValve.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ connect(Constante1.y, controlValve.Ouv)
+ annotation (Line(points={{-9,44},{0,44},{0,17}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestControlValve_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo
new file mode 100644
index 00000000..1e2d861d
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo
@@ -0,0 +1,34 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestControlValve_Traces_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2"}, C_nominal={0.1, 2}, C_default={0.2, 5});
+
+ ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve(
+ redeclare replaceable package Medium = Medium,
+ Cvmax=50000, caract=[0,0; 0.5,3000; 0.75,
+ 7000; 1,8000],
+ Pm(start=200000))
+ annotation (Placement(transformation(extent={{-10,-4},{10,16}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium, h0=2538785.2)
+ annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium,
+ h0=2538785.2,
+ SubC0={10,20}, X0={0.1,0.2,0.3,0.2,0.2},
+ Q0=8)
+ annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ InstrumentationAndControl.Blocks.Tables.Table1DTemps Constante1(Table=[0,0.9;
+ 5,0.9; 15,0.5; 25,0.5; 50,0.2; 100,0.2])
+ annotation (Placement(transformation(extent={{-30,34},{-10,54}}, rotation=0)));
+equation
+ connect(controlValve.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(controlValve.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ connect(Constante1.y, controlValve.Ouv)
+ annotation (Line(points={{-9,44},{0,44},{0,17}}, color={0,0,255}));
+ annotation (experiment(StopTime=80), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestControlValve_Traces_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
index 21b7a582..e89506ae 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
@@ -4,3 +4,6 @@ TestPipePressureLoss_Traces
TestSingularPressureLoss
TestSingularPressureLoss_Traces
TestSingularPressureLoss_Traces_FlueGases
+TestControlValve
+TestControlValve_Traces
+TestControlValve_Traces_FlueGases
diff --git a/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo b/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo
index 503d318e..64511ae9 100644
--- a/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo
@@ -1,6 +1,7 @@
within ThermoSysPro.Fluid.PressureLosses;
model ControlValve "Control valve"
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
+extends ThermoSysPro.Fluid.Interfaces.IconColors;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
parameter ThermoSysPro.Units.xSI.Cv Cvmax=8005.42
@@ -32,8 +33,7 @@ public
Units.SI.Temperature T(start=290) "Fluid temperature";
Units.SI.AbsolutePressure Pm(start=1.e5) "Fluid average pressure";
Units.SI.SpecificEnthalpy h(start=100000) "Fluid specific enthalpy";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
public
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal Ouv
@@ -41,9 +41,9 @@ public
origin={0,110},
extent={{-10,-10},{10,10}},
rotation=270)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-70},{-90,-50}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-70},{110,-50}}, rotation=0)));
equation
@@ -59,18 +59,18 @@ equation
C2.diff_res_1 = C1.diff_res_1 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
C1.diff_res_2 = C2.diff_res_2 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
- C1.ftype = C2.ftype;
+ C1.Xi = C2.Xi;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ X = C1.Xi;
+
+
+ C1.SubC = C2.SubC;
Q = C1.Q;
h = C1.h;
deltaP = C1.P - C2.P;
- ftype = C1.ftype;
+
/* Pressure loss */
if (option_rho_water == 1) then
@@ -99,12 +99,12 @@ equation
/* Fluid thermodynamic properties */
Pm = (C1.P + C2.P)/2;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ T = Medium.temperature_phX(p=Pm, h=h, X=X);
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ rho = Medium.density_phX(p=Pm, h=h, X=X);
end if;
annotation (
Icon(coordinateSystem(
From cc7127fc9ccb6c4ece3fafcd59d29de34a0c6045 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Fri, 13 Jun 2025 16:49:07 +0200
Subject: [PATCH 028/213] #125 RefT
---
ThermoSysPro/Fluid/BoundaryConditions/RefT.mo | 32 +++++++----------
.../BoundaryConditions/TestRefT.mo | 33 +++++++++++++++++
.../BoundaryConditions/TestRefT_Traces.mo | 35 +++++++++++++++++++
.../BoundaryConditions/package.order | 2 ++
4 files changed, 83 insertions(+), 19 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT_Traces.mo
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefT.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefT.mo
index a5795521..7aeecfc4 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/RefT.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/RefT.mo
@@ -1,28 +1,24 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model RefT "Fixed temperature reference"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
- parameter Units.SI.Temperature T0=290 "Fixed fluid temperature";
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
-protected
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ parameter Units.SI.Temperature T0=290 "Fixed fluid temperature";
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
+
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
- ThermoSysPro.InstrumentationAndControl.Connectors.InputReal ITemperature
- annotation (Placement(transformation(
+ ThermoSysPro.InstrumentationAndControl.Connectors.InputReal ITemperature annotation (Placement(transformation(
origin={0,110},
extent={{-10,-10},{10,10}},
rotation=270)));
@@ -45,21 +41,19 @@ equation
C2.diff_res_1 = C1.diff_res_1;
C1.diff_res_2 = C2.diff_res_2;
- C1.ftype = C2.ftype;
+ C1.Xi = C2.Xi;
+
+ X = C1.Xi;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.SubC = C2.SubC;
Q = C1.Q;
P = C1.P;
h = C1.h;
- ftype = C1.ftype;
/* Computation of the fluid specific enthalpy */
- h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, ITemperature.signal, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ h = Medium.specificEnthalpy_pTX(p=P, T=ITemperature.signal, X=X);
annotation (
Diagram(coordinateSystem(
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo
new file mode 100644
index 00000000..8e00782c
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo
@@ -0,0 +1,33 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefT
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package
+ Medium = Medium, h0=2600e3)
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=120 + 273.15)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refT.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceQ.C, refT.C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+ connect(constante.y, refT.ITemperature)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefT;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT_Traces.mo
new file mode 100644
index 00000000..061c7084
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT_Traces.mo
@@ -0,0 +1,35 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefT_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare replaceable package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare replaceable package
+ Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package
+ Medium = Medium, h0=2600e3, SubC0={10,20,30})
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=120 + 273.15)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refT.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceQ.C, refT.C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+ connect(constante.y, refT.ITemperature)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefT_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
index e69de29b..0f8ee6d3 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
@@ -0,0 +1,2 @@
+TestRefT
+TestRefT_Traces
From adb13a68eb52f3bc9e29a5821e0688ef8c9f4940 Mon Sep 17 00:00:00 2001
From: Baptiste MAZURIE
Date: Mon, 16 Jun 2025 11:08:38 +0200
Subject: [PATCH 029/213] #125 TwoPhase medium for StodaTurbine, constrainedby
medium to subC medium
---
ThermoSysPro/Fluid/BoundaryConditions/Sink.mo | 2 +-
.../Fluid/BoundaryConditions/SourcePQ.mo | 2 +-
.../Fluid/BoundaryConditions/SourceQ.mo | 2 +-
.../Machines/TestStodolaTurbine.mo | 3 +--
ThermoSysPro/Fluid/Machines/StodolaTurbine.mo | 22 +++++++++----------
.../Fluid/PressureLosses/PipePressureLoss.mo | 2 +-
.../PressureLosses/SingularPressureLoss.mo | 2 +-
ThermoSysPro/Fluid/Volumes/VolumeC.mo | 2 +-
8 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo b/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo
index f2e804a2..6fbe1d79 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/Sink.mo
@@ -3,7 +3,7 @@ model Sink "MultiFluids sink"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
parameter Units.SI.SpecificEnthalpy h0=100000 "Source specific enthalpy (active if option_temperature=false)" annotation (Evaluate=true, Dialog(enable=not option_temperature));
parameter Boolean option_temperature=false "true:temperature fixed - false:specific enthalpy fixed";
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo
index 29d16491..3edfecd1 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SourcePQ.mo
@@ -3,7 +3,7 @@ model SourcePQ "MultiFluids source with fixed pressure and mass flow rate"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.AbsolutePressure P0=300000 "Fluid pressure (active if IPressure connector is not connected)";
parameter Units.SI.MassFlowRate Q0=100 "Mass flow (active if IMassFlow connector is not connected)";
parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo
index 6ef3492e..668bdaaf 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SourceQ.mo
@@ -3,7 +3,7 @@ model SourceQ "Multi-fluid source with fixed mass flow rate"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.MassFlowRate Q0=100
"Mass flow (active if IMassFlow connector is not connected)";
parameter Units.SI.Temperature T0=290
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
index b549ea80..ac7159d2 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo
@@ -17,8 +17,7 @@ replaceable package Medium = Properties.Media.WaterSteam;
h0=3e6,
option_temperature=false)
annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
- ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
- Medium = Medium)
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium)
annotation (Placement(transformation(extent={{26,-10},{46,10}})));
equation
connect(sourcePQ.C, stodolaTurbine.Ce)
diff --git a/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo b/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
index 63e6186b..7173773a 100644
--- a/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
+++ b/ThermoSysPro/Fluid/Machines/StodolaTurbine.mo
@@ -1,7 +1,7 @@
within ThermoSysPro.Fluid.Machines;
model StodolaTurbine "Multistage turbine group using Stodola's ellipse"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
@@ -25,15 +25,15 @@ extends ThermoSysPro.Fluid.Interfaces.IconColors;
"Constant coefficient of the isentropic efficiency characteristics eta_is=f(Q/Qmax)";
parameter Units.SI.MassFlowRate gamma_diff=1e-4
"Diffusion conductance (active if diffusion=true in neighbouring volumes)";
- parameter IF97Region region_e=IF97Region.All_regions "IF97 region before expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
- parameter IF97Region region_s=IF97Region.All_regions "IF97 region after expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
- parameter IF97Region region_ps=IF97Region.All_regions "IF97 region after isentropic expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ parameter IF97Region region_e=IF97Region.All_regions "IF97 region before expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
+ parameter IF97Region region_s=IF97Region.All_regions "IF97 region after expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
+ parameter IF97Region region_ps=IF97Region.All_regions "IF97 region after isentropic expansion (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
protected
- parameter Integer mode_e=Integer(region_e) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
- parameter Integer mode_s=Integer(region_s) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
- parameter Integer mode_ps=Integer(region_ps) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ Integer phase_e=if Integer(region_e) == 0 then 0 else if Integer(region_e)==4 then 2 else 1;
+ Integer phase_s=if Integer(region_s) == 0 then 0 else if Integer(region_s)==4 then 2 else 1;
+ Integer phase_ps=if Integer(region_ps) == 0 then 0 else if Integer(region_ps)==4 then 2 else 1;
parameter Units.SI.AbsolutePressure pcrit=ThermoSysPro.Properties.WaterSteam.BaseIF97.data.PCRIT
"Critical pressure";
parameter Units.SI.Temperature Tcrit=ThermoSysPro.Properties.WaterSteam.BaseIF97.data.TCRIT
@@ -138,21 +138,21 @@ equation
MechPower.signal = W;
/* Fluid thermodynamic properties before the expansion */
- state_e=Medium.setState_phX(p=Pe, h=Ce.h, X=Ce.Xi, region=mode_e);
+ state_e=Medium.setState_phX(p=Pe, h=Ce.h, phase=phase_e);
Te = state_e.T;
/* Fluid thermodynamic properties after the expansion */
- state_s1 = Medium.setState_phX(p=Ps, h=Hrs, X=Cs.Xi, region=mode_s); // X=Cs.Xi ????????????????? Hrs.Xi ??
+ state_s1 = Medium.setState_phX(p=Ps, h=Hrs, phase=phase_s);
/* Fluid thermodynamic properties at the outlet of the nozzle */
- state_s = Medium.setState_phX(p=Ps, h=Cs.h, X=Cs.Xi, region=mode_s);
+ state_s = Medium.setState_phX(p=Ps, h=Cs.h, phase=phase_s);
Ts = state_s.T;
rhos = state_s.d;
/* Fluid thermodynamic properties after the isentropic expansion */
- state_ps = Medium.setState_psX(p=Ps, s=Medium.specificEntropy(state_e), X=Cs.Xi, region=mode_ps); // X=Cs.Xi ?????????????????????
+ state_ps = Medium.setState_ps(p=Ps, s=Medium.specificEntropy(state_e), phase=phase_ps);
His = state_ps.h;
annotation (
diff --git a/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo b/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo
index c9d337fd..d3c77c64 100644
--- a/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/PipePressureLoss.mo
@@ -3,7 +3,7 @@ model PipePressureLoss "Pipe generic pressure loss"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Real K=10 "Friction pressure loss coefficient";
parameter Units.SI.Position z1=0 "Inlet altitude";
parameter Units.SI.Position z2=0 "Outlet altitude";
diff --git a/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo b/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
index 583f3511..5145c405 100644
--- a/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/SingularPressureLoss.mo
@@ -1,7 +1,7 @@
within ThermoSysPro.Fluid.PressureLosses;
model SingularPressureLoss "Singular pressure loss"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Real K=1.e-4 "Pressure loss coefficient";
parameter Units.SI.MassFlowRate gamma_diff=1e-4
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeC.mo b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
index 5d9b59ac..3dd055f2 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeC.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeC.mo
@@ -3,7 +3,7 @@ model VolumeC "Mixing volume with 3 inlets and 1 outlet"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
replaceable function SaS = Medium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
"true: dynamic energy balance equation - false: static energy balance equation";
From 35afdf7eaab83a72a2bbeb766b1c2c7b89a12004 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Mon, 16 Jun 2025 11:15:46 +0200
Subject: [PATCH 030/213] #125 RefQ
---
ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo | 17 ++++++----
.../BoundaryConditions/TestRefQ.mo | 34 +++++++++++++++++++
.../BoundaryConditions/TestRefQ_Traces.mo | 33 ++++++++++++++++++
.../TestRefQ_Traces_FlueGases.mo | 34 +++++++++++++++++++
.../BoundaryConditions/package.order | 3 ++
5 files changed, 114 insertions(+), 7 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo
index aaf16710..71610bac 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo
@@ -1,16 +1,20 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model RefQ "Fixed mass flow reference"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+
+
parameter Units.SI.MassFlowRate Q0=10 "Fixed fluid mass flow";
public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow
annotation (Placement(transformation(
@@ -36,12 +40,11 @@ equation
C2.diff_res_1 = C1.diff_res_1;
C1.diff_res_2 = C2.diff_res_2;
- C1.ftype = C2.ftype;
+ C1.Xi = C2.Xi;
+
+ X = C1.Xi;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.SubC = C2.SubC;
Q = C1.Q;
P = C1.P;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo
new file mode 100644
index 00000000..63865b8f
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo
@@ -0,0 +1,34 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefQ
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package
+ Medium = Medium, h0=2600e3,
+ option_temperature=false)
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=110)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refQ.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceP.C,refQ. C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+ connect(constante.y, refQ.IMassFlow)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefQ;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo
new file mode 100644
index 00000000..4cda43cc
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo
@@ -0,0 +1,33 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefQ_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package
+ Medium = Medium, h0=2600e3,SubC0={10,20,30},
+ option_temperature=false)
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=110)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refQ.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceP.C,refQ. C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+ connect(constante.y, refQ.IMassFlow)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefQ_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo
new file mode 100644
index 00000000..3babe41f
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo
@@ -0,0 +1,34 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefQ_Traces_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium =
+ Medium, h0=2600e3)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package
+ Medium = Medium,
+ P0=2000000, h0=2600e3,SubC0={10,20,30}, X0={0.1,0.2,0.3,0.2,0.2},
+ option_temperature=false)
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=110)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refQ.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceP.C,refQ. C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+ connect(constante.y, refQ.IMassFlow)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefQ_Traces_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
index e69de29b..d52b6fae 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
@@ -0,0 +1,3 @@
+TestRefQ
+TestRefQ_Traces
+TestRefQ_Traces_FlueGases
From 6f01879bfbab5edf610d8c386a86516fc0b97929 Mon Sep 17 00:00:00 2001
From: MAZURIE Baptiste
Date: Mon, 16 Jun 2025 11:26:08 +0200
Subject: [PATCH 031/213] #125 changed constrainedby medium
---
ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo | 2 +-
ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo | 2 +-
ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo | 2 +-
ThermoSysPro/Fluid/BoundaryConditions/Source.mo | 2 +-
ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo
index 69898d68..b8b243b9 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkP.mo
@@ -3,7 +3,7 @@ model SinkP "Multi-fluid sink with fixed pressure"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.AbsolutePressure P0=100000 "Sink pressure";
parameter Units.SI.Temperature T0=290
"Source temperature (active if option_temperature=true)"
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo
index 070d0124..278db1c1 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkPQ.mo
@@ -3,7 +3,7 @@ model SinkPQ "MultiFluids sink with fixed pressure and mass flow rate"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",
group="Medium"));
parameter Units.SI.AbsolutePressure P0=100000 "Fluid pressure (active if IPressure connector is not connected)";
parameter Units.SI.MassFlowRate Q0=100 "Mass flow (active if IMassFlow connector is not connected)";
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
index fc18d9f9..95c2cc38 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SinkQ.mo
@@ -3,7 +3,7 @@ model SinkQ "Multi-fluids sink with fixed mass flow rate"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.MassFlowRate Q0=100
"Mass flow (active if IMassFlow connector is not connected)";
parameter Units.SI.Temperature T0=290
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/Source.mo b/ThermoSysPro/Fluid/BoundaryConditions/Source.mo
index 16a1eea2..8369e9eb 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/Source.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/Source.mo
@@ -3,7 +3,7 @@ model Source "MultiFluids Source"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.Temperature T0=290 "Source temperature (active if option_temperature=true)" annotation (Evaluate=true, Dialog(enable=option_temperature));
parameter Units.SI.SpecificEnthalpy h0=100000 "Source specific enthalpy (active if option_temperature=false)" annotation (Evaluate=true, Dialog(enable=not option_temperature));
parameter Boolean option_temperature=false "true:temperature fixed - false:specific enthalpy fixed";
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo b/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo
index 8156d294..27a26da6 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/SourceP.mo
@@ -3,7 +3,7 @@ model SourceP "Multi-fluid source with fixed pressure"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Units.SI.AbsolutePressure P0=300000 "Source pressure";
parameter Units.SI.Temperature T0=290
From 474b69527ae6eaf4fa81a088e4be8e84789513da Mon Sep 17 00:00:00 2001
From: MAZURIE Baptiste
Date: Mon, 16 Jun 2025 11:29:26 +0200
Subject: [PATCH 032/213] #125 Edit VolumeA to change the constrainedby medium
---
ThermoSysPro/Fluid/Volumes/VolumeA.mo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeA.mo b/ThermoSysPro/Fluid/Volumes/VolumeA.mo
index fad042ec..6437f404 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeA.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeA.mo
@@ -3,7 +3,7 @@ model VolumeA "Mixing volume with 2 inlets and 2 outlets"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
replaceable function SaS = Medium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
From 6a169be17102568b2827eff79c27818411420c40 Mon Sep 17 00:00:00 2001
From: MAZURIE Baptiste
Date: Mon, 16 Jun 2025 11:33:32 +0200
Subject: [PATCH 033/213] #125 ControlValve changed constrainedby medium
---
ThermoSysPro/Fluid/PressureLosses/ControlValve.mo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo b/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo
index 64511ae9..a4df200d 100644
--- a/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/ControlValve.mo
@@ -1,7 +1,7 @@
-within ThermoSysPro.Fluid.PressureLosses;
+within ThermoSysPro.Fluid.PressureLosses;
model ControlValve "Control valve"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
parameter ThermoSysPro.Units.xSI.Cv Cvmax=8005.42
From dea30059a07e82de4dd04e8b4cfcf767c2c85186 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Mon, 16 Jun 2025 13:46:20 +0200
Subject: [PATCH 034/213] #125 RefQ - Removed useless X declaration and
equation
---
ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo | 3 ---
1 file changed, 3 deletions(-)
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo
index 71610bac..f6414019 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo
@@ -10,7 +10,6 @@ public
Units.SI.MassFlowRate Q "Fluid mass flow rate";
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
- Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
@@ -42,8 +41,6 @@ equation
C1.Xi = C2.Xi;
- X = C1.Xi;
-
C1.SubC = C2.SubC;
Q = C1.Q;
From caa3baf8d1e24233a62c169958cfa33ef7a23127 Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Mon, 16 Jun 2025 14:16:37 +0200
Subject: [PATCH 035/213] #125 RefP
---
ThermoSysPro/Fluid/BoundaryConditions/RefP.mo | 14 +++---
.../BoundaryConditions/TestRefP.mo | 36 +++++++++++++++
.../BoundaryConditions/TestRefP_Traces.mo | 34 ++++++++++++++
.../TestRefP_Traces_FlueGases.mo | 46 +++++++++++++++++++
.../BoundaryConditions/package.order | 3 ++
5 files changed, 126 insertions(+), 7 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo
diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo
index 7edad80f..2e4128c5 100644
--- a/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo
+++ b/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo
@@ -1,6 +1,8 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model RefP "Fixed pressure reference"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+
parameter Units.SI.AbsolutePressure P0=1.e5 "Fixed fluid pressure";
public
@@ -8,9 +10,9 @@ public
Units.SI.AbsolutePressure P "Fluid pressure";
Units.SI.SpecificEnthalpy h "Fluid specific enthalpy";
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IPressure
annotation (Placement(transformation(
@@ -36,12 +38,10 @@ equation
C2.diff_res_1 = C1.diff_res_1;
C1.diff_res_2 = C2.diff_res_2;
- C1.ftype = C2.ftype;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.Xi = C2.Xi;
+
+ C1.SubC = C2.SubC;
Q = C1.Q;
P = C1.P;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo
new file mode 100644
index 00000000..60f4b2b6
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo
@@ -0,0 +1,36 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefP
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+ replaceable package Medium = Properties.Media.WaterSteam;
+
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium =
+ Medium, h0=633e3)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package
+ Medium = Medium,
+ T0=423.15,
+ option_temperature=true)
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=20e5)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refP.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceQ.C,refP. C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+
+
+ connect(constante.y, refP.IPressure)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefP;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo
new file mode 100644
index 00000000..1f0736bb
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo
@@ -0,0 +1,34 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefP_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium =
+ Medium, h0=633e3)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package
+ Medium = Medium,
+ T0=423.15,
+ option_temperature=true, SubC0={10,20,30})
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=20e5)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+equation
+ connect(sink.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refP.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+ connect(sourceQ.C,refP. C1)
+ annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0}));
+
+ connect(constante.y, refP.IPressure)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefP_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo
new file mode 100644
index 00000000..9aea64c1
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo
@@ -0,0 +1,46 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions;
+model TestRefP_Traces_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+ replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4});
+
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP(
+ redeclare package Medium =
+ Medium,
+ T0=453.15,
+ h0=633193.1,
+ option_temperature=true)
+ annotation (Placement(transformation(extent={{66,-10},{86,10}})));
+ ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{32,-10},{52,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package
+ Medium = Medium,
+ Q0=50,
+ T0=473.15,
+ h0=633193.1,
+ option_temperature=true, SubC0={10,20,30}, X0={0.1,0.2,0.3,0.2,0.2},
+ T(start=423.15))
+ annotation (Placement(transformation(extent={{-66,-10},{-46,10}})));
+ InstrumentationAndControl.Blocks.Sources.Constante constante(k=20e5)
+ annotation (Placement(transformation(extent={{-30,38},{-10,58}})));
+ ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(
+ redeclare package Medium = Medium)
+ annotation (Placement(transformation(extent={{-38,-10},{-18,10}})));
+equation
+ connect(sinkP.C, pipePressureLoss.C2)
+ annotation (Line(points={{66,0},{52,0}}, color={0,0,0}));
+ connect(refP.C2, pipePressureLoss.C1)
+ annotation (Line(points={{10,0},{32,0}}, color={0,0,0}));
+
+ connect(constante.y, refP.IPressure)
+ annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255}));
+ connect(sourceQ.C, singularPressureLoss.C1)
+ annotation (Line(points={{-46,0},{-38,0}}, color={0,0,0}));
+ connect(singularPressureLoss.C2, refP.C1)
+ annotation (Line(points={{-18,0},{-10,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestRefP_Traces_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
index e69de29b..e1e8d15c 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order
@@ -0,0 +1,3 @@
+TestRefP
+TestRefP_Traces
+TestRefP_Traces_FlueGases
From c61aacbafd14a908b32f308516c25b806a850daf Mon Sep 17 00:00:00 2001
From: VESCOVI Guilherme
Date: Mon, 16 Jun 2025 17:50:22 +0200
Subject: [PATCH 036/213] #125-LumpedStraightPipe
---
.../PressureLosses/TestLumpedStraightPipe.mo | 24 ++++++++++++
.../TestLumpedStraightPipe_Traces.mo | 24 ++++++++++++
.../PressureLosses/package.order | 2 +
.../PressureLosses/LumpedStraightPipe.mo | 39 +++++++++++--------
4 files changed, 72 insertions(+), 17 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo
new file mode 100644
index 00000000..9174faa2
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo
@@ -0,0 +1,24 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestLumpedStraightPipe
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam;
+
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-52,-10},
+ {-32,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{28,-10},
+ {48,10}})));
+ ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe(redeclare
+ replaceable package
+ Medium = Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+equation
+ connect(sourcePQ.C, lumpedStraightPipe.C1)
+ annotation (Line(points={{-32,0},{-10,0}}, color={0,0,0}));
+ connect(sink.C, lumpedStraightPipe.C2)
+ annotation (Line(points={{28,0},{10,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestLumpedStraightPipe;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo
new file mode 100644
index 00000000..f782a09b
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo
@@ -0,0 +1,24 @@
+within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses;
+model TestLumpedStraightPipe_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2});
+
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-52,-10},
+ {-32,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{28,-10},
+ {48,10}})));
+ ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe(redeclare
+ replaceable package Medium =
+ Medium)
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+equation
+ connect(sourcePQ.C, lumpedStraightPipe.C1)
+ annotation (Line(points={{-32,0},{-10,0}}, color={0,0,0}));
+ connect(sink.C, lumpedStraightPipe.C2)
+ annotation (Line(points={{28,0},{10,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
+ coordinateSystem(preserveAspectRatio=false)));
+end TestLumpedStraightPipe_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
index e89506ae..8be16eb5 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order
@@ -7,3 +7,5 @@ TestSingularPressureLoss_Traces_FlueGases
TestControlValve
TestControlValve_Traces
TestControlValve_Traces_FlueGases
+TestLumpedStraightPipe
+TestLumpedStraightPipe_Traces
diff --git a/ThermoSysPro/Fluid/PressureLosses/LumpedStraightPipe.mo b/ThermoSysPro/Fluid/PressureLosses/LumpedStraightPipe.mo
index fb8f7fb1..f6b38ab1 100644
--- a/ThermoSysPro/Fluid/PressureLosses/LumpedStraightPipe.mo
+++ b/ThermoSysPro/Fluid/PressureLosses/LumpedStraightPipe.mo
@@ -1,7 +1,10 @@
within ThermoSysPro.Fluid.PressureLosses;
model LumpedStraightPipe "Lumped straight pipe (circular duct)"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+
+
+
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
parameter Units.SI.Length L=10. "Pipe length";
@@ -19,7 +22,7 @@ model LumpedStraightPipe "Lumped straight pipe (circular duct)"
"true: momentum balance equation with inertia - false: without inertia";
parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+ parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
protected
constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant";
@@ -47,13 +50,15 @@ public
Units.SI.SpecificHeatCapacity cp(start=4200) "Fluid specific heat capacity";
Units.SI.ThermalConductivity k(start=0.05) "Fluid thermal conductivity";
Units.SI.MassFlowRate gamma_diff(start=1.e-4) "Diffusion conductance";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
+
+
public
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ Medium.ThermodynamicState state;
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
initial equation
if inertia then
@@ -74,18 +79,15 @@ equation
C2.diff_res_1 = C1.diff_res_1 + 1/gamma_diff;
C1.diff_res_2 = C2.diff_res_2 + 1/gamma_diff;
- C1.ftype = C2.ftype;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.Xi = C2.Xi;
+ C1.SubC = C2.SubC;
+ X = C1.Xi;
Q = C1.Q;
h = C1.h;
deltaP = C1.P - C2.P;
- ftype = C1.ftype;
/* Diffusion resistance */
gamma_diff = A*k/cp/L;
@@ -118,16 +120,19 @@ equation
/* Fluid thermodynamic properties */
Pm = (C1.P + C2.P)/2;
+ state=Medium.setState_phX(p=Pm, h=h, X=X, region=mode);
+
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ rho = state.d;
end if;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
- mu = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
- k = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o,C1.Xo2, C1.Xso2);
- cp = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Pm, h, fluid, mode, C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+
+ T = state.T;
+ mu = Medium.dynamicViscosity(state);
+ k = Medium.thermalConductivity(state);
+ cp = Medium.specificHeatCapacityCp(state);
annotation (
Diagram(coordinateSystem(
From 0d49afd1d1c3b55e9046559042965a1cbb8899af Mon Sep 17 00:00:00 2001
From: LAMBLOT Simon
Date: Thu, 19 Jun 2025 10:39:03 +0200
Subject: [PATCH 037/213] staticcentrifugalpump
---
.../Machines/TestStaticCentrifugalPump.mo | 20 ++++++
.../TestStaticCentrifugalPump_FlueGases.mo | 26 ++++++++
.../TestStaticCentrifugalPump_Traces.mo | 26 ++++++++
.../SimpleExamples/Machines/package.order | 3 +
.../Fluid/Machines/StaticCentrifugalPump.mo | 64 +++++++++----------
5 files changed, 107 insertions(+), 32 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo
new file mode 100644
index 00000000..5da05aac
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo
@@ -0,0 +1,20 @@
+within ;
+model TestStaticCentrifugalPump
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam;
+ StaticCentrifugalPump staticCentrifugalPump(
+ redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(staticCentrifugalPump.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(staticCentrifugalPump.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)),
+ uses(ThermoSysPro(version="5.0")));
+end TestStaticCentrifugalPump;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo
new file mode 100644
index 00000000..3d38a722
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo
@@ -0,0 +1,26 @@
+within ;
+model TestStaticCentrifugalPump_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases;
+ StaticCentrifugalPump staticCentrifugalPump(
+ redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},
+ {14,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(
+ redeclare replaceable package Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(
+ redeclare replaceable package Medium = Medium,
+ P0=4500000,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+equation
+ connect(staticCentrifugalPump.C2, sink.C)
+ annotation (Line(points={{14,0},{30,0}}, color={0,0,0}));
+ connect(staticCentrifugalPump.C1, sourcePQ.C)
+ annotation (Line(points={{-6,0},{-30,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)),
+ uses(ThermoSysPro(version="5.0")));
+end TestStaticCentrifugalPump_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo
new file mode 100644
index 00000000..26d98475
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo
@@ -0,0 +1,26 @@
+within ;
+model TestStaticCentrifugalPump_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam (
+ extraPropertiesNames={"Trace"},
+ C_nominal={0.1},
+ C_default={0.2});
+ StaticCentrifugalPump staticCentrifugalPump(
+ redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},
+ {10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium, SubC0={0.3})
+ annotation (Placement(transformation(extent={{-52,-10},
+ {-32,10}})));
+equation
+ connect(staticCentrifugalPump.C2, sink.C)
+ annotation (Line(points={{10,0},{30,0}}, color={0,0,0}));
+ connect(staticCentrifugalPump.C1, sourcePQ.C)
+ annotation (Line(points={{-10,0},{-32,0}}, color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)),
+ uses(ThermoSysPro(version="5.0")));
+end TestStaticCentrifugalPump_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
index e69de29b..243a92a6 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order
@@ -0,0 +1,3 @@
+TestStaticCentrifugalPump
+TestStaticCentrifugalPump_FlueGases
+TestStaticCentrifugalPump_Traces
\ No newline at end of file
diff --git a/ThermoSysPro/Fluid/Machines/StaticCentrifugalPump.mo b/ThermoSysPro/Fluid/Machines/StaticCentrifugalPump.mo
index 98dd3a47..6a8ad300 100644
--- a/ThermoSysPro/Fluid/Machines/StaticCentrifugalPump.mo
+++ b/ThermoSysPro/Fluid/Machines/StaticCentrifugalPump.mo
@@ -1,11 +1,11 @@
-within ThermoSysPro.Fluid.Machines;
+within ;
model StaticCentrifugalPump "Static centrifugal pump"
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby
+ ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter ThermoSysPro.Units.nonSI.AngularVelocity_rpm VRot=1400
"Fixed rotational speed (active if fixed_rot_or_power=1 and rpm_or_mpower connector not connected)";
- parameter Units.SI.Power MPower=0.1e6
+ parameter ThermoSysPro.Units.SI.Power MPower=0.1e6
"Fixed mechanical power (active if fixed_rot_or_power=2 and rpm_or_mpower connector not connected)";
parameter ThermoSysPro.Units.nonSI.AngularVelocity_rpm VRotn=1400
"Nominal rotational speed";
@@ -15,11 +15,10 @@ model StaticCentrifugalPump "Static centrifugal pump"
"1: fixed rotational speed - 2: fixed mechanical power";
parameter Boolean adiabatic_compression=false
"true: compression at constant enthalpy - false: compression with varying enthalpy";
- parameter Units.SI.MassFlowRate gamma_diff=1e-4
+ parameter ThermoSysPro.Units.SI.MassFlowRate gamma_diff=1e-4
"Diffusion conductance (active if diffusion=true in neighbouring volumes)";
- parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
+ parameter ThermoSysPro.Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
parameter Real a1=-88.67
"x^2 coef. of the pump characteristics hn = f(vol_flow) (s2/m5)";
@@ -36,33 +35,36 @@ model StaticCentrifugalPump "Static centrifugal pump"
"Constant coef. of the pump efficiency characteristics rh = f(vol_flow) (s.u.)";
protected
- constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
+ constant ThermoSysPro.Units.SI.Acceleration g=Modelica.Constants.g_n
+ "Gravity constant";
parameter Real eps=1.e-6 "Small number";
parameter Real rhmin=0.20 "Minimum efficiency to avoid zero crossings";
public
Real rh "Hydraulic efficiency";
- Units.SI.Height hn(start=10) "Pump head";
+ ThermoSysPro.Units.SI.Height hn(start=10) "Pump head";
Real R(start=VRot/VRotn) "Reduced rotational speed";
- Units.SI.MassFlowRate Q(start=500) "Mass flow rate";
- Units.SI.VolumeFlowRate Qv(start=0.5) "Volume flow rate";
- Units.SI.Power Wh "Hydraulic power";
- Units.SI.Power Wm "Mechanical power";
+ ThermoSysPro.Units.SI.MassFlowRate Q(start=500) "Mass flow rate";
+ ThermoSysPro.Units.SI.VolumeFlowRate Qv(start=0.5) "Volume flow rate";
+ ThermoSysPro.Units.SI.Power Wh "Hydraulic power";
+ ThermoSysPro.Units.SI.Power Wm "Mechanical power";
ThermoSysPro.Units.nonSI.AngularVelocity_rpm Vr "Rotational speed";
- Units.SI.Density rho(start=998) "Fluid density";
+ ThermoSysPro.Units.SI.Density rho(start=998) "Fluid density";
ThermoSysPro.Units.SI.PressureDifference deltaP
"Pressure variation between the outlet and the inlet";
- Units.SI.SpecificEnthalpy deltaH
+ ThermoSysPro.Units.SI.SpecificEnthalpy deltaH
"Specific enthalpy variation between the outlet and the inlet";
- Units.SI.AbsolutePressure Pm(start=1.e5) "Fluid average pressure";
- Units.SI.SpecificEnthalpy h(start=100000) "Fluid average specific enthalpy";
- FluidType ftype "Fluid type";
- Integer fluid=Integer(ftype) "Fluid number";
-
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement(
+ ThermoSysPro.Units.SI.AbsolutePressure Pm(start=1.e5)
+ "Fluid average pressure";
+ ThermoSysPro.Units.SI.SpecificEnthalpy h(start=100000)
+ "Fluid average specific enthalpy";
+ Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions";
+
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package
+ Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package
+ Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0)));
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal rpm_or_mpower
annotation (Placement(transformation(
@@ -91,12 +93,11 @@ equation
C2.diff_res_1 = C1.diff_res_1 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
C1.diff_res_2 = C2.diff_res_2 + (if (gamma_diff > 0) then 1/gamma_diff else 0);
- C1.ftype = C2.ftype;
+ C1.Xi = C2.Xi;
+
+ X = C1.Xi;
- C1.Xco2 = C2.Xco2;
- C1.Xh2o = C2.Xh2o;
- C1.Xo2 = C2.Xo2;
- C1.Xso2 = C2.Xso2;
+ C1.SubC = C2.SubC;
Q = C1.Q;
deltaP = C2.P - C1.P;
@@ -105,8 +106,6 @@ equation
deltaP = rho*g*hn;
Q = Qv*rho;
- ftype = C1.ftype;
-
/* Fixed rotational speed or fixed mechanical power */
if (fixed_rot_or_power == 1) then
Vr = rpm_or_mpower.signal;
@@ -143,7 +142,7 @@ equation
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(Pm,h,fluid,mode,C1.Xco2, C1.Xh2o, C1.Xo2, C1.Xso2);
+ rho = Medium.density_phX(p=Pm, h=h, X=X);
end if;
annotation (
Diagram(coordinateSystem(
@@ -187,5 +186,6 @@ equation
Baligh El Hefni
"),
- DymolaStoredErrors);
+ DymolaStoredErrors,
+ uses(ThermoSysPro(version="5.0"), Modelica(version="4.0.0")));
end StaticCentrifugalPump;
From 046a559f6d6eb9f66a5fb6c0db98cd2a9415e466 Mon Sep 17 00:00:00 2001
From: LAMBLOT Simon
Date: Thu, 19 Jun 2025 10:51:41 +0200
Subject: [PATCH 038/213] VolumeB
---
.../SimpleExamples/Volumes/TestVolumeB.mo | 26 ++
.../Volumes/TestVolumeB_FlueGases.mo | 33 +++
.../Volumes/TestVolumeB_Traces.mo | 35 +++
.../SimpleExamples/Volumes/package.order | 3 +
ThermoSysPro/Fluid/Volumes/VolumeB.mo | 228 +++++++-----------
5 files changed, 185 insertions(+), 140 deletions(-)
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo
create mode 100644 ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo
new file mode 100644
index 00000000..ef023186
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo
@@ -0,0 +1,26 @@
+within ;
+model TestVolumeB
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{20,28},
+ {40,48}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ VolumeB volumeB(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},
+ {10,10}},
+ rotation=180,
+ origin={42,0})));
+equation
+ connect(sourcePQ.C,volumeB. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(volumeB.Ce2, sourceQ.C) annotation (Line(points={{10,0},{21,0},{21,
+ 7.21645e-16},{32,7.21645e-16}}, color={0,0,0}));
+ connect(volumeB.Cs1, sink.C)
+ annotation (Line(points={{0,10},{0,38},{20,38}},
+ color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)),
+ uses(ThermoSysPro(version="5.0")));
+end TestVolumeB;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo
new file mode 100644
index 00000000..36c5da1e
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo
@@ -0,0 +1,33 @@
+within ;
+model TestVolumeB_FlueGases
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases;
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{26,16},
+ {46,36}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium,
+ P0=4500000,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ VolumeB volumeB(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package Medium = Medium,
+ T0=573.15,
+ option_temperature=true) annotation (Placement(transformation(extent={{-10,-10},
+ {10,10}},
+ rotation=180,
+ origin={40,0})));
+equation
+ connect(sourcePQ.C,volumeB. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(volumeB.Ce2, sourceQ.C) annotation (Line(points={{10,0},{23,0},{23,
+ 7.21645e-16},{30,7.21645e-16}}, color={0,0,0}));
+ connect(volumeB.Cs1, sink.C)
+ annotation (Line(points={{0,10},{0,26},{26,26}},
+ color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)),
+ uses(ThermoSysPro(version="5.0")));
+end TestVolumeB_FlueGases;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo
new file mode 100644
index 00000000..5e6e9e9e
--- /dev/null
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo
@@ -0,0 +1,35 @@
+within ;
+model TestVolumeB_Traces
+ extends ThermoSysPro.UsersGuide.Icons.Example;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam (
+ extraPropertiesNames={"Trace"},
+ C_nominal={0.1},
+ C_default={0.2});
+ ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package
+ Medium = Medium) annotation (Placement(transformation(extent={{20,20},
+ {40,40}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare
+ replaceable package Medium = Medium,
+ Q0=100,
+ SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}})));
+ VolumeB volumeB(redeclare package Medium = Medium,
+ V=1,
+ dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-10,-10},
+ {10,10}})));
+ ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable
+ package Medium = Medium,
+ SubC0={0.2}) annotation (Placement(transformation(extent={{-10,-10},
+ {10,10}},
+ rotation=180,
+ origin={40,0})));
+equation
+ connect(sourcePQ.C,volumeB. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0}));
+ connect(volumeB.Ce2, sourceQ.C) annotation (Line(points={{10,0},{24,0},{24,
+ 7.21645e-16},{30,7.21645e-16}}, color={0,0,0}));
+ connect(volumeB.Cs1, sink.C)
+ annotation (Line(points={{0,10},{0,30},{20,30}},
+ color={0,0,0}));
+ annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)),
+ uses(ThermoSysPro(version="5.0")));
+end TestVolumeB_Traces;
diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
index f71ca450..acb69536 100644
--- a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
+++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order
@@ -4,3 +4,6 @@ TestVolumeC_Traces
TestVolumeA
TestVolumeA_FlueGases
TestVolumeA_Traces
+TestVolumeB
+TestVolumeB_FlueGases
+TestVolumeB_Traces
\ No newline at end of file
diff --git a/ThermoSysPro/Fluid/Volumes/VolumeB.mo b/ThermoSysPro/Fluid/Volumes/VolumeB.mo
index 43daa6e0..e59027d0 100644
--- a/ThermoSysPro/Fluid/Volumes/VolumeB.mo
+++ b/ThermoSysPro/Fluid/Volumes/VolumeB.mo
@@ -1,25 +1,25 @@
-within ThermoSysPro.Fluid.Volumes;
+within ;
model VolumeB "Mixing volume with 2 inlets and 2 outlets"
- extends
- ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface;
+
extends ThermoSysPro.Fluid.Interfaces.IconColors;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
- import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;
+
+ replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
+ replaceable function SaS = Medium.noSaS(SubC=SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Boolean dynamic_energy_balance=true
"true: dynamic energy balance equation - false: static energy balance equation";
- parameter Units.SI.Volume V=1
+ parameter ThermoSysPro.Units.SI.Volume V=1
"Volume (active if dynamic_energy_balance=true)"
annotation (Evaluate=true, Dialog(enable=dynamic_energy_balance));
parameter Boolean dynamic_mass_balance=false
"true: dynamic mass balance equation - false: static mass balance equation (active if the fluid is compressible and if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=isCompressible and dynamic_energy_balance));
parameter Boolean steady_state=true
"true: start from steady state - false: start from (P0, h0) (active if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance));
- parameter Units.SI.AbsolutePressure P0=1e5
+ parameter ThermoSysPro.Units.SI.AbsolutePressure P0=1e5
"Initial fluid pressure (active if the fluid is compressible, and if dynamic_energy_balance=true and dynamic_mass_balance=true and steady_state=false)"
annotation (Evaluate=true, Dialog(enable=isCompressible and
dynamic_energy_balance and dynamic_mass_balance and not steady_state));
- parameter Units.SI.SpecificEnthalpy h0=1e5
+ parameter ThermoSysPro.Units.SI.SpecificEnthalpy h0=1e5
"Initial fluid specific enthalpy (active if dynamic_energy_balance=true and steady_state=false)"
annotation (Evaluate=true, Dialog(enable=dynamic_energy_balance and not
steady_state));
@@ -27,89 +27,70 @@ model VolumeB "Mixing volume with 2 inlets and 2 outlets"
"true: continuous flow reversal - false: discontinuous flow reversal";
parameter Boolean diffusion=false
"true: energy balance equation with diffusion - false: energy balance equation without diffusion";
- parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
+ parameter ThermoSysPro.Units.SI.Density p_rho=0 "If > 0, fixed fluid density"
annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties"));
- parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));
+
parameter Boolean dynamic_composition_balance=false
"true: dynamic fluid composition balance equation
false: static fluid composition balance equation (active for flue gases)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.FlueGases), tab="Fluid", group="Fluid properties"));
- parameter ThermoSysPro.Units.SI.MassFraction Xco20=0.0
- "Initial CO2 mass fraction" annotation (Evaluate=true, Dialog(
+ parameter Medium.ExtraProperty X0[Medium.nX]=Medium.X_default "Initial composition values" annotation (Evaluate=true, Dialog(
enable=dynamic_composition_balance,
tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xh2o0=if ftype == FluidType.FlueGases then 0.05 else 0
- "Initial H20 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xo20=0.23
- "Initial O2 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
- parameter ThermoSysPro.Units.SI.MassFraction Xso20=0
- "Initial SO2 mass fraction" annotation (Evaluate=true, Dialog(
- enable=dynamic_composition_balance,
- tab="Fluid",
- group=
- "Initial composition values (active for flue gases only if dynamic_composition_balance=true)"));
+ group="Medium"));
protected
- constant Units.SI.SpecificEnthalpy hr=2501569
- "Water/steam reference specific enthalpy at 0.01°C";
- parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases";
- parameter Units.SI.MassFlowRate gamma0=1.e-4
+ constant Boolean isCompressible = Medium.isCompressible;
+ parameter ThermoSysPro.Units.SI.MassFlowRate gamma0=1.e-4
"Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)";
- parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
public
- Units.SI.Temperature T "Fluid temperature";
- Units.SI.AbsolutePressure P(start=1.e5) "Fluid pressure";
- Units.SI.SpecificEnthalpy h(start=100000) "Fluid specific enthalpy";
- Units.SI.Density rho(start=998) "Fluid density";
- Units.SI.MassFlowRate BQ "Right hand side of the mass balance equation";
- Units.SI.Power BH "Right hand side of the energy balance equation";
- Units.SI.DerDensityByPressure ddph
+ ThermoSysPro.Units.SI.Temperature T "Fluid temperature";
+ ThermoSysPro.Units.SI.AbsolutePressure P(start=1.e5) "Fluid pressure";
+ ThermoSysPro.Units.SI.SpecificEnthalpy h(start=100000)
+ "Fluid specific enthalpy";
+ ThermoSysPro.Units.SI.Density rho(start=998) "Fluid density";
+ ThermoSysPro.Units.SI.MassFlowRate BQ
+ "Right hand side of the mass balance equation";
+ ThermoSysPro.Units.SI.Power BH
+ "Right hand side of the energy balance equation";
+ ThermoSysPro.Units.SI.DerDensityByPressure ddph
"density derivative wrt pressure at constant specific enthalpy";
- Units.SI.DerDensityByEnthalpy ddhp
+ ThermoSysPro.Units.SI.DerDensityByEnthalpy ddhp
"density derivative wrt specific enthalpy at constant pressure";
- FluidType fluids[5] "Fluids mixing in volume";
- Units.SI.MassFlowRate BXco2 "Right hand side of the CO2 balance equation";
- Units.SI.MassFlowRate BXh2o "Right hand side of the H2O balance equation";
- Units.SI.MassFlowRate BXo2 "Right hand side of the O2 balance equation";
- Units.SI.MassFlowRate BXso2 "Right hand side of the SO2 balance equation";
- ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction";
- ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction";
- Units.SI.Power Je1 "Thermal power diffusion from inlet e1";
- Units.SI.Power Je2 "Thermal power diffusion from inlet e2";
- Units.SI.Power Js1 "Thermal power diffusion from outlet s1";
- Units.SI.Power Js2 "Thermal power diffusion from outlet s2";
- Units.SI.Power J "Total thermal power diffusion";
- Units.SI.MassFlowRate gamma_e1 "Diffusion conductance for inlet e1";
- Units.SI.MassFlowRate gamma_e2 "Diffusion conductance for inlet e2";
- Units.SI.MassFlowRate gamma_s1 "Diffusion conductance for outlet s1";
- Units.SI.MassFlowRate gamma_s2 "Diffusion conductance for outlet s2";
+ ThermoSysPro.Units.SI.MassFlowRate BX[Medium.nXi] "Right hand side of the X balance equation";
+ Medium.ExtraProperty X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Fluid mass fraction";
+ Medium.ExtraProperty BSubC[Medium.nC](quantity=Medium.extraPropertiesNames) "Right hand side of the trace balance equation";
+ Medium.ExtraProperty SubC[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Fluid trace substances";
+ Medium.ExtraProperty SubCSaS[Medium.nC](quantity=Medium.extraPropertiesNames) "Trace modification in the trace balance equation";
+ Medium.ThermodynamicState state;
+ ThermoSysPro.Units.SI.Power Je1 "Thermal power diffusion from inlet e1";
+ ThermoSysPro.Units.SI.Power Je2 "Thermal power diffusion from inlet e2";
+ ThermoSysPro.Units.SI.Power Js1 "Thermal power diffusion from outlet s1";
+ ThermoSysPro.Units.SI.Power Js2 "Thermal power diffusion from outlet s2";
+ ThermoSysPro.Units.SI.Power J "Total thermal power diffusion";
+ ThermoSysPro.Units.SI.MassFlowRate gamma_e1
+ "Diffusion conductance for inlet e1";
+ ThermoSysPro.Units.SI.MassFlowRate gamma_e2
+ "Diffusion conductance for inlet e2";
+ ThermoSysPro.Units.SI.MassFlowRate gamma_s1
+ "Diffusion conductance for outlet s1";
+ ThermoSysPro.Units.SI.MassFlowRate gamma_s2
+ "Diffusion conductance for outlet s2";
Real re1 "Value of r(Q/gamma) for inlet e1";
Real re2 "Value of r(Q/gamma) for inlet e2";
Real rs1 "Value of r(Q/gamma) for outlet s1";
Real rs2 "Value of r(Q/gamma) for outlet s2";
public
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1( redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2 annotation (Placement(
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2( redeclare package Medium = Medium) annotation (Placement(
transformation(extent={{90,-10},{110,10}}, rotation=0),
iconTransformation(extent={{90,-10},{110,10}})));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs1 annotation (
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs1( redeclare package Medium = Medium) annotation (
Placement(transformation(extent={{-10,90},{10,110}}, rotation=0),
iconTransformation(extent={{-10,90},{10,110}})));
- ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs2 annotation (
+ ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs2( redeclare package Medium = Medium) annotation (
Placement(transformation(extent={{-10,-110},{10,-90}}, rotation=0)));
initial equation
if dynamic_energy_balance and dynamic_mass_balance then
@@ -128,19 +109,11 @@ initial equation
end if;
end if;
- if flue_gases then
- if dynamic_composition_balance then
- if steady_state then
- der(Xco2) = 0;
- der(Xh2o) = 0;
- der(Xo2) = 0;
- der(Xso2) = 0;
- else
- Xco2 = Xco20;
- Xh2o = Xh2o0;
- Xo2 = Xo20;
- Xso2 = Xso20;
- end if;
+ if dynamic_composition_balance then
+ if steady_state then
+ der(X) = fill(0,Medium.nX);
+ else
+ X = X0[1:Medium.nXi];
end if;
end if;
@@ -150,16 +123,6 @@ equation
assert(V > 0, "Volume non-positive");
end if;
- /* Check that incoming fluids are compatible with fluid in volume */
- fluids[1] = ftype;
- fluids[2] = Ce1.ftype;
- fluids[3] = Ce2.ftype;
- fluids[4] = Cs1.ftype;
- fluids[5] = Cs2.ftype;
-
- assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids),
- "VolumeB: fluids mixing in volume are not compatible with each other");
-
/* Unconnected connectors */
if (cardinality(Ce1) == 0) then
Ce1.Q = 0;
@@ -167,11 +130,8 @@ equation
Ce1.h_vol_1 = 1.e5;
Ce1.diff_res_1 = 0;
Ce1.diff_on_1 = false;
- Ce1.ftype = ftype;
- Ce1.Xco2 = 0;
- Ce1.Xh2o = 0;
- Ce1.Xo2 = 0;
- Ce1.Xso2 = 0;
+ Ce1.Xi = Medium.X_default[1:Medium.nXi];
+ Ce1.SubC = Medium.C_default;
end if;
if (cardinality(Ce2) == 0) then
@@ -180,11 +140,8 @@ equation
Ce2.h_vol_1 = 1.e5;
Ce2.diff_res_1 = 0;
Ce2.diff_on_1 = false;
- Ce2.ftype = ftype;
- Ce2.Xco2 = 0;
- Ce2.Xh2o = 0;
- Ce2.Xo2 = 0;
- Ce2.Xso2 = 0;
+ Ce2.Xi = Medium.X_default[1:Medium.nXi];
+ Ce2.SubC = Medium.C_default;
end if;
if (cardinality(Cs1) == 0) then
@@ -205,7 +162,7 @@ equation
BQ = Ce1.Q + Ce2.Q - Cs1.Q - Cs2.Q;
if isCompressible and dynamic_energy_balance and dynamic_mass_balance then
- V*(ddph*der(P) + ddhp*der(h - Xh2o*hr)) = BQ;
+ V*(ddph*der(P) + ddhp*der(h)) = BQ;
else
0 = BQ;
end if;
@@ -216,13 +173,13 @@ equation
P = Cs2.P;
/* Energy balance equation */
- BH = Ce1.Q*(Ce1.h - Ce1.Xh2o*hr) + Ce2.Q*(Ce2.h - Ce2.Xh2o*hr) - Cs1.Q*(Cs1.h - Cs1.Xh2o*hr) - Cs2.Q*(Cs2.h - Cs2.Xh2o*hr) + J;
+ BH = Ce1.Q*Ce1.h + Ce2.Q*Ce2.h - Cs1.Q*Cs1.h - Cs2.Q*Cs2.h + J;
if dynamic_energy_balance then
if dynamic_mass_balance then
- V*(((h - Xh2o*hr)*ddph - 1)*der(P) + ((h - Xh2o*hr)*ddhp + rho)*der(h - Xh2o*hr)) = BH;
+ V*((h*ddph - 1)*der(P) + (h*ddhp + rho)*der(h)) = BH;
else
- V*rho*der(h - Xh2o*hr) = BH;
+ V*rho*der(h) = BH;
end if;
else
BH = 0;
@@ -234,42 +191,30 @@ equation
Cs2.h_vol_1 = h;
/* Fluid composition balance equations */
- BXco2 = Ce1.Xco2*Ce1.Q + Ce2.Xco2*Ce2.Q - Cs1.Xco2*Cs1.Q - Cs2.Xco2*Cs2.Q;
- BXh2o = Ce1.Xh2o*Ce1.Q + Ce2.Xh2o*Ce2.Q - Cs1.Xh2o*Cs1.Q - Cs2.Xh2o*Cs2.Q;
- BXo2 = Ce1.Xo2*Ce1.Q + Ce2.Xo2*Ce2.Q - Cs1.Xo2*Cs1.Q - Cs2.Xo2*Cs2.Q;
- BXso2 = Ce1.Xso2*Ce1.Q + Ce2.Xso2*Ce2.Q - Cs1.Xso2*Cs1.Q - Cs2.Xso2*Cs2.Q;
-
- if flue_gases then
- if dynamic_composition_balance then
- V*rho*der(Xco2) + Xco2*BQ = BXco2;
- V*rho*der(Xh2o) + Xh2o*BQ = BXh2o;
- V*rho*der(Xo2) + Xo2*BQ = BXo2;
- V*rho*der(Xso2) + Xso2*BQ = BXso2;
- else
- Xco2*BQ = BXco2;
- Xh2o*BQ = BXh2o;
- Xo2*BQ = BXo2;
- Xso2*BQ = BXso2;
- end if;
+ BX = Ce1.Xi*Ce1.Q + Ce2.Xi*Ce2.Q - Cs1.Xi*Cs1.Q - Cs2.Xi*Cs2.Q;
+
+ if dynamic_composition_balance then
+ V*rho*der(X) + X*BQ = BX;
else
- Xco2 = 0;
- Xh2o = 0;
- Xo2 = 0;
- Xso2 = 0;
+ X*BQ = BX;
end if;
- Cs1.ftype = ftype;
- Cs2.ftype = ftype;
+ Cs1.Xi = X;
- Cs1.Xco2 = Xco2;
- Cs1.Xh2o = Xh2o;
- Cs1.Xo2 = Xo2;
- Cs1.Xso2 = Xso2;
+ Cs2.Xi = X;
- Cs2.Xco2 = Xco2;
- Cs2.Xh2o = Xh2o;
- Cs2.Xo2 = Xo2;
- Cs2.Xso2 = Xso2;
+ /* Traces composition balance equations */
+ BSubC = Ce1.Q*Ce1.SubC + Ce2.Q*Ce2.SubC - Cs1.Q*Cs1.SubC - Cs2.Q*Cs2.SubC;
+
+ SubCSaS = SaS();
+ if dynamic_mass_balance then
+ V*rho*der(SubC) + SubC*BQ + V*rho*SubCSaS = BSubC;
+ else
+ V*rho*SubCSaS = BSubC;
+ end if;
+
+ Cs1.SubC = SubC;
+ Cs2.SubC = SubC;
/* Flow reversal */
if continuous_flow_reversal then
@@ -327,19 +272,21 @@ equation
/* Fluid thermodynamic properties */
if isCompressible and dynamic_mass_balance then
- ddph = ThermoSysPro.Properties.Fluid.Density_derp_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
- ddhp = ThermoSysPro.Properties.Fluid.Density_derh_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ ddph = Medium.density_derp_h(state);
+ ddhp = Medium.density_derh_p(state);
else
ddph = 0;
ddhp = 0;
end if;
- T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ state = Medium.setState_phX(p=P, h=h, X=X);
+
+ T = Medium.temperature(state);
if (p_rho > 0) then
rho = p_rho;
else
- rho = ThermoSysPro.Properties.Fluid.Density_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2);
+ rho = Medium.density(state);
end if;
annotation (
@@ -395,5 +342,6 @@ equation
Daniel Bouskela
Baligh El Hefni
-