Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
51a2568
#125 Initial commit for MediumImplementation in ThermoSysPro
bmazurie May 16, 2025
81201fc
#125 Organize architecture for Fluid/Example/SimpleExamples for new f…
bmazurie May 16, 2025
aeb7704
#125 SubC name in connectors description
bmazurie May 20, 2025
80e58c4
#125 Added h_offset to a FlueGases media
bmazurie May 21, 2025
d6f15cb
#125 modification of h_offset to be equal to old FlueGases implementa…
bmazurie May 22, 2025
9a4c1d6
#125 SourcePQ PipePressureLoss and Sink with examples
bmazurie May 22, 2025
6669cee
Merge branch '125-sourcePQ-PipePressureLoss-Sink' into '125-mediumsIm…
bmazurie May 22, 2025
a58f96f
#125 SourceQ and VolumeC
bmazurie May 22, 2025
5187926
#125 SourceQ and VolumeC
bmazurie May 22, 2025
83d9756
Merge branch '125-VolumeC-Dryer' into '125-mediumsImplementation-in-F…
bmazurie May 22, 2025
b71ba45
#125 VolumeC examples moved to the correct folder
bmazurie May 22, 2025
4fd0c0a
#125 VolumeC FlueGases with startValue for OpenModelica
bmazurie May 22, 2025
af834d6
Merge branch '125-VolumeC-Dryer' into '125-mediumsImplementation-in-F…
bmazurie May 22, 2025
408236a
#125 SaS in VolumeC defined from Properties so that no Warnings
bmazurie May 22, 2025
ab9b85a
#125 Modified TSP version to 5.0
bmazurie May 23, 2025
6b678e5
#125 Dryer
bmazurie May 23, 2025
06cb259
#125 no more replaceable in redeclaration example so that no warnings…
bmazurie May 23, 2025
726e251
Merge branch '125-VolumeC-Dryer' into '125-mediumsImplementation-in-F…
bmazurie May 23, 2025
5f85809
#125 SingularPressureLoss
May 23, 2025
9beb2c6
Merge branch '125-SingularPressureLoss' into '125-mediumsImplementati…
bmazurie May 23, 2025
0ebe873
#125-SingularPressureLoss added color extend for OM compatibility
May 23, 2025
3a6939d
Merge branch '125-SingularPressureLoss' into '125-mediumsImplementati…
bmazurie May 23, 2025
f8be283
#125 VolumeA
hocine-rastic May 28, 2025
1145b4e
#125 StodolaTurbine
Jun 5, 2025
ee4063c
#125 SourceP
Jun 5, 2025
dcd8c52
#125 SinkQ
Jun 5, 2025
a61aa08
#125 SinQ correction
Jun 5, 2025
2e5559d
#125 StodolaTurbine added SubC
Jun 5, 2025
533944a
#125 SinkP
Jun 5, 2025
3b5140d
#125 SinkPQ
Jun 5, 2025
0055138
#125 Source
Jun 5, 2025
2b30c3c
#125 StodolaTurbine corrected example and added traces example
Jun 11, 2025
f53c3f5
#125 ControlValve
Jun 11, 2025
cc7127f
#125 RefT
Jun 13, 2025
dfd0320
Merge branch '125-SinkQ' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 16, 2025
4866b65
Merge branch '125-SinkP' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 16, 2025
00b716d
Merge branch '125-Source' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 16, 2025
e8c3ac4
Merge branch '125-SinkPQ' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 16, 2025
5f4bbef
Merge branch '125-SourceP' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 16, 2025
adb13a6
#125 TwoPhase medium for StodaTurbine, constrainedby medium to subC m…
bmazurie Jun 16, 2025
35afdf7
#125 RefQ
Jun 16, 2025
6f01879
#125 changed constrainedby medium
bmazurie Jun 16, 2025
b0eabcb
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-RefT'
bmazurie Jun 16, 2025
474b695
#125 Edit VolumeA to change the constrainedby medium
bmazurie Jun 16, 2025
b96ef82
Merge branch 'VolumeA' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 16, 2025
6a169be
#125 ControlValve changed constrainedby medium
bmazurie Jun 16, 2025
d200a04
Merge branch '125-ControlValve' into '125-mediumsImplementation-in-Fl…
bmazurie Jun 16, 2025
dea3005
#125 RefQ - Removed useless X declaration and equation
Jun 16, 2025
caa3baf
#125 RefP
Jun 16, 2025
c61aacb
#125-LumpedStraightPipe
Jun 16, 2025
0d49afd
staticcentrifugalpump
Jun 19, 2025
046a559
VolumeB
Jun 19, 2025
07ddfe0
VolumeD
Jun 19, 2025
1eed3e0
VolumeI
Jun 19, 2025
97fd547
Bend
Jun 19, 2025
dc8e849
CheckValve
Jun 19, 2025
52b91e8
Diaphragm
Jun 19, 2025
f4f77c6
DynamicCheckValve
Jun 19, 2025
353b7c8
IdealCheckValve
Jun 19, 2025
b290da4
IdealSwitchValve
Jun 19, 2025
eff4e76
SwitchValve
Jun 19, 2025
42bfdf6
DynamicReliefValve
Jun 19, 2025
e403469
Merge branch '125-RefP' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 20, 2025
cd109df
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-RefQ'
bmazurie Jun 20, 2025
f54a412
Merge branch '125-RefQ' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 20, 2025
e9e327e
#125 VolumeB reviewed
bmazurie Jun 20, 2025
2d31b70
corrections
Jun 20, 2025
4fe6c3b
Merge branch '125-VolumeB' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 20, 2025
9eec8b0
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-VolumeD'
bmazurie Jun 20, 2025
f03e254
#125 VolumeD reviewed + startValues for FlueGases examples
bmazurie Jun 20, 2025
bf321be
Merge branch '125-VolumeD' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 20, 2025
f6a0297
corrections
Jun 20, 2025
74bebfa
#125 Bend reviewed
bmazurie Jun 20, 2025
e2e46ed
#125 Bend units modified
bmazurie Jun 20, 2025
8b060a3
corrections
Jun 20, 2025
93b288b
Merge branch '125-Bend' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 20, 2025
3159619
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Diaphr…
bmazurie Jun 20, 2025
2aea315
dernieres corrections
Jun 20, 2025
734be47
#125 Diaphragm reviewed
bmazurie Jun 20, 2025
4017608
#125 Diaphragm reviewed, annotation
bmazurie Jun 20, 2025
f19866d
Merge branch '125-Diaphragm' into '125-mediumsImplementation-in-Fluid…
bmazurie Jun 20, 2025
4e287db
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-IdealC…
bmazurie Jun 20, 2025
523e306
#125 IdealCheckValve reviewed
bmazurie Jun 20, 2025
6a70c19
Merge branch '125-IdealCheckValve' into '125-mediumsImplementation-in…
bmazurie Jun 20, 2025
710a2e2
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Dynami…
bmazurie Jun 20, 2025
dc02c5f
#125 DynamicReliefValve reviewed
bmazurie Jun 20, 2025
7672e91
Merge branch '125-DynamicReliefValve' into '125-mediumsImplementation…
bmazurie Jun 20, 2025
5bdf341
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Switch…
bmazurie Jun 20, 2025
8a91b6f
#125 SwitchValve reviewed
bmazurie Jun 20, 2025
aa0de2e
Merge branch '125-SwitchValve' into '125-mediumsImplementation-in-Flu…
bmazurie Jun 20, 2025
c58f843
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-IdealS…
bmazurie Jun 20, 2025
053e17b
#125 IdealSwitchValve reviewed
bmazurie Jun 20, 2025
7e4dc6a
Merge branch '125-IdealSwitchValve' into '125-mediumsImplementation-i…
bmazurie Jun 20, 2025
6dcfc7a
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Dynami…
bmazurie Jun 20, 2025
6ab1bb2
#125 DynamicCheckValve reviewed
bmazurie Jun 20, 2025
21a805b
Merge branch '125-DynamicCheckValve' into '125-mediumsImplementation-…
bmazurie Jun 20, 2025
25bc6ec
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-CheckV…
bmazurie Jun 20, 2025
ab78acb
#125 CheckValve reviewed
bmazurie Jun 20, 2025
533a70e
Merge branch '125-CheckValve' into '125-mediumsImplementation-in-Flui…
bmazurie Jun 20, 2025
f2d26d7
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-VolumeI'
bmazurie Jun 20, 2025
b9af018
#125 VolumeI reviewed
bmazurie Jun 20, 2025
d097dab
Merge branch '125-VolumeI' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jun 20, 2025
d6b87ef
#125 StaticCentrifugalPump reviewed
bmazurie Jun 20, 2025
d5fe041
Merge branch '125-StaticCentrifugalPump' into '125-mediumsImplementat…
bmazurie Jun 20, 2025
37bd39d
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-RefT'
bmazurie Jun 20, 2025
62a1776
#125 OnePhaseFlowPipe
bmazurie Jun 20, 2025
ba39415
VolumeATh
Jun 23, 2025
11a7658
VolumeBTh
Jun 23, 2025
f6fd332
VolumeCTh
Jun 23, 2025
2e97e32
VolumeDTh
Jun 23, 2025
17bcff9
VolumeITh
Jun 23, 2025
c742d55
corrections
Jun 23, 2025
6e5a97b
corrections
Jun 23, 2025
14625a9
corrections
Jun 23, 2025
75c9f9f
CentrifugalPump
Jun 24, 2025
8102b72
#125 VolumeAth with heatSource, not working with OM1.25
bmazurie Jun 24, 2025
8e00bd4
examples with heat source
Jun 24, 2025
8196f42
Examples with heat source
Jun 24, 2025
bc3bab0
Examples with heat source
Jun 25, 2025
5270e5c
Examples with heat source
Jun 25, 2025
7339f10
#125 no more IF97 annotation
bmazurie Jun 27, 2025
b949df0
Merge branch '125-VolumeATh' into '125-mediumsImplementation-in-Fluid…
bmazurie Jun 27, 2025
07f6d3a
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Volume…
bmazurie Jun 27, 2025
900f9c4
#125 VolumeBth
bmazurie Jun 27, 2025
96b6df1
Merge branch '125-VolumeBTh' into '125-mediumsImplementation-in-Fluid…
bmazurie Jun 27, 2025
dde0c82
#125 IF97 imports
bmazurie Jun 27, 2025
8904152
Merge branch '125-DynamicOnePhaseFlowPipe' into '125-mediumsImplement…
bmazurie Jun 27, 2025
2f9c617
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Volume…
bmazurie Jun 27, 2025
4c05a61
#125 VolumeCth reviewed
bmazurie Jun 27, 2025
550806e
Merge branch '125-VolumeCTh' into '125-mediumsImplementation-in-Fluid…
bmazurie Jun 27, 2025
497b8b8
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Volume…
bmazurie Jun 27, 2025
79ec2fb
#125 VolumeDth reviewed
bmazurie Jun 27, 2025
fd4b220
Merge branch '125-VolumeDTh' into '125-mediumsImplementation-in-Fluid…
bmazurie Jun 27, 2025
06de5b8
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Volume…
bmazurie Jun 27, 2025
6976352
#125 VolumeIth reviewed
bmazurie Jun 27, 2025
d75a314
Merge branch '125-VolumeITh' into '125-mediumsImplementation-in-Fluid…
bmazurie Jun 27, 2025
7d62861
#125 CentrifugalPump reviewed
bmazurie Jun 27, 2025
60c1d98
Merge branch '125-CentrifugalPump' into '125-mediumsImplementation-in…
bmazurie Jun 27, 2025
9168f58
#125 StodolaTurbine no X in setStates
bmazurie Jul 2, 2025
1d7ebe4
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Stodol…
bmazurie Jul 2, 2025
9790eeb
#125 no more X declaration in StodolaTurbine
bmazurie Jul 2, 2025
37c773e
Removed X balance equation
Jul 2, 2025
b5dea3f
Included X balance equation for completeness (undid last commit)
Jul 2, 2025
0495bea
Merge branch '125-StodolaTurbine' into '125-mediumsImplementation-in-…
bmazurie Jul 2, 2025
00673bb
#125 Tank
bmazurie Jul 2, 2025
a86b257
#125 Tank with traces example
bmazurie Jul 2, 2025
7834127
Merge branch '125-Tank' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jul 2, 2025
20bd0f1
#125 Sensors
bmazurie Jul 3, 2025
50bb2e0
#125 SensorT without X redeclaration
bmazurie Jul 3, 2025
9b2d7a9
Simplified sensor T et Qv : removed unused variables, transformed fac…
Jul 3, 2025
2544d63
rebase conflict #125 RefT
Jun 13, 2025
703f2ad
Merge branch '125-RefT' of https://gitlab.pam-retd.fr/thermosysproand…
bmazurie Jul 3, 2025
a5a4479
#125 Splitter2 and Mixer2
bmazurie Jul 3, 2025
21d55fd
#125 LoopBreakers, P has its examples
bmazurie Jul 3, 2025
5cd46a0
#125 Refs and LoopBreakers
bmazurie Jul 3, 2025
3c5cfc8
#125 An example from RefP had disappeared
bmazurie Jul 3, 2025
cae25d2
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-Lumped…
bmazurie Jul 4, 2025
fa6f8d5
#125 LumpedStraightPipe for FlueGases
bmazurie Jul 4, 2025
78c4152
#125 LumpedStraightPipe no more region
bmazurie Jul 4, 2025
4227338
Merge branch '125-LumpedStraightPipe' into '125-mediumsImplementation…
Jul 4, 2025
0360cc0
#125 DeheaterMixer2
bmazurie Jul 6, 2025
385e69b
#125 MassFlowMultiplier
bmazurie Jul 6, 2025
39c9990
#125 Mixer3
bmazurie Jul 6, 2025
aa7ca91
#125 Mixer3
bmazurie Jul 6, 2025
a2d4f6e
#125 Mixer8's examples
bmazurie Jul 6, 2025
8ba766f
#125 Splitter3
bmazurie Jul 7, 2025
21b74bd
#125 constrainedby package for Refs
bmazurie Jul 7, 2025
d761350
#125 StaticDrum
bmazurie Jul 7, 2025
d03bcdd
Merge branch '125-Sensors' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jul 7, 2025
a68699e
Modified some values in examples
Jul 7, 2025
57d9731
#125 Reformat
bmazurie Jul 7, 2025
3a207f6
Merge branch '125-LoopBreakers' into '125-mediumsImplementation-in-Fl…
bmazurie Jul 7, 2025
b432fc3
#125 StaticExchangerKS
bmazurie May 7, 2026
d767a9e
#125 StaticPlateHeatExchanger
bmazurie May 7, 2026
5c83340
#125 SimpleDynamicCondenser
bmazurie May 7, 2026
498735b
#125 SimpleStaticCondenser
bmazurie May 7, 2026
700ccd5
#125 StaticCondenser
bmazurie May 7, 2026
b69755e
#125 StaticCondenserHEI
bmazurie May 7, 2026
15a6faa
#125 FixedPowerHeatExchanger but examples not working right now
bmazurie May 7, 2026
723d7fc
#125 NTUWaterHeater
bmazurie May 7, 2026
952bcf8
#125 StaticExchangerDTorWorEff
bmazurie May 8, 2026
668435b
#125 StaticWallFlueGasesExchanger
bmazurie May 8, 2026
555cb0e
#125 DynamicPlateHeatExchanger but issues with examples
bmazurie May 11, 2026
cbb6f73
#125 volatile example media
bmazurie May 11, 2026
b13b19c
#125 SimpleDynamicCondenser SubC balance but example strange
bmazurie May 11, 2026
3e4c3f0
#125 DynamicDrum
bmazurie May 12, 2026
796d8b0
#125 TwoPhaseVolume
bmazurie May 12, 2026
8eaea38
#125 DynamicOnePhaseFlowShell
bmazurie May 12, 2026
cf9355b
#125 Pressurizer
bmazurie May 12, 2026
ef08602
#125 TankHorizontal
bmazurie May 12, 2026
e894218
#125 Example fixed for SimpleDynamicCondenser
bmazurie May 12, 2026
55c45f5
#125 SimpleEvaporatorWaterSteamFlueGases
bmazurie May 12, 2026
2796e7f
#125 DynamicTwoPhaseFlowPipe
bmazurie May 12, 2026
bdcb80a
#125 DynamicTwoPhaseFlowRiser
bmazurie May 12, 2026
5979baa
#125 DynamicTwoPhaseFlowRiser
bmazurie May 12, 2026
a5bf4e8
#125 TwoPhaseCavity
bmazurie May 12, 2026
49c0e86
#125 TwoPhaseCavityOnePipe
bmazurie May 12, 2026
d1073aa
#125 modified StaticDrum for subC balance
bmazurie May 12, 2026
8cc4569
#125 InvSingularPressureLoss and LumpedStraightPipe
bmazurie May 12, 2026
ba1afaf
#125 StaticAerocondenser, example not working yet
bmazurie May 12, 2026
c3bced5
#125 StaticAerocondenser, example not working yet
bmazurie May 12, 2026
6aac265
#125 StaticAerocondenser with working example
bmazurie May 13, 2026
3d9a3c1
#125 ThreeWayValve
bmazurie May 13, 2026
02de5c9
#125 HeatExchangers with examples
bmazurie May 18, 2026
3e39bd4
125 Sensors
bmazurie Jul 3, 2025
452e305
#125 SensorT without X redeclaration
bmazurie Jul 3, 2025
4666d38
Simplified sensor T et Qv : removed unused variables, transformed fac…
Jul 3, 2025
2d7a532
conflict #125-LumpedStraightPipe
Jun 16, 2025
977c98b
125 LumpedStraightPipe for FlueGases
bmazurie Jul 4, 2025
09fbe1f
#125 CombustionTurbine
bmazurie Jul 4, 2025
d40a610
#125 Compressor
bmazurie Jul 4, 2025
fed0621
conflict #125 AirHumidity
bmazurie Jul 4, 2025
0e3bfa6
#125 Fan without example
bmazurie Jul 4, 2025
28424fe
#125 example for StaticFan but no init, need to try implicit declarat…
bmazurie Jul 4, 2025
66cb469
125-LumpedStraightPipe
Jun 16, 2025
5debdb0
125 LumpedStraightPipe for FlueGases
bmazurie Jul 4, 2025
a3cf6be
#125 Easier Fan example
bmazurie Jul 6, 2025
8010158
#125 SteamEngine
bmazurie Jul 6, 2025
495dad4
125 SteamExtractionSplitter and small fixes on SteamEngines examples
bmazurie Jul 6, 2025
f9dbeed
#125 LumpedStraightPipe fixed after rebase
bmazurie May 19, 2026
11b3778
#125 Boilers subpackage
bmazurie May 19, 2026
2040b69
#125 Combustion chambers with examples
bmazurie May 19, 2026
8462ec8
#125 GridFurnace and PostCombustionGas dont use pro anymore but Therm…
bmazurie May 19, 2026
d40a32a
#125 RefH with examples
bmazurie May 19, 2026
3455d6c
#125 CHPEngineBarkantineSystem and InternalCombustionEngine
bmazurie May 19, 2026
257ce97
#125 GasTurbine
bmazurie May 19, 2026
bed2e26
#125 C3H3F5 media
bmazurie May 19, 2026
62b54a4
#125 HeatPumpCompressor with C3H3F5
bmazurie May 19, 2026
24ceb03
#125 modif C3H3F5 so that closer to old implementation, and Oil Medium
bmazurie May 19, 2026
6a365f0
#125 WaterSteamSimple MoltenSalt and DryAirIdealGas
bmazurie May 19, 2026
ca2825b
#125 ThermoSysPro.Fluid.Examples.Book.SimpleExamples except HX
bmazurie May 19, 2026
3155c90
#125 ThermoSysPro.Fluid.Examples.Book.SimpleExample.HX but not all wo…
bmazurie May 20, 2026
bbf765c
#125 HX exemples inside SimpleExamples
bmazurie May 22, 2026
ad25437
Merge branch '125-GasTurbine-Fan' into '125-HX'
bmazurie Jun 8, 2026
5b59c63
Merge branch '125-leftJunctions' into '125-mediumsImplementation-in-F…
bmazurie Jun 8, 2026
225c63d
Merge branch '125-mediumsImplementation-in-FluidTSP' into '125-HX'
bmazurie Jun 8, 2026
631e4af
#125 issue with the rebase
bmazurie Jun 8, 2026
0455263
#125 changed some init for examples
bmazurie Jun 9, 2026
c3dd61d
Merge branch '125-HX' into '125-mediumsImplementation-in-FluidTSP'
bmazurie Jul 24, 2026
791b649
#125 added subC0 to PlugA for example
bmazurie Jul 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ status*
*.mof
*.c
buildlog.txt

*.bak-mo
18 changes: 9 additions & 9 deletions ThermoSysPro/Fluid/Boilers/BoilerSystem.mo
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
within ThermoSysPro.Fluid.Boilers;
model BoilerSystem "Boiler"
extends
ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FlueGasesFluidTypeParameterInterface;
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.PartialSubCMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the flue gases side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));

parameter Units.SI.Temperature Tsf=423.16
"Flue gases temperature at the outlet";
Expand All @@ -19,7 +18,6 @@ model BoilerSystem "Boiler"
"Diffusion conductance for the water/steam side (active if diffusion=true in neighbouring volumes)";
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 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));

ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ Fuel(
Xashes=0.011,
Expand All @@ -36,6 +34,8 @@ model BoilerSystem "Boiler"
annotation (Placement(transformation(extent={{-56,-10},{-36,10}}, rotation=
0)));
ThermoSysPro.Fluid.Boilers.FossilFuelBoiler Boiler(
redeclare package Medium = Medium,
redeclare package Medium_FlueGases = Medium_FlueGases,
Qsf(start=45.8744, fixed=false),
Pee(fixed=false),
Qe(fixed=false, start=6),
Expand All @@ -59,15 +59,15 @@ model BoilerSystem "Boiler"
origin={-10,0},
extent={{20,-20},{-20,20}},
rotation=270)));
Interfaces.Connectors.FluidInlet InletWaterSteam "Water inlet" annotation (
Interfaces.Connectors.FluidInlet InletWaterSteam(redeclare package Medium = Medium) "Water inlet" annotation (
Placement(transformation(extent={{40,-110},{60,-90}}, rotation=0)));
Interfaces.Connectors.FluidOutlet OutletWaterSteam "Water/steam outlet"
Interfaces.Connectors.FluidOutlet OutletWaterSteam(redeclare package Medium = Medium) "Water/steam outlet"
annotation (Placement(transformation(extent={{40,90},{60,110}}, rotation=0)));
Interfaces.Connectors.FluidOutlet OutletFlueGases "Flue gases outlet"
Interfaces.Connectors.FluidOutlet OutletFlueGases(redeclare package Medium = Medium_FlueGases) "Flue gases outlet"
annotation (Placement(
transformation(extent={{-80,90},{-60,110}}, rotation=0),
iconTransformation(extent={{-80,90},{-60,110}})));
Interfaces.Connectors.FluidInlet InletFlueGases "Flue gases inlet"
Interfaces.Connectors.FluidInlet InletFlueGases(redeclare package Medium = Medium_FlueGases) "Flue gases inlet"
annotation (Placement(
transformation(extent={{-80,-110},{-60,-90}}, rotation=0)));
equation
Expand Down
109 changes: 57 additions & 52 deletions ThermoSysPro/Fluid/Boilers/FossilFuelBoiler.mo
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
within ThermoSysPro.Fluid.Boilers;
model FossilFuelBoiler "Fossil fuel boiler"
extends
ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FlueGasesFluidTypeParameterInterface;
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.PartialSubCMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the flue gases side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));

parameter Units.SI.Temperature Tsf=400 "Flue gases temperature at the outlet";
parameter Integer Boiler_efficiency_type = 1 "1: Taking into account LHV only - 2: Using the total incoming power";
Expand All @@ -18,7 +17,6 @@ model FossilFuelBoiler "Fossil fuel boiler"
"Diffusion conductance for the water/steam side (active if diffusion=true in neighbouring volumes)";
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 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties"));

protected
constant Real amC=12.01115 "Carbon atomic mass";
Expand All @@ -29,7 +27,11 @@ protected
constant Real amH2O = 2*amH + amO "H2O molecular mass";
constant Real amSO2 = amS + 2*amO "SO2 molecular mass";
constant Real teps=1e-6 "Small number";
parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic";
parameter Integer iN2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"N2", "Nitrogen", "nitrogen"}) "Index of nitrogen in the flue gases composition";
parameter Integer iO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"O2", "Oxygen", "oxygen"}) "Index of oxygen in the flue gases composition";
parameter Integer iH2O=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"H2O", "Water", "water"}) "Index of water vapor in the flue gases composition";
parameter Integer iCO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"CO2", "Carbondioxide", "Carbon dioxide", "carbondioxide"}) "Index of carbon dioxide in the flue gases composition";
parameter Integer iSO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"SO2", "Sulfurdioxide", "Sulfur dioxide", "sulfurdioxide"}) "Index of sulfur dioxide in the flue gases composition";
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 Real eps=1.e-0 "Small number for pressure loss equation";
Expand Down Expand Up @@ -98,7 +100,6 @@ public
Real exc(start=1) "Air combustion ratio";
Real exc_air(start=0.1) "Pertcentage of air in excess";

FluidType fluids[2] "Fluids mixing in volume";
Units.SI.SpecificEnthalpy h(start=10e5) "Flue gases specific enthalpy";
Units.SI.Power Jair "Thermal power diffusion from inlet Cair";
Units.SI.Power Jfg "Thermal power diffusion from outlet Cfg";
Expand All @@ -107,44 +108,43 @@ public
Units.SI.MassFlowRate gamma_fg "Diffusion conductance for outlet Cfg";
Real rair "Value of r(Q/gamma) for inlet Cair";
Real rfg "Value of r(Q/gamma) for outlet Cfg";
FluidType ftype_ws "Water/steam fluid type";
Integer fluid_ws=Integer(ftype_ws) "Water/steam fluid number";
Medium.MassFraction Xws[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Water/steam mass fractions";
Medium_FlueGases.MassFraction Xea[Medium_FlueGases.nX](start=Medium_FlueGases.X_default) "Air inlet mass fractions";
Medium_FlueGases.MassFraction Xsf[Medium_FlueGases.nX](start=Medium_FlueGases.X_default) "Flue gases outlet mass fractions";
Medium.ExtraProperty SubCws[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Water/steam trace substances";
Medium_FlueGases.ExtraProperty SubCfg[Medium_FlueGases.nC](quantity=Medium_FlueGases.extraPropertiesNames, start=Medium_FlueGases.C_default) "Flue gases trace substances";
Medium.ThermodynamicState state_ws_m "Water/steam average thermodynamic state";
Medium.ThermodynamicState state_ws_out "Water/steam outlet thermodynamic state";
Medium_FlueGases.ThermodynamicState state_air_in "Air inlet thermodynamic state";
Medium_FlueGases.ThermodynamicState state_fg_comb "Flue gases thermodynamic state after combustion";
Medium_FlueGases.ThermodynamicState state_fg_out "Flue gases outlet thermodynamic state";
Medium_FlueGases.ThermodynamicState state_fg_m "Flue gases average thermodynamic state";

public
Interfaces.Connectors.FuelInlet Cfuel "Fuel inlet"
annotation (Placement(transformation(extent={{-10,-90},{10,-70}}, rotation=
0)));
Interfaces.Connectors.FluidInlet Cair "Air inlet"
Interfaces.Connectors.FluidInlet Cair(redeclare package Medium = Medium_FlueGases) "Air inlet"
annotation (Placement(transformation(
extent={{-110,-72},{-90,-52}}, rotation=0)));
Interfaces.Connectors.FluidOutlet Cfg "Flue gases outlet"
Interfaces.Connectors.FluidOutlet Cfg(redeclare package Medium = Medium_FlueGases) "Flue gases outlet"
annotation (Placement(transformation(
extent={{90,-72},{110,-52}}, rotation=0)));
public
Interfaces.Connectors.FluidInlet Cws1 "Water inlet"
Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium) "Water inlet"
annotation (Placement(transformation(
extent={{-110,50},{-90,70}}, rotation=0)));
Interfaces.Connectors.FluidOutlet Cws2 "Water/steam outlet"
Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium) "Water/steam outlet"
annotation (Placement(transformation(
extent={{90,50},{110,70}}, rotation=0)));
ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pros
annotation (Placement(transformation(extent={{-100,84},{-80,104}}, rotation=
0)));
ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prom
annotation (Placement(transformation(extent={{80,84},{100,104}}, rotation=0)));
equation

/* Check that incoming fluids are compatible with fluid in volume */
fluids[1] = ftype;
fluids[2] = Cair.ftype;

assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), "InternalCombustionEngine: fluids mixing in volume are not compatible with each other");
assert(Medium_FlueGases.nX > 1, "FossilFuelBoiler: Medium_FlueGases must be a gas mixture");
assert(iN2 > 0 and iO2 > 0 and iH2O > 0 and iCO2 > 0 and iSO2 > 0, "FossilFuelBoiler: Medium_FlueGases.substanceNames must contain nitrogen, oxygen, water, carbon dioxide and sulfur dioxide");

// ----------------
// Water/steam side

assert((ftype_ws == FluidType.WaterSteam) or (ftype_ws == FluidType.WaterSteamSimple), "InternalCombustionEngine: the fluid type for the water/steam side must be water/steam");

Cws1.Q = Cws2.Q;

Cws1.h_vol_1 = Cws2.h_vol_1;
Expand All @@ -156,14 +156,10 @@ equation
Cws2.diff_res_1 = Cws1.diff_res_1 + (if (gamma_diff_ws > 0) then 1/gamma_diff_ws else 0);
Cws1.diff_res_2 = Cws2.diff_res_2 + (if (gamma_diff_ws > 0) then 1/gamma_diff_ws else 0);

Cws1.ftype = Cws2.ftype;

Cws1.Xco2 = Cws2.Xco2;
Cws1.Xh2o = Cws2.Xh2o;
Cws1.Xo2 = Cws2.Xo2;
Cws1.Xso2 = Cws2.Xso2;

ftype_ws = Cws1.ftype;
Cws1.Xi = Cws2.Xi;
Xws = Cws1.Xi;
Cws1.SubC = Cws2.SubC;
SubCws = Cws1.SubC;

Qe = Cws1.Q;

Expand Down Expand Up @@ -191,10 +187,14 @@ equation
Pea = Cair.P;
Hea = Cair.h;

XeaCO2 = Cair.Xco2;
XeaH2O = Cair.Xh2o;
XeaO2 = Cair.Xo2;
XeaSO2 = Cair.Xso2;
Xea[1:Medium_FlueGases.nXi] = Cair.Xi;
if Medium_FlueGases.nXi < Medium_FlueGases.nX then
Xea[Medium_FlueGases.nX] = 1 - sum(Cair.Xi);
end if;
XeaCO2 = Xea[iCO2];
XeaH2O = Xea[iH2O];
XeaO2 = Xea[iO2];
XeaSO2 = Xea[iSO2];

/* Flue gases outlet */
Qsf = Cfg.Q;
Expand Down Expand Up @@ -237,12 +237,14 @@ equation
0 = Qea*XeaO2c - Qcomb*amO*(2*XCcomb/amC + 0.5*XHcomb/amH + 2*XScomb/amS) + Qcomb*XOcomb - Qsf*XsfO2;
0 = Qcomb*XScomb*amSO2/amS + Qea*XeaSO2 - Qsf*XsfSO2;

Cfg.ftype = ftype;

Cfg.Xco2 = XsfCO2;
Cfg.Xh2o = XsfH2O;
Cfg.Xo2 = XsfO2;
Cfg.Xso2 = XsfSO2;
Xsf[iN2] = 1 - XsfCO2 - XsfH2O - XsfO2 - XsfSO2;
Xsf[iO2] = XsfO2;
Xsf[iH2O] = XsfH2O;
Xsf[iCO2] = XsfCO2;
Xsf[iSO2] = XsfSO2;
Cfg.Xi = Xsf[1:Medium_FlueGases.nXi];
Qsf*Cfg.SubC = Qea*Cair.SubC;
SubCfg = Cfg.SubC;

/* Combustion air ratio */
exc = Qea*(1 - XeaH2O) / ((Qcomb*amO*(2*XCcomb/amC + 0.5*XHcomb/amH + 2*XScomb/amS - XOcomb/amO)) / (XeaO2c/(1 - XeaH2O)));
Expand Down Expand Up @@ -291,17 +293,20 @@ equation
Cfg.diff_on_1 = diffusion;

/* Air specific enthalpy at the inlet */
Hea = ThermoSysPro.Properties.FlueGases.FlueGases_h(Pea, Tea, XeaCO2, XeaH2O, XeaO2c, XeaSO2);
state_air_in = Medium_FlueGases.setState_phX(p=Pea, h=Hea, X=Xea);
Tea = Medium_FlueGases.temperature(state_air_in);

/* Flue gases tempretaure after combustion */
// Changed from FlueGases_T to FlueGases_h to provide a differentiable function
Hf = ThermoSysPro.Properties.FlueGases.FlueGases_h(Pea, Tf, XsfCO2, XsfH2O, XsfO2, XsfSO2);
Hf = Medium_FlueGases.specificEnthalpy_pTX(p=Pea, T=Tf, X=Xsf);
state_fg_comb = Medium_FlueGases.setState_phX(p=Pea, h=Hf, X=Xsf);

/* Flue gases specific enthalpy at the outlet */
Hsf = ThermoSysPro.Properties.FlueGases.FlueGases_h(Psf, Tsf, XsfCO2, XsfH2O, XsfO2, XsfSO2);
Hsf = Medium_FlueGases.specificEnthalpy_pTX(p=Psf, T=Tsf, X=Xsf);
state_fg_out = Medium_FlueGases.setState_phX(p=Psf, h=Hsf, X=Xsf);

/* Flue gases density */
rhof = ThermoSysPro.Properties.FlueGases.FlueGases_rho(Pea, (Tea + Tf)/2, XsfCO2, XsfH2O, XsfO2, XsfSO2);
state_fg_m = Medium_FlueGases.setState_pTX(p=Pea, T=(Tea + Tf)/2, X=Xsf);
rhof = Medium_FlueGases.density(state_fg_m);

0 = if (XeaO2 > teps) then (XeaO2c - XeaO2) else (XeaO2c - teps);

Expand All @@ -311,11 +316,11 @@ equation
Hrfum = 2501.569e3*XsfH2O;

/* Water/steam thermodynamic properties */
prom = ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph((Pee + Pse)/2, (Hee + Hse)/2, mode);
rhoe = prom.d;
state_ws_m = Medium.setState_phX(p=(Pee + Pse)/2, h=(Hee + Hse)/2, X=Xws);
rhoe = Medium.density(state_ws_m);

pros = ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(Pse, Hse, mode);
Tse = pros.T;
state_ws_out = Medium.setState_phX(p=Pse, h=Hse, X=Xws);
Tse = Medium.temperature(state_ws_out);

annotation ( Icon(graphics={
Rectangle(
Expand Down
45 changes: 14 additions & 31 deletions ThermoSysPro/Fluid/BoundaryConditions/AirHumidity.mo
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
within ThermoSysPro.Fluid.BoundaryConditions;
model AirHumidity "Air humidity"
extends ThermoSysPro.Fluid.Interfaces.IconColors;
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType;
import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region;

replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases constrainedby Modelica.Media.Interfaces.PartialMixtureMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium"));
parameter Real hum0=0.5 "Air humidiy";
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";

public
FluidType ftype "Fluid type";
Integer fluid=Integer(ftype) "Fluid number";
Units.SI.AbsolutePressure ppvap0(start=1e4)
"Intermediate vapor partial pressure";
Units.SI.Density rho_vap0(start=200) "Intermediate H2O density";
Expand All @@ -28,29 +21,23 @@ public
Units.SI.AbsolutePressure ppair "Air partial pressure";
Real hum "Air relative humidity";
Real Xo2as(start=0.2) "O2 mass fraction in dry air";
Real Xco2 "CO2 mass fraction at the outlet";
Real Xh2o "H2O mass fraction at the outlet";
Real Xo2 "O2 mass fraction at the outlet";
Real Xso2 "SO2 mas fraction at the outlet";

public
ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_pT pro
annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation=
0)));
Interfaces.Connectors.FluidInlet C1 annotation (Placement(transformation(
Interfaces.Connectors.FluidInlet C1(redeclare package Medium=Medium) annotation (Placement(transformation(
extent={{-110,-10},{-90,10}}, rotation=0)));
ThermoSysPro.InstrumentationAndControl.Connectors.InputReal humidity
"Air humidity"
annotation (Placement(transformation(
origin={0,110},
extent={{-10,-10},{10,10}},
rotation=270)));
Interfaces.Connectors.FluidOutlet C2 annotation (Placement(transformation(
Interfaces.Connectors.FluidOutlet C2(redeclare package Medium=Medium) annotation (Placement(transformation(
extent={{90,-10},{110,10}}, rotation=0)));
equation
/* The fluid type must be flue gases */
assert(ftype == FluidType.FlueGases, "AirHumidity: the fluid type must be flue gases");

if (cardinality(humidity) == 0) then
humidity.signal = hum0;
end if;
Expand All @@ -70,30 +57,26 @@ equation
C2.diff_res_1 = C1.diff_res_1;
C1.diff_res_2 = C2.diff_res_2;

C1.ftype = C2.ftype;
C1.SubC = C2.SubC;

P = C1.P;
Q = C1.Q;
h = C1.h;

ftype = C1.ftype;

/* O2 mass fraction at the inlet */
Xo2as = C1.Xo2;
Xo2as = C1.Xi[Properties.FlueGases.getSubstanceIndex("Oxygen",Medium.substanceNames)];

/* Temperature at the outlet */
T = ThermoSysPro.Properties.FlueGases.FlueGases_T(P, h, Xco2, Xh2o, Xo2as, Xso2);
// T = ThermoSysPro.Properties.FlueGases.FlueGases_T(P, h, 0, Xh2o, Xo2as, 0);
T = Medium.temperature_phX(P,h, C2.Xi);

/* Flue gas composition at the outlet. The sole constituents for air are O2 and N2 */
Xco2 = 0;
Xso2 = 0;
C2.Xi[Properties.FlueGases.getSubstanceIndex("Sulfurdioxide",Medium.substanceNames)] = 0;
C2.Xi[Properties.FlueGases.getSubstanceIndex("Carbondioxide",Medium.substanceNames)] = 0;
Xh2o = rho_vap/(rho_vap + rho_air);
Xo2 = Xo2as*(1 - Xh2o);

C2.Xco2 = Xco2;
C2.Xso2 = Xso2;
C2.Xh2o = Xh2o;
C2.Xo2 = Xo2;
C2.Xi[Properties.FlueGases.getSubstanceIndex("Water",Medium.substanceNames)] = Xh2o;
C2.Xi[Properties.FlueGases.getSubstanceIndex("Oxygen",Medium.substanceNames)] = Xo2as*(1 - Xh2o);
C2.Xi[Properties.FlueGases.getSubstanceIndex("Nitrogen",Medium.substanceNames)] = 1- Xo2as*(1 - Xh2o) - Xh2o;

/* Vapor partial pressure */
ppvap = psvap*hum;
Expand All @@ -106,14 +89,14 @@ equation
psvap = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.psat(T);

/* H2O density */
pro = ThermoSysPro.Properties.WaterSteam.IF97.Water_PT(ppvap, T, mode);
pro = ThermoSysPro.Properties.WaterSteam.IF97.Water_PT(ppvap, T, 0);

rho_vap0 = pro.d;

0 = if (ppvap < 0.061080e-4) then rho_vap - (rho_vap0*ppvap/ppvap0) else rho_vap - rho_vap0;

/* Air density */
rho_air = ThermoSysPro.Properties.FlueGases.FlueGases_rho(ppair, T, Xco2, Xh2o, Xo2as, Xso2);
rho_air = ThermoSysPro.Properties.FlueGases.FlueGases_rho(ppair, T, 0, Xh2o, Xo2as, 0);

annotation (Diagram(graphics={
Ellipse(
Expand Down
Loading