Skip to content

Commit 62ed22d

Browse files
edwing-metnabily-metpierre-eliep-methadrienp-metLucileD-met
authored
MML 4 Beta preparation (#537)
* add connectors Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> * Improved icons Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> * Added function to list inputs and outputs Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> * imrpove demo Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> * little adaptations, no sensor name, error if no unit Signed-off-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> * added many connectors Signed-off-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> * finalized metroscopia CCGT Signed-off-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> * moitie * fix reverse ccgt Signed-off-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> * stash * added expression Signed-off-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> * Metroscopia almostfinshed * icons and NPP done * test CCGT et start values * ACC in MML4 (#538) * ACC in MML4 * ACC in MML4 * Add fuel composition on fuel source (#553) * commit * enlever inutile * chromatograph * remove fuel source test * adapted reactor and LiqLiqHX for mml4 (#556) * adapted reactor and LiqLiqHX for mml4 * also added british units to the units choices of control sensors * Update MetroscopeModelingLibrary/WaterSteam/HeatExchangers/LiqLiqHX.mo Co-authored-by: Hadrien <113358529+hadrienp-met@users.noreply.github.com> * Update MetroscopeModelingLibrary/WaterSteam/HeatExchangers/LiqLiqHX.mo Co-authored-by: Hadrien <113358529+hadrienp-met@users.noreply.github.com> --------- Co-authored-by: Hadrien <113358529+hadrienp-met@users.noreply.github.com> * Add connectors for BCs, calibration inputs and observables (#555) * commit * enlever inutile * chromatograph * remove fuel source test * Add BC, input for calibration and observables * Correct connector size --------- Co-authored-by: eguez <edwin.guez@metroscope.tech> Co-authored-by: edwing-met <132678195+edwing-met@users.noreply.github.com> * fuel heater + moist air pressure fix * fuel heater fix * clarify start value allocation in base sensors (#557) * Adapt CCGT Direct model for MML 4 (#554) * ccgt direct model in mml4 * added chromatograph * Add colors to CCGT connectors * Delete constant * Update change log --------- Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> Signed-off-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> Co-authored-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> Co-authored-by: Pierre-Elie Personnaz <pierre-elie.personnaz@metroscope.tech> Co-authored-by: Hadrien <113358529+hadrienp-met@users.noreply.github.com> Co-authored-by: LucileD-met <148056055+LucileD-met@users.noreply.github.com> Co-authored-by: postorino <hadrien.postorino@metroscope.tech>
1 parent c06bdc5 commit 62ed22d

File tree

127 files changed

+9045
-1772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+9045
-1772
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ Use [gitmoji](https://gitmoji.dev/) to identify your changes.
77

88
## [Unreleased]
99

10+
### ✨ Added <!--Make sure to add a link to the PR and issues related to your change-->
11+
12+
### 🐛 Fixed <!--Make sure to add a link to the PR and issues related to your change-->
13+
14+
### 💥 Changed <!--Make sure to add a link to the PR and issues related to your change-->
15+
16+
### 🔥 Removed
17+
18+
19+
## [ MML - v4.0.0-beta]
20+
1021
### ✨ Added <!--Make sure to add a link to the PR and issues related to your change-->
1122
- Added fixed speed pump [#526](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/526)
1223
- (Breaking change) Added opening connector to IGV component [#527](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/527)
24+
- (Breaking change) Added connectors to components for parameters and sensors for inputs and outputs [#537](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/537)
1325

1426
### 🐛 Fixed <!--Make sure to add a link to the PR and issues related to your change-->
1527

MetroscopeModelingLibrary/Examples/CCGT/Evaporator_noRecirculation_direct.mo

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ model Evaporator_noRecirculation_direct
1212
// Parameters
1313
parameter Utilities.Units.Area S=10;
1414
parameter Utilities.Units.HeatExchangeCoefficient Kth=102000;
15-
parameter Utilities.Units.FrictionCoefficient Kfr_hot=0;
16-
parameter Utilities.Units.FrictionCoefficient Kfr_cold=1;
1715

1816
MultiFluid.HeatExchangers.Evaporator evaporator annotation (Placement(transformation(extent={{-38,-36},{40,36}})));
1917
WaterSteam.Volumes.FlashTank flashTank annotation (Placement(transformation(extent={{-26,38},{-46,58}})));
@@ -35,15 +33,13 @@ equation
3533

3634
evaporator.S = S;
3735
evaporator.Kth = Kth;
38-
evaporator.Kfr_hot = Kfr_hot;
39-
evaporator.Kfr_cold = Kfr_cold;
4036

41-
connect(flashTank.C_in, evaporator.C_cold_out) annotation (Line(points={{-26,52},{-10.7,52},{-10.7,25.2}}, color={28,108,200}));
37+
connect(flashTank.C_in, evaporator.C_cold_out) annotation (Line(points={{-26,52},{-14.6,52},{-14.6,28.8}}, color={28,108,200}));
4238
connect(flashTank.C_hot_steam, cold_steam_sink.C_in) annotation (Line(points={{-46,52},{-85,52}}, color={28,108,200}));
4339
connect(flashTank.C_hot_liquid, cold_liquid_sink.C_in) annotation (Line(points={{-46,44},{-76,44},{-76,-52},{-83,-52}}, color={28,108,200}));
44-
connect(evaporator.C_hot_in, hot_source.C_out) annotation (Line(points={{-26.3,-0.72},{-55.65,-0.72},{-55.65,0},{-85,0}}, color={95,95,95}));
45-
connect(evaporator.C_hot_out, hot_sink.C_in) annotation (Line(points={{28.3,-0.72},{45.65,-0.72},{45.65,0},{59,0}}, color={95,95,95}));
46-
connect(evaporator.C_cold_in, cold_source.C_out) annotation (Line(points={{12.7,25.2},{12.7,40},{57,40}}, color={28,108,200}));
40+
connect(evaporator.C_hot_in, hot_source.C_out) annotation (Line(points={{-38,0},{-55.65,0},{-55.65,0},{-85,0}}, color={95,95,95}));
41+
connect(evaporator.C_hot_out, hot_sink.C_in) annotation (Line(points={{40,0},{45.65,0},{45.65,0},{59,0}}, color={95,95,95}));
42+
connect(evaporator.C_cold_in, cold_source.C_out) annotation (Line(points={{16.6,28.8},{16.6,40},{57,40}}, color={28,108,200}));
4743
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
4844
Ellipse(
4945
extent={{-40,76},{-4,40}},

MetroscopeModelingLibrary/Examples/CCGT/MetroscopiaCCGT/MetroscopiaCCGT_direct.mo

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ model MetroscopiaCCGT_direct
77
// Air source
88
input Real P_source_air(start=1) "bar";
99
input Units.MassFlowRate Q_source_air(start=500) "kg/s";
10-
input Real T_source_air(start=24) "degC";
10+
Real T_source_air(start=24) "degC";
1111
input Real Relative_Humidity(start=0.5);
1212
// Fuel source
1313
input Real P_fuel_source(start=30) "bar";
@@ -88,7 +88,7 @@ model MetroscopiaCCGT_direct
8888
// Calibrated parameters (input used for calibration in comment)
8989

9090
// Gas Turbine
91-
parameter Units.FrictionCoefficient Filter_Kfr=0.04432005; // Filter outlet pressure
91+
Units.FrictionCoefficient Filter_Kfr; // Filter outlet pressure
9292
parameter Real compression_rate = 18.88889; // Air compressor outlet pressure
9393
parameter Real compressor_eta_is = 0.878675; // Air compressor outlet temperature
9494
parameter Real turbine_eta_is = 0.8304104; // Gas turbine power output
@@ -130,6 +130,7 @@ model MetroscopiaCCGT_direct
130130
parameter Real pumpRec_CV_Cvmax = 52.329174; // Recirculation control valve opening
131131

132132
MetroscopeModelingLibrary.MultiFluid.HeatExchangers.Economiser economiser(
133+
S=100,
133134
nominal_DT_default=false,
134135
QCp_max_side=Eco_QCp_max_side,
135136
Q_cold_0=56.89394,
@@ -169,6 +170,7 @@ model MetroscopiaCCGT_direct
169170
rotation=180,
170171
origin={56,34})));
171172
MetroscopeModelingLibrary.MultiFluid.HeatExchangers.Evaporator evaporator(
173+
S=100,
172174
x_steam_out(start=1),
173175
faulty=false,
174176
Q_cold_0=47.517586,
@@ -185,6 +187,7 @@ model MetroscopiaCCGT_direct
185187
h_0=2691576)
186188
annotation (Placement(transformation(extent={{-34,28},{-46,40}})));
187189
MetroscopeModelingLibrary.MultiFluid.HeatExchangers.Superheater HPsuperheater1(
190+
S=100,
188191
nominal_DT_default=false,
189192
QCp_max_side="unidentified",
190193
Q_cold_0=47.517586,
@@ -255,6 +258,7 @@ model MetroscopiaCCGT_direct
255258
MetroscopeModelingLibrary.Sensors.Power.PowerSensor W_ST_out_sensor(W_MW(start=64.77))
256259
annotation (Placement(transformation(extent={{90,274},{102,286}})));
257260
MetroscopeModelingLibrary.WaterSteam.HeatExchangers.Condenser condenser(
261+
S=100,
258262
Q_cold_0=2730.2332,
259263
Q_hot_0=49.734425,
260264
Psat_0=4973.1817,
@@ -374,6 +378,7 @@ model MetroscopiaCCGT_direct
374378
T_0=913.15)
375379
annotation (Placement(transformation(extent={{-370,-7},{-358,5}})));
376380
MetroscopeModelingLibrary.MultiFluid.HeatExchangers.Superheater Reheater(
381+
S=100,
377382
nominal_DT_default=false,
378383
QCp_max_side=ReH_QCp_max_side,
379384
Q_cold_0=49.734425,
@@ -566,9 +571,9 @@ model MetroscopiaCCGT_direct
566571
extent={{-5,-5},{5,5}},
567572
rotation=90,
568573
origin={-442,-21})));
569-
MetroscopeModelingLibrary.Power.Machines.Generator GT_generator
574+
MetroscopeModelingLibrary.Power.Machines.Generator GT_generator(eta=0.99)
570575
annotation (Placement(transformation(extent={{-380,50},{-348,70}})));
571-
MetroscopeModelingLibrary.Power.Machines.Generator ST_generator
576+
MetroscopeModelingLibrary.Power.Machines.Generator ST_generator(eta=0.99)
572577
annotation (Placement(transformation(extent={{50,270},{82,290}})));
573578
MetroscopeModelingLibrary.Sensors.FlueGases.TemperatureSensor T_flue_gas_sink_sensor(
574579
Q_0=510.45065,
@@ -589,13 +594,14 @@ model MetroscopiaCCGT_direct
589594
Q_0=500,
590595
T_0=297.149994,
591596
h_0=301935.4)
592-
annotation (Placement(transformation(extent={{-576,-10},{-556,10}})));
597+
annotation (Placement(transformation(extent={{-580,-10},{-560,10}})));
593598
MetroscopeModelingLibrary.Sensors.FlueGases.PressureSensor P_filter_out_sensor(
594599
Q_0=500,
595600
P_0=100000,
596601
h_0=301935.4)
597602
annotation (Placement(transformation(extent={{-548,-6},{-536,6}})));
598603
MetroscopeModelingLibrary.MultiFluid.HeatExchangers.Superheater HPsuperheater2(
604+
S=100,
599605
nominal_DT_default=false,
600606
QCp_max_side=HPSH_QCp_max_side,
601607
Q_cold_0=49.734425,
@@ -667,8 +673,22 @@ model MetroscopiaCCGT_direct
667673
rotation=180,
668674
origin={-90,180})));
669675
Sensors.MoistAir.RelativeHumiditySensor H_sensor(sensor_function="BC") annotation (Placement(transformation(extent={{-694,-6},{-682,6}})));
676+
FlueGases.Pipes.FrictionPipe HRSG_friction annotation (Placement(transformation(extent={{40,10},{60,-10}})));
677+
Utilities.Interfaces.RealInput HRSG_Kfr(start=0.022388678)
678+
annotation (Placement(transformation(
679+
extent={{-4,-4},{4,4}},
680+
rotation=90,
681+
origin={50,-20}), iconTransformation(extent={{-36,-16},{4,24}})));
682+
Utilities.Interfaces.RealExpression AirFilter_Kfr(y=0.04432005 + T_source_air*1e-4) annotation (Placement(transformation(
683+
extent={{-20,-12},{20,12}},
684+
rotation=0,
685+
origin={-570,40})));
670686
equation
687+
T_source_air = 24 + time*10;
671688

689+
690+
Filter_Kfr = 0.04432005 + T_source_air * 1e-4;
691+
//AirFilter.Kfr = Filter_Kfr;
672692
//--- Air / Flue Gas System ---
673693

674694
// Air source
@@ -689,9 +709,7 @@ equation
689709
// Quantities definition
690710
P_filter_out_sensor.P_barA = P_filter_out;
691711
// Calibrated parameters
692-
AirFilter.Kfr = Filter_Kfr;
693-
// Parameters
694-
AirFilter.delta_z = 1;
712+
695713

696714
// Air Compressor
697715
// Quantities definition
@@ -713,58 +731,45 @@ equation
713731
// Calibrated parameters
714732
gasTurbine.tau = turbine_compression_rate;
715733
gasTurbine.eta_is = turbine_eta_is;
716-
// Parameters
717-
gasTurbine.eta_mech = 0.99;
718734

719735
// Generator
720736
// Quantities definition
721737
W_GT_sensor.W_MW = W_GT;
722-
// Parameters
723-
GT_generator.eta = 0.99;
724738

725739
// Flue Gas sink
726740
//Quantities definition
727741
P_flue_gas_sink_sensor.P_barA = P_flue_gas_sink;
728742
T_flue_gas_sink_sensor.T_degC = T_flue_gas_sink;
729743

730-
// --- Water / Steam Circuit
731744

732745
// Economizer
733746
// Quantities definition
734747
T_w_eco_out_sensor.T_degC = T_w_eco_out;
735748
P_w_eco_out_sensor.P_barA = P_w_eco_out;
736749
// Parameters
737-
economiser.S = 100;
738750
economiser.nominal_cold_side_temperature_rise = 235;
739751
economiser.nominal_hot_side_temperature_drop = 150;
740752
T_w_eco_in_sensor.T_degC = T_w_eco_in;
741753
// Calibrated parameters
742754
economiser.Kth = Eco_Kth;
743-
economiser.Kfr_hot = Eco_Kfr_hot;
744755
economiser.Kfr_cold = Eco_Kfr_cold;
745756

746757
// Evaporator
747758
// Quantities definition
748759
P_w_evap_out_sensor.P_barA = P_w_evap_out;
749-
evaporator.x_steam_out = Evap_x_steam_out;
750760
Evap_opening_sensor.Opening = Evap_opening;
751761
// Parameters
752-
evaporator.S = 100;
753-
evaporator.Kfr_hot = 0;
754762
// Calibrated parameters
755-
Evap_controlValve.Cv_max = Evap_CV_Cvmax;
763+
Evap_controlValve.Cv_max = Evap_CV_Cvmax;
756764
evaporator.Kth = Evap_Kth;
757-
evaporator.Kfr_cold = Evap_Kfr_cold;
758765

759766
// HP Superheater 1
760767
// Quantities definition
761768
P_w_HPSH1_out_sensor.P_barA = P_w_HPSH1_out;
762769
T_w_HPSH1_out_sensor.T_degC = T_w_HPSH1_out;
763770
// Parameters
764-
HPsuperheater1.S = 100;
765771
HPsuperheater1.nominal_cold_side_temperature_rise = 250;
766772
HPsuperheater1.nominal_hot_side_temperature_drop = 180;
767-
HPsuperheater1.Kfr_hot = 0;
768773
// Calibrated parameters
769774
HPsuperheater1.Kth = HPSH1_Kth;
770775
HPsuperheater1.Kfr_cold = HPSH1_Kfr_cold;
@@ -773,10 +778,8 @@ equation
773778
// Quantities definition
774779
P_w_HPSH2_out_sensor.P_barA = P_w_HPSH2_out;
775780
// Parameters
776-
HPsuperheater2.S = 100;
777781
HPsuperheater2.nominal_cold_side_temperature_rise = 150;
778782
HPsuperheater2.nominal_hot_side_temperature_drop = 180;
779-
HPsuperheater2.Kfr_hot = 0;
780783
T_w_HPSH2_out_sensor.T_degC = T_w_HPSH2_out;
781784
// Calibrated parameters
782785
HPsuperheater2.Kth = HPSH2_Kth;
@@ -787,17 +790,15 @@ equation
787790
deSH_opening_sensor.Opening = deSH_opening;
788791
Q_deSH_sensor.Q = Q_deSH;
789792
// Calibrated parameters
790-
deSH_controlValve.Cv_max = deSH_CV_Cvmax;
793+
deSH_controlValve.Cv_max = deSH_CV_Cvmax;
791794

792795
// Reheater
793796
// Quantities definition
794797
T_w_ReH_out_sensor.T_degC = T_w_ReH_out;
795798
P_w_ReH_out_sensor.P_barA = P_w_ReH_out;
796799
// Parameters
797-
Reheater.S = 100;
798800
Reheater.nominal_cold_side_temperature_rise = 100;
799801
Reheater.nominal_hot_side_temperature_drop = 180;
800-
Reheater.Kfr_hot = 0;
801802
// Calibrated parameters
802803
Reheater.Kth = ReH_Kth;
803804
Reheater.Kfr_cold = ReH_Kfr_cold;
@@ -807,8 +808,6 @@ equation
807808
// Steam Turbine Generator
808809
// Quantities definition
809810
W_ST_out_sensor.W_MW = W_ST_out;
810-
// Parameters
811-
ST_generator.eta = 0.99;
812811

813812
// High Pressure Level
814813
// Quantities definition
@@ -836,10 +835,7 @@ equation
836835
T_circulating_water_out_sensor.T_degC = T_circulating_water_out;
837836
P_Cond_sensor.P_barA = P_Cond;
838837
// Parameters
839-
condenser.S = 100;
840-
condenser.water_height = 1;
841838
condenser.C_incond = 0;
842-
condenser.P_offset = 0;
843839
condenser.Kfr_cold = 1;
844840
// Calibrated parameters
845841
condenser.Kth = Cond_Kth;
@@ -865,7 +861,7 @@ equation
865861
// Calibrated parameters
866862
pumpRec.hn = pumpRec_hn;
867863
pumpRec.rh = pumpRec_rh;
868-
pumpRec_controlValve.Cv_max = pumpRec_CV_Cvmax;
864+
pumpRec_controlValve.Cv_max = pumpRec_CV_Cvmax;
869865

870866
connect(HPsuperheater1.C_cold_out, T_w_HPSH1_out_sensor.C_in) annotation (
871867
Line(points={{-173.4,15.8},{-172,15.8},{-172,34},{-178,34}},
@@ -912,9 +908,6 @@ equation
912908
color={28,108,200},
913909
pattern=LinePattern.Dash,
914910
thickness=1));
915-
connect(evaporator.C_hot_out, economiser.C_hot_in) annotation (Line(points={{6,-1},{84,-1},{84,-0.25}},
916-
color={95,95,95},
917-
thickness=1));
918911
connect(gasTurbine.C_out, turbine_T_out_sensor.C_in)
919912
annotation (Line(points={{-382,-0.5},{-382,-1},{-370,-1}},
920913
color={95,95,95},
@@ -1050,10 +1043,10 @@ equation
10501043
color={28,108,200},
10511044
thickness=0.5));
10521045
connect(AirFilter.C_out, P_filter_out_sensor.C_in)
1053-
annotation (Line(points={{-556,0},{-548,0}}, color={95,95,95},
1046+
annotation (Line(points={{-560,0},{-548,0}}, color={95,95,95},
10541047
thickness=1));
10551048
connect(Q_source_air_sensor.C_out, AirFilter.C_in)
1056-
annotation (Line(points={{-588,0},{-576,0}}, color={95,95,95},
1049+
annotation (Line(points={{-588,0},{-580,0}}, color={95,95,95},
10571050
thickness=1));
10581051
connect(P_filter_out_sensor.C_out, airCompressor.C_in)
10591052
annotation (Line(points={{-536,0},{-524,0}}, color={95,95,95},
@@ -1133,6 +1126,10 @@ equation
11331126
points={{-694,0},{-703,0}},
11341127
color={85,170,255},
11351128
thickness=1));
1129+
connect(HRSG_friction.Kfr,HRSG_Kfr) annotation (Line(points={{50,-4},{50,-20}}, color={0,0,127}));
1130+
connect(evaporator.C_hot_out, HRSG_friction.C_in) annotation (Line(points={{6,-1},{22,-1},{22,0},{40,0}}, color={95,95,95}));
1131+
connect(HRSG_friction.C_out, economiser.C_hot_in) annotation (Line(points={{60,0},{84,0},{84,-0.25}}, color={95,95,95}));
1132+
connect(AirFilter_Kfr.y, AirFilter.Kfr) annotation (Line(points={{-570,34},{-570,4}}, color={0,0,127}));
11361133
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-720,-120},{260,300}})),
11371134
Diagram(
11381135
coordinateSystem(preserveAspectRatio=false, extent={{-720,-120},{260,300}}),

0 commit comments

Comments
 (0)