diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd6fbd01..3b99a226 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,7 @@ test-job-dymola-internal: #- git clone https://token:$modelicaTests_token@gitlab.pam-retd.fr/thermosysproandco/modelicatests.git - git clone https://token:$modelicaTests_mirror_token@gitlab.pleiade.edf.fr/Phy13Models/pythontools/modelicatests_mirror.git - cd modelicatests* + - python3 -m pip install --upgrade pip - pip install . - cd tests - cp ../../.test/*.json ./ diff --git a/ThermoSysPro/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo b/ThermoSysPro/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo index 22138f7a..15eadcbb 100644 --- a/ThermoSysPro/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo +++ b/ThermoSysPro/Examples/Book/PowerPlants/ConcentratedSolarPowerPlant_PTSC.mo @@ -4,17 +4,24 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan import ThermoSysPro; //parameter Real L1 = 500 "Longueur de la première chaine de capteurs"; parameter Real L1 = 500 "Longueur de la première chaine de capteurs"; - parameter Integer Ns1 = 20 "Nombre de mailles de la première chaine de capteurs"; + parameter Integer Ns1 = 10 "Nombre de mailles de la première chaine de capteurs"; parameter Real L2 = 80 "Longueur de la deuxième chaine de capteurs"; - parameter Integer Ns2 = 5 "Nombre de mailles de la deuxième échangeur"; + parameter Integer Ns2 = 10 "Nombre de mailles de la deuxième échangeur"; parameter Real L3 = 450 "Longueur de la première chaine de capteurs"; - parameter Integer Ns3 = 80 "Nombre de mailles de la première échangeur"; + parameter Integer Ns3 = 10 "Nombre de mailles de la première échangeur"; //parameter Real L4 = 7.9254 "Longueur de la première chaine de capteurs"; parameter Real L4 = 20 "Longueur de la première chaine de capteurs"; - parameter Integer Ns4 = 3 "Nombre de mailles de la première échangeur"; - WaterSteam.HeatExchangers.DynamicOnePhaseFlowPipe TubeEcran_2(option_temperature = 2, L = L2, Ns = Ns2, T0 = {659.137, 684.387, 693.983, 697.543, 698.861}, h0 = fill(650e3, Ns2), D = 0.04, hcCorr = 2, ntubes = 3, inertia = false, advection = false, P(start = {100000.0, 8120050.0, 8098500.0, 8074750.0, 8050150.0, 8025170.0, 8000000.0}), h(start = {2756570.0, 3040300.0, 3147840.0, 3187560.0, 3202330.0, 3208020.0, 3208020.0}), mu2(start = {1.94524E-005, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002}), pro2(d(start = {43.2944, 998.0, 998.0, 998.0, 998.0, 998.0}))) annotation( + parameter Integer Ns4 = 10 "Nombre de mailles de la première échangeur"; + parameter Real PompeA1(fixed = false, start = -997406144.0); + parameter Real Pompe1A1(fixed = false, start = -52341772.0); + parameter Real Pompe2A1(fixed = false, start = -6592032.5); + parameter Real TurbineCst(fixed = false, start = 68055990272.0); + parameter Real TurbineMpCst(fixed = false, start = 8363191808.0); + parameter Real SourcePCaloporteurP0(fixed = false, start = 100066.1328125); + parameter Real Re1SCondDes(fixed = false, start = 9.582132339477539); + WaterSteam.HeatExchangers.DynamicOnePhaseFlowPipe TubeEcran_2(option_temperature = 2, L = L2, Ns = Ns2, T0 = {659.137, 670.3592222222, 681.5814444444, 687.5856666667, 691.8505555556, 694.7741111111, 696.3563333333, 697.6894444444, 698.2752222222, 698.861}, h0 = fill(650e3, Ns2), D = 0.04, hcCorr = 2, ntubes = 3, inertia = false, advection = false, P(start = {8136283.5, 8127545.318, 8118301.682, 8106530.773, 8094358.318, 8081382.773, 8068171.455, 8054724.364, 8041142.182, 8027492.455, 8013755, 8000000}), h(start = {2756570, 2911331.818, 3050076.364, 3108734.545, 3155061.818, 3176727.273, 3191588.182, 3199644.545, 3204399.091, 3207502.727, 3208020, 3208020}), hb(start = {2756568.75, 2899303.375, 3042038, 3096046.75, 3150055.5, 3169981.5, 3189907.5, 3197308.625, 3204709.75, 3207554.5, 3210399.25}), mu2(start = {1.94524e-05, 0.0001097262, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002}), pro2(d(start = {43.2944, 520.6472, 998, 998, 998, 998, 998, 998, 998, 998, 998}))) annotation( Placement(transformation(extent = {{-31, 34}, {25, 78}}, rotation = 0))); - Thermal.HeatTransfer.HeatExchangerWallCounterFlow Paroi2(cpw = 1000, steady_state = true, lambda = 26, L = L2, Ns = Ns2, D = 0.04, ntubes = 3, e = 0.003, Tp2(start = {699.6, 697.841, 694.783, 686.553, 664.851}), Tp(start = {662.094, 685.508, 694.397, 697.697, 698.921})) annotation( + Thermal.HeatTransfer.HeatExchangerWallCounterFlow Paroi2(cpw = 1000, steady_state = true, lambda = 26, L = L2, Ns = Ns2, D = 0.04, ntubes = 3, e = 0.003, Tp2(start = {699.6, 698.8182222222, 698.0364444444, 696.8216666667, 695.4625555556, 692.9541111111, 689.2963333333, 684.1416666667, 674.4963333333, 664.851}), Tp(start = {662.094, 672.5002222222, 682.9064444444, 688.471, 692.4216666667, 695.1303333333, 696.597, 697.833, 698.377, 698.921})) annotation( Placement(transformation(extent = {{-34, 54}, {26, 102}}, rotation = 0))); WaterSteam.PressureLosses.SingularPressureLoss PerteCharge_Huile_3(K = 1e-6, p_rho = 900, C1(h_vol(start = 462620.0)), C2(h_vol(start = 462620.0))) annotation( Placement(transformation(origin = {-134, 138.5}, extent = {{6, -9.5}, {-6, 9.5}}, rotation = 180))); @@ -22,21 +29,21 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan Placement(transformation(extent = {{-322, 186}, {-306, 202}}, rotation = 0))); InstrumentationAndControl.Blocks.Tables.Table1DTemps Incidence(Table = [0, 0; 1, 0]) annotation( Placement(transformation(extent = {{-322, 146}, {-306, 162}}, rotation = 0))); - Thermal.HeatTransfer.HeatExchangerWall Paroi3(cpw = 1000, steady_state = true, lambda = 26, L = L3, Ns = Ns3, D = 0.06, e = 0.006, Tp1(start = {540.2, 541.953, 544.376, 546.789, 549.192, 551.586, 553.969, 556.344, 558.708, 561.063, 563.408, 565.743, 568.068, 570.384, 572.69, 574.986, 577.273, 579.55, 581.817, 584.074, 586.322, 588.559, 590.787, 593.006, 595.214, 597.413, 599.602, 601.782, 603.952, 606.112, 608.262, 610.403, 612.534, 614.656, 616.768, 618.871, 620.965, 623.048, 625.123, 627.188, 629.244, 631.291, 633.329, 635.357, 637.377, 639.387, 641.389, 643.382, 645.366, 647.342, 649.309, 651.268, 653.218, 655.16, 657.095, 659.021, 660.94, 662.851, 664.755, 666.651, 668.54, 670.423, 672.298, 674.167, 676.029, 677.885, 679.735, 681.578, 683.416, 685.248, 687.074, 688.894, 690.709, 692.518, 694.322, 696.121, 697.914, 699.701, 701.483, 703.26}), Tp2(start = {543.606, 546.033, 548.45, 550.857, 553.254, 555.642, 558.02, 560.389, 562.747, 565.096, 567.435, 569.765, 572.084, 574.394, 576.694, 578.984, 581.265, 583.536, 585.797, 588.048, 590.289, 592.521, 594.742, 596.954, 599.157, 601.349, 603.532, 605.705, 607.869, 610.022, 612.166, 614.301, 616.426, 618.541, 620.647, 622.743, 624.83, 626.907, 628.975, 631.033, 633.082, 635.122, 637.153, 639.175, 641.188, 643.191, 645.186, 647.172, 649.15, 651.118, 653.079, 655.03, 656.974, 658.909, 660.837, 662.756, 664.668, 666.572, 668.468, 670.357, 672.239, 674.114, 675.982, 677.844, 679.699, 681.547, 683.39, 685.226, 687.056, 688.88, 690.699, 692.512, 694.319, 696.121, 697.917, 699.708, 701.493, 703.273, 705.048, 706.816}), Tp(start = {541.71, 544.139, 546.559, 548.969, 551.369, 553.759, 556.14, 558.511, 560.872, 563.224, 565.566, 567.898, 570.22, 572.533, 574.836, 577.129, 579.412, 581.685, 583.949, 586.203, 588.447, 590.682, 592.907, 595.122, 597.327, 599.522, 601.708, 603.884, 606.05, 608.207, 610.354, 612.492, 614.62, 616.738, 618.847, 620.946, 623.036, 625.116, 627.187, 629.249, 631.301, 633.344, 635.378, 637.403, 639.419, 641.426, 643.424, 645.413, 647.393, 649.365, 651.329, 653.284, 655.231, 657.169, 659.1, 661.022, 662.937, 664.845, 666.745, 668.637, 670.522, 672.401, 674.272, 676.137, 677.995, 679.847, 681.693, 683.533, 685.366, 687.194, 689.016, 690.833, 692.643, 694.449, 696.249, 698.043, 699.832, 701.615, 703.393, 705.165})) annotation( + Thermal.HeatTransfer.HeatExchangerWall Paroi3(cpw = 1000, steady_state = true, lambda = 26, L = L3, Ns = Ns3, D = 0.06, e = 0.006, Tp1(start = {540.2, 560.5396666667, 580.8094444444, 600.3286666667, 619.1036666667, 637.1525555556, 654.5126666667, 671.2563333333, 687.4784444444, 703.26}), Tp2(start = {543.606, 564.574, 584.7921111111, 604.2563333333, 622.9748888889, 640.9643333333, 658.264, 674.9442222222, 691.1018888889, 706.816}), Tp(start = {541.71, 562.7013333333, 582.9427777778, 602.4333333333, 621.1782222222, 639.195, 656.523, 673.2325555556, 689.4197777778, 705.165})) annotation( Placement(transformation(extent = {{-105, 134}, {-45, 182}}, rotation = 0))); - ThermoSysPro.Solar.Collectors.SolarCollector SolarCollector1(EpsGlass = 0.86, Gamma = 0.83, h = 3.06, AlphaGlass = 0.0302, RimAngle = 70, TauN = 0.95, AlphaN = 0.96, EpsTube = 0.14, R = 0.93, Lambda = 2.891407518e-2, f = 1.78518, AReflector(fixed = false, start = 2750), DGlass = 0.115, L = L3, Ns = Ns3, DTube = 0.07, e = 1.e-3, Tglass(start = {364.716, 365.398, 366.082, 366.767, 367.453, 368.14, 368.829, 369.519, 370.209, 370.901, 371.594, 372.288, 372.982, 373.678, 374.374, 375.071, 375.768, 376.466, 377.165, 377.864, 378.564, 379.264, 379.964, 380.665, 381.366, 382.067, 382.769, 383.47, 384.172, 384.873, 385.575, 386.276, 386.978, 387.679, 388.38, 389.081, 389.782, 390.482, 391.182, 391.882, 392.581, 393.28, 393.979, 394.677, 395.375, 396.072, 396.769, 397.465, 398.161, 398.856, 399.551, 400.245, 400.939, 401.632, 402.324, 403.017, 403.708, 404.399, 405.09, 405.78, 406.47, 407.16, 407.849, 408.538, 409.226, 409.915, 410.603, 411.29, 411.978, 412.665, 413.352, 414.039, 414.726, 415.413, 416.099, 416.786, 417.472, 418.158, 418.843, 419.528})) annotation( + ThermoSysPro.Solar.Collectors.SolarCollector SolarCollector1(EpsGlass = 0.86, Gamma = 0.83, h = 3.06, AlphaGlass = 0.0302, RimAngle = 70, TauN = 0.95, AlphaN = 0.96, EpsTube = 0.14, R = 0.93, Lambda = 2.891407518e-2, f = 1.78518, AReflector(fixed = false, start = 2750), DGlass = 0.115, L = L3, Ns = Ns3, DTube = 0.07, e = 1.e-3, Twall(start = {543.606, 564.574, 584.7921111111, 604.2563333333, 622.9748888889, 640.9643333333, 658.264, 674.9442222222, 691.1018888889, 706.816}), Tglass(start = {364.716, 370.7472222222, 376.8543333333, 383.0026666667, 389.1588888889, 395.2974444444, 401.401, 407.4662222222, 413.5046666667, 419.528})) annotation( Placement(transformation(extent = {{-108, 166}, {-43, 200}}, rotation = 0))); - Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_3(option_temperature = 2, L = L3, Ns = Ns3, T0 = {539.521, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0, 700.0}, h0 = fill(800e3, Ns3), advection = false, dpfCorr = 0.4, hcCorr = 2, D = 0.06, h(start = {463696.125, 468056.0, 473485.0, 478907.0, 484321.0, 489728.0, 495127.0, 500518.0, 505902.0, 511278.0, 516646.0, 522007.0, 527360.0, 532705.0, 538041.0, 543370.0, 548691.0, 554004.0, 559309.0, 564606.0, 569895.0, 575175.0, 580447.0, 585711.0, 590967.0, 596214.0, 601453.0, 606683.0, 611905.0, 617118.0, 622323.0, 627519.0, 632707.0, 637886.0, 643056.0, 648217.0, 653370.0, 658514.0, 663649.0, 668775.0, 673893.0, 679001.0, 684100.0, 689191.0, 694272.0, 699345.0, 704408.0, 709462.0, 714507.0, 719542.0, 724569.0, 729586.0, 734594.0, 739593.0, 744582.0, 749562.0, 754532.0, 759493.0, 764445.0, 769387.0, 774320.0, 779242.0, 784156.0, 789059.0, 793953.0, 798837.0, 803712.0, 808577.0, 813431.0, 818276.0, 823111.0, 827936.0, 832752.0, 837557.0, 842352.0, 847137.0, 851911.0, 856676.0, 861430.0, 866175.0, 870908.0, 870908.0})) annotation( + Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_3(option_temperature = 2, L = L3, Ns = Ns3, T0 = {539.521, 700, 700, 700, 700, 700, 700, 700, 700, 700}, h0 = fill(800e3, Ns3), advection = false, dpfCorr = 0.4, hcCorr = 2, D = 0.06, h(start = {463696.125, 502475.8181818182, 541916.6363636364, 580925.5454545455, 619483.9090909092, 657578.7272727273, 695194.3636363635, 732317.6363636364, 768937.7272727273, 805038.8181818181, 840608.3636363635, 870908})) annotation( Placement(transformation(extent = {{-103, 117}, {-47, 161}}, rotation = 0))); WaterSteam.PressureLosses.SingularPressureLoss PerteCharge_Huile_4(K = 1e-6, p_rho = 650, C2(h_vol(start = 870908.0))) annotation( Placement(transformation(origin = {-5, 139}, extent = {{6, -10}, {-6, 10}}, rotation = 180))); - Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_22(option_temperature = 2, Ns = Ns2, T0 = {698.976, 700.0, 700.0, 700.0, 700.0}, h0 = fill(800e3, Ns2), L = L2, D = 0.04, advection = false, hcCorr = 2, dpfCorr = 0.4, ntubes = 3, h(start = {871999.6875, 870017.0, 867699.0, 861464.0, 844586.0, 800057.0, 800057.0})) annotation( + Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_22(option_temperature = 2, Ns = Ns2, T0 = {698.976, 699.4311111111, 699.8862222222, 700, 700, 700, 700, 700, 700, 700}, h0 = fill(800e3, Ns2), L = L2, D = 0.04, advection = false, hcCorr = 2, dpfCorr = 0.4, ntubes = 3, Tp(start = {699.8692016602, 699.3633694119, 698.8575371636, 697.7081705729, 696.3442925347, 693.8255750868, 690.1520182292, 684.9737006293, 675.281100803, 665.5885009766}), h(start = {871999.6875, 870918.2215909092, 869806.2727272727, 868541.9090909091, 866565.3636363636, 863164.4545454546, 856860.9090909092, 847654.7272727272, 828393.6363636365, 804105.0909090909, 800057, 800057})) annotation( Placement(transformation(extent = {{24, 122}, {-33, 78}}, rotation = 0))); - Thermal.HeatTransfer.HeatExchangerWallCounterFlow Paroi1(cpw = 1000, steady_state = true, lambda = 26, L = L1, Ns = Ns1, D = 0.04, ntubes = 3, e = 0.003, Tp1(start = {532.912, 533.493, 534.161, 534.93, 535.816, 536.836, 538.01, 539.364, 540.926, 542.728, 544.809, 547.216, 550.002, 553.232, 556.986, 561.36, 566.473, 572.131, 573.043, 574.577}), Tp2(start = {589.9, 577.664, 573.793, 567.743, 562.426, 557.888, 553.999, 550.657, 547.777, 545.292, 543.143, 541.284, 539.674, 538.278, 537.068, 536.017, 535.105, 534.312, 533.624, 533.026}), Tp(start = {532.971, 533.561, 534.239, 535.021, 535.92, 536.956, 538.149, 539.525, 541.111, 542.943, 545.059, 547.506, 550.341, 553.629, 557.453, 561.912, 567.13, 572.991, 575.434, 581.427})) annotation( + Thermal.HeatTransfer.HeatExchangerWallCounterFlow Paroi1(cpw = 1000, steady_state = true, lambda = 26, L = L1, Ns = Ns1, D = 0.04, ntubes = 3, e = 0.003, Tp1(start = {532.912, 534.2464444444, 536.0426666667, 538.4613333333, 541.7268888889, 546.1462222222, 552.1553333333, 560.388, 571.5023333333, 574.577}), Tp2(start = {589.9, 573.1207777778, 561.4175555556, 552.885, 546.6725555556, 542.1102222222, 538.7433333333, 536.2505555556, 534.4001111111, 533.026}), Tp(start = {532.971, 534.3258888889, 536.1502222222, 538.6076666667, 541.9252222222, 546.4184444444, 552.533, 560.9211111111, 572.3397777778, 581.427})) annotation( Placement(transformation(extent = {{-174, 54}, {-114, 102}}, rotation = 0))); - WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe TubeEcran_1(option_temperature = 2, L = L1, Ns = Ns1, T0 = fill(300, Ns1), h0 = fill(650e3, Ns1), D = 0.04, ntubes = 3, inertia = false, advection = false, P(start = {8716030.0, 8695070.0, 8674080.0, 8653070.0, 8632030.0, 8610950.0, 8589840.0, 8568690.0, 8547480.0, 8526210.0, 8504870.0, 8483450.0, 8461930.0, 8440290.0, 8418510.0, 8396570.0, 8374420.0, 8352020.0, 8329300.0, 8305110.0, 8256160.0, 8135653.0}), h(start = {1130270.0, 1132680.0, 1135470.0, 1138670.0, 1142370.0, 1146630.0, 1151550.0, 1157240.0, 1163810.0, 1171420.0, 1180240.0, 1190480.0, 1202400.0, 1216300.0, 1232580.0, 1251720.0, 1274350.0, 1301310.0, 1336580.0, 1434650.0, 1715580.0, 2756578.25})) annotation( + WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe TubeEcran_1(option_temperature = 2, L = L1, Ns = Ns1, T0 = fill(300, Ns1), h0 = fill(650e3, Ns1), D = 0.04, ntubes = 3, inertia = false, advection = false, P(start = {8716030, 8675988.182, 8635855.455, 8595597.273, 8555192.727, 8514570, 8473668.182, 8432370, 8390529.091, 8347889.091, 8300660, 8135653}), Tp1(start = {533.7798461914, 534.8800184462, 536.4120483398, 538.5472208659, 541.5267876519, 545.6940171984, 551.5440266927, 559.8079833984, 571.5279812283, 574.6042480469}), h(start = {1130270, 1135216.364, 1141697.273, 1150208.182, 1161420.909, 1176230.909, 1195898.182, 1222220, 1257891.818, 1307722.727, 1460189.091, 2756578.25}), hb(start = {1135107.75, 1139313.25, 1145080.25, 1153001.5, 1163909.875, 1178988, 1199949.625, 1229353.25, 1271222.625, 1333245.5, 1704848.25})) annotation( Placement(transformation(extent = {{-171, 34}, {-115, 78}}, rotation = 0))); - Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_11(option_temperature = 2, L = L1, Ns = Ns1, T0 = {587.815, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0, 550.0}, h0 = fill(650e3, Ns1), D = 0.04, advection = false, hcCorr = 2, dpfCorr = 0.4, ntubes = 3, h(start = {801122.25, 638880.0, 582613.0, 562383.0, 546913.0, 533929.0, 522949.0, 513609.0, 505631.0, 498794.0, 492917.0, 487857.0, 483492.0, 479721.0, 476460.0, 473637.0, 471191.0, 469070.0, 467231.0, 465634.0, 464248.0, 464248.0})) annotation( + Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_11(option_temperature = 2, L = L1, Ns = Ns1, T0 = {587.815, 550, 550, 550, 550, 550, 550, 550, 550, 550}, h0 = fill(650e3, Ns1), D = 0.04, advection = false, hcCorr = 2, dpfCorr = 0.4, ntubes = 3, Tp(start = {587.951965332, 573.1594984266, 560.8732842339, 552.2766520182, 546.2064887153, 541.8887532552, 538.8043823242, 536.5955132378, 535.0111287435, 533.8737182617}), h(start = {801122.25, 587728.1818181819, 549725.7272727273, 525943.5454545454, 508532.0909090909, 495588.3636363636, 485872.9090909091, 478535.1818181819, 472969.9090909091, 468735.6363636364, 465508, 464248})) annotation( Placement(transformation(extent = {{-116, 122}, {-173, 78}}, rotation = 0))); ThermoSysPro.WaterSteam.Junctions.SteamDryer Secheur(proe(x(start = 0.273553))) annotation( Placement(transformation(extent = {{-86, 39}, {-62, 63}}, rotation = 0))); @@ -48,7 +55,7 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan Placement(transformation(origin = {117, -82.5}, extent = {{-6, -9.5}, {6, 9.5}}, rotation = 180))); WaterSteam.PressureLosses.InvSingularPressureLoss Connection_HQ_Secheur_Ballon(Q(start = 1)) annotation( Placement(transformation(origin = {-73, -15}, extent = {{-10, -10}, {10, 10}}, rotation = 270))); - WaterSteam.Machines.StaticCentrifugalPump Pompe(Pm(fixed = false, start = 3502560.0), a1(fixed = false) = -4.9345734425e8, hn(start = 716.167), a3 = 2000, b1 = -3500, b2 = 510, Q(fixed = true, start = 1.13), C2(h_vol(start = 150161.0)), Qv(start = 0.00113454), h(start = 143963.0)) annotation( + WaterSteam.Machines.StaticCentrifugalPump Pompe(Pm(fixed = false, start = 3502560.0), a1 = PompeA1, hn(start = 716.167), a3 = 2000, b1 = -3500, b2 = 510, Q(fixed = true, start = 1.13), C2(h_vol(start = 150161.0)), Qv(start = 0.00113454), h(start = 143963.0)) annotation( Placement(transformation(extent = {{84, -91}, {64, -71}}, rotation = 0))); WaterSteam.Volumes.VolumeC Ballon(V = 1, h0 = 3e5, h(start = 1125640.0), P0 = 7000000, dynamic_mass_balance = true, P(start = 7000000)) annotation( Placement(transformation(extent = {{-63, -91}, {-83, -71}}, rotation = 0))); @@ -56,7 +63,7 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan Placement(transformation(origin = {-30, -75}, extent = {{-10, 10}, {10, -10}}, rotation = 180))); WaterSteam.PressureLosses.ControlValve ControlValveBallon1(Cvmax = 10, C1(P(start = 10618800.0), h_vol(start = 1127430.0)), C2(h_vol(start = 1127430.0)), Pm(start = 9676220.0)) annotation( Placement(transformation(origin = {-212, -75}, extent = {{-10, 10}, {10, -10}}, rotation = 180))); - WaterSteam.BoundaryConditions.SourceP sourcePCaloporteur(option_temperature = 2, h0 = 63.03e3, P0(fixed = false) = 500000, Q(fixed = true, start = 14.9263)) annotation( + WaterSteam.BoundaryConditions.SourceP sourcePCaloporteur(option_temperature = 2, h0 = 63.03e3, P0 = SourcePCaloporteurP0, Q(fixed = true, start = 14.9263)) annotation( Placement(transformation(extent = {{66, -49}, {94, -22}}, rotation = 0))); WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe1(K = 1e-6) annotation( Placement(transformation(origin = {171, -35}, extent = {{6, -10}, {-6, 10}}, rotation = 180))); @@ -66,27 +73,27 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan Placement(transformation(extent = {{-48, -62}, {-38, -52}}, rotation = 0))); InstrumentationAndControl.Blocks.Sources.Constante Ouv1(k = 0.5) annotation( Placement(transformation(extent = {{-231, -62}, {-221, -52}}, rotation = 0))); - WaterSteam.Machines.StaticCentrifugalPump Pompe1(Pm(fixed = false), hn(start = 466.292), a3 = 2000, b2 = 510, b1 = -3500, a1(fixed = false) = -9.5e8, Q(fixed = false, start = 0.65), C2(P(fixed = false, start = 75e5)), C1(P(fixed = true, start = 70e5), h_vol(start = 1125640.0)), Qv(start = 0.00521975), h(start = 1126540.0)) annotation( + WaterSteam.Machines.StaticCentrifugalPump Pompe1(Pm(fixed = false, start = 8881936.0), hn(start = 466.292), a3 = 2000, b2 = 510, b1 = -3500, a1 = Pompe1A1, Q(fixed = false, start = 0.65), C2(P(fixed = false, start = 75e5), h_vol(start = 1132880.125)), C1(P(fixed = true, start = 70e5), h_vol(start = 1125640.0)), Qv(start = 0.00521975), h(start = 1126540.0)) annotation( Placement(transformation(extent = {{-158, -91}, {-178, -71}}, rotation = 0))); - WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe3(K = 1e-6) annotation( + WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe3(K = 1e-6, C2(h_vol(start = 1131070.75)), Pm(start = 7000000.0)) annotation( Placement(transformation(origin = {-120, -81}, extent = {{-6, -10}, {6, 10}}, rotation = 180))); - WaterSteam.Machines.StodolaTurbine Turbine(W_fric = 1, Cst(fixed = false, start = 68143000000.0) = 6.19323e6, Qmax = 0.001, eta_is_min = 0.80, rhos(start = 10), eta_is_nom = 0.92, Pe(fixed = true, start = 8000000), Ps(fixed = false, start = 1800000), pros(d(start = 8.36949))) annotation( + WaterSteam.Machines.StodolaTurbine Turbine(W_fric = 1, Cst = TurbineCst, Qmax = 0.001, eta_is_min = 0.80, rhos(start = 10), eta_is_nom = 0.92, Pe(fixed = true, start = 8000000), Ps(fixed = false, start = 1800000), pros(d(start = 8.36949))) annotation( Placement(transformation(extent = {{47, 72}, {73, 40}}, rotation = 0))); WaterSteam.Machines.Generator Alternateur annotation( Placement(transformation(extent = {{168, 90}, {198, 130}}, rotation = 0))); - Thermal.HeatTransfer.HeatExchangerWallCounterFlow Paroi4(cpw = 1000, steady_state = true, lambda = 26, D = 0.04, L = L4, Ns = Ns4, ntubes = 3, e = 0.003, Tp1(start = {532.06, 532.262, 532.478}), Tp2(start = {533.3, 532.429, 532.217}), Tp(start = {532.141, 532.349, 532.57})) annotation( + Thermal.HeatTransfer.HeatExchangerWallCounterFlow Paroi4(cpw = 1000, steady_state = true, lambda = 26, D = 0.04, L = L4, Ns = Ns4, ntubes = 3, e = 0.003, Tp1(start = {532.06, 532.1048888889, 532.1497777778, 532.1946666667, 532.2395555556, 532.286, 532.334, 532.382, 532.43, 532.478}), Tp2(start = {533.3, 533.1064444444, 532.9128888889, 532.7193333333, 532.5257777778, 532.4054444444, 532.3583333333, 532.3112222222, 532.2641111111, 532.217}), Tp(start = {532.141, 532.1872222222, 532.2334444444, 532.2796666667, 532.3258888889, 532.3735555556, 532.4226666667, 532.4717777778, 532.5208888889, 532.57})) annotation( Placement(transformation(origin = {-269, -12}, extent = {{-24, -30}, {24, 30}}, rotation = 90))); - WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe TubeEcran_4(option_temperature = 2, D = 0.04, L = L4, Ns = Ns4, T0 = fill(300, Ns4), h0 = fill(650e3, Ns4), ntubes = 3, inertia = false, advection = false, P(start = {8751668.0, 8729230.0, 8724830.0, 8720430.0, 8733863.0}), h(start = {1128519.5, 1128310.0, 1129260.0, 1130270.0, 1131729.0})) annotation( + WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe TubeEcran_4(option_temperature = 2, D = 0.04, L = L4, Ns = Ns4, T0 = fill(300, Ns4), h0 = fill(650e3, Ns4), ntubes = 3, inertia = false, advection = false, P(start = {8751668, 8743508.727, 8735349.455, 8728830, 8727230, 8725630, 8724030, 8722430, 8720830, 8724093.545, 8728978.273, 8733863}), Tp1(start = {533.1015625, 533.1368815104, 533.1722005208, 533.2075195312, 533.2428385417, 533.2794731988, 533.3174235026, 533.3553738064, 533.3933241102, 533.4312744141}), h(start = {1128519.5, 1128443.318, 1128367.136, 1128396.364, 1128741.818, 1129087.273, 1129443.636, 1129810.909, 1130178.182, 1130667.909, 1131198.455, 1131729}), hb(start = {1132880.125, 1133086.975, 1133293.825, 1133500.675, 1133717.875, 1133940.25, 1134162.625, 1134390.562, 1134629.625, 1134868.688, 1135107.75})) annotation( Placement(transformation(origin = {-245.5, -11.5}, extent = {{-23.5, -23.5}, {23.5, 23.5}}, rotation = 90))); - Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_44(option_temperature = 2, L = L4, Ns = Ns4, T0 = {532.656, 550.0, 550.0}, h0 = fill(650e3, Ns4), advection = false, D(fixed = true) = 0.04, C2(P(fixed = false, start = 16.99e5), Q(fixed = false, start = 2)), hcCorr = 2, dpfCorr = 0.4, ntubes = 3, h(start = {465547.78125, 463670.0, 463128.0, 462620.0, 462620.0})) annotation( + Solar.HeatExchangers.DynamicOnePhaseFlowPipe_Oil TubeEcran_44(option_temperature = 2, L = L4, Ns = Ns4, T0 = {532.656, 536.5102222222, 540.3644444444, 544.2186666667, 548.0728888889, 550, 550, 550, 550, 550}, h0 = fill(650e3, Ns4), advection = false, D(fixed = true) = 0.04, C2(P(fixed = false, start = 16.99e5), Q(fixed = false, start = 2)), hcCorr = 2, dpfCorr = 0.4, ntubes = 3, Tp(start = {533.5760498047, 533.5358479818, 533.4956461589, 533.4554443359, 533.415242513, 533.3764444987, 533.339050293, 533.3016560872, 533.2642618815, 533.2268676758}), h(start = {465547.78125, 464864.9517045454, 464182.1221590909, 463620.7272727273, 463423.6363636364, 463226.5454545455, 463035.6363636364, 462850.9090909091, 462666.1818181818, 462620, 462620, 462620})) annotation( Placement(transformation(origin = {-293, -12}, extent = {{23, 24}, {-23, -24}}, rotation = 90))); - WaterSteam.Machines.StaticCentrifugalPump Pompe2(Pm(fixed = false), b2 = 510, b1 = -3500, hn(start = 350), adiabatic_compression = true, C1(P(fixed = false, start = 17e5), h_vol(start = 462620.0)), a3(fixed = true) = 500, C2(P(fixed = false, start = 24.5146e5)), p_rho = 900, Q(fixed = true, start = 7.2), a1(fixed = false) = -1e8) annotation( + WaterSteam.Machines.StaticCentrifugalPump Pompe2(Pm(fixed = false, start = 2022597.75), b2 = 510, b1 = -3500, hn(start = 350), adiabatic_compression = true, C1(P(fixed = false, start = 17e5), h_vol(start = 462620.0)), a3(fixed = true) = 500, C2(P(fixed = false, start = 24.5146e5)), p_rho = 900, Q(fixed = true, start = 7.2), a1 = Pompe2A1) annotation( Placement(transformation(extent = {{-184, 129}, {-164, 149}}, rotation = 0))); - WaterSteam.PressureLosses.SingularPressureLoss PerteCharge_Huile_2(K = 1e-6, p_rho = 900) annotation( + WaterSteam.PressureLosses.SingularPressureLoss PerteCharge_Huile_2(K = 1e-6, p_rho = 900, C2(h_vol(start = 464735.1875))) annotation( Placement(transformation(origin = {-212, 138.5}, extent = {{6, -9.5}, {-6, 9.5}}, rotation = 180))); WaterSteam.PressureLosses.SingularPressureLoss PerteCharge_Huile_1(K = 1e-6, p_rho = 900) annotation( Placement(transformation(origin = {-286, 138.5}, extent = {{6, -9.5}, {-6, 9.5}}, rotation = 180))); - WaterSteam.Machines.StodolaTurbine TurbineMp(W_fric = 1, Cst(fixed = false, start = 8378550000.0) = 6.19323e6, Qmax = 0.001, eta_is_min = 0.80, rhos(start = 10), eta_is_nom = 0.94, Pe(fixed = true, start = 1800000), Ps(fixed = false, start = 5000), pros(d(start = 0.0434309)), xm(start = 0.908482)) annotation( + WaterSteam.Machines.StodolaTurbine TurbineMp(W_fric = 1, Cst = TurbineMpCst, Qmax = 0.001, eta_is_min = 0.80, rhos(start = 10), eta_is_nom = 0.94, Pe(fixed = true, start = 1800000), Ps(fixed = false, start = 5000), pros(d(start = 0.0434309)), xm(start = 0.908482)) annotation( Placement(transformation(extent = {{105, 72}, {131, 40}}, rotation = 0))); WaterSteam.Volumes.Tank Tank(p_rho = 895, A = 0.1, z0 = 1, h0 = 423600, steady_state = true, h(start = 462620.0), rho(start = 895), Patm = 1670000, P(start = 1699000)) annotation( Placement(transformation(origin = {-248, 142}, extent = {{6, 6}, {-6, -6}}, rotation = 180))); @@ -94,7 +101,7 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan Placement(transformation(extent = {{84, 50}, {94, 62}}, rotation = 0))); WaterSteam.Volumes.VolumeA VolumeCond(V = 1, rho(start = 10), h(start = 1837610.0), h0 = 2.1e6, P0 = 5000, dynamic_mass_balance = false, P(start = 5000)) annotation( Placement(transformation(extent = {{141, 24}, {130, 34}}, rotation = 0))); - WaterSteam.HeatExchangers.NTUWaterHeating Re_1(KPurge = 10, SPurge = 0.3, Se(h(fixed = true, start = 600e3)), SCondDes(fixed = false, start = 9.57697) = 3, HDesF(start = 583561.0), HeiF(start = 150619.0), Hep(start = 884611.0), SDes(start = 0.932441), h(start = 882589.0), lambdaE = 1, KCond = 500) annotation( + WaterSteam.HeatExchangers.NTUWaterHeating Re_1(KPurge = 10, SPurge = 0.3, Se(h(fixed = true, start = 600e3)), SCondDes = Re1SCondDes, HDesF(start = 583561.0), HeiF(start = 150619.0), Hep(start = 884611.0), SDes(start = 0.932441), h(start = 882589.0), lambdaE = 1, KCond = 500) annotation( Placement(transformation(extent = {{42, -106}, {0, -56}}, rotation = 0))); WaterSteam.PressureLosses.SingularPressureLoss Dp_Re_1(rho(start = 10), h(start = 2400e3), Q(start = 0.1), K = 1e-4, Pm(start = 1800000)) annotation( Placement(transformation(origin = {31.5, -13.5}, extent = {{5.5, -5.5}, {-5.5, 5.5}}, rotation = 90))); @@ -106,7 +113,7 @@ model ConcentratedSolarPowerPlant_PTSC "Model of a concentrated solar power plan Placement(transformation(extent = {{-322, 166}, {-306, 182}}, rotation = 0))); WaterSteam.Junctions.MassFlowMultiplier massFlowMultiplier(alpha = 3, P(start = 2300000)) annotation( Placement(transformation(extent = {{21, 128}, {37, 150}}))); - WaterSteam.Junctions.MassFlowMultiplier massFlowMultiplier2(alpha = 1/3, P(start = 2400000)) annotation( + WaterSteam.Junctions.MassFlowMultiplier massFlowMultiplier2(alpha = 1/3, P(start = 2400000), h(start = 464735.1875)) annotation( Placement(transformation(extent = {{-7.75, -9.75}, {7.75, 9.75}}, rotation = 0, origin = {-158.25, 139.75}))); equation @@ -238,4 +245,4 @@ It is documented in a conference paper and in Sect. 6.7 of the ThermoSysPro book The results reported in the ThermoSysPro book were computed using Dymola. "), 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 ConcentratedSolarPowerPlant_PTSC; \ No newline at end of file +end ConcentratedSolarPowerPlant_PTSC; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGTCombustionChamber.mo b/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGTCombustionChamber.mo index 6032ab68..1d5d32f4 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGTCombustionChamber.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGTCombustionChamber.mo @@ -1,9 +1,11 @@ within ThermoSysPro.Examples.Book.SimpleExamples.CombustionChamber; model TestGTCombustionChamber + parameter Real kcham1(fixed = false, start = 1) + "Pressure loss coefficient computed by initialization"; ThermoSysPro.FlueGases.BoundaryConditions.Sink Puits_Fumees2 annotation( Placement(transformation(origin = {149, -2}, extent = {{23, -24}, {-23, 24}}, rotation = 180))); - Combustion.CombustionChambers.GTCombustionChamber GTCombustionChamber2(Cfg(P(fixed = true, start = 14.1e5)), kcham(fixed = false, start = 1)) annotation( + Combustion.CombustionChambers.GTCombustionChamber GTCombustionChamber2(Cfg(P(fixed = true, start = 14.1e5)), kcham = kcham1) annotation( Placement(transformation(extent = {{-67, -68}, {67, 64}}, rotation = 0))); WaterSteam.BoundaryConditions.SourcePQ sourcePQ2(Q0 = 0, P0 = 15e5, h0 = 300e3) annotation( Placement(transformation(extent = {{-112, 48}, {-72, 88}}, rotation = 0))); @@ -29,4 +31,4 @@ equation This model is documented in Sect. 8.1.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestGTCombustionChamber; \ No newline at end of file +end TestGTCombustionChamber; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGenericCombustion1D.mo b/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGenericCombustion1D.mo index f52ecffe..74046dbe 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGenericCombustion1D.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/CombustionChamber/TestGenericCombustion1D.mo @@ -2,6 +2,8 @@ within ThermoSysPro.Examples.Book.SimpleExamples.CombustionChamber; model TestGenericCombustion1D "TestGenericCombustion1D" parameter Integer NCEL = 7; + parameter Units.SI.AbsolutePressure sinkWaterSteamP0(fixed = false, start = 19621600) + "Outlet pressure computed by initialization"; 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))); 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( @@ -12,11 +14,11 @@ model TestGenericCombustion1D "TestGenericCombustion1D" Placement(transformation(extent = {{0, 70}, {44, 112}}, rotation = 0))); WaterSteam.BoundaryConditions.SourcePQ SourcePQ_Water(Q0 = 0, P0 = 100000) annotation( Placement(transformation(extent = {{-107, 23}, {-71, 57}}, rotation = 0))); - WaterSteam.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( + WaterSteam.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, Q(start = {486.69, 486.69, 486.69, 486.69, 486.69, 486.69, 486.69, 486.69}), P(start = {20112000, 20050000, 19990000, 19930000, 19870000, 19810000, 19750000, 19690000, 19621600}), h(start = {1292000, 1440000, 1590000, 1740000, 1890000, 2040000, 2190000, 2340000, 2500000})) annotation( Placement(transformation(origin = {91, 8}, extent = {{49, 16}, {-49, -16}}, rotation = 270))); 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))); - WaterSteam.BoundaryConditions.SinkP sinkWaterSteam2(option_temperature = 2, Q(start = 486.69, fixed = true), h0 = 2.5e+06, mode = 0, P0(fixed = false) = 19621600) annotation( + WaterSteam.BoundaryConditions.SinkP sinkWaterSteam2(option_temperature = 2, Q(start = 486.69, fixed = true), h0 = 2.5e+06, mode = 0, P0 = sinkWaterSteamP0) annotation( Placement(transformation(origin = {90, 90.5}, extent = {{14.5, -15}, {-14.5, 15}}, rotation = 270))); WaterSteam.BoundaryConditions.SourceP sourceEcrans(h0 = 1.292e+06, option_temperature = 2, mode = 0, P0 = 20112000) annotation( Placement(transformation(origin = {91, -81}, extent = {{15, -15}, {-15, 15}}, rotation = 270))); @@ -51,4 +53,4 @@ This model is documented in Sect. 8.2.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. "), 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; \ No newline at end of file +end TestGenericCombustion1D; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/Islanding.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/Islanding.mo index 2923fe09..9711af46 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/Islanding.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/Islanding.mo @@ -1,17 +1,20 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger.DynamicWaterHeater; model Islanding + parameter Real pressureLossSteamLambda(fixed = false, start = 0.055042482912540436); + parameter Real waterHeatingCOP0l(fixed = false, start = 1.2906341552734375); + parameter Real controlValveEauCvmax(fixed = false, start = 237.97450256347656); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 22.733e5, h0 = 2650.6e3) annotation( Placement(transformation(extent = {{-192, 110}, {-150, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP Puit_condenseur1(option_temperature = 2, P0(fixed = true) = 10e5) annotation( Placement(transformation(extent = {{124, -202}, {160, -162}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax(fixed = false) = 354.534, mode_caract = 0, Cv(start = 70, fixed = false), C1(h_vol(start = 800e3), h(start = 800e3))) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax = controlValveEauCvmax, mode_caract = 0, Cv(start = 237.97450256347656, fixed = false), C1(h_vol(start = 800883.8125), h(start = 800883.8125))) annotation( Placement(transformation(extent = {{88, -186}, {108, -166}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l(fixed = false) = 1.23, C2ex(P(start = 2220000)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l = waterHeatingCOP0l, C2ex(P(start = 2220000), h_vol(start = 800883.8125)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), Pfond(start = 2220288.75), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( Placement(transformation(extent = {{-58, -90}, {162, 96}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2(h0 = 940.000e3) annotation( Placement(transformation(extent = {{-150, 22}, {-192, 66}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35, h(start = 772055.9375)) annotation( Placement(transformation(extent = {{-99, -48}, {-79, -28}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterOut(Q(fixed = false, start = 650), K = 30, C2(h_vol(start = 927700), h(start = 927700))) annotation( Placement(transformation(extent = {{-80, 34}, {-100, 54}}, rotation = 0))); @@ -21,7 +24,7 @@ model Islanding Placement(transformation(extent = {{-196, -88}, {-176, -68}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 71.29e5, h0 = 772.09e3, T0 = 454.46, option_temperature = 1) annotation( Placement(transformation(extent = {{-192, -16}, {-150, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53, C1(h_vol(start = 927738.1875))) annotation( Placement(transformation(extent = {{-115, 34}, {-135, 54}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(Table = [0, 624.97; 378, 624.97; 390, 592; 438, 699; 507, 353; 936, 252; 1404, 176; 1872, 116; 2340, 88; 2500, 88]) annotation( Placement(transformation(extent = {{-196, 78}, {-176, 98}}, rotation = 0))); @@ -33,11 +36,11 @@ model Islanding Placement(transformation(extent = {{191, -140}, {169, -118}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve checkValve(C2(h_vol(start = 2600e3), h(start = 2600e3))) annotation( Placement(transformation(extent = {{-100, 122}, {-84, 138}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000), h(start = 800883.8125), C2(h_vol(start = 800883.8125))) 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, 2.9e5; 2000, 2.9e5]) annotation( Placement(transformation(extent = {{162, -178}, {182, -158}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda(fixed = false) = 0.03, L = 48.72, D = 0.387) annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda = pressureLossSteamLambda, L = 48.72, D = 0.387) annotation( Placement(transformation(extent = {{-48, 162}, {30, 98}}, rotation = 0))); equation connect(ControlValve_eau.C2, Puit_condenseur1.C) annotation( @@ -88,4 +91,4 @@ equation This model is documented in Sect. 9.5.2.2 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end Islanding; \ No newline at end of file +end Islanding; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/NegativeFlow.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/NegativeFlow.mo index da46fb36..8dae2aa1 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/NegativeFlow.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/NegativeFlow.mo @@ -1,17 +1,20 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger.DynamicWaterHeater; model NegativeFlow + parameter Real pressureLossSteamLambda(fixed = false, start = 0.055042482912540436); + parameter Real waterHeatingCOP0l(fixed = false, start = 1.2906341552734375); + parameter Real controlValveEauCvmax(fixed = false, start = 237.97450256347656); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 22.733e5, h0 = 2650.6e3) annotation( Placement(transformation(extent = {{-192, 110}, {-150, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP Puit_condenseur1(option_temperature = 2, P0(fixed = true) = 10e5) annotation( Placement(transformation(extent = {{124, -202}, {160, -162}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax(fixed = false) = 354.534, mode_caract = 0, Cv(start = 70, fixed = false), C1(h_vol(start = 800e3), h(start = 800e3))) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax = controlValveEauCvmax, mode_caract = 0, Cv(start = 237.97450256347656, fixed = false), C1(h_vol(start = 800883.8125), h(start = 800883.8125))) annotation( Placement(transformation(extent = {{88, -186}, {108, -166}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l(fixed = false) = 1.23, C2ex(P(start = 2220000)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l = waterHeatingCOP0l, C2ex(P(start = 2220000), h_vol(start = 800883.8125)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), Pfond(start = 2220288.75), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( Placement(transformation(extent = {{-58, -90}, {162, 96}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2(h0 = 940.000e3) annotation( Placement(transformation(extent = {{-150, 22}, {-192, 66}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35, h(start = 772055.9375)) annotation( Placement(transformation(extent = {{-99, -48}, {-79, -28}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterOut(Q(fixed = false, start = 650), K = 30, C2(h_vol(start = 927700), h(start = 927700))) annotation( Placement(transformation(extent = {{-80, 34}, {-100, 54}}, rotation = 0))); @@ -21,7 +24,7 @@ model NegativeFlow Placement(transformation(extent = {{-196, -88}, {-176, -68}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 71.29e5, h0 = 772.09e3, T0 = 454.46, option_temperature = 1) annotation( Placement(transformation(extent = {{-192, -16}, {-150, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53, C1(h_vol(start = 927738.1875))) annotation( Placement(transformation(extent = {{-115, 34}, {-135, 54}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(Table = [0, 624.97; 300, 624.97; 2000, -200; 3000, -200]) annotation( Placement(transformation(extent = {{-196, 78}, {-176, 98}}, rotation = 0))); @@ -33,11 +36,11 @@ model NegativeFlow Placement(transformation(extent = {{191, -140}, {169, -118}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve checkValve(C2(h_vol(start = 2600e3), h(start = 2600e3))) annotation( Placement(transformation(extent = {{-100, 122}, {-84, 138}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000), h(start = 800883.8125), C2(h_vol(start = 800883.8125))) 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, 2.9e5; 2000, 2.9e5]) annotation( Placement(transformation(extent = {{162, -178}, {182, -158}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda(fixed = false) = 0.03, L = 48.72, D = 0.387) annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda = pressureLossSteamLambda, L = 48.72, D = 0.387) annotation( Placement(transformation(extent = {{-48, 162}, {30, 98}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA1(Table = [0, 71.29e5; 378, 71.29e5; 438, 77e5; 597, 73.8e5; 1533, 69.8e5; 2340, 68.8e5; 2500, 68.8e5]) annotation( Placement(transformation(extent = {{-196, -154}, {-174, -132}}, rotation = 0))); @@ -86,4 +89,4 @@ equation This model is documented in Sect. 7.2.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end NegativeFlow; \ No newline at end of file +end NegativeFlow; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/ZeroFlow.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/ZeroFlow.mo index c7d94903..e1c312ca 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/ZeroFlow.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/DynamicWaterHeater/ZeroFlow.mo @@ -1,17 +1,20 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger.DynamicWaterHeater; model ZeroFlow + parameter Real pressureLossSteamLambda(fixed = false, start = 0.055042482912540436); + parameter Real waterHeatingCOP0l(fixed = false, start = 1.2906341552734375); + parameter Real controlValveEauCvmax(fixed = false, start = 237.97450256347656); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 22.733e5, h0 = 2650.6e3) annotation( Placement(transformation(extent = {{-192, 110}, {-150, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP Puit_condenseur1(option_temperature = 2, P0(fixed = true) = 10e5) annotation( Placement(transformation(extent = {{124, -202}, {160, -162}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax(fixed = false) = 354.534, mode_caract = 0, Cv(start = 70, fixed = false), C1(h_vol(start = 800e3), h(start = 800e3))) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax = controlValveEauCvmax, mode_caract = 0, Cv(start = 237.97450256347656, fixed = false), C1(h_vol(start = 800883.8125), h(start = 800883.8125))) annotation( Placement(transformation(extent = {{88, -186}, {108, -166}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l(fixed = false) = 1.23, C2ex(P(start = 2220000)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l = waterHeatingCOP0l, C2ex(P(start = 2220000), h_vol(start = 800883.8125)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), Pfond(start = 2220288.75), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( Placement(transformation(extent = {{-58, -90}, {162, 96}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2(h0 = 940.000e3) annotation( Placement(transformation(extent = {{-150, 22}, {-192, 66}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35, h(start = 772055.9375)) annotation( Placement(transformation(extent = {{-99, -48}, {-79, -28}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterOut(Q(fixed = false, start = 650), K = 30, C2(h_vol(start = 927700), h(start = 927700))) annotation( Placement(transformation(extent = {{-80, 34}, {-100, 54}}, rotation = 0))); @@ -21,7 +24,7 @@ model ZeroFlow Placement(transformation(extent = {{-196, -88}, {-176, -68}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 71.29e5, h0 = 772.09e3, T0 = 454.46, option_temperature = 1) annotation( Placement(transformation(extent = {{-192, -16}, {-150, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53, C1(h_vol(start = 927738.1875))) annotation( Placement(transformation(extent = {{-115, 34}, {-135, 54}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(Table = [0, 624.97; 300, 624.97; 2000, 0; 3000, 0]) annotation( Placement(transformation(extent = {{-196, 78}, {-176, 98}}, rotation = 0))); @@ -33,11 +36,11 @@ model ZeroFlow Placement(transformation(extent = {{191, -140}, {169, -118}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve checkValve(C2(h_vol(start = 2600e3), h(start = 2600e3))) annotation( Placement(transformation(extent = {{-100, 122}, {-84, 138}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000), h(start = 800883.8125), C2(h_vol(start = 800883.8125))) 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, 2.9e5; 2000, 2.9e5]) annotation( Placement(transformation(extent = {{162, -178}, {182, -158}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda(fixed = false) = 0.03, L = 48.72, D = 0.387) annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda = pressureLossSteamLambda, L = 48.72, D = 0.387) annotation( Placement(transformation(extent = {{-48, 162}, {30, 98}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA1(Table = [0, 71.29e5; 378, 71.29e5; 438, 77e5; 597, 73.8e5; 1533, 69.8e5; 2340, 68.8e5; 2500, 68.8e5]) annotation( Placement(transformation(extent = {{-196, -154}, {-174, -132}}, rotation = 0))); @@ -86,4 +89,4 @@ equation This model is documented in Sect. 7.2.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end ZeroFlow; \ No newline at end of file +end ZeroFlow; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicOnePhaseFlowShell.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicOnePhaseFlowShell.mo index 4537d99b..9e61e208 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicOnePhaseFlowShell.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicOnePhaseFlowShell.mo @@ -1,9 +1,11 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger; model TestDynamicOnePhaseFlowShell - WaterSteam.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( + parameter Units.SI.AbsolutePressure sinkP0(fixed = false, start = 1900000) + "Sink pressure computed by initialization"; + WaterSteam.HeatExchangers.DynamicOnePhaseFlowShell dynamicOnePhaseFlowPipeShell(Q(start = {500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500}), Ds = 1, ntubes = 520, L = 12, P(start = {2000000, 1996000, 1993000, 1990000, 1986000, 1983000, 1980000, 1976000, 1973000, 1965000, 1955000, 1950000}), h(start = {600000, 596000, 592000, 588000, 584000, 580000, 576000, 572000, 568000, 564000, 560000, 560000})) annotation( Placement(transformation(extent = {{-48, -36}, {48, 36}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.SinkP sinkP(option_temperature = 2, P0(fixed = false) = 1900000) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP sinkP(option_temperature = 2, P0 = sinkP0) annotation( Placement(transformation(extent = {{74, -15}, {102, 15}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, h0 = 600e3, Q(start = 500, fixed = true), P0 = 2000000) annotation( Placement(transformation(extent = {{-103, -15}, {-75, 15}}, rotation = 0))); @@ -33,4 +35,4 @@ This model is documented in Sect. 9.4.3.4 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. "), experiment(StopTime = 2000)); -end TestDynamicOnePhaseFlowShell; \ No newline at end of file +end TestDynamicOnePhaseFlowShell; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicPlateHeatExchanger.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicPlateHeatExchanger.mo index 69e49a6f..aac7c130 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicPlateHeatExchanger.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicPlateHeatExchanger.mo @@ -1,13 +1,15 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger; model TestDynamicPlateHeatExchanger + parameter Units.SI.AbsolutePressure puitsP2P0(fixed = false, start = 100000) + "Hot side outlet pressure computed by initialization"; ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterWaterExchanger echangeurAPlaques1D1(modec = 1, modef = 1, N = 5, Sc(Q(fixed = true, start = 1036))) annotation( Placement(transformation(extent = {{-14, 6}, {6, 26}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP2(T0 = 340) annotation( Placement(transformation(extent = {{-74, 6}, {-54, 26}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP3 annotation( Placement(transformation(extent = {{-54, -14}, {-34, 6}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP2(P0(fixed = false) = 100000) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP2(P0 = puitsP2P0) annotation( Placement(transformation(extent = {{46, 6}, {66, 26}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP3 annotation( Placement(transformation(extent = {{26, -14}, {46, 6}}, rotation = 0))); @@ -29,4 +31,4 @@ equation This model is documented in Sect. 9.6.1.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestDynamicPlateHeatExchanger; \ No newline at end of file +end TestDynamicPlateHeatExchanger; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicTwoPhaseFlowPipe.mo index 7bb25fb0..f5e8b4e5 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicTwoPhaseFlowPipe.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestDynamicTwoPhaseFlowPipe.mo @@ -1,7 +1,9 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger; model TestDynamicTwoPhaseFlowPipe - WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe1(L = 10, D = 0.03, dpfCorr(fixed = false, start = 0.23963336533422905) = 1, P(start = {2000000.0, 1999571.707027408, 1999140.94021676, 1998707.6248918818, 1998271.6837222823, 1997833.0364982954, 1997391.599890757, 1996715.8221090273, 1995640.018272837, 1994163.014585635, 1992283.4952231126, 1990000.0})) annotation( + parameter Real dpfCorr1(fixed = false, start = 0.23963336533422905) + "Friction pressure loss corrective term for dynamicTwoPhaseFlowPipe1"; + WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe1(L = 10, D = 0.03, dpfCorr = dpfCorr1, P(start = {2000000.0, 1999571.707027408, 1999140.94021676, 1998707.6248918818, 1998271.6837222823, 1997833.0364982954, 1997391.599890757, 1996715.8221090273, 1995640.018272837, 1994163.014585635, 1992283.4952231126, 1990000.0}), h(start = {800000, 802000, 804000, 806000, 808000, 810000, 812000, 814000, 816000, 818000, 820000, 2000000})) annotation( Placement(transformation(extent = {{-40, -48}, {40, 10}}, rotation = 0))); WaterSteam.BoundaryConditions.SourceP sourceP1(C(Q(fixed = true, start = 1)), option_temperature = 2, mode = 0, h0 = 800e3, P0 = 2000000) annotation( Placement(transformation(extent = {{-90, -28}, {-70, -8}}, rotation = 0))); @@ -33,4 +35,4 @@ equation This model is documented in Sect. 9.4.2.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestDynamicTwoPhaseFlowPipe; \ No newline at end of file +end TestDynamicTwoPhaseFlowPipe; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestNTUWaterHeater.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestNTUWaterHeater.mo index 7b552c23..0a2526a1 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestNTUWaterHeater.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestNTUWaterHeater.mo @@ -1,25 +1,31 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger; model TestNTUWaterHeater + parameter Real KCond1(fixed = false, start = 5024) + "Condensation heat exchange coefficient computed by initialization"; + parameter Real KPurge1(fixed = false, start = 1767) + "Purge heat exchange coefficient computed by initialization"; + parameter Real lambdaE1(fixed = false, start = 67.1) + "Water-side heat exchange coefficient computed by initialization"; ThermoSysPro.WaterSteam.BoundaryConditions.SourcePQ Water_inlet1(Q0 = 1788.90, h0 = 760.83e3, P0 = 8270000) annotation( Placement(transformation(extent = {{-174, -16}, {-154, 4}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2 annotation( Placement(transformation(extent = {{137, -16}, {157, 4}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP Steam_inlet1(option_temperature = 2, mode = 0, P0 = 17.49e5, h0 = 2432.50e3) annotation( Placement(transformation(extent = {{-174, 84}, {-154, 104}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss6(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss6(K = 1e-4, h(start = 760830), C2(Q(start = 1788.9), P(start = 8270000), h_vol(start = 760830), h(start = 760830))) annotation( Placement(transformation(extent = {{-111, -16}, {-91, 4}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss7(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss7(K = 1e-4, Q(start = 118), h(start = 2432500)) annotation( Placement(transformation(extent = {{-110, 84}, {-90, 104}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur3 annotation( Placement(transformation(extent = {{136, -75}, {156, -55}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss8(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss8(K = 1e-4, h(start = 872080), C1(Q(start = 1788.9), P(start = 8019000), h_vol(start = 872080), h(start = 872080))) annotation( Placement(transformation(extent = {{75, -16}, {95, 4}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss9(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss9(K = 1e-4, h(start = 780130), C1(Q(start = 118), P(start = 2779000), h_vol(start = 780130), h(start = 780130))) annotation( Placement(transformation(extent = {{75, -75}, {95, -55}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.NTUWaterHeating nTUWaterHeating1(HeiF(start = 900000), HDesF(start = 900000), Hep(start = 500000), SCondDes = 5752, Ee(P(start = 82e5), h_vol(start = 760000), Q(start = 1790), h(start = 780000)), Ep(Q(start = 118)), Ev(P(start = 27.22e5), h_vol(start = 2430000)), KCond(fixed = false) = 5024, KPurge(fixed = false) = 1767, Sp(h_vol(start = 780.13e3), h(fixed = true, start = 780.13e3)), lambdaE(fixed = false) = 67.1, SPurge = 1458, Se(h(fixed = true, start = 872.08e3), P(start = 80.19e5, fixed = true))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.NTUWaterHeating nTUWaterHeating1(HeiF(start = 878165.8), HDesF(start = 872080), Hep(start = 889890), SCondDes = 5752, P(start = 1749000), h(start = 780130), SDes(start = 1e-9), Ee(P(start = 8270000), h_vol(start = 760830), Q(start = 1788.9), h(start = 760830)), Ep(P(start = 2779000), Q(start = 118), h(start = 889890), h_vol(start = 780130)), Ev(P(start = 1749000), Q(start = 118), h(start = 2432500), h_vol(start = 780130)), KCond = KCond1, KPurge = KPurge1, Sp(Q(start = 118), h_vol(start = 780.13e3), h(fixed = true, start = 780.13e3)), lambdaE = lambdaE1, SPurge = 1458, Se(P(start = 80.19e5, fixed = true), Q(start = 1788.9), h_vol(start = 872.08e3), h(fixed = true, start = 872.08e3))) annotation( Placement(transformation(extent = {{-66, -77}, {50, 65}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss10(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss10(K = 1e-4, Q(start = 118), h(start = 889890), C2(Q(start = 118), P(start = 2779000), h_vol(start = 889890), h(start = 889890))) annotation( Placement(transformation(extent = {{-110, 35}, {-90, 55}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourcePQ Drain_inlet1(P0 = 27.79e5, Q0 = 118.02, h0 = 889.89e3) annotation( Placement(transformation(extent = {{-174, 35}, {-154, 55}}, rotation = 0))); @@ -53,4 +59,4 @@ equation This model is documented in Sect. 9.5.5.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestNTUWaterHeater; \ No newline at end of file +end TestNTUWaterHeater; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestSimpleDynamicCondenser.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestSimpleDynamicCondenser.mo index ed5519e3..2329dcb8 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestSimpleDynamicCondenser.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestSimpleDynamicCondenser.mo @@ -5,6 +5,8 @@ model TestSimpleDynamicCondenser 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"; + parameter Real PerteChargeCondPompe3K(fixed = false, start = 1e-3) + "Steam inlet pressure loss coefficient computed by initialization"; ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsPCaloporteur(mode = 0, P0 = 1e5, option_temperature = 2) annotation( Placement(transformation(extent = {{48, 30}, {88, 70}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe(K = 1e-6, Q(start = 0.598447)) annotation( @@ -19,7 +21,7 @@ model TestSimpleDynamicCondenser Placement(transformation(origin = {36, 50}, extent = {{6, -10}, {-6, 10}}, rotation = 180))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe2(K = 1e-6) annotation( Placement(transformation(origin = {-154, 49}, extent = {{6, -10}, {-6, 10}}, rotation = 180))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe3(K(fixed = false) = 1e-3, Q(start = 192, fixed = true)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss PerteChargeCondPompe3(K = PerteChargeCondPompe3K, Q(start = 192, fixed = true)) annotation( Placement(transformation(origin = {-120, 159}, extent = {{10, -10}, {-10, 10}}, rotation = 180))); WaterSteam.HeatExchangers.SimpleDynamicCondenser Condenseur(D = 0.018, V = 1000, A = 100, lambda = 0.01, ntubes = 28700, continuous_flow_reversal = true, yNiveau(signal(fixed = false, start = 1.5)), Vf0 = 0.15, steady_state = false, P(fixed = false, start = 10000)) annotation( Placement(transformation(extent = {{-118, 6}, {1, 116}}, rotation = 0))); @@ -50,4 +52,4 @@ equation This model is documented in Sect. 9.5.3.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestSimpleDynamicCondenser; \ No newline at end of file +end TestSimpleDynamicCondenser; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticCondenser.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticCondenser.mo index 37ffc69c..a8cb2fce 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticCondenser.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticCondenser.mo @@ -4,7 +4,9 @@ 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)"; - WaterSteam.BoundaryConditions.SinkP Puit_condenseur(P0(fixed = false) = 100000) annotation( + parameter Units.SI.AbsolutePressure Pout_condenseur(fixed = false, start = 100000) + "Condenser water outlet pressure computed by initialization"; + WaterSteam.BoundaryConditions.SinkP Puit_condenseur(P0 = Pout_condenseur) annotation( Placement(transformation(extent = {{158, -15}, {178, 5}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = Pin_1, C(Q(fixed = true, start = 832.66)), h0 = 2275.10e3) annotation( Placement(transformation(extent = {{-100, 140}, {-80, 160}}, rotation = 0))); @@ -26,7 +28,7 @@ model TestStaticCondenser Placement(transformation(extent = {{40, -100}, {60, -80}}, rotation = 0))); WaterSteam.HeatExchangers.StaticCondenser condenseur(SCO = 47786, z = 0, mode_ee = 1, mode_se = 1, mode_ex = 1, CPCE = 0, KCO = 3400.57, QC0 = 37700) annotation( Placement(transformation(extent = {{-24, -24}, {68, 74}}, rotation = 0))); - WaterSteam.BoundaryConditions.SourceQ Source_condenseur(h0 = 60e3, C(P(fixed = true, start = 328800)), Q0(fixed = true) = 42261) annotation( + WaterSteam.BoundaryConditions.SourceQ Source_condenseur(h0 = 60e3, P(start = 328800, fixed = false), Q0(fixed = true) = 42261) annotation( Placement(transformation(extent = {{-189, -25}, {-146, 15}}, rotation = 0))); WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss2(K = 1e-3) annotation( Placement(transformation(extent = {{-101, -15}, {-81, 5}}, rotation = 0))); @@ -65,4 +67,4 @@ equation This model is documented in Sect. 9.7.1.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestStaticCondenser; \ No newline at end of file +end TestStaticCondenser; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticPlateHeatExchanger.mo b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticPlateHeatExchanger.mo index a0ec57d1..1f0241a3 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticPlateHeatExchanger.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/HeatExchanger/TestStaticPlateHeatExchanger.mo @@ -1,13 +1,15 @@ within ThermoSysPro.Examples.Book.SimpleExamples.HeatExchanger; model TestStaticPlateHeatExchanger - WaterSteam.HeatExchangers.StaticWaterWaterExchanger echangeurAPlaques1(modec = 1, modef = 1, Sp = 2, Sc(Q(fixed = true, start = 1036.78))) annotation( + parameter Units.SI.AbsolutePressure puitsP2P0(fixed = false, start = 100000) + "Hot side outlet pressure computed by initialization"; + WaterSteam.HeatExchangers.StaticWaterWaterExchanger echangeurAPlaques1(modec = 1, modef = 1, Sp = 2, Sc(Q(fixed = true, start = 1036.77507878))) annotation( Placement(transformation(extent = {{-10, 30}, {10, 50}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP2(T0 = 340) annotation( Placement(transformation(extent = {{-70, 30}, {-50, 50}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP3 annotation( Placement(transformation(extent = {{-50, 10}, {-30, 30}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP2(P0(fixed = false) = 100000) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP2(P0 = puitsP2P0) annotation( Placement(transformation(extent = {{50, 30}, {70, 50}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP3 annotation( Placement(transformation(extent = {{30, 10}, {50, 30}}, rotation = 0))); @@ -47,4 +49,4 @@ equation This model is documented in Sect. 9.6.2.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestStaticPlateHeatExchanger; \ No newline at end of file +end TestStaticPlateHeatExchanger; diff --git a/ThermoSysPro/Examples/Book/SimpleExamples/Volume/TestPressurizer.mo b/ThermoSysPro/Examples/Book/SimpleExamples/Volume/TestPressurizer.mo index 2639a972..98d66a7a 100644 --- a/ThermoSysPro/Examples/Book/SimpleExamples/Volume/TestPressurizer.mo +++ b/ThermoSysPro/Examples/Book/SimpleExamples/Volume/TestPressurizer.mo @@ -1,8 +1,8 @@ within ThermoSysPro.Examples.Book.SimpleExamples.Volume; 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"; + parameter Units.SI.Power Wch(fixed = false, start = 167023.328125) "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed = false, start = 1.56658279593103e-05) "OUV feed water valve"; ThermoSysPro.WaterSteam.PressureLosses.ControlValve FeedwaterValve_Spray(Cv(start = 100), C1(P(start = 160e5), h_vol(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.WaterSteam.PressureLosses.ControlValve SteamValve(Cv(start = 25000), Cvmax(fixed = true) = 5000, Pm(start = 15500000)) annotation( @@ -71,4 +71,4 @@ equation This model is documented in Sect. 14.3.5 of the ThermoSysPro book. The results reported in the ThermoSysPro book were computed using Dymola. ")); -end TestPressurizer; \ No newline at end of file +end TestPressurizer; diff --git a/ThermoSysPro/Examples/Control/Condenser_LevelControl_RE5.mo b/ThermoSysPro/Examples/Control/Condenser_LevelControl_RE5.mo index ed17033e..4d810544 100644 --- a/ThermoSysPro/Examples/Control/Condenser_LevelControl_RE5.mo +++ b/ThermoSysPro/Examples/Control/Condenser_LevelControl_RE5.mo @@ -1,10 +1,6 @@ within ThermoSysPro.Examples.Control; model Condenser_LevelControl_RE5 "Condenser level control" - ThermoSysPro.InstrumentationAndControl.Connectors.InputReal MesureDebitVapeur annotation( - Placement(transformation(extent = {{-109, -94}, {-99, -84}}, rotation = 0))); - ThermoSysPro.InstrumentationAndControl.Connectors.InputReal MesureDebitEau annotation( - Placement(transformation(extent = {{-110.5, -34.5}, {-100.5, -24.5}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Connectors.InputReal MesureNiveauEau annotation( Placement(transformation(extent = {{-110, 85}, {-100, 95}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Connectors.InputReal ConsigneNiveauEau annotation( @@ -37,7 +33,7 @@ equation connect(add.y, pIsat1.u) annotation( Line(points = {{89.25, 78}, {93, 78}, {93, -66}, {-52, -66}})); annotation( - Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, grid = {1, 1}, initialScale = 0.1), graphics = {Text(extent = {{-97, 99}, {-59, 91}}, lineColor = {127, 0, 0}, textString = "Niveau ballon"), Text(extent = {{-99, 58}, {-53, 26}}, lineColor = {127, 0, 0}, textString = "Consigne Niveau"), Text(extent = {{-103, -21}, {-65, -29}}, lineColor = {127, 0, 0}, textString = "Debit Eau"), Text(extent = {{-99, -92}, {-61, -100}}, lineColor = {127, 0, 0}, textString = "Debit Vapeur"), Text(extent = {{64, -92}, {102, -100}}, lineColor = {127, 0, 0}, textString = "Ouv Vanne")}), + Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, grid = {1, 1}, initialScale = 0.1), graphics = {Text(textColor = {127, 0, 0}, extent = {{-97, 99}, {-59, 91}}, textString = "Niveau ballon"), Text(textColor = {127, 0, 0}, extent = {{-99, 58}, {-53, 26}}, textString = "Consigne Niveau"), Text(textColor = {127, 0, 0}, extent = {{64, -92}, {102, -100}}, textString = "Ouv Vanne")}), Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, grid = {1, 1}, initialScale = 0.1), graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Rectangle(extent = {{-80, 81}, {80, -80}}, lineColor = {0, 0, 255}, fillColor = {255, 255, 170}, fillPattern = FillPattern.Solid), Text(extent = {{-58, 62}, {58, -1}}, lineColor = {0, 0, 255}, fillColor = {255, 255, 170}, fillPattern = FillPattern.Solid, textString = "Regulation Niveau "), Text(extent = {{-33, -23}, {33, -61}}, lineColor = {0, 0, 255}, fillColor = {255, 255, 170}, fillPattern = FillPattern.Solid, textString = "Ballon")}), Documentation(info = "## Copyright © EDF 2002 - 2025 diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump.mo index ecff7404..4060691d 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump.mo @@ -3,13 +3,13 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicCentrifugalPump ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Pulse Pulse1(width = 200, period = 400) annotation( Placement(transformation(extent = {{-100, -60}, {-80, -40}}, rotation = 0))); - ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Motor1(Im(start = 1800)) annotation( + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Motor1(Im(start = 1754.2124), w(start = 146.60089)) annotation( Placement(transformation(extent = {{-80, -80}, {-60, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.Machines.DynamicCentrifugalPump DynamicCentrifugalPump1(Ch(start = 300)) annotation( + ThermoSysPro.WaterSteam.Machines.DynamicCentrifugalPump DynamicCentrifugalPump1(Ch(start = 288.20303), w(start = 146.60089), Q(start = 655.72021), Qv(start = 0.65741438), Pm(start = 273551.16), h(start = 100032.22), C1(P(start = 249961.41), h(start = 100032.22)), C2(P(start = 297140.94), h(start = 100032.22))) annotation( Placement(transformation(extent = {{0, -40}, {-20, -20}}, rotation = 0))); ThermoSysPro.WaterSteam.Volumes.Tank Tank(ze2 = 10, zs2 = 10) annotation( Placement(transformation(extent = {{-20, 20}, {0, 40}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve Valve annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve Valve(Q(start = 655.72021), Pm(start = 273335.62), C2(P(start = 249961.41), h_vol(start = 100000))) annotation( Placement(transformation(extent = {{40, 20}, {60, 40}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Constante1(k = 0.5) annotation( Placement(transformation(extent = {{0, 60}, {20, 80}}, rotation = 0))); @@ -39,4 +39,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestDynamicCentrifugalPump; \ No newline at end of file +end TestDynamicCentrifugalPump; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump2.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump2.mo index b81126e4..bbf00f98 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump2.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicCentrifugalPump2.mo @@ -4,9 +4,9 @@ model TestDynamicCentrifugalPump2 import ThermoSysPro; ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Pulse Pulse1(width = 200, period = 400) annotation( Placement(transformation(extent = {{-60, -60}, {-40, -40}}, rotation = 0))); - ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Motor1(Im(start = 1800)) annotation( + ThermoSysPro.ElectroMechanics.Machines.SynchronousMotor Motor1(Im(start = 1754.2614), w(start = 146.60089)) annotation( Placement(transformation(extent = {{-40, -80}, {-20, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.Machines.DynamicCentrifugalPump DynamicCentrifugalPump1(continuous_flow_reversal = true, J = 10, Cf0 = 1000, Ch(start = 300)) annotation( + ThermoSysPro.WaterSteam.Machines.DynamicCentrifugalPump DynamicCentrifugalPump1(continuous_flow_reversal = true, J = 10, Cf0 = 1000, Ch(start = 288.2063), w(start = 146.60089), Q(start = 655.73639), Qv(start = 0.65741497), C1(P(start = 296709.84), h(start = 100032.22)), C2(P(start = 343889.81), h(start = 100032.22))) annotation( Placement(transformation(extent = {{40, -40}, {20, -20}}, rotation = 0))); ThermoSysPro.WaterSteam.Volumes.Tank Tank(ze2 = 10, zs2 = 10) annotation( Placement(transformation(extent = {{20, 20}, {40, 40}}, rotation = 0))); @@ -74,4 +74,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestDynamicCentrifugalPump2; \ No newline at end of file +end TestDynamicCentrifugalPump2; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicExchangerWaterSteamFlueGases.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicExchangerWaterSteamFlueGases.mo index 69a2cb2e..2fbba2b0 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicExchangerWaterSteamFlueGases.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicExchangerWaterSteamFlueGases.mo @@ -1,13 +1,41 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicExchangerWaterSteamFlueGases - MultiFluids.HeatExchangers.DynamicExchangerWaterSteamFlueGases Echangeur(Ns = 10, TwoPhaseFlowPipe(P(start = {130e5, 130e5, 130e5, 130e5, 130e5, 130e5, 130e5, 130e5, 130e5, 130e5, 130e5, 130e5}), h(start = {15e5, 15e5, 15e5, 15e5, 15e5, 15e5, 15e5, 15e5, 15e5, 15e5, 15e5, 15e5})), z2 = 10, Ntubes = 1480, ExchangerWall(e = 0.0026, lambda = 47), L = 21, Dint = 32e-3, ExchangerFlueGasesMetal(step_L = 0.092, step_T = 0.087, Fa = 1, Dext = 0.0372, CSailettes = 12, Encras(fixed = true) = 1, K(fixed = false, start = 40))) annotation( + parameter Units.SI.AbsolutePressure Source_WSteamP0(fixed = false, start = 13021255) + "Source pressure computed by initialization"; + MultiFluids.HeatExchangers.DynamicExchangerWaterSteamFlueGases Echangeur( + Ns = 10, + TwoPhaseFlowPipe( + P(start = {13021255, 13015229, 13012838, 13011100, 13009574, 13008138, 13006748, 13005381, 13004027, 13002681, 13001339, 13000000}), + h(start = {1460000, 1763911.12, 1929304.5, 2020748.62, 2071598.75, 2100049.75, 2116132, 2125338.5, 2130677.25, 2133810.5, 2135670.5, 100000}), + Tp1(start = {610.928772, 609.345581, 607.539001, 606.317139, 605.529785, 605.005249, 604.65271, 604.418457, 604.265015, 604.165222})), + z2 = 10, + Ntubes = 1480, + ExchangerWall( + e = 0.0026, + lambda = 47, + Tp1(start = {610.928772, 609.345581, 607.539001, 606.317139, 605.529785, 605.005249, 604.65271, 604.418457, 604.265015, 604.165222}), + Tp(start = {614.808716, 611.457153, 608.706482, 606.966309, 605.893005, 605.210571, 604.770203, 604.486633, 604.304993, 604.188965})), + L = 21, + Dint = 32e-3, + ExchangerFlueGasesMetal( + step_L = 0.092, + step_T = 0.087, + Fa = 1, + Dext = 0.0372, + CSailettes = 12, + Encras(fixed = true) = 1, + K(fixed = false, start = 40), + T(start = {750, 685.249451, 649.573242, 629.712524, 618.626282, 612.410278, 608.892395, 606.877258, 605.708191, 605.021912, 604.614502}), + Tm(start = {717.624756, 667.411377, 639.642883, 624.169434, 615.51825, 610.651367, 607.884827, 606.292725, 605.365051, 604.818237}), + Tp(start = {618.40741, 613.415649, 609.789307, 607.568481, 606.229919, 605.401001, 604.879211, 604.549805, 604.342102, 604.210999}), + DeltaT(start = {99.2172928, 53.9957123, 29.8535938, 16.6009483, 9.28834438, 5.25034571, 3.0055995, 1.74290681, 1.02295697, 0.607229412}))) annotation( Placement(transformation(extent = {{-60, -58}, {60, 58}}, rotation = 0))); ThermoSysPro.FlueGases.BoundaryConditions.SourcePQ Source_Fumees(Xso2 = 0, P0 = 1.1e5, T0 = 750, Xco2 = 0.06, Xh2o = 0.06, Xo2 = 0.14, Q0 = 610) annotation( Placement(transformation(extent = {{-20, 38}, {0, 58}}, rotation = 0))); ThermoSysPro.FlueGases.BoundaryConditions.Sink Puits_Fumees annotation( Placement(transformation(origin = {10, -50}, extent = {{10, -10}, {-10, 10}}, rotation = 180))); - WaterSteam.BoundaryConditions.SourceP Source_WSteam(option_temperature = 2, mode = 0, h0 = 1.46e6, C(Q(fixed = true, start = 150)), P0(fixed = false) = 13000000, T0 = 610) annotation( + WaterSteam.BoundaryConditions.SourceP Source_WSteam(option_temperature = 2, mode = 0, h0 = 1.46e6, C(Q(fixed = true, start = 150)), P0 = Source_WSteamP0, T0 = 610) annotation( Placement(transformation(extent = {{-104, -10}, {-84, 10}}, rotation = 0))); WaterSteam.BoundaryConditions.SinkP Puits_WSteam(option_temperature = 2, mode = 0, P0 = 13000000) annotation( Placement(transformation(origin = {94, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 180))); @@ -26,4 +54,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestDynamicExchangerWaterSteamFlueGases; \ No newline at end of file +end TestDynamicExchangerWaterSteamFlueGases; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipeShell.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipeShell.mo index d03d8b6f..054860fc 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipeShell.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipeShell.mo @@ -1,9 +1,10 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicOnePhaseFlowPipeShell - WaterSteam.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( + parameter Units.SI.AbsolutePressure sinkP0(fixed = false, start = 1900000) "Sink pressure computed by initialization"; + WaterSteam.HeatExchangers.DynamicOnePhaseFlowShell dynamicOnePhaseFlowPipeShell(Q(start = {500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500}), Ds = 1, ntubes = 520, L = 12, P(start = {2000000, 1996000, 1993000, 1990000, 1986000, 1983000, 1980000, 1976000, 1973000, 1965000, 1955000, 1950000}), h(start = {600000, 596000, 592000, 588000, 584000, 580000, 576000, 572000, 568000, 564000, 560000, 560000})) annotation( Placement(transformation(extent = {{-48, -36}, {48, 36}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.SinkP sinkP(option_temperature = 2, P0(fixed = false) = 1900000) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.SinkP sinkP(option_temperature = 2, P0 = sinkP0) annotation( Placement(transformation(extent = {{74, -15}, {102, 15}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, h0 = 600e3, P0 = 2000000, Q(start = 500, fixed = true)) annotation( Placement(transformation(extent = {{-103, -15}, {-75, 15}}, rotation = 0))); @@ -30,4 +31,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestDynamicOnePhaseFlowPipeShell; \ No newline at end of file +end TestDynamicOnePhaseFlowPipeShell; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo index 91db2b83..5ed5c5db 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo @@ -1,6 +1,7 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicTwoPhaseFlowPipe + parameter Real dpfCorr1(fixed = false, start = 0.23963336533422905) "Friction pressure loss corrective term for dynamicTwoPhaseFlowPipe1"; ThermoSysPro.WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe(L = 20, advection = false, P(start = {300000.0, 281934.9410206863, 263857.2951934783, 245762.87920491621, 227647.89301968267, 209508.84324088524, 191342.48510599748, 173145.77779073696, 154915.84935981245, 136649.96881108306, 118345.52340716157, 100000.0}), 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})) annotation( Placement(transformation(extent = {{-10, 20}, {10, 40}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP annotation( @@ -11,7 +12,7 @@ model TestDynamicTwoPhaseFlowPipe Placement(transformation(extent = {{-10, 60}, {10, 80}}, rotation = 0))); ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns = 10) annotation( Placement(transformation(extent = {{-10, 40}, {10, 60}}, rotation = 0))); - WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe1(L = 10, D = 0.03, dpfCorr(fixed = false, start = 0.23963336533422905) = 1, P(start = {2000000.0, 1999571.707027408, 1999140.94021676, 1998707.6248918818, 1998271.6837222823, 1997833.0364982954, 1997391.599890757, 1996715.8221090273, 1995640.018272837, 1994163.014585635, 1992283.4952231126, 1990000.0})) annotation( + WaterSteam.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe1(L = 10, D = 0.03, dpfCorr = dpfCorr1, P(start = {2000000.0, 1999571.707027408, 1999140.94021676, 1998707.6248918818, 1998271.6837222823, 1997833.0364982954, 1997391.599890757, 1996715.8221090273, 1995640.018272837, 1994163.014585635, 1992283.4952231126, 1990000.0}), h(start = {800000, 802000, 804000, 806000, 808000, 810000, 812000, 814000, 816000, 818000, 820000, 2000000})) annotation( Placement(transformation(extent = {{-40, -94}, {40, -36}}, rotation = 0))); WaterSteam.BoundaryConditions.SourceP sourceP1(C(Q(fixed = true, start = 1)), option_temperature = 2, mode = 0, h0 = 800e3, P0 = 2000000) annotation( Placement(transformation(extent = {{-90, -74}, {-70, -54}}, rotation = 0))); @@ -49,4 +50,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestDynamicTwoPhaseFlowPipe; \ No newline at end of file +end TestDynamicTwoPhaseFlowPipe; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Islanding.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Islanding.mo index 8f1439c7..fc1e0b5a 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Islanding.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Islanding.mo @@ -1,17 +1,20 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicWaterHeating_Islanding + parameter Real pressureLossSteamLambda(fixed = false, start = 0.055042482912540436); + parameter Real waterHeatingCOP0l(fixed = false, start = 1.2906341552734375); + parameter Real controlValveEauCvmax(fixed = false, start = 237.97450256347656); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 22.733e5, h0 = 2650.6e3) annotation( Placement(transformation(extent = {{-192, 110}, {-150, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP Puit_condenseur1(option_temperature = 2, P0(fixed = true) = 10e5) annotation( Placement(transformation(extent = {{124, -202}, {160, -162}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax(fixed = false) = 354.534, mode_caract = 0, Cv(start = 70, fixed = false), C1(h_vol(start = 800e3), h(start = 800e3))) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax = controlValveEauCvmax, mode_caract = 0, Cv(start = 237.97450256347656, fixed = false), C1(h_vol(start = 800883.8125), h(start = 800883.8125))) annotation( Placement(transformation(extent = {{88, -186}, {108, -166}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l(fixed = false) = 1.23, C2ex(P(start = 2220000)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l = waterHeatingCOP0l, C2ex(P(start = 2220000), h_vol(start = 800883.8125)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), Pfond(start = 2220288.75), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( Placement(transformation(extent = {{-58, -90}, {162, 96}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2(h0 = 940.000e3) annotation( Placement(transformation(extent = {{-150, 22}, {-192, 66}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35, h(start = 772055.9375)) annotation( Placement(transformation(extent = {{-99, -48}, {-79, -28}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterOut(Q(fixed = false, start = 650), K = 30, C2(h_vol(start = 927700), h(start = 927700))) annotation( Placement(transformation(extent = {{-80, 34}, {-100, 54}}, rotation = 0))); @@ -21,7 +24,7 @@ model TestDynamicWaterHeating_Islanding Placement(transformation(extent = {{-196, -88}, {-176, -68}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 71.29e5, h0 = 772.09e3, T0 = 454.46, option_temperature = 1) annotation( Placement(transformation(extent = {{-192, -16}, {-150, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53, C1(h_vol(start = 927738.1875))) annotation( Placement(transformation(extent = {{-115, 34}, {-135, 54}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(Table = [0, 624.97; 378, 624.97; 390, 592; 438, 699; 507, 353; 936, 252; 1404, 176; 1872, 116; 2340, 88; 2500, 88]) annotation( Placement(transformation(extent = {{-196, 78}, {-176, 98}}, rotation = 0))); @@ -33,11 +36,11 @@ model TestDynamicWaterHeating_Islanding Placement(transformation(extent = {{191, -140}, {169, -118}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve checkValve(C2(h_vol(start = 2600e3), h(start = 2600e3))) annotation( Placement(transformation(extent = {{-100, 122}, {-84, 138}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000), h(start = 800883.8125), C2(h_vol(start = 800883.8125))) 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, 2.9e5; 2000, 2.9e5]) annotation( Placement(transformation(extent = {{162, -178}, {182, -158}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda(fixed = false) = 0.03, L = 48.72, D = 0.387) annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda = pressureLossSteamLambda, L = 48.72, D = 0.387) annotation( Placement(transformation(extent = {{-48, 162}, {30, 98}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA1(Table = [0, 71.29e5; 378, 71.29e5; 438, 77e5; 597, 73.8e5; 1533, 69.8e5; 2340, 68.8e5; 2500, 68.8e5]) annotation( Placement(transformation(extent = {{-196, -154}, {-174, -132}}, rotation = 0))); @@ -88,4 +91,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestDynamicWaterHeating_Islanding; \ No newline at end of file +end TestDynamicWaterHeating_Islanding; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_negative.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_negative.mo index 193e450f..a0938d70 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_negative.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_negative.mo @@ -1,17 +1,20 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicWaterHeating_Qwater_negative + parameter Real pressureLossSteamLambda(fixed = false, start = 0.055042482912540436); + parameter Real waterHeatingCOP0l(fixed = false, start = 1.2906341552734375); + parameter Real controlValveEauCvmax(fixed = false, start = 237.97450256347656); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 22.733e5, h0 = 2650.6e3) annotation( Placement(transformation(extent = {{-192, 110}, {-150, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP Puit_condenseur1(option_temperature = 2, P0(fixed = true) = 10e5) annotation( Placement(transformation(extent = {{124, -202}, {160, -162}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax(fixed = false) = 354.534, mode_caract = 0, Cv(start = 70, fixed = false), C1(h_vol(start = 800e3), h(start = 800e3))) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax = controlValveEauCvmax, mode_caract = 0, Cv(start = 237.97450256347656, fixed = false), C1(h_vol(start = 800883.8125), h(start = 800883.8125))) annotation( Placement(transformation(extent = {{88, -186}, {108, -166}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l(fixed = false) = 1.23, C2ex(P(start = 2220000)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l = waterHeatingCOP0l, C2ex(P(start = 2220000), h_vol(start = 800883.8125)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), Pfond(start = 2220288.75), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( Placement(transformation(extent = {{-58, -90}, {162, 96}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2(h0 = 940.000e3) annotation( Placement(transformation(extent = {{-150, 22}, {-192, 66}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35, h(start = 772055.9375)) annotation( Placement(transformation(extent = {{-99, -48}, {-79, -28}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterOut(Q(fixed = false, start = 650), K = 30, C2(h_vol(start = 927700), h(start = 927700))) annotation( Placement(transformation(extent = {{-80, 34}, {-100, 54}}, rotation = 0))); @@ -21,7 +24,7 @@ model TestDynamicWaterHeating_Qwater_negative Placement(transformation(extent = {{-196, -88}, {-176, -68}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 71.29e5, h0 = 772.09e3, T0 = 454.46, option_temperature = 1) annotation( Placement(transformation(extent = {{-192, -16}, {-150, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53, C1(h_vol(start = 927738.1875))) annotation( Placement(transformation(extent = {{-115, 34}, {-135, 54}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(Table = [0, 624.97; 300, 624.97; 2000, -200; 3000, -200]) annotation( Placement(transformation(extent = {{-196, 78}, {-176, 98}}, rotation = 0))); @@ -33,11 +36,11 @@ model TestDynamicWaterHeating_Qwater_negative Placement(transformation(extent = {{191, -140}, {169, -118}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve checkValve(C2(h_vol(start = 2600e3), h(start = 2600e3))) annotation( Placement(transformation(extent = {{-100, 122}, {-84, 138}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000), h(start = 800883.8125), C2(h_vol(start = 800883.8125))) 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, 2.9e5; 2000, 2.9e5]) annotation( Placement(transformation(extent = {{162, -178}, {182, -158}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda(fixed = false) = 0.03, L = 48.72, D = 0.387) annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda = pressureLossSteamLambda, L = 48.72, D = 0.387) annotation( Placement(transformation(extent = {{-48, 162}, {30, 98}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA1(Table = [0, 71.29e5; 378, 71.29e5; 438, 77e5; 597, 73.8e5; 1533, 69.8e5; 2340, 68.8e5; 2500, 68.8e5]) annotation( Placement(transformation(extent = {{-196, -154}, {-174, -132}}, rotation = 0))); diff --git a/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_zero.mo b/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_zero.mo index 5b6a851e..40d488a3 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_zero.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestDynamicWaterHeating_Qwater_zero.mo @@ -1,17 +1,20 @@ within ThermoSysPro.Examples.SimpleExamples; model TestDynamicWaterHeating_Qwater_zero + parameter Real pressureLossSteamLambda(fixed = false, start = 0.055042482912540436); + parameter Real waterHeatingCOP0l(fixed = false, start = 1.2906341552734375); + parameter Real controlValveEauCvmax(fixed = false, start = 237.97450256347656); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 22.733e5, h0 = 2650.6e3) annotation( Placement(transformation(extent = {{-192, 110}, {-150, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP Puit_condenseur1(option_temperature = 2, P0(fixed = true) = 10e5) annotation( Placement(transformation(extent = {{124, -202}, {160, -162}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax(fixed = false) = 354.534, mode_caract = 0, Cv(start = 70, fixed = false), C1(h_vol(start = 800e3), h(start = 800e3))) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve ControlValve_eau(Q(fixed = false, start = 56), Cvmax = controlValveEauCvmax, mode_caract = 0, Cv(start = 237.97450256347656, fixed = false), C1(h_vol(start = 800883.8125), h(start = 800883.8125))) annotation( Placement(transformation(extent = {{88, -186}, {108, -166}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l(fixed = false) = 1.23, C2ex(P(start = 2220000)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.DynamicWaterHeating WaterHeating(Dc = 0.016, Lc = 2.56, PasL = 0.027, PasT = 0.02338, ec = 2e-3, Rv = 1.130514, Ns = 10, DpfCorr = 1.1136, cp = 506, rho = 7780, lambda = 35, COP0l = waterHeatingCOP0l, C2ex(P(start = 2220000), h_vol(start = 800883.8125)), ntubes1 = 351, ntubes2 = 351, ntubes3 = 1319, L3 = 26.4, L2 = 13.2, L1 = 13.2, 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 = 1000.65e3), P(start = 68.48e5)), WaterHeating(steady_state = true, Vertical = false, step_square = true, zl(fixed = true, start = 0.43), Kvl = 1, V = 53, Cv(P(fixed = false, start = 21.867e5), Q(fixed = false, start = 52.6)), Mp = 53227, Klp = 1500, Kvp = 1200, Kpa = 0.2, P(fixed = true, start = 2216584), Pfond(start = 2220288.75), hl(start = 806345), hv(start = 1063490), 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)), Ce1(P(start = 7100000)), pipe_1(z2 = 0.3, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000}), Tp(start = {500, 501, 502, 503, 504, 505, 506, 507, 508, 510})), pipe_2(z2 = 0.4, mode = 1, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132}), advection = false, P(start = {6859000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), Tp(start = {510, 510.4, 511, 511.4, 512, 512.4, 513, 513.4, 514, 514.4})), volumeD1(h(start = 953939), P(start = 6848000)), volumeD(h(start = 812750), dynamic_mass_balance = false, P(start = 6872000)), P0c = 2200000, pipe_3(steady_state = true, mode = 1, z2 = 0.7, dynamic_mass_balance = true, simplified_dynamic_energy_balance = false, 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 = {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 132}), advection = false, inertia = true, P(start = {6870000, 6869000, 6868000, 6867000, 6866000, 6865000, 6864000, 6863000, 6862000, 6861000, 6860000, 6859000, 6858000, 6857000, 6856000, 6855000, 6854000, 6853000, 6852000, 6851000, 6850000, 6848000}), 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}))) annotation( Placement(transformation(extent = {{-58, -90}, {162, 96}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur2(h0 = 940.000e3) annotation( Placement(transformation(extent = {{-150, 22}, {-192, 66}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterIn(Q(fixed = false, start = 650), K = 35, h(start = 772055.9375)) annotation( Placement(transformation(extent = {{-99, -48}, {-79, -28}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossWaterOut(Q(fixed = false, start = 650), K = 30, C2(h_vol(start = 927700), h(start = 927700))) annotation( Placement(transformation(extent = {{-80, 34}, {-100, 54}}, rotation = 0))); @@ -21,7 +24,7 @@ model TestDynamicWaterHeating_Qwater_zero Placement(transformation(extent = {{-196, -88}, {-176, -68}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 71.29e5, h0 = 772.09e3, T0 = 454.46, option_temperature = 1) annotation( Placement(transformation(extent = {{-192, -16}, {-150, -60}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 53, C1(h_vol(start = 927738.1875))) annotation( Placement(transformation(extent = {{-115, 34}, {-135, 54}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA(Table = [0, 624.97; 300, 624.97; 2000, 0; 3000, 0]) annotation( Placement(transformation(extent = {{-196, 78}, {-176, 98}}, rotation = 0))); @@ -33,11 +36,11 @@ model TestDynamicWaterHeating_Qwater_zero Placement(transformation(extent = {{191, -140}, {169, -118}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.IdealCheckValve checkValve(C2(h_vol(start = 2600e3), h(start = 2600e3))) annotation( Placement(transformation(extent = {{-100, 122}, {-84, 138}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossPurge(Q(fixed = false, start = 56), K = 1e-3, T(fixed = true, start = 461.56), Pm(start = 2220000), h(start = 800883.8125), C2(h_vol(start = 800883.8125))) 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, 2.9e5; 2000, 2.9e5]) annotation( Placement(transformation(extent = {{162, -178}, {182, -158}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda(fixed = false) = 0.03, L = 48.72, D = 0.387) annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe PressureLoss_Steam(Q(fixed = false, start = 650), lambda = pressureLossSteamLambda, L = 48.72, D = 0.387) annotation( Placement(transformation(extent = {{-48, 162}, {30, 98}}, rotation = 0))); ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA1(Table = [0, 71.29e5; 378, 71.29e5; 438, 77e5; 597, 73.8e5; 1533, 69.8e5; 2340, 68.8e5; 2500, 68.8e5]) annotation( Placement(transformation(extent = {{-196, -154}, {-174, -132}}, rotation = 0))); diff --git a/ThermoSysPro/Examples/SimpleExamples/TestFan.mo b/ThermoSysPro/Examples/SimpleExamples/TestFan.mo index 665eafc8..e680a9cf 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestFan.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestFan.mo @@ -1,41 +1,41 @@ within ThermoSysPro.Examples.SimpleExamples; model TestFan - ThermoSysPro.FlueGases.BoundaryConditions.SourcePQ Source_Fumees(Xso2 = 0, Xco2 = 0.0, Xh2o = 0.006, Xo2 = 0.23, Q0 = 4, P0 = 130000, T0 = 300) annotation( + ThermoSysPro.FlueGases.BoundaryConditions.SourceQ Source_Fumees(Xso2 = 0, Xco2 = 0.0, Xh2o = 0.006, Xo2 = 0.23, Q0 = 4, T0 = 300) annotation( Placement(transformation(extent = {{-210, -24}, {-164, 24}}, rotation = 0))); - ThermoSysPro.FlueGases.BoundaryConditions.Sink Puits_Fumees annotation( + ThermoSysPro.FlueGases.BoundaryConditions.SinkP Puits_Fumees(P0 = 128837) annotation( Placement(transformation(origin = {182, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 180))); ThermoSysPro.FlueGases.Volumes.VolumeATh dynamicExchanger 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.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases(Q(fixed = false, start = 10), K = 10) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases(Q(fixed = false, start = 10), K = 10, p_rho = 1.5) annotation( Placement(transformation(extent = {{12, 50}, {32, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(fixed = false, start = 11), K = 0.01) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(fixed = false, start = 11), K = 0.01, p_rho = 1.5) 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.FlueGases.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( + ThermoSysPro.FlueGases.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), p_rho = 1.5) annotation( Placement(transformation(extent = {{52, 50}, {72, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases2(Q(fixed = false, start = 10)) annotation( + ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases2(Q(fixed = false, start = 10), p_rho = 1.5) annotation( Placement(transformation(extent = {{92, 50}, {112, 70}}, rotation = 0))); FlueGases.Volumes.VolumeATh dynamicExchanger1 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.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(Q(fixed = false, start = 10), K = 10) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(Q(fixed = false, start = 10), K = 10, p_rho = 1.5) annotation( Placement(transformation(extent = {{12, -70}, {32, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(Q(fixed = false, start = 11), K = 0.01) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(Q(fixed = false, start = 11), K = 0.01, p_rho = 1.5) 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.FlueGases.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( + ThermoSysPro.FlueGases.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), p_rho = 1.5) annotation( Placement(transformation(extent = {{52, -70}, {72, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases5(Q(fixed = false, start = 10)) annotation( + ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases5(Q(fixed = false, start = 10), p_rho = 1.5) annotation( Placement(transformation(extent = {{92, -70}, {112, -50}}, rotation = 0))); ThermoSysPro.FlueGases.Junctions.Mixer2 mixerFlueGases2_1 annotation( Placement(transformation(extent = {{132, -10}, {152, 10}}, rotation = 0))); - ThermoSysPro.FlueGases.Volumes.VolumeDTh volume2S(dynamic_mass_balance = true, dynamic_composition_balance = true) annotation( + ThermoSysPro.FlueGases.Volumes.VolumeDTh volume2S(dynamic_mass_balance = false, dynamic_composition_balance = false) annotation( Placement(transformation(extent = {{-148, -10}, {-128, 10}}, rotation = 0))); ThermoSysPro.FlueGases.Sensors.TemperatureSensor temperatureSensor annotation( Placement(transformation(extent = {{-28, 58}, {-8, 78}}, rotation = 0))); @@ -94,4 +94,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestFan; \ No newline at end of file +end TestFan; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestFan_Pin.mo b/ThermoSysPro/Examples/SimpleExamples/TestFan_Pin.mo index ae95119b..ecfd9106 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestFan_Pin.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestFan_Pin.mo @@ -9,25 +9,25 @@ model TestFan_Pin 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.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases(Q(fixed = false, start = 10), K = 10, rho(start = 1.473613481083164)) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases(Q(fixed = false, start = 10), K = 10, rho(start = 1.473613481083164), p_rho = 1.5) annotation( Placement(transformation(extent = {{12, 50}, {32, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(fixed = false, start = 11), K = 0.01, rho(start = 1.4979229608974243)) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(fixed = false, start = 11), K = 0.01, rho(start = 1.4979229608974243), p_rho = 1.5) annotation( Placement(transformation(extent = {{-108, 50}, {-88, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.Machines.StaticFan staticFan(VRotn = 2700, rm = 1, a2 = 0, b1 = -1.315, b2 = 2.4593, VRot = 2700, a1 = -263.145, a3 = 500, Qv(start = 1.3566066051273442), C2(T(start = 305.11568847661977)), T(start = 305.0163869268126), rho(start = 1.4742671713265922)) annotation( + ThermoSysPro.FlueGases.Machines.StaticFan staticFan(VRotn = 2700, rm = 1, a2 = 0, b1 = -1.315, b2 = 2.4593, VRot = 2700, a1 = -263.145, a3 = 500, Qv(start = 1.3566066051273442), C2(T(start = 305.11568847661977)), T(start = 305.0163869268126), rho(start = 1.4742671713265922), p_rho = 1.5) annotation( Placement(transformation(extent = {{52, 50}, {72, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases2(Q(fixed = false, start = 10), touvert(start = true)) annotation( + ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases2(Q(fixed = false, start = 10), touvert(start = true), p_rho = 1.5) annotation( Placement(transformation(extent = {{92, 50}, {112, 70}}, rotation = 0))); FlueGases.Volumes.VolumeCTh dynamicExchanger1(T(start = 304.91708485822744), Xco2(start = 1.0708121131984948E-29), Xh2o(start = 0.0059999999999999715), Xo2(start = 0.23), Xso2(start = 2.580512329611796E-16)) 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.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(Q(fixed = false, start = 10), K = 10, rho(start = 1.4736134810831638)) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(Q(fixed = false, start = 10), K = 10, rho(start = 1.4736134810831638), p_rho = 1.5) annotation( Placement(transformation(extent = {{12, -70}, {32, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(Q(fixed = false, start = 11), K = 0.01, rho(start = 1.4979229608974243)) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(Q(fixed = false, start = 11), K = 0.01, rho(start = 1.4979229608974243), p_rho = 1.5) annotation( Placement(transformation(extent = {{-108, -70}, {-88, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.Machines.StaticFan staticFan1(VRotn = 2700, rm = 1, b2 = 2.4593, b1 = -1.315, VRot = 2700, a1 = -263.145, a2 = 0, a3 = 500, Qv(start = 1.356606605127344), C2(T(start = 305.1156884766198)), T(start = 305.01638692681263), rho(start = 1.4742671713265918)) annotation( + ThermoSysPro.FlueGases.Machines.StaticFan staticFan1(VRotn = 2700, rm = 1, b2 = 2.4593, b1 = -1.315, VRot = 2700, a1 = -263.145, a2 = 0, a3 = 500, Qv(start = 1.356606605127344), C2(T(start = 305.1156884766198)), T(start = 305.01638692681263), rho(start = 1.4742671713265918), p_rho = 1.5) annotation( Placement(transformation(extent = {{52, -70}, {72, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases5(Q(fixed = false, start = 10), touvert(start = true)) annotation( + ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases5(Q(fixed = false, start = 10), touvert(start = true), p_rho = 1.5) annotation( Placement(transformation(extent = {{92, -70}, {112, -50}}, rotation = 0))); ThermoSysPro.FlueGases.Junctions.Mixer2 mixerFlueGases2_1 annotation( Placement(transformation(extent = {{132, -10}, {152, 10}}, rotation = 0))); @@ -86,4 +86,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestFan_Pin; \ No newline at end of file +end TestFan_Pin; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestFan_Qin.mo b/ThermoSysPro/Examples/SimpleExamples/TestFan_Qin.mo index 91b21655..b658499e 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestFan_Qin.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestFan_Qin.mo @@ -1,39 +1,39 @@ within ThermoSysPro.Examples.SimpleExamples; model TestFan_Qin - ThermoSysPro.FlueGases.BoundaryConditions.SourcePQ Source_Fumees(Xso2 = 0, Xco2 = 0.0, Xh2o = 0.006, Xo2 = 0.23, P0 = 130000, Q0 = 4, T0 = 300) annotation( + ThermoSysPro.FlueGases.BoundaryConditions.SourceQ Source_Fumees(Xso2 = 0, Xco2 = 0.0, Xh2o = 0.006, Xo2 = 0.23, Q0 = 4, T0 = 300) annotation( Placement(transformation(extent = {{-210, -24}, {-164, 24}}, rotation = 0))); - ThermoSysPro.FlueGases.BoundaryConditions.Sink Puits_Fumees annotation( + ThermoSysPro.FlueGases.BoundaryConditions.SinkP Puits_Fumees(P0 = 128837) annotation( Placement(transformation(origin = {182, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 180))); FlueGases.Volumes.VolumeATh dynamicExchanger(T0 = 300, Xh2o0 = 0.006) 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.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases(Q(fixed = false, start = 10), K = 10) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases(Q(fixed = false, start = 10), K = 10, p_rho = 1.5) annotation( Placement(transformation(extent = {{12, 50}, {32, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(fixed = false, start = 11), K = 0.01) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(fixed = false, start = 11), K = 0.01, p_rho = 1.5) annotation( Placement(transformation(extent = {{-108, 50}, {-88, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.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 = 2), rho(start = 1)) annotation( + ThermoSysPro.FlueGases.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 = 2), rho(start = 1), p_rho = 1.5) annotation( Placement(transformation(extent = {{52, 50}, {72, 70}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases2(Q(fixed = false, start = 10)) annotation( + ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases2(Q(fixed = false, start = 10), p_rho = 1.5) annotation( Placement(transformation(extent = {{92, 50}, {112, 70}}, rotation = 0))); FlueGases.Volumes.VolumeCTh dynamicExchanger1(Xh2o0 = 0.006, T0 = 300) 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.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(Q(fixed = false, start = 10), K = 10) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(Q(fixed = false, start = 10), K = 10, p_rho = 1.5) annotation( Placement(transformation(extent = {{12, -70}, {32, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(Q(fixed = false, start = 11), K = 0.01) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(Q(fixed = false, start = 11), K = 0.01, p_rho = 1.5) 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.FlueGases.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 = 2), rho(start = 1)) annotation( + ThermoSysPro.FlueGases.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 = 2), rho(start = 1), p_rho = 1.5) annotation( Placement(transformation(extent = {{52, -70}, {72, -50}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases5(Q(fixed = false, start = 10)) annotation( + ThermoSysPro.FlueGases.PressureLosses.CheckValve singularPressureLossFlueGases5(Q(fixed = false, start = 10), p_rho = 1.5) annotation( Placement(transformation(extent = {{92, -70}, {112, -50}}, rotation = 0))); ThermoSysPro.FlueGases.Junctions.Mixer2 mixerFlueGases2_1 annotation( Placement(transformation(extent = {{132, -10}, {152, 10}}, rotation = 0))); - FlueGases.Volumes.VolumeDTh volume2S(Xh2o0 = 0.006, T0 = 300, dynamic_mass_balance = true, dynamic_composition_balance = true) annotation( + FlueGases.Volumes.VolumeDTh volume2S(Xh2o0 = 0.006, T0 = 300, dynamic_mass_balance = false, dynamic_composition_balance = false) annotation( Placement(transformation(extent = {{-149, -10}, {-129, 10}}, rotation = 0))); ThermoSysPro.FlueGases.Sensors.TemperatureSensor temperatureSensor annotation( Placement(transformation(extent = {{-28, 58}, {-8, 78}}, rotation = 0))); @@ -88,4 +88,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestFan_Qin; \ No newline at end of file +end TestFan_Qin; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestFlueGasesVolumes1.mo b/ThermoSysPro/Examples/SimpleExamples/TestFlueGasesVolumes1.mo index 956f5467..262568c2 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestFlueGasesVolumes1.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestFlueGasesVolumes1.mo @@ -1,7 +1,9 @@ within ThermoSysPro.Examples.SimpleExamples; model TestFlueGasesVolumes1 - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1(Q(start = 8311.592762050328), rho(start = 1.5532126714414567)) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases1( + p_rho(displayUnit="kg/m3") = 1.5, Q(start = 8311.592762050328), + rho(start=1.5532126714415)) annotation( Placement(transformation(extent = {{-60, -60}, {-40, -40}}, rotation = 0))); ThermoSysPro.FlueGases.BoundaryConditions.SourceP sourceFlueGasesP annotation( Placement(transformation(extent = {{-100, -60}, {-80, -40}}, rotation = 0))); @@ -9,21 +11,26 @@ model TestFlueGasesVolumes1 Placement(transformation(extent = {{60, -60}, {80, -40}}, rotation = 0))); ThermoSysPro.FlueGases.Volumes.VolumeATh volumeFlueGasesATh(Ce2(Q(start = 7434.114566895907), T(start = 399.99999999999994), Xco2(start = 0.1), Xo2(start = 0.22), Xso2(start = -2.4077935272517807E-34)), Cs2(Q(start = 7872.8536644731175))) annotation( Placement(transformation(extent = {{-20, -60}, {0, -40}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases2 annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases2(p_rho(displayUnit="kg/m3") = 1.5) + annotation( Placement(transformation(extent = {{20, -60}, {40, -40}}, rotation = 0))); ThermoSysPro.FlueGases.BoundaryConditions.SinkP sinkFlueGasesP1 annotation( Placement(transformation(extent = {{60, -100}, {80, -80}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4 annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases4(p_rho(displayUnit="kg/m3") = 1.5) + annotation( Placement(transformation(extent = {{20, -100}, {40, -80}}, rotation = 0))); ThermoSysPro.FlueGases.Volumes.VolumeCTh volumeFlueGasesCTh(Ce3(Q(start = 3717.0572834479535))) annotation( Placement(transformation(origin = {-10, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 270))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(rho(start = 1.517960245237922)) annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases3(p_rho(displayUnit="kg/m3") = 1.5, rho(start=1.5179602452379)) + annotation( Placement(transformation(origin = {-10, -10}, extent = {{10, -10}, {-10, 10}}, rotation = 90))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases5 annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases5(p_rho(displayUnit="kg/m3") = 1.5) + annotation( Placement(transformation(extent = {{-60, 20}, {-40, 40}}, rotation = 0))); ThermoSysPro.FlueGases.BoundaryConditions.SourceP sourceFlueGasesP1 annotation( Placement(transformation(extent = {{-100, 20}, {-80, 40}}, rotation = 0))); - ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases6 annotation( + ThermoSysPro.FlueGases.PressureLosses.SingularPressureLoss singularPressureLossFlueGases6(p_rho(displayUnit="kg/m3") = 1.5) + annotation( Placement(transformation(extent = {{-60, 60}, {-40, 80}}, rotation = 0))); ThermoSysPro.FlueGases.BoundaryConditions.SourceP sourceFlueGasesP2 annotation( Placement(transformation(extent = {{-100, 60}, {-80, 80}}, rotation = 0))); @@ -60,4 +67,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestFlueGasesVolumes1; \ No newline at end of file +end TestFlueGasesVolumes1; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestGenericCombustion1D.mo b/ThermoSysPro/Examples/SimpleExamples/TestGenericCombustion1D.mo index a09668e7..1462a42b 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestGenericCombustion1D.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestGenericCombustion1D.mo @@ -2,6 +2,7 @@ within ThermoSysPro.Examples.SimpleExamples; model TestGenericCombustion1D parameter Integer NCEL = 7; + parameter Units.SI.AbsolutePressure sinkWaterSteamP0(fixed = false, start = 19621600) "Outlet pressure computed by initialization"; 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))); 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( @@ -12,11 +13,11 @@ model TestGenericCombustion1D Placement(transformation(extent = {{0, 70}, {44, 112}}, rotation = 0))); WaterSteam.BoundaryConditions.SourcePQ SourcePQ_Water(Q0 = 0, P0 = 100000) annotation( Placement(transformation(extent = {{-107, 23}, {-71, 57}}, rotation = 0))); - WaterSteam.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( + WaterSteam.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, Q(start = {486.69, 486.69, 486.69, 486.69, 486.69, 486.69, 486.69, 486.69}), P(start = {20112000, 20050000, 19990000, 19930000, 19870000, 19810000, 19750000, 19690000, 19621600}), h(start = {1292000, 1440000, 1590000, 1740000, 1890000, 2040000, 2190000, 2340000, 2500000})) annotation( Placement(transformation(origin = {91, 8}, extent = {{49, 16}, {-49, -16}}, rotation = 270))); 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))); - WaterSteam.BoundaryConditions.SinkP sinkWaterSteam2(option_temperature = 2, Q(start = 486.69, fixed = true), h0 = 2.5e+06, mode = 0, P0(fixed = false) = 19621600) annotation( + WaterSteam.BoundaryConditions.SinkP sinkWaterSteam2(option_temperature = 2, Q(start = 486.69, fixed = true), h0 = 2.5e+06, mode = 0, P0 = sinkWaterSteamP0) annotation( Placement(transformation(origin = {90, 90.5}, extent = {{14.5, -15}, {-14.5, 15}}, rotation = 270))); WaterSteam.BoundaryConditions.SourceP sourceEcrans(h0 = 1.292e+06, option_temperature = 2, mode = 0, P0 = 20112000) annotation( Placement(transformation(origin = {91, -81}, extent = {{15, -15}, {-15, 15}}, rotation = 270))); @@ -49,4 +50,4 @@ Baligh El Hefni ## ThermoSysPro Version 4.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}})})); -end TestGenericCombustion1D; \ No newline at end of file +end TestGenericCombustion1D; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestJunctions3.mo b/ThermoSysPro/Examples/SimpleExamples/TestJunctions3.mo index dac167c3..f0dfd58e 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestJunctions3.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestJunctions3.mo @@ -5,11 +5,11 @@ model TestJunctions3 Placement(transformation(extent = {{-104, 0}, {-84, 20}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP1(P0 = 2e5, Q(start = 323.48244470861454)) annotation( Placement(transformation(extent = {{-104, -60}, {-84, -40}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve valve1(C1(h_vol(start = 71016.12237181116)), C2(h_vol(start = 70977.89042837733)), Pm(start = 120690.8728732298)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve valve1(continuous_flow_reversal = true, C1(h_vol(start = 71016.12237181116)), C2(h_vol(start = 70977.89042837733)), Pm(start = 120690.8728732298)) annotation( Placement(transformation(extent = {{-10, 6}, {10, 26}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve valve2(C1(h_vol(start = 70921.01678153824)), Pm(start = 118970.64778985853)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve valve2(continuous_flow_reversal = true, C1(h_vol(start = 70921.01678153824)), Pm(start = 118970.64778985853)) annotation( Placement(transformation(extent = {{-10, -54}, {10, -34}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.ControlValve valve3(Q(start = 804.6933031325926), Pm(start = 108776.21727782265)) annotation( + ThermoSysPro.WaterSteam.PressureLosses.ControlValve valve3(continuous_flow_reversal = true, Q(start = 804.6933031325926), Pm(start = 108776.21727782265)) annotation( Placement(transformation(extent = {{50, -24}, {70, -4}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SinkP puitsP2 annotation( Placement(transformation(extent = {{82, -30}, {102, -10}}, rotation = 0))); @@ -19,9 +19,9 @@ model TestJunctions3 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.WaterSteam.PressureLosses.LumpedStraightPipe pipe1 annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe pipe1(continuous_flow_reversal = true) annotation( Placement(transformation(extent = {{-80, 0}, {-60, 20}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe pipe2 annotation( + ThermoSysPro.WaterSteam.PressureLosses.LumpedStraightPipe pipe2(continuous_flow_reversal = true) annotation( Placement(transformation(extent = {{-80, -60}, {-60, -40}}, rotation = 0))); ThermoSysPro.WaterSteam.Junctions.Mixer8 staticVolume annotation( Placement(transformation(extent = {{-40, 0}, {-20, 20}}, rotation = 0))); @@ -64,4 +64,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestJunctions3; \ No newline at end of file +end TestJunctions3; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating0.mo b/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating0.mo index ba4276ed..5f88bc60 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating0.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating0.mo @@ -7,17 +7,17 @@ model TestNTUWaterHeating0 Placement(transformation(extent = {{152, -10}, {172, 10}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 27.e5, h0 = 2.6e6) annotation( Placement(transformation(extent = {{-182, 88}, {-162, 108}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss2(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss2(K = 1e-4, h(start = 872000), C2(Q(start = 1780), P(start = 80e5), h_vol(start = 872000), h(start = 872000))) annotation( Placement(transformation(extent = {{-106, -10}, {-86, 10}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss3(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss3(K = 1e-4, Q(start = 112.2867), h(start = 2600e3)) annotation( Placement(transformation(extent = {{-106, 88}, {-86, 108}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur1 annotation( Placement(transformation(extent = {{152, -106}, {172, -86}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss4(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss4(K = 1e-4, h(start = 980281.1), C1(Q(start = 1780), P(start = 7618062.5), h_vol(start = 980281.1), h(start = 980281.1))) annotation( Placement(transformation(extent = {{92, -10}, {112, 10}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss5(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss5(K = 1e-4, h(start = 883498.1), C1(Q(start = 112.2867), P(start = 27e5), h_vol(start = 883498.1), h(start = 883498.1))) annotation( Placement(transformation(extent = {{34, -106}, {54, -86}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.NTUWaterHeating nTUWaterHeating(lambdaE = 102.5, SCondDes = 6314, KCond = 5024, SPurge = 656, KPurge = 1767, HeiF(start = 900000), HDesF(start = 900000), Hep(start = 500000), Ee(h_vol(start = 880000), Q(start = 1800), h(start = 880000), P(start = 80e5)), Ev(h_vol(start = 3500000), P(start = 27e5)), Ep(Q(start = 10)), Se(P(start = 80e5))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.NTUWaterHeating nTUWaterHeating(lambdaE = 102.5, SCondDes = 6314, KCond = 5024, SPurge = 656, KPurge = 1767, P(start = 27e5), h(start = 883498.1), SDes(start = 1e-9), HeiF(start = 878165.8), HDesF(start = 980281.1), Hep(start = 981240.8), Ee(P(start = 80e5), Q(start = 1780), h(start = 872000), h_vol(start = 872000)), Ev(P(start = 27e5), Q(start = 112.2867), h(start = 2600e3), h_vol(start = 883498.1)), Ep(P(start = 1e5), Q(start = 1e-6), h(start = 100000), h_vol(start = 883498.1)), Se(P(start = 7618062.5), Q(start = 1780), h(start = 980281.1), h_vol(start = 980281.1)), Sp(Q(start = 112.2867), h(start = 883498.1), h_vol(start = 883498.1))) annotation( Placement(transformation(extent = {{-34, -42}, {44, 42}}, rotation = 0))); equation connect(Source_condenseur.C, singularPressureLoss2.C1) annotation( @@ -44,4 +44,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestNTUWaterHeating0; \ No newline at end of file +end TestNTUWaterHeating0; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating1.mo b/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating1.mo index f6d9b02a..1788cb54 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating1.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestNTUWaterHeating1.mo @@ -7,19 +7,19 @@ model TestNTUWaterHeating1 Placement(transformation(extent = {{182, -10}, {202, 10}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourceP sourceP(option_temperature = 2, mode = 0, P0 = 27.0e5, h0 = 2.60e6) annotation( Placement(transformation(extent = {{-201, 90}, {-181, 110}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss2(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss2(K = 1e-4, h(start = 872000), C2(Q(start = 1780), P(start = 80e5), h_vol(start = 872000), h(start = 872000))) annotation( Placement(transformation(extent = {{-101, -10}, {-81, 10}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss3(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss3(K = 1e-4, Q(start = 112.2867), h(start = 2600e3)) annotation( Placement(transformation(extent = {{-100, 90}, {-80, 110}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.Sink Puit_condenseur1 annotation( Placement(transformation(extent = {{178, -100}, {198, -80}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss4(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss4(K = 1e-4, h(start = 980281.1), C1(Q(start = 1780), P(start = 7618062.5), h_vol(start = 980281.1), h(start = 980281.1))) annotation( Placement(transformation(extent = {{142, -10}, {162, 10}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss5(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss5(K = 1e-4, h(start = 883498.1), C1(Q(start = 113.2867), P(start = 27e5), h_vol(start = 883498.1), h(start = 883498.1))) annotation( Placement(transformation(extent = {{140, -100}, {160, -80}}, rotation = 0))); - ThermoSysPro.WaterSteam.HeatExchangers.NTUWaterHeating nTUWaterHeating(lambdaE = 102.5, SCondDes = 6314, KCond = 5024, SPurge = 656, KPurge = 1767, HeiF(start = 900000), HDesF(start = 900000), Hep(start = 500000), Ee(h_vol(start = 880000), Q(start = 1800), h(start = 880000), P(start = 80e5)), Ev(h_vol(start = 3500000), P(start = 27e5)), Ep(Q(start = 10)), Se(P(start = 80e5))) annotation( + ThermoSysPro.WaterSteam.HeatExchangers.NTUWaterHeating nTUWaterHeating(lambdaE = 102.5, SCondDes = 6314, KCond = 5024, SPurge = 656, KPurge = 1767, P(start = 27e5), h(start = 883498.1), SDes(start = 1e-9), HeiF(start = 878165.8), HDesF(start = 980281.1), Hep(start = 981240.8), Ee(P(start = 80e5), Q(start = 1780), h(start = 872000), h_vol(start = 872000)), Ev(P(start = 27e5), Q(start = 112.2867), h(start = 2600e3), h_vol(start = 883498.1)), Ep(P(start = 80e5), Q(start = 1), h(start = 1000e3), h_vol(start = 883498.1)), Se(P(start = 7618062.5), Q(start = 1780), h(start = 980281.1), h_vol(start = 980281.1)), Sp(Q(start = 113.2867), h(start = 883498.1), h_vol(start = 883498.1))) annotation( Placement(transformation(extent = {{-36, -42}, {42, 42}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss1(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss1(K = 1e-4, Q(start = 1), h(start = 1000e3), C2(Q(start = 1), P(start = 80e5), h_vol(start = 1000e3), h(start = 1000e3))) annotation( Placement(transformation(extent = {{-100, 50}, {-80, 70}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.SourcePQ Source_condenseur1(Q0 = 1, h0 = 1000e3, P0 = 80e5) annotation( Placement(transformation(extent = {{-201, 50}, {-181, 70}}, rotation = 0))); @@ -52,4 +52,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestNTUWaterHeating1; \ No newline at end of file +end TestNTUWaterHeating1; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer.mo b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer.mo index 4881d4cd..6adf4e79 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer.mo @@ -1,9 +1,9 @@ within ThermoSysPro.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.WaterSteam.PressureLosses.ControlValve FeedwaterValve(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( + parameter Units.SI.Power Wch(fixed = false, start = 0.29e6) "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed = false, start = 0.01) "OUV feed water valve"; + ThermoSysPro.WaterSteam.PressureLosses.ControlValve FeedwaterValve(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), h(start = 1270e3), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( Placement(transformation(extent = {{-110, 130}, {-90, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.ControlValve SteamValve(Cv(start = 25000), Cvmax(fixed = true) = 5000, Pm(start = 15500000)) annotation( Placement(transformation(extent = {{58, 130}, {78, 150}}, rotation = 0))); @@ -54,4 +54,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestPressurizer; \ No newline at end of file +end TestPressurizer; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer1.mo b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer1.mo index 919dc3b3..10ed31b1 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer1.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer1.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Examples.SimpleExamples; model TestPressurizer1 - 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.WaterSteam.PressureLosses.ControlValve FeedwaterValve(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( + parameter Units.SI.Power Wch(fixed = false, start = 0.29e6) "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed = false, start = 0.01) "OUV feed water valve"; + ThermoSysPro.WaterSteam.PressureLosses.ControlValve FeedwaterValve(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), h(start = 1270e3), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( Placement(transformation(extent = {{-110, 130}, {-90, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.ControlValve SteamValve(Cv(start = 25000), Cvmax(fixed = true) = 5000, Pm(start = 15500000)) annotation( Placement(transformation(extent = {{58, 130}, {78, 150}}, rotation = 0))); @@ -56,4 +56,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestPressurizer1; \ No newline at end of file +end TestPressurizer1; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer2.mo b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer2.mo index a23ca94f..4b6b629b 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer2.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer2.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Examples.SimpleExamples; model TestPressurizer2 - 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.WaterSteam.PressureLosses.ControlValve FeedwaterValve_Spray(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( + parameter Units.SI.Power Wch(fixed = false, start = 0.29e6) "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed = false, start = 0.01) "OUV feed water valve"; + ThermoSysPro.WaterSteam.PressureLosses.ControlValve FeedwaterValve_Spray(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), h(start = 1270e3), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( Placement(transformation(extent = {{-110, 130}, {-90, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.ControlValve SteamValve(Cv(start = 25000), Cvmax(fixed = true) = 5000, Pm(start = 15500000)) annotation( Placement(transformation(extent = {{58, 130}, {78, 150}}, rotation = 0))); @@ -58,4 +58,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestPressurizer2; \ No newline at end of file +end TestPressurizer2; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer_CC.mo b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer_CC.mo index 80228244..6ed776bf 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestPressurizer_CC.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestPressurizer_CC.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Examples.SimpleExamples; model TestPressurizer_CC - 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.WaterSteam.PressureLosses.ControlValve FeedwaterValve_Spray(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( + parameter Units.SI.Power Wch(fixed = false, start = 0.29e6) "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed = false, start = 0.01) "OUV feed water valve"; + ThermoSysPro.WaterSteam.PressureLosses.ControlValve FeedwaterValve_Spray(Cv(start = 100), C1(P(start = 160e5), h_vol(start = 1270e3), Q(start = 0.3), h(start = 1270e3)), h(start = 1270e3), Q(fixed = false, start = 0.32), Cvmax = 5000) annotation( Placement(transformation(extent = {{-110, 130}, {-90, 150}}, rotation = 0))); ThermoSysPro.WaterSteam.PressureLosses.ControlValve SteamValve(Cv(start = 25000), Cvmax(fixed = true) = 5000, Pm(start = 15500000)) annotation( Placement(transformation(extent = {{58, 130}, {78, 150}}, rotation = 0))); @@ -69,4 +69,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestPressurizer_CC; \ No newline at end of file +end TestPressurizer_CC; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestStaticDrum1.mo b/ThermoSysPro/Examples/SimpleExamples/TestStaticDrum1.mo index e3211672..0aecd573 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestStaticDrum1.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestStaticDrum1.mo @@ -1,21 +1,21 @@ within ThermoSysPro.Examples.SimpleExamples; model TestStaticDrum1 - ThermoSysPro.WaterSteam.Junctions.StaticDrum StaticDrumTh1 annotation( + ThermoSysPro.WaterSteam.Junctions.StaticDrum StaticDrumTh1(P(start = 3e5), hl(start = 561000), hv(start = 2725000), Cs_sur(h_vol(start = 2725000)), Cs_purg(h_vol(start = 561000)), Ce_eco(h_vol(start = 561000))) annotation( Placement(transformation(extent = {{-54, 0}, {-34, 20}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossVALI1(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossVALI1(K = 1e-4, Pm(start = 3e5), h(start = 561000), C1(h_vol(start = 561000)), C2(h_vol(start = 561000))) annotation( Placement(transformation(extent = {{0, -10}, {20, 10}}, rotation = 0))); - ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossVALI2(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossVALI2(K = 1e-4, Pm(start = 3e5), h(start = 100000), C1(h_vol(start = 100000)), C2(h_vol(start = 561000))) annotation( Placement(transformation(extent = {{-80, -50}, {-60, -30}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.SinkQ sinkP1(Q0 = 10) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.SinkQ sinkP1(Q0 = 10, h0 = 561000) annotation( Placement(transformation(extent = {{40, -10}, {60, 10}}, rotation = 0))); ThermoSysPro.WaterSteam.Sensors.SensorT sensorT annotation( Placement(transformation(extent = {{10, -82}, {30, -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.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossVALI3(K = 1e-4) annotation( + ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLossVALI3(K = 1e-4, Pm(start = 3e5), h(start = 2725000), C1(h_vol(start = 2725000)), C2(h_vol(start = 2725000))) annotation( Placement(transformation(extent = {{-20, 50}, {0, 70}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.Sink sinkP2 annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.Sink sinkP2(h0 = 2725000) annotation( Placement(transformation(extent = {{60, 50}, {80, 70}}, rotation = 0))); ThermoSysPro.WaterSteam.Sensors.SensorT sensorT1 annotation( Placement(transformation(extent = {{20, 58}, {40, 78}}, rotation = 0))); @@ -23,7 +23,7 @@ model TestStaticDrum1 Placement(transformation(extent = {{-26, -90}, {-6, -70}}, rotation = 0))); ThermoSysPro.WaterSteam.BoundaryConditions.RefQ refQ(Q0 = 100) annotation( Placement(transformation(extent = {{-56, -90}, {-36, -70}}, rotation = 0))); - ThermoSysPro.WaterSteam.BoundaryConditions.PlugA sourcePlug(C(h(fixed = true))) annotation( + ThermoSysPro.WaterSteam.BoundaryConditions.PlugA sourcePlug(h(start = 100000), C(P(start = 3e5), Q(start = 100), h(start = 100000), h_vol(start = 100000))) annotation( Placement(transformation(extent = {{-90, -90}, {-70, -70}}, rotation = 0))); equation connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) annotation( @@ -56,4 +56,4 @@ equation ## Copyright © EDF 2002 - 2026 ## ThermoSysPro Version 4.2 ")); -end TestStaticDrum1; \ No newline at end of file +end TestStaticDrum1; diff --git a/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG.mo b/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG.mo index 15fa6613..16277bff 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG.mo @@ -9,6 +9,8 @@ model TestSteamGenerator_1SG parameter ThermoSysPro.Units.SI.SpecificEnthalpy h_Feedwater=977100 annotation (Dialog(group="Secondary")); parameter ThermoSysPro.Units.SI.MassFlowRate Q_Secondary=520 "Primary side flow rate per SG" annotation (Dialog(group="Secondary")); parameter ThermoSysPro.Units.SI.Pressure P_Secondary=67.3e5 annotation (Dialog(group="Secondary")); + parameter Real singularPressureLoss1K(fixed=false, start=43.9210205078125) + "Steam outlet pressure loss coefficient computed by initialization"; WaterSteam.BoundaryConditions.SinkQ sinkQ(Q0=Q_Prim, h0=1.278e6) annotation (Placement(transformation(extent={{60,-44},{80,-24}}))); WaterSteam.BoundaryConditions.SourceP sourceP( @@ -26,13 +28,13 @@ model TestSteamGenerator_1SG ThermoSysPro.WaterSteam.BoundaryConditions.SinkP sinkP1( h0=2764e3, option_temperature=2, - C(Q(start=531.242), h(start=2776304.4264558135)), + C(Q(start=520.0), h(start=2776304.4264558135)), P0=P_Secondary) annotation (Placement(transformation(extent={{80,50},{100,70}}))); ThermoSysPro.WaterSteam.PressureLosses.SingularPressureLoss singularPressureLoss1( mode=0, h(start=2771976), continuous_flow_reversal=true, - K(fixed=false)) annotation (Placement(transformation( + K=singularPressureLoss1K) annotation (Placement(transformation( origin={50,60}, extent={{10,-10},{-10,10}}, rotation=180))); @@ -50,15 +52,15 @@ model TestSteamGenerator_1SG V_MixARE=22.5, DomeGV( zl(fixed=true, start=1.0), - Cm(Q(start=2378.030864060084), h(start=1472510.1268426012)), - Cs(Q(start=3143.3011114717247), h(start=1252158.8888439273)), - P(start=6706678.9261142), - Pfond(start=6713155.656346), - Tp(start=560.0802438591393), - Wlv(start=-310.37306359773567), + Cm(Q(start=1855.4600830078125), h(start=1472510.1268426012)), + Cs(Q(start=0.0), h(start=1252158.8888439273)), + P(start=7060249.0), + Pfond(start=7067493.0), + Tp(start=559.5510864257812), + Wlv(start=-264.1843566894531), Wpl(start=185.7513849789081), - hl(start=1273354.2607250358), - hv(start=2771053.800535007), + hl(start=1270531.25), + hv(start=2771782.0), lsat( P(start=6706678.926114233), T(start=556.0979754471518), @@ -169,30 +171,33 @@ model TestSteamGenerator_1SG u(start=1205504.3315645182))), MixAlimDomeGV( Cs(Q(start=3674.5431114717244), h(start=1214441.5268755828)), - P(start=6704394.125401053), - h(start=1208572.8409774043)), + P(start=7067077.5), + h(start=1188296.0)), RiserGV( Bo(start={5.264551982702729E-05,4.24124411076559E-05,3.409050891381302E-05,2.7385279816437412E-05,2.2009213639388002E-05}), E(start={1.5087815666722353,1.760919957987664,1.9476847403074915,2.097116088661417,2.2191758439457385}), - P(start={7158690.870465855,7144834.781888093,7136366.14570397, - 7131117.00893035,7126898.042746005,7123142.678317412,7119630.5}), + P(start={7102783.5,7087558.0,7079206.0,7074294.5,7070379.0, + 7066885.0,7063600.0}), Pb(start={6758875.370722485,6744780.661967858,6734858.682936351,6727554.331945282,6721071.1962960195,6714893.297883738,6708825.183275267}), Prl(start={0.8614060609915553,0.8612177743481639,0.8610795419185651,0.8609571209529038,0.860840700352387}), Prv(start={1.558060122469759,1.5573349629944262,1.5568015066398002,1.5563283028859216,1.5558776204321105}), - Q(start={3674.543111473107,3674.54311170587,3674.543111581315,3674.5431115457377,3674.543111529379,3674.5431114738362}), + Q(start={1855.4600830078125,1855.4600830078125,1855.4600830078125, + 1855.4600830078125,1855.4600830078125,1855.4600830078125}), Rel1(start={251532.7450854159,240987.01172095592,232483.9984969632,225629.0583738281,220106.5497190104}), Rel2(start={248927.84623701972,257504.08120653126,257411.52273225,257337.40584396885,257269.3164124718,257203.43335380178}), Rev1(start={126015.47546629705,126045.05144488405,126066.84046334997,155209.85787602403,182019.8146249652}), Rev2(start={1285890.5820611913,1260302.6037093343,1260559.4427392383,1260765.1443104607,1260954.1455479627,1261137.0479626092}), S(start={0.1549634611710962,0.12399319566793483,0.10767347985477606,0.09730316139006305,0.09015797512251608}), + Tp1(start={557.2028774753418,556.9535268626199,556.7596785703945,556.5999062157297,556.4639234387017}), + Tp2(start={558.6506498964086,558.1207245404745,557.6914718731815,557.340405491338,557.0510114671325}), Xtt(start={7.311009664045045,2.8439271576801577,1.897054678974084,1.4856019790614363,1.258516343197067}), cpl(start={5349.469481129635,5347.516592209151,5346.080165928101,5344.806120274413,5343.592832739081}), cpv(start={5227.826905277505,5222.985689734148,5219.424745327635,5216.2663179883575,5213.258487155894}), dpf(start={640.5716824740767,987.6792218283877,1565.132025124198,2033.342774898577,2412.0434228872004,2717.9759070918435}), dpg(start={13454.137072152957,8934.299809678538,5739.21896594421,4449.792874364351,3765.854989394447,3350.1387013794383}), filo(start={1.0,1.5127576625518269,2.397698418903442,3.115489764426855,3.69629921982833,4.165735623228427}), - h(start={1208572.8409774043,1324081.3473187955,1416958.874768356, - 1491838.186092637,1552209.7178096105,1600853.6941739672,1600853.75}), + h(start={1188296.0,1334547.125,1452826.125,1549058.125, + 1627441.625,1691262.625,1691262.625}), hb(start={1214441.5268755823,1289758.2348790504,1350993.226176363,1400513.9851121805,1440421.3369830078,1472510.126842601}), hcl(start={7035.100994857359,6799.356131209278,6607.618400143516,6452.049964861143,6326.112386914556}), hcv(start={566.4591939112424,566.0661558687939,565.7769561570168,667.8050163368257,758.1769879991693}), @@ -355,8 +360,8 @@ model TestSteamGenerator_1SG Tp(start={561.6842105044655,560.5653235354345,559.6636953482239,558.9333813618834,558.339804121777}), Tp2(start={557.2028774753418,556.9535268626199,556.7596785703945,556.5999062157297,556.4639234387017}), dW2(start={-69249119.55796921,-55812352.70606944,-44875175.252391525,-36058712.51509096,-28987599.19303869})), - volumeA(P(start=7203247.961077818), h(start=1208572.8409774043)), - volumeA1(P(start=6708825.183275267), h(start=1600853.6941739672)), + volumeA(P(start=7105471.5), h(start=1188296.0)), + volumeA1(P(start=7063600.0), h(start=1691262.625)), K_riser=0.6, fluidInlet1(h_vol(start=1478000.0)), fluidOutletI1(h_vol(start=1291428.8047443377)), diff --git a/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG_Purge.mo b/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG_Purge.mo index 64dc399e..4ec9506b 100644 --- a/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG_Purge.mo +++ b/ThermoSysPro/Examples/SimpleExamples/TestSteamGenerator_1SG_Purge.mo @@ -1,11 +1,79 @@ within ThermoSysPro.Examples.SimpleExamples; model TestSteamGenerator_1SG_Purge - extends TestSteamGenerator_1SG; + extends TestSteamGenerator_1SG( + singularPressureLoss1K(start=50.28986358642578), + sinkP1(C(Q(start=514.4500122070312))), + steamGenerator( + DomeGV( + Cm(Q(start=1845.9014892578125), h(start=1690211.75)), + Cs(Q(start=0.0)), + P(start=7098894.5), + Pfond(start=7106131.5), + Tp(start=559.9216918945312), + Wlv(start=-269.8937683105469), + hl(start=1272508.375), + hv(start=2771272.75)), + MixAlimDomeGV( + Cs(h(start=1189539.75)), + P(start=7105718.0), + h(start=1189539.75)), + RiserGV( + Tp1(start={563.983154296875,563.29150390625,562.676025390625, + 562.1549072265625,561.7216186523438}), + Tp2(start={570.7962036132812,569.0865478515625,567.487548828125, + 566.1039428710938,564.94091796875}), + P(start={7141604.5,7126388.0,7117948.0,7113000.5,7109066.5, + 7105564.5,7102277.5}), + Q(start={1845.9014892578125,1845.9014892578125, + 1845.9014892578125,1845.9014892578125, + 1845.9014892578125,1845.9014892578125}), + h(start={1189539.75,1335110.375,1452824.125,1548607.25, + 1626646.5,1690211.75,1690211.75}), + hb(start={1189539.75,1335110.375,1452824.125,1548607.25, + 1626646.5,1690211.75})), + DownComerGV(h(start=1189539.75)), + DPSeparateurCyclone(h(start=1690211.75)), + CapteurPAlim(C2(h_vol(start=1189539.75))), + UtubeHotLeg( + P(start={15500000.0,15470475.0,15441021.0,15411611.0,15382225.0, + 15352856.0,15323495.0}), + h(start={1478000.0,1438409.0,1406318.5,1380158.125,1358817.625, + 1341423.5,1341423.5}), + Tp(start={583.4002075195312,578.8013537968291,575.2721921431346, + 572.8978271484375,569.966238010435})), + UtubeColdLeg( + P(start={15323495.0,15322583.0,15321885.0,15321358.0,15320966.0, + 15320682.0,15320682.0}), + h(start={1341423.5,1327272.625,1315905.625,1306704.75,1299234.75, + 1293161.75,1293161.75}), + Tp(start={568.4881591796875,566.5096447049349,565.2562105299215, + 564.2390488335911,563.4150073006446})), + heatExchangerWall(Tp(start={576.9068603515625,574.03955078125, + 571.5252685546875,569.3977661132812,567.6256103515625})), + heatExchangerWall1(Tp(start={566.1672973632812,565.0459594726562, + 564.0961303710938,563.3079223632812,562.658935546875})), + volumeA(P(start=7144266.0), h(start=1189539.75)), + volumeA1(P(start=7102277.5), h(start=1690211.75)), + fluidOutletI_purge(h_vol(start=1189539.75)))); parameter ThermoSysPro.Units.SI.MassFlowRate Q_Purges=5.55 "Purge massflowrate per SG" annotation (Dialog(group="Secondary")); - WaterSteam.BoundaryConditions.SinkQ sinkQ1(Q0=Q_Purges, h0=1.278e6) annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - WaterSteam.Sensors.SensorT SensorT_Tpurge annotation (Placement(transformation( + WaterSteam.BoundaryConditions.SinkQ sinkQ1( + Q0=Q_Purges, + h0=1.278e6, + C(h(start=1278000.0))) annotation (Placement(transformation(extent={{80,-10},{100,10}}))); + WaterSteam.Sensors.SensorT SensorT_Tpurge( + T(start=544.114013671875), + h(start=1189539.75), + C1(h_vol(start=1189539.75)), + C2(h_vol(start=1278000.0)), + pro( + T(start=544.114013671875), + d(start=768.1298828125), + cp(start=5100.14599609375), + s(start=2980.276123046875), + u(start=1180158.125), + x(start=0.0))) annotation (Placement(transformation( origin={58,8}, extent={{-10,-10},{10,10}}, rotation=0)));