diff --git a/.gitignore b/.gitignore index 3f0d8671..e5321807 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ status* *.mof *.c buildlog.txt - +*.bak-mo diff --git a/ThermoSysPro/Fluid/Boilers/BoilerSystem.mo b/ThermoSysPro/Fluid/Boilers/BoilerSystem.mo index 713891a7..6d76624d 100644 --- a/ThermoSysPro/Fluid/Boilers/BoilerSystem.mo +++ b/ThermoSysPro/Fluid/Boilers/BoilerSystem.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.Boilers; model BoilerSystem "Boiler" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FlueGasesFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the flue gases side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Temperature Tsf=423.16 "Flue gases temperature at the outlet"; @@ -19,7 +18,6 @@ model BoilerSystem "Boiler" "Diffusion conductance for the water/steam side (active if diffusion=true in neighbouring volumes)"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ Fuel( Xashes=0.011, @@ -36,6 +34,8 @@ model BoilerSystem "Boiler" annotation (Placement(transformation(extent={{-56,-10},{-36,10}}, rotation= 0))); ThermoSysPro.Fluid.Boilers.FossilFuelBoiler Boiler( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, Qsf(start=45.8744, fixed=false), Pee(fixed=false), Qe(fixed=false, start=6), @@ -59,15 +59,15 @@ model BoilerSystem "Boiler" origin={-10,0}, extent={{20,-20},{-20,20}}, rotation=270))); - Interfaces.Connectors.FluidInlet InletWaterSteam "Water inlet" annotation ( + Interfaces.Connectors.FluidInlet InletWaterSteam(redeclare package Medium = Medium) "Water inlet" annotation ( Placement(transformation(extent={{40,-110},{60,-90}}, rotation=0))); - Interfaces.Connectors.FluidOutlet OutletWaterSteam "Water/steam outlet" + Interfaces.Connectors.FluidOutlet OutletWaterSteam(redeclare package Medium = Medium) "Water/steam outlet" annotation (Placement(transformation(extent={{40,90},{60,110}}, rotation=0))); - Interfaces.Connectors.FluidOutlet OutletFlueGases "Flue gases outlet" + Interfaces.Connectors.FluidOutlet OutletFlueGases(redeclare package Medium = Medium_FlueGases) "Flue gases outlet" annotation (Placement( transformation(extent={{-80,90},{-60,110}}, rotation=0), iconTransformation(extent={{-80,90},{-60,110}}))); - Interfaces.Connectors.FluidInlet InletFlueGases "Flue gases inlet" + Interfaces.Connectors.FluidInlet InletFlueGases(redeclare package Medium = Medium_FlueGases) "Flue gases inlet" annotation (Placement( transformation(extent={{-80,-110},{-60,-90}}, rotation=0))); equation diff --git a/ThermoSysPro/Fluid/Boilers/FossilFuelBoiler.mo b/ThermoSysPro/Fluid/Boilers/FossilFuelBoiler.mo index 7642f228..17959c3d 100644 --- a/ThermoSysPro/Fluid/Boilers/FossilFuelBoiler.mo +++ b/ThermoSysPro/Fluid/Boilers/FossilFuelBoiler.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.Boilers; model FossilFuelBoiler "Fossil fuel boiler" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FlueGasesFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the flue gases side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Temperature Tsf=400 "Flue gases temperature at the outlet"; parameter Integer Boiler_efficiency_type = 1 "1: Taking into account LHV only - 2: Using the total incoming power"; @@ -18,7 +17,6 @@ model FossilFuelBoiler "Fossil fuel boiler" "Diffusion conductance for the water/steam side (active if diffusion=true in neighbouring volumes)"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Real amC=12.01115 "Carbon atomic mass"; @@ -29,7 +27,11 @@ protected constant Real amH2O = 2*amH + amO "H2O molecular mass"; constant Real amSO2 = amS + 2*amO "SO2 molecular mass"; constant Real teps=1e-6 "Small number"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; + parameter Integer iN2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"N2", "Nitrogen", "nitrogen"}) "Index of nitrogen in the flue gases composition"; + parameter Integer iO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"O2", "Oxygen", "oxygen"}) "Index of oxygen in the flue gases composition"; + parameter Integer iH2O=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"H2O", "Water", "water"}) "Index of water vapor in the flue gases composition"; + parameter Integer iCO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"CO2", "Carbondioxide", "Carbon dioxide", "carbondioxide"}) "Index of carbon dioxide in the flue gases composition"; + parameter Integer iSO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium_FlueGases.substanceNames, {"SO2", "Sulfurdioxide", "Sulfur dioxide", "sulfurdioxide"}) "Index of sulfur dioxide in the flue gases composition"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; @@ -98,7 +100,6 @@ public Real exc(start=1) "Air combustion ratio"; Real exc_air(start=0.1) "Pertcentage of air in excess"; - FluidType fluids[2] "Fluids mixing in volume"; Units.SI.SpecificEnthalpy h(start=10e5) "Flue gases specific enthalpy"; Units.SI.Power Jair "Thermal power diffusion from inlet Cair"; Units.SI.Power Jfg "Thermal power diffusion from outlet Cfg"; @@ -107,44 +108,43 @@ public Units.SI.MassFlowRate gamma_fg "Diffusion conductance for outlet Cfg"; Real rair "Value of r(Q/gamma) for inlet Cair"; Real rfg "Value of r(Q/gamma) for outlet Cfg"; - FluidType ftype_ws "Water/steam fluid type"; - Integer fluid_ws=Integer(ftype_ws) "Water/steam fluid number"; + Medium.MassFraction Xws[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Water/steam mass fractions"; + Medium_FlueGases.MassFraction Xea[Medium_FlueGases.nX](start=Medium_FlueGases.X_default) "Air inlet mass fractions"; + Medium_FlueGases.MassFraction Xsf[Medium_FlueGases.nX](start=Medium_FlueGases.X_default) "Flue gases outlet mass fractions"; + Medium.ExtraProperty SubCws[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Water/steam trace substances"; + Medium_FlueGases.ExtraProperty SubCfg[Medium_FlueGases.nC](quantity=Medium_FlueGases.extraPropertiesNames, start=Medium_FlueGases.C_default) "Flue gases trace substances"; + Medium.ThermodynamicState state_ws_m "Water/steam average thermodynamic state"; + Medium.ThermodynamicState state_ws_out "Water/steam outlet thermodynamic state"; + Medium_FlueGases.ThermodynamicState state_air_in "Air inlet thermodynamic state"; + Medium_FlueGases.ThermodynamicState state_fg_comb "Flue gases thermodynamic state after combustion"; + Medium_FlueGases.ThermodynamicState state_fg_out "Flue gases outlet thermodynamic state"; + Medium_FlueGases.ThermodynamicState state_fg_m "Flue gases average thermodynamic state"; public Interfaces.Connectors.FuelInlet Cfuel "Fuel inlet" annotation (Placement(transformation(extent={{-10,-90},{10,-70}}, rotation= 0))); - Interfaces.Connectors.FluidInlet Cair "Air inlet" + Interfaces.Connectors.FluidInlet Cair(redeclare package Medium = Medium_FlueGases) "Air inlet" annotation (Placement(transformation( extent={{-110,-72},{-90,-52}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cfg "Flue gases outlet" + Interfaces.Connectors.FluidOutlet Cfg(redeclare package Medium = Medium_FlueGases) "Flue gases outlet" annotation (Placement(transformation( extent={{90,-72},{110,-52}}, rotation=0))); public - Interfaces.Connectors.FluidInlet Cws1 "Water inlet" + Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium) "Water inlet" annotation (Placement(transformation( extent={{-110,50},{-90,70}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cws2 "Water/steam outlet" + Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium) "Water/steam outlet" annotation (Placement(transformation( extent={{90,50},{110,70}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pros - annotation (Placement(transformation(extent={{-100,84},{-80,104}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prom - annotation (Placement(transformation(extent={{80,84},{100,104}}, rotation=0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Cair.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), "InternalCombustionEngine: fluids mixing in volume are not compatible with each other"); + assert(Medium_FlueGases.nX > 1, "FossilFuelBoiler: Medium_FlueGases must be a gas mixture"); + assert(iN2 > 0 and iO2 > 0 and iH2O > 0 and iCO2 > 0 and iSO2 > 0, "FossilFuelBoiler: Medium_FlueGases.substanceNames must contain nitrogen, oxygen, water, carbon dioxide and sulfur dioxide"); // ---------------- // Water/steam side - assert((ftype_ws == FluidType.WaterSteam) or (ftype_ws == FluidType.WaterSteamSimple), "InternalCombustionEngine: the fluid type for the water/steam side must be water/steam"); - Cws1.Q = Cws2.Q; Cws1.h_vol_1 = Cws2.h_vol_1; @@ -156,14 +156,10 @@ equation Cws2.diff_res_1 = Cws1.diff_res_1 + (if (gamma_diff_ws > 0) then 1/gamma_diff_ws else 0); Cws1.diff_res_2 = Cws2.diff_res_2 + (if (gamma_diff_ws > 0) then 1/gamma_diff_ws else 0); - Cws1.ftype = Cws2.ftype; - - Cws1.Xco2 = Cws2.Xco2; - Cws1.Xh2o = Cws2.Xh2o; - Cws1.Xo2 = Cws2.Xo2; - Cws1.Xso2 = Cws2.Xso2; - - ftype_ws = Cws1.ftype; + Cws1.Xi = Cws2.Xi; + Xws = Cws1.Xi; + Cws1.SubC = Cws2.SubC; + SubCws = Cws1.SubC; Qe = Cws1.Q; @@ -191,10 +187,14 @@ equation Pea = Cair.P; Hea = Cair.h; - XeaCO2 = Cair.Xco2; - XeaH2O = Cair.Xh2o; - XeaO2 = Cair.Xo2; - XeaSO2 = Cair.Xso2; + Xea[1:Medium_FlueGases.nXi] = Cair.Xi; + if Medium_FlueGases.nXi < Medium_FlueGases.nX then + Xea[Medium_FlueGases.nX] = 1 - sum(Cair.Xi); + end if; + XeaCO2 = Xea[iCO2]; + XeaH2O = Xea[iH2O]; + XeaO2 = Xea[iO2]; + XeaSO2 = Xea[iSO2]; /* Flue gases outlet */ Qsf = Cfg.Q; @@ -237,12 +237,14 @@ equation 0 = Qea*XeaO2c - Qcomb*amO*(2*XCcomb/amC + 0.5*XHcomb/amH + 2*XScomb/amS) + Qcomb*XOcomb - Qsf*XsfO2; 0 = Qcomb*XScomb*amSO2/amS + Qea*XeaSO2 - Qsf*XsfSO2; - Cfg.ftype = ftype; - - Cfg.Xco2 = XsfCO2; - Cfg.Xh2o = XsfH2O; - Cfg.Xo2 = XsfO2; - Cfg.Xso2 = XsfSO2; + Xsf[iN2] = 1 - XsfCO2 - XsfH2O - XsfO2 - XsfSO2; + Xsf[iO2] = XsfO2; + Xsf[iH2O] = XsfH2O; + Xsf[iCO2] = XsfCO2; + Xsf[iSO2] = XsfSO2; + Cfg.Xi = Xsf[1:Medium_FlueGases.nXi]; + Qsf*Cfg.SubC = Qea*Cair.SubC; + SubCfg = Cfg.SubC; /* Combustion air ratio */ exc = Qea*(1 - XeaH2O) / ((Qcomb*amO*(2*XCcomb/amC + 0.5*XHcomb/amH + 2*XScomb/amS - XOcomb/amO)) / (XeaO2c/(1 - XeaH2O))); @@ -291,17 +293,20 @@ equation Cfg.diff_on_1 = diffusion; /* Air specific enthalpy at the inlet */ - Hea = ThermoSysPro.Properties.FlueGases.FlueGases_h(Pea, Tea, XeaCO2, XeaH2O, XeaO2c, XeaSO2); + state_air_in = Medium_FlueGases.setState_phX(p=Pea, h=Hea, X=Xea); + Tea = Medium_FlueGases.temperature(state_air_in); /* Flue gases tempretaure after combustion */ - // Changed from FlueGases_T to FlueGases_h to provide a differentiable function - Hf = ThermoSysPro.Properties.FlueGases.FlueGases_h(Pea, Tf, XsfCO2, XsfH2O, XsfO2, XsfSO2); + Hf = Medium_FlueGases.specificEnthalpy_pTX(p=Pea, T=Tf, X=Xsf); + state_fg_comb = Medium_FlueGases.setState_phX(p=Pea, h=Hf, X=Xsf); /* Flue gases specific enthalpy at the outlet */ - Hsf = ThermoSysPro.Properties.FlueGases.FlueGases_h(Psf, Tsf, XsfCO2, XsfH2O, XsfO2, XsfSO2); + Hsf = Medium_FlueGases.specificEnthalpy_pTX(p=Psf, T=Tsf, X=Xsf); + state_fg_out = Medium_FlueGases.setState_phX(p=Psf, h=Hsf, X=Xsf); /* Flue gases density */ - rhof = ThermoSysPro.Properties.FlueGases.FlueGases_rho(Pea, (Tea + Tf)/2, XsfCO2, XsfH2O, XsfO2, XsfSO2); + state_fg_m = Medium_FlueGases.setState_pTX(p=Pea, T=(Tea + Tf)/2, X=Xsf); + rhof = Medium_FlueGases.density(state_fg_m); 0 = if (XeaO2 > teps) then (XeaO2c - XeaO2) else (XeaO2c - teps); @@ -311,11 +316,11 @@ equation Hrfum = 2501.569e3*XsfH2O; /* Water/steam thermodynamic properties */ - prom = ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph((Pee + Pse)/2, (Hee + Hse)/2, mode); - rhoe = prom.d; + state_ws_m = Medium.setState_phX(p=(Pee + Pse)/2, h=(Hee + Hse)/2, X=Xws); + rhoe = Medium.density(state_ws_m); - pros = ThermoSysPro.Properties.WaterSteam.IF97.Water_Ph(Pse, Hse, mode); - Tse = pros.T; + state_ws_out = Medium.setState_phX(p=Pse, h=Hse, X=Xws); + Tse = Medium.temperature(state_ws_out); annotation ( Icon(graphics={ Rectangle( diff --git a/ThermoSysPro/Fluid/BoundaryConditions/AirHumidity.mo b/ThermoSysPro/Fluid/BoundaryConditions/AirHumidity.mo index a90a1049..6da2c852 100644 --- a/ThermoSysPro/Fluid/BoundaryConditions/AirHumidity.mo +++ b/ThermoSysPro/Fluid/BoundaryConditions/AirHumidity.mo @@ -1,19 +1,12 @@ within ThermoSysPro.Fluid.BoundaryConditions; model AirHumidity "Air humidity" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases constrainedby Modelica.Media.Interfaces.PartialMixtureMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real hum0=0.5 "Air humidiy"; parameter Units.SI.Temperature T0=290 "Fixed fluid temperature"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - -protected - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public - FluidType ftype "Fluid type"; - Integer fluid=Integer(ftype) "Fluid number"; Units.SI.AbsolutePressure ppvap0(start=1e4) "Intermediate vapor partial pressure"; Units.SI.Density rho_vap0(start=200) "Intermediate H2O density"; @@ -28,16 +21,13 @@ public Units.SI.AbsolutePressure ppair "Air partial pressure"; Real hum "Air relative humidity"; Real Xo2as(start=0.2) "O2 mass fraction in dry air"; - Real Xco2 "CO2 mass fraction at the outlet"; Real Xh2o "H2O mass fraction at the outlet"; - Real Xo2 "O2 mass fraction at the outlet"; - Real Xso2 "SO2 mas fraction at the outlet"; public ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_pT pro annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= 0))); - Interfaces.Connectors.FluidInlet C1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium=Medium) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.InputReal humidity "Air humidity" @@ -45,12 +35,9 @@ public origin={0,110}, extent={{-10,-10},{10,10}}, rotation=270))); - Interfaces.Connectors.FluidOutlet C2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet C2(redeclare package Medium=Medium) annotation (Placement(transformation( extent={{90,-10},{110,10}}, rotation=0))); equation - /* The fluid type must be flue gases */ - assert(ftype == FluidType.FlueGases, "AirHumidity: the fluid type must be flue gases"); - if (cardinality(humidity) == 0) then humidity.signal = hum0; end if; @@ -70,30 +57,26 @@ equation C2.diff_res_1 = C1.diff_res_1; C1.diff_res_2 = C2.diff_res_2; - C1.ftype = C2.ftype; + C1.SubC = C2.SubC; P = C1.P; Q = C1.Q; h = C1.h; - ftype = C1.ftype; - /* O2 mass fraction at the inlet */ - Xo2as = C1.Xo2; + Xo2as = C1.Xi[Properties.FlueGases.getSubstanceIndex("Oxygen",Medium.substanceNames)]; /* Temperature at the outlet */ - T = ThermoSysPro.Properties.FlueGases.FlueGases_T(P, h, Xco2, Xh2o, Xo2as, Xso2); +// T = ThermoSysPro.Properties.FlueGases.FlueGases_T(P, h, 0, Xh2o, Xo2as, 0); + T = Medium.temperature_phX(P,h, C2.Xi); /* Flue gas composition at the outlet. The sole constituents for air are O2 and N2 */ - Xco2 = 0; - Xso2 = 0; + C2.Xi[Properties.FlueGases.getSubstanceIndex("Sulfurdioxide",Medium.substanceNames)] = 0; + C2.Xi[Properties.FlueGases.getSubstanceIndex("Carbondioxide",Medium.substanceNames)] = 0; Xh2o = rho_vap/(rho_vap + rho_air); - Xo2 = Xo2as*(1 - Xh2o); - - C2.Xco2 = Xco2; - C2.Xso2 = Xso2; - C2.Xh2o = Xh2o; - C2.Xo2 = Xo2; + C2.Xi[Properties.FlueGases.getSubstanceIndex("Water",Medium.substanceNames)] = Xh2o; + C2.Xi[Properties.FlueGases.getSubstanceIndex("Oxygen",Medium.substanceNames)] = Xo2as*(1 - Xh2o); + C2.Xi[Properties.FlueGases.getSubstanceIndex("Nitrogen",Medium.substanceNames)] = 1- Xo2as*(1 - Xh2o) - Xh2o; /* Vapor partial pressure */ ppvap = psvap*hum; @@ -106,14 +89,14 @@ equation psvap = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.psat(T); /* H2O density */ - pro = ThermoSysPro.Properties.WaterSteam.IF97.Water_PT(ppvap, T, mode); + pro = ThermoSysPro.Properties.WaterSteam.IF97.Water_PT(ppvap, T, 0); rho_vap0 = pro.d; 0 = if (ppvap < 0.061080e-4) then rho_vap - (rho_vap0*ppvap/ppvap0) else rho_vap - rho_vap0; /* Air density */ - rho_air = ThermoSysPro.Properties.FlueGases.FlueGases_rho(ppair, T, Xco2, Xh2o, Xo2as, Xso2); + rho_air = ThermoSysPro.Properties.FlueGases.FlueGases_rho(ppair, T, 0, Xh2o, Xo2as, 0); annotation (Diagram(graphics={ Ellipse( diff --git a/ThermoSysPro/Fluid/BoundaryConditions/PlugA.mo b/ThermoSysPro/Fluid/BoundaryConditions/PlugA.mo index ef826aa9..0b3995f0 100644 --- a/ThermoSysPro/Fluid/BoundaryConditions/PlugA.mo +++ b/ThermoSysPro/Fluid/BoundaryConditions/PlugA.mo @@ -1,14 +1,14 @@ within ThermoSysPro.Fluid.BoundaryConditions; model PlugA "Plug" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; + parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog( + tab="Fluid", + group="Medium")); public Units.SI.MassFlowRate Q "Fluid mass flow rate"; @@ -16,7 +16,7 @@ public Units.SI.SpecificEnthalpy h(start=100000) "Fluid specific enthalpy"; - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); equation @@ -27,7 +27,7 @@ equation C.diff_res_1 = 0; C.diff_on_1 = diffusion; - ftype = C.ftype; + C.SubC = SubC0; /* Flow reversal */ if continuous_flow_reversal then diff --git a/ThermoSysPro/Fluid/BoundaryConditions/PlugB.mo b/ThermoSysPro/Fluid/BoundaryConditions/PlugB.mo index d49ca0de..66fd6803 100644 --- a/ThermoSysPro/Fluid/BoundaryConditions/PlugB.mo +++ b/ThermoSysPro/Fluid/BoundaryConditions/PlugB.mo @@ -1,23 +1,17 @@ within ThermoSysPro.Fluid.BoundaryConditions; model PlugB "Plug" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeVariableInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; public Units.SI.MassFlowRate Q "Fluid mass flow rate"; Units.SI.AbsolutePressure P "Fluid pressure"; Units.SI.SpecificEnthalpy h "Fluid specific enthalpy"; - FluidType ftype "Fluid type"; - Real Xco2(start=0.01) "CO2 mass fraction of the fluid crossing the boundary of the control volume"; - Real Xh2o "H2O mass fraction of the fluid crossing the boundary of the control volume"; - Real Xo2(start=0.2) "O2 mass fraction of the fluid crossing the boundary of the control volume"; - Real Xso2(start=0) "SO2 mass fraction of the fluid crossing the boundary of the control volume"; + Medium.MassFraction X[Medium.nXi] "Fluid mass fraction"; + Medium.ExtraProperty SubC[Medium.nC] "Fluid trace substances"; - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); equation @@ -29,12 +23,9 @@ equation C.diff_res_2 = 0; C.diff_on_2 = diffusion; - ftype = C.ftype; + SubC = C.SubC; - Xco2 = C.Xco2; - Xh2o = C.Xh2o; - Xo2 = C.Xo2; - Xso2 = C.Xso2; + X = C.Xi; annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefH.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefH.mo index 9e1a3b52..673561dc 100644 --- a/ThermoSysPro/Fluid/BoundaryConditions/RefH.mo +++ b/ThermoSysPro/Fluid/BoundaryConditions/RefH.mo @@ -1,6 +1,8 @@ within ThermoSysPro.Fluid.BoundaryConditions; model RefH "Fixed specific enthalpy reference" extends ThermoSysPro.Fluid.Interfaces.IconColors; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + parameter Units.SI.SpecificEnthalpy h0=1.e5 "Fixed fluid specific enthalpy"; public @@ -8,9 +10,9 @@ public Units.SI.AbsolutePressure P "Fluid pressure"; Units.SI.SpecificEnthalpy h "Fluid specific enthalpy"; - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.InputReal ISpecificEnthalpy annotation (Placement(transformation( @@ -36,12 +38,9 @@ equation C2.diff_res_1 = C1.diff_res_1; C1.diff_res_2 = C2.diff_res_2; - C1.ftype = C2.ftype; + C1.Xi = C2.Xi; - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; + C1.SubC = C2.SubC; Q = C1.Q; P = C1.P; diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo index 7edad80f..636b8c97 100644 --- a/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo +++ b/ThermoSysPro/Fluid/BoundaryConditions/RefP.mo @@ -1,6 +1,8 @@ within ThermoSysPro.Fluid.BoundaryConditions; model RefP "Fixed pressure reference" extends ThermoSysPro.Fluid.Interfaces.IconColors; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + parameter Units.SI.AbsolutePressure P0=1.e5 "Fixed fluid pressure"; public @@ -8,9 +10,9 @@ public Units.SI.AbsolutePressure P "Fluid pressure"; Units.SI.SpecificEnthalpy h "Fluid specific enthalpy"; - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IPressure annotation (Placement(transformation( @@ -36,12 +38,10 @@ equation C2.diff_res_1 = C1.diff_res_1; C1.diff_res_2 = C2.diff_res_2; - C1.ftype = C2.ftype; - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; + C1.Xi = C2.Xi; + + C1.SubC = C2.SubC; Q = C1.Q; P = C1.P; diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo index aaf16710..24f40bee 100644 --- a/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo +++ b/ThermoSysPro/Fluid/BoundaryConditions/RefQ.mo @@ -1,6 +1,9 @@ within ThermoSysPro.Fluid.BoundaryConditions; model RefQ "Fixed mass flow reference" extends ThermoSysPro.Fluid.Interfaces.IconColors; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + + parameter Units.SI.MassFlowRate Q0=10 "Fixed fluid mass flow"; public @@ -8,9 +11,9 @@ public Units.SI.AbsolutePressure P "Fluid pressure"; Units.SI.SpecificEnthalpy h "Fluid specific enthalpy"; - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.InputReal IMassFlow annotation (Placement(transformation( @@ -36,12 +39,9 @@ equation C2.diff_res_1 = C1.diff_res_1; C1.diff_res_2 = C2.diff_res_2; - C1.ftype = C2.ftype; + C1.Xi = C2.Xi; - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; + C1.SubC = C2.SubC; Q = C1.Q; P = C1.P; diff --git a/ThermoSysPro/Fluid/BoundaryConditions/RefSubC.mo b/ThermoSysPro/Fluid/BoundaryConditions/RefSubC.mo new file mode 100644 index 00000000..fb3d1752 --- /dev/null +++ b/ThermoSysPro/Fluid/BoundaryConditions/RefSubC.mo @@ -0,0 +1,95 @@ +within ThermoSysPro.Fluid.BoundaryConditions; +model RefSubC "Fixed SubC reference" + extends ThermoSysPro.Fluid.Interfaces.IconColors; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + + parameter Medium.ExtraProperty SubC0[Medium.nC](quantity=Medium.extraPropertiesNames) = fill(0,Medium.nC) "Source trace substances" annotation (Evaluate=true, Dialog( + tab="Fluid", + group="Medium")); + + +public + + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement( + transformation(extent={{-110,-10},{-90,10}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement( + transformation(extent={{90,-10},{110,10}}, rotation=0))); + +equation + C1.Q = C2.Q; + C1.P = C2.P; + C1.h = C2.h; + + C1.h_vol_1 = C2.h_vol_1; + C1.h_vol_2 = C2.h_vol_2; + + C2.diff_on_1 = C1.diff_on_1; + C1.diff_on_2 = C2.diff_on_2; + + C2.diff_res_1 = C1.diff_res_1; + C1.diff_res_2 = C2.diff_res_2; + + C1.Xi = C2.Xi; + + C1.SubC = C2.SubC; + C1.SubC = SubC0; + + + annotation ( + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Ellipse( + extent={{-40,40},{40,-40}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Solid, + fillColor={128,255,0}), + Line(points={{0,100},{0,40}}, color={0,0,255}), + Line(points={{20,60},{0,40},{-20,60}}, color={0,0,255}), + Line(points={{-90,0},{-40,0}}, color={0,0,255}), + Line(points={{40,0},{90,0}}, color={0,0,255}), + Text( + extent={{-28,30},{28,-26}}, + lineColor={0,0,255}, + fillColor={128,255,0}, + fillPattern=FillPattern.Solid, + textString= + "C")}), + Icon(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics={ + Line(points={{0,100},{0,40}}, color={0,0,255}), + Line(points={{20,60},{0,40},{-20,60}}, color={0,0,255}), + Line(points={{-90,0},{-40,0}}, color={0,0,255}), + Line(points={{40,0},{90,0}}, color={0,0,255}), + Ellipse( + extent={{-40,40},{40,-40}}, + lineColor= {0,0,255}, + fillPattern=FillPattern.Solid, + fillColor= DynamicSelect({127,255,0}, fill_color_singular)), + Text( + extent={{-28,30},{28,-26}}, + lineColor={0,0,255}, + fillColor={128,255,0}, + fillPattern=FillPattern.Solid, + textString= + "C")}), + Window( + x=0.06, + y=0.08, + width=0.82, + height=0.65), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+", + revisions=" +Authors
+Copyright © EDF 2002 - 2021
+ThermoSysPro Version 4.0
+")); +end TestAirHumidity; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestAirHumidity_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestAirHumidity_Traces.mo new file mode 100644 index 00000000..6f7a9783 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestAirHumidity_Traces.mo @@ -0,0 +1,59 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestAirHumidity_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.AirHumidity airHumidity( + redeclare package Medium = Medium, + hum0=0.9, + T0=293, + ppvap0(start=2085), + rho_air(start=1.14), + rho_vap(start=0.015)) annotation (Placement(transformation(extent={{-10,0},{10,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare package Medium = Medium, + K=1.e-5, + rho(start=1.17)) annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases(redeclare package Medium = Medium, + T0=293, + h0=53484, + option_temperature=true) annotation (Placement(transformation(extent={{80,0},{100,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceFlueGasesPQ( + redeclare package Medium = Medium, + option_temperature=true, + X0={1 - 0.0132625 - 0.217282,0.217282,0.0132625,0,0}, + P0=100000, + T0=293) annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0))); + +equation + connect(airHumidity.C2, singularPressureLoss.C1) annotation (Line(points={{10,10},{40,10}}, color={0,0,0})); + connect(singularPressureLoss.C2, sinkFlueGases.C) annotation (Line(points={{60,10},{80,10}}, color={0,0,0})); + connect(sourceFlueGasesPQ.C, airHumidity.C1) annotation (Line(points={{-60,10},{-10,10}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +Copyright © EDF 2002 - 2021
+ThermoSysPro Version 4.0
+")); +end TestAirHumidity_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH.mo new file mode 100644 index 00000000..860e2926 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH.mo @@ -0,0 +1,63 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefH + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP( + redeclare package Medium = Medium, + P0=2000000) + annotation (Placement(transformation(extent={{-90,-10},{-70,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ( + redeclare package Medium = Medium, + Q0=110) + annotation (Placement(transformation(extent={{92,-10},{112,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{126,-10},{146,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefH refH( + redeclare package Medium = Medium, + h0=2600e3) + annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA( + redeclare package Medium = Medium, + h0=2600e3, + dynamic_energy_balance=false) + annotation (Placement(transformation(extent={{20,-50},{0,-30}}))); + InstrumentationAndControl.Blocks.Sources.Constante enthalpy(k=2600e3) + annotation (Placement(transformation(extent={{-58,38},{-38,58}}))); + InstrumentationAndControl.Blocks.Sources.Constante pressure(k=2000000) + annotation (Placement(transformation(extent={{-110,38},{-90,58}}))); + InstrumentationAndControl.Blocks.Sources.Constante massFlow(k=110) + annotation (Placement(transformation(extent={{2,38},{22,58}}))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{18,-10},{38,10}}, + rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerP loopBreakerP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{46,-10},{66,10}}, + rotation=0))); +equation + connect(refP.C2, refH.C1) + annotation (Line(points={{-70,0},{-40,0}}, color={0,0,0})); + connect(refQ.C2, pipePressureLoss.C1) + annotation (Line(points={{112,0},{126,0}}, + color={0,0,0})); + connect(pipePressureLoss.C2, volumeA.Ce1) + annotation (Line(points={{146,0},{150,0},{150,-40},{20,-40}}, + color={0,0,0})); + connect(volumeA.Cs1, refP.C1) + annotation (Line(points={{0,-40},{-102,-40},{-102,0},{-90,0}}, color={0,0,0})); + connect(enthalpy.y, refH.ISpecificEnthalpy) + annotation (Line(points={{-37,48},{-30,48},{-30,11}}, color={0,0,255})); + connect(pressure.y, refP.IPressure) + annotation (Line(points={{-89,48},{-80,48},{-80,11}}, color={0,0,255})); + connect(massFlow.y, refQ.IMassFlow) + annotation (Line(points={{23,48},{102,48},{102,11}}, + color={0,0,255})); + connect(refH.C2, loopBreakerH.C1) annotation (Line(points={{-20,0},{-10,0}}, color={0,0,0})); + connect(loopBreakerH.C2, loopBreakerQ.C1) annotation (Line(points={{10,0},{18,0}}, color={0,0,0})); + connect(loopBreakerQ.C2, loopBreakerP.C1) annotation (Line(points={{38,0},{46,0}}, color={0,0,0})); + connect(loopBreakerP.C2, refQ.C1) annotation (Line(points={{66,0},{92,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefH; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH_Traces.mo new file mode 100644 index 00000000..cc1aebed --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH_Traces.mo @@ -0,0 +1,17 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefH_Traces + extends TestRefH( + redeclare package Medium = Properties.Media.WaterSteam( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}), + volumeA( + dynamic_energy_balance=true, + dynamic_mass_balance=true, + steady_state=false, + P0=2000000, + h0=2600e3)); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefH_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH_Traces_FlueGases.mo new file mode 100644 index 00000000..72e57825 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefH_Traces_FlueGases.mo @@ -0,0 +1,19 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefH_Traces_FlueGases + extends TestRefH( + redeclare package Medium = ThermoSysPro.Properties.Media.FlueGases( + extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}), + volumeA( + dynamic_energy_balance=true, + dynamic_mass_balance=true, + dynamic_composition_balance=true, + steady_state=true, + P0=2000000, + h0=2600e3, + X0={0.1,0.2,0.3,0.2,0.2})); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefH_Traces_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo new file mode 100644 index 00000000..60f4b2b6 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP.mo @@ -0,0 +1,36 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefP + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = Properties.Media.WaterSteam; + + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = + Medium, h0=633e3) + annotation (Placement(transformation(extent={{66,-10},{86,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package + Medium = Medium, + T0=423.15, + option_temperature=true) + annotation (Placement(transformation(extent={{-66,-10},{-46,10}}))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=20e5) + annotation (Placement(transformation(extent={{-30,38},{-10,58}}))); +equation + connect(sink.C, pipePressureLoss.C2) + annotation (Line(points={{66,0},{52,0}}, color={0,0,0})); + connect(refP.C2, pipePressureLoss.C1) + annotation (Line(points={{10,0},{32,0}}, color={0,0,0})); + connect(sourceQ.C,refP. C1) + annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0})); + + + connect(constante.y, refP.IPressure) + annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefP; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo new file mode 100644 index 00000000..1f0736bb --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces.mo @@ -0,0 +1,34 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefP_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = + Medium, h0=633e3) + annotation (Placement(transformation(extent={{66,-10},{86,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package + Medium = Medium, + T0=423.15, + option_temperature=true, SubC0={10,20,30}) + annotation (Placement(transformation(extent={{-66,-10},{-46,10}}))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=20e5) + annotation (Placement(transformation(extent={{-30,38},{-10,58}}))); +equation + connect(sink.C, pipePressureLoss.C2) + annotation (Line(points={{66,0},{52,0}}, color={0,0,0})); + connect(refP.C2, pipePressureLoss.C1) + annotation (Line(points={{10,0},{32,0}}, color={0,0,0})); + connect(sourceQ.C,refP. C1) + annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0})); + + connect(constante.y, refP.IPressure) + annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefP_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo new file mode 100644 index 00000000..9aea64c1 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefP_Traces_FlueGases.mo @@ -0,0 +1,46 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefP_Traces_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP( + redeclare package Medium = + Medium, + T0=453.15, + h0=633193.1, + option_temperature=true) + annotation (Placement(transformation(extent={{66,-10},{86,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package + Medium = Medium, + Q0=50, + T0=473.15, + h0=633193.1, + option_temperature=true, SubC0={10,20,30}, X0={0.1,0.2,0.3,0.2,0.2}, + T(start=423.15)) + annotation (Placement(transformation(extent={{-66,-10},{-46,10}}))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=20e5) + annotation (Placement(transformation(extent={{-30,38},{-10,58}}))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-38,-10},{-18,10}}))); +equation + connect(sinkP.C, pipePressureLoss.C2) + annotation (Line(points={{66,0},{52,0}}, color={0,0,0})); + connect(refP.C2, pipePressureLoss.C1) + annotation (Line(points={{10,0},{32,0}}, color={0,0,0})); + + connect(constante.y, refP.IPressure) + annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255})); + connect(sourceQ.C, singularPressureLoss.C1) + annotation (Line(points={{-46,0},{-38,0}}, color={0,0,0})); + connect(singularPressureLoss.C2, refP.C1) + annotation (Line(points={{-18,0},{-10,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefP_Traces_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo new file mode 100644 index 00000000..63865b8f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ.mo @@ -0,0 +1,34 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefQ + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{66,-10},{86,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package + Medium = Medium, h0=2600e3, + option_temperature=false) + annotation (Placement(transformation(extent={{-66,-10},{-46,10}}))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=110) + annotation (Placement(transformation(extent={{-30,38},{-10,58}}))); +equation + connect(sink.C, pipePressureLoss.C2) + annotation (Line(points={{66,0},{52,0}}, color={0,0,0})); + connect(refQ.C2, pipePressureLoss.C1) + annotation (Line(points={{10,0},{32,0}}, color={0,0,0})); + connect(sourceP.C,refQ. C1) + annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0})); + connect(constante.y, refQ.IMassFlow) + annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefQ; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo new file mode 100644 index 00000000..4cda43cc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces.mo @@ -0,0 +1,33 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefQ_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{66,-10},{86,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package + Medium = Medium, h0=2600e3,SubC0={10,20,30}, + option_temperature=false) + annotation (Placement(transformation(extent={{-66,-10},{-46,10}}))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=110) + annotation (Placement(transformation(extent={{-30,38},{-10,58}}))); +equation + connect(sink.C, pipePressureLoss.C2) + annotation (Line(points={{66,0},{52,0}}, color={0,0,0})); + connect(refQ.C2, pipePressureLoss.C1) + annotation (Line(points={{10,0},{32,0}}, color={0,0,0})); + connect(sourceP.C,refQ. C1) + annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0})); + connect(constante.y, refQ.IMassFlow) + annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefQ_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo new file mode 100644 index 00000000..3babe41f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefQ_Traces_FlueGases.mo @@ -0,0 +1,34 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefQ_Traces_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = + Medium, h0=2600e3) + annotation (Placement(transformation(extent={{66,-10},{86,10}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{32,-10},{52,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package + Medium = Medium, + P0=2000000, h0=2600e3,SubC0={10,20,30}, X0={0.1,0.2,0.3,0.2,0.2}, + option_temperature=false) + annotation (Placement(transformation(extent={{-66,-10},{-46,10}}))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=110) + annotation (Placement(transformation(extent={{-30,38},{-10,58}}))); +equation + connect(sink.C, pipePressureLoss.C2) + annotation (Line(points={{66,0},{52,0}}, color={0,0,0})); + connect(refQ.C2, pipePressureLoss.C1) + annotation (Line(points={{10,0},{32,0}}, color={0,0,0})); + connect(sourceP.C,refQ. C1) + annotation (Line(points={{-46,0},{-10,0}}, color={0,0,0})); + connect(constante.y, refQ.IMassFlow) + annotation (Line(points={{-9,48},{0,48},{0,11}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestRefQ_Traces_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefSubC_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefSubC_Traces.mo new file mode 100644 index 00000000..a4200c97 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefSubC_Traces.mo @@ -0,0 +1,29 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefSubC_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=2.e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, dynamic_energy_balance=false) annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefSubC refSubC(redeclare package Medium = Medium, SubC0={0.3}) + annotation (Placement(transformation(extent={{90,-30},{70,-10}}))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerSubC loopBreakerSubC(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,-30},{40,-10}}))); +equation + connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); + connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color={0,0,255})); + connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,70},{-60,34},{-80,34},{-80,21}})); + connect(pump.C2, loopBreakerQ.C1) annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); + connect(loopBreakerQ.C2, loopBreakerH.C1) annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); + connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{-100,10},{-90,10}}, color={0,0,0})); + + connect(volumeA.Ce1, loopBreakerSubC.C2) annotation (Line(points={{10,-20},{40,-20}}, color={0,0,0})); + connect(loopBreakerSubC.C1, refSubC.C2) annotation (Line(points={{60,-20},{70,-20}}, color={0,0,0})); + connect(loopBreakerH.C2, refSubC.C1) annotation (Line(points={{50,10},{100,10},{100,-20},{90,-20}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestRefSubC_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo new file mode 100644 index 00000000..b1530cbe --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefT.mo @@ -0,0 +1,24 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefT + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=2.e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, dynamic_energy_balance=false) annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); +equation + connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); + connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color={0,0,255})); + connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,70},{-60,34},{-80,34},{-80,21}})); + connect(pump.C2, loopBreakerQ.C1) annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); + connect(loopBreakerQ.C2, loopBreakerH.C1) annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); + connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{-100,10},{-90,10}}, color={0,0,0})); + + connect(volumeA.Ce1, loopBreakerH.C2) annotation (Line(points={{10,-20},{100,-20},{100,10},{50,10}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestRefT; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefX_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefX_FlueGases.mo new file mode 100644 index 00000000..33881c78 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/TestRefX_FlueGases.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.BoundaryConditions; +model TestRefX_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=2.e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, dynamic_energy_balance=false) annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefXgas refXgas(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{62,0},{82,20}}))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerXgas loopBreakerXgas(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{64,-30},{44,-10}}))); +equation + connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); + connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color={0,0,255})); + connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,70},{-60,34},{-80,34},{-80,21}})); + connect(pump.C2, loopBreakerQ.C1) annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); + connect(loopBreakerQ.C2, loopBreakerH.C1) annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); + connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{-100,10},{-90,10}}, color={0,0,0})); + + connect(refXgas.C1, loopBreakerH.C2) annotation (Line(points={{62,10},{50,10}}, color={0,0,0})); + connect(volumeA.Ce1, loopBreakerXgas.C2) annotation (Line(points={{10,-20},{44,-20}}, color={0,0,0})); + connect(loopBreakerXgas.C1, refXgas.C2) annotation (Line(points={{64,-20},{100,-20},{100,10},{82,10}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestRefX_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo new file mode 100644 index 00000000..2950299c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package BoundaryConditions + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end BoundaryConditions; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order new file mode 100644 index 00000000..1cb5ba44 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/BoundaryConditions/package.order @@ -0,0 +1,14 @@ +TestRefQ +TestRefQ_Traces +TestRefQ_Traces_FlueGases +TestRefH +TestRefH_Traces +TestRefH_Traces_FlueGases +TestRefP +TestRefP_Traces +TestRefP_Traces_FlueGases +TestRefT +TestRefSubC_Traces +TestRefX_FlueGases +TestAirHumidity +TestAirHumidity_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGTCombustionChamber.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGTCombustionChamber.mo new file mode 100644 index 00000000..0a2ca23b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGTCombustionChamber.mo @@ -0,0 +1,49 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Combustion; +model TestGTCombustionChamber + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.Combustion.CombustionChambers.GTCombustionChamber combustionChamber( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases) + annotation (Placement(transformation(extent={{-40,-40},{40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceWaterSteam( + redeclare package Medium = Medium, + Q0=0, + P0=15e5, + h0=300e3) + annotation (Placement(transformation(extent={{-100,50},{-60,90}}, rotation=0))); + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceFuel( + Hum=0, + Xo=0, + Xn=0, + Xs=0, + rho=0.838, + Xc=0.755, + Xh=0.245, + Cp=2255, + T0=410, + Q0=9.30, + LHV=47500e3) + annotation (Placement(transformation(extent={{-100,-90},{-60,-50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( + redeclare package Medium = Medium_FlueGases, + P0=15e5, + Q0=415, + T0=680, + option_temperature=true, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-120,-20},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases( + redeclare package Medium = Medium_FlueGases, + T0=1200, + option_temperature=true) + annotation (Placement(transformation(extent={{80,-20},{120,20}}, rotation=0))); +equation + connect(sourceWaterSteam.C, combustionChamber.Cws) annotation (Line(points={{-60,70},{-24,70},{-24,36}}, color={0,0,255})); + connect(sourceFuel.C, combustionChamber.Cfuel) annotation (Line(points={{-60,-70},{0,-70},{0,-36}}, color={0,0,0})); + connect(sourceAir.C, combustionChamber.Ca) annotation (Line(points={{-80,0},{-36,0}}, color={0,0,0})); + connect(combustionChamber.Cfg, sinkFlueGases.C) annotation (Line(points={{36,0},{80,0}}, color={0,0,0})); + annotation (experiment(StopTime=1)); +end TestGTCombustionChamber; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion.mo new file mode 100644 index 00000000..353493ee --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion.mo @@ -0,0 +1,49 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Combustion; +model TestGenericCombustion + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion combustionChamber( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases) + annotation (Placement(transformation(extent={{-40,-40},{40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceWaterSteam( + redeclare package Medium = Medium, + Q0=0, + P0=15e5, + h0=300e3) + annotation (Placement(transformation(extent={{-120,10},{-80,50}}, rotation=0))); + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceFuel( + Hum=0, + Xo=0, + Xn=0, + Xs=0, + rho=0.838, + Xc=0.755, + Xh=0.245, + Cp=2255, + T0=410, + Q0=9.30, + LHV=47500e3) + annotation (Placement(transformation(extent={{30,-100},{70,-60}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( + redeclare package Medium = Medium_FlueGases, + P0=15e5, + Q0=415, + T0=680, + option_temperature=true, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-40,-100},{0,-60}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases( + redeclare package Medium = Medium_FlueGases, + T0=1200, + option_temperature=true) + annotation (Placement(transformation(extent={{-20,80},{20,120}}, rotation=0))); +equation + connect(sourceWaterSteam.C, combustionChamber.Cws) annotation (Line(points={{-80,30},{-70,30},{-70,4},{-36,4}}, color={0,0,255})); + connect(sourceFuel.C, combustionChamber.Cfuel) annotation (Line(points={{70,-80},{28,-80},{28,-36}}, color={0,0,0})); + connect(sourceAir.C, combustionChamber.Ca) annotation (Line(points={{0,-80},{-12,-80},{-12,-36}}, color={0,0,0})); + connect(combustionChamber.Cfg, sinkFlueGases.C) annotation (Line(points={{-12,36},{-12,100},{-20,100}}, color={0,0,0})); + annotation (experiment(StopTime=1)); +end TestGenericCombustion; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion1D.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion1D.mo new file mode 100644 index 00000000..dab35fd7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion1D.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Combustion; +model TestGenericCombustion1D + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion1D combustionChamber(redeclare package Medium = Medium, redeclare package Medium_FlueGases = Medium_FlueGases, 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(origin = {-4, 10}, extent = {{-40, -40}, {40, 40}}))); + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceFuel(Xn = 0.0208, Xashes = 0.136, Cp = 1200, rho = 1100, LHV = 29245e3, Xc = 0.719, Xh = 0.0414, Xo = 0.086, Xs = 0.0044, Vol = 0.286, Q0 = 57.20, T0 = 358.15, Hum = 0.08) annotation( + Placement(transformation(extent = {{-100, -30}, {-60, 10}}, rotation = 0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir(redeclare package Medium = Medium_FlueGases, Q0 = 609.29, P0 = 191000, T0 = 524.89, option_temperature = true, X0 = {0.76, 0.23, 0.01, 0, 0}) annotation( + Placement(transformation(origin = {-80, -74}, extent = {{-20, -100}, {20, -60}}, rotation = 90))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceWaterSteam(redeclare package Medium = Medium, Q0 = 0, P0 = 100000) annotation( + Placement(transformation(extent = {{-100, 30}, {-60, 70}}, rotation = 0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases(redeclare package Medium = Medium_FlueGases, T0 = 1200, option_temperature = true) annotation( + Placement(transformation(origin = {24, -18}, extent = {{-20, 80}, {20, 120}}))); +equation + connect(sourceFuel.C, combustionChamber.Cfuel) annotation( + Line(points = {{-60, -10}, {-40, -10}})); + connect(sourceAir.C, combustionChamber.Ca) annotation( + Line(points = {{0, -54}, {0, -45}, {-4, -45}, {-4, -26}})); + connect(sourceWaterSteam.C, combustionChamber.Cws) annotation( + Line(points = {{-60, 50}, {-60, 32}, {-40, 32}, {-40, 30}}, color = {0, 0, 255})); + connect(combustionChamber.Cfg, sinkFlueGases.C) annotation( + Line(points = {{-4, 46}, {-4, 63}, {4, 63}, {4, 82}})); + annotation( + experiment(StopTime = 1)); +end TestGenericCombustion1D; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion1DWithPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion1DWithPipe.mo new file mode 100644 index 00000000..80cede49 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGenericCombustion1DWithPipe.mo @@ -0,0 +1,109 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Combustion; +model TestGenericCombustion1DWithPipe + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion1D genericCombustionCCS( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, + NCEL=7, + Qm(fixed=false), + Qsf(fixed=false), + kcham(fixed=true) = 0.1, + Acham=275, + Xbf=0, + ImbCV=0.05, + EPSPAR=0.7, + Kec=8.8, + SM={639.92,198.58,466.48,466.48,466.48,358.56,358.56}, + ImbBF=0.0, + Psf(start=113275)) annotation (Placement(transformation(extent={{-62,-56},{62,72}}, rotation=0))); + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceFuel( + Xn=0.0208, + Xashes=0.136, + Cp=1200, + rho=1100, + LHV=29245e3, + Xc=0.719, + Xh=0.0414, + Xo=0.086, + Xs=0.0044, + Vol=0.286, + Q0=57.20, + T0=358.15, + Hum=0.08) + annotation (Placement(transformation(extent={{-106,-43},{-72,-5}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( + redeclare package Medium = Medium_FlueGases, + Q0=609.29, + P0=191000, + T0=524.89, + option_temperature=true, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-44,-98},{0,-58}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceWaterSteam( + redeclare package Medium = Medium, + Q0=0, + P0=100000) + annotation (Placement(transformation(extent={{-107,23},{-71,57}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases( + redeclare package Medium = Medium_FlueGases, + T0=1200, + option_temperature=true) + annotation (Placement(transformation(extent={{0,70},{44,112}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe pipeWaterSteam( + redeclare package Medium = Medium, + Ns=7, + inertia=false, + dynamic_energy_balance=false, + z2=56, + rugosrel=5e-5, + ntubes=403, + L=58, + D=0.0327, + P(start=fill(2.0e7, 9)), + Q(start=fill(486.69, 8)), + h(start=fill(1.8e6, 9)), + C2(Q(fixed=false, start=486.69), P(fixed=false, start=1.96318e7, displayUnit="Pa")), + dpfCorr=3.5) + annotation (Placement(transformation(origin={91,8}, extent={{49,16},{-49,-16}}, rotation=270))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall wall( + Ns=7, + dynamic_energy_balance=false, + Tp1(start=fill(500, 7)), + Tp2(start=fill(400, 7)), + lambda=40, + steady_state=true, + ntubes=403, + L=58, + D=0.0327, + e=0.001) + annotation (Placement(transformation(origin={73,7.5}, extent={{51.5,-15},{-51.5,15}}, rotation=270))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePipe( + redeclare package Medium = Medium, + h0=1.292e6, + option_temperature=false, + P0=20112000) + annotation (Placement(transformation(origin={91,-81}, extent={{15,-15},{-15,15}}, rotation=270))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPipe( + redeclare package Medium = Medium, + option_temperature=false, + Q(start=486.69, fixed=true), + h0=2.5e6, + P0(fixed=false) = 19621600) + annotation (Placement(transformation(origin={90,90.5}, extent={{14.5,-15},{-14.5,15}}, rotation=270))); +equation + connect(sourceFuel.C, genericCombustionCCS.Cfuel) annotation (Line(points={{-72,-24},{-55.8,-24}}, color={0,0,0})); + connect(genericCombustionCCS.Cfg, sinkFlueGases.C) annotation (Line(points={{0,65.6},{0,91}}, color={0,0,0})); + connect(sourceAir.C, genericCombustionCCS.Ca) annotation (Line(points={{0,-78},{0,-49.6}}, color={0,0,0})); + connect(sourceWaterSteam.C, genericCombustionCCS.Cws) annotation (Line(points={{-71,40},{-55.8,40}}, color={0,0,255})); + connect(genericCombustionCCS.Cth, wall.WT2) annotation (Line(points={{55.8,8},{68,8},{68,7.5},{76,7.5}}, color={191,95,0})); + connect(wall.WT1, pipeWaterSteam.CTh) + annotation (Line(points={{70,7.5},{71,7.5},{71,8},{86.2,8}}, color={191,95,0})); + connect(sourcePipe.C, pipeWaterSteam.C1) + annotation (Line(points={{91,-66},{91,-41}}, color={0,0,255})); + connect(pipeWaterSteam.C2, sinkPipe.C) + annotation (Line(points={{91,57},{91,76},{90,76}}, color={0,0,255})); + annotation (experiment(StopTime=1)); +end TestGenericCombustion1DWithPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGridFurnace.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGridFurnace.mo new file mode 100644 index 00000000..f7dcf2e6 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestGridFurnace.mo @@ -0,0 +1,73 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Combustion; +model TestGridFurnace + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSource( + Xn=0.0208, + Xashes=0.136, + Cp=1200, + rho=1100, + LHV=29245e3, + Xc=0.719, + Xh=0.0414, + Xo=0.086, + Xs=0.0044, + Vol=0.286, + Q0=57.20, + T0=358.15, + Hum=0.08) + annotation (Placement(transformation(extent={{-106,-23},{-72,15}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePrimaryAir( + redeclare package Medium = Medium_FlueGases, + T0=300, + Q0=10, + P0=1.9e5, + option_temperature=true, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-74,-80},{-30,-40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases( + redeclare package Medium = Medium_FlueGases, + T0=1200, + option_temperature=true) + annotation (Placement(transformation(extent={{28,50},{72,92}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceCoolingWater( + redeclare package Medium = Medium, + P0=1.e5, + Q0=1) + annotation (Placement(transformation(extent={{89,13},{53,47}}, rotation=0))); + ThermoSysPro.Fluid.Combustion.CombustionChambers.GridFurnace gridFurnace( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, + Q5eH2O(start=27.562088697651173), + Q5eN2(start=18.629997579210396), + Q5sCO(start=16.083169558220888), + Q5sCO2(start=-23.220946069965017), + Q5sO2(start=-1.7763568394002505E-15), + T2(start=4353.611752483582), + Teap(start=2396.269823464287, displayUnit="degC"), + Teas(start=2396.269823464287, displayUnit="degC"), + Teasm(start=2419.8632089574135, displayUnit="degC"), + Tsf(start=1964.2922985959055), Hsf(start = 4575373),Qeasm(start=14.733687)) + annotation (Placement(transformation(extent={{-40,-40},{40,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSecondaryAir( + redeclare package Medium = Medium_FlueGases, + option_temperature=true, + T0=300, + Q0=10, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-90,4},{-46,44}}, rotation=0))); +equation + connect(fuelSource.C, gridFurnace.Com) + annotation (Line(points={{-72,-4},{-36,-4}}, color={0,0,0})); + connect(gridFurnace.Cfg, sinkFlueGases.C) + annotation (Line(points={{0,36},{0,71},{28,71}}, color={0,0,0})); + connect(sourceCoolingWater.C, gridFurnace.port_eau_refroid) + annotation (Line(points={{53,30},{32,30},{32,12}}, color={0,0,255})); + connect(sourceSecondaryAir.C, gridFurnace.Ca2) + annotation (Line(points={{-46,24},{-20,24}}, color={0,0,0})); + connect(sourcePrimaryAir.C, gridFurnace.Ca1) + annotation (Line(points={{-30,-60},{0,-60},{0,-36}}, color={0,0,0})); + annotation (experiment(StopTime=1)); +end TestGridFurnace; \ No newline at end of file diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestPostCombustionGas.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestPostCombustionGas.mo new file mode 100644 index 00000000..7b9a15fe --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/TestPostCombustionGas.mo @@ -0,0 +1,67 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Combustion; +model TestPostCombustionGas + extends ThermoSysPro.UsersGuide.Icons.Example; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases( + redeclare package Medium = Medium_FlueGases, + T0=1200, + option_temperature=true) + annotation (Placement(transformation(origin={151,-6}, extent={{23,-24},{-23,24}}, rotation=180))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceFlueGases( + redeclare package Medium = Medium_FlueGases, + P0=15e5, + Q0=415, + T0=680, + option_temperature=true, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-174,-30},{-128,18}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceAir( + redeclare package Medium = Medium_FlueGases, + T0=680, + option_temperature=true, + Q0=10, + X0={0.76,0.23,0.01,0,0}) + annotation (Placement(transformation(extent={{-172,68},{-132,108}}, rotation=0))); + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceFuel( + Hum=0, + Xo=0, + Xn=0, + Xs=0, + rho=0.838, + Xc=0.755, + Xh=0.245, + Cp=2255, + T0=410, + Q0=9.30, + LHV=47500e3) + annotation (Placement(transformation(extent={{-107,-109},{-71,-73}}, rotation=0))); + ThermoSysPro.Fluid.Combustion.CombustionChambers.PostCombustionGas postCombustionGas( + redeclare package Medium_FlueGases = Medium_FlueGases, Psf(start = 1.5e6), Tmel(start = 2427.85 + 273.15), h(start = 4026550)) + annotation (Placement(transformation(extent={{-52,-74},{74,50}}))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss airPressureLoss( + redeclare package Medium = Medium_FlueGases) + annotation (Placement(transformation(extent={{-100,78},{-80,98}}))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss inletPressureLoss( + redeclare package Medium = Medium_FlueGases) + annotation (Placement(transformation(extent={{-102,-16},{-82,4}}))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss outletPressureLoss( + redeclare package Medium = Medium_FlueGases) + annotation (Placement(transformation(extent={{90,-16},{110,4}}))); +equation + connect(sourceFuel.C, postCombustionGas.Cfuel) + annotation (Line(points={{-71,-91},{-7.9,-91},{-7.9,-67.8}}, color={0,0,0})); + connect(sourceAir.C, airPressureLoss.C1) + annotation (Line(points={{-132,88},{-100,88}}, color={0,0,0})); + connect(airPressureLoss.C2, postCombustionGas.Ca) + annotation (Line(points={{-80,88},{-20.5,88},{-20.5,43.8}}, color={0,0,0})); + connect(sourceFlueGases.C, inletPressureLoss.C1) + annotation (Line(points={{-128,-6},{-102,-6}}, color={0,0,0})); + connect(inletPressureLoss.C2, postCombustionGas.Cfg1) + annotation (Line(points={{-82,-6},{-64,-6},{-64,-5.8},{-45.7,-5.8}}, color={0,0,0})); + connect(postCombustionGas.Cfg2, outletPressureLoss.C1) + annotation (Line(points={{67.7,-5.8},{79.85,-5.8},{79.85,-6},{90,-6}}, color={0,0,0})); + connect(outletPressureLoss.C2, sinkFlueGases.C) + annotation (Line(points={{110,-6},{128,-6}}, color={0,0,0})); + annotation (experiment(StopTime=1)); +end TestPostCombustionGas; \ No newline at end of file diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo new file mode 100644 index 00000000..38ce2164 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package Combustion + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end Combustion; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.order new file mode 100644 index 00000000..a7bc0903 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Combustion/package.order @@ -0,0 +1,6 @@ +TestGTCombustionChamber +TestGenericCombustion +TestGenericCombustion1D +TestGenericCombustion1DWithPipe +TestPostCombustionGas +TestGridFurnace diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Examples/package.order new file mode 100644 index 00000000..e69de29b diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicCondenser.mo new file mode 100644 index 00000000..3568f0c4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicCondenser.mo @@ -0,0 +1,52 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicCondenser + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + replaceable package Medium_Cooling = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicCondenser condenser( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium_Cooling, + Ns=3, + ntubest=1000, + ntubesV=50, + C1vap(P(start=66004), h_vol_2(start=353999)), + C2vap(P(start=66004), h_vol_2(start=353999)), + C1(P(start=66004)), + C2ex(P(start=47631), h(start=370191)), + DynamicCondenser( + P(start=66004), + Pfond(start=47631), + hv(start=353999), + hl(start=370191), + Tp(start=357.683), + Tp1(start={351.781,354.987,356.535}), + CvBP(P(start=66004), h_vol_2(start=353999)), + CvGCT(P(start=66004), h_vol_2(start=353999)), + Cl(P(start=47631))), + Wall_3(Tp2(start={351.781,354.987,356.535})), + pipe_3( + P(start={107635,105730,103825,101915,100000}), + mu2(start=fill(9.14034e-4, 4)), + rho2(start=fill(997.34, 4))), + sortieReelle(signal(start=-97.6173)), + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ vaporSource(redeclare package Medium = Medium, Q0=10, h0=2.7e6, option_temperature=false, C(P(start=66004), h_vol_2(start=353999))) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ extraVaporSource(redeclare package Medium = Medium, Q0=1e-4, h0=2.7e6, option_temperature=false, C(P(start=66004), h_vol_2(start=353999))) annotation (Placement(transformation(extent={{-70,50},{-50,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ extraWaterSource(redeclare package Medium = Medium, Q0=1e-4, h0=1e5, option_temperature=false, C(P(start=66004))) annotation (Placement(transformation(extent={{-70,20},{-50,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ condensateSink(redeclare package Medium = Medium, Q0=10.0002, h0=1e5, option_temperature=false, C(P(start=47631), h(start=370191))) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ coolingSource(redeclare package Medium = Medium_Cooling, Q0=100, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,-20},{-50,0}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP coolingSink(redeclare package Medium = Medium_Cooling, P0=100000, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{50,-20},{70,0}}))); +equation + connect(vaporSource.C, condenser.C1vap) annotation (Line(points={{10,60},{0,60},{0,10}}, color={0,0,255})); + connect(extraVaporSource.C, condenser.C2vap) annotation (Line(points={{-50,60},{-3.9,60},{-3.9,9.2}}, color={0,0,255})); + connect(extraWaterSource.C, condenser.C1) annotation (Line(points={{-50,30},{-8.1,30},{-8.1,7.5}}, color={0,0,255})); + connect(condenser.C2ex, condensateSink.C) annotation (Line(points={{0,-10},{0,-36},{0,-60},{-10,-60}}, + color={0,0,255})); + connect(coolingSource.C, condenser.Ce1) annotation (Line(points={{-50,-10},{-10,-10},{-10,-0.1}}, color={0,0,255})); + connect(condenser.Ce2, coolingSink.C) annotation (Line(points={{9.9,-0.1},{30,-0.1},{30,-10},{50,-10}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicCondenser_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicCondenser_Traces.mo new file mode 100644 index 00000000..0a600512 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicCondenser_Traces.mo @@ -0,0 +1,7 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicCondenser_Traces + extends TestDynamicCondenser( + redeclare package Medium = Properties.Media.WaterSteam, + redeclare package Medium_Cooling = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + coolingSource(SubC0={10})); +end TestDynamicCondenser_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicFlueGasesMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicFlueGasesMultiFluidHeatExchanger.mo new file mode 100644 index 00000000..4345686d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicFlueGasesMultiFluidHeatExchanger.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicFlueGasesMultiFluidHeatExchanger + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = Properties.Media.FlueGases; + + ThermoSysPro.Fluid.HeatExchangers.DynamicFlueGasesMultiFluidHeatExchanger exchanger( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, + h0=fill(1.2e6, 1), + option_temperature=false, + ExchangerFlueGasesMetal(h(start=fill(3e6, 3)), hb(start=fill(3e6, 2))), + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceFg(redeclare package Medium = Medium_FlueGases, Q0=10, h0=3e6, option_temperature=false, X0={0.1,0.2,0.3,0.2,0.2}, C(h(start=3e6), h_vol_1(start=3e6))) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkFg(redeclare package Medium = Medium_FlueGases, P0=100000, h0=3e6, option_temperature=false, C(h(start=3e6), h_vol_2(start=3e6))) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceWs(redeclare package Medium = Medium, P0=300000, h0=1.2e6, option_temperature=false) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWs(redeclare package Medium = Medium, P0=100000, h0=1.2e6, option_temperature=false) annotation (Placement(transformation(extent={{50,-10},{70,10}}))); +equation + connect(sourceFg.C, exchanger.Cfg1) annotation (Line(points={{10,60},{20,60},{20,5},{0,5}}, color={0,0,255})); + connect(exchanger.Cfg2, sinkFg.C) annotation (Line(points={{0,-5},{0,-50}}, color={0,0,255})); + connect(sourceWs.C, exchanger.Cws1) annotation (Line(points={{-50,0},{-10,0}}, color={0,0,255})); + connect(exchanger.Cws2, sinkWs.C) annotation (Line(points={{10,0},{50,0}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicFlueGasesMultiFluidHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicFlueGasesMultiFluidHeatExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicFlueGasesMultiFluidHeatExchanger_Traces.mo new file mode 100644 index 00000000..39a421d8 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicFlueGasesMultiFluidHeatExchanger_Traces.mo @@ -0,0 +1,8 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicFlueGasesMultiFluidHeatExchanger_Traces + extends TestDynamicFlueGasesMultiFluidHeatExchanger( + redeclare package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + redeclare package Medium_FlueGases = Properties.Media.FlueGases(extraPropertiesNames={"Trace1"}, C_nominal={0.1}, C_default={0.2}), + sourceFg(SubC0={30}), + sourceWs(SubC0={10})); +end TestDynamicFlueGasesMultiFluidHeatExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger.mo new file mode 100644 index 00000000..d0b36344 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger.mo @@ -0,0 +1,24 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicMultiFluidHeatExchanger + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_1 = Properties.Media.WaterSteam; + replaceable package Medium_2 = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicMultiFluidHeatExchanger exchanger( + redeclare package Medium_1 = Medium_1, + redeclare package Medium_2 = Medium_2, + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP source1(redeclare package Medium = Medium_1, P0=300000, h0=280000, option_temperature=false) annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sink1(redeclare package Medium = Medium_1, P0=100000, h0=280000, option_temperature=false) annotation (Placement(transformation(extent={{50,-30},{70,-10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP source2(redeclare package Medium = Medium_2, P0=300000, h0=320000, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sink2(redeclare package Medium = Medium_2, P0=100000, h0=310000, option_temperature=false) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); +equation + connect(source1.C, exchanger.Cws1) annotation (Line(points={{-50,-20},{-30,-20},{-30,0},{-10,0}}, color={0,0,255})); + connect(exchanger.Cws2, sink1.C) annotation (Line(points={{10,0},{30,0},{30,-20},{50,-20}}, color={0,0,255})); + connect(source2.C, exchanger.Cfg1) annotation (Line(points={{10,60},{20,60},{20,5},{0,5}}, color={0,0,255})); + connect(exchanger.Cfg2, sink2.C) annotation (Line(points={{0,-5},{0,-50}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicMultiFluidHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell.mo new file mode 100644 index 00000000..7699ef1f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicMultiFluidHeatExchangerShell + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_shell = Properties.Media.WaterSteam; + replaceable package Medium_pipe = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicMultiFluidHeatExchangerShell exchanger( + redeclare package Medium_shell = Medium_shell, + redeclare package Medium_pipe = Medium_pipe, + Dint=0.016, + Dext=0.019, + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePipe(redeclare package Medium = Medium_pipe, P0=300000, h0=280000, option_temperature=false) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPipe(redeclare package Medium = Medium_pipe, P0=100000, h0=280000, option_temperature=false) annotation (Placement(transformation(extent={{50,-10},{70,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceShell(redeclare package Medium = Medium_shell, P0=300000, h0=320000, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkShell(redeclare package Medium = Medium_shell, P0=100000, h0=310000, option_temperature=false) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); +equation + connect(sourcePipe.C, exchanger.Cws1) annotation (Line(points={{-50,0},{-10,0}}, color={0,0,255})); + connect(exchanger.Cws2, sinkPipe.C) annotation (Line(points={{10,0},{50,0}}, color={0,0,255})); + connect(sourceShell.C, exchanger.Cfg1) annotation (Line(points={{10,60},{20,60},{20,5},{0,5}}, color={0,0,255})); + connect(exchanger.Cfg2, sinkShell.C) annotation (Line(points={{0,-5},{0,-32},{0,-60},{-10,-60}}, + color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicMultiFluidHeatExchangerShell; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell_FlueGases.mo new file mode 100644 index 00000000..7df2c666 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell_FlueGases.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicMultiFluidHeatExchangerShell_FlueGases + extends TestDynamicMultiFluidHeatExchangerShell( + redeclare package Medium_shell = Properties.Media.FlueGases, + redeclare package Medium_pipe = Properties.Media.FlueGases, + exchanger( + P0=450000, + h0=fill(3e6, 1), + option_temperature=false, + dynamicOnePhaseFlowShell(h(start=fill(3e6, 3)), hb(start=fill(3e6, 2))), + DynamicOnePhaseFlowPipe(h(start=fill(3e6, 3)), hb(start=fill(3e6, 2)))), + sourceShell(P0=450000, h0=3e6, option_temperature=false, X0={0.1,0.2,0.3,0.2,0.2}, C(h(start=3e6), h_vol_1(start=3e6))), + sinkShell(P0=100000, h0=3e6, option_temperature=false, C(h(start=3e6), h_vol_2(start=3e6))), + sourcePipe(P0=450000, h0=3e6, option_temperature=false, X0={0.1,0.2,0.3,0.2,0.2}, C(h(start=3e6), h_vol_1(start=3e6))), + sinkPipe(P0=100000, h0=3e6, option_temperature=false, C(h(start=3e6), h_vol_2(start=3e6)))); +end TestDynamicMultiFluidHeatExchangerShell_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell_Traces.mo new file mode 100644 index 00000000..0f698216 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchangerShell_Traces.mo @@ -0,0 +1,8 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicMultiFluidHeatExchangerShell_Traces + extends TestDynamicMultiFluidHeatExchangerShell( + redeclare package Medium_shell = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + redeclare package Medium_pipe = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + sourcePipe(SubC0={10}), + sourceShell(SubC0={20})); +end TestDynamicMultiFluidHeatExchangerShell_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger_FlueGases.mo new file mode 100644 index 00000000..a794ed00 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger_FlueGases.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicMultiFluidHeatExchanger_FlueGases + extends TestDynamicMultiFluidHeatExchanger( + redeclare package Medium_1 = Properties.Media.FlueGases, + redeclare package Medium_2 = Properties.Media.FlueGases, + exchanger( + P0=450000, + h0=fill(3e6, 1), + option_temperature=false, + DynamicOnePhaseFlowPipe_1(h(start=fill(3e6, 3)), hb(start=fill(3e6, 2))), + DynamicOnePhaseFlowPipe_2(h(start=fill(3e6, 3)), hb(start=fill(3e6, 2)))), + source1(P0=450000, h0=3e6, option_temperature=false, X0={0.1,0.2,0.3,0.2,0.2}, C(h(start=3e6), h_vol_1(start=3e6))), + sink1(P0=100000, h0=3e6, option_temperature=false, C(h(start=3e6), h_vol_2(start=3e6))), + source2(P0=450000, h0=3e6, option_temperature=false, X0={0.1,0.2,0.3,0.2,0.2}, C(h(start=3e6), h_vol_1(start=3e6))), + sink2(P0=100000, h0=3e6, option_temperature=false, C(h(start=3e6), h_vol_2(start=3e6)))); +end TestDynamicMultiFluidHeatExchanger_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger_Traces.mo new file mode 100644 index 00000000..268cc90a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicMultiFluidHeatExchanger_Traces.mo @@ -0,0 +1,8 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicMultiFluidHeatExchanger_Traces + extends TestDynamicMultiFluidHeatExchanger( + redeclare package Medium_1 = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + redeclare package Medium_2 = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + source1(SubC0={10}), + source2(SubC0={20})); +end TestDynamicMultiFluidHeatExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe.mo new file mode 100644 index 00000000..d682e934 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicOnePhaseFlowPipe + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe dynamicOnePhaseFlowPipe( + redeclare package Medium = Medium, + Q(start={536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207}), + h(start={71016.12237181116,74743.46665892199,78470.81094603281,82198.15523314364,85925.49952025448,89652.84380736532,93380.18809447614,97107.53238158698,100834.8766686978,104562.22095580865,108289.56524291947,70825.9016030344}), + P(start={300000,281833.41863537,263664.30473175,245492.47958308,227317.76827098,209139.99948382,190959.00534677,172774.621262,154586.68575823,136395.04034906,118199.5293995,100000})) annotation (Placement(transformation(extent={{-10,-10},{10,10}},rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}},rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}},rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, + option_temperature=2, + W0={2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6}) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10) annotation (Placement(transformation(extent={{-10,10},{10,30}},rotation=0))); +equation + connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,30.2},{0,22}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh) annotation (Line(points={{0,18},{0,3}}, color={191,95,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicOnePhaseFlowPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe_FlueGases.mo new file mode 100644 index 00000000..29f0ce1b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe_FlueGases.mo @@ -0,0 +1,42 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicOnePhaseFlowPipe_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases ( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe dynamicOnePhaseFlowPipe( + redeclare package Medium = Medium, + Ns=1, + Q(start=fill(36, dynamicOnePhaseFlowPipe.Ns + 1)), + h(start={3077096.0822837264,3135044.986588299,3077096.0822837264}), + P(start=linspace( + 45, + 44.5, + dynamicOnePhaseFlowPipe.Ns + 2))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + P0=4500000, + T0=573.15, + X0={0,0,1,0,0}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium, + P0=4450000, + T0=573.15) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0=fill(726.855, dynamicOnePhaseFlowPipe.Ns), + option_temperature=2, + W0=fill(2e6/dynamicOnePhaseFlowPipe.Ns, dynamicOnePhaseFlowPipe.Ns)) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=dynamicOnePhaseFlowPipe.Ns) annotation (Placement(transformation(extent={{-10,10},{10,30}}, rotation=0))); +equation + connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,30.2},{0,22}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh) annotation (Line(points={{0,18},{0,3}}, color={191,95,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicOnePhaseFlowPipe_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe_Traces.mo new file mode 100644 index 00000000..84ca3da5 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowPipe_Traces.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicOnePhaseFlowPipe_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe dynamicOnePhaseFlowPipe( + redeclare package Medium = Medium, + Q(start={536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207}), + h(start={71016.12237181116,74743.46665892199,78470.81094603281,82198.15523314364,85925.49952025448,89652.84380736532,93380.18809447614,97107.53238158698,100834.8766686978,104562.22095580865,108289.56524291947,70825.9016030344}), + P(start={300000,281833.41863537,263664.30473175,245492.47958308,227317.76827098,209139.99948382,190959.00534677,172774.621262,154586.68575823,136395.04034906,118199.5293995,100000})) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium, SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, + option_temperature=2, + W0={2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6}) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10) annotation (Placement(transformation(extent={{-10,10},{10,30}}, rotation=0))); +equation + connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,30.2},{0,22}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh) annotation (Line(points={{0,18},{0,3}}, color={191,95,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicOnePhaseFlowPipe_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell.mo new file mode 100644 index 00000000..0c70d9a9 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicOnePhaseFlowShell + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowShell dynamicOnePhaseFlowShell( + redeclare package Medium = Medium, + Q(start={536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207}), + h(start={71016.12237181116,74743.46665892199,78470.81094603281,82198.15523314364,85925.49952025448,89652.84380736532,93380.18809447614,97107.53238158698,100834.8766686978,104562.22095580865,108289.56524291947,70825.9016030344}), + P(start={300000,281833.41863537,263664.30473175,245492.47958308,227317.76827098,209139.99948382,190959.00534677,172774.621262,154586.68575823,136395.04034906,118199.5293995,100000})) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, + option_temperature=2, + W0={2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6}) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10) annotation (Placement(transformation(extent={{-10,10},{10,30}}, rotation=0))); +equation + connect(sourceP.C, dynamicOnePhaseFlowShell.C1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(dynamicOnePhaseFlowShell.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,30.2},{0,22}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicOnePhaseFlowShell.CTh) annotation (Line(points={{0,18},{0,3}}, color={191,95,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicOnePhaseFlowShell; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell_FlueGases.mo new file mode 100644 index 00000000..7bcd5cfc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell_FlueGases.mo @@ -0,0 +1,42 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicOnePhaseFlowShell_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowShell dynamicOnePhaseFlowShell( + redeclare package Medium = Medium, + Ns=1, + Q(start=fill(36, dynamicOnePhaseFlowShell.Ns + 1)), + h(start={3077096.0822837264,3135044.986588299,3077096.0822837264}), + P(start=linspace( + 45, + 44.5, + dynamicOnePhaseFlowShell.Ns + 2))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + P0=4500000, + T0=573.15, + X0={0,0,1,0,0}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium, + P0=4450000, + T0=573.15) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0=fill(726.855, dynamicOnePhaseFlowShell.Ns), + option_temperature=2, + W0=fill(2e6/dynamicOnePhaseFlowShell.Ns, dynamicOnePhaseFlowShell.Ns)) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=dynamicOnePhaseFlowShell.Ns) annotation (Placement(transformation(extent={{-10,10},{10,30}}, rotation=0))); +equation + connect(sourceP.C, dynamicOnePhaseFlowShell.C1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(dynamicOnePhaseFlowShell.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,30.2},{0,22}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicOnePhaseFlowShell.CTh) annotation (Line(points={{0,18},{0,3}}, color={191,95,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicOnePhaseFlowShell_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell_Traces.mo new file mode 100644 index 00000000..52a41273 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicOnePhaseFlowShell_Traces.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicOnePhaseFlowShell_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowShell dynamicOnePhaseFlowShell( + redeclare package Medium = Medium, + Q(start={536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207,536.5750641592207}), + h(start={71016.12237181116,74743.46665892199,78470.81094603281,82198.15523314364,85925.49952025448,89652.84380736532,93380.18809447614,97107.53238158698,100834.8766686978,104562.22095580865,108289.56524291947,70825.9016030344}), + P(start={300000,281833.41863537,263664.30473175,245492.47958308,227317.76827098,209139.99948382,190959.00534677,172774.621262,154586.68575823,136395.04034906,118199.5293995,100000})) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium, SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, + option_temperature=2, + W0={2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6}) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10) annotation (Placement(transformation(extent={{-10,10},{10,30}}, rotation=0))); +equation + connect(sourceP.C, dynamicOnePhaseFlowShell.C1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(dynamicOnePhaseFlowShell.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,30.2},{0,22}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicOnePhaseFlowShell.CTh) annotation (Line(points={{0,18},{0,3}}, color={191,95,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicOnePhaseFlowShell_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger.mo new file mode 100644 index 00000000..48836bb0 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger.mo @@ -0,0 +1,61 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicPlateHeatExchanger + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger dynamicPlateHeatExchanger( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + Ns=5, + Sp=2, + dynamic_energy_balance=false, + heat_exchange_correlation=0, + pressure_loss_correlation=0, + p_Kc=1e-4, + p_Kf=1e-4, + state_f2(p(each start=3e5)), + Ec( + P(start=300000), + Q(fixed=true, start=1036), + h(start=280050)), + Sc(P(start=100000), h(start=275103), Q(start=1000)), + Ef(P(start=300000), h(start=280104), Q(start=1000)), + Sf(P(start=100000), h(start=280076)), + Pc(start=fill(3e5, 5+2)), + Pf(start=fill(3e5, 5+2)), + Qf(start=fill(1000, 5+1)), + hc(start={280050,280050,280052,280040,280303,275103,275103}), + hf(start={280076,280104,280154,279724,289301,280000,280000}), + hbc(start={280050,280050,280052,280040,280303,275103}), + hbf(start={280076,280104,280154,279724,289301,280000})) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium, + P0=300000, + option_temperature=false, + h0=280050) annotation (Placement(transformation(extent={{-70,30},{-50,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf( + redeclare package Medium = Medium, + P0=300000, + option_temperature=false, + h0=280104) annotation (Placement(transformation(extent={{-50,10},{-30,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc( + redeclare package Medium = Medium, + P0(fixed=false) = 100000, + option_temperature=false, + h0=275103) annotation (Placement(transformation(extent={{50,30},{70,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf( + redeclare package Medium = Medium, + P0=100000, + option_temperature=false, + h0=280076) annotation (Placement(transformation(extent={{30,10},{50,30}}, rotation=0))); +equation + connect(sourcePc.C, dynamicPlateHeatExchanger.Ec) annotation (Line(points={{-50,40},{-10,40}}, color={0,0,255})); + connect(sourcePf.C, dynamicPlateHeatExchanger.Ef) annotation (Line(points={{-30,20},{-5,20},{-5,34}}, color={0,0,255})); + connect(dynamicPlateHeatExchanger.Sc, sinkPc.C) annotation (Line(points={{10,40},{30,40},{50,40}}, color={0,0,255})); + connect(dynamicPlateHeatExchanger.Sf, sinkPf.C) annotation (Line(points={{5,34},{4,34},{4,20},{30,20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicPlateHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchangerW.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchangerW.mo new file mode 100644 index 00000000..abbd9039 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchangerW.mo @@ -0,0 +1,48 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicPlateHeatExchangerW + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger echangeurAPlaques1D1( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + Ns=5, + Sc(Q(fixed=true, start=1036))) annotation (Placement(transformation(extent={{-14,6},{6,26}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2(redeclare package Medium = Medium, T0=340) annotation (Placement(transformation(extent={{-74,6},{-54,26}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-54,-14},{-34,6}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2(redeclare package Medium = Medium, P0(fixed=false) = 100000) annotation (Placement(transformation(extent={{46,6},{66,26}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{26,-14},{46,6}}, rotation=0))); +equation + connect(sourceP2.C, echangeurAPlaques1D1.Ec) annotation (Line(points={{-54,16},{-14,16}}, color={0,0,255})); + connect(sourceP3.C, echangeurAPlaques1D1.Ef) annotation (Line(points={{-34,-4},{-9,-4},{-9,10}}, color={0,0,255})); + connect(echangeurAPlaques1D1.Sc, puitsP2.C) annotation (Line(points={{6,16},{46,16}}, color={0,0,255})); + connect(echangeurAPlaques1D1.Sf, puitsP3.C) annotation (Line(points={{1,10},{0,10},{0,-4},{26,-4}}, color={0,0,255})); + annotation ( + Diagram(graphics={Text( + extent={{72,24},{92,6}}, + lineColor={0,0,255}, + textString="Qc=true")}), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+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 TestDynamicPlateHeatExchangerW; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger_FlueGases.mo new file mode 100644 index 00000000..06417c77 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger_FlueGases.mo @@ -0,0 +1,59 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicPlateHeatExchanger_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_c = Properties.Media.FlueGases; + replaceable package Medium_f = Properties.Media.FlueGases; + + ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger dynamicPlateHeatExchanger( + redeclare package Medium_c = Medium_c, + redeclare package Medium_f = Medium_f, + Ns=5, + Sp=2, + dynamic_energy_balance=false, + heat_exchange_correlation=0, + pressure_loss_correlation=0, + p_hc=100, + p_hf=100, + p_Kc=1e-4, + p_Kf=1e-4, + Ec(P(start=4500000), h(start=2879115.64844), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Sc(P(start=4450000), h(start=2879115.64844), Q(start=117275.047014), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Ef(P(start=300000), h(start=2879115.64844), Q(start=49585.430645), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Sf(P(start=100000), h(start=2879115.64844), Xi(start={0.1,0.2,0.3,0.2,0.2})), + hc(start=fill(2879115.64844, 7)), + hf(start=fill(2879115.64844, 7)), + hbc(start=fill(2879115.64844, 6)), + hbf(start=fill(2879115.64844, 6)), + Tc1(start=fill(573.15, 5)), + Tf1(start=fill(573.15, 5)), + Tc2(start=fill(573.15, 6)), + Tf2(start=fill(573.15, 6))) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium_c, + P0=4500000, + T0=573.15, + X0={0.1,0.2,0.3,0.2,0.2}) annotation (Placement(transformation(extent={{-70,30},{-50,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf( + redeclare package Medium = Medium_f, + P0=300000, + T0=573.15, + X0={0.1,0.2,0.3,0.2,0.2}) annotation (Placement(transformation(extent={{-50,10},{-30,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc( + redeclare package Medium = Medium_c, + P0=4450000, + T0=573.15) annotation (Placement(transformation(extent={{50,30},{70,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf( + redeclare package Medium = Medium_f, + P0=100000, + T0=573.15) annotation (Placement(transformation(extent={{30,10},{50,30}}, rotation=0))); +equation + connect(sourcePc.C, dynamicPlateHeatExchanger.Ec) annotation (Line(points={{-50,40},{-10,40}}, color={0,0,255})); + connect(sourcePf.C, dynamicPlateHeatExchanger.Ef) annotation (Line(points={{-30,20},{-5,20},{-5,34}}, color={0,0,255})); + connect(dynamicPlateHeatExchanger.Sc, sinkPc.C) annotation (Line(points={{10,40},{30,40},{50,40}}, color={0,0,255})); + connect(dynamicPlateHeatExchanger.Sf, sinkPf.C) annotation (Line(points={{5,34},{4,34},{4,20},{30,20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicPlateHeatExchanger_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger_Traces.mo new file mode 100644 index 00000000..bfc63f33 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicPlateHeatExchanger_Traces.mo @@ -0,0 +1,59 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicPlateHeatExchanger_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger dynamicPlateHeatExchanger( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + Ns=5, + Sp=2, + dynamic_energy_balance=false, + heat_exchange_correlation=0, + pressure_loss_correlation=0, + p_Kc=1e-4, + p_Kf=1e-4, + Ec(P(start=300000), h(start=280050)), + Sc(P(start=100000), h(start=275103), Q(start=1000)), + Ef(P(start=300000), h(start=280104), Q(start=1000)), + Sf(P(start=100000), h(start=280076)), + hc(start={280050,280050,280052,280040,280303,275103,275103}), + hf(start={280076,280104,280154,279724,289301,280000,280000}), + hbc(start={280050,280050,280052,280040,280303,275103}), + hbf(start={280076,280104,280154,279724,289301,280000})) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium, + P0=300000, + option_temperature=false, + h0=280050, + SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-70,30},{-50,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf( + redeclare package Medium = Medium, + P0=300000, + option_temperature=false, + h0=280104, + SubC0={0.4,0.5,0.6}) annotation (Placement(transformation(extent={{-50,10},{-30,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc( + redeclare package Medium = Medium, + P0=100000, + option_temperature=false, + h0=275103) annotation (Placement(transformation(extent={{50,30},{70,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf( + redeclare package Medium = Medium, + P0=100000, + option_temperature=false, + h0=280076) annotation (Placement(transformation(extent={{30,10},{50,30}}, rotation=0))); +equation + connect(sourcePc.C, dynamicPlateHeatExchanger.Ec) annotation (Line(points={{-50,40},{-10,40}}, color={0,0,255})); + connect(sourcePf.C, dynamicPlateHeatExchanger.Ef) annotation (Line(points={{-30,20},{-5,20},{-5,34}}, color={0,0,255})); + connect(dynamicPlateHeatExchanger.Sc, sinkPc.C) annotation (Line(points={{10,40},{30,40},{50,40}}, color={0,0,255})); + connect(dynamicPlateHeatExchanger.Sf, sinkPf.C) annotation (Line(points={{5,34},{4,34},{4,20},{30,20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicPlateHeatExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowPipe.mo new file mode 100644 index 00000000..986a0e6b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowPipe.mo @@ -0,0 +1,43 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicTwoPhaseFlowPipe + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe( + redeclare package Medium = Medium, + L=10, + D=0.03, + dpfCorr(fixed=false, start=0.2396333653343408)=1, + P(start={2000000,1999571.7070274,1999140.9402168,1998707.6248919,1998271.6837223,1997833.0364983,1997391.5998908,1996715.822109,1995640.0182728,1994163.0145856,1992283.4952231,1990000})) + annotation (Placement(transformation(extent={{-40,-48},{40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + C(Q(start=1, fixed=true)), + option_temperature=false, + h0=800e3, + P0=2000000) annotation (Placement(transformation(extent={{-90,-28},{-70,-8}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium, + option_temperature=false, + h0=2000e3, + P0=19.9e5) annotation (Placement(transformation(extent={{68,-28},{88,-8}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + option_temperature=2, + T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, + W0={2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4}) annotation (Placement(transformation(extent={{-10,31},{10,51}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall( + Ns=10, + L=10, + lambda=10, + cpw=460, + rhow=7900, + e=0.005, + D=0.03) annotation (Placement(transformation(extent={{-40,-28},{40,52}}, rotation=0))); +equation + connect(sourceP.C, dynamicTwoPhaseFlowPipe.C1) annotation (Line(points={{-70,-18},{-42,-18},{-42,-19},{-40,-19}}, color={0,0,255})); + connect(dynamicTwoPhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{40,-19},{68,-18}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,31.2},{0,20}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowPipe.CTh) annotation (Line(points={{0,4},{0,-10.3}}, color={191,95,0})); + annotation (experiment(StopTime=1500), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicTwoPhaseFlowPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowPipe_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowPipe_Traces.mo new file mode 100644 index 00000000..178c5f8c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowPipe_Traces.mo @@ -0,0 +1,46 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicTwoPhaseFlowPipe_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe( + redeclare package Medium = Medium, + L=10, + D=0.03, + C1(SubC(start={0.1})), + C2(SubC(start={0.1})), + dpfCorr(fixed=false, start=0.2396333653343408)=1, + P(start={2000000,1999571.7070274,1999140.9402168,1998707.6248919,1998271.6837223,1997833.0364983,1997391.5998908,1996715.822109,1995640.0182728,1994163.0145856,1992283.4952231,1990000})) + annotation (Placement(transformation(extent={{-40,-48},{40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + C(Q(start=1, fixed=true), SubC(start={0.1})), + option_temperature=false, + h0=800e3, + P0=2000000, + SubC0={0.1}) annotation (Placement(transformation(extent={{-90,-28},{-70,-8}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium, + option_temperature=false, + h0=2000e3, + P0=19.9e5) annotation (Placement(transformation(extent={{70,-28},{90,-8}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + option_temperature=2, + T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, + W0={2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4}) annotation (Placement(transformation(extent={{-10,31},{10,51}}, rotation=0))); + ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall( + Ns=10, + L=10, + lambda=10, + cpw=460, + rhow=7900, + e=0.005, + D=0.03) annotation (Placement(transformation(extent={{-40,-28},{40,52}}, rotation=0))); +equation + connect(sourceP.C, dynamicTwoPhaseFlowPipe.C1) annotation (Line(points={{-70,-18},{-42,-18},{-42,-19},{-40,-19}}, color={0,0,255})); + connect(dynamicTwoPhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{40,-19},{70,-18}}, color={0,0,255})); + connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0,31.2},{0,20}}, color={191,95,0})); + connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowPipe.CTh) annotation (Line(points={{0,4},{0,-10.3}}, color={191,95,0})); + annotation (experiment(StopTime=1500), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicTwoPhaseFlowPipe_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowRiser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowRiser.mo new file mode 100644 index 00000000..b3e20adc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowRiser.mo @@ -0,0 +1,41 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicTwoPhaseFlowRiser + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowRiser dynamicTwoPhaseFlowRiser( + redeclare package Medium = Medium, + L=10, + D=0.03, + inertia=false, + Ns=1, + steady_state=false, + option_temperature=false, + h0={800e3}) annotation (Placement(transformation(extent={{-40,-48},{40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + C(Q(start=1)), + option_temperature=false, + h0=800e3, + P0=2000000) annotation (Placement(transformation(extent={{-90,-28},{-70,-8}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium, + option_temperature=false, + h0=2000e3, + P0=19.9e5) annotation (Placement(transformation(extent={{70,-28},{90,-8}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource1( + option_temperature=2, + T0={1000}, + W0={2e4}) annotation (Placement(transformation(extent={{-10,31},{10,51}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource2( + option_temperature=2, + T0={1000}, + W0={2e4}) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}, rotation=0))); +equation + connect(sourceP.C, dynamicTwoPhaseFlowRiser.C1) annotation (Line(points={{-70,-18},{-42,-18},{-42,-19},{-40,-19}}, color={0,0,255})); + connect(dynamicTwoPhaseFlowRiser.C2, sinkP.C) annotation (Line(points={{40,-19},{70,-18}}, color={0,0,255})); + connect(heatSource1.C, dynamicTwoPhaseFlowRiser.CTh1) annotation (Line(points={{0,31.2},{0,-7.7}}, color={191,95,0})); + connect(heatSource2.C, dynamicTwoPhaseFlowRiser.CTh2) annotation (Line(points={{0,-50},{0,-33.5}}, color={191,95,0})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicTwoPhaseFlowRiser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowRiser_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowRiser_Traces.mo new file mode 100644 index 00000000..777fc36f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicTwoPhaseFlowRiser_Traces.mo @@ -0,0 +1,44 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicTwoPhaseFlowRiser_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowRiser dynamicTwoPhaseFlowRiser( + redeclare package Medium = Medium, + L=10, + D=0.03, + inertia=false, + Ns=1, + steady_state=false, + option_temperature=false, + h0={800e3}, + C1(SubC(start={0.1})), + C2(SubC(start={0.1}))) annotation (Placement(transformation(extent={{-40,-48},{40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + C(Q(start=1), SubC(start={0.1})), + option_temperature=false, + h0=800e3, + P0=2000000, + SubC0={0.1}) annotation (Placement(transformation(extent={{-90,-28},{-70,-8}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium, + option_temperature=false, + h0=2000e3, + P0=19.9e5) annotation (Placement(transformation(extent={{70,-28},{90,-8}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource1( + option_temperature=2, + T0={1000}, + W0={2e4}) annotation (Placement(transformation(extent={{-10,31},{10,51}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource2( + option_temperature=2, + T0={1000}, + W0={2e4}) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}, rotation=0))); +equation + connect(sourceP.C, dynamicTwoPhaseFlowRiser.C1) annotation (Line(points={{-70,-18},{-42,-18},{-42,-19},{-40,-19}}, color={0,0,255})); + connect(dynamicTwoPhaseFlowRiser.C2, sinkP.C) annotation (Line(points={{40,-19},{70,-18}}, color={0,0,255})); + connect(heatSource1.C, dynamicTwoPhaseFlowRiser.CTh1) annotation (Line(points={{0,31.2},{0,-7.7}}, color={191,95,0})); + connect(heatSource2.C, dynamicTwoPhaseFlowRiser.CTh2) annotation (Line(points={{0,-50},{0,-33.5}}, color={191,95,0})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicTwoPhaseFlowRiser_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeater.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeater.mo new file mode 100644 index 00000000..5aab623f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeater.mo @@ -0,0 +1,38 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicWaterHeater + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + replaceable package Medium_Cooling = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicWaterHeater waterHeater( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium_Cooling, + dynamic_energy_balance=true, + dynamic_mass_balance=true, + P0c=2200000, + Vf0=0.43, + pipe_1(h0=fill(9e5, 10), P0=6900000), + pipe_2(h0=fill(1.0e6, 10), P0=6900000), + pipe_3(h0=fill(9e5, 20), P0=6900000), + inertia=false, + volumeC(P0=6900000, P(start=6900000)), + volumeD1(P0=6900000, P(start=6900000)), + volumeD(P0=6900000, P(start=6900000))) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ steamSource(redeclare package Medium = Medium, Q0=10, h0=2.7e6, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ extraSource(redeclare package Medium = Medium, Q0=1e-4, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,50},{-50,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ condensateSink(redeclare package Medium = Medium, + Q0=10 + 1e-4, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ coolingSource(redeclare package Medium = Medium_Cooling, Q0=100, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,-50},{-50,-30}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP coolingSink(redeclare package Medium = Medium_Cooling, + P0=6900000, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); +equation + connect(steamSource.C, waterHeater.C1vap) annotation (Line(points={{10,60},{0,60},{0,10}}, color={0,0,255})); + connect(extraSource.C, waterHeater.C1) annotation (Line(points={{-50,60},{-6.4,60},{-6.4,9.2}}, color={0,0,255})); + connect(waterHeater.C2ex, condensateSink.C) annotation (Line(points={{0,-10},{0,-36},{0,-60},{-10,-60}}, + color={0,0,255})); + connect(coolingSource.C, waterHeater.Ce1) annotation (Line(points={{-50,-40},{-30,-40},{-30,-4.5},{-10,-4.5}}, color={0,0,255})); + connect(waterHeater.Ce2, coolingSink.C) annotation (Line(points={{-10,4.4},{-30,4.4},{-30,20},{-70,20}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicWaterHeater; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeaterOnePipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeaterOnePipe.mo new file mode 100644 index 00000000..1593241d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeaterOnePipe.mo @@ -0,0 +1,35 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicWaterHeaterOnePipe + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + replaceable package Medium_Cooling = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicWaterHeaterOnePipe waterHeater( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium_Cooling, + dynamic_energy_balance=true, + dynamic_mass_balance=true, + P0c=2200000, + Vf0=0.43, + pipe_3(h0=fill(9e5, 20), P0=6900000), + inertia=false, + volumeC(P0=6900000, P(start=6900000)), + volumeD(P0=6900000, P(start=6900000))) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ steamSource(redeclare package Medium = Medium, Q0=10, h0=2.7e6, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ extraSource(redeclare package Medium = Medium, Q0=1e-4, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,50},{-50,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ condensateSink(redeclare package Medium = Medium, + Q0=10 + 1e-4, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ coolingSource(redeclare package Medium = Medium_Cooling, Q0=100, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,-50},{-50,-30}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP coolingSink(redeclare package Medium = Medium_Cooling, + P0=6900000, h0=1e5, option_temperature=false) annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); +equation + connect(steamSource.C, waterHeater.C1vap) annotation (Line(points={{10,60},{0,60},{0,10}}, color={0,0,255})); + connect(extraSource.C, waterHeater.C1) annotation (Line(points={{-50,60},{-6.4,60},{-6.4,9.2}}, color={0,0,255})); + connect(waterHeater.C2ex, condensateSink.C) annotation (Line(points={{0,-10},{0,-36},{0,-60},{-10,-60}}, + color={0,0,255})); + connect(coolingSource.C, waterHeater.Ce1) annotation (Line(points={{-50,-40},{-30,-40},{-30,-4.5},{-10,-4.5}}, color={0,0,255})); + connect(waterHeater.Ce2, coolingSink.C) annotation (Line(points={{-10,4.4},{-30,4.4},{-30,20},{-70,20}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicWaterHeaterOnePipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeaterOnePipe_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeaterOnePipe_Traces.mo new file mode 100644 index 00000000..62c252c9 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeaterOnePipe_Traces.mo @@ -0,0 +1,7 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicWaterHeaterOnePipe_Traces + extends TestDynamicWaterHeaterOnePipe( + redeclare package Medium = Properties.Media.WaterSteam, + redeclare package Medium_Cooling = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + coolingSource(SubC0={10})); +end TestDynamicWaterHeaterOnePipe_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeater_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeater_Traces.mo new file mode 100644 index 00000000..ec38847c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterHeater_Traces.mo @@ -0,0 +1,7 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicWaterHeater_Traces + extends TestDynamicWaterHeater( + redeclare package Medium = Properties.Media.WaterSteam, + redeclare package Medium_Cooling = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + coolingSource(SubC0={10})); +end TestDynamicWaterHeater_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterSteamMultiFluidsHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterSteamMultiFluidsHeatExchanger.mo new file mode 100644 index 00000000..163d83df --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterSteamMultiFluidsHeatExchanger.mo @@ -0,0 +1,25 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicWaterSteamMultiFluidsHeatExchanger + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_1 = Properties.Media.WaterSteam; + replaceable package Medium_2 = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.DynamicWaterSteamMultiFluidsHeatExchanger exchanger( + redeclare package Medium_1 = Medium_1, + redeclare package Medium_2 = Medium_2, + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP source1(redeclare package Medium = Medium_1, P0=300000, h0=280000, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sink1(redeclare package Medium = Medium_1, P0=100000, h0=280000, option_temperature=false) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP source2(redeclare package Medium = Medium_2, P0=300000, h0=1.2e6, option_temperature=false) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sink2(redeclare package Medium = Medium_2, P0=100000, h0=1.2e6, option_temperature=false) annotation (Placement(transformation(extent={{50,-10},{70,10}}))); +equation + connect(source1.C, exchanger.Cfg1) annotation (Line(points={{10,60},{20,60},{20,5},{0,5}}, color={0,0,255})); + connect(exchanger.Cfg2, sink1.C) annotation (Line(points={{0,-5},{0,-32},{0,-60},{-10,-60}}, + color={0,0,255})); + connect(source2.C, exchanger.Cws1) annotation (Line(points={{-50,0},{-10,0}}, color={0,0,255})); + connect(exchanger.Cws2, sink2.C) annotation (Line(points={{10,0},{50,0}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicWaterSteamMultiFluidsHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterSteamMultiFluidsHeatExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterSteamMultiFluidsHeatExchanger_Traces.mo new file mode 100644 index 00000000..ab12229d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestDynamicWaterSteamMultiFluidsHeatExchanger_Traces.mo @@ -0,0 +1,8 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestDynamicWaterSteamMultiFluidsHeatExchanger_Traces + extends TestDynamicWaterSteamMultiFluidsHeatExchanger( + redeclare package Medium_1 = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + redeclare package Medium_2 = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + source1(SubC0={10}), + source2(SubC0={20})); +end TestDynamicWaterSteamMultiFluidsHeatExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestFixedPowerHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestFixedPowerHeatExchanger.mo new file mode 100644 index 00000000..79aa47c2 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestFixedPowerHeatExchanger.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestFixedPowerHeatExchanger + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.FixedPowerHeatExchanger fixedPowerHeatExchanger( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + DW=1e6) + annotation (Placement(transformation(extent={{-20,44},{0,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare package Medium = Medium, + T0=340) annotation (Placement(transformation(extent={{-70,22},{-50,42}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ1( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-58,44},{-38,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkPc( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{40,44},{60,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkPf( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,24},{40,44}}, rotation=0))); +equation + connect(sourcePQ.C, fixedPowerHeatExchanger.Ec) annotation (Line(points={{-50,32},{-16,32},{-16,48},{-15.8,48}}, + color={0,0,255})); + connect(sourcePQ1.C, fixedPowerHeatExchanger.Ef) annotation (Line(points={{-38,54},{-20,54}}, color={0,0,255})); + connect(fixedPowerHeatExchanger.Sc, sinkPf.C) annotation (Line(points={{-4.2,48},{-4.2,34},{20,34}}, color={0,0,0})); + connect(fixedPowerHeatExchanger.Sf, sinkPc.C) annotation (Line(points={{-0.2,54.1},{19.9,54.1},{19.9,54},{40,54}}, color={0,0,0})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestFixedPowerHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestFixedPowerHeatExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestFixedPowerHeatExchanger_Traces.mo new file mode 100644 index 00000000..84d2f19c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestFixedPowerHeatExchanger_Traces.mo @@ -0,0 +1,17 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestFixedPowerHeatExchanger_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + extends TestFixedPowerHeatExchanger( + redeclare replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1"}, + C_nominal={0.1}, + C_default={0.2}), + sourcePQ1(SubC0={1}), + sourcePQ(SubC0={2})); + + + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestFixedPowerHeatExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater.mo new file mode 100644 index 00000000..f0eea4e3 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater.mo @@ -0,0 +1,73 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestNTUWaterHeater + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_e = Properties.Media.WaterSteam; + replaceable package Medium_c = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Water_inlet1( + redeclare package Medium = Medium_e, + Q0=1788.90, + h0=760.83e3, + P0=8270000) annotation (Placement(transformation(extent={{-174,-16},{-154,4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2( + redeclare package Medium = Medium_e) annotation (Placement(transformation(extent={{137,-16},{157,4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP Steam_inlet1( + redeclare package Medium = Medium_c, + option_temperature=false, + P0=17.49e5, + h0=2432.50e3) annotation (Placement(transformation(extent={{-174,84},{-154,104}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss6( + redeclare package Medium = Medium_e, + K=1e-4) annotation (Placement(transformation(extent={{-111,-16},{-91,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss7( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{-110,84},{-90,104}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur3( + redeclare package Medium = Medium_c) annotation (Placement(transformation(extent={{136,-75},{156,-55}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss8( + redeclare package Medium = Medium_e, + K=1e-4) annotation (Placement(transformation(extent={{75,-16},{95,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss9( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{75,-75},{95,-55}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.NTUWaterHeater nTUWaterHeating1( + redeclare package Medium_e = Medium_e, + redeclare package Medium_c = Medium_c, + HeiF(start=900000), + HDesF(start=900000), + Hep(start=500000), + SCondDes=5752, + Ee( + P(start=82e5), + h_vol_2(start=760000), + Q(start=1790), + h(start=780000)), + Ep(Q(start=118)), + Ev(P(start=27.22e5), h_vol_2(start=2430000)), + KCond=5024, + KPurge=1767, + Sp(h_vol_1(start=780.13e3), h(fixed=true, start=780.13e3)), + lambdaE=67.1, + SPurge=1458, + Se(h(fixed=true, start=872.08e3), P(start=80.19e5, fixed=true))) annotation (Placement(transformation(extent={{-66,-77},{50,65}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss10( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{-110,35},{-90,55}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ Drain_inlet1( + redeclare package Medium = Medium_c, + Q0=118.02, + h0=889.89e3) annotation (Placement(transformation(extent={{-174,35},{-154,55}}, rotation=0))); +equation + connect(Water_inlet1.C, singularPressureLoss6.C1) annotation (Line(points={{-154,-6},{-111,-6}}, color={0,0,255})); + connect(Steam_inlet1.C, singularPressureLoss7.C1) annotation (Line(points={{-154,94},{-110,94}}, color={0,0,255})); + connect(singularPressureLoss8.C2, Puit_condenseur2.C) annotation (Line(points={{95,-6},{137,-6}}, color={0,0,255})); + connect(singularPressureLoss9.C2, Puit_condenseur3.C) annotation (Line(points={{95,-65},{136,-65}}, color={0,0,255})); + connect(singularPressureLoss7.C2, nTUWaterHeating1.Ev) annotation (Line(points={{-90,94},{26.8,94},{26.8,18.14}}, color={0,0,255})); + connect(nTUWaterHeating1.Se, singularPressureLoss8.C1) annotation (Line(points={{50,-6},{75,-6}}, color={0,0,255})); + connect(singularPressureLoss9.C1, nTUWaterHeating1.Sp) annotation (Line(points={{75,-65},{-44,-65},{-44,-29.43},{-42.8,-29.43}}, color={0,0,255})); + connect(singularPressureLoss6.C2, nTUWaterHeating1.Ee) annotation (Line(points={{-91,-6},{-66,-6}}, color={0,0,255})); + connect(Drain_inlet1.C, singularPressureLoss10.C1) annotation (Line(points={{-154,45},{-110,45}}, color={0,0,255})); + connect(singularPressureLoss10.C2, nTUWaterHeating1.Ep) annotation (Line(points={{-90,45},{-42.8,45},{-42.8,18.14}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-200},{200,200}}))); +end TestNTUWaterHeater; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater_FlueGases.mo new file mode 100644 index 00000000..c4b542b3 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater_FlueGases.mo @@ -0,0 +1,83 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestNTUWaterHeater_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_e = Properties.Media.FlueGases; + replaceable package Medium_c = Properties.Media.WaterSteam; + + parameter Medium_e.MassFraction X0[Medium_e.nX]={0.1,0.2,0.3,0.2,0.2}; + + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Water_inlet1( + redeclare package Medium = Medium_e, + Q0=1788.90, + P0=8270000, + option_temperature=true, + T0=573.15, + X0=X0) annotation (Placement(transformation(extent={{-174,-16},{-154,4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2( + redeclare package Medium = Medium_e, + option_temperature=true, + T0=573.15) annotation (Placement(transformation(extent={{137,-16},{157,4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP Steam_inlet1( + redeclare package Medium = Medium_c, + option_temperature=false, + P0=17.49e5, + h0=2432.50e3) annotation (Placement(transformation(extent={{-174,84},{-154,104}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss6( + redeclare package Medium = Medium_e, + K=1e-4) annotation (Placement(transformation(extent={{-111,-16},{-91,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss7( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{-110,84},{-90,104}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur3( + redeclare package Medium = Medium_c) annotation (Placement(transformation(extent={{136,-75},{156,-55}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss8( + redeclare package Medium = Medium_e, + K=1e-4) annotation (Placement(transformation(extent={{75,-16},{95,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss9( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{75,-75},{95,-55}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.NTUWaterHeater nTUWaterHeating1( + redeclare package Medium_e = Medium_e, + redeclare package Medium_c = Medium_c, + HeiF(start=2879115.64844), + HDesF(start=2879115.64844), + Hep(start=500000), + SCondDes=5752, + Ee( + P(start=82e5), + h_vol_2(start=2879115.64844), + Q(start=1790), + h(start=2879115.64844), + Xi(start={0.1,0.2,0.3,0.2,0.2})), + Ep(Q(start=118)), + Ev(P(start=27.22e5), h_vol_2(start=2430000)), + KCond=5024, + KPurge=1767, + Sp(h_vol_1(start=780.13e3), h(fixed=true, start=780.13e3)), + lambdaE=67.1, + SPurge=1458, + Se( + h(fixed=true, start=2879115.64844), + P(start=80.19e5, fixed=true), + Xi(start={0.1,0.2,0.3,0.2,0.2}))) annotation (Placement(transformation(extent={{-66,-77},{50,65}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss10( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{-110,35},{-90,55}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ Drain_inlet1( + redeclare package Medium = Medium_c, + Q0=118.02, + h0=889.89e3) annotation (Placement(transformation(extent={{-174,35},{-154,55}}, rotation=0))); +equation + connect(Water_inlet1.C, singularPressureLoss6.C1) annotation (Line(points={{-154,-6},{-111,-6}}, color={0,0,255})); + connect(Steam_inlet1.C, singularPressureLoss7.C1) annotation (Line(points={{-154,94},{-110,94}}, color={0,0,255})); + connect(singularPressureLoss8.C2, Puit_condenseur2.C) annotation (Line(points={{95,-6},{137,-6}}, color={0,0,255})); + connect(singularPressureLoss9.C2, Puit_condenseur3.C) annotation (Line(points={{95,-65},{136,-65}}, color={0,0,255})); + connect(singularPressureLoss7.C2, nTUWaterHeating1.Ev) annotation (Line(points={{-90,94},{26.8,94},{26.8,18.14}}, color={0,0,255})); + connect(nTUWaterHeating1.Se, singularPressureLoss8.C1) annotation (Line(points={{50,-6},{75,-6}}, color={0,0,255})); + connect(singularPressureLoss9.C1, nTUWaterHeating1.Sp) annotation (Line(points={{75,-65},{-44,-65},{-44,-29.43},{-42.8,-29.43}}, color={0,0,255})); + connect(singularPressureLoss6.C2, nTUWaterHeating1.Ee) annotation (Line(points={{-91,-6},{-66,-6}}, color={0,0,255})); + connect(Drain_inlet1.C, singularPressureLoss10.C1) annotation (Line(points={{-154,45},{-110,45}}, color={0,0,255})); + connect(singularPressureLoss10.C2, nTUWaterHeating1.Ep) annotation (Line(points={{-90,45},{-42.8,45},{-42.8,18.14}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-200},{200,200}}))); +end TestNTUWaterHeater_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater_Traces.mo new file mode 100644 index 00000000..a79a6470 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestNTUWaterHeater_Traces.mo @@ -0,0 +1,85 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestNTUWaterHeater_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_e = Properties.Media.WaterSteam( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + replaceable package Medium_c = Properties.Media.WaterSteam( + extraPropertiesNames={"Trace4","Trace5","Trace6"}, + C_nominal={0.3,0.4,0.5}, + C_default={0.4,0.5,0.6}); + + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Water_inlet1( + redeclare package Medium = Medium_e, + Q0=1788.90, + h0=760.83e3, + P0=8270000, + SubC0={0.4,0.5,0.6}) + annotation (Placement(transformation(extent={{-174,-16},{-154,4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2( + redeclare package Medium = Medium_e) annotation (Placement(transformation(extent={{137,-16},{157,4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP Steam_inlet1( + redeclare package Medium = Medium_c, + option_temperature=false, + P0=1749000, + h0=2432.50e3, + SubC0={0.4,0.5,0.6}) + annotation (Placement(transformation(extent={{-174,84},{-154,104}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss6( + redeclare package Medium = Medium_e, + K=1e-4) annotation (Placement(transformation(extent={{-111,-16},{-91,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss7( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{-110,84},{-90,104}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur3( + redeclare package Medium = Medium_c) annotation (Placement(transformation(extent={{136,-75},{156,-55}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss8( + redeclare package Medium = Medium_e, + K=1e-4) annotation (Placement(transformation(extent={{75,-16},{95,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss9( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{75,-75},{95,-55}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.NTUWaterHeater nTUWaterHeating1( + redeclare package Medium_e = Medium_e, + redeclare package Medium_c = Medium_c, + HeiF(start=900000), + HDesF(start=900000), + Hep(start=500000), + SCondDes=5752, + Ee( + P(start=82e5), + h_vol_2(start=760000), + Q(start=1790), + h(start=780000)), + Ep(Q(start=118)), + Ev(P(start=27.22e5), h_vol_2(start=2430000)), + KCond=5024, + KPurge=1767, + Sp(h_vol_1(start=780.13e3), h(fixed=true, start=780.13e3)), + lambdaE=67.1, + SPurge=1458, + Se(h(fixed=true, start=872.08e3), P(start=80.19e5, fixed=true))) annotation (Placement(transformation(extent={{-66,-77},{50,65}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss10( + redeclare package Medium = Medium_c, + K=1e-4) annotation (Placement(transformation(extent={{-110,35},{-90,55}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ Drain_inlet1( + redeclare package Medium = Medium_c, + Q0=118.02, + h0=889.89e3, + SubC0={0.5,0.6,0.7}) + annotation (Placement(transformation(extent={{-174,35},{-154,55}}, rotation=0))); +equation + connect(Water_inlet1.C, singularPressureLoss6.C1) annotation (Line(points={{-154,-6},{-111,-6}}, color={0,0,255})); + connect(Steam_inlet1.C, singularPressureLoss7.C1) annotation (Line(points={{-154,94},{-110,94}}, color={0,0,255})); + connect(singularPressureLoss8.C2, Puit_condenseur2.C) annotation (Line(points={{95,-6},{137,-6}}, color={0,0,255})); + connect(singularPressureLoss9.C2, Puit_condenseur3.C) annotation (Line(points={{95,-65},{136,-65}}, color={0,0,255})); + connect(singularPressureLoss7.C2, nTUWaterHeating1.Ev) annotation (Line(points={{-90,94},{26.8,94},{26.8,18.14}}, color={0,0,255})); + connect(nTUWaterHeating1.Se, singularPressureLoss8.C1) annotation (Line(points={{50,-6},{75,-6}}, color={0,0,255})); + connect(singularPressureLoss9.C1, nTUWaterHeating1.Sp) annotation (Line(points={{75,-65},{-44,-65},{-44,-29.43},{-42.8,-29.43}}, color={0,0,255})); + connect(singularPressureLoss6.C2, nTUWaterHeating1.Ee) annotation (Line(points={{-91,-6},{-66,-6}}, color={0,0,255})); + connect(Drain_inlet1.C, singularPressureLoss10.C1) annotation (Line(points={{-154,45},{-110,45}}, color={0,0,255})); + connect(singularPressureLoss10.C2, nTUWaterHeating1.Ep) annotation (Line(points={{-90,45},{-42.8,45},{-42.8,18.14}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200,-200},{200,200}}))); +end TestNTUWaterHeater_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleDynamicCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleDynamicCondenser.mo new file mode 100644 index 00000000..95d05b29 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleDynamicCondenser.mo @@ -0,0 +1,126 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSimpleDynamicCondenser + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss PerteChargeCondPompe( + redeclare package Medium = Medium, + K=1e-6, + Q(start=234.2), + rho(start=994.7163, displayUnit="g/cm3"), + C1(P(start=33724.215, displayUnit="bar"))) annotation (Placement(transformation( + origin={-8,-80}, + extent={{-10,-10},{10,10}}, + rotation=180))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ PuitsRechauffeurEau( + redeclare package Medium = Medium, + Q0=234.2, + h0=137.9e3) annotation (Placement(transformation(extent={{-58,-90},{-78,-70}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss PerteChargeCondPompe1( + redeclare package Medium = Medium, + K=1e-6, + rho(start=995.2436, displayUnit="g/cm3")) annotation (Placement(transformation( + origin={94,-30}, + extent={{10,-10},{-10,10}}, + rotation=180))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss PerteChargeCondPompe2( + redeclare package Medium = Medium, + K=1e-6, + rho(start=998.6793, displayUnit="g/cm3")) annotation (Placement(transformation( + origin={-22,-30}, + extent={{10,-10},{-10,10}}, + rotation=180))); + ThermoSysPro.Fluid.HeatExchangers.SimpleDynamicCondenser Condenseur( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium, + D=0.018, + V=26.592685799971978, + A=1.0140805624113665, + lambda=0.01, + ntubes=30000, + gravity_pressure=true, + steady_state=true, + P0=5010, + yNiveau(signal(fixed=false, start=1.5)), + Vf0=0.10, + P(start=4999.0117, + displayUnit="bar"), + rhom(displayUnit="g/cm3", start=997.1903), + xv(start=4.3733834E-09), + Vv(start=23.606508), + xl(start=-3.5873317E-08)) + annotation (Placement(transformation(extent={{14,-46},{70,-6}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP source_retourCondensats( + redeclare package Medium = Medium, + P0=25560, + h0=160.7e3, + option_temperature=false, + T(start=311.52)) annotation (Placement(transformation(extent={{-60,70},{-40,90}}))); + ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium, h(start=1861385.9)) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={42,40}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP source_autre( + redeclare package Medium = Medium, + P0=82050, + h0=394.5e3, + option_temperature=false, + T(start=367.32)) annotation (Placement(transformation(extent={{-60,30},{-40,50}}))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PdC_chaudCond_out(redeclare package Medium = Medium, K=1e-5) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={42,14}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ source_vapLP( + redeclare package Medium = Medium, + Q0=194.355 - 9.231 - 9.766 - 9.418, + h0=2624.5e3, + option_temperature=false) annotation (Placement(transformation(extent={{-60,110},{-40,130}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare package Medium = Medium, + Q0=7006, + T0=290.68, + h0=113e3, + option_temperature=true) annotation (Placement(transformation(extent={{-72,-40},{-52,-20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur( + redeclare package Medium = Medium, + T0=302.74, + option_temperature=true) annotation (Placement(transformation(extent={{128,-40},{148,-20}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StodolaTurbine LP4( + redeclare package Medium = Medium, + Cst( + fixed=false, + start=92.838486) = 8000, + eta_is_nom(fixed=false) = 0.8, + Ce(P(fixed=true, start=30000)), + Cs(P(fixed=false, start=5010), h(fixed=true, start=2560.8e3))) annotation (Placement(transformation(extent={{20,110},{40,130}}))); + ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve_autre( + redeclare package Medium = Medium, + Cvmax(fixed=false) = 8000, + Q(fixed=true, start=0.1199), + C2(P(start=5010, fixed=false))) annotation (Placement(transformation(extent={{-20,36},{0,56}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante2 annotation (Placement(transformation(extent={{-28,56},{-20,64}}))); + ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve_retourCondensats( + redeclare package Medium = Medium, + Cvmax(fixed=false) = 8000, + C2(P(start=5010, fixed=false))) annotation (Placement(transformation(extent={{-20,76},{0,96}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1 annotation (Placement(transformation(extent={{-28,96},{-20,104}}))); +equation + connect(PerteChargeCondPompe2.C2, Condenseur.Cee) annotation (Line(points={{-12,-30},{4,-30},{4,-30.4},{14,-30.4}}, color={0,0,0})); + connect(PerteChargeCondPompe.C1, Condenseur.Cl) annotation (Line(points={{2,-80},{42.56,-80},{42.56,-46}})); + connect(PerteChargeCondPompe1.C1, Condenseur.Cse) annotation (Line(points={{84,-30},{70,-30}})); + connect(PdC_chaudCond_out.C1, volumeC.Cs) annotation (Line(points={{42,24},{42,30}}, color={0,0,0})); + connect(PdC_chaudCond_out.C2, Condenseur.Cv) annotation (Line(points={{42,4},{42,-6}}, color={0,0,0})); + connect(sourceQ.C, PerteChargeCondPompe2.C1) annotation (Line(points={{-52,-30},{-32,-30}}, color={0,0,0})); + connect(PerteChargeCondPompe1.C2, puitsPCaloporteur.C) annotation (Line(points={{104,-30},{128,-30}}, color={0,0,0})); + connect(LP4.Ce, source_vapLP.C) annotation (Line(points={{19.9,120},{-40,120}}, color={0,0,0})); + connect(LP4.Cs, volumeC.Ce2) annotation (Line(points={{40.1,120},{58,120},{58,40},{52,40}}, color={0,0,0})); + connect(source_autre.C, controlValve_autre.C1) annotation (Line(points={{-40,40},{-20,40}}, color={0,0,0})); + connect(controlValve_autre.C2, volumeC.Ce3) annotation (Line(points={{0,40},{32,40}}, color={0,0,0})); + connect(controlValve_autre.Ouv, constante2.y) annotation (Line(points={{-10,57},{-10,60},{-19.6,60}}, color={0,0,255})); + connect(source_retourCondensats.C, controlValve_retourCondensats.C1) annotation (Line(points={{-40,80},{-20,80}}, color={0,0,0})); + connect(controlValve_retourCondensats.C2, volumeC.Ce1) annotation (Line(points={{0,80},{42,80},{42,50}}, color={0,0,0})); + connect(constante1.y, controlValve_retourCondensats.Ouv) annotation (Line(points={{-19.6,100},{-10,100},{-10,97}}, color={0,0,255})); + connect(PuitsRechauffeurEau.C, PerteChargeCondPompe.C2) annotation (Line(points={{-58,-80},{-18,-80}}, color={0,0,0})); + + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false))); +end TestSimpleDynamicCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleDynamicCondenser_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleDynamicCondenser_Traces.mo new file mode 100644 index 00000000..97ebc8ef --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleDynamicCondenser_Traces.mo @@ -0,0 +1,8 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSimpleDynamicCondenser_Traces + extends ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers.TestSimpleDynamicCondenser( + redeclare package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + Condenseur(redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=Condenseur.xv) +) +) annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false))); +end TestSimpleDynamicCondenser_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleEvaporatorWaterSteamFlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleEvaporatorWaterSteamFlueGases.mo new file mode 100644 index 00000000..9ba63f1a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleEvaporatorWaterSteamFlueGases.mo @@ -0,0 +1,47 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSimpleEvaporatorWaterSteamFlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWater( + redeclare package Medium = Medium, + Q0=10, + C(P(start=2000000)), + h0=300000, + option_temperature=false) annotation (Placement(transformation(extent={{-80,-10},{-60,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkSteam( + redeclare package Medium = Medium, + P0=1900000) annotation (Placement(transformation(extent={{60,-10},{80,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceFlueGases( + redeclare package Medium = Medium_FlueGases, + Q0=50, + C(P(start=300000)), + T0=900, + option_temperature=true, + X0={0.75,0.1,0.1,0.03,0.02}) annotation (Placement(transformation(extent={{-10,70},{10,50}}, rotation=-90, + origin={-60,30}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkFlueGases( + redeclare package Medium = Medium_FlueGases, + P0=250000) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}, rotation=-90, + origin={60,-30}))); + ThermoSysPro.Fluid.HeatExchangers.SimpleEvaporatorWaterSteamFlueGases evaporator( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, + Kdpf=0.02, + Kdpe=0.02, + Cws1(P(start=2000000), h(start=300000)), + Cws2(P(start=1900000), h(start=2800000)), + Cfg1(P(start=300000), h(start=1000000), Xi(start={0.75,0.1,0.1,0.03,0.02})), + Cfg2(P(start=250000), h(start=500000), Xi(start={0.75,0.1,0.1,0.03,0.02}))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); +equation + connect(sourceWater.C, evaporator.Cws1) annotation (Line(points={{-60,0},{-10,0}}, color={0,0,255})); + connect(evaporator.Cws2, sinkSteam.C) annotation (Line(points={{10,0},{60,0}}, color={0,0,255})); + connect(sourceFlueGases.C, evaporator.Cfg1) annotation (Line(points={{0,20},{0,9}}, color={0,0,255})); + connect(evaporator.Cfg2, sinkFlueGases.C) annotation (Line(points={{0,-9},{0,-20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSimpleEvaporatorWaterSteamFlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleEvaporatorWaterSteamFlueGases_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleEvaporatorWaterSteamFlueGases_Traces.mo new file mode 100644 index 00000000..ce5c9c42 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleEvaporatorWaterSteamFlueGases_Traces.mo @@ -0,0 +1,48 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSimpleEvaporatorWaterSteamFlueGases_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWater( + redeclare package Medium = Medium, + Q0=10, + C(P(start=2000000), SubC(start={0.1})), + h0=300000, + option_temperature=false, + SubC0={0.1}) annotation (Placement(transformation(extent={{-80,-10},{-60,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkSteam(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,-10},{80,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceFlueGases( + redeclare package Medium = Medium_FlueGases, + Q0=50, + C(P(start=300000), SubC(start={0.3})), + T0=900, + option_temperature=true, + X0={0.75,0.1,0.1,0.03,0.02}, + SubC0={0.3}) annotation (Placement(transformation(extent={{-10,70},{10,50}}, rotation=-90, + origin={-60,30}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkFlueGases(redeclare package Medium = Medium_FlueGases) annotation (Placement(transformation(extent={{-10,-70},{10,-50}}, rotation=-90, + origin={60,-30}))); + ThermoSysPro.Fluid.HeatExchangers.SimpleEvaporatorWaterSteamFlueGases evaporator( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, + Kdpf=0.02, + Kdpe=0.02, + Cws1(P(start=2000000), h(start=300000), SubC(start={0.1})), + Cws2(P(start=1900000), h(start=2800000), SubC(start={0.1})), + Cfg1(P(start=300000), h(start=1000000), Xi(start={0.75,0.1,0.1,0.03,0.02}), SubC(start={0.3})), + Cfg2(P(start=250000), h(start=500000), Xi(start={0.75,0.1,0.1,0.03,0.02}), SubC(start={0.3}))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); +equation + connect(sourceWater.C, evaporator.Cws1) annotation (Line(points={{-60,0},{-10,0}}, color={0,0,255})); + connect(evaporator.Cws2, sinkSteam.C) annotation (Line(points={{10,0},{60,0}}, color={0,0,255})); + connect(sourceFlueGases.C, evaporator.Cfg1) annotation (Line(points={{0,20},{0,9}}, color={0,0,255})); + connect(evaporator.Cfg2, sinkFlueGases.C) annotation (Line(points={{0,-9},{0,-20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSimpleEvaporatorWaterSteamFlueGases_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleStaticCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleStaticCondenser.mo new file mode 100644 index 00000000..be8ea3fb --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleStaticCondenser.mo @@ -0,0 +1,33 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSimpleStaticCondenser + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.SimpleStaticCondenser simpleStaticCondenser( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium, + Ec(h(start=532983.7176868258)), + Ef(h(start=71016.12237181116)), + Qc(start=1049.6385508765125), + Qf(start=4469.84281279143), + Sf(h(start=64330.208038325145))) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + T0=400) annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); +equation + connect(sourceP.C, simpleStaticCondenser.Ef) annotation (Line(points={{-40,30},{-20,30}}, color={0,0,255})); + connect(sourceP1.C, simpleStaticCondenser.Ec) annotation (Line(points={{-40,-10},{-16,-10},{-16,20}}, color={0,0,255})); + connect(simpleStaticCondenser.Sf, sinkP.C) annotation (Line(points={{0,29.9},{10,29.9},{10,30},{20,30}}, color={0,0,255})); + connect(simpleStaticCondenser.Sc, sinkP1.C) annotation (Line(points={{-4,20},{-4,-10},{20,-10}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSimpleStaticCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleStaticCondenser_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleStaticCondenser_Traces.mo new file mode 100644 index 00000000..b18f22c4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSimpleStaticCondenser_Traces.mo @@ -0,0 +1,38 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSimpleStaticCondenser_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam( + extraPropertiesNames={"Trace1", "Trace2"}, + C_nominal={0.1, 2}, + C_default={0.2, 5}); + + ThermoSysPro.Fluid.HeatExchangers.SimpleStaticCondenser simpleStaticCondenser( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium, + Ec(h(start=532983.7176868258), SubC(start={10,20})), + Ef(h(start=71016.12237181116), SubC(start={10,20})), + Qc(start=1049.6385508765125), + Qf(start=4469.84281279143), + Sf(h(start=64330.208038325145), SubC(start={10,20}))) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + SubC0={10,20}) annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + T0=400, + SubC0={10,20}) annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); +equation + connect(sourceP.C, simpleStaticCondenser.Ef) annotation (Line(points={{-40,30},{-20,30}}, color={0,0,255})); + connect(sourceP1.C, simpleStaticCondenser.Ec) annotation (Line(points={{-40,-10},{-16,-10},{-16,20}}, color={0,0,255})); + connect(simpleStaticCondenser.Sf, sinkP.C) annotation (Line(points={{0,29.9},{10,29.9},{10,30},{20,30}}, color={0,0,255})); + connect(simpleStaticCondenser.Sc, sinkP1.C) annotation (Line(points={{-4,20},{-4,-10},{20,-10}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSimpleStaticCondenser_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticAerocondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticAerocondenser.mo new file mode 100644 index 00000000..3194641a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticAerocondenser.mo @@ -0,0 +1,57 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticAerocondenser + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_Air = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.HeatExchangers.StaticAerocondenser staticAerocondenser( + redeclare package Medium = Medium, + redeclare package Medium_Air = Medium_Air, + Se=10000, + z=0.5, + use_Cw=true, + Ka=1) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ airSource( + redeclare package Medium = Medium_Air, + Q0=1400, + h0=Medium_Air.specificEnthalpy_pTX( + p=100000, + T=293.15, + X=Medium_Air.X_default)) annotation (Placement(transformation(extent={{40,-30},{20,-10}},rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ drainSource( + redeclare package Medium = Medium, + Q0=1, + T0=340, + h0=370000) annotation (Placement(transformation(extent={{-40,-20},{-20,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ steamSource1( + redeclare package Medium = Medium, + Q0=100, + T0=340, + h0=2600000) annotation (Placement(transformation(extent={{-40,10},{-20,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink condensateSink( + redeclare package Medium = Medium, + h0=370000) annotation (Placement(transformation( + extent={{-10,-70},{10,-50}}, + rotation=-90, + origin={60,-50}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP airSink( + redeclare package Medium = Medium_Air, + P0=100000, + T0=293.15) annotation (Placement(transformation( + extent={{40,50},{60,70}}, + rotation=90, + origin={80,-20}))); +equation + connect(airSource.C, staticAerocondenser.Cair1) annotation (Line(points={{20,-20},{9.16667,-20},{9.16667,-9.08333}}, + color={0,0,0})); + connect(drainSource.C, staticAerocondenser.Cw) annotation (Line(points={{-20,-10},{-14,-10},{-14,-7.5},{-9.16667,-7.5}}, color={0,0,0})); + connect(staticAerocondenser.Cws1, steamSource1.C) annotation (Line(points={{0,9.16667},{0,20},{-20,20}}, color={0,0,0})); + connect(staticAerocondenser.Cws2, condensateSink.C) annotation (Line(points={{0,-9.16667},{0,-40}}, color={0,0,0})); + connect(staticAerocondenser.Cair2, airSink.C) annotation (Line(points={{9.16667,9.16667},{20,9.16667},{20,20}}, + color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticAerocondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenser.mo new file mode 100644 index 00000000..3dfd512a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenser.mo @@ -0,0 +1,89 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticCondenser + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + parameter Units.SI.AbsolutePressure Pin_1(fixed=false, start=20000) + "Flow pressure at inlet 1"; + parameter Units.SI.AbsolutePressure Pin_2(fixed=false, start=20000) + "Flow pressure at inlet 2"; + parameter Units.SI.AbsolutePressure Pin_3(fixed=false, start=20000) + "Flow pressure at inlet 3"; + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceCooling( + redeclare package Medium = Medium, + h0=60e3, + Q0(fixed=true)=4000) annotation (Placement(transformation(extent={{-180,0},{-160,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkCooling( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{160,0},{180,20}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.StaticCondenser condenseur( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium, + CPCE=0, + KCO=100, + QC0=200, + z=5, + SCO=15e3, + Qee(start=4000, fixed=false), + Pcond(fixed=false, start=2154.77)) annotation (Placement(transformation(extent={{-20,-16},{72,82}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + option_temperature=false, + P0=Pin_1, + h0=2.5817e6, + C(Q(fixed=true, start=100))) annotation (Placement(transformation(extent={{-100,140},{-80,160}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + option_temperature=false, + P0=Pin_2, + h0=2.5481e6, + C(Q(fixed=true, start=1e-5))) annotation (Placement(transformation(extent={{-182,80},{-162,100}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( + redeclare package Medium = Medium, + option_temperature=false, + P0=Pin_3, + h0=2.5055e6, + C(Q(fixed=true, start=1e-5))) annotation (Placement(transformation(extent={{-180,40},{-160,60}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare package Medium = Medium, + K=10) annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1( + redeclare package Medium = Medium, + K=10) annotation (Placement(transformation(extent={{-100,40},{-80,60}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2( + redeclare package Medium = Medium, + K=1e-4) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3( + redeclare package Medium = Medium, + K=10) annotation (Placement(transformation(extent={{-40,140},{-20,160}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkEx( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{100,-100},{120,-80}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss4( + redeclare package Medium = Medium, + K=1e-4) annotation (Placement(transformation(extent={{100,0},{120,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss5( + redeclare package Medium = Medium, + K=1e-4) annotation (Placement(transformation(extent={{40,-100},{60,-80}}, rotation=0))); +equation + connect(sourceP1.C, singularPressureLoss.C1) + annotation (Line(points={{-162,90},{-100,90}}, color={0,0,255})); + connect(singularPressureLoss.C2, condenseur.Cev) annotation (Line(points={{-80,90},{-50,90},{-50,62.89},{-20,62.89}}, color={0,0,255})); + connect(sourceP2.C, singularPressureLoss1.C1) + annotation (Line(points={{-160,50},{-100,50}}, color={0,0,255})); + connect(singularPressureLoss1.C2, condenseur.Cep) annotation (Line(points={{-80,50},{-52,50},{-52,42.31},{-20,42.31}}, color={0,0,255})); + connect(sourceCooling.C, singularPressureLoss2.C1) + annotation (Line(points={{-160,10},{-100,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, condenseur.Cee) annotation (Line(points={{-80,10},{-52,10},{-52,3.11},{-20,3.11}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss3.C1) + annotation (Line(points={{-80,150},{-40,150}}, color={0,0,255})); + connect(singularPressureLoss3.C2, condenseur.Cvt) annotation (Line(points={{-20,150},{26,150},{26,82.49}}, color={0,0,255})); + connect(singularPressureLoss4.C2, sinkCooling.C) + annotation (Line(points={{120,10},{160,10}}, color={0,0,255})); + connect(condenseur.Cse, singularPressureLoss4.C1) annotation (Line(points={{72.92,3.11},{86,3.11},{86,10},{100,10}}, color={0,0,255})); + connect(singularPressureLoss5.C2, sinkEx.C) + annotation (Line(points={{60,-90},{100,-90}}, color={0,0,255})); + connect(singularPressureLoss5.C1, condenseur.Cex) + annotation (Line(points={{40,-90},{26.46,-90},{26.46,-16.98}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenserHEI.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenserHEI.mo new file mode 100644 index 00000000..2fc01b2a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenserHEI.mo @@ -0,0 +1,88 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticCondenserHEI + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + parameter Units.SI.AbsolutePressure Pin_1(fixed=false, start=20000) + "Flow pressure at inlet 1"; + parameter Units.SI.AbsolutePressure Pin_2(fixed=false, start=20000) + "Flow pressure at inlet 2"; + parameter Units.SI.AbsolutePressure Pin_3(fixed=false, start=20000) + "Flow pressure at inlet 3"; + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceCooling( + redeclare package Medium = Medium, + h0=60e3, + Q0(fixed=true)=4000) annotation (Placement(transformation(extent={{-180,0},{-160,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkCooling( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{160,0},{180,20}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.StaticCondenserHEI condenseur( + redeclare package Medium = Medium, + redeclare package Medium_Cooling = Medium, + Kf=0, + z1c=0, + z2c=5, + Qc(start=100), + Qf(start=4000), + Pcond(fixed=false, start=2154.77)) annotation (Placement(transformation(extent={{-20,-16},{72,82}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + option_temperature=false, + P0=Pin_1, + h0=2.5817e6, + C(Q(fixed=true, start=100))) annotation (Placement(transformation(extent={{-100,140},{-80,160}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + option_temperature=false, + P0=Pin_2, + h0=2.5481e6, + C(Q(fixed=true, start=1e-5))) annotation (Placement(transformation(extent={{-182,80},{-162,100}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( + redeclare package Medium = Medium, + option_temperature=false, + P0=Pin_3, + h0=2.5055e6, + C(Q(fixed=true, start=1e-5))) annotation (Placement(transformation(extent={{-180,40},{-160,60}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare package Medium = Medium, + K=10) annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1( + redeclare package Medium = Medium, + K=10) annotation (Placement(transformation(extent={{-100,40},{-80,60}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2( + redeclare package Medium = Medium, + K=1e-4) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3( + redeclare package Medium = Medium, + K=10) annotation (Placement(transformation(extent={{-40,140},{-20,160}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkEx( + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{100,-100},{120,-80}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss4( + redeclare package Medium = Medium, + K=1e-4) annotation (Placement(transformation(extent={{100,0},{120,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss5( + redeclare package Medium = Medium, + K=1e-4) annotation (Placement(transformation(extent={{40,-100},{60,-80}}, rotation=0))); +equation + connect(sourceP1.C, singularPressureLoss.C1) + annotation (Line(points={{-162,90},{-100,90}}, color={0,0,255})); + connect(singularPressureLoss.C2, condenseur.Cev) annotation (Line(points={{-80,90},{-50,90},{-50,62.89},{-20,62.89}}, color={0,0,255})); + connect(sourceP2.C, singularPressureLoss1.C1) + annotation (Line(points={{-160,50},{-100,50}}, color={0,0,255})); + connect(singularPressureLoss1.C2, condenseur.Cep) annotation (Line(points={{-80,50},{-52,50},{-52,42.31},{-20,42.31}}, color={0,0,255})); + connect(sourceCooling.C, singularPressureLoss2.C1) + annotation (Line(points={{-160,10},{-100,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, condenseur.Cee) annotation (Line(points={{-80,10},{-52,10},{-52,3.11},{-20,3.11}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss3.C1) + annotation (Line(points={{-80,150},{-40,150}}, color={0,0,255})); + connect(singularPressureLoss3.C2, condenseur.Cvt) annotation (Line(points={{-20,150},{26,150},{26,82.49}}, color={0,0,255})); + connect(singularPressureLoss4.C2, sinkCooling.C) + annotation (Line(points={{120,10},{160,10}}, color={0,0,255})); + connect(condenseur.Cse, singularPressureLoss4.C1) annotation (Line(points={{72.92,3.11},{86,3.11},{86,10},{100,10}}, color={0,0,255})); + connect(singularPressureLoss5.C2, sinkEx.C) + annotation (Line(points={{60,-90},{100,-90}}, color={0,0,255})); + connect(singularPressureLoss5.C1, condenseur.Cex) + annotation (Line(points={{40,-90},{26.46,-90},{26.46,-16.98}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCondenserHEI; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenserHEI_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenserHEI_Traces.mo new file mode 100644 index 00000000..adacd0a4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenserHEI_Traces.mo @@ -0,0 +1,14 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticCondenserHEI_Traces + extends TestStaticCondenserHEI( + redeclare package Medium = ThermoSysPro.Properties.Media.WaterSteam( + extraPropertiesNames={"Trace1", "Trace2"}, + C_nominal={0.1, 2}, + C_default={0.2, 5}), + sourceP(SubC0={10,20}), + sourceP1(SubC0={10,20}), + sourceP2(SubC0={10,20}), + sourceCooling(SubC0={10,20}), + condenseur(Cvt(SubC(start={10,20})), Cev(SubC(start={10,20})), Cep(SubC(start={10,20})), Cee(SubC(start={10,20})))); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCondenserHEI_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenser_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenser_Traces.mo new file mode 100644 index 00000000..b235af11 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticCondenser_Traces.mo @@ -0,0 +1,14 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticCondenser_Traces + extends TestStaticCondenser( + redeclare package Medium = ThermoSysPro.Properties.Media.WaterSteam( + extraPropertiesNames={"Trace1", "Trace2"}, + C_nominal={0.1, 2}, + C_default={0.2, 5}), + sourceP(SubC0={10,20}), + sourceP1(SubC0={10,20}), + sourceP2(SubC0={10,20}), + sourceCooling(SubC0={10,20}), + condenseur(Cvt(SubC(start={10,20})), Cev(SubC(start={10,20})), Cep(SubC(start={10,20})), Cee(SubC(start={10,20})))); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCondenser_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff.mo new file mode 100644 index 00000000..e054d592 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff.mo @@ -0,0 +1,37 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticExchangerDTorWorEff + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FF( + redeclare package Medium = Medium, + C(P(start=219e5)), + Q0=481.07, + h0=1067.9e3) annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FF( + redeclare package Medium = Medium, + P0=217.68e5) annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FC( + redeclare package Medium = Medium, + C(P(start=24e5)), + Q0=23.377, + h0=3420.3e3) annotation (Placement(transformation(origin={-30,30}, extent={{10,-10},{-10,10}}, rotation=180))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FC( + redeclare package Medium = Medium, + P0=24.13e5) annotation (Placement(transformation(extent={{-2,20},{20,40}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.StaticExchangerDTorWorEff exchangerWaterSteamDTorWorEFF( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + EffEch=1, + Kf=597.832, + Ec(P(start=23e5)), + Ef(P(start=219e5)), + exchanger_type=3) annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); +equation + connect(sourceWaterSteam_FF.C, exchangerWaterSteamDTorWorEFF.Ef) annotation (Line(points={{-40,-10},{-20,-10}}, color={0,0,255})); + connect(exchangerWaterSteamDTorWorEFF.Sf, sinkWaterSteam_FF.C) annotation (Line(points={{0,-9.9},{10.2,-9.9},{10.2,-10},{20,-10}}, color={0,0,255})); + connect(sourceWaterSteam_FC.C, exchangerWaterSteamDTorWorEFF.Ec) annotation (Line(points={{-20,30},{-14,30},{-14,-5.9}}, color={0,0,255})); + connect(exchangerWaterSteamDTorWorEFF.Sc, sinkWaterSteam_FC.C) annotation (Line(points={{-6,-5.9},{-6,30},{-2,30}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticExchangerDTorWorEff; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff_FlueGases.mo new file mode 100644 index 00000000..b41a7281 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff_FlueGases.mo @@ -0,0 +1,51 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticExchangerDTorWorEff_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + parameter Medium.MassFraction X0[Medium.nX]={0.1,0.2,0.3,0.2,0.2}; + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceFlueGases_FF( + redeclare package Medium = Medium, + C(P(start=4500000), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Q0=481.07, + option_temperature=true, + T0=573.15, + X0=X0) annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkFlueGases_FF( + redeclare package Medium = Medium, + P0=4450000, + T0=573.15) annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceFlueGases_FC( + redeclare package Medium = Medium, + C(P(start=300000), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Q0=23.377, + option_temperature=true, + T0=673.15, + X0=X0) annotation (Placement(transformation(origin={-30,30}, extent={{10,-10},{-10,10}}, rotation=180))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkFlueGases_FC( + redeclare package Medium = Medium, + P0=100000, + T0=573.15) annotation (Placement(transformation(extent={{-2,20},{20,40}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.StaticExchangerDTorWorEff exchangerFlueGasesDTorWorEFF( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + EffEch=0.8, + Kc=1e-4, + Kf=1e-4, + Ec(P(start=300000), h(start=3379115.64844), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Sc(P(start=100000), h(start=3200000), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Ef(P(start=4500000), h(start=2879115.64844), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Sf(P(start=4450000), h(start=3000000), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Tec(start=673.15), + Tsc(start=640), + Tef(start=573.15), + Tsf(start=600), + exchanger_type=3) annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); +equation + connect(sourceFlueGases_FF.C, exchangerFlueGasesDTorWorEFF.Ef) annotation (Line(points={{-40,-10},{-20,-10}}, color={0,0,255})); + connect(exchangerFlueGasesDTorWorEFF.Sf, sinkFlueGases_FF.C) annotation (Line(points={{0,-9.9},{10.2,-9.9},{10.2,-10},{20,-10}}, color={0,0,255})); + connect(sourceFlueGases_FC.C, exchangerFlueGasesDTorWorEFF.Ec) annotation (Line(points={{-20,30},{-14,30},{-14,-5.9}}, color={0,0,255})); + connect(exchangerFlueGasesDTorWorEFF.Sc, sinkFlueGases_FC.C) annotation (Line(points={{-6,-5.9},{-6,30},{-2,30}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticExchangerDTorWorEff_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff_Traces.mo new file mode 100644 index 00000000..b39a7964 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerDTorWorEff_Traces.mo @@ -0,0 +1,42 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticExchangerDTorWorEff_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FF( + redeclare package Medium = Medium, + C(P(start=219e5)), + Q0=481.07, + h0=1067.9e3, + SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FF( + redeclare package Medium = Medium, + P0=217.68e5) annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FC( + redeclare package Medium = Medium, + C(P(start=24e5)), + Q0=23.377, + h0=3420.3e3, + SubC0={0.4,0.5,0.6}) annotation (Placement(transformation(origin={-30,30}, extent={{10,-10},{-10,10}}, rotation=180))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FC( + redeclare package Medium = Medium, + P0=24.13e5) annotation (Placement(transformation(extent={{-2,20},{20,40}}, rotation=0))); + ThermoSysPro.Fluid.HeatExchangers.StaticExchangerDTorWorEff exchangerWaterSteamDTorWorEFF( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + EffEch=1, + Kf=597.832, + Ec(P(start=23e5)), + Ef(P(start=219e5)), + exchanger_type=3) annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); +equation + connect(sourceWaterSteam_FF.C, exchangerWaterSteamDTorWorEFF.Ef) annotation (Line(points={{-40,-10},{-20,-10}}, color={0,0,255})); + connect(exchangerWaterSteamDTorWorEFF.Sf, sinkWaterSteam_FF.C) annotation (Line(points={{0,-9.9},{10.2,-9.9},{10.2,-10},{20,-10}}, color={0,0,255})); + connect(sourceWaterSteam_FC.C, exchangerWaterSteamDTorWorEFF.Ec) annotation (Line(points={{-20,30},{-14,30},{-14,-5.9}}, color={0,0,255})); + connect(exchangerWaterSteamDTorWorEFF.Sc, sinkWaterSteam_FC.C) annotation (Line(points={{-6,-5.9},{-6,30},{-2,30}}, color={0,0,255})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticExchangerDTorWorEff_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerKS.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerKS.mo new file mode 100644 index 00000000..19074313 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerKS.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticExchangerKS + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.StaticExchangerKS staticExchangerKS( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + K=100, + S=10, + exchanger_conf=1) annotation (Placement(transformation(extent={{-20,44},{0,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium, + T0=340) annotation (Placement(transformation(extent={{-80,44},{-60,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,24},{-40,44}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{40,44},{60,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,24},{40,44}}, rotation=0))); +equation + connect(sourcePc.C, staticExchangerKS.Ec) annotation (Line(points={{-60,54},{-20,54},{-20,51}}, color={0,0,255})); + connect(sourcePf.C, staticExchangerKS.Ef) annotation (Line(points={{-40,34},{-20,34},{-20,57}}, color={0,0,255})); + connect(staticExchangerKS.Sc, sinkPc.C) annotation (Line(points={{0,51},{20,51},{20,54},{40,54}}, color={0,0,255})); + connect(staticExchangerKS.Sf, sinkPf.C) annotation (Line(points={{0,57},{6,57},{6,34},{20,34}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticExchangerKS; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerKS_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerKS_Traces.mo new file mode 100644 index 00000000..be41268e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticExchangerKS_Traces.mo @@ -0,0 +1,34 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticExchangerKS_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.StaticExchangerKS staticExchangerKS( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + K=100, + S=10, + exchanger_conf=1) annotation (Placement(transformation(extent={{-20,44},{0,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium, + T0=340, + SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-80,44},{-60,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf( + redeclare package Medium = Medium, + SubC0={0.4,0.5,0.6}) annotation (Placement(transformation(extent={{-60,24},{-40,44}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{40,44},{60,64}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,24},{40,44}}, rotation=0))); +equation + connect(sourcePc.C, staticExchangerKS.Ec) annotation (Line(points={{-60,54},{-20,54},{-20,51}}, color={0,0,255})); + connect(sourcePf.C, staticExchangerKS.Ef) annotation (Line(points={{-40,34},{-20,34},{-20,57}}, color={0,0,255})); + connect(staticExchangerKS.Sc, sinkPc.C) annotation (Line(points={{0,51},{20,51},{20,54},{40,54}}, color={0,0,255})); + connect(staticExchangerKS.Sf, sinkPf.C) annotation (Line(points={{0,57},{6,57},{6,34},{20,34}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticExchangerKS_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger.mo new file mode 100644 index 00000000..ac3044f3 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger.mo @@ -0,0 +1,38 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticPlateHeatExchanger + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.StaticPlateHeatExchanger staticPlateHeatExchanger( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + Sp=2, + Ec(P(start=300000), h(start=280e3)), + Sc(P(start=100000), h(start=250e3), Q(start=1000)), + Ef(P(start=300000), h(start=70e3), Q(start=1000)), + Sf(P(start=100000), h(start=200e3)), + Tec(start=340), + Tsc(start=330), + Tef(start=290), + Tsf(start=320), + Tmc(start=335), + Tmf(start=305), + Hmc(start=270e3), + Hmf(start=140e3)) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium, + T0=340) annotation (Placement(transformation(extent={{-70,30},{-50,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,10},{-30,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{50,30},{70,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,10},{50,30}}, rotation=0))); +equation + connect(sourcePc.C, staticPlateHeatExchanger.Ec) annotation (Line(points={{-50,40},{-10,40}}, color={0,0,255})); + connect(sourcePf.C, staticPlateHeatExchanger.Ef) annotation (Line(points={{-30,20},{-5,20},{-5,34}}, color={0,0,255})); + connect(staticPlateHeatExchanger.Sc, sinkPc.C) annotation (Line(points={{10,40},{30,40},{50,40}}, color={0,0,255})); + connect(staticPlateHeatExchanger.Sf, sinkPf.C) annotation (Line(points={{5,34},{4,34},{4,20},{30,20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticPlateHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger_FlueGases.mo new file mode 100644 index 00000000..b94ad1bd --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger_FlueGases.mo @@ -0,0 +1,57 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticPlateHeatExchanger_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium_c = Properties.Media.FlueGases; + replaceable package Medium_f = Properties.Media.FlueGases; + + ThermoSysPro.Fluid.HeatExchangers.StaticPlateHeatExchanger staticPlateHeatExchanger( + redeclare package Medium_c = Medium_c, + redeclare package Medium_f = Medium_f, + Sp=2, + heat_exchange_correlation=0, + pressure_loss_correlation=0, + p_hc=100, + p_hf=100, + p_Kc=1e-4, + p_Kf=1e-4, + Ec(P(start=4500000), h(start=2879115.64844), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Sc(P(start=4450000), h(start=2879115.64844), Q(start=117275.047014), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Ef(P(start=300000), h(start=2879115.64844), Q(start=49585.430645), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Sf(P(start=100000), h(start=2879115.64844), Xi(start={0.1,0.2,0.3,0.2,0.2})), + Tec(start=573.15), + Tsc(start=573.15), + Tef(start=573.15), + Tsf(start=573.15), + Tmc(start=573.15), + Tmf(start=573.15), + Hmc(start=2879115.64844), + Hmf(start=2879115.64844)) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium_c, + P0=4500000, + T0=573.15, + X0={0.1,0.2,0.3,0.2,0.2}) annotation (Placement(transformation(extent={{-70,30},{-50,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf( + redeclare package Medium = Medium_f, + P0=300000, + T0=573.15, + X0={0.1,0.2,0.3,0.2,0.2}) annotation (Placement(transformation(extent={{-50,10},{-30,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc( + redeclare package Medium = Medium_c, + P0=4450000, + T0=573.15) annotation (Placement(transformation(extent={{50,30},{70,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf( + redeclare package Medium = Medium_f, + P0=100000, + T0=573.15) annotation (Placement(transformation(extent={{30,10},{50,30}}, rotation=0))); +equation + connect(sourcePc.C, staticPlateHeatExchanger.Ec) annotation (Line(points={{-50,40},{-10,40}}, color={0,0,255})); + connect(sourcePf.C, staticPlateHeatExchanger.Ef) annotation (Line(points={{-30,20},{-5,20},{-5,34}}, color={0,0,255})); + connect(staticPlateHeatExchanger.Sc, sinkPc.C) annotation (Line(points={{10,40},{30,40},{50,40}}, color={0,0,255})); + connect(staticPlateHeatExchanger.Sf, sinkPf.C) annotation (Line(points={{5,34},{4,34},{4,20},{30,20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticPlateHeatExchanger_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger_Traces.mo new file mode 100644 index 00000000..32cd71d4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticPlateHeatExchanger_Traces.mo @@ -0,0 +1,44 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticPlateHeatExchanger_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + + ThermoSysPro.Fluid.HeatExchangers.StaticPlateHeatExchanger staticPlateHeatExchanger( + redeclare package Medium_c = Medium, + redeclare package Medium_f = Medium, + Sp=2, + Ec(P(start=300000), h(start=280e3)), + Sc(P(start=100000), h(start=250e3), Q(start=1000)), + Ef(P(start=300000), h(start=70e3), Q(start=1000)), + Sf(P(start=100000), h(start=200e3)), + Tec(start=340), + Tsc(start=330), + Tef(start=290), + Tsf(start=320), + Tmc(start=335), + Tmf(start=305), + Hmc(start=270e3), + Hmf(start=140e3)) annotation (Placement(transformation(extent={{-10,30},{10,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePc( + redeclare package Medium = Medium, + T0=340, + SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-70,30},{-50,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourcePf( + redeclare package Medium = Medium, + SubC0={0.4,0.5,0.6}) annotation (Placement(transformation(extent={{-50,10},{-30,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPc(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{50,30},{70,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkPf(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,10},{50,30}}, rotation=0))); +equation + connect(sourcePc.C, staticPlateHeatExchanger.Ec) annotation (Line(points={{-50,40},{-10,40}}, color={0,0,255})); + connect(sourcePf.C, staticPlateHeatExchanger.Ef) annotation (Line(points={{-30,20},{-5,20},{-5,34}}, color={0,0,255})); + connect(staticPlateHeatExchanger.Sc, sinkPc.C) annotation (Line(points={{10,40},{30,40},{50,40}}, color={0,0,255})); + connect(staticPlateHeatExchanger.Sf, sinkPf.C) annotation (Line(points={{5,34},{4,34},{4,20},{30,20}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticPlateHeatExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_CustomMixture.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_CustomMixture.mo new file mode 100644 index 00000000..85a1472e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_CustomMixture.mo @@ -0,0 +1,54 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticWallFlueGasesExchanger_CustomMixture + extends ThermoSysPro.UsersGuide.Icons.Example; + + package Medium + extends ThermoSysPro.Properties.Media.PartialSubCMedium(nSubC=nC, isCompressible=true); + extends Modelica.Media.IdealGases.Common.MixtureGasNasa( + mediumName="CustomCombustionGas", + data={Modelica.Media.IdealGases.Common.SingleGasesData.CO2, + Modelica.Media.IdealGases.Common.SingleGasesData.H2O, + Modelica.Media.IdealGases.Common.SingleGasesData.O2, + Modelica.Media.IdealGases.Common.SingleGasesData.N2}, + fluidConstants={Modelica.Media.IdealGases.Common.FluidData.CO2, + Modelica.Media.IdealGases.Common.FluidData.H2O, + Modelica.Media.IdealGases.Common.FluidData.O2, + Modelica.Media.IdealGases.Common.FluidData.N2}, + substanceNames={"CO2","H2O","O2","N2"}, + reference_X={0.12,0.08,0.05,0.75}); + end Medium; + + parameter Integer Ns=3; + parameter Medium.MassFraction X0[Medium.nX]={0.12,0.08,0.05,0.75}; + + ThermoSysPro.Fluid.HeatExchangers.StaticWallFlueGasesExchanger exchanger( + redeclare package Medium = Medium, + Ns=Ns, + DPc=1e-4, + Tp0=500, + C1(P(start=4500000), h(start=700000), Q(start=10), Xi(start={0.12,0.08,0.05,0.75})), + C2(P(start=4450000), h(start=650000), Q(start=10), Xi(start={0.12,0.08,0.05,0.75})), + h(start=fill(700000, Ns + 2)), + hb(start=fill(700000, Ns + 1)), + T1(start=fill(650, Ns)), + T2(start=fill(650, Ns + 1))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ source( + redeclare package Medium = Medium, + P0=4500000, + Q0=10, + option_temperature=true, + T0=650, + X0=X0) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare package Medium = Medium, + option_temperature=false, + h0=650000) annotation (Placement(transformation(extent={{50,-10},{70,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource wall( + T0=fill(500, Ns), + option_temperature=1) annotation (Placement(transformation(extent={{-10,50},{10,70}}, rotation=0))); +equation + connect(source.C, exchanger.C1) annotation (Line(points={{-50,0},{-10,0}}, color={0,0,255})); + connect(exchanger.C2, sink.C) annotation (Line(points={{10,0},{50,0}}, color={0,0,255})); + connect(wall.C, exchanger.CTh) annotation (Line(points={{0,50.2},{0,3}}, color={255,127,0})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticWallFlueGasesExchanger_CustomMixture; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_FlueGases.mo new file mode 100644 index 00000000..0982b5b9 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_FlueGases.mo @@ -0,0 +1,39 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticWallFlueGasesExchanger_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + parameter Integer Ns=3; + parameter Medium.MassFraction X0[Medium.nX]={0.1,0.2,0.3,0.2,0.2}; + + ThermoSysPro.Fluid.HeatExchangers.StaticWallFlueGasesExchanger exchanger( + redeclare package Medium = Medium, + Ns=Ns, + DPc=1e-4, + Tp0=500, + C1(P(start=4500000), h(start=2879115.64844), Q(start=10), Xi(start={0.1,0.2,0.3,0.2,0.2})), + C2(P(start=4450000), h(start=2820000), Q(start=10), Xi(start={0.1,0.2,0.3,0.2,0.2})), + h(start=fill(2879115.64844, Ns + 2)), + hb(start=fill(2879115.64844, Ns + 1)), + T1(start=fill(573.15, Ns)), + T2(start=fill(573.15, Ns + 1))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ source( + redeclare package Medium = Medium, + P0=4500000, + Q0=10, + option_temperature=true, + T0=573.15, + X0=X0) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare package Medium = Medium, + option_temperature=false, + h0=2820000) annotation (Placement(transformation(extent={{50,-10},{70,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource wall( + T0=fill(500, Ns), + option_temperature=1) annotation (Placement(transformation(extent={{-10,50},{10,70}}, rotation=0))); +equation + connect(source.C, exchanger.C1) annotation (Line(points={{-50,0},{-10,0}}, color={0,0,255})); + connect(exchanger.C2, sink.C) annotation (Line(points={{10,0},{50,0}}, color={0,0,255})); + connect(wall.C, exchanger.CTh) annotation (Line(points={{0,50.2},{0,3}}, color={255,127,0})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticWallFlueGasesExchanger_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_Traces.mo new file mode 100644 index 00000000..264cba4b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestStaticWallFlueGasesExchanger_Traces.mo @@ -0,0 +1,53 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestStaticWallFlueGasesExchanger_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases( + extraPropertiesNames={"Trace1","Trace2","Trace3"}, + C_nominal={0.1,0.2,0.3}, + C_default={0.2,0.3,0.4}); + parameter Integer Ns=3; + parameter Medium.MassFraction X0[Medium.nX]={0.1,0.2,0.3,0.2,0.2}; + + ThermoSysPro.Fluid.HeatExchangers.StaticWallFlueGasesExchanger exchanger( + redeclare package Medium = Medium, + Ns=Ns, + DPc=1e-4, + Tp0=500, + C1( + P(start=4500000), + h(start=2879115.64844), + Q(start=10), + Xi(start={0.1,0.2,0.3,0.2,0.2}), + SubC(start={0.1,0.2,0.3})), + C2( + P(start=4450000), + h(start=2820000), + Q(start=10), + Xi(start={0.1,0.2,0.3,0.2,0.2}), + SubC(start={0.1,0.2,0.3})), + h(start=fill(2879115.64844, Ns + 2)), + hb(start=fill(2879115.64844, Ns + 1)), + T1(start=fill(573.15, Ns)), + T2(start=fill(573.15, Ns + 1))) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ source( + redeclare package Medium = Medium, + P0=4500000, + Q0=10, + option_temperature=true, + T0=573.15, + X0=X0, + SubC0={0.1,0.2,0.3}) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare package Medium = Medium, + option_temperature=false, + h0=2820000) annotation (Placement(transformation(extent={{50,-10},{70,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource wall( + T0=fill(500, Ns), + option_temperature=1) annotation (Placement(transformation(extent={{-10,50},{10,70}}, rotation=0))); +equation + connect(source.C, exchanger.C1) annotation (Line(points={{-50,0},{-10,0}}, color={0,0,255})); + connect(exchanger.C2, sink.C) annotation (Line(points={{10,0},{50,0}}, color={0,0,255})); + connect(wall.C, exchanger.CTh) annotation (Line(points={{0,50.2},{0,3}}, color={255,127,0})); + annotation (experiment(StopTime=1000), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticWallFlueGasesExchanger_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_1SG.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_1SG.mo new file mode 100644 index 00000000..850ef506 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_1SG.mo @@ -0,0 +1,52 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSteamGenerator_1SG + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + replaceable package Medium_Primary = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.SteamGenerator_1SG steamGenerator( + redeclare package Medium = Medium, + redeclare package Medium_Primary = Medium_Primary, + DomeGV( + Cm(h_vol_1(start=1467382.1491761294), + Q(start=3682.6323348377664)), + hl(start=1239103.1618852438), + Tp(start=1085.1630860204652, displayUnit="degC"), + Pfond(start=6537896.329041586, displayUnit="bar")), + DownComerGV(C2(P(start=6652618.15111204, displayUnit="bar"))), + fluidInlet(h_vol_2(start=1203352.0170161917)), + fluidInlet1(P(start=15603447.190394623, displayUnit="bar")), + fluidOutletI(h_vol_1(start=2.82156e6)), + fluidOutletI1(h(start=1266398.0525517925)), + MixAlimDomeGV(P(start=6597719.510802327, displayUnit="bar"), + Cs(h_vol_2(start=1203352.0170161917))), + outputReal(signal(start=-6.329123415280561)), + RiserGV( + h(start={1.20335e6,1.28046e6,1.34313e6,1.39379e6,1.43460e6,1.46738e6,1.46738e6}), + P(start={6.65262e6,6.63846e6,6.62828e6,6.62094e6,6.61445e6,6.60826e6,6.53790e6}), + Tp1(start={556.156,555.899,555.700,555.537,555.398}), + Tp2(start={557.644,557.097,556.655,556.295,555.999}), + state1(h(start={1280461.0750118925,1343134.833335842,1393794.5882590986,1434595.9090880589,1467382.1491761294}), p(start={6638456.595608159,6628277.414901627,6620936.90876653,6614447.789782153,6608263.233348276}, each displayUnit="bar"))), + UtubeColdtLeg( + P(start={1.54474e7,1.54475e7,1.54477e7,1.54482e7,1.54487e7,1.54493e7,1.54500e7}), + Tp(start={565.892673062783,563.7423137333859,562.0024887705413,560.5974122265403,559.4633025748175}, each displayUnit="degC")), + UtubeHotLeg( + P(start={1.56034e7,1.55774e7,1.55514e7,1.55254e7,1.54994e7,1.54734e7,1.54474e7}), + Tp(start={586.895939774836,580.9426855874689,575.9677586513063,571.864684816329,568.5110695637635}, each displayUnit="degC")), + DPnulle_AlimDwnc(rho(start=830.6664450130019, displayUnit="g/cm3")), + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ feedwater(redeclare package Medium = Medium, Q0=531.242, h0=991272, option_temperature=false) annotation (Placement(transformation(extent={{50,30},{70,50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP steamSink(redeclare package Medium = Medium, P0=6600000, h0=2.77257e6, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ primaryInlet(redeclare package Medium = Medium_Primary, Q0=4756, h0=1.47084e6, option_temperature=false) annotation (Placement(transformation(extent={{-70,-70},{-50,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP primaryOutlet(redeclare package Medium = Medium_Primary, P0=15450000, h0=1.27187e6, option_temperature=false) annotation (Placement(transformation(extent={{50,-70},{70,-50}}))); +equation + connect(feedwater.C, steamGenerator.fluidInlet) annotation (Line(points={{70,40},{52,40},{52,7.46667},{3.46667,7.46667}}, color={0,0,255})); + connect(steamGenerator.fluidOutletI, steamSink.C) annotation (Line(points={{0,9.93333},{0,34},{0,60},{-10,60}}, + color={0,0,255})); + connect(primaryInlet.C, steamGenerator.fluidInlet1) annotation (Line(points={{-50,-60},{-3.06667,-60},{-3.06667,-8.13333}}, color={0,0,255})); + connect(steamGenerator.fluidOutletI1, primaryOutlet.C) annotation (Line(points={{3.06667,-8.13333},{3.06667,-60},{50,-60}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSteamGenerator_1SG; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_1SG_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_1SG_Traces.mo new file mode 100644 index 00000000..dd461219 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_1SG_Traces.mo @@ -0,0 +1,7 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSteamGenerator_1SG_Traces + extends TestSteamGenerator_1SG( + redeclare package Medium = Properties.Media.WaterSteam, + redeclare package Medium_Primary = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + primaryInlet(SubC0={10})); +end TestSteamGenerator_1SG_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_4SG.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_4SG.mo new file mode 100644 index 00000000..823a3933 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_4SG.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSteamGenerator_4SG + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + replaceable package Medium_Primary = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.HeatExchangers.SteamGenerator_4SG steamGenerator( + redeclare package Medium = Medium, + redeclare package Medium_Primary = Medium_Primary, + dynamic_energy_balance=false, + dynamic_mass_balance=false, + inertia=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ feedwater(redeclare package Medium = Medium, + Q0=4*531.242, h0=991272, option_temperature=false) annotation (Placement(transformation(extent={{50,30},{70,50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP steamSink(redeclare package Medium = Medium, P0=6600000, h0=2.77257e6, option_temperature=false) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ primaryInlet(redeclare package Medium = Medium_Primary, + Q0=4*4756, h0=1.47084e6, option_temperature=false) annotation (Placement(transformation(extent={{-70,-70},{-50,-50}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP primaryOutlet(redeclare package Medium = Medium_Primary, P0=15450000, h0=1.27187e6, option_temperature=false) annotation (Placement(transformation(extent={{50,-70},{70,-50}}))); +equation + connect(feedwater.C, steamGenerator.fluidInlet) annotation (Line(points={{70,40},{52,40},{52,7.46667},{3.46667,7.46667}}, color={0,0,255})); + connect(steamGenerator.fluidOutletI, steamSink.C) annotation (Line(points={{0,9.93333},{0,34},{0,60},{-10,60}}, + color={0,0,255})); + connect(primaryInlet.C, steamGenerator.fluidInlet1) annotation (Line(points={{-50,-60},{-3.06667,-60},{-3.06667,-8.13333}}, color={0,0,255})); + connect(steamGenerator.fluidOutletI1, primaryOutlet.C) annotation (Line(points={{3.06667,-8.13333},{3.06667,-60},{50,-60}}, color={0,0,255})); + annotation (experiment(StopTime=1), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSteamGenerator_4SG; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_4SG_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_4SG_Traces.mo new file mode 100644 index 00000000..2b9eb78f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/TestSteamGenerator_4SG_Traces.mo @@ -0,0 +1,7 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.HeatExchangers; +model TestSteamGenerator_4SG_Traces + extends TestSteamGenerator_4SG( + redeclare package Medium = Properties.Media.WaterSteam, + redeclare package Medium_Primary = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace, + primaryInlet(SubC0={10})); +end TestSteamGenerator_4SG_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo new file mode 100644 index 00000000..8a9e5e13 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package HeatExchangers + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end HeatExchangers; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.order new file mode 100644 index 00000000..a33c9fb7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/HeatExchangers/package.order @@ -0,0 +1,61 @@ +TestDynamicOnePhaseFlowPipe +TestDynamicOnePhaseFlowPipe_Traces +TestDynamicOnePhaseFlowPipe_FlueGases +TestDynamicTwoPhaseFlowPipe +TestDynamicTwoPhaseFlowPipe_Traces +TestDynamicTwoPhaseFlowRiser +TestDynamicTwoPhaseFlowRiser_Traces +TestDynamicOnePhaseFlowShell +TestDynamicOnePhaseFlowShell_Traces +TestDynamicOnePhaseFlowShell_FlueGases +TestFixedPowerHeatExchanger +TestFixedPowerHeatExchanger_Traces +TestStaticExchangerKS +TestStaticExchangerKS_Traces +TestStaticExchangerDTorWorEff +TestStaticExchangerDTorWorEff_Traces +TestStaticExchangerDTorWorEff_FlueGases +TestStaticWallFlueGasesExchanger_FlueGases +TestStaticWallFlueGasesExchanger_Traces +TestStaticWallFlueGasesExchanger_CustomMixture +TestStaticPlateHeatExchanger +TestStaticPlateHeatExchanger_Traces +TestStaticPlateHeatExchanger_FlueGases +TestDynamicPlateHeatExchanger +TestDynamicPlateHeatExchanger_Traces +TestDynamicPlateHeatExchanger_FlueGases +TestDynamicPlateHeatExchangerW +TestNTUWaterHeater +TestNTUWaterHeater_Traces +TestNTUWaterHeater_FlueGases +TestSimpleDynamicCondenser +TestSimpleDynamicCondenser_Traces +TestSimpleEvaporatorWaterSteamFlueGases +TestSimpleEvaporatorWaterSteamFlueGases_Traces +TestSimpleStaticCondenser +TestSimpleStaticCondenser_Traces +TestStaticCondenser +TestStaticCondenser_Traces +TestStaticCondenserHEI +TestStaticCondenserHEI_Traces +TestStaticAerocondenser +TestDynamicCondenser +TestDynamicCondenser_Traces +TestDynamicFlueGasesMultiFluidHeatExchanger +TestDynamicFlueGasesMultiFluidHeatExchanger_Traces +TestDynamicMultiFluidHeatExchanger +TestDynamicMultiFluidHeatExchanger_FlueGases +TestDynamicMultiFluidHeatExchanger_Traces +TestDynamicMultiFluidHeatExchangerShell +TestDynamicMultiFluidHeatExchangerShell_FlueGases +TestDynamicMultiFluidHeatExchangerShell_Traces +TestDynamicWaterHeater +TestDynamicWaterHeater_Traces +TestDynamicWaterHeaterOnePipe +TestDynamicWaterHeaterOnePipe_Traces +TestDynamicWaterSteamMultiFluidsHeatExchanger +TestDynamicWaterSteamMultiFluidsHeatExchanger_Traces +TestSteamGenerator_1SG +TestSteamGenerator_1SG_Traces +TestSteamGenerator_4SG +TestSteamGenerator_4SG_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Interfaces/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Interfaces/package.order new file mode 100644 index 00000000..e69de29b diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2.mo new file mode 100644 index 00000000..8e92ed16 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2.mo @@ -0,0 +1,46 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestDeheaterMixer2 + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.DeheaterMixer2 deheaterMixer2_1(redeclare package Medium = Medium, Tmax=308) annotation (Placement(transformation(extent={{-10,-16},{10,4}},rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}},rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}},rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-50},{-30,-30}}, + rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-10},{90,10}},rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium, T0=310) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source source(redeclare package Medium = Medium, h0=30000) annotation (Placement(transformation(extent={{-90,-50},{-70,-30}},rotation=0))); +equation + connect(singularPressureLoss.C2, deheaterMixer2_1.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(deheaterMixer2_1.Cs, singularPressureLoss1.C1) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(singularPressureLoss2.C2, deheaterMixer2_1.Ce_mix) annotation (Line(points={{-30,-40},{0.1,-40},{0.1,-16}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{50,0},{70,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss.C1) annotation (Line(points={{-70,0},{-50,0}}, color={0,0,255})); + connect(source.C, singularPressureLoss2.C1) annotation (Line(points={{-70,-40},{-50,-40}}, color={0,0,255})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestDeheaterMixer2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2_FlueGases.mo new file mode 100644 index 00000000..47bc0115 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2_FlueGases.mo @@ -0,0 +1,53 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestDeheaterMixer2_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.Junctions.DeheaterMixer2 deheaterMixer2_1(redeclare package Medium = Medium, + Tmax=308, + h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-16},{10,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-50},{-30,-30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{70,-10},{90,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium, + P0=4500000, + T0=573.15) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source source(redeclare package Medium = Medium, + h0=2.5e6, + option_temperature=false) annotation (Placement(transformation(extent={{-90,-50},{-70,-30}}, rotation=0))); +equation + connect(singularPressureLoss.C2, deheaterMixer2_1.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(deheaterMixer2_1.Cs, singularPressureLoss1.C1) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(singularPressureLoss2.C2, deheaterMixer2_1.Ce_mix) annotation (Line(points={{-30,-40},{0.1,-40},{0.1,-16}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{50,0},{70,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss.C1) annotation (Line(points={{-70,0},{-50,0}}, color={0,0,255})); + connect(source.C, singularPressureLoss2.C1) annotation (Line(points={{-70,-40},{-50,-40}}, color={0,0,255})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestDeheaterMixer2_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2_Traces.mo new file mode 100644 index 00000000..bb783883 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDeheaterMixer2_Traces.mo @@ -0,0 +1,48 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestDeheaterMixer2_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.DeheaterMixer2 deheaterMixer2_1(redeclare package Medium = Medium, Tmax=308) annotation (Placement(transformation(extent={{-10,-16},{10,4}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-50},{-30,-30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-10},{90,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(redeclare package Medium = Medium, T0=310) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source source(redeclare package Medium = Medium, h0=30000) annotation (Placement(transformation(extent={{-90,-50},{-70,-30}}, rotation=0))); +equation + connect(singularPressureLoss.C2, deheaterMixer2_1.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(deheaterMixer2_1.Cs, singularPressureLoss1.C1) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + connect(singularPressureLoss2.C2, deheaterMixer2_1.Ce_mix) annotation (Line(points={{-30,-40},{0.1,-40},{0.1,-16}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{50,0},{70,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss.C1) annotation (Line(points={{-70,0},{-50,0}}, color={0,0,255})); + connect(source.C, singularPressureLoss2.C1) annotation (Line(points={{-70,-40},{-50,-40}}, color={0,0,255})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestDeheaterMixer2_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo new file mode 100644 index 00000000..6bb1a642 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestDryer + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, h0=2e6) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-14},{10,6}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink_cond(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-40},{50,-20}}))); +equation + connect(sourcePQ.C, steamDryer.Cev) annotation (Line(points={{-30,0},{-9.9,0}}, color={0,0,0})); + connect(sink.C, steamDryer.Csv) annotation (Line(points={{30,0},{9.9,0}}, color={0,0,0})); + connect(steamDryer.Csl, sink_cond.C) annotation (Line(points={{0.1,-14},{0.1,-30},{30,-30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDryer; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo new file mode 100644 index 00000000..a78582a8 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestDryer_Traces.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestDryer_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, h0=2e6, + SubC0={1}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(redeclare package Medium = Medium, redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=steamDryer.xe)) annotation (Placement(transformation(extent={{-10,-14},{10,6}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink_cond(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-40},{50,-20}}))); +equation + connect(sourcePQ.C, steamDryer.Cev) annotation (Line(points={{-30,0},{-9.9,0}}, color={0,0,0})); + connect(sink.C, steamDryer.Csv) annotation (Line(points={{30,0},{9.9,0}}, color={0,0,0})); + connect(steamDryer.Csl, sink_cond.C) annotation (Line(points={{0.1,-14},{0.1,-30},{30,-30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDryer_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier.mo new file mode 100644 index 00000000..ac220531 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier.mo @@ -0,0 +1,40 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMassFlowMultiplier + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-10},{90,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); +equation + connect(sourcePQ.C, singularPressureLoss.C1) annotation (Line(points={{-70,0},{-50,0}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sink.C) annotation (Line(points={{50,0},{70,0}}, color={0,0,255})); + connect(singularPressureLoss.C2, massFlowMultiplier.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(massFlowMultiplier.Cs, singularPressureLoss1.C1) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMassFlowMultiplier; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier_FlueGases.mo new file mode 100644 index 00000000..789689ec --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier_FlueGases.mo @@ -0,0 +1,51 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMassFlowMultiplier_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true, + C(h_vol_2(start=2830566))) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{70,-10},{90,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium, rho(start=27, displayUnit="kg/m3")) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium, rho(displayUnit="kg/m3", start=27)) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); +equation + connect(sourcePQ.C, singularPressureLoss.C1) annotation (Line(points={{-70,0},{-50,0}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sink.C) annotation (Line(points={{50,0},{70,0}}, color={0,0,255})); + connect(singularPressureLoss.C2, massFlowMultiplier.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(massFlowMultiplier.Cs, singularPressureLoss1.C1) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMassFlowMultiplier_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier_Traces.mo new file mode 100644 index 00000000..623e1b0e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMassFlowMultiplier_Traces.mo @@ -0,0 +1,43 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMassFlowMultiplier_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-10},{90,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); +equation + connect(sourcePQ.C, singularPressureLoss.C1) annotation (Line(points={{-70,0},{-50,0}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sink.C) annotation (Line(points={{50,0},{70,0}}, color={0,0,255})); + connect(singularPressureLoss.C2, massFlowMultiplier.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,255})); + connect(massFlowMultiplier.Cs, singularPressureLoss1.C1) annotation (Line(points={{10,0},{30,0}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMassFlowMultiplier_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2.mo new file mode 100644 index 00000000..88646025 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2.mo @@ -0,0 +1,26 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer2 + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,-10},{54,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,10},{-26,30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-30},{-26,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source sourceP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,10},{-66,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,-30},{-66,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{74,-10},{94,10}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.3) annotation (Placement(transformation(extent={{-46,-10},{-26,10}}, rotation=0))); +equation + connect(singularPressureLoss1.C2, mixer2_1.Ce1) annotation (Line(points={{-26,20},{0,20},{0,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, mixer2_1.Ce2) annotation (Line(points={{-26,-20},{0,-20},{0,-10}}, color={0,0,255})); + connect(mixer2_1.Cs, singularPressureLoss.C1) annotation (Line(points={{14,0},{34,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss1.C1) annotation (Line(points={{-66,20},{-46,20}}, color={0,0,255})); + connect(sourceP1.C, singularPressureLoss2.C1) annotation (Line(points={{-66,-20},{-46,-20}}, color={0,0,255})); + connect(singularPressureLoss.C2, sinkP.C) annotation (Line(points={{54,0},{74,0}}, color={0,0,255})); + connect(constante.y, mixer2_1.Ialpha1) annotation (Line(points={{-25,0},{-14,0},{-14,6},{-3,6}})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2_FlueGases.mo new file mode 100644 index 00000000..a89f075e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2_FlueGases.mo @@ -0,0 +1,38 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer2_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-6,-10},{14,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,-10},{54,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,10},{-26,30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-30},{-26,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source sourceP( + redeclare package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-86,10},{-66,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + P0=4500000, + T0=573.15) annotation (Placement(transformation(extent={{-86,-30},{-66,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP( + redeclare package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{74,-10},{94,10}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.3) annotation (Placement(transformation(extent={{-46,-10},{-26,10}}, rotation=0))); +equation + connect(singularPressureLoss1.C2, mixer2_1.Ce1) annotation (Line(points={{-26,20},{0,20},{0,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, mixer2_1.Ce2) annotation (Line(points={{-26,-20},{0,-20},{0,-10}}, color={0,0,255})); + connect(mixer2_1.Cs, singularPressureLoss.C1) annotation (Line(points={{14,0},{34,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss1.C1) annotation (Line(points={{-66,20},{-46,20}}, color={0,0,255})); + connect(sourceP1.C, singularPressureLoss2.C1) annotation (Line(points={{-66,-20},{-46,-20}}, color={0,0,255})); + connect(singularPressureLoss.C2, sinkP.C) annotation (Line(points={{54,0},{74,0}}, color={0,0,255})); + connect(constante.y, mixer2_1.Ialpha1) annotation (Line(points={{-25,0},{-14,0},{-14,6},{-3,6}})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer2_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2_Traces.mo new file mode 100644 index 00000000..108d702f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer2_Traces.mo @@ -0,0 +1,29 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer2_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,-10},{54,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,10},{-26,30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-30},{-26,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source sourceP(redeclare package Medium = Medium, SubC0={10}) annotation (Placement(transformation(extent={{-86,10},{-66,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(redeclare package Medium = Medium, SubC0={20}) annotation (Placement(transformation(extent={{-86,-30},{-66,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{74,-10},{94,10}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.3) annotation (Placement(transformation(extent={{-46,-10},{-26,10}}, rotation=0))); +equation + connect(singularPressureLoss1.C2, mixer2_1.Ce1) annotation (Line(points={{-26,20},{0,20},{0,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, mixer2_1.Ce2) annotation (Line(points={{-26,-20},{0,-20},{0,-10}}, color={0,0,255})); + connect(mixer2_1.Cs, singularPressureLoss.C1) annotation (Line(points={{14,0},{34,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss1.C1) annotation (Line(points={{-66,20},{-46,20}}, color={0,0,255})); + connect(sourceP1.C, singularPressureLoss2.C1) annotation (Line(points={{-66,-20},{-46,-20}}, color={0,0,255})); + connect(singularPressureLoss.C2, sinkP.C) annotation (Line(points={{54,0},{74,0}}, color={0,0,255})); + connect(constante.y, mixer2_1.Ialpha1) annotation (Line(points={{-25,0},{-14,0},{-14,6},{-3,6}})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer2_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3.mo new file mode 100644 index 00000000..7161949d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer3 + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.Mixer3 mixer3_1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,-10},{54,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,10},{-26,30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-30},{-26,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source sourceP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,10},{-66,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,-30},{-66,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{74,-10},{94,10}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0) annotation (Placement(transformation(extent={{-54,52},{-34,72}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-10},{-26,10}},rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-86,-10},{-66,10}},rotation=0))); +equation + connect(singularPressureLoss1.C2,mixer3_1. Ce1) annotation (Line(points={{-26,20},{0,20},{0,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2,mixer3_1. Ce2) annotation (Line(points={{-26,-20},{0,-20},{0,-10}}, color={0,0,255})); + connect(mixer3_1.Cs, singularPressureLoss.C1) annotation (Line(points={{14,0},{34,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss1.C1) annotation (Line(points={{-66,20},{-46,20}}, color={0,0,255})); + connect(sourceP1.C, singularPressureLoss2.C1) annotation (Line(points={{-66,-20},{-46,-20}}, color={0,0,255})); + connect(singularPressureLoss.C2, sinkP.C) annotation (Line(points={{54,0},{74,0}}, color={0,0,255})); + connect(constante.y,mixer3_1. Ialpha1) annotation (Line(points={{-33,62},{-16,62},{-16,6},{-3,6}})); + connect(sourceQ.C, singularPressureLoss3.C1) annotation (Line(points={{-66,0},{-46,0}}, color={0,0,255})); + connect(singularPressureLoss3.C2, mixer3_1.Ce3) annotation (Line(points={{-26,0},{-6,0}}, color={0,0,0})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer3; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3_FlueGases.mo new file mode 100644 index 00000000..ed8b978e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3_FlueGases.mo @@ -0,0 +1,35 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer3_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.Junctions.Mixer3 mixer3_1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,-10},{54,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,10},{-26,30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-30},{-26,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source sourceP(redeclare package Medium = Medium, h0=2830566) + annotation (Placement(transformation(extent={{-86,10},{-66,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(redeclare package Medium = Medium, + P0=4500000, + T0=573.15) annotation (Placement(transformation(extent={{-86,-30},{-66,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium, h0=2830566) + annotation (Placement(transformation(extent={{74,-10},{94,10}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0) annotation (Placement(transformation(extent={{-54,52},{-34,72}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-10},{-26,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package Medium = Medium, h0=2830566) + annotation (Placement(transformation(extent={{-86,-10},{-66,10}}, rotation=0))); +equation + connect(singularPressureLoss1.C2, mixer3_1.Ce1) annotation (Line(points={{-26,20},{0,20},{0,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, mixer3_1.Ce2) annotation (Line(points={{-26,-20},{0,-20},{0,-10}}, color={0,0,255})); + connect(mixer3_1.Cs, singularPressureLoss.C1) annotation (Line(points={{14,0},{34,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss1.C1) annotation (Line(points={{-66,20},{-46,20}}, color={0,0,255})); + connect(sourceP1.C, singularPressureLoss2.C1) annotation (Line(points={{-66,-20},{-46,-20}}, color={0,0,255})); + connect(singularPressureLoss.C2, sinkP.C) annotation (Line(points={{54,0},{74,0}}, color={0,0,255})); + connect(constante.y, mixer3_1.Ialpha1) annotation (Line(points={{-33,62},{-16,62},{-16,6},{-3,6}})); + connect(sourceQ.C, singularPressureLoss3.C1) annotation (Line(points={{-66,0},{-46,0}}, color={0,0,255})); + connect(singularPressureLoss3.C2, mixer3_1.Ce3) annotation (Line(points={{-26,0},{-6,0}}, color={0,0,0})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer3_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3_Traces.mo new file mode 100644 index 00000000..e0839bec --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer3_Traces.mo @@ -0,0 +1,33 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer3_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.Mixer3 mixer3_1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{34,-10},{54,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,10},{-26,30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-30},{-26,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Source sourceP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,10},{-66,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,-30},{-66,-10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{74,-10},{94,10}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0) annotation (Placement(transformation(extent={{-54,52},{-34,72}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-46,-10},{-26,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-86,-10},{-66,10}}, rotation=0))); +equation + connect(singularPressureLoss1.C2, mixer3_1.Ce1) annotation (Line(points={{-26,20},{0,20},{0,10}}, color={0,0,255})); + connect(singularPressureLoss2.C2, mixer3_1.Ce2) annotation (Line(points={{-26,-20},{0,-20},{0,-10}}, color={0,0,255})); + connect(mixer3_1.Cs, singularPressureLoss.C1) annotation (Line(points={{14,0},{34,0}}, color={0,0,255})); + connect(sourceP.C, singularPressureLoss1.C1) annotation (Line(points={{-66,20},{-46,20}}, color={0,0,255})); + connect(sourceP1.C, singularPressureLoss2.C1) annotation (Line(points={{-66,-20},{-46,-20}}, color={0,0,255})); + connect(singularPressureLoss.C2, sinkP.C) annotation (Line(points={{54,0},{74,0}}, color={0,0,255})); + connect(constante.y, mixer3_1.Ialpha1) annotation (Line(points={{-33,62},{-16,62},{-16,6},{-3,6}})); + connect(sourceQ.C, singularPressureLoss3.C1) annotation (Line(points={{-66,0},{-46,0}}, color={0,0,255})); + connect(singularPressureLoss3.C2, mixer3_1.Ce3) annotation (Line(points={{-26,0},{-6,0}}, color={0,0,0})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer3_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer8.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer8.mo new file mode 100644 index 00000000..b653f8bb --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer8.mo @@ -0,0 +1,84 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer8 + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + C(h_vol_2(start=71016.12237181116)), + Q(start=1659.0367844064706)) annotation (Placement(transformation(extent={{-104,0},{-84,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + P0=2e5, + Q(start=240.90950915749266)) annotation (Placement(transformation(extent={{-104,-60},{-84,-40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve valve1( + redeclare package Medium = Medium, + C1(h_vol_2(start=71004.06316721764)), + C2(h_vol_1(start=70977.89042837733)), + Pm(start=120690.8728732298)) annotation (Placement(transformation(extent={{-10,6},{10,26}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve valve2( + redeclare package Medium = Medium, + C1(h_vol_1(start=70921.01678153824)), + Pm(start=118970.64778985853)) annotation (Placement(transformation(extent={{-10,-54},{10,-34}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve valve3( + redeclare package Medium = Medium, + Q(start=1899.9462935639633), + Pm(start=148922.95104974302, displayUnit="bar")) annotation (Placement(transformation(extent={{50,-24},{70,-4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{82,-30},{102,-10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe2( + Duration=1, + Initialvalue=1, + Finalvalue=0.05) annotation (Placement(transformation(extent={{32,20},{52,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe3( + Initialvalue=1, + Starttime=2, + Finalvalue=0.001) annotation (Placement(transformation(extent={{-30,30},{-10,50}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe4( + Initialvalue=1, + Starttime=1, + Finalvalue=0.001) annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipe1(redeclare package Medium = Medium, Pm(start=286222.6050714449, displayUnit="bar")) annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipe2(redeclare package Medium = Medium, Pm(start=199709.4772494724, displayUnit="bar")) annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-40,0},{-20,20}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,-30},{40,-10}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}, rotation=0))); +equation + connect(valve3.C2, puitsP2.C) annotation (Line(points={{70,-20},{82,-20}}, color={0,0,255})); + connect(rampe2.y, valve3.Ouv) annotation (Line(points={{53,30},{60,30},{60,-3}})); + connect(rampe3.y, valve1.Ouv) annotation (Line(points={{-9,40},{0,40},{0,27}})); + connect(rampe4.y, valve2.Ouv) annotation (Line(points={{-9,-20},{0,-20},{0,-33}})); + connect(sourceP.C, pipe1.C1) annotation (Line(points={{-84,10},{-80,10}}, color={0,0,255})); + connect(sourceP1.C, pipe2.C1) annotation (Line(points={{-84,-50},{-80,-50}}, color={0,0,255})); + connect(pipe1.C2, staticVolume.Ce4) annotation (Line(points={{-60,10},{-50,10},{-50,14},{-40.2,14}}, color={0,0,255})); + connect(staticVolume.Cs, valve1.C1) annotation (Line(points={{-20,10},{-10,10}}, color={0,0,255})); + connect(staticVolume1.Cs, valve3.C1) annotation (Line(points={{40,-20},{50,-20}}, color={0,0,255})); + connect(valve1.C2, staticVolume1.Ce1) annotation (Line(points={{10,10},{33,10},{33,-9.8}}, color={0,0,255})); + connect(valve2.C2, staticVolume1.Ce8) annotation (Line(points={{10,-50},{33,-50},{33,-29.9}}, color={0,0,255})); + connect(pipe2.C2, staticVolume2.Ce4) annotation (Line(points={{-60,-50},{-50,-50},{-50,-46},{-40.2,-46}}, color={0,0,255})); + connect(staticVolume2.Cs, valve2.C1) annotation (Line(points={{-20,-50},{-10,-50}}, color={0,0,255})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer8; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer8_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer8_Traces.mo new file mode 100644 index 00000000..c4016de3 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestMixer8_Traces.mo @@ -0,0 +1,87 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestMixer8_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + C(h_vol_2(start=71016.12237181116)), + Q(start=1659.0367844064706)) annotation (Placement(transformation(extent={{-104,0},{-84,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( + redeclare package Medium = Medium, + P0=2e5, + Q(start=240.90950915749266)) annotation (Placement(transformation(extent={{-104,-60},{-84,-40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve valve1( + redeclare package Medium = Medium, + C1(h_vol_2(start=71004.06316721764)), + C2(h_vol_1(start=70977.89042837733)), + Pm(start=120690.8728732298)) annotation (Placement(transformation(extent={{-10,6},{10,26}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve valve2( + redeclare package Medium = Medium, + C1(h_vol_1(start=70921.01678153824)), + Pm(start=118970.64778985853)) annotation (Placement(transformation(extent={{-10,-54},{10,-34}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve valve3( + redeclare package Medium = Medium, + Q(start=1899.9462935639633), + Pm(start=148922.95104974302, displayUnit="bar")) annotation (Placement(transformation(extent={{50,-24},{70,-4}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{82,-30},{102,-10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe2( + Duration=1, + Initialvalue=1, + Finalvalue=0.05) annotation (Placement(transformation(extent={{32,20},{52,40}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe3( + Initialvalue=1, + Starttime=2, + Finalvalue=0.001) annotation (Placement(transformation(extent={{-30,30},{-10,50}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe4( + Initialvalue=1, + Starttime=1, + Finalvalue=0.001) annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipe1(redeclare package Medium = Medium, Pm(start=286222.6050714449, displayUnit="bar")) annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipe2(redeclare package Medium = Medium, Pm(start=199709.4772494724, displayUnit="bar")) annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-40,0},{-20,20}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,-30},{40,-10}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}, rotation=0))); +equation + connect(valve3.C2, puitsP2.C) annotation (Line(points={{70,-20},{82,-20}}, color={0,0,255})); + connect(rampe2.y, valve3.Ouv) annotation (Line(points={{53,30},{60,30},{60,-3}})); + connect(rampe3.y, valve1.Ouv) annotation (Line(points={{-9,40},{0,40},{0,27}})); + connect(rampe4.y, valve2.Ouv) annotation (Line(points={{-9,-20},{0,-20},{0,-33}})); + connect(sourceP.C, pipe1.C1) annotation (Line(points={{-84,10},{-80,10}}, color={0,0,255})); + connect(sourceP1.C, pipe2.C1) annotation (Line(points={{-84,-50},{-80,-50}}, color={0,0,255})); + connect(pipe1.C2, staticVolume.Ce4) annotation (Line(points={{-60,10},{-50,10},{-50,14},{-40.2,14}}, color={0,0,255})); + connect(staticVolume.Cs, valve1.C1) annotation (Line(points={{-20,10},{-10,10}}, color={0,0,255})); + connect(staticVolume1.Cs, valve3.C1) annotation (Line(points={{40,-20},{50,-20}}, color={0,0,255})); + connect(valve1.C2, staticVolume1.Ce1) annotation (Line(points={{10,10},{33,10},{33,-9.8}}, color={0,0,255})); + connect(valve2.C2, staticVolume1.Ce8) annotation (Line(points={{10,-50},{33,-50},{33,-29.9}}, color={0,0,255})); + connect(pipe2.C2, staticVolume2.Ce4) annotation (Line(points={{-60,-50},{-50,-50},{-50,-46},{-40.2,-46}}, color={0,0,255})); + connect(staticVolume2.Cs, valve2.C1) annotation (Line(points={{-20,-50},{-10,-50}}, color={0,0,255})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestMixer8_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2.mo new file mode 100644 index 00000000..7558ca29 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2.mo @@ -0,0 +1,26 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSplitter2 + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.Splitter2 splitter2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,-10},{0,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP(redeclare replaceable package Medium = Medium, Q0=200) annotation (Placement(transformation(extent={{-100,-10},{-80,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{80,30},{100,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{80,-50},{100,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,30},{60,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,-50},{60,-30}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.2) annotation (Placement(transformation(extent={{-40,10},{-20,30}}, rotation=0))); +equation + connect(sourceP.C, singularPressureLoss.C1) annotation (Line(points={{-80,0},{-60,0}}, color={0,0,255})); + connect(singularPressureLoss.C2, splitter2.Ce) annotation (Line(points={{-40,0},{-20,0}}, color={0,0,255})); + connect(splitter2.Cs1, singularPressureLoss1.C1) annotation (Line(points={{-6,10},{-6,40},{40,40}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{60,40},{80,40}}, color={0,0,255})); + connect(splitter2.Cs2, singularPressureLoss2.C1) annotation (Line(points={{-6,-10},{-6,-40},{40,-40}}, color={0,0,255})); + connect(singularPressureLoss2.C2, sinkP1.C) annotation (Line(points={{60,-40},{80,-40}}, color={0,0,255})); + connect(constante.y, splitter2.Ialpha1) annotation (Line(points={{-19,20},{-14,20},{-14,6},{-9,6}})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSplitter2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2_FlueGases.mo new file mode 100644 index 00000000..9443b946 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2_FlueGases.mo @@ -0,0 +1,41 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSplitter2_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.Splitter2 splitter2(redeclare replaceable package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-20,-10},{0,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP( + redeclare replaceable package Medium = Medium, + Q0=200, + T0=573.15, + option_temperature=true, + SubC0={3}) annotation (Placement(transformation(extent={{-100,-10},{-80,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{80,30},{100,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{80,-50},{100,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,30},{60,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,-50},{60,-30}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.2) annotation (Placement(transformation(extent={{-40,10},{-20,30}}, rotation=0))); +equation + connect(sourceP.C, singularPressureLoss.C1) annotation (Line(points={{-80,0},{-60,0}}, color={0,0,255})); + connect(singularPressureLoss.C2, splitter2.Ce) annotation (Line(points={{-40,0},{-20,0}}, color={0,0,255})); + connect(splitter2.Cs1, singularPressureLoss1.C1) annotation (Line(points={{-6,10},{-6,40},{40,40}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{60,40},{80,40}}, color={0,0,255})); + connect(splitter2.Cs2, singularPressureLoss2.C1) annotation (Line(points={{-6,-10},{-6,-40},{40,-40}}, color={0,0,255})); + connect(singularPressureLoss2.C2, sinkP1.C) annotation (Line(points={{60,-40},{80,-40}}, color={0,0,255})); + connect(constante.y, splitter2.Ialpha1) annotation (Line(points={{-19,20},{-14,20},{-14,6},{-9,6}})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSplitter2_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2_Traces.mo new file mode 100644 index 00000000..84f56024 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter2_Traces.mo @@ -0,0 +1,30 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSplitter2_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.Splitter2 splitter2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,-10},{0,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP(redeclare replaceable package Medium = Medium, Q0=200, + SubC0={3}) annotation (Placement(transformation(extent={{-100,-10},{-80,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{80,30},{100,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{80,-50},{100,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,30},{60,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,-50},{60,-30}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.2) annotation (Placement(transformation(extent={{-40,10},{-20,30}}, rotation=0))); +equation + connect(sourceP.C, singularPressureLoss.C1) annotation (Line(points={{-80,0},{-60,0}}, color={0,0,255})); + connect(singularPressureLoss.C2, splitter2.Ce) annotation (Line(points={{-40,0},{-20,0}}, color={0,0,255})); + connect(splitter2.Cs1, singularPressureLoss1.C1) annotation (Line(points={{-6,10},{-6,40},{40,40}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{60,40},{80,40}}, color={0,0,255})); + connect(splitter2.Cs2, singularPressureLoss2.C1) annotation (Line(points={{-6,-10},{-6,-40},{40,-40}}, color={0,0,255})); + connect(singularPressureLoss2.C2, sinkP1.C) annotation (Line(points={{60,-40},{80,-40}}, color={0,0,255})); + connect(constante.y, splitter2.Ialpha1) annotation (Line(points={{-19,20},{-14,20},{-14,6},{-9,6}})); + annotation (experiment(StopTime=10), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSplitter2_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3.mo new file mode 100644 index 00000000..4fec417a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3.mo @@ -0,0 +1,35 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSplitter3 + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.Splitter3 splitter3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-16,-10},{4,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP1(redeclare package Medium = Medium, Q0=100) annotation (Placement(transformation(extent={{-96,-10},{-76,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-56,-10},{-36,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{84,30},{104,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{84,-50},{104,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss4(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{44,30},{64,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss5(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{44,-50},{64,-30}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k=0) annotation (Placement(transformation(extent={{-36,10},{-16,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP4(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{84,-10},{104,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0) annotation (Placement(transformation(extent={{-36,-30},{-16,-10}}, rotation=0))); +equation + connect(sourceP1.C, singularPressureLoss3.C1) annotation (Line(points={{-76,0},{-56,0}}, color={0,0,255})); + connect(singularPressureLoss3.C2, splitter3.Ce) annotation (Line(points={{-36,0},{-15.8,0}}, color={0,0,255})); + connect(splitter3.Cs1, singularPressureLoss4.C1) annotation (Line(points={{-2,10},{-2,40},{44,40}}, color={0,0,255})); + connect(singularPressureLoss4.C2, sinkP2.C) annotation (Line(points={{64,40},{84,40}}, color={0,0,255})); + connect(splitter3.Cs2, singularPressureLoss5.C1) annotation (Line(points={{-2,-10},{-2,-40},{44,-40}}, color={0,0,255})); + connect(singularPressureLoss5.C2, sinkP3.C) annotation (Line(points={{64,-40},{84,-40}}, color={0,0,255})); + connect(constante1.y, splitter3.Ialpha1) annotation (Line(points={{-15,20},{-10,20},{-10,6},{-5,6}})); + connect(splitter3.Cs3, sinkP4.C) annotation (Line(points={{4,0},{84,0}}, color={0,0,255})); + connect(splitter3.Ialpha2, constante2.y) annotation (Line(points={{-5,-6},{-10,-6},{-10,-20},{-15,-20}})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+This model is documented in Sect. 14.8.5 of the ThermoSysPro book. +
The results reported in the ThermoSysPro book were computed using Dymola. +")); +end TestSplitter3; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3_FlueGases.mo new file mode 100644 index 00000000..0f66835f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3_FlueGases.mo @@ -0,0 +1,41 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSplitter3_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.Junctions.Splitter3 splitter3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-16,-10},{4,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP1(redeclare package Medium = Medium, Q0=100, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-96,-10},{-76,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-56,-10},{-36,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium, h0=2830566) + annotation (Placement(transformation(extent={{84,30},{104,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP3(redeclare package Medium = Medium, h0=2830566) + annotation (Placement(transformation(extent={{84,-50},{104,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss4(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{44,30},{64,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss5(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{44,-50},{64,-30}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k=0) annotation (Placement(transformation(extent={{-36,10},{-16,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP4(redeclare package Medium = Medium, + P0=4500000, + T0=573.15) annotation (Placement(transformation(extent={{84,-10},{104,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0) annotation (Placement(transformation(extent={{-36,-30},{-16,-10}}, rotation=0))); +equation + connect(sourceP1.C, singularPressureLoss3.C1) annotation (Line(points={{-76,0},{-56,0}}, color={0,0,255})); + connect(singularPressureLoss3.C2, splitter3.Ce) annotation (Line(points={{-36,0},{-15.8,0}}, color={0,0,255})); + connect(splitter3.Cs1, singularPressureLoss4.C1) annotation (Line(points={{-2,10},{-2,40},{44,40}}, color={0,0,255})); + connect(singularPressureLoss4.C2, sinkP2.C) annotation (Line(points={{64,40},{84,40}}, color={0,0,255})); + connect(splitter3.Cs2, singularPressureLoss5.C1) annotation (Line(points={{-2,-10},{-2,-40},{44,-40}}, color={0,0,255})); + connect(singularPressureLoss5.C2, sinkP3.C) annotation (Line(points={{64,-40},{84,-40}}, color={0,0,255})); + connect(constante1.y, splitter3.Ialpha1) annotation (Line(points={{-15,20},{-10,20},{-10,6},{-5,6}})); + connect(splitter3.Cs3, sinkP4.C) annotation (Line(points={{4,0},{84,0}}, color={0,0,255})); + connect(splitter3.Ialpha2, constante2.y) annotation (Line(points={{-5,-6},{-10,-6},{-10,-20},{-15,-20}})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+This model is documented in Sect. 14.8.5 of the ThermoSysPro book. +
The results reported in the ThermoSysPro book were computed using Dymola. +")); +end TestSplitter3_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3_Traces.mo new file mode 100644 index 00000000..3da13371 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSplitter3_Traces.mo @@ -0,0 +1,38 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSplitter3_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Junctions.Splitter3 splitter3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-16,-10},{4,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP1(redeclare package Medium = Medium, Q0=100) annotation (Placement(transformation(extent={{-96,-10},{-76,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-56,-10},{-36,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{84,30},{104,50}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{84,-50},{104,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss4(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{44,30},{64,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss5(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{44,-50},{64,-30}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k=0) annotation (Placement(transformation(extent={{-36,10},{-16,30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP4(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{84,-10},{104,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0) annotation (Placement(transformation(extent={{-36,-30},{-16,-10}}, rotation=0))); +equation + connect(sourceP1.C, singularPressureLoss3.C1) annotation (Line(points={{-76,0},{-56,0}}, color={0,0,255})); + connect(singularPressureLoss3.C2, splitter3.Ce) annotation (Line(points={{-36,0},{-15.8,0}}, color={0,0,255})); + connect(splitter3.Cs1, singularPressureLoss4.C1) annotation (Line(points={{-2,10},{-2,40},{44,40}}, color={0,0,255})); + connect(singularPressureLoss4.C2, sinkP2.C) annotation (Line(points={{64,40},{84,40}}, color={0,0,255})); + connect(splitter3.Cs2, singularPressureLoss5.C1) annotation (Line(points={{-2,-10},{-2,-40},{44,-40}}, color={0,0,255})); + connect(singularPressureLoss5.C2, sinkP3.C) annotation (Line(points={{64,-40},{84,-40}}, color={0,0,255})); + connect(constante1.y, splitter3.Ialpha1) annotation (Line(points={{-15,20},{-10,20},{-10,6},{-5,6}})); + connect(splitter3.Cs3, sinkP4.C) annotation (Line(points={{4,0},{84,0}}, color={0,0,255})); + connect(splitter3.Ialpha2, constante2.y) annotation (Line(points={{-5,-6},{-10,-6},{-10,-20},{-15,-20}})); + annotation ( + experiment(StopTime=10), + Diagram(graphics), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+This model is documented in Sect. 14.8.5 of the ThermoSysPro book. +
The results reported in the ThermoSysPro book were computed using Dymola. +")); +end TestSplitter3_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum.mo new file mode 100644 index 00000000..2714cbae --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestStaticDrum + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI1(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI2(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(redeclare package Medium = Medium, Q0=10) annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare package Medium = Medium, P0=100e5) annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSink heatSource annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI3(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); +equation + connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) annotation (Line(points={{-60,-40},{-48,-40},{-48,0.6}}, color={0,0,255})); + connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20,0},{40,0}}, color={0,0,255})); + connect(heatSource.C[1], StaticDrumTh1.Cth) annotation (Line(points={{-70,20.2},{-70,10},{-44,10}}, color={191,95,0})); + connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1) annotation (Line(points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255})); + connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1) annotation (Line(points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255})); + connect(sourcePQ.C, singularPressureLossVALI2.C1) annotation (Line(points={{-70,-80},{-66,-80},{-66,-54},{-84,-54},{-84,-40},{-80,-40}}, color={0,0,0})); + connect(singularPressureLossVALI3.C2, sinkP2.C) annotation (Line(points={{0,60},{60,60}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestStaticDrum; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Plug.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Plug.mo new file mode 100644 index 00000000..ad146428 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Plug.mo @@ -0,0 +1,53 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestStaticDrum_Plug + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI1(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI2(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(redeclare package Medium = Medium, Q0=10) annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + option_temperature=2, + W0={2.4e8}, + T0={290}) annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI3(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium, P0=3e5) annotation (Placement(transformation(extent={{-26,-90},{-6,-70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium = Medium, Q0=100) annotation (Placement(transformation(extent={{-56,-90},{-36,-70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.PlugA sourcePlug(redeclare package Medium = Medium, C(h(fixed=true))) annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation=0))); +equation + connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) annotation (Line(points={{-60,-40},{-60,0.6},{-48,0.6}}, color={0,0,255})); + connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20,0},{40,0}}, color={0,0,255})); + connect(heatSource.C[1], StaticDrumTh1.Cth) annotation (Line(points={{-70,20.2},{-70,10},{-44,10}}, color={191,95,0})); + connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1) annotation (Line(points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255})); + connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1) annotation (Line(points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255})); + connect(refQ.C2, refP.C1) annotation (Line(points={{-36,-80},{-26,-80}}, color={0,0,255})); + connect(sourcePlug.C, refQ.C1) annotation (Line(points={{-70,-80},{-56,-80}}, color={0,0,255})); + connect(refP.C2, singularPressureLossVALI2.C1) annotation (Line(points={{-6,-80},{-2,-80},{-2,-56},{-84,-56},{-84,-40},{-80,-40}}, color={0,0,0})); + connect(singularPressureLossVALI3.C2, sinkP2.C) annotation (Line(points={{0,60},{60,60}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestStaticDrum_Plug; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Plug_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Plug_Traces.mo new file mode 100644 index 00000000..3d031a88 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Plug_Traces.mo @@ -0,0 +1,58 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestStaticDrum_Plug_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace; + ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation(x=StaticDrumTh1.x)) annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI1(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI2(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(redeclare package Medium = Medium, Q0=10) annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + option_temperature=2, + W0={2.4e8}, + T0={290}) annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI3(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium, P0=3e5) annotation (Placement(transformation(extent={{-26,-90},{-6,-70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(redeclare package Medium = Medium, Q0=100) annotation (Placement(transformation(extent={{-56,-90},{-36,-70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.PlugA sourcePlug( + redeclare package Medium = Medium, + SubC0={10}, + C(h(fixed=false))) annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation=0))); +equation + connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) annotation (Line(points={{-60,-40},{-60,0.6},{-48,0.6}}, color={0,0,255})); + connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20,0},{40,0}}, color={0,0,255})); + connect(heatSource.C[1], StaticDrumTh1.Cth) annotation (Line(points={{-70,20.2},{-70,10},{-44,10}}, color={191,95,0})); + connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1) annotation (Line(points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255})); + connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1) annotation (Line(points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255})); + connect(refQ.C2, refP.C1) annotation (Line(points={{-36,-80},{-26,-80}}, color={0,0,255})); + connect(sourcePlug.C, refQ.C1) annotation (Line(points={{-70,-80},{-56,-80}}, color={0,0,255})); + connect(refP.C2, singularPressureLossVALI2.C1) annotation (Line(points={{-6,-80},{-2,-80},{-2,-56},{-84,-56},{-84,-40},{-80,-40}}, color={0,0,0})); + connect(singularPressureLossVALI3.C2, sinkP2.C) annotation (Line(points={{0,60},{60,60}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestStaticDrum_Plug_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Traces.mo new file mode 100644 index 00000000..3d5d4c78 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestStaticDrum_Traces.mo @@ -0,0 +1,30 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestStaticDrum_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace; + ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation(x=StaticDrumTh1.x)) annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI1(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI2(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(redeclare package Medium = Medium, Q0=10) annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare package Medium = Medium, + P0=10000000, + SubC0={10}) annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSink heatSource annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLossVALI3(redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); +equation + connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) annotation (Line(points={{-60,-40},{-48,-40},{-48,0.6}}, color={0,0,255})); + connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20,0},{40,0}}, color={0,0,255})); + connect(heatSource.C[1], StaticDrumTh1.Cth) annotation (Line(points={{-70,20.2},{-70,10},{-44,10}}, color={191,95,0})); + connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1) annotation (Line(points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255})); + connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1) annotation (Line(points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255})); + connect(sourcePQ.C, singularPressureLossVALI2.C1) annotation (Line(points={{-70,-80},{-66,-80},{-66,-54},{-84,-54},{-84,-40},{-80,-40}}, color={0,0,0})); + connect(singularPressureLossVALI3.C2, sinkP2.C) annotation (Line(points={{0,60},{60,60}}, color={0,0,0})); + annotation (experiment(StopTime=1000), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestStaticDrum_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSteamExtractionSplitter.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSteamExtractionSplitter.mo new file mode 100644 index 00000000..bb39c918 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSteamExtractionSplitter.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSteamExtractionSplitter + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Junctions.SteamExtractionSplitter steamExtractionSplitter(redeclare package Medium = Medium, alpha=0.9) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package Medium = Medium, h0=2600000) annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare package Medium = Medium, P0=100e5) annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium, K=2.e-3) annotation (Placement(transformation(extent={{0,-20},{20,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sink(redeclare package Medium = Medium, Q0=10) annotation (Placement(transformation(extent={{40,-20},{60,0}}, rotation=0))); +equation + connect(sourceQ.C, singularPressureLoss2.C1) annotation (Line(points={{-80,30},{-60,30}}, color={0,0,255})); + connect(singularPressureLoss2.C2, steamExtractionSplitter.Ce) annotation (Line(points={{-40,30},{-20.3,30}}, color={0,0,255})); + connect(steamExtractionSplitter.Cs, singularPressureLoss1.C1) annotation (Line(points={{0.3,30},{20,30}}, color={0,0,255})); + connect(steamExtractionSplitter.Cex, singularPressureLoss3.C1) annotation (Line(points={{-6,20},{-6,-10},{0,-10}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{40,30},{60,30}}, color={0,0,255})); + connect(singularPressureLoss3.C2, sink.C) annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Diagram(graphics), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSteamExtractionSplitter; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSteamExtractionSplitter_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSteamExtractionSplitter_Traces.mo new file mode 100644 index 00000000..83e5941e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/TestSteamExtractionSplitter_Traces.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Junctions; +model TestSteamExtractionSplitter_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace; + ThermoSysPro.Fluid.Junctions.SteamExtractionSplitter steamExtractionSplitter(redeclare package Medium = Medium, alpha=0.9, redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=steamExtractionSplitter.xe)) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare package Medium = Medium, h0=2600000) annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare package Medium = Medium, P0=100e5) annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3(redeclare package Medium = Medium, K=2.e-3) annotation (Placement(transformation(extent={{0,-20},{20,0}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sink(redeclare package Medium = Medium, Q0=10) annotation (Placement(transformation(extent={{40,-20},{60,0}}, rotation=0))); +equation + connect(sourceQ.C, singularPressureLoss2.C1) annotation (Line(points={{-80,30},{-60,30}}, color={0,0,255})); + connect(singularPressureLoss2.C2, steamExtractionSplitter.Ce) annotation (Line(points={{-40,30},{-20.3,30}}, color={0,0,255})); + connect(steamExtractionSplitter.Cs, singularPressureLoss1.C1) annotation (Line(points={{0.3,30},{20,30}}, color={0,0,255})); + connect(steamExtractionSplitter.Cex, singularPressureLoss3.C1) annotation (Line(points={{-6,20},{-6,-10},{0,-10}}, color={0,0,255})); + connect(singularPressureLoss1.C2, sinkP.C) annotation (Line(points={{40,30},{60,30}}, color={0,0,255})); + connect(singularPressureLoss3.C2, sink.C) annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Diagram(graphics), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSteamExtractionSplitter_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo new file mode 100644 index 00000000..92e0061d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package Junctions + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end Junctions; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order new file mode 100644 index 00000000..f44cdf65 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Junctions/package.order @@ -0,0 +1,28 @@ +TestDryer +TestDryer_Traces +TestSplitter2 +TestSplitter2_Traces +TestSplitter2_FlueGases +TestMixer2 +TestMixer2_Traces +TestMixer2_FlueGases +TestDeheaterMixer2 +TestDeheaterMixer2_Traces +TestDeheaterMixer2_FlueGases +TestMassFlowMultiplier +TestMassFlowMultiplier_Traces +TestMassFlowMultiplier_FlueGases +TestMixer3 +TestMixer3_Traces +TestMixer3_FlueGases +TestMixer8 +TestMixer8_Traces +TestSplitter3 +TestSplitter3_Traces +TestSplitter3_FlueGases +TestStaticDrum +TestStaticDrum_Traces +TestStaticDrum_Plug +TestStaticDrum_Plug_Traces +TestSteamExtractionSplitter +TestSteamExtractionSplitter_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP.mo new file mode 100644 index 00000000..76c078a7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP.mo @@ -0,0 +1,43 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.LoopBreakers; +model TestLoopBreakerP + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Splitter2 splitter2_1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-56,0},{-36,20}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{80,0},{100,20}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.5) annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerP loopBreakerP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{10,-20},{30,0}}, rotation=0))); +equation + connect(sourcePQ.C, splitter2_1.Ce) annotation (Line( + points={{-80,10},{-56,10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(splitter2_1.Cs1, singularPressureLoss1.C1) annotation (Line( + points={{-42,20},{-42,30},{-20,30}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(splitter2_1.Cs2, singularPressureLoss2.C1) annotation (Line( + points={{-42,0},{-42,-10},{-20,-10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(mixer2_1.Ce1, singularPressureLoss1.C2) annotation (Line(points={{46,20},{46,30},{0,30}}, smooth=Smooth.None)); + connect(mixer2_1.Cs, sink.C) annotation (Line( + points={{60,10},{80,10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(constante.y, splitter2_1.Ialpha1) annotation (Line(points={{-59,50},{-52,50},{-52,16},{-45,16}}, smooth=Smooth.None)); + connect(singularPressureLoss2.C2, loopBreakerP.C1) annotation (Line( + points={{0,-10},{10,-10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(loopBreakerP.C2, mixer2_1.Ce2) annotation (Line( + points={{30,-10},{46,-10},{46,0}}, + color={0,0,255}, + smooth=Smooth.None)); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLoopBreakerP; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP_FlueGases.mo new file mode 100644 index 00000000..33e8eb00 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP_FlueGases.mo @@ -0,0 +1,54 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.LoopBreakers; +model TestLoopBreakerP_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true, + SubC0={3}) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Splitter2 splitter2_1(redeclare replaceable package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-56,0},{-36,20}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1(redeclare replaceable package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{80,0},{100,20}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.5) annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerP loopBreakerP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{10,-20},{30,0}}, rotation=0))); +equation + connect(sourcePQ.C, splitter2_1.Ce) annotation (Line( + points={{-80,10},{-56,10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(splitter2_1.Cs1, singularPressureLoss1.C1) annotation (Line( + points={{-42,20},{-42,30},{-20,30}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(splitter2_1.Cs2, singularPressureLoss2.C1) annotation (Line( + points={{-42,0},{-42,-10},{-20,-10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(mixer2_1.Ce1, singularPressureLoss1.C2) annotation (Line(points={{46,20},{46,30},{0,30}}, smooth=Smooth.None)); + connect(mixer2_1.Cs, sink.C) annotation (Line( + points={{60,10},{80,10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(constante.y, splitter2_1.Ialpha1) annotation (Line(points={{-59,50},{-52,50},{-52,16},{-45,16}}, smooth=Smooth.None)); + connect(singularPressureLoss2.C2, loopBreakerP.C1) annotation (Line( + points={{0,-10},{10,-10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(loopBreakerP.C2, mixer2_1.Ce2) annotation (Line( + points={{30,-10},{46,-10},{46,0}}, + color={0,0,255}, + smooth=Smooth.None)); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLoopBreakerP_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP_Traces.mo new file mode 100644 index 00000000..3a67cdb0 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerP_Traces.mo @@ -0,0 +1,46 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.LoopBreakers; +model TestLoopBreakerP_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={3}) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Splitter2 splitter2_1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-56,0},{-36,20}}, rotation=0))); + ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{80,0},{100,20}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.5) annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerP loopBreakerP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{10,-20},{30,0}}, rotation=0))); +equation + connect(sourcePQ.C, splitter2_1.Ce) annotation (Line( + points={{-80,10},{-56,10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(splitter2_1.Cs1, singularPressureLoss1.C1) annotation (Line( + points={{-42,20},{-42,30},{-20,30}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(splitter2_1.Cs2, singularPressureLoss2.C1) annotation (Line( + points={{-42,0},{-42,-10},{-20,-10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(mixer2_1.Ce1, singularPressureLoss1.C2) annotation (Line(points={{46,20},{46,30},{0,30}}, smooth=Smooth.None)); + connect(mixer2_1.Cs, sink.C) annotation (Line( + points={{60,10},{80,10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(constante.y, splitter2_1.Ialpha1) annotation (Line(points={{-59,50},{-52,50},{-52,16},{-45,16}}, smooth=Smooth.None)); + connect(singularPressureLoss2.C2, loopBreakerP.C1) annotation (Line( + points={{0,-10},{10,-10}}, + color={0,0,255}, + smooth=Smooth.None)); + connect(loopBreakerP.C2, mixer2_1.Ce2) annotation (Line( + points={{30,-10},{46,-10},{46,0}}, + color={0,0,255}, + smooth=Smooth.None)); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLoopBreakerP_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerQH.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerQH.mo new file mode 100644 index 00000000..c6bf70b7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerQH.mo @@ -0,0 +1,24 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.LoopBreakers; +model TestLoopBreakerQH + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=2.e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, dynamic_energy_balance=false) annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); +equation + connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); + connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color={0,0,255})); + connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,70},{-60,34},{-80,34},{-80,21}})); + connect(pump.C2, loopBreakerQ.C1) annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); + connect(loopBreakerQ.C2, loopBreakerH.C1) annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); + connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{-100,10},{-90,10}}, color={0,0,0})); + + connect(volumeA.Ce1, loopBreakerH.C2) annotation (Line(points={{10,-20},{100,-20},{100,10},{50,10}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLoopBreakerQH; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerSubC_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerSubC_Traces.mo new file mode 100644 index 00000000..9661a3bf --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerSubC_Traces.mo @@ -0,0 +1,29 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.LoopBreakers; +model TestLoopBreakerSubC_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=2.e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, dynamic_energy_balance=false) annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefSubC refSubC(redeclare package Medium = Medium, SubC0={0.3}) + annotation (Placement(transformation(extent={{90,-30},{70,-10}}))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerSubC loopBreakerSubC(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{60,-30},{40,-10}}))); +equation + connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); + connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color={0,0,255})); + connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,70},{-60,34},{-80,34},{-80,21}})); + connect(pump.C2, loopBreakerQ.C1) annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); + connect(loopBreakerQ.C2, loopBreakerH.C1) annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); + connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{-100,10},{-90,10}}, color={0,0,0})); + + connect(volumeA.Ce1, loopBreakerSubC.C2) annotation (Line(points={{10,-20},{40,-20}}, color={0,0,0})); + connect(loopBreakerSubC.C1, refSubC.C2) annotation (Line(points={{60,-20},{70,-20}}, color={0,0,0})); + connect(loopBreakerH.C2, refSubC.C1) annotation (Line(points={{50,10},{100,10},{100,-20},{90,-20}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLoopBreakerSubC_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerX_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerX_FlueGases.mo new file mode 100644 index 00000000..c30188a1 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/TestLoopBreakerX_FlueGases.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.LoopBreakers; +model TestLoopBreakerX_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.RefP refP(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=2.e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation=0))); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.RefT refT(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, dynamic_energy_balance=false) annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); + ThermoSysPro.Fluid.BoundaryConditions.RefXgas refXgas(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{62,0},{82,20}}))); + ThermoSysPro.Fluid.LoopBreakers.LoopBreakerXgas loopBreakerXgas(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{64,-30},{44,-10}}))); +equation + connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color={0,0,255})); + connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color={0,0,255})); + connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60,70},{-60,34},{-80,34},{-80,21}})); + connect(pump.C2, loopBreakerQ.C1) annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); + connect(loopBreakerQ.C2, loopBreakerH.C1) annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); + connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{-100,10},{-90,10}}, color={0,0,0})); + + connect(refXgas.C1, loopBreakerH.C2) annotation (Line(points={{62,10},{50,10}}, color={0,0,0})); + connect(volumeA.Ce1, loopBreakerXgas.C2) annotation (Line(points={{10,-20},{44,-20}}, color={0,0,0})); + connect(loopBreakerXgas.C1, refXgas.C2) annotation (Line(points={{64,-20},{100,-20},{100,10},{82,10}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLoopBreakerX_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo new file mode 100644 index 00000000..b905e02d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package LoopBreakers + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end LoopBreakers; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.order new file mode 100644 index 00000000..0b1ec3d4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/LoopBreakers/package.order @@ -0,0 +1,6 @@ +TestLoopBreakerP +TestLoopBreakerP_Traces +TestLoopBreakerP_FlueGases +TestLoopBreakerQH +TestLoopBreakerSubC_Traces +TestLoopBreakerX_FlueGases diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCHPEngineBarkantineSystem.mo similarity index 59% rename from ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo rename to ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCHPEngineBarkantineSystem.mo index def6128b..4b0c3637 100644 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCHPEngineBarkantineSystem.mo +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCHPEngineBarkantineSystem.mo @@ -1,25 +1,33 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; model TestCHPEngineBarkantineSystem + extends ThermoSysPro.UsersGuide.Icons.Example; - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1( + redeclare package Medium = Medium, + P0=300000, + h0=293e3, + option_temperature=false) annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation= 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{60,20},{80,40}}, rotation=0))); - Machines.CHPEngineBarkantineSystem CHPBarkantine annotation (Placement( - transformation(extent={{-40,0},{20,60}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1( + redeclare package Medium = Medium, + P0=100000, + T0=360) + annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0))); + ThermoSysPro.Fluid.Machines.CHPEngineBarkantineSystem CHPBarkantine( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases) + annotation (Placement(transformation(extent={{-40,0},{20,60}}, rotation=0))); equation connect(SourceP1.C, CHPBarkantine.inletWaterSteam) annotation (Line(points={{ -80,30},{-50,30},{-50,45},{-40,45}}, color={0,0,0})); connect(CHPBarkantine.outletWaterSteam, PuitsP1.C) annotation (Line(points={{20,45},{30,45},{30,30},{60,30}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), + annotation ( + experiment(StopTime=1000), Diagram(coordinateSystem( preserveAspectRatio=false, extent={{-100,-100},{100,100}}, diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump.mo new file mode 100644 index 00000000..b306260b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump.mo @@ -0,0 +1,13 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCentrifugalPump + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(centrifugalPump.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(centrifugalPump.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestCentrifugalPump; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump_FlueGases.mo new file mode 100644 index 00000000..9fdeb876 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump_FlueGases.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCentrifugalPump_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(centrifugalPump.C2, sink.C) annotation (Line(points={{14,0},{30,0}}, color={0,0,0})); + connect(centrifugalPump.C1, sourcePQ.C) annotation (Line(points={{-6,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestCentrifugalPump_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump_Traces.mo new file mode 100644 index 00000000..8387f4d8 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCentrifugalPump_Traces.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCentrifugalPump_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-52,-10},{-32,10}}))); +equation + connect(centrifugalPump.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(centrifugalPump.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-32,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestCentrifugalPump_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCombustionTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCombustionTurbine.mo new file mode 100644 index 00000000..6812d7bb --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCombustionTurbine.mo @@ -0,0 +1,46 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCombustionTurbine + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + parameter Real is_eff_n1(fixed=false, start=0.85) "Nominal isentropic efficiency"; + parameter Real Qred1(fixed=false, start=0.01) "Reduced mass flow rate"; + + Fluid.Machines.CombustionTurbine CombustionTurbine( + redeclare package Medium = Medium, + tau_n=0.065, + is_eff_n=is_eff_n1, + Qred=Qred1, + Pe(fixed=true, start=1500000), + Ts(fixed=true, start=830), + Hs(start=769796.2+Medium.h_offset)) annotation (Placement(transformation(extent={{-42,-42},{36,42}}, rotation=0))); + Fluid.BoundaryConditions.SourceQ SourceQ1( + redeclare package Medium = Medium, + option_temperature=true, + X0={1-0.14-0.06-0.06,0.14,0.06,0.06,0}, + Q0=430, + T0=1500) annotation (Placement(transformation(extent={{-106,-10},{-86,10}}, rotation=0))); + Fluid.BoundaryConditions.SinkP SinkP1(redeclare package Medium = Medium, + P0=100000, + T0=830) annotation (Placement(transformation( + origin={94,0}, + extent={{10,-10},{-10,10}}, + rotation=180))); + InstrumentationAndControl.Blocks.Sources.Constante Wc1(k=-1.8e8) annotation (Placement(transformation(extent={{-100,-42},{-80,-22}}, rotation=0))); +equation + connect(SourceQ1.C, CombustionTurbine.Ce) annotation (Line( + points={{-86,0},{-42,0}}, + color={0,0,0}, + thickness=1)); + connect(CombustionTurbine.Cs, SinkP1.C) annotation (Line( + points={{36,0},{84,0}}, + color={0,0,0}, + thickness=1)); + connect(Wc1.y, CombustionTurbine.CompressorPower) annotation (Line(points={{-79,-32},{-45.9,-32},{-45.9,-16.8}})); + annotation (Diagram(graphics), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+This model is documented in Sect. 11.4.5 of the ThermoSysPro book. +
The results reported in the ThermoSysPro book were computed using Dymola. +")); +end TestCombustionTurbine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCombustionTurbine_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCombustionTurbine_Traces.mo new file mode 100644 index 00000000..6dac368b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCombustionTurbine_Traces.mo @@ -0,0 +1,50 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCombustionTurbine_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + parameter Real is_eff_n1(fixed=false, start=0.85) "Nominal isentropic efficiency"; + parameter Real Qred1(fixed=false, start=0.01) "Reduced mass flow rate"; + + Fluid.Machines.CombustionTurbine CombustionTurbine( + redeclare package Medium = Medium, + tau_n=0.065, + is_eff_n=is_eff_n1, + Qred=Qred1, + Pe(fixed=true, start=1500000), + Ts(fixed=true, start=830), + Hs(start=769796.2 + Medium.h_offset)) annotation (Placement(transformation(extent={{-42,-42},{36,42}}, rotation=0))); + Fluid.BoundaryConditions.SourceQ SourceQ1( + redeclare package Medium = Medium, + option_temperature=true, + X0={1 - 0.14 - 0.06 - 0.06,0.14,0.06,0.06,0}, + Q0=430, + T0=1500) annotation (Placement(transformation(extent={{-106,-10},{-86,10}}, rotation=0))); + Fluid.BoundaryConditions.SinkP SinkP1( + redeclare package Medium = Medium, + P0=100000, + T0=830) annotation (Placement(transformation( + origin={94,0}, + extent={{10,-10},{-10,10}}, + rotation=180))); + InstrumentationAndControl.Blocks.Sources.Constante Wc1(k=-1.8e8) annotation (Placement(transformation(extent={{-100,-42},{-80,-22}}, rotation=0))); +equation + connect(SourceQ1.C, CombustionTurbine.Ce) annotation (Line( + points={{-86,0},{-42,0}}, + color={0,0,0}, + thickness=1)); + connect(CombustionTurbine.Cs, SinkP1.C) annotation (Line( + points={{36,0},{84,0}}, + color={0,0,0}, + thickness=1)); + connect(Wc1.y, CombustionTurbine.CompressorPower) annotation (Line(points={{-79,-32},{-45.9,-32},{-45.9,-16.8}})); + annotation (Diagram(graphics), Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
+This model is documented in Sect. 11.4.5 of the ThermoSysPro book. +
The results reported in the ThermoSysPro book were computed using Dymola. +")); +end TestCombustionTurbine_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCompressor.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCompressor.mo new file mode 100644 index 00000000..345c316c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCompressor.mo @@ -0,0 +1,40 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCompressor + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + parameter Real is_eff_n1(fixed=false, start=0.85) "Nominal isentropic efficiency"; + + ThermoSysPro.Fluid.Machines.Compressor Compressor( + redeclare package Medium = Medium, + Ps(fixed=false), + tau_n=16, + is_eff_n=is_eff_n1, + Pe(fixed=false, start=100000), + Ts(fixed=true, start=680)) annotation (Placement(transformation(extent={{-52,-52},{48,52}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourceQ1( + redeclare package Medium = Medium, + X0={1 - 0.003 - 0.23,0.23,0.003,0,0}, + Q0=420, + P0=100000, + T0=288, + option_temperature=true) annotation (Placement(transformation(extent={{-104,-10},{-84,10}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(redeclare package Medium = Medium, P0=15.8e5) annotation (Placement(transformation( + origin={96,0}, + extent={{10,-10},{-10,10}}, + rotation=180))); +equation + connect(SourceQ1.C, Compressor.Ce) annotation (Line( + points={{-84,0},{-39.5,0}}, + color={0,0,0}, + thickness=1)); + connect(Compressor.Cs, SinkP1.C) annotation (Line( + points={{35.5,0},{86,0}}, + color={0,0,0}, + thickness=1)); + annotation (Diagram(graphics), Documentation(info=" +
Copyright © EDF 2002 - 2021
+ThermoSysPro Version 4.0
+")); +end TestCompressor; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCompressor_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCompressor_Traces.mo new file mode 100644 index 00000000..e2792641 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestCompressor_Traces.mo @@ -0,0 +1,43 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestCompressor_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + parameter Real is_eff_n1(fixed=false, start=0.85) "Nominal isentropic efficiency"; + + ThermoSysPro.Fluid.Machines.Compressor Compressor( + redeclare package Medium = Medium, + Ps(fixed=false), + tau_n=16, + is_eff_n=is_eff_n1, + Pe(fixed=false, start=100000), + Ts(fixed=true, start=680)) annotation (Placement(transformation(extent={{-52,-52},{48,52}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourceQ1( + redeclare package Medium = Medium, + X0={1 - 0.003 - 0.23,0.23,0.003,0,0}, + Q0=420, + P0=100000, + T0=288, + option_temperature=true) annotation (Placement(transformation(extent={{-104,-10},{-84,10}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(redeclare package Medium = Medium, P0=15.8e5) annotation (Placement(transformation( + origin={96,0}, + extent={{10,-10},{-10,10}}, + rotation=180))); +equation + connect(SourceQ1.C, Compressor.Ce) annotation (Line( + points={{-84,0},{-39.5,0}}, + color={0,0,0}, + thickness=1)); + connect(Compressor.Cs, SinkP1.C) annotation (Line( + points={{35.5,0},{86,0}}, + color={0,0,0}, + thickness=1)); + annotation (Diagram(graphics), Documentation(info=" +Copyright © EDF 2002 - 2021
+ThermoSysPro Version 4.0
+")); +end TestCompressor_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestGasTurbine.mo similarity index 75% rename from ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo rename to ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestGasTurbine.mo index fc8a96bb..1d20227f 100644 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGasTurbine.mo +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestGasTurbine.mo @@ -1,19 +1,20 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; model TestGasTurbine + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare package Medium = Medium_FlueGases, P0=1.013e5, Q0=600, T0=29.4 + 273.16, option_temperature=true, - Xco2=0, - Xh2o=0, - Xo2=0.20994, - Xso2=0, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) + X0={1 - 0.20994,0.20994,0,0,0}) annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); - - BoundaryConditions.SinkP sink + ThermoSysPro.Fluid.BoundaryConditions.SinkP sink( + redeclare package Medium = Medium_FlueGases) annotation (Placement(transformation(extent={{60,-10},{80,10}}))); ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante humidity(k=0.93) annotation (Placement(transformation(extent={{-100,30},{-80,50}}))); @@ -29,17 +30,22 @@ model TestGasTurbine Initialvalue=592.7, Finalvalue=415.70) annotation (Placement(transformation(extent={{-98,0},{-78,20}}))); - Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( Q0=13.4368286133, T0=185 + 273.16, LHV=46989e3, Cp=2255, Xc=0.755, Xh=0.245, - rho=0.838) annotation (Placement(transformation(extent={{-20,40},{0,60}}))); - BoundaryConditions.SourcePQ water(Q0=0) + rho=0.838) + annotation (Placement(transformation(extent={{-20,40},{0,60}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ water( + redeclare package Medium = Medium, + Q0=0) annotation (Placement(transformation(extent={{-60,40},{-40,60}}))); - Machines.GasTurbine gasTurbine( + ThermoSysPro.Fluid.Machines.GasTurbine gasTurbine( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, comp_tau_n=14.0178, comp_eff_n=0.87004, exp_tau_n=0.06458, @@ -49,15 +55,24 @@ model TestGasTurbine Wpth=1e6, Compresseur( Ps(start=1404200.0), + He(start=2.5525e6), + Hs(start=3.008e6), + His(start=2.95e6), Te(start=302.56000000000006), Tis(start=630.0), Ts(start=729.0)), - TurbineAgaz(Tis(start=847.0)), + TurbineAgaz( + He(start=4.0e6), + Hs(start=3.24e6), + His(start=3.1e6), + Tis(start=847.0)), chambreCombustionTAC( Psf(start=1310000.0), Tea(start=729.0), + Hsf(start=4.0e6), Tsf(start=1532.57)), xAIR( + T(start=302.56000000000006), ppvap0(start=4104.0), rho_air(start=1.0836), rho_vap(start=0.029))) @@ -79,7 +94,7 @@ equation connect(gasTurbine.Sortie_fumees, sink.C) annotation (Line(points={{30,3.55271e-015},{46,3.55271e-015},{46,0},{60,0}}, color={0,0,0})); - annotation ( Icon(graphics={ + annotation (Icon(graphics={ Rectangle( lineColor={200,200,200}, fillColor={248,248,248}, diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestHeatPumpCompressor.mo similarity index 69% rename from ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo rename to ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestHeatPumpCompressor.mo index b1db3c7a..d4210dc3 100644 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestHeatPumpCompressor.mo +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestHeatPumpCompressor.mo @@ -1,24 +1,26 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; model TestHeatPumpCompressor + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.C3H3F5; + ThermoSysPro.Fluid.Machines.HeatPumpCompressor Compressor( + redeclare package Medium = Medium, Pe(fixed=false, start=100000), - Ts(fixed=false, start=680)) annotation (Placement(transformation(extent={{ - -52,-52},{48,52}}, rotation=0))); - BoundaryConditions.SourceQ SourceQ1( - Xso2=0, - Xco2=0.0, - Xh2o=0.003, - Xo2=0.23, + Ts(fixed=false, start=680)) + annotation (Placement(transformation(extent={{-52,-52},{48,52}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ SourceQ1( + redeclare package Medium = Medium, Q0=420, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.C3H3F5, - h0=3.e4, + h0=3.e5, T0=288, option_temperature=false) annotation (Placement(transformation(extent={{-104,-10},{-84,10}}, rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(P0=1580000, - option_temperature=false) + ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1( + redeclare package Medium = Medium, + P0=1580000, + option_temperature=false) annotation (Placement(transformation( origin={96,0}, extent={{10,-10},{-10,10}}, @@ -28,7 +30,7 @@ equation annotation (Line(points={{-84,0},{-52,0}}, color={0,0,0})); connect(SinkP1.C, Compressor.C2) annotation (Line(points={{86,0},{48,0}}, color={0,0,0})); - annotation ( Icon(graphics={ + annotation (Icon(graphics={ Rectangle( lineColor={200,200,200}, fillColor={248,248,248}, diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestInternalCombustionEngine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestInternalCombustionEngine.mo new file mode 100644 index 00000000..3a722f76 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestInternalCombustionEngine.mo @@ -0,0 +1,93 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestInternalCombustionEngine + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( + Hum=0, + Xh=0.25, + Xs=0, + Xashes=0, + Xc=0.75, + Xo=0, + Xn=0, + Q0=0.0676, + rho=0.744, + LHV=50e6, + T0(displayUnit="K") = 299, + P0=210300, + Vol=1) + annotation (Placement(transformation(extent={{-106,-81},{-72,-43}}, + rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( + redeclare package Medium = Medium_FlueGases, + Q0=1.9627, + T0=30 + 273.16, + option_temperature=true, + X0={0.765,0.23,0.005,0,0}, + P0=191000) + annotation (Placement(transformation(extent={{111,-79},{73,-45}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare package Medium = Medium_FlueGases, + option_temperature=true) + annotation (Placement(transformation(extent={{0,44},{44,86}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceWater( + redeclare package Medium = Medium, + Q0=15.3, + h0=334.41e3, + P0=410000) + annotation (Placement(transformation(extent={{-107,-19},{-71,15}}, rotation=0))); + ThermoSysPro.Fluid.Machines.InternalCombustionEngine internalCombustionEngine( + redeclare package Medium = Medium, + redeclare package Medium_FlueGases = Medium_FlueGases, + mechanical_efficiency_type=2, + Rmeca_nom=0.41, + Coef_Rm_a=-5.4727e-9, + Coef_Rm_b=4.9359e-5, + Coef_Rm_c=0.30814, + Xpth=0.05, + MMg=20, + DPe=1, + RV=6.45, + Kc=1.28, + Kd=1.33, + Wmeca(start=1400e3), + Welec(start=1358e3), + Wcomb(start=3.4942e6), + exc(start=1.8), + Gamma=1.2085, + Tsf(start=1088.15)) + annotation (Placement(transformation(extent={{-44,-46},{44,42}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sinkWater(redeclare package Medium = + Medium) + annotation (Placement(transformation(extent={{75,-19},{111,15}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss waterPressureLossIn( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-63,-8},{-51,4}}))); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss waterPressureLossOut( + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{51,-9},{65,5}}))); +equation + connect(internalCombustionEngine.Cair, sourceAir.C) annotation (Line( + points={{0,-41.6},{0,-62},{73,-62}}, + color={0,0,0}, + thickness=1)); + connect(internalCombustionEngine.Cfuel, fuelSourcePQ.C) annotation (Line( + points={{-30.8,-41.6},{-30.8,-62},{-72,-62}}, color={0,0,0})); + connect(sourceWater.C, waterPressureLossIn.C1) + annotation (Line(points={{-71,-2},{-63,-2}}, color={0,0,255})); + connect(internalCombustionEngine.Cws1, waterPressureLossIn.C2) annotation ( + Line(points={{-39.6,-2},{-51,-2}}, color={0,0,255})); + connect(internalCombustionEngine.Cws2, waterPressureLossOut.C1) + annotation (Line(points={{39.6,-2},{48,-2},{51,-2}}, color={0,0,255})); + connect(sinkWater.C, waterPressureLossOut.C2) + annotation (Line(points={{75,-2},{65,-2}}, color={0,0,255})); + connect(internalCombustionEngine.Cfg, sink.C) annotation (Line( + points={{0,37.6},{0,65}}, + color={0,0,0}, + thickness=1)); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestInternalCombustionEngine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo new file mode 100644 index 00000000..123ab095 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump.mo @@ -0,0 +1,13 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStaticCentrifugalPump + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(staticCentrifugalPump.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(staticCentrifugalPump.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCentrifugalPump; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo new file mode 100644 index 00000000..3e2e9e02 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_FlueGases.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStaticCentrifugalPump_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-6,-10},{14,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(staticCentrifugalPump.C2, sink.C) annotation (Line(points={{14,0},{30,0}}, color={0,0,0})); + connect(staticCentrifugalPump.C1, sourcePQ.C) annotation (Line(points={{-6,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCentrifugalPump_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo new file mode 100644 index 00000000..9cc25305 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticCentrifugalPump_Traces.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStaticCentrifugalPump_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-52,-10},{-32,10}}))); +equation + connect(staticCentrifugalPump.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(staticCentrifugalPump.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-32,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestStaticCentrifugalPump_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticFan.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticFan.mo new file mode 100644 index 00000000..d1bc4845 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticFan.mo @@ -0,0 +1,41 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStaticFan + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.Machines.StaticFan Compressor( + redeclare package Medium = Medium, + VRotn=2700, + rm=1, + a2=0, + b1=-1.315, + b2=2.4593, + VRot=2700, + a1=-263.145, + a3=500, + Q(start=2), + Qv(start=1.4), + rho(start=1.4)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourceQ1( + redeclare package Medium = Medium, + X0={1-0.006-0.23,0.23,0.006,0,0}, + Q0=4, + P0=130000, + T0=300, + option_temperature=true) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.Sink SinkP1(redeclare package Medium = Medium, + T0=300, + option_temperature=true) annotation (Placement(transformation( + origin={50,0}, + extent={{10,-10},{-10,10}}, + rotation=180))); +equation + connect(Compressor.C2, SinkP1.C) annotation (Line(points={{10,0},{40,0}}, color={0,0,0})); + connect(Compressor.C1, SourceQ1.C) annotation (Line(points={{-10,0},{-40,0}}, color={0,0,0})); + annotation ( Documentation(info=" +Copyright © EDF 2002 - 2021
+ThermoSysPro Version 4.0
+")); +end TestStaticFan; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticFan_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticFan_Traces.mo new file mode 100644 index 00000000..acf05608 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStaticFan_Traces.mo @@ -0,0 +1,46 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStaticFan_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + + ThermoSysPro.Fluid.Machines.StaticFan Compressor( + redeclare package Medium = Medium, + VRotn=2700, + rm=1, + a2=0, + b1=-1.315, + b2=2.4593, + VRot=2700, + a1=-263.145, + a3=500, + Q(start=2), + Qv(start=1.4), + rho(start=1.4)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourceQ1( + redeclare package Medium = Medium, + SubC0={0.5}, + X0={1 - 0.006 - 0.23,0.23,0.006,0,0}, + Q0=4, + P0=130000, + T0=300, + option_temperature=true) annotation (Placement(transformation(extent={{-60,-10},{-40,10}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.Sink SinkP1( + redeclare package Medium = Medium, + T0=300, + option_temperature=true) annotation (Placement(transformation( + origin={50,0}, + extent={{10,-10},{-10,10}}, + rotation=180))); +equation + connect(Compressor.C2, SinkP1.C) annotation (Line(points={{10,0},{40,0}}, color={0,0,0})); + connect(Compressor.C1, SourceQ1.C) annotation (Line(points={{-10,0},{-40,0}}, color={0,0,0})); + annotation (Documentation(info=" +Copyright © EDF 2002 - 2021
+ThermoSysPro Version 4.0
+")); +end TestStaticFan_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestSteamEngine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestSteamEngine.mo new file mode 100644 index 00000000..6fd8484e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestSteamEngine.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestSteamEngine + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Machines.SteamEngine steamEngine1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(redeclare package Medium = Medium, P0=100000) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + h0=3.e6, + option_temperature=false, + P0=1600000) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); +equation + connect(sourceP.C, steamEngine1.C1) annotation (Line(points={{-30,0},{-7,0}}, color={0,0,255})); + connect(steamEngine1.C2, puitsP.C) annotation (Line(points={{7,0},{30,0}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Window( + x=0.32, + y=0.02, + width=0.39, + height=0.47), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSteamEngine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestSteamEngine_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestSteamEngine_Traces.mo new file mode 100644 index 00000000..20f0d47c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestSteamEngine_Traces.mo @@ -0,0 +1,35 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestSteamEngine_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.Machines.SteamEngine steamEngine1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(redeclare package Medium = Medium, P0=100000) annotation (Placement(transformation(extent={{30,-10},{50,10}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare package Medium = Medium, + h0=3.e6, + option_temperature=false, + P0=1600000, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}, rotation=0))); +equation + connect(sourceP.C, steamEngine1.C1) annotation (Line(points={{-30,0},{-7,0}}, color={0,0,255})); + connect(steamEngine1.C2, puitsP.C) annotation (Line(points={{7,0},{30,0}}, color={0,0,255})); + annotation ( + experiment(StopTime=1000), + Window( + x=0.32, + y=0.02, + width=0.39, + height=0.47), + Diagram(coordinateSystem( + preserveAspectRatio=false, + extent={{-100,-100},{100,100}}, + grid={2,2}), graphics), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestSteamEngine_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo new file mode 100644 index 00000000..ac7159d2 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine.mo @@ -0,0 +1,29 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStodolaTurbine + extends ThermoSysPro.UsersGuide.Icons.Example; + +replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine( + redeclare replaceable package Medium = Medium, + Cst=4100, + Ps(start=5000), + rhos(start=1.22)) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=300000, + Q0=200, + h0=3e6, + option_temperature=false) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{26,-10},{46,10}}))); +equation + connect(sourcePQ.C, stodolaTurbine.Ce) + annotation (Line(points={{-30,0},{-10.1,0}}, color={0,0,0})); + connect(stodolaTurbine.Cs, sink.C) + annotation (Line(points={{10.1,0},{26,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestStodolaTurbine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo new file mode 100644 index 00000000..adcb506f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/TestStodolaTurbine_Traces.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Machines; +model TestStodolaTurbine_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + +replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3", "Trace4"}, C_nominal={0.1, 0.2, 0.3, 0.4}, C_default={0.2, 0.3, 0.4, 0.5}); + + ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine( + redeclare replaceable package Medium = Medium, + Cst=4100, + Ps(start=5000), + rhos(start=1.22)) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=300000, + Q0=200, + h0=3e6, + SubC0={40,50,60,70}, + option_temperature=false) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) + annotation (Placement(transformation(extent={{26,-10},{46,10}}))); +equation + connect(sourcePQ.C, stodolaTurbine.Ce) + annotation (Line(points={{-30,0},{-10.1,0}}, color={0,0,0})); + connect(stodolaTurbine.Cs, sink.C) + annotation (Line(points={{10.1,0},{26,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestStodolaTurbine_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo new file mode 100644 index 00000000..5a53e2bf --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package Machines + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end Machines; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order new file mode 100644 index 00000000..a20912f4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Machines/package.order @@ -0,0 +1,20 @@ +TestStodolaTurbine +TestStodolaTurbine_Traces +TestStaticCentrifugalPump +TestStaticCentrifugalPump_FlueGases +TestStaticCentrifugalPump_Traces +TestCentrifugalPump +TestCentrifugalPump_FlueGases +TestCentrifugalPump_Traces +TestCombustionTurbine +TestCombustionTurbine_Traces +TestGasTurbine +TestHeatPumpCompressor +TestInternalCombustionEngine +TestCHPEngineBarkantineSystem +TestCompressor +TestCompressor_Traces +TestStaticFan +TestStaticFan_Traces +TestSteamEngine +TestSteamEngine_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestC3H3F5.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestC3H3F5.mo new file mode 100644 index 00000000..bb2e9ecf --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestC3H3F5.mo @@ -0,0 +1,41 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media; +model TestC3H3F5 + extends ThermoSysPro.UsersGuide.Icons.Example; + + package Medium = ThermoSysPro.Properties.Media.C3H3F5; + + parameter Units.SI.AbsolutePressure p = 1e5; + parameter Units.SI.SpecificEnthalpy h = 3e5; + parameter Units.SI.SpecificEntropy s = 1.5e3; + parameter Medium.ThermodynamicState state_ph = Medium.setState_phX(p, h, {1}); + parameter Medium.ThermodynamicState state_ps = Medium.setState_psX(p, s, {1}); + parameter ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph legacy_ph = + ThermoSysPro.Properties.C3H3F5.C3H3F5_Ph(p, h); + parameter ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps legacy_ps = + ThermoSysPro.Properties.C3H3F5.C3H3F5_Ps(p, s); + parameter Real eps = 1e-6; +equation + assert(abs(Medium.temperature(state_ph) - legacy_ph.T) < eps, + "C3H3F5 medium temperature_ph differs from legacy C3H3F5_Ph"); + assert(abs(Medium.density(state_ph) - legacy_ph.d) < eps, + "C3H3F5 medium density_ph differs from legacy C3H3F5_Ph"); + assert(abs(Medium.specificEntropy(state_ph) - legacy_ph.s) < eps, + "C3H3F5 medium specificEntropy differs from legacy C3H3F5_Ph"); + assert(abs(Medium.vapourQuality(state_ph) - legacy_ph.x) < 1e-4, + "C3H3F5 medium vapourQuality differs from legacy C3H3F5_Ph"); + + assert(abs(Medium.temperature(state_ps) - legacy_ps.T) < eps, + "C3H3F5 medium temperature_ps differs from legacy C3H3F5_Ps"); + assert(abs(Medium.density(state_ps) - legacy_ps.d) < eps, + "C3H3F5 medium density_ps differs from legacy C3H3F5_Ps"); + assert(abs(Medium.specificEnthalpy(state_ps) - legacy_ps.h) < eps, + "C3H3F5 medium specificEnthalpy_ps differs from legacy C3H3F5_Ps"); + + assert(abs(Medium.specificInternalEnergy(state_ph) - (h - p/legacy_ph.d)) < eps, + "C3H3F5 medium internal energy does not match legacy Fluid assumption u=h-p/d"); + assert(abs(Medium.density_derh_p(state_ph) + 1e6) < eps, + "C3H3F5 medium density_derh_p does not match legacy Fluid assumption"); + assert(abs(Medium.density_derp_h(state_ph) - 1e-8) < eps, + "C3H3F5 medium density_derp_h does not match legacy Fluid assumption"); + annotation (experiment(StopTime=1)); +end TestC3H3F5; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestDryAirIdealGas.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestDryAirIdealGas.mo new file mode 100644 index 00000000..6335caae --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestDryAirIdealGas.mo @@ -0,0 +1,32 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media; +model TestDryAirIdealGas + extends ThermoSysPro.UsersGuide.Icons.Example; + + package Medium = ThermoSysPro.Properties.Media.DryAirIdealGas; + + parameter Units.SI.AbsolutePressure p = 1e5; + parameter Units.SI.Temperature T = 300; + parameter Units.SI.SpecificEnthalpy h = + ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(p, T, 6, 0, 0, 0, 0, 0); + parameter Medium.ThermodynamicState state = Medium.setState_phX(p, h, {1}); + parameter ThermoSysPro.Properties.DryAirIdealGas.DryAirIdealGas data; + parameter Real eps = 1e-6; +equation + assert(abs(Medium.temperature(state) - + ThermoSysPro.Properties.Fluid.Temperature_Ph(p, h, 6, 0, 0, 0, 0, 0)) < eps, + "DryAirIdealGas medium temperature differs from legacy Fluid wrapper"); + assert(abs(Medium.density(state) - + ThermoSysPro.Properties.Fluid.Density_Ph(p, h, 6, 0, 0, 0, 0, 0)) < eps, + "DryAirIdealGas medium density differs from legacy Fluid wrapper"); + assert(abs(Medium.specificEnthalpy_pTX(p, T, {1}) - h) < eps, + "DryAirIdealGas medium specificEnthalpy_pTX differs from legacy Fluid wrapper"); + assert(abs(Medium.specificInternalEnergy(state) - (h - data.specificGasConstant*Medium.temperature(state))) < eps, + "DryAirIdealGas medium internal energy differs from legacy Fluid assumption"); + assert(abs(Medium.density_derh_p(state) - + ThermoSysPro.Properties.Fluid.Density_derh_Ph(p, h, 6, 0, 0, 0, 0, 0)) < eps, + "DryAirIdealGas medium density_derh_p differs from legacy Fluid wrapper"); + assert(abs(Medium.density_derp_h(state) - + ThermoSysPro.Properties.Fluid.Density_derp_Ph(p, h, 6, 0, 0, 0, 0, 0)) < eps, + "DryAirIdealGas medium density_derp_h differs from legacy Fluid wrapper"); + annotation (experiment(StopTime=1)); +end TestDryAirIdealGas; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestMoltenSalt.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestMoltenSalt.mo new file mode 100644 index 00000000..c6a355da --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestMoltenSalt.mo @@ -0,0 +1,32 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media; +model TestMoltenSalt + extends ThermoSysPro.UsersGuide.Icons.Example; + + package Medium = ThermoSysPro.Properties.Media.MoltenSalt; + + parameter Units.SI.AbsolutePressure p = 1e5; + parameter Units.SI.Temperature T = 600; + parameter Units.SI.SpecificEnthalpy h = + ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(p, T, 4, 0, 0, 0, 0, 0); + parameter Medium.ThermodynamicState state = Medium.setState_phX(p, h, {1}); + parameter Real eps = 1e-6; +equation + assert(abs(Medium.temperature(state) - + ThermoSysPro.Properties.Fluid.Temperature_Ph(p, h, 4, 0, 0, 0, 0, 0)) < eps, + "MoltenSalt medium temperature differs from legacy Fluid wrapper"); + assert(abs(Medium.density(state) - + ThermoSysPro.Properties.Fluid.Density_Ph(p, h, 4, 0, 0, 0, 0, 0)) < eps, + "MoltenSalt medium density differs from legacy Fluid wrapper"); + assert(abs(Medium.specificEnthalpy_pTX(p, T, {1}) - h) < eps, + "MoltenSalt medium specificEnthalpy_pTX differs from legacy Fluid wrapper"); + assert(abs(Medium.specificInternalEnergy(state) - + ThermoSysPro.Properties.Fluid.SpecificInternalEnergy_Ph_DO_NOT_USE(p, h, 4, 0, 0, 0, 0, 0)) < eps, + "MoltenSalt medium internal energy differs from legacy Fluid assumption"); + assert(abs(Medium.density_derh_p(state) - + ThermoSysPro.Properties.Fluid.Density_derh_Ph(p, h, 4, 0, 0, 0, 0, 0)) < eps, + "MoltenSalt medium density_derh_p differs from legacy Fluid wrapper"); + assert(abs(Medium.density_derp_h(state) - + ThermoSysPro.Properties.Fluid.Density_derp_Ph(p, h, 4, 0, 0, 0, 0, 0)) < eps, + "MoltenSalt medium density_derp_h differs from legacy Fluid wrapper"); + annotation (experiment(StopTime=1)); +end TestMoltenSalt; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestWaterSteamSimple.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestWaterSteamSimple.mo new file mode 100644 index 00000000..d20ae3ca --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/TestWaterSteamSimple.mo @@ -0,0 +1,35 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media; +model TestWaterSteamSimple + extends ThermoSysPro.UsersGuide.Icons.Example; + + package Medium = ThermoSysPro.Properties.Media.WaterSteamSimple; + + parameter Units.SI.AbsolutePressure p = 1e5; + parameter Units.SI.SpecificEnthalpy h = 3e5; + parameter Units.SI.SpecificEntropy s = 1000; + parameter Medium.ThermodynamicState state_ph = Medium.setState_phX(p, h, {1}); + parameter Medium.ThermodynamicState state_ps = Medium.setState_psX(p, s, {1}); + parameter ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph legacy_ph = + ThermoSysPro.Properties.WaterSteamSimple.SimpleWater.Water_Ph(p, h, 0); + parameter ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ps legacy_ps = + ThermoSysPro.Properties.WaterSteamSimple.SimpleWater.Water_Ps(p, s, 0); + parameter Real eps = 1e-6; +equation + assert(abs(Medium.temperature(state_ph) - legacy_ph.T) < eps, + "WaterSteamSimple medium temperature_ph differs from legacy SimpleWater"); + assert(abs(Medium.density(state_ph) - legacy_ph.d) < eps, + "WaterSteamSimple medium density_ph differs from legacy SimpleWater"); + assert(abs(Medium.specificEntropy(state_ph) - legacy_ph.s) < eps, + "WaterSteamSimple medium entropy differs from legacy SimpleWater"); + assert(abs(Medium.temperature(state_ps) - legacy_ps.T) < eps, + "WaterSteamSimple medium temperature_ps differs from legacy SimpleWater"); + assert(abs(Medium.density(state_ps) - legacy_ps.d) < eps, + "WaterSteamSimple medium density_ps differs from legacy SimpleWater"); + assert(abs(Medium.specificEnthalpy(state_ps) - legacy_ps.h) < eps, + "WaterSteamSimple medium enthalpy_ps differs from legacy SimpleWater"); + assert(abs(Medium.density_derh_p(state_ph) - legacy_ph.ddhp) < eps, + "WaterSteamSimple medium density_derh_p differs from legacy SimpleWater"); + assert(abs(Medium.density_derp_h(state_ph) - legacy_ph.ddph) < eps, + "WaterSteamSimple medium density_derp_h differs from legacy SimpleWater"); + annotation (experiment(StopTime=1)); +end TestWaterSteamSimple; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/PhasesSeparation.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/PhasesSeparation.mo new file mode 100644 index 00000000..988c4877 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/PhasesSeparation.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; +function PhasesSeparation + extends partialPhasesSeparation; + input Real x(min=0, max=1) "Title"; + +algorithm + // // HomogeneousSubstance + // C_record.Cl := SubC; + // C_record.Cg := SubC; + + // // Non-volatile + // C_record.Cl := SubC/(1 - x); + // C_record.Cg := fill(0, size(SubC, 1)); + +// Fully-volatile +C_record.Cl := fill(0,size(SubC,1)); +C_record.Cg := SubC / x; +end PhasesSeparation; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/package.mo new file mode 100644 index 00000000..fabdb6d5 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/package.mo @@ -0,0 +1,5 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media; +package WaterSteam_FullyVolatileTrace + extends Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + +end WaterSteam_FullyVolatileTrace; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/package.order new file mode 100644 index 00000000..11ebc226 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_FullyVolatileTrace/package.order @@ -0,0 +1 @@ +PhasesSeparation diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo new file mode 100644 index 00000000..b9c1251f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/PhasesSeparation.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_NonVolatileTrace; +function PhasesSeparation + extends partialPhasesSeparation; + input Real x(min=0, max=1) "Title"; + +algorithm + // // HomogeneousSubstance + // C_record.Cl := SubC; + // C_record.Cg := SubC; + + // Non-volatile + C_record.Cl := SubC/max(1 - x, Modelica.Constants.eps); + C_record.Cg := fill(0, size(SubC, 1)); + + // // Fully-volatile + // C_record.Cl := fill(0,size(SubC,1)); + // C_record.Cg := SubC / x; +end PhasesSeparation; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo new file mode 100644 index 00000000..09644f8a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.mo @@ -0,0 +1,5 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Media; +package WaterSteam_NonVolatileTrace + extends Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + +end WaterSteam_NonVolatileTrace; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order new file mode 100644 index 00000000..11ebc226 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/WaterSteam_NonVolatileTrace/package.order @@ -0,0 +1 @@ +PhasesSeparation diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo new file mode 100644 index 00000000..92af1d3a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package Media + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end Media; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order new file mode 100644 index 00000000..66036803 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Media/package.order @@ -0,0 +1,6 @@ +WaterSteam_NonVolatileTrace +WaterSteam_FullyVolatileTrace +TestC3H3F5 +TestMoltenSalt +TestDryAirIdealGas +TestWaterSteamSimple diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend.mo new file mode 100644 index 00000000..4609b989 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestBend + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.Bend bend(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-40}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(bend.C2, sink.C) annotation (Line(points={{0,-10},{0,-22},{1.77636e-15,-22},{1.77636e-15,-30}}, color={0,0,0})); + connect(bend.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestBend; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend_FlueGases.mo new file mode 100644 index 00000000..dbb61f49 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend_FlueGases.mo @@ -0,0 +1,23 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestBend_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.Bend bend(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-40}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(bend.C2, sink.C) annotation (Line(points={{0,-10},{0,-30},{1.77636e-15,-30}}, color={0,0,0})); + connect(bend.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestBend_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend_Traces.mo new file mode 100644 index 00000000..419b6238 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestBend_Traces.mo @@ -0,0 +1,19 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestBend_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.Bend bend(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-40}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(bend.C2, sink.C) annotation (Line(points={{0,-10},{0,-23},{1.77636e-15,-23},{1.77636e-15,-30}}, color={0,0,0})); + connect(bend.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestBend_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve.mo new file mode 100644 index 00000000..84c3160b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestCheckValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(checkValve.C2, sink.C) annotation (Line(points={{11,0},{30,0}}, color={0,0,0})); + connect(checkValve.C1, sourcePQ.C) annotation (Line(points={{-11,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestCheckValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve_FlueGases.mo new file mode 100644 index 00000000..ee165db7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve_FlueGases.mo @@ -0,0 +1,23 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestCheckValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(checkValve.C2, sink.C) annotation (Line(points={{11,0},{30,0}}, color={0,0,0})); + connect(checkValve.C1, sourcePQ.C) annotation (Line(points={{-11,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestCheckValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve_Traces.mo new file mode 100644 index 00000000..0c99f89c --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestCheckValve_Traces.mo @@ -0,0 +1,19 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestCheckValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(checkValve.C2, sink.C) annotation (Line(points={{11,0},{30,0}}, color={0,0,0})); + connect(checkValve.C1, sourcePQ.C) annotation (Line(points={{-11,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestCheckValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo new file mode 100644 index 00000000..28e578c2 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve.mo @@ -0,0 +1,29 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestControlValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve( + redeclare replaceable package Medium = Medium, caract=[0,0; 0.5,3000; 0.75, + 7000; 1,8000]) + annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, Q0=2580) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps Constante1(Table=[0,0.9; + 5,0.9; 15,0.5; 25,0.5; 50,0.2; 100,0.2]) + annotation (Placement(transformation(extent={{-30,34},{-10,54}}, rotation=0))); +equation + connect(controlValve.C2, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(controlValve.C1, sourcePQ.C) + annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(Constante1.y, controlValve.Ouv) + annotation (Line(points={{-9,44},{0,44},{0,17}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestControlValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo new file mode 100644 index 00000000..f79d0787 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces.mo @@ -0,0 +1,30 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestControlValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2"}, C_nominal={0.1, 2}, C_default={0.2, 5}); + + ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve( + redeclare replaceable package Medium = Medium, caract=[0,0; 0.5,3000; 0.75, + 7000; 1,8000]) + annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, + SubC0={10,20}, Q0=2580) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps Constante1(Table=[0,0.9; + 5,0.9; 15,0.5; 25,0.5; 50,0.2; 100,0.2]) + annotation (Placement(transformation(extent={{-30,34},{-10,54}}, rotation=0))); +equation + connect(controlValve.C2, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(controlValve.C1, sourcePQ.C) + annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(Constante1.y, controlValve.Ouv) + annotation (Line(points={{-9,44},{0,44},{0,17}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestControlValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo new file mode 100644 index 00000000..1e2d861d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestControlValve_Traces_FlueGases.mo @@ -0,0 +1,34 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestControlValve_Traces_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2"}, C_nominal={0.1, 2}, C_default={0.2, 5}); + + ThermoSysPro.Fluid.PressureLosses.ControlValve controlValve( + redeclare replaceable package Medium = Medium, + Cvmax=50000, caract=[0,0; 0.5,3000; 0.75, + 7000; 1,8000], + Pm(start=200000)) + annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium, h0=2538785.2) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, + h0=2538785.2, + SubC0={10,20}, X0={0.1,0.2,0.3,0.2,0.2}, + Q0=8) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps Constante1(Table=[0,0.9; + 5,0.9; 15,0.5; 25,0.5; 50,0.2; 100,0.2]) + annotation (Placement(transformation(extent={{-30,34},{-10,54}}, rotation=0))); +equation + connect(controlValve.C2, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(controlValve.C1, sourcePQ.C) + annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(Constante1.y, controlValve.Ouv) + annotation (Line(points={{-9,44},{0,44},{0,17}}, color={0,0,255})); + annotation (experiment(StopTime=80), Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestControlValve_Traces_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm.mo new file mode 100644 index 00000000..b063b2f6 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm.mo @@ -0,0 +1,13 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDiaphragm + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.Diaphragm diaphragm(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(diaphragm.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(diaphragm.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDiaphragm; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm_FlueGases.mo new file mode 100644 index 00000000..c0891318 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm_FlueGases.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDiaphragm_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.Diaphragm diaphragm(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(diaphragm.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(diaphragm.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDiaphragm_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm_Traces.mo new file mode 100644 index 00000000..f5acc6d4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDiaphragm_Traces.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDiaphragm_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.Diaphragm diaphragm(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(diaphragm.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(diaphragm.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDiaphragm_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve.mo new file mode 100644 index 00000000..03404bbb --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve.mo @@ -0,0 +1,13 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDynamicCheckValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.DynamicCheckValve dynamicCheckValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(dynamicCheckValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(dynamicCheckValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicCheckValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve_FlueGases.mo new file mode 100644 index 00000000..3e1b001a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve_FlueGases.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDynamicCheckValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.DynamicCheckValve dynamicCheckValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(dynamicCheckValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(dynamicCheckValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicCheckValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve_Traces.mo new file mode 100644 index 00000000..ea171e73 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicCheckValve_Traces.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDynamicCheckValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.DynamicCheckValve dynamicCheckValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(dynamicCheckValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(dynamicCheckValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicCheckValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve.mo new file mode 100644 index 00000000..8c9e763f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve.mo @@ -0,0 +1,19 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDynamicReliefValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.DynamicReliefValve dynamicReliefValve( + redeclare replaceable package Medium = Medium, + vh(start=0.91), + z(start=0.00389)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-40}))); +equation + connect(dynamicReliefValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(dynamicReliefValve.C1, sourcePQ.C) annotation (Line(points={{0,-9.8},{0,-19.9},{5.55112e-16,-19.9},{5.55112e-16,-30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicReliefValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve_FlueGases.mo new file mode 100644 index 00000000..da900f05 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve_FlueGases.mo @@ -0,0 +1,23 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDynamicReliefValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.DynamicReliefValve dynamicReliefValve(redeclare replaceable package Medium = Medium, vh(start=232)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=350000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-40}))); +equation + connect(dynamicReliefValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(dynamicReliefValve.C1, sourcePQ.C) annotation (Line(points={{0,-9.8},{4.44089e-16,-9.8},{4.44089e-16,-30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicReliefValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve_Traces.mo new file mode 100644 index 00000000..94c22056 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestDynamicReliefValve_Traces.mo @@ -0,0 +1,22 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestDynamicReliefValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.DynamicReliefValve dynamicReliefValve( + redeclare replaceable package Medium = Medium, + vh(start=0.91), + z(start=0.00389)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,-40}))); +equation + connect(dynamicReliefValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(dynamicReliefValve.C1, sourcePQ.C) annotation (Line(points={{0,-9.8},{0,-19.9},{5.55112e-16,-19.9},{5.55112e-16,-30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestDynamicReliefValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve.mo new file mode 100644 index 00000000..3d97044e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve.mo @@ -0,0 +1,13 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestIdealCheckValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(idealCheckValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(idealCheckValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestIdealCheckValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve_FlueGases.mo new file mode 100644 index 00000000..5a01613a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve_FlueGases.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestIdealCheckValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(idealCheckValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(idealCheckValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestIdealCheckValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve_Traces.mo new file mode 100644 index 00000000..51cccd09 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealCheckValve_Traces.mo @@ -0,0 +1,16 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestIdealCheckValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(idealCheckValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(idealCheckValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestIdealCheckValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve.mo new file mode 100644 index 00000000..90644316 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve.mo @@ -0,0 +1,15 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestIdealSwitchValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.IdealSwitchValve idealSwitchValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante constante annotation (Placement(transformation(extent={{-40,30},{-20,50}}))); +equation + connect(idealSwitchValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(idealSwitchValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(constante.yL, idealSwitchValve.Ouv) annotation (Line(points={{-19,40},{0,40},{0,13}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestIdealSwitchValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve_FlueGases.mo new file mode 100644 index 00000000..f722152a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve_FlueGases.mo @@ -0,0 +1,22 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestIdealSwitchValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.IdealSwitchValve idealSwitchValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante constante annotation (Placement(transformation(extent={{-40,30},{-20,50}}))); +equation + connect(idealSwitchValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(idealSwitchValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(constante.yL, idealSwitchValve.Ouv) annotation (Line(points={{-19,40},{0,40},{0,13}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestIdealSwitchValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve_Traces.mo new file mode 100644 index 00000000..a9e66005 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestIdealSwitchValve_Traces.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestIdealSwitchValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.IdealSwitchValve idealSwitchValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante constante annotation (Placement(transformation(extent={{-40,30},{-20,50}}))); +equation + connect(idealSwitchValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(idealSwitchValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(constante.yL, idealSwitchValve.Ouv) annotation (Line(points={{-19,40},{0,40},{0,13}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestIdealSwitchValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss.mo new file mode 100644 index 00000000..61534adc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss.mo @@ -0,0 +1,17 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestInvSingularPressureLoss + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.InvSingularPressureLoss invSingularPressureLoss( + redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(invSingularPressureLoss.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(invSingularPressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestInvSingularPressureLoss; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss_FlueGases.mo new file mode 100644 index 00000000..9fcc68d7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss_FlueGases.mo @@ -0,0 +1,22 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestInvSingularPressureLoss_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.InvSingularPressureLoss invSingularPressureLoss( + redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(invSingularPressureLoss.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(invSingularPressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestInvSingularPressureLoss_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss_Traces.mo new file mode 100644 index 00000000..b041dcab --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestInvSingularPressureLoss_Traces.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestInvSingularPressureLoss_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + ThermoSysPro.Fluid.PressureLosses.InvSingularPressureLoss invSingularPressureLoss( + redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + SubC0={10,20,30}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(invSingularPressureLoss.C2, sinkP.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(invSingularPressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestInvSingularPressureLoss_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo new file mode 100644 index 00000000..8ee42b80 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestLumpedStraightPipe + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe( + redeclare replaceable package Medium = Medium, + L=10, + D=0.2) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(lumpedStraightPipe.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(lumpedStraightPipe.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLumpedStraightPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_FlueGases.mo new file mode 100644 index 00000000..623c5fdc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_FlueGases.mo @@ -0,0 +1,23 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestLumpedStraightPipe_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe( + redeclare replaceable package Medium = Medium, + L=10, + D=0.2) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(lumpedStraightPipe.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(lumpedStraightPipe.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLumpedStraightPipe_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo new file mode 100644 index 00000000..52c96120 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestLumpedStraightPipe_Traces.mo @@ -0,0 +1,19 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestLumpedStraightPipe_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe( + redeclare replaceable package Medium = Medium, + L=10, + D=0.2) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + SubC0={10,20,30}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(lumpedStraightPipe.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(lumpedStraightPipe.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestLumpedStraightPipe_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo new file mode 100644 index 00000000..59b00b69 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss.mo @@ -0,0 +1,13 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestPipePressureLoss + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(pipePressureLoss.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(pipePressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestPipePressureLoss; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo new file mode 100644 index 00000000..728fb69a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_FlueGases.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestPipePressureLoss_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(pipePressureLoss.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(pipePressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestPipePressureLoss_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo new file mode 100644 index 00000000..baebf5cd --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestPipePressureLoss_Traces.mo @@ -0,0 +1,14 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestPipePressureLoss_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam (extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss pipePressureLoss(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(pipePressureLoss.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(pipePressureLoss.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestPipePressureLoss_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo new file mode 100644 index 00000000..2b78a5a7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss.mo @@ -0,0 +1,22 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestSingularPressureLoss + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(singularPressureLoss.C2, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(singularPressureLoss.C1, sourcePQ.C) + annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestSingularPressureLoss; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo new file mode 100644 index 00000000..c67d6dd3 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces.mo @@ -0,0 +1,22 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestSingularPressureLoss_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, SubC0={10,20,30}) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(singularPressureLoss.C2, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(singularPressureLoss.C1, sourcePQ.C) + annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestSingularPressureLoss_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo new file mode 100644 index 00000000..a13b12e3 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSingularPressureLoss_Traces_FlueGases.mo @@ -0,0 +1,24 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestSingularPressureLoss_Traces_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases(extraPropertiesNames={"Trace1", "Trace2", "Trace3"}, C_nominal={0.1, 0.2, 0.3}, C_default={0.2, 0.3, 0.4}); + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss( + redeclare replaceable package Medium = Medium) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium, option_temperature=true) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, SubC0={10,20,30}, + X0={0.1,0.2,0.3,0.2,0.2}, + option_temperature=true) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); +equation + connect(singularPressureLoss.C2, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(singularPressureLoss.C1, sourcePQ.C) + annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false))); +end TestSingularPressureLoss_Traces_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve.mo new file mode 100644 index 00000000..448ce7a7 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve.mo @@ -0,0 +1,15 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestSwitchValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.SwitchValve switchValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante constante annotation (Placement(transformation(extent={{-78,32},{-58,52}}))); +equation + connect(switchValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(switchValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(constante.yL, switchValve.Ouv) annotation (Line(points={{-57,42},{0,42},{0,13.2}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSwitchValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve_FlueGases.mo new file mode 100644 index 00000000..16b7d843 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve_FlueGases.mo @@ -0,0 +1,22 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestSwitchValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.PressureLosses.SwitchValve switchValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante constante annotation (Placement(transformation(extent={{-42,30},{-22,50}}))); +equation + connect(switchValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(switchValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(constante.yL, switchValve.Ouv) annotation (Line(points={{-21,40},{0,40},{0,13.2}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSwitchValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve_Traces.mo new file mode 100644 index 00000000..5238d3ce --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestSwitchValve_Traces.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestSwitchValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.SwitchValve switchValve(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-4},{10,16}}))); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Constante constante annotation (Placement(transformation(extent={{-40,30},{-20,50}}))); +equation + connect(switchValve.C2, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(switchValve.C1, sourcePQ.C) annotation (Line(points={{-10,0},{-30,0}}, color={0,0,0})); + connect(constante.yL, switchValve.Ouv) annotation (Line(points={{-19,40},{0,40},{0,13.2}}, color={0,0,255})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSwitchValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve.mo new file mode 100644 index 00000000..5d93f85f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve.mo @@ -0,0 +1,50 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestThreeWayValve + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare replaceable package Medium = Medium, + P0=300000, + h0=100000, + option_temperature=false) + annotation (Placement(transformation(extent={{-90,-10},{-70,10}}))); + ThermoSysPro.Fluid.PressureLosses.ThreeWayValve threeWayValve( + redeclare replaceable package Medium = Medium, + C2(Q(start=0)), + C3(Q(start=2000)), + Valve1(Pm(start=200000)), + VolumeA1(h(start=100000))) + annotation (Placement(transformation(extent={{-10,-6},{10,14}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( + redeclare replaceable package Medium = Medium, + P0=100000, + h0=100000, + option_temperature=false) + annotation (Placement(transformation(extent={{70,-10},{90,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP2( + redeclare replaceable package Medium = Medium, + P0=100000, + h0=100000, + option_temperature=false) + annotation (Placement(transformation(extent={{70,-50},{90,-30}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe ramp( + Starttime=1, + Duration=2, + Initialvalue=0.2, + Finalvalue=0.8) + annotation (Placement(transformation(extent={{-50,30},{-30,50}}))); +equation + connect(sourceP.C, threeWayValve.C1) + annotation (Line(points={{-70,0},{-10,0}}, color={0,0,255})); + connect(threeWayValve.C2, sinkP1.C) + annotation (Line(points={{10,0},{70,0}}, color={255,0,0})); + connect(threeWayValve.C3, sinkP2.C) + annotation (Line(points={{0,-6},{0,-40},{70,-40}}, color={255,0,0})); + connect(ramp.y, threeWayValve.Ouv) + annotation (Line(points={{-29,40},{0,40},{0,15}}, color={0,0,255})); + annotation (experiment(StopTime=5), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestThreeWayValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve_FlueGases.mo new file mode 100644 index 00000000..9aac55bb --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve_FlueGases.mo @@ -0,0 +1,54 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestThreeWayValve_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare replaceable package Medium = Medium, + P0=450000, + T0=573.15, + option_temperature=true, + X0={0.1,0.2,0.3,0.2,0.2}) + annotation (Placement(transformation(extent={{-90,-10},{-70,10}}))); + ThermoSysPro.Fluid.PressureLosses.ThreeWayValve threeWayValve( + redeclare replaceable package Medium = Medium, + Cvmax1=50000, + Cvmax2=50000, + C2(Q(start=0)), + C3(Q(start=20)), + Valve1(Pm(start=200000)), + Valve2(Pm(start=200000)), + VolumeA1(h(start=2800000))) + annotation (Placement(transformation(extent={{-10,-6},{10,14}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( + redeclare replaceable package Medium = Medium, + P0=100000, + T0=573.15, + option_temperature=true) + annotation (Placement(transformation(extent={{70,-10},{90,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP2( + redeclare replaceable package Medium = Medium, + P0=100000, + T0=573.15, + option_temperature=true) + annotation (Placement(transformation(extent={{70,-50},{90,-30}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe ramp( + Starttime=1, + Duration=2, + Initialvalue=0.2, + Finalvalue=0.8) + annotation (Placement(transformation(extent={{-50,30},{-30,50}}))); +equation + connect(sourceP.C, threeWayValve.C1) + annotation (Line(points={{-70,0},{-10,0}}, color={0,0,255})); + connect(threeWayValve.C2, sinkP1.C) + annotation (Line(points={{10,0},{70,0}}, color={255,0,0})); + connect(threeWayValve.C3, sinkP2.C) + annotation (Line(points={{0,-6},{0,-40},{70,-40}}, color={255,0,0})); + connect(ramp.y, threeWayValve.Ouv) + annotation (Line(points={{-29,40},{0,40},{0,15}}, color={0,0,255})); + annotation (experiment(StopTime=5), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestThreeWayValve_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve_Traces.mo new file mode 100644 index 00000000..50a9e55f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/TestThreeWayValve_Traces.mo @@ -0,0 +1,52 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.PressureLosses; +model TestThreeWayValve_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = + ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + redeclare replaceable package Medium = Medium, + P0=300000, + h0=100000, + option_temperature=false, + SubC0={10}) + annotation (Placement(transformation(extent={{-90,-10},{-70,10}}))); + ThermoSysPro.Fluid.PressureLosses.ThreeWayValve threeWayValve( + redeclare replaceable package Medium = Medium, + C2(Q(start=0)), + C3(Q(start=2000)), + Valve1(Pm(start=200000)), + VolumeA1(h(start=100000))) + annotation (Placement(transformation(extent={{-10,-6},{10,14}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( + redeclare replaceable package Medium = Medium, + P0=100000, + h0=100000, + option_temperature=false) + annotation (Placement(transformation(extent={{70,-10},{90,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP2( + redeclare replaceable package Medium = Medium, + P0=100000, + h0=100000, + option_temperature=false) + annotation (Placement(transformation(extent={{70,-50},{90,-30}}))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe ramp( + Starttime=1, + Duration=2, + Initialvalue=0.2, + Finalvalue=0.8) + annotation (Placement(transformation(extent={{-50,30},{-30,50}}))); +equation + connect(sourceP.C, threeWayValve.C1) + annotation (Line(points={{-70,0},{-10,0}}, color={0,0,255})); + connect(threeWayValve.C2, sinkP1.C) + annotation (Line(points={{10,0},{70,0}}, color={255,0,0})); + connect(threeWayValve.C3, sinkP2.C) + annotation (Line(points={{0,-6},{0,-40},{70,-40}}, color={255,0,0})); + connect(ramp.y, threeWayValve.Ouv) + annotation (Line(points={{-29,40},{0,40},{0,15}}, color={0,0,255})); + annotation (experiment(StopTime=5), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestThreeWayValve_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo new file mode 100644 index 00000000..877bf752 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package PressureLosses + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end PressureLosses; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order new file mode 100644 index 00000000..6c71b9c9 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/PressureLosses/package.order @@ -0,0 +1,42 @@ +TestPipePressureLoss +TestPipePressureLoss_FlueGases +TestPipePressureLoss_Traces +TestSingularPressureLoss +TestSingularPressureLoss_Traces +TestSingularPressureLoss_Traces_FlueGases +TestLumpedStraightPipe +TestLumpedStraightPipe_FlueGases +TestLumpedStraightPipe_Traces +TestInvSingularPressureLoss +TestInvSingularPressureLoss_FlueGases +TestInvSingularPressureLoss_Traces +TestControlValve +TestControlValve_Traces +TestControlValve_Traces_FlueGases +TestThreeWayValve +TestThreeWayValve_FlueGases +TestThreeWayValve_Traces +TestDynamicReliefValve +TestDynamicReliefValve_FlueGases +TestDynamicReliefValve_Traces +TestIdealCheckValve +TestIdealCheckValve_FlueGases +TestIdealCheckValve_Traces +TestDiaphragm +TestDiaphragm_FlueGases +TestDiaphragm_Traces +TestBend +TestBend_FlueGases +TestBend_Traces +TestSwitchValve +TestSwitchValve_FlueGases +TestSwitchValve_Traces +TestIdealSwitchValve +TestIdealSwitchValve_FlueGases +TestIdealSwitchValve_Traces +TestDynamicCheckValve +TestDynamicCheckValve_FlueGases +TestDynamicCheckValve_Traces +TestCheckValve +TestCheckValve_FlueGases +TestCheckValve_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors.mo new file mode 100644 index 00000000..c0f0702e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors.mo @@ -0,0 +1,25 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Sensors; +model TestSensors + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{86,-10},{106,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-106,-10},{-86,10}}))); + ThermoSysPro.Fluid.Sensors.SensorP sensorP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-82,-2},{-62,18}}))); + ThermoSysPro.Fluid.Sensors.SensorQ sensorQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-58,-2},{-38,18}}))); + ThermoSysPro.Fluid.Sensors.SensorQv sensorQv(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-34,-2},{-14,18}}))); + ThermoSysPro.Fluid.Sensors.SensorH sensorH(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-2},{10,18}}))); + ThermoSysPro.Fluid.Sensors.SensorT sensorT(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{14,-2},{34,18}}))); + ThermoSysPro.Fluid.Sensors.SensorSubC sensorSubC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{38,-2},{58,18}}))); + ThermoSysPro.Fluid.Sensors.SensorX sensorX(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{62,-2},{82,18}}))); +equation + connect(sensorP.C1, sourcePQ.C) annotation (Line(points={{-82,0},{-86,0}}, color={0,0,0})); + connect(sensorP.C2, sensorQ.C1) annotation (Line(points={{-61.8,0},{-58,0}}, color={0,0,0})); + connect(sensorQ.C2, sensorQv.C1) annotation (Line(points={{-37.8,0},{-34,0}}, color={0,0,0})); + connect(sensorQv.C2, sensorH.C1) annotation (Line(points={{-13.8,0},{-10,0}}, color={0,0,0})); + connect(sensorH.C2, sensorT.C1) annotation (Line(points={{10.2,0},{14,0}}, color={0,0,0})); + connect(sensorT.C2, sensorSubC.C1) annotation (Line(points={{34.2,0},{38,0}}, color={0,0,0})); + connect(sensorSubC.C2, sensorX.C1) annotation (Line(points={{58.2,0},{62,0}}, color={0,0,0})); + connect(sensorX.C2, sink.C) annotation (Line(points={{82.2,0},{86,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSensors; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors_FlueGases.mo new file mode 100644 index 00000000..2a5805a4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors_FlueGases.mo @@ -0,0 +1,30 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Sensors; +model TestSensors_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{86,-10},{106,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-106,-10},{-86,10}}))); + ThermoSysPro.Fluid.Sensors.SensorP sensorP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-82,-2},{-62,18}}))); + ThermoSysPro.Fluid.Sensors.SensorQ sensorQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-58,-2},{-38,18}}))); + ThermoSysPro.Fluid.Sensors.SensorQv sensorQv(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-34,-2},{-14,18}}))); + ThermoSysPro.Fluid.Sensors.SensorH sensorH(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-2},{10,18}}))); + ThermoSysPro.Fluid.Sensors.SensorT sensorT(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{14,-2},{34,18}}))); + ThermoSysPro.Fluid.Sensors.SensorSubC sensorSubC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{38,-2},{58,18}}))); + ThermoSysPro.Fluid.Sensors.SensorX sensorX(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{62,-2},{82,18}}))); +equation + connect(sensorP.C1, sourcePQ.C) annotation (Line(points={{-82,0},{-86,0}}, color={0,0,0})); + connect(sensorP.C2, sensorQ.C1) annotation (Line(points={{-61.8,0},{-58,0}}, color={0,0,0})); + connect(sensorQ.C2, sensorQv.C1) annotation (Line(points={{-37.8,0},{-34,0}}, color={0,0,0})); + connect(sensorQv.C2, sensorH.C1) annotation (Line(points={{-13.8,0},{-10,0}}, color={0,0,0})); + connect(sensorH.C2, sensorT.C1) annotation (Line(points={{10.2,0},{14,0}}, color={0,0,0})); + connect(sensorT.C2, sensorSubC.C1) annotation (Line(points={{34.2,0},{38,0}}, color={0,0,0})); + connect(sensorSubC.C2, sensorX.C1) annotation (Line(points={{58.2,0},{62,0}}, color={0,0,0})); + connect(sensorX.C2, sink.C) annotation (Line(points={{82.2,0},{86,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSensors_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors_Traces.mo new file mode 100644 index 00000000..c163eb70 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/TestSensors_Traces.mo @@ -0,0 +1,29 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Sensors; +model TestSensors_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace1"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{86,-10},{106,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.2}) + annotation (Placement(transformation(extent={{-106,-10},{-86,10}}))); + ThermoSysPro.Fluid.Sensors.SensorP sensorP(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-82,-2},{-62,18}}))); + ThermoSysPro.Fluid.Sensors.SensorQ sensorQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-58,-2},{-38,18}}))); + ThermoSysPro.Fluid.Sensors.SensorQv sensorQv(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-34,-2},{-14,18}}))); + ThermoSysPro.Fluid.Sensors.SensorH sensorH(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-10,-2},{10,18}}))); + ThermoSysPro.Fluid.Sensors.SensorT sensorT(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{14,-2},{34,18}}))); + ThermoSysPro.Fluid.Sensors.SensorSubC sensorSubC(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{38,-2},{58,18}}))); + ThermoSysPro.Fluid.Sensors.SensorX sensorX(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{62,-2},{82,18}}))); +equation + connect(sensorP.C1, sourcePQ.C) annotation (Line(points={{-82,0},{-86,0}}, color={0,0,0})); + connect(sensorP.C2, sensorQ.C1) annotation (Line(points={{-61.8,0},{-58,0}}, color={0,0,0})); + connect(sensorQ.C2, sensorQv.C1) annotation (Line(points={{-37.8,0},{-34,0}}, color={0,0,0})); + connect(sensorQv.C2, sensorH.C1) annotation (Line(points={{-13.8,0},{-10,0}}, color={0,0,0})); + connect(sensorH.C2, sensorT.C1) annotation (Line(points={{10.2,0},{14,0}}, color={0,0,0})); + connect(sensorT.C2, sensorSubC.C1) annotation (Line(points={{34.2,0},{38,0}}, color={0,0,0})); + connect(sensorSubC.C2, sensorX.C1) annotation (Line(points={{58.2,0},{62,0}}, color={0,0,0})); + connect(sensorX.C2, sink.C) annotation (Line(points={{82.2,0},{86,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestSensors_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo new file mode 100644 index 00000000..1493b189 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package Sensors + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end Sensors; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.order new file mode 100644 index 00000000..89cbb72b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Sensors/package.order @@ -0,0 +1,3 @@ +TestSensors +TestSensors_FlueGases +TestSensors_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo deleted file mode 100644 index 8798a071..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestAirHumidity.mo +++ /dev/null @@ -1,55 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestAirHumidity - - ThermoSysPro.Fluid.BoundaryConditions.AirHumidity airHumidity(hum0=0.9, - ppvap0(start=2085.0), - rho_air(start=1.14), - rho_vap(start=0.015)) - annotation (Placement(transformation(extent={{-10,0},{10,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss(K=1.e-5, rho(start=1.17)) - annotation (Placement(transformation(extent={{40,0},{ - 60,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sinkFlueGases - annotation (Placement(transformation(extent={{80,0},{100,20}},rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceFlueGasesPQ( - option_temperature=true, - Xco2=0, - Xh2o=0.0132625, - Xo2=0.217282, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=100000, - T0=293) annotation (Placement(transformation(extent={{-80,0},{-60,20}}, - rotation=0))); - -equation - connect(airHumidity.C2, singularPressureLoss.C1) - annotation (Line(points={{10,10},{40,10}}, color={0,0,0})); - connect(singularPressureLoss.C2, sinkFlueGases.C) - annotation (Line(points={{60,10},{80,10}}, color={0,0,0})); - connect(sourceFlueGasesPQ.C, airHumidity.C1) - annotation (Line(points={{-60,10},{-10,10}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -
Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestAirHumidity; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo deleted file mode 100644 index ed5108df..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBend.mo +++ /dev/null @@ -1,49 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestBend - - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement(transformation(extent={{-100,26},{-80,46}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1 - annotation (Placement(transformation( - extent={{60,0},{80,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.Bend Bend annotation (Placement( - transformation(extent={{-20,26},{0,46}}, rotation=0))); -equation - connect(Bend.C2, SinkP1.C) - annotation (Line(points={{-10,26},{-10,10},{60,10}}, color={0,0,255})); - connect(SourceP1.C, Bend.C1) - annotation (Line(points={{-80,36},{-20,36}}, color={0,0,255})); - annotation (experiment(StopTime=1000), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestBend; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo deleted file mode 100644 index 25ed08f0..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestBoilerSystem.mo +++ /dev/null @@ -1,69 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestBoilerSystem - import ThermoSysPro; - ThermoSysPro.Fluid.Boilers.BoilerSystem BoilerSystem( - Wloss=0, - Ke=1.e6, - Tsf=386.16) - annotation (Placement(transformation(extent={{-45,-51},{45,51}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( - Xco2=0, - Xh2o=0.01, - Q0=27., - Xo2=0.233, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - T0=298.16, - option_temperature=true) - annotation (Placement(transformation(extent={{-102,-92},{-63,-55}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP annotation (Placement(transformation( - extent={{-56,51},{-98,90}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( - Q0=24., - h0=600e3, - P0=14000000) - annotation (Placement(transformation(extent={{105,-88},{69,-54}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation( - extent={{70,53},{106,89}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(K=1e-3) - annotation (Placement(transformation(extent={{60,-77},{52,-65}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(K=1e-3) - annotation (Placement(transformation(extent={{53,65},{61,77}}, rotation=0))); -equation - connect(singularPressureLoss1.C2, sink.C) - annotation (Line(points={{61,71},{70,71}}, color={0,0,255})); - connect(BoilerSystem.OutletWaterSteam, singularPressureLoss1.C1) annotation ( - Line(points={{38.5714,51},{38.5714,71},{53,71}}, color={0,0,0})); - connect(BoilerSystem.InletWaterSteam, singularPressureLoss.C2) annotation ( - Line(points={{38.5714,-51},{38.5714,-71},{52,-71}}, color={0,0,0})); - connect(singularPressureLoss.C1, sourcePQ.C) annotation (Line(points={{60,-71}, - {66,-71},{66,-71},{69,-71}}, color={0,0,0})); - connect(sinkP.C, BoilerSystem.OutletFlueGases) annotation (Line(points={{-56, - 70.5},{-38.5714,70.5},{-38.5714,51}}, color={0,0,0})); - connect(sourceQ.C, BoilerSystem.InletFlueGases) annotation (Line(points={{-63, - -73.5},{-38.5714,-73.5},{-38.5714,-51}}, color={0,0,0})); - annotation ( Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestBoilerSystem; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo deleted file mode 100644 index 7d3302cc..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCentrifugalPump1.mo +++ /dev/null @@ -1,86 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestCentrifugalPump1 - - ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump( - mode_car=1, - mode_car_hn=1, - mode_car_Cr=1, - dynamic_mech_equation=false) - annotation (Placement(transformation(extent={{-20,20},{0, - 40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(Q0=0) - annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink - annotation (Placement(transformation(extent={{40,20},{60,40}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( - Starttime=10, - Duration=100, - Initialvalue=1400, - Finalvalue=0) annotation (Placement(transformation(extent={{-100,-20},{-80, - 0}}, rotation=0))); - ThermoSysPro.ElectroMechanics.BoundaryConditions.SourceAngularVelocity - sourceAngularVelocity annotation (Placement(transformation(extent={{-60,-20}, - {-40,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ1( Q0=0) - annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation= - 0))); - ThermoSysPro.Fluid.Machines.CentrifugalPump centrifugalPump1( - mode_car=1, - mode_car_hn=1, - mode_car_Cr=1) annotation (Placement(transformation(extent={{-20,-60},{0, - -40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink1 - annotation (Placement(transformation(extent={{40,-60},{60,-40}}, rotation=0))); -equation - connect(sourcePQ.C, centrifugalPump.C1) - annotation (Line(points={{-60,30},{-20,30}}, color={0,0,255})); - connect(centrifugalPump.C2, sink.C) - annotation (Line(points={{0,30},{40,30}}, color={0,0,255})); - connect(sourceAngularVelocity.M, centrifugalPump.M) - annotation (Line(points={{-39,-10},{-10,-10},{-10,19}})); - connect(sourcePQ1.C, centrifugalPump1.C1) - annotation (Line(points={{-60,-50},{-20,-50}}, color={0,0,255})); - connect(centrifugalPump1.C2, sink1.C) - annotation (Line(points={{0,-50},{40,-50}}, color={0,0,255})); - connect(rampe.y, sourceAngularVelocity.IAngularVelocity) - annotation (Line(points={{-79,-10},{-55,-10}})); - annotation (experiment(StopTime=1000), - Diagram(graphics={ - Text( - extent={{-100,100},{-60,80}}, - lineColor={0,0,255}, - textString= - "w=1 ==> w=0"), - Text( - extent={{-100,80},{-60,60}}, - lineColor={0,0,255}, - textString= - "q=0"), - Text( - extent={{-100,60},{-60,40}}, - lineColor={0,0,255}, - textString= - "theta=0 ==> theta=-180")}), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestCentrifugalPump1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo deleted file mode 100644 index f6c47b31..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCheckValve.mo +++ /dev/null @@ -1,101 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestCheckValve - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent= - {{-104,20},{-84,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP( - P0=6e5) annotation (Placement(transformation( - extent={{84,20},{104,40}}, rotation=0))); - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump1 - annotation (Placement(transformation(extent={{-30,60},{-10,80}}, rotation=0))); - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump2 - annotation (Placement(transformation(extent={{-30,-20},{-10,0}}, rotation=0))); - ThermoSysPro.Fluid.Volumes.VolumeD volumeD annotation (Placement( - transformation(extent={{-50,20},{-30,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve1 - annotation (Placement(transformation(extent={{10,60},{30,80}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve2 - annotation (Placement(transformation(extent={{8,-20},{28,0}}, rotation=0))); - ThermoSysPro.Fluid.Volumes.VolumeC volumeC annotation (Placement( - transformation(extent={{30,20},{50,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP - annotation (Placement(transformation( - extent={{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1 - annotation (Placement(transformation( - extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1 - annotation (Placement(transformation( - extent={{-60,-80},{-40,-60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1( - P0=6e5) annotation (Placement(transformation( - extent={{20,-80},{40,-60}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Pulse pulse( - amplitude=6e5, - width=50, - period=100, - offset=3e5) annotation (Placement(transformation(extent={{-100,-80},{-80, - -60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.CheckValve checkValve3 - annotation (Placement(transformation(extent={{-20,-80},{0,-60}}, rotation=0))); -equation - connect(staticCentrifugalPump1.C2, checkValve1.C1) annotation (Line(points={{-10,70}, - {9,70}}, color={0,0,255})); - connect(staticCentrifugalPump2.C2, checkValve2.C1) annotation (Line(points={{ - -10,-10},{0,-10},{0,-10},{7,-10}}, color={0,0,255})); - connect(perteDP1.C2, puitsP.C) - annotation (Line(points={{80,30},{84,30}}, color={0,0,255})); - connect(sourceP.C, perteDP.C1) - annotation (Line(points={{-84,30},{-80,30}}, color={0,0,255})); - connect(sourceP1.C, checkValve3.C1) - annotation (Line(points={{-40,-70},{-21,-70}}, color={0,0,255})); - connect(checkValve3.C2, puitsP1.C) - annotation (Line(points={{1,-70},{20,-70}}, color={0,0,255})); - connect(pulse.y, sourceP1.IPressure) annotation (Line(points={{-79,-70},{-55, - -70}})); - connect(volumeD.Cs1, staticCentrifugalPump1.C1) - annotation (Line(points={{-40,40},{-40,70},{-30,70}}, color={0,0,0})); - connect(volumeD.Cs2, staticCentrifugalPump2.C1) - annotation (Line(points={{-40,20},{-40,-10},{-30,-10}}, color={0,0,0})); - connect(checkValve1.C2, volumeC.Ce2) - annotation (Line(points={{31,70},{40,70},{40,40}}, color={0,0,0})); - connect(checkValve2.C2, volumeC.Ce3) - annotation (Line(points={{29,-10},{40,-10},{40,20}}, color={0,0,0})); - connect(volumeC.Cs, perteDP1.C1) - annotation (Line(points={{50,30},{60,30}}, color={0,0,0})); - connect(perteDP.C2, volumeD.Ce) - annotation (Line(points={{-60,30},{-50,30}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2})), - Window( - x=0.28, - y=0.03, - width=0.5, - height=0.6), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestCheckValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo deleted file mode 100644 index 3472fb86..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCombustionTurbine.mo +++ /dev/null @@ -1,66 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestCombustionTurbine - parameter Real is_eff_n1(fixed=false,start=0.85) "Nominal isentropic efficiency"; - parameter Real Qred1(fixed=false,start=0.01) "Reduced mass flow rate"; - - ThermoSysPro.Fluid.Machines.CombustionTurbine CombustionTurbine( - tau_n=0.065, - is_eff_n=is_eff_n1, - Qred=Qred1, - Pe(fixed=true, start=1500000), - Ts(fixed=true, start=830)) annotation (Placement(transformation(extent={{ - -42,-42},{36,42}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ SourceQ1( - Xso2=0, - Q0=430, - Xco2=0.06, - Xh2o=0.06, - Xo2=0.14, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - T0=1500, - option_temperature=true) - annotation (Placement(transformation(extent={{-106,-10},{-86,10}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(P0=1e5) - annotation (Placement(transformation( - origin={94,0}, - extent={{10,-10},{-10,10}}, - rotation=180))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Wc1(k=-1.8e8) - annotation (Placement(transformation(extent={{-100,-42},{-80,-22}}, - rotation=0))); -equation - connect(SourceQ1.C, CombustionTurbine.Ce) annotation (Line( - points={{-86,0},{-42,0}}, - color={0,0,0}, - thickness=1)); - connect(CombustionTurbine.Cs, SinkP1.C) annotation (Line( - points={{36,0},{84,0}}, - color={0,0,0}, - thickness=1)); - connect(Wc1.y, CombustionTurbine.CompressorPower) - annotation (Line(points={{-79,-32},{-45.9,-32},{-45.9,-16.8}})); - annotation (Diagram(graphics), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestCombustionTurbine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo deleted file mode 100644 index 79b7b6f8..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestCompressor.mo +++ /dev/null @@ -1,61 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestCompressor - parameter Real is_eff_n1(fixed=false,start=0.85) "Nominal isentropic efficiency"; - - ThermoSysPro.Fluid.Machines.Compressor Compressor( - Ps(fixed=false), - tau_n=16, - is_eff_n=is_eff_n1, - Pe(fixed=false, start=100000), - Ts(fixed=true, start=680)) annotation (Placement(transformation(extent={{ - -52,-52},{48,52}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourceQ1( - Xso2=0, - Xco2=0.0, - Xh2o=0.003, - Xo2=0.23, - Q0=420, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=100000, - T0=288, - option_temperature=true) - annotation (Placement(transformation(extent={{-104,-10},{-84,10}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP SinkP1(P0=15.8e5) - annotation (Placement(transformation( - origin={96,0}, - extent={{10,-10},{-10,10}}, - rotation=180))); -equation - connect(SourceQ1.C, Compressor.Ce) annotation (Line( - points={{-84,0},{-39.5,0}}, - color={0,0,0}, - thickness=1)); - connect(Compressor.Cs, SinkP1.C) annotation (Line( - points={{35.5,0},{86,0}}, - color={0,0,0}, - thickness=1)); - annotation (Diagram(graphics), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestCompressor; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo deleted file mode 100644 index 94163735..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiaphragm.mo +++ /dev/null @@ -1,50 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDiaphragm - - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement(transformation(extent={{-64,-10},{-44,10}},rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{44,-10},{64,10}},rotation=0))); - ThermoSysPro.Fluid.PressureLosses.Diaphragm Diaphragm - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0))); -equation - connect(Diaphragm.C2, PuitsP1.C) - annotation (Line(points={{10,0},{44,0}}, color={0,0,255})); - connect(SourceP1.C, Diaphragm.C1) - annotation (Line(points={{-44,0},{-10,0}}, color={0,0,255})); - annotation (experiment(StopTime=1000), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDiaphragm; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo deleted file mode 100644 index f7e59a50..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicOnePhaseFlowPipe.mo +++ /dev/null @@ -1,140 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDiffusion_DynamicOnePhaseFlowPipe - - HeatExchangers.DynamicOnePhaseFlowPipe - dynamicOnePhaseFlowPipe(L=20, - Q(start={5.492026593727256E-28,5.492026607285849E-28,5.492026607285849E-28, - 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28, - 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28, - 5.492026607285849E-28,5.492026607285849E-28}), - h(start={84011.8111671368,96057.08454715868,107718.52365349933, - 119295.22918923412,130792.44987567255,142215.00322033433, - 153567.34130353143,164853.6027022597,176077.65400298327, - 187243.1234252416,198353.42841254506,209411.79856705698}), - continuous_flow_reversal=true, - inertia=false, - dynamic_mass_balance=false, - advection=true, - dynamic_energy_balance=false, - diffusion=true, - P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983, - 99999.999999985,99999.999999988,99999.99999999,99999.999999992,100000, - 100000,100000,100000})) - annotation (Placement(transformation(extent={{-10,30}, - {10,50}}, rotation=0))); - BoundaryConditions.SourceP sourceP( - continuous_flow_reversal=true, - diffusion=true, - P0=100000, - T0=293.15) - annotation (Placement(transformation(extent={{-80,30},{-60,50}}, rotation=0))); - - BoundaryConditions.SinkP sinkP(diffusion=true, - T0=323.15) - annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource( - option_temperature=2, - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - W0={0,0,0,0,0,0,0,0,0,0}) - annotation (Placement(transformation(extent={{-10,70},{10,90}},rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,50},{10,70}},rotation=0))); - PressureLosses.SwitchValve switchValve(Qmin=0) - annotation (Placement(transformation(extent={{-40,36},{-20,56}}))); - InstrumentationAndControl.Blocks.Logique.Echelon echelon(startTime=1) - annotation (Placement(transformation(extent={{-74,66},{-66,74}}))); - InstrumentationAndControl.Blocks.Logique.NONL nONL - annotation (Placement(transformation(extent={{-54,66},{-46,74}}))); - HeatExchangers.DynamicOnePhaseFlowPipe - dynamicOnePhaseFlowPipe1( - L=20, - Q(start={4.9243335191367076E-05,4.924351014778949E-05,4.924351014778949E-05, - 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05, - 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05, - 4.924351014778949E-05,4.924351014778949E-05}), - h(start={84011.8111671368,95792.53373784182,107482.21110144592, - 119086.65906940492,130611.17116650468,142060.60442474802, - 153439.44619534744,164751.8668430315,176001.7618457063, - 187192.78587129858,198328.3807233511,209411.79856705698}), - continuous_flow_reversal=true, - inertia=false, - dynamic_mass_balance=false, - advection=true, - dynamic_energy_balance=false, - diffusion=true, - P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983, - 99999.999999985,99999.999999988,99999.99999999,99999.999999992,100000, - 100000,100000,100000})) - annotation (Placement(transformation(extent={{-10,-70}, - {10,-50}}, rotation=0))); - BoundaryConditions.SourceQ sourceP1( - continuous_flow_reversal=true, - diffusion=true, - Q0=0, - T0=293.15, - option_temperature=true) - annotation (Placement(transformation(extent={{-80,-70},{-60,-50}}, - rotation=0))); - BoundaryConditions.SinkP sinkP1( - diffusion=true, - T0=323.15) - annotation (Placement(transformation(extent={{30,-70},{50,-50}}, - rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource1( - option_temperature=2, - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - W0={0,0,0,0,0,0,0,0,0,0}) - annotation (Placement(transformation(extent={{-10,-30},{10,-10}}, - rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1( - Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,-50},{10,-30}}, - rotation=0))); -equation - connect(dynamicOnePhaseFlowPipe.C2,sinkP. C) annotation (Line(points={{10,40}, - {30,40}}, color={0,0,255})); - connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,70.2}, - {0,62}}, color={191,95,0})); - connect(sourceP.C, switchValve.C1) - annotation (Line(points={{-60,40},{-40,40}}, color={0,0,0})); - connect(switchValve.C2,dynamicOnePhaseFlowPipe. C1) - annotation (Line(points={{-20,40},{-10,40}}, color={0,0,0})); - connect(echelon.yL, nONL.uL) - annotation (Line(points={{-65.6,70},{-54.4,70}}, color={0,0,255})); - connect(nONL.yL, switchValve.Ouv) annotation (Line(points={{-45.6,70},{-30,70}, - {-30,53.2}}, color={0,0,255})); - connect(heatExchangerWall.WT1,dynamicOnePhaseFlowPipe. CTh) - annotation (Line(points={{0,58},{0,43}}, color={0,0,0})); - connect(dynamicOnePhaseFlowPipe1.C2, sinkP1.C) - annotation (Line(points={{10,-60},{30,-60}}, color={0,0,255})); - connect(heatSource1.C, heatExchangerWall1.WT2) - annotation (Line(points={{0,-29.8},{0,-38}}, color={191,95,0})); - connect(heatExchangerWall1.WT1,dynamicOnePhaseFlowPipe1. CTh) - annotation (Line(points={{0,-42},{0,-57}}, color={0,0,0})); - connect(sourceP1.C,dynamicOnePhaseFlowPipe1. C1) - annotation (Line(points={{-60,-60},{-10,-60}}, color={0,0,0})); - annotation (experiment(StopTime=10), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDiffusion_DynamicOnePhaseFlowPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo deleted file mode 100644 index 84f4f856..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicPlateHeatExchanger.mo +++ /dev/null @@ -1,62 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDiffusion_DynamicPlateHeatExchanger - - ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger - echangeurAPlaques1D( - region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - steady_state=true, - Ns=10, - dynamic_energy_balance=false, - diffusion=true, - continuous_flow_reversal=true) - annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0))); - - BoundaryConditions.SourcePQ sourceP( - option_temperature=true, - diffusion=true, - Q0=0, - T0=340) - annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); - BoundaryConditions.SourcePQ sourceP1 - annotation (Placement( - transformation(extent={{-60,20},{-40,40}}, rotation=0))); - BoundaryConditions.Sink puitsP(option_temperature=true, - diffusion=true) annotation (Placement(transformation( - extent={{40,40},{60,60}}, rotation=0))); - BoundaryConditions.Sink puitsP1(diffusion=true, h0=200000) - annotation (Placement(transformation( - extent={{20,20},{40,40}}, rotation=0))); -equation - connect(sourceP.C, echangeurAPlaques1D.Ec) - annotation (Line(points={{-60,50},{-20,50}}, color={0,0,255})); - connect(sourceP1.C, echangeurAPlaques1D.Ef) annotation (Line(points={{-40,30}, - {-15,30},{-15,44}}, color={0,0,255})); - connect(echangeurAPlaques1D.Sc, puitsP.C) annotation (Line(points={{0,50},{20, - 50},{20,50},{40,50}}, color={0,0,255})); - connect(echangeurAPlaques1D.Sf, puitsP1.C) annotation (Line(points={{-5,44},{ - -6,44},{-6,30},{20,30}}, color={0,0,255})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDiffusion_DynamicPlateHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo deleted file mode 100644 index 6ca89991..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_DynamicTwoPhaseFlowPipe.mo +++ /dev/null @@ -1,187 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDiffusion_DynamicTwoPhaseFlowPipe - - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe - dynamicTwoPhaseFlowPipe(L=20, - Q(start={5.492026593727256E-28,5.492026607285849E-28,5.492026607285849E-28, - 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28, - 5.492026607285849E-28,5.492026607285849E-28,5.492026607285849E-28, - 5.492026607285849E-28,5.492026607285849E-28}), - h(start={84011.8111671368,96057.08454715868,107718.52365349933, - 119295.22918923412,130792.44987567255,142215.00322033433, - 153567.34130353143,164853.6027022597,176077.65400298327, - 187243.1234252416,198353.42841254506,209411.79856705698}), - continuous_flow_reversal=true, - inertia=false, - dynamic_mass_balance=false, - advection=true, - dynamic_energy_balance=false, - cpl2(start={4183.826265167646,4182.239614474996,4181.0130500668565, - 4180.0726819587735,4179.380584625066,4178.908955510578, - 4178.63729871947,4178.550389628282,4178.636803895239, - 4178.887855575399,4179.29683238825}), - cpv2(start={2049.2168798430116,2046.3449415228738,2043.4582034172774, - 2040.5558258112756,2037.636860922887,2034.7002308786582, - 2031.744699351002,2028.7688344361377,2025.770959168656, - 2022.7490841743909,2019.518356822069}), - kl2(start={0.5995743350581909,0.5995743350579683,0.5995743350571023, - 0.5995743350562764,0.5995743350555206,0.5995743350548642, - 0.5995743350543319,0.5995743350539415,0.5995743350536991, - 0.599574335053346,0.5995743403506435}), - kv2(start={0.024965829345847085,0.024990303852044017,0.025018417766029456, - 0.02505065954620164,0.025087620205457677,0.025130023834108832, - 0.025178770324693366,0.02523499664554269,0.025300167212669696, - 0.02537621164077076,0.0254715737844706}), - diffusion=true, - pro2(T(start={294.61264959452353,297.4461204783121,300.22404336919567, - 302.982702661547,305.7232156830587,308.44660714369365, - 311.15382285197893,313.8457405734291,316.5231787363566, - 319.18690350188376,321.8376345796106}), d(start={997.892715521068, - 997.2253707910008,996.4959923473901,995.7017938222477, - 994.8471177790162,993.9357736693299,992.9711212203756, - 991.9561376232762,990.8934721677539,989.7854910510117, - 988.6343144234495})), - P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983,99999.999999985, - 99999.999999988,99999.99999999,99999.999999992,100000,100000,100000,100000})) - annotation (Placement(transformation(extent={{-10,30}, - {10,50}}, rotation=0))); - BoundaryConditions.SourceP sourceP( - continuous_flow_reversal=true, - diffusion=true, - P0=100000, - T0=293.15) - annotation (Placement(transformation(extent={{-80,30},{-60,50}}, rotation=0))); - - BoundaryConditions.SinkP sinkP(diffusion=true, - T0=323.15) - annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource( - option_temperature=2, - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - W0={0,0,0,0,0,0,0,0,0,0}) - annotation (Placement(transformation(extent={{-10,70},{10,90}},rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,50},{10,70}},rotation=0))); - PressureLosses.SwitchValve switchValve(Qmin=0) - annotation (Placement(transformation(extent={{-40,36},{-20,56}}))); - InstrumentationAndControl.Blocks.Logique.Echelon echelon(startTime=1) - annotation (Placement(transformation(extent={{-74,66},{-66,74}}))); - InstrumentationAndControl.Blocks.Logique.NONL nONL - annotation (Placement(transformation(extent={{-54,66},{-46,74}}))); - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe - dynamicTwoPhaseFlowPipe1( - L=20, - Q(start={4.9243335191367076E-05,4.924351014778949E-05,4.924351014778949E-05, - 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05, - 4.924351014778949E-05,4.924351014778949E-05,4.924351014778949E-05, - 4.924351014778949E-05,4.924351014778949E-05}), - h(start={84011.8111671368,95792.53373784182,107482.21110144592, - 119086.65906940492,130611.17116650468,142060.60442474802, - 153439.44619534744,164751.8668430315,176001.7618457063, - 187192.78587129858,198328.3807233511,209411.79856705698}), - continuous_flow_reversal=true, - inertia=false, - dynamic_mass_balance=false, - advection=true, - cpl2(start={4183.8461052314415,4182.2694439224715,4181.033777873867, - 4180.086463719214,4179.389099400846,4178.913555072556, - 4178.639109839789,4178.550383980675,4178.6358456341095, - 4178.886733579299,4179.2962820044995}), - cpv2(start={2049.2168798430116,2046.3449415228738,2043.4582034172774, - 2040.5558258112756,2037.636860922887,2034.7002308786582, - 2031.744699351002,2028.7688344361377,2025.770959168656, - 2022.7490841743909,2019.518356822069}), - kl2(start={0.5995743350581909,0.5995743350579683,0.5995743350571023, - 0.5995743350562764,0.5995743350555206,0.5995743350548642, - 0.5995743350543319,0.5995743350539415,0.5995743350536991, - 0.599574335053346,0.5995743403506435}), - kv2(start={0.024965829345847085,0.024990303852044017,0.025018417766029456, - 0.02505065954620164,0.025087620205457677,0.025130023834108832, - 0.025178770324693366,0.02523499664554269,0.025300167212669696, - 0.02537621164077076,0.0254715737844706}), - diffusion=true, - pro2(T(start={294.58103295016184,297.3862511962513,300.1708576823335, - 302.9360907339107,305.6830771234792,308.4128498965468, - 311.12636229776916,313.82449878754863,316.50808386868016, - 319.1778892498971,321.83463973606456}), d(start={997.8997091804818, - 997.2402860410343,996.5106311231898,995.7157728656836, - 994.8600940026633,993.9474377103298,992.9811922410435, - 991.9643590731059,990.8996082946633,989.7893240021328, - 988.6356418174122})), - dynamic_energy_balance=false, - P(start={99999.999999976,99999.999999978,99999.999999981,99999.999999983, - 99999.999999985,99999.999999988,99999.99999999,99999.999999992,100000, - 100000,100000,100000})) - annotation (Placement(transformation(extent={{-10,-70}, - {10,-50}}, rotation=0))); - BoundaryConditions.SourceQ sourceP1( - continuous_flow_reversal=true, - diffusion=true, - Q0=0, - T0=293.15, - option_temperature=true) - annotation (Placement(transformation(extent={{-80,-70},{-60,-50}}, - rotation=0))); - BoundaryConditions.SinkP sinkP1( - diffusion=true, - T0=323.15) - annotation (Placement(transformation(extent={{30,-70},{50,-50}}, - rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource1( - option_temperature=2, - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - W0={0,0,0,0,0,0,0,0,0,0}) - annotation (Placement(transformation(extent={{-10,-30},{10,-10}}, - rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1( - Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,-50},{10,-30}}, - rotation=0))); -equation - connect(dynamicTwoPhaseFlowPipe.C2,sinkP. C) annotation (Line(points={{10,40}, - {30,40}}, color={0,0,255})); - connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,70.2}, - {0,62}}, color={191,95,0})); - connect(sourceP.C, switchValve.C1) - annotation (Line(points={{-60,40},{-40,40}}, color={0,0,0})); - connect(switchValve.C2, dynamicTwoPhaseFlowPipe.C1) - annotation (Line(points={{-20,40},{-10,40}}, color={0,0,0})); - connect(echelon.yL, nONL.uL) - annotation (Line(points={{-65.6,70},{-54.4,70}}, color={0,0,255})); - connect(nONL.yL, switchValve.Ouv) annotation (Line(points={{-45.6,70},{-30,70}, - {-30,53.2}}, color={0,0,255})); - connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowPipe.CTh) - annotation (Line(points={{0,58},{0,43}}, color={0,0,0})); - connect(dynamicTwoPhaseFlowPipe1.C2, sinkP1.C) - annotation (Line(points={{10,-60},{30,-60}}, color={0,0,255})); - connect(heatSource1.C, heatExchangerWall1.WT2) - annotation (Line(points={{0,-29.8},{0,-38}}, color={191,95,0})); - connect(heatExchangerWall1.WT1, dynamicTwoPhaseFlowPipe1.CTh) - annotation (Line(points={{0,-42},{0,-57}}, color={0,0,0})); - connect(sourceP1.C, dynamicTwoPhaseFlowPipe1.C1) - annotation (Line(points={{-60,-60},{-10,-60}}, color={0,0,0})); - annotation (experiment(StopTime=10), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDiffusion_DynamicTwoPhaseFlowPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo deleted file mode 100644 index a417bca8..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDiffusion_VolumeA.mo +++ /dev/null @@ -1,71 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDiffusion_VolumeA - - BoundaryConditions.SourcePQ sourcePQ1( - C(h_vol_2(start=63269.22110794237)), - Q(start=0), - continuous_flow_reversal=false, - Q0=0, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteam, - option_temperature=true, - T0=293.15, - diffusion=true) - annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); - - BoundaryConditions.Sink sink1( - option_temperature=true, - T0=333.15, - diffusion=true) - annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - PressureLosses.SwitchValve switchValve(Qmin=0) - annotation (Placement(transformation(extent={{-60,-4},{-40,16}}))); - InstrumentationAndControl.Blocks.Logique.Constante constante(K=true) - annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - Volumes.VolumeA volumeA( - continuous_flow_reversal=false, - diffusion=true, - dynamic_energy_balance=false, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteam) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - - PressureLosses.SwitchValve switchValve1(Qmin=0, k=2000) - annotation (Placement(transformation(extent={{40,-4},{60,16}}))); - InstrumentationAndControl.Blocks.Logique.Constante constante1(K=true) - annotation (Placement(transformation(extent={{20,20},{40,40}}))); -equation - connect(constante.yL, switchValve.Ouv) - annotation (Line(points={{-59,30},{-50,30},{-50,13.2}}, color={0,0,255})); - connect(sourcePQ1.C, switchValve.C1) - annotation (Line(points={{-80,0},{-60,0}}, color={0,0,0})); - connect(volumeA.Cs1, switchValve1.C1) - annotation (Line(points={{10,0},{40,0}}, color={0,0,0})); - connect(switchValve1.C2,sink1. C) - annotation (Line(points={{60,0},{80,0}}, color={0,0,0})); - connect(constante1.yL, switchValve1.Ouv) - annotation (Line(points={{41,30},{50,30},{50,13.2}}, color={0,0,255})); - connect(switchValve.C2, volumeA.Ce1) - annotation (Line(points={{-40,0},{-10,0}}, color={0,0,0})); - annotation (Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - experiment(StopTime=12), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDiffusion_VolumeA; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo deleted file mode 100644 index 2a6c5e8b..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCheckValve.mo +++ /dev/null @@ -1,58 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicCheckValve - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1 - annotation (Placement(transformation( - extent={{-38,-10},{-18,10}},rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1( - P0=6e5) annotation (Placement(transformation( - extent={{42,-10},{62,10}},rotation=0))); - ThermoSysPro.Fluid.PressureLosses.DynamicCheckValve checkValve(J=10) - annotation (Placement(transformation(extent={{2,-10},{22,10}},rotation=0))); - InstrumentationAndControl.Blocks.Sources.Sinusoide pulse( - period=100, - amplitude=3e5, - offset=6e5) annotation (Placement(transformation(extent={{-78,-10},{-58,10}}, - rotation=0))); -equation - connect(sourceP1.C, checkValve.C1) - annotation (Line(points={{-18,0},{2,0}}, color={0,0,255})); - connect(checkValve.C2, puitsP1.C) annotation (Line(points={{22,0},{32,0},{42, - 0}}, color={0,0,255})); - connect(sourceP1.IPressure, pulse.y) - annotation (Line(points={{-33,0},{-57,0}}, color={28,108,200})); - annotation ( - Diagram(graphics, - coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2})), - Window( - x=0.28, - y=0.03, - width=0.5, - height=0.6), - experiment(StopTime=300), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicCheckValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo deleted file mode 100644 index 28f75489..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicCondenser.mo +++ /dev/null @@ -1,119 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicCondenser - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(Pm(displayUnit = "Pa", start= - 355000.00000015664), Q(fixed = false), hn(fixed = false, start= - 71.08245675235786), p_rho(displayUnit = "kg/m3"), rho(displayUnit = "kg/m3"), - a1(start=-88.67, fixed=false), - C2(h(start=195297.69906611618), h_vol_1(start=195297.69906611618)), - Qv(start=0.009081311621074862), - h(start=193554.9971298399), - C1(P(start=10000.0))) annotation ( - Placement(visible = true, transformation(origin={-10,-60}, extent={{10,-10}, - {-10,10}}, rotation = 0))); - ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Pe(displayUnit = "Pa", fixed = true, start = 700000), Ps(displayUnit = "Pa", fixed = false), W_fric = 0, eta_is(fixed = false), eta_is_wet(fixed = false), rhos(displayUnit = "kg/m3", fixed = false), - xm(fixed=false, start=0.9856238368898451), - proe(x(start=1, fixed=true)), - Ce(h_vol_2(start=3128840.013040668), h(start=3128840.0130323363)), - pros(d(start=0.07018147245152216))) annotation ( - Placement(visible = true, transformation(origin={-10,60}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); - ThermoSysPro.Fluid.HeatExchangers.DynamicCondenser Condenseur( - dynamic_energy_balance=true, - Rv=20, - steady_state=false) annotation ( - Placement(visible = true, transformation(origin={40.5,-1}, extent = {{-20.5, -16}, {20.5, 16}}, rotation = 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur(P0 = 1e5, T0 = 373.05, option_temperature = true) annotation ( - Placement(visible = true, transformation(origin={91,-1}, extent = {{-11, -12}, {11, 12}}, rotation = 0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePCaloporteur( h0 = 113e3, - option_temperature=true, - Q0=100) annotation ( - Placement(visible = true, transformation(origin={-10,-1}, extent = {{-10, -9}, {10, 9}}, rotation = 0))); - ThermoSysPro.Fluid.Volumes.VolumeATh - volumeA( - P(start=70e5), - h(start=2.e6), - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-70,10},{-50,-10}}))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource - heatSource(W0(start={2e6}, each fixed=false), - option_temperature=2) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={-88,12}))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Vapeur_GCT1(Table=[0, - 0.0001; 22,0.0001; 24,2.02; 25,100; 26,150; 28,300; 29.7,590; 30.2,600; - 30.5,590; 31,570; 35,250; 40,100; 45,15; 47,0.000001; 200,0.000001; - 1000,0.000001]) - annotation (Placement(transformation(extent={{-56,34},{-44,46}}, - rotation=0))); - BoundaryConditions.SourceQ Source_Vsup1( - h0=2759.6e3, Q0=1) - annotation ( Placement(transformation( - extent={{-40,10},{-20,30}}, rotation=0))); - PressureLosses.SingularPressureLoss - PressureLoss_VapeurIn_in4(K=1e-4, Q(fixed=false, start=0.01)) - annotation (Placement(transformation(extent={{0,10},{ - 20,30}}, rotation=0))); -equation - connect(staticCentrifugalPump.C2,volumeA. Ce2) - annotation (Line(points={{-20,-60},{-60,-60},{-60,-10}}, color={28,108,200})); - connect(volumeA.Cs2,stodolaTurbine. Ce) - annotation (Line(points={{-60,10},{-60,60},{-20.1,60}}, color={28,108,200})); - connect(heatSource.C[1],volumeA. Cth) annotation (Line(points={{-78.2,12},{-64, - 12},{-64,0},{-60,0}}, color={0,0,0})); - connect(sourcePCaloporteur.C, Condenseur.Ce1) annotation (Line(points={{0,-1},{ - 2,-1},{2,-1.16},{20,-1.16}}, color={0,0,0})); - connect(Condenseur.Ce2, puitsPCaloporteur.C) annotation (Line(points={{60.795, - -1.16},{66.3975,-1.16},{66.3975,-1},{80,-1}}, color={0,0,0})); - connect(Condenseur.C2ex, staticCentrifugalPump.C1) - annotation (Line(points={{40.5,-17},{40.5,-60},{0,-60}}, color={0,0,0})); - connect(stodolaTurbine.Cs, Condenseur.C1vap) - annotation (Line(points={{0.1,60},{40.5,60},{40.5,15}}, color={0,0,0})); - connect(Vapeur_GCT1.y, Source_Vsup1.IMassFlow) - annotation (Line(points={{-43.4,40},{-30,40},{-30,25}}, color={0,0,255})); - connect(Source_Vsup1.C, PressureLoss_VapeurIn_in4.C1) - annotation (Line(points={{-20,20},{0,20}}, color={0,0,0})); - connect(PressureLoss_VapeurIn_in4.C2, Condenseur.C2vap) annotation (Line( - points={{20,20},{32.505,20},{32.505,13.72}}, color={0,0,0})); - annotation ( - Diagram(graphics={ - Text( - extent={{-94,34},{-64,24}}, - lineColor={28,108,200}, - textString="W: free"), - Text( - extent={{-26,-38},{8,-48}}, - lineColor={28,108,200}, - textString="a1: free"), - Text( - extent={{-28,94},{8,84}}, - lineColor={28,108,200}, - textString="Pe: fixed"), - Text( - extent={{-28,84},{10,72}}, - lineColor={28,108,200}, - textString="proe.x: fixed")}), - Documentation(info=" - -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - experiment(StopTime=10000)); -end TestDynamicCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo deleted file mode 100644 index 71794c51..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum.mo +++ /dev/null @@ -1,183 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicDrum - parameter Units.SI.MassFlowRate Qin(fixed=false, start=80) "Mass flow rate"; - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=670) - "Maximum CV (active if mode_caract=0)"; - parameter Real LambdaPipe(fixed=false,start=0.085) - "Friction pressure loss coefficient (active if lambda_fixed=true)"; - - Volumes.DynamicDrum Drum( - Vv(start=39), - Vertical=false, - hl(start=1454177.7248984643), - hv(start=2670002.8920646077), - xv(start=0.01), - rhol(start=670), - rhov(start=78), - zl(fixed=true, start=1.05), - wsftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidType.WaterSteam, - Cm(diff_res_1(start=8476939.240220599)), - steady_state=true, - dynamic_energy_balance=false, - P0=13000000, - diffusion=true, - P(start=13000000, fixed=true), - Pfond(start=13006991.905108), - Tp(start=590.93934457637)) - annotation (Placement(transformation(extent={{-61,18},{1, - 80}}, rotation=0))); - - PressureLosses.ControlValve feedwaterValve( - Cv(start=335), - C1( - h_vol_1(start=1400e3), - h(start=1400e3), - P(start=13300000), - Q(start=79.5)), - Q(start=79.5), - rho(start=888), - h(start=1400000), - Cvmax=CvmaxWater, - Pm(start=13100000)) - annotation (Placement(transformation(extent={{-120,76},{ - -100,96}}, rotation=0))); - PressureLosses.ControlValve steamValve( - Cvmax(fixed=true) = 50000, - Cv(start=25000), - Q(start=79.5), - rho(start=78.5), - h(start=2657930), - Pm(start=12998726.577779422)) - annotation (Placement(transformation(extent={{40,76},{60,96}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon(k(fixed=true) = 0.5) - annotation (Placement(transformation(extent={{-160,122},{-140,142}}, - rotation=0))); - HeatExchangers.DynamicTwoPhaseFlowPipe - TubeEcranBoucleEvaporatoire( - T0=fill(400, 10), - heb(start={10409,10268,10127,9985,9842,9698,9552,9406,9258,9111}), - advection=false, - z2=10, - simplified_dynamic_energy_balance=false, - D=0.03, - ntubes=1400, - h(start={1454177.75,1531100.8018215413,1608023.8787446183,1684946.955667695, - 1761870.032590772,1838793.109513849,1915716.186436926, - 1992639.2633600028,2069562.3402830793,2146485.4172061565, - 2223408.4941292335,1454177.75}), - L=20, - Q(start=fill(130, 11)), - dynamic_mass_balance=false, - inertia=false, - dynamic_energy_balance=false, - diffusion=true, - P(start={13032002.884172,13025908.565037,13020089.245351,13015847.070697, - 13012648.443752,13010064.118918,13007881.468256,13005979.718403, - 13004283.685995,13002743.397189,13001323.948575,13000000})) - annotation (Placement(transformation( - origin={6,-26}, - extent={{-10,10},{10,-10}}, - rotation=90))); - Thermal.BoundaryConditions.HeatSource - SourceC3( - option_temperature=2, - W0={1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7}, - T0={290,290,290,290,290,290,290,290,290,290}) - annotation (Placement(transformation( - origin={36,-26}, - extent={{-10,-10},{10,10}}, - rotation=270))); - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, L=20, - D=0.03, - ntubes=1400, - dynamic_energy_balance=false) - annotation (Placement(transformation( - origin={18,-26}, - extent={{-10,-10},{10,10}}, - rotation=90))); - PressureLosses.LumpedStraightPipe lumpedStraightPipe( - L=20, - z1=20, - Q(fixed=true, start=130), - lambda=LambdaPipe) - annotation (Placement(transformation( - origin={-66,-26}, - extent={{10,-10},{-10,10}}, - rotation=90))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon1(k(fixed=true) = 0.5) - annotation (Placement(transformation(extent={{0,122},{20,142}}, rotation=0))); - BoundaryConditions.SourceP sourceP(h0=1400000, - P0(fixed=true) = 13200000, - option_temperature=false) - annotation (Placement(transformation(extent={{-200,70},{-180,90}}, - rotation=0))); - BoundaryConditions.SinkQ sinkQ(Q0=75) - annotation (Placement(transformation(extent={{120,70},{140,90}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - SteamMassFlowRate(k=Qin) - annotation (Placement(transformation(extent={{100,122},{120,142}}, rotation= - 0))); -equation - connect(Drum.Cv,steamValve. C1) - annotation (Line(points={{1,80},{40,80}}, color={0,0,255})); - connect(feedwaterValve.C2, Drum.Ce1) - annotation (Line(points={{-100,80},{-61,80}}, color={0,0,255})); - connect(Drum.Cd, lumpedStraightPipe.C1) annotation (Line(points={{-61,18},{ - -66,18},{-66,-16}}, color={0,0,255})); - connect(heatExchangerWall.WT1, SourceC3.C) annotation (Line(points={{20,-26}, - {26.2,-26}}, color={191,95,0})); - connect(Drum.Cm, TubeEcranBoucleEvaporatoire.C2) - annotation (Line(points={{1,18},{6,18},{6,-16}})); - connect(TubeEcranBoucleEvaporatoire.CTh, heatExchangerWall.WT2) annotation (Line( - points={{9,-26},{16,-26}}, color={191,95,0})); - connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv) - annotation (Line(points={{-139,132},{-110,132},{-110,97}}, smooth=Smooth.None)); - connect(sourceP.C,feedwaterValve. C1) annotation (Line( - points={{-180,80},{-120,80}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(steamValve.C2, sinkQ.C) annotation (Line( - points={{60,80},{120,80}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(TubeEcranBoucleEvaporatoire.C1, lumpedStraightPipe.C2) - annotation (Line(points={{6,-36},{6,-68},{-66,-68},{-66,-36}})); - connect(ConsigneNiveauBallon1.y,steamValve. Ouv) - annotation (Line(points={{21,132},{50,132},{50,97}}, smooth=Smooth.None)); - connect(SteamMassFlowRate.y, sinkQ.IMassFlow) - annotation (Line(points={{121,132},{130,132},{130,85}})); - annotation (experiment(StopTime=1000), - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-100},{140,200}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicDrum; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo deleted file mode 100644 index 72c9c76b..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicDrum_CC.mo +++ /dev/null @@ -1,190 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicDrum_CC - import ThermoSysPro; - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=670) - "Maximum CV (active if mode_caract=0)"; - parameter Real LambdaPipe(fixed=false,start=0.085) - "Friction pressure loss coefficient (active if lambda_fixed=true)"; - - ThermoSysPro.Fluid.Volumes.DynamicDrum Drum( - Vv(start=39), - Vertical=false, - hl(start=1454400), - hv(start=2.658e6), - xv(start=0.01), - rhol(start=670), - rhov(start=78), - zl(fixed=true, start=1.05), - wsftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidType.WaterSteam, - P0=13000000, - P(start=13000000, fixed=false), - Tp(start=592.6)) annotation (Placement(transformation(extent={{-61,18},{1, - 80}}, rotation=0))); - - ThermoSysPro.Fluid.PressureLosses.ControlValve FeedwaterValve( - Cv(start=335), - Q(start=79.5), - rho(start=888), - h(start=1400000), - C1( - h_vol_1(start=1400e3), - h(start=1400e3), - Q(start=79.5), - P(start=13300000)), - Cvmax=CvmaxWater, - Pm(start=13100000)) - annotation (Placement(transformation(extent={{-120,76},{ - -100,96}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve SteamValve( - Cv(start=25000), - Q(start=79.5), - rho(start=78.5), - h(start=2657930), - Cvmax=10000, - Pm(start=12900000)) - annotation (Placement(transformation(extent={{40,76},{60,96}}, rotation=0))); - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe - TubeEcranBoucleEvaporatoire( - T0=fill(400, 10), - heb(start={10409,10268,10127,9985,9842,9698,9552,9406,9258,9111}), - advection=false, - z2=10, - simplified_dynamic_energy_balance=false, - P(start={13007000,13006600,13006000,13005500,13005000,13004500,13004000,13003000, - 13002000,13001000,13000000,12999990}), - D=0.03, - ntubes=1400, - h(start={1400e3,1450e3,1500e3,1550e3,1600e3,1650e3,1700e3,1750e3,1800e3,1850e3, - 1900e3,1950e3}), - L=20, - Q(start=fill(130, 11))) - annotation (Placement(transformation( - origin={6,-26}, - extent={{-10,10},{10,-10}}, - rotation=90))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC3( - option_temperature=2, - W0={1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7}, - T0={290,290,290,290,290,290,290,290,290,290}) - annotation (Placement(transformation( - origin={36,-26}, - extent={{-10,-10},{10,10}}, - rotation=270))); - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, L=20, - D=0.03, - ntubes=1400) - annotation (Placement(transformation( - origin={18,-26}, - extent={{-10,-10},{10,10}}, - rotation=90))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe( - L=20, - z1=20, - C1(P(start=130e5)), - Q(fixed=true, start=130), - lambda=LambdaPipe) - annotation (Placement(transformation( - origin={-66,-26}, - extent={{10,-10},{-10,10}}, - rotation=90))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceQ(h0=1400000, - option_temperature=false, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteam, - P0=13300000) - annotation (Placement(transformation(extent={{-196,70},{-176,90}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( - option_temperature=false, - h0=2.650e6, - P0=12700000) - annotation (Placement(transformation(extent={{115,70},{135,90}}, rotation=0))); - InstrumentationAndControl.Blocks.Sources.Constante SteamValve_O(k=0.5) - annotation (Placement(transformation(extent={{20,102},{40,121}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Steam_Pressure(Table=[0, - 128e5; 100,128e5; 110,124e5; 200,124e5; 400,128e5; 2000,128e5; 2010, - 131e5; 2090,131e5; 2300,128e5; 3000,128e5]) - annotation (Placement(transformation(extent={{96,99},{120,123}}, rotation= - 0))); - ThermoSysPro.Examples.Control.Drum_LevelControl regulation_Niveau( - add(k1=-1, k2=+1), - Ti=50, - pIsat( - ureset0=0.5, - Limiteur1(u(signal(start=0.5))), - Ti=2000)) annotation (Placement(transformation(extent={{-56,106},{-84,132}}, - rotation=0))); - InstrumentationAndControl.Blocks.Sources.Constante Level(k=1.05) annotation ( - Placement(transformation(extent={{-21,102},{-40,121}}, rotation=0))); -equation - connect(Drum.Cv, SteamValve.C1) - annotation (Line(points={{1,80},{40,80}}, color={0,0,255})); - connect(FeedwaterValve.C2, Drum.Ce1) - annotation (Line(points={{-100,80},{-61,80}}, color={0,0,255})); - connect(Drum.Cd, lumpedStraightPipe.C1) annotation (Line(points={{-61,18},{ - -66,18},{-66,-16}}, color={0,0,255})); - connect(heatExchangerWall.WT1, SourceC3.C) annotation (Line(points={{20,-26}, - {26.2,-26}}, color={191,95,0})); - connect(Drum.Cm, TubeEcranBoucleEvaporatoire.C2) - annotation (Line(points={{1,18},{6,18},{6,-16}})); - connect(TubeEcranBoucleEvaporatoire.CTh, heatExchangerWall.WT2) annotation (Line( - points={{9,-26},{16,-26}}, color={191,95,0})); - connect(sourceQ.C, FeedwaterValve.C1) annotation (Line( - points={{-176,80},{-120,80}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(SteamValve.C2,sinkP. C) annotation (Line( - points={{60,80},{115,80}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(TubeEcranBoucleEvaporatoire.C1, lumpedStraightPipe.C2) - annotation (Line(points={{6,-36},{6,-68},{-66,-68},{-66,-36}})); - connect(SteamValve_O.y, SteamValve.Ouv) - annotation (Line(points={{41,111.5},{50,111.5},{50,97}}, color={0,0,255})); - connect(Steam_Pressure.y, sinkP.IPressure) annotation (Line(points={{121.2, - 111},{130,111},{130,80}}, color={0,0,255})); - connect(Level.y, regulation_Niveau.ConsigneNiveauEau) annotation (Line( - points={{-40.95,111.5},{-44,111.5},{-44,111.2},{-55.3,111.2}}, - color={0,0,0}, - pattern=LinePattern.Dash)); - - connect(Drum.yLevel, regulation_Niveau.MesureNiveauEau) annotation (Line( - points={{4.1,49},{10,49},{10,130.7},{-55.3,130.7}}, - color={0,0,0}, - pattern=LinePattern.Dash)); - connect(regulation_Niveau.SortieReelle1, FeedwaterValve.Ouv) annotation (Line( - points={{-84.7,107.3},{-110,107.3},{-110,97}}, color={0,0,255})); - annotation (experiment(StopTime=3000), - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(graphics, - coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-100},{140,200}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicDrum_CC; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo deleted file mode 100644 index 3bc15a51..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicFlueGasesMultiFluidHeatExchanger.mo +++ /dev/null @@ -1,89 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicFlueGasesMultiFluidHeatExchanger - - BoundaryConditions.SourceP sourceP(C(h_vol_2(start= - 71016.12237181065)), - option_temperature=true, - P0=10000000, - Q(start=190407.49090838886)) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - BoundaryConditions.SinkP sinkP(C(h_vol_1(start= - 71016.1223718086))) - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - HeatExchangers.DynamicFlueGasesMultiFluidHeatExchanger dynamicMultiFluidHeatExchanger( - steady_state=true, - Cfg1(h_vol_2(start=1999458.3239137873)), - Cfg2(h_vol_1(start=1997835.1051783948)), - ExchangerFlueGasesMetal( - P(start={5000000.0,5000000.0,5000000.0,5000000.0,5000000.0,5000000.0}), - Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343, - 2702.7912398488343,2702.7912398488343}), - Tp(start={293.20684981473266,293.655268073503,294.1038710234491, - 294.55265602776745}), - h(start={2000000.0,1999458.375,1998916.9494222174,1998375.8765143699, - 1997835.125,100000.0}), - rho2(start={9.227614370571606,9.229671002969678,9.231727464730685, - 9.23378375498367,9.235839872860517})), - TwoPhaseFlowPipe( - P(start={10000000.0,8023904.042494878,6045867.025005122, - 4065878.0712931687,2083926.1359166082,100000.0}), - Q(start={3482.228448926616,3482.228448926616,3482.228448926616, - 3482.228448926616,3482.228448926616}), - h(start={80196.484375,80197.90894929563,80199.3305700632, - 80200.75139888813,80202.17143579095,70825.8984375})), - ExchangerWall(Tp(start={291.91912560937857,292.368260847782, - 292.81758075140095,293.26708268122}), Tp1(start={ - 290.60590026437563,291.055766680952,291.5058177362657, - 291.9560507892685})), - Ns=4, - inertia=false, - Ntubes=100, - diffusion=true, - dynamic_energy_balance=true) - annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - BoundaryConditions.SourcePQ sourceP1( - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - h0=2e6, - P0=5000000, - Q0=500, - T0=1273.15) - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90, - origin={-10,70}))); - - BoundaryConditions.Sink sinkP1 - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, - rotation=90, - origin={-10,-10}))); -equation - connect(sourceP.C, dynamicMultiFluidHeatExchanger.Cws1) - annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchanger.Cws2, sinkP.C) - annotation (Line(points={{0,30},{20,30}}, color={0,0,0})); - connect(sourceP1.C, dynamicMultiFluidHeatExchanger.Cfg1) - annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchanger.Cfg2, sinkP1.C) - annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicFlueGasesMultiFluidHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo deleted file mode 100644 index b4a5492d..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchanger.mo +++ /dev/null @@ -1,85 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicMultiFluidHeatExchanger - - BoundaryConditions.SourceQ sourceP(C(h_vol_2(start= - 71016.12237181065)), - Q0=10, - option_temperature=true) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(C(h_vol_1(start= - 71016.1223718086))) - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - HeatExchangers.DynamicMultiFluidHeatExchanger dynamicMultiFluidHeatExchanger( - steady_state=true, - diffusion=true, - dynamic_energy_balance=false, - Cfg1(h_vol_2(start=71016.12237181155)), - Cfg2(h_vol_1(start=71016.12237181314)), - DynamicOnePhaseFlowPipe_1( - P(start={300000.0,260001.59713260198,220002.3957916478,180002.39588440701, - 140001.5973181204,100000.0}), - Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343, - 2702.7912398488343,2702.7912398488343}), - h(start={71016.125,71016.125,71016.12237180988,71016.1223718091,71016.125, - 70825.8984375})), - DynamicOnePhaseFlowPipe_2( - P(start={300000.0,260001.59801114563,220002.39710936273,180002.3972020214, - 140001.59819646296,100000.0}), - Q(start={3482.228448926616,3482.228448926616,3482.228448926616, - 3482.228448926616,3482.228448926616}), - Tp(start={290.0310327031831,290.04018142634584,290.0493302229013, - 290.05847909283045}), - h(start={71016.125,71016.125,71016.12237181216,71016.12237181274, - 71016.125,70825.8984375})), - ExchangerWall(Tp(start={290.03103270324897,290.0401814264445, - 290.0493302229999,290.05847909289605}), Tp1(start={ - 290.03103270331616,290.04018142654525,290.0493302231005, - 290.0584790929629})), - Ntubes=10, - Ns=4, - inertia=false) - annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=5000000, - T0=1273.15) - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90, - origin={-10,70}))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1 - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, - rotation=90, - origin={-10,-10}))); -equation - connect(sourceP.C, dynamicMultiFluidHeatExchanger.Cws1) - annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchanger.Cws2, sinkP.C) - annotation (Line(points={{0,30},{20,30}}, color={0,0,0})); - connect(sourceP1.C, dynamicMultiFluidHeatExchanger.Cfg1) - annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchanger.Cfg2, sinkP1.C) - annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicMultiFluidHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo deleted file mode 100644 index 36781c7f..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicMultiFluidHeatExchangerShell.mo +++ /dev/null @@ -1,87 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicMultiFluidHeatExchangerShell - - BoundaryConditions.SourceQ sourceP(C(h_vol_2(start= - 71016.12237181065)), - Q0=10, - option_temperature=true) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(C(h_vol_1(start= - 71016.1223718086))) - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - HeatExchangers.DynamicMultiFluidHeatExchangerShell dynamicMultiFluidHeatExchangerShell( - Cfg1(h_vol_2(start=71016.12237181155)), - Cfg2(h_vol_1(start=71016.12237181314)), - DynamicOnePhaseFlowPipe( - P(start={300000.0,260001.59713260198,220002.3957916478,180002.39588440701, - 140001.5973181204,100000.0}), - Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343, - 2702.7912398488343,2702.7912398488343}), - h(start={71016.125,71016.125,71016.12237180988,71016.1223718091,71016.125, - 70825.8984375})), - dynamicOnePhaseFlowShell( - P(start={300000.0,260001.59801114563,220002.39710936273,180002.3972020214, - 140001.59819646296,100000.0}), - Q(start={3482.228448926616,3482.228448926616,3482.228448926616, - 3482.228448926616,3482.228448926616}), - Tp(start={290.0310327031831,290.04018142634584,290.0493302229013, - 290.05847909283045}), - h(start={71016.125,71016.125,71016.12237181216,71016.12237181274, - 71016.125,70825.8984375})), - ExchangerWall(Tp(start={290.03103270324897,290.0401814264445, - 290.0493302229999,290.05847909289605}), Tp1(start={ - 290.03103270331616,290.04018142654525,290.0493302231005, - 290.0584790929629})), - Ntubes=10, - Ns=4, - region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - Dext=0.01, - inertia=false, - dynamic_energy_balance=false, - diffusion=true) - annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - - BoundaryConditions.SourceP sourceP1( - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=5000000, - T0=1273.15) - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90, - origin={-10,70}))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1 - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, - rotation=90, - origin={-10,-10}))); -equation - connect(sourceP.C, dynamicMultiFluidHeatExchangerShell.Cws1) - annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchangerShell.Cws2, sinkP.C) - annotation (Line(points={{0,30},{20,30}}, color={0,0,0})); - connect(sourceP1.C, dynamicMultiFluidHeatExchangerShell.Cfg1) - annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchangerShell.Cfg2, sinkP1.C) - annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicMultiFluidHeatExchangerShell; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo deleted file mode 100644 index 73556af2..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowPipe.mo +++ /dev/null @@ -1,62 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicOnePhaseFlowPipe - - ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe - dynamicOnePhaseFlowPipe( - Q(start={536.5750641592207,536.5750641592207,536.5750641592207, - 536.5750641592207,536.5750641592207,536.5750641592207, - 536.5750641592207,536.5750641592207,536.5750641592207, - 536.5750641592207,536.5750641592207}), - h(start={71016.12237181116,74743.46665892199,78470.81094603281, - 82198.15523314364,85925.49952025448,89652.84380736532, - 93380.18809447614,97107.53238158698,100834.8766686978, - 104562.22095580865,108289.56524291947,70825.9016030344}), - P(start={300000,281833.41863537,263664.30473175,245492.47958308, - 227317.76827098,209139.99948382,190959.00534677,172774.621262, - 154586.68575823,136395.04034906,118199.5293995,100000})) - annotation (Placement(transformation(extent={{-20, - 20},{0,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - option_temperature=2, - W0={2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6,2e6}) - annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0))); - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10) - annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0))); -equation - connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-40, - 30},{-20,30}}, color={0,0,255})); - connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{0,30}, - {20,30}}, color={0,0,255})); - connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{-10, - 60.2},{-10,52}}, color={191,95,0})); - connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh) - annotation (Line(points={{-10,48},{-10,33}}, color={191,95,0})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicOnePhaseFlowPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo deleted file mode 100644 index b34b26b2..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicOnePhaseFlowShell.mo +++ /dev/null @@ -1,80 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicOnePhaseFlowShell - - ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowShell - dynamicOnePhaseFlowPipeShell( - Q(start={30,30,30,30,30,30,30,30,30,30,30}), - Ds=1, - ntubes=520, - L=12, - P(start={2000000,1996000,1993000,1990000,1986000,1983000,1980000,1976000, - 1973000,1965000,1955000,1950000})) annotation (Placement( - transformation(extent={{-48,-36},{48,36}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(option_temperature=false, P0(fixed= - false) = 1900000) - annotation (Placement(transformation(extent={{74,-15},{102,15}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=600e3, - P0=2000000, - Q(start=500, fixed=true)) - annotation (Placement(transformation(extent={{-103,-15},{-75,15}}, - rotation=0))); - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall( - lambda=10, - Ns=10, - cpw=460, - rhow=7900, - D=0.017, - e=0.002, - ntubes=520, - L=12) annotation (Placement(transformation(extent={{-54,30},{54,58}}, - rotation=0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( - option_temperature=2, - W0={-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6,-2e6}, - T0={300,300,300,300,300,300,300,300,300,300}) - annotation (Placement(transformation(extent={{-12,76},{12,98}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( - Initialvalue=20e5, - Starttime=300, - Duration=600, - Finalvalue=19.8e5) - annotation (Placement(transformation(extent={{-100,32},{ - -80,52}}, rotation=0))); -equation - connect(sourceP.C, dynamicOnePhaseFlowPipeShell.C1) - annotation (Line(points={{-75,0},{-48,0}}, color={0,0,255})); - connect(dynamicOnePhaseFlowPipeShell.C2, sinkP.C) - annotation (Line(points={{48,0},{74,0}}, color={0,0,255})); - connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipeShell.CTh) - annotation (Line(points={{0,41.2},{0,10.8}}, color={191,95,0})); - connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{0, - 76.22},{0,46.8}}, color={191,95,0})); - connect(rampe.y, sourceP.IPressure) - annotation (Line(points={{-79,42},{-70,42},{-70,24},{-98,24},{-98,0},{-96,0}})); - annotation (Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicOnePhaseFlowShell; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo deleted file mode 100644 index 42f8e5ea..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicPlateHeatExchanger.mo +++ /dev/null @@ -1,89 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicPlateHeatExchanger - - ThermoSysPro.Fluid.HeatExchangers.DynamicPlateHeatExchanger - echangeurAPlaques1D( - region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - steady_state=true, - Ns=10, - dynamic_energy_balance=false, - diffusion=true, - continuous_flow_reversal=true) - annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0))); - - BoundaryConditions.SourcePQ sourceP( - option_temperature=true, - diffusion=true, - T0=340) - annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); - BoundaryConditions.SourcePQ sourceP1 - annotation (Placement( - transformation(extent={{-60,20},{-40,40}}, rotation=0))); - BoundaryConditions.Sink puitsP(option_temperature=true, - diffusion=true) annotation (Placement(transformation( - extent={{40,40},{60,60}}, rotation=0))); - BoundaryConditions.Sink puitsP1 - annotation (Placement(transformation( - extent={{20,20},{40,40}}, rotation=0))); - HeatExchangers.StaticPlateHeatExchanger echangeurAPlaques(region_c= - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1) - annotation (Placement(transformation(extent={{-20,-40},{0,-20}}, rotation=0))); - BoundaryConditions.SourcePQ sourceP2(T0=340, - option_temperature=true) - annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}, - rotation=0))); - BoundaryConditions.SourcePQ sourceP3 - annotation (Placement( - transformation(extent={{-60,-60},{-40,-40}}, - rotation=0))); - BoundaryConditions.Sink puitsP2 - annotation (Placement(transformation( - extent={{40,-40},{60,-20}}, - rotation=0))); - BoundaryConditions.Sink puitsP3 - annotation (Placement(transformation( - extent={{20,-60},{40,-40}}, - rotation=0))); -equation - connect(sourceP.C, echangeurAPlaques1D.Ec) - annotation (Line(points={{-60,50},{-20,50}}, color={0,0,255})); - connect(sourceP1.C, echangeurAPlaques1D.Ef) annotation (Line(points={{-40,30}, - {-15,30},{-15,44}}, color={0,0,255})); - connect(echangeurAPlaques1D.Sc, puitsP.C) annotation (Line(points={{0,50},{20, - 50},{20,50},{40,50}}, color={0,0,255})); - connect(echangeurAPlaques1D.Sf, puitsP1.C) annotation (Line(points={{-5,44},{ - -6,44},{-6,30},{20,30}}, color={0,0,255})); - connect(sourceP2.C, echangeurAPlaques.Ec) - annotation (Line(points={{-60,-30},{-20,-30}}, color={0,0,255})); - connect(sourceP3.C, echangeurAPlaques.Ef) - annotation (Line(points={{-40,-50},{-15,-50},{-15,-36}}, color={0,0,255})); - connect(echangeurAPlaques.Sc, puitsP2.C) annotation (Line(points={{0,-29.8},{20, - -29.8},{20,-30},{40,-30}}, color={0,0,255})); - connect(echangeurAPlaques.Sf, puitsP3.C) annotation (Line(points={{-5,-36},{-6, - -36},{-6,-50},{20,-50}}, color={0,0,255})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicPlateHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo deleted file mode 100644 index a650c999..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicReliefValve.mo +++ /dev/null @@ -1,103 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicReliefValve - import ThermoSysPro; - parameter ThermoSysPro.Units.SI.AbsolutePressure Pinitial=18e5 - "Initial pressure"; - parameter ThermoSysPro.Units.SI.AbsolutePressure Pfinal=Pinitial - "Final pressure"; - parameter ThermoSysPro.Units.SI.AbsolutePressure Pmax=21e5 "Maximum pressure"; - - ThermoSysPro.Fluid.PressureLosses.DynamicReliefValve reliefValve( - mech_steady_state=false, - caract=[0,0; 0.1,2745; 0.2,4915; 0.3,6391; 0.4,7339; 0.5,7949; 0.6,8351; - 0.7,8625; 0.8,8818; 0.9,8958; 1,9063], - Cvmax=9063, - Q(start=0), - Pm(start=Pinitial), - Pout=sinkP.P0, - mode_caract=2, - A2=1.1*reliefValve.A1, - A1=1.3*Modelica.Constants.pi*pipe.D^2/4, - m=50, - Cd=0.44, - Popen=2000000, - z_max=0.05) - annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe pipe( - Q(start=0), - Pm(start=Pinitial), - L=2, - D=0.2) annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP - annotation (Placement(transformation(extent={{80,0},{ - 100,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}))); - InstrumentationAndControl.Blocks.Sources.Rampe ramp1( - Duration=200, - Finalvalue=Pmax, - Initialvalue=Pinitial) - annotation (Placement(transformation(extent={{-100,40},{-80,60}}))); - InstrumentationAndControl.Blocks.Sources.Rampe ramp2( - Duration=200, - Starttime=300, - Finalvalue=Pmax - Pfinal) - annotation (Placement(transformation(extent={{-100,0},{-80,20}}))); - InstrumentationAndControl.Blocks.Math.Add add(k2=-1) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - ThermoSysPro.Fluid.PressureLosses.Bend bend(R0=0.2, D=pipe.D) - annotation (Placement(transformation(extent={{0,-20},{20,-40}}))); - ThermoSysPro.Fluid.PressureLosses.Diaphragm diaphragm(Ouv=1, D=0.5) - annotation (Placement(transformation(extent={{40,0},{60,20}}))); -equation - connect(sourceP.C, pipe.C1) - annotation (Line(points={{-60,-30},{-40,-30}}, color={0,0,255})); - connect(ramp1.y, add.u1) annotation (Line(points={{-79,50},{-70,50},{-70,36},{ - -61,36}}, color={0,0,255})); - connect(ramp2.y, add.u2) annotation (Line(points={{-79,10},{-70,10},{-70,24},{ - -61,24}}, color={0,0,255})); - connect(add.y, sourceP.IPressure) annotation (Line(points={{-39,30},{-20,30},{ - -20,-10},{-90,-10},{-90,-30},{-75,-30}}, - color={0,0,255})); - connect(pipe.C2, bend.C1) - annotation (Line(points={{-20,-30},{0,-30}}, color={0,0,255})); - connect(bend.C2,reliefValve. C1) - annotation (Line(points={{10,-20},{10,0.2}},color={0,0,255})); - connect(reliefValve.C2, diaphragm.C1) - annotation (Line(points={{20,10},{40,10}}, color={0,0,255})); - connect(diaphragm.C2,sinkP. C) - annotation (Line(points={{60,10},{80,10}}, color={0,0,255})); - annotation ( - Diagram(coordinateSystem( - preserveAspectRatio=false, initialScale=0.1)), - Window( - x=0.1, - y=0.08, - width=0.5, - height=0.6), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}, - coordinateSystem(preserveAspectRatio=false, initialScale=0.1)), - experiment(StopTime=600, Interval=1), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicReliefValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo deleted file mode 100644 index e5e3e0e4..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowPipe.mo +++ /dev/null @@ -1,120 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicTwoPhaseFlowPipe - - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe - dynamicTwoPhaseFlowPipe(L=20, advection=false, - Q(start={378.2555714391421,378.2555714391421,378.2555714391421, - 378.2555714391421,378.2555714391421,378.2555714391421, - 378.2555714391421,378.2555714391421,378.2555714391421, - 378.2555714391421,378.2555714391421}), - h(start={71016.12237181116,89522.1287033792,108028.13503495205, - 126534.14136650086,145040.14769798872,163546.15402957145, - 182052.16036112772,200558.16669267463,219064.17302421754, - 237570.17935577242,256076.18568728055,70825.9016030344}), - dynamic_energy_balance=false, - diffusion=true, - P(start={300000,281934.94102069,263857.29519348,245762.87920492, - 227647.89301968,209508.84324089,191342.485106,173145.77779074, - 154915.84935981,136649.96881108,118345.52340716,100000})) - annotation (Placement(transformation(extent={{-10,30}, - {10,50}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent={{-50,30},{-30,50}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP - annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource( - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - option_temperature=2, - W0={7e6,7e6,7e6,7e6,7e6,7e6,7e6,7e6,7e6,7e6}) - annotation (Placement(transformation(extent={{-10,70},{10,90}},rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,50},{10,70}},rotation=0))); - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe dynamicTwoPhaseFlowPipe1( - L=10, - D=0.03, - dpfCorr(fixed=false, - start=0.23963336533422905)= - 1, - inertia=true, - P(start={2000000,1999571.7070274,1999140.9402168,1998707.6248919, - 1998271.6837223,1997833.0364983,1997391.5998908,1996715.822109, - 1995640.0182728,1994163.0145856,1992283.4952231,1990000})) - annotation (Placement(transformation(extent={{-40,-90}, - {40,-32}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - C(Q(fixed=true, start=1)), - option_temperature=false, - h0=800e3, - P0=2000000) - annotation (Placement(transformation(extent={{-90,-70},{-70,-50}},rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1( - option_temperature=false, - h0=2000e3, - P0=1990000) - annotation (Placement(transformation(extent={{70,-70},{90,-50}},rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource1( - option_temperature=2, - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - W0={2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4,2e4}) - annotation (Placement(transformation(extent={{-10,-11},{10,9}}, rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1( Ns=10, - L=10, - lambda=10, - cpw=460, - rhow=7900, - e=0.005, - D=0.03) - annotation (Placement(transformation(extent={{-40,-70},{40,10}},rotation=0))); - InstrumentationAndControl.Blocks.Sources.Rampe rampe( - Initialvalue=20e5, - Starttime=300, - Duration=600, - Finalvalue=19.8e5) - annotation (Placement(transformation(extent={{-74,-46},{-86, - -35}}, - rotation=0))); -equation - connect(sourceP.C,dynamicTwoPhaseFlowPipe. C1) annotation (Line(points={{-30,40}, - {-10,40}}, color={0,0,255})); - connect(dynamicTwoPhaseFlowPipe.C2,sinkP. C) annotation (Line(points={{10,40}, - {30,40}}, color={0,0,255})); - connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,70.2}, - {0,62}}, color={191,95,0})); - connect(heatExchangerWall.WT1,dynamicTwoPhaseFlowPipe. CTh) - annotation (Line(points={{0,58},{0,43}}, color={191,95,0})); - connect(sourceP1.C,dynamicTwoPhaseFlowPipe1. C1) annotation (Line(points={{-70,-60}, - {-42,-60},{-42,-61},{-40,-61}}, color={0, - 0,255})); - connect(dynamicTwoPhaseFlowPipe1.C2,sinkP1. C) annotation (Line(points={{40,-61}, - {40,-60},{70,-60}}, color={0,0,255})); - connect(heatSource1.C,heatExchangerWall1. WT2) - annotation (Line(points={{0,-10.8},{0,-22}}, color={191,95,0})); - connect(heatExchangerWall1.WT1,dynamicTwoPhaseFlowPipe1. CTh) - annotation (Line(points={{0,-38},{0,-52.3}}, color={191,95,0})); - connect(rampe.y,sourceP1. IPressure) - annotation (Line(points={{-86.6,-40.5},{-92,-40.5},{-92,-60},{-85,-60}})); - annotation (experiment(StopTime=1000), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicTwoPhaseFlowPipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo deleted file mode 100644 index 236edda9..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicTwoPhaseFlowRiser.mo +++ /dev/null @@ -1,79 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicTwoPhaseFlowRiser - - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowRiser dynamicTwoPhaseFlowRiser( - L=20, - inertia=false, - advection=false, - dynamic_energy_balance=true, - Q(start={0.7975821689256883,0.7975821689256898,0.7975821689256883, - 0.7975821689256885,0.7975821689256883,0.797582168925689, - 0.7975821689256886,0.7975821689256887,0.7975821689256888, - 0.7975821689256888,0.7975821689256886}), - h(start={71016.12237181116,196401.3226637204,196412.6067675415, - 196423.89087136256,196435.17497518365,196446.45907900474, - 196457.7431828258,196469.0272866469,196480.31139046798, - 196491.59549428907,196502.87959811013,70825.9016030344}), - diffusion=true, - P(start={300000,281879.25838975,263692.15565175,245504.87004838, - 227317.40156239,209129.75017657,190941.91587368,172753.89863649, - 154565.69844777,136377.31529027,118188.74914676,100000})) annotation ( - Placement(transformation(extent={{-10,30},{10,48}}, rotation=0))); - BoundaryConditions.SourceP sourcePQ(ftype= - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.WaterSteamSimple) - annotation (Placement(transformation(extent={{-50,30},{-30,50}}, rotation=0))); - BoundaryConditions.SinkP sinkP - annotation (Placement(transformation(extent={{30,30},{50,50}}, rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource( - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - option_temperature=2, - W0={0,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}) - annotation (Placement(transformation(extent={{-10,80},{10,100}}, - rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,60},{10,80}},rotation=0))); - Thermal.BoundaryConditions.HeatSource heatSource1( - T0={1000,1100,1200,1300,1400,1500,1600,1700,1800,1900}, - option_temperature=2, - W0={0,0,0,0,0,0,0,0,0,0}) - annotation (Placement(transformation(extent={{-10,0},{10,-20}},rotation=0))); - Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall1(Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,20},{10,0}}, rotation=0))); -equation - connect(sourcePQ.C, dynamicTwoPhaseFlowRiser.C1) annotation (Line(points={{-30, - 40},{-20,40},{-20,39.9},{-10,39.9}}, color={0,0,255})); - connect(dynamicTwoPhaseFlowRiser.C2, sinkP.C) annotation (Line(points={{10, - 39.9},{20,39.9},{20,40},{30,40}}, color={0,0,255})); - connect(heatSource.C,heatExchangerWall. WT2) annotation (Line(points={{0,80.2}, - {0,72}}, color={191,95,0})); - connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowRiser.CTh1) - annotation (Line(points={{0,68},{0,45.3}}, color={0,0,0})); - connect(dynamicTwoPhaseFlowRiser.CTh2, heatExchangerWall1.WT1) - annotation (Line(points={{0,34.5},{0,12}}, color={0,0,0})); - connect(heatExchangerWall1.WT2, heatSource1.C) - annotation (Line(points={{0,8},{0,-0.2}}, color={0,0,0})); - annotation (experiment(StopTime=1000), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicTwoPhaseFlowRiser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo deleted file mode 100644 index a185b333..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeating.mo +++ /dev/null @@ -1,306 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicWaterHeating - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=68.5297) - "Maximum CV (active if mode_caract=0)"; - parameter Real LambdaPipe(fixed=false,start=0.003003) - "Friction pressure loss coefficient (active if lambda_fixed=true)"; - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=2750.e3, - P0=40e5) - annotation (Placement(transformation(extent={{-192,110},{-150,150}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur1( - option_temperature=false, P0(fixed=true) = 10e5) - annotation (Placement(transformation(extent={{124,-202},{160,-162}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve ControlValve_eau( - mode_caract=0, - Cvmax=CvmaxWater, - Q(fixed=false, start=38.0656), - Pm(start=24.771e5), - h(start=906345), - C1(h_vol_1(start=906345), h(start=906345)), - Cv(start=34.26, fixed=false)) - annotation (Placement(transformation(extent={{88,-186}, - {108,-166}}, rotation=0))); - - ThermoSysPro.Fluid.HeatExchangers.DynamicWaterHeater WaterHeating( - ec=2e-3, - Ns=10, - Rv=1.2, - Lc=2.5, - PasL=0.028, - PasT=0.024, - ntubes3=1500, - Dc=0.018, - ntubes1=400, - ntubes2=400, - L1=11, - L2=11, - L3=22, - pipe_1( - z2=0.4, - Tp(start={500,501,502,503,504,505,506,507,508,510}), - h(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3, - 965e3,980e3}), - hb(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3, - 965e3}), - Q(start={202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4, - 202.4}), - P(start={222.700e5,222.690e5,222.680e5,222.670e5,222.660e5,222.650e5, - 222.640e5,222.630e5,222.620e5,222.610e5,222.600e5,222.590e5})), - pipe_2( - z2=0.4, - Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - h(start={965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3, - 1070e3,1080e3,1080e3}), - hb(start={965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3, - 1070e3,1080e3}), - Q(start={57.57,57.57,57.57,57.57,57.57,57.57,57.57,57.57,57.57,57.57, - 57.57}), - P(start={222.600e5,222.590e5,222.580e5,222.570e5,222.560e5,222.550e5, - 222.540e5,222.530e5,222.520e5,222.51e5,222.50e5,222.48e5})), - C2ex(P(start=3900000)), - Wall_1( - Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4})), - Wall_2( - Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4})), - Wall_3( - Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,516, - 516.4,517,517.4,518,518.4,519,519.4}), - Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4, - 516,516.4,517,517.4,518,518.4,519,519.4}), - Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4, - 516,516.4,517,517.4,518,518.4,519,519.4})), - volumeC(h(start=1082.65e3), P(start=222.48e5)), - volumeD1(h(start=953939), P(start=222.48e5)), - volumeD(h(start=812750), P(start=222.72e5)), - WaterHeating( - steady_state=true, - Vertical=false, - step_square=true, - Kvl=1, - Klp=1500, - Kvp=1200, - Kpa=0.2, - V=70, - Mp=50000, - zl(fixed=true, start=0.5), - P(fixed=true, start=39.5e5), - Cv(Q(fixed=false, start=35), P(fixed=false, start=39.5e5)), - hv(start=1463490), - hl(start=906345), - Pfond(start=39.542e5), - Tp1(start={500,501,502,503,504,505,506,507,508,510}), - Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - Tp3(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4, - 516,516.4,517,517.4,518,518.4,519,519.4}), - Tp(start=509)), - pipe_3( - z2=1, - Tp(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4,516, - 516.4,517,517.4,518,518.4,519,519.4}), - h(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3, - 965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,1070e3, - 1080e3,1080e3}), - hb(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3, - 965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,1070e3, - 1080e3}), - Q(start={202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4, - 202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4}), - P(start={222.700e5,222.690e5,222.680e5,222.670e5,222.660e5,222.650e5, - 222.640e5,222.630e5,222.620e5,222.610e5,222.600e5,222.590e5, - 222.580e5,222.570e5,222.560e5,222.550e5,222.540e5,222.530e5, - 222.520e5,222.51e5,222.50e5,222.48e5})), - P0c=4000000) annotation (Placement(transformation(extent={{-58,-90},{162,96}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2 - annotation (Placement(transformation(extent={{-150,22},{-192,66}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossWaterIn( K=35, Q(fixed=false, - start=250), - Pm(start=227e5)) annotation (Placement(transformation(extent={{-99, - -48},{-79,-28}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossWaterOut( K=30, Q(fixed=false, - start=250), - Pm(start=222.48e5), - C2(h_vol_1(start=1082650), h(start=1082650))) - annotation (Placement(transformation(extent={{ - -80,34},{-100,54}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - option_temperature=true, - P0=220e5, - h0=900e3, - T0=482.87) - annotation (Placement(transformation(extent={{-192,-60},{-150,-16}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(Q0=53, C1(h_vol_1(start= - 1082.65e3), h(start=1082.65e3))) - annotation (Placement(transformation(extent={{-115,34},{-135,54}}, rotation= - 0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA( - Table=[0,260; 378,260; 390,238; 438,275; 507,135; 936,65; 1404,50; 1872, - 50]) annotation (Placement(transformation(extent={{-195,78},{-175, - 98}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Level(k=0.50) - annotation (Placement(transformation(extent={{135, - -152},{113,-130}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.IdealCheckValve checkValve(Qmin=0.5, C2(h_vol_1( - start=2750.e3), h(start=2750.e3))) - annotation (Placement(transformation(extent={{-100,122},{-84,138}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossPurge( K=1e-3, - T(fixed=false, start=461.56), - Q(fixed=false, start=35), - Pm(start=3900000), - C2(h_vol_1(start=906340), h(start=906340))) - annotation (Placement(transformation( - origin={54,-138}, - extent={{-10,-10},{10,10}}, - rotation=270))); - ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps - Pression_purge(Table=[0,10e5; 378,10e5; 418,7e5; 1145,3.9e5; 2000,3.9e5]) - annotation (Placement(transformation(extent={{162,-178},{182, - -158}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PressureLoss_Steam( - Q(fixed=false, start=35), - L=10, - D=0.1, - lambda=LambdaPipe, - Pm(start=40.34e5), - C1(h_vol_1(start=2750e3), h(start=2750e3))) - annotation (Placement(transformation(extent={{-48,162}, - {30,98}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_Turbine1(Table= - [0,41.19e5; 378,41.19e5; 418,21.e5; 1145,5.e5; 2000,5.e5]) - annotation (Placement(transformation(extent={{-195,160},{ - -175,180}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA2( - Table=[0,222.72e5; 378,222.72e5; 438,230e5; 597,217e5; 1000, - 216e5; 1533,214e5; 1863,213.5e5; 2340,213e5; 2500,213e5]) - annotation (Placement(transformation(extent={{-195,-8},{-175, - 12}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Temperature_eauA1(Table= - [0,462; 448,462; 1155,420.0; 2000,420.0]) - annotation (Placement(transformation(extent={{-196,-84},{ - -176,-64}}, rotation=0))); -equation - connect(ControlValve_eau.C2, Puit_condenseur1.C) - annotation (Line(points={{108,-182},{124,-182}}, color={0,0,255})); - connect(Puit_condenseur2.C,refQ. C2) annotation (Line( - points={{-150,44},{-135,44}}, - color={255,0,0}, - thickness=0.5)); - connect(refQ.C1, singularPressureLossWaterOut.C2) - annotation (Line( - points={{-115,44},{-100,44}}, - color={255,0,0}, - thickness=0.5)); - connect(sourceP1.C, singularPressureLossWaterIn.C1) - annotation (Line( - points={{-150,-38},{-99,-38}}, - color={0,0,255}, - thickness=0.5)); - connect(singularPressureLossWaterOut.C1, WaterHeating.Ce2) - annotation (Line( - points={{-80,44},{-64,44},{-64,43.92},{-58,43.92}}, - color={255,0,0}, - thickness=0.5)); - connect(singularPressureLossWaterIn.C2, WaterHeating.Ce1) - annotation (Line( - points={{-79,-38},{-58,-38},{-58,-38.85}}, - color={0,0,255}, - thickness=0.5)); - connect(sourceP.C, checkValve.C1) annotation (Line( - points={{-150,130},{-100,130}}, - color={127,0,0}, - thickness=1)); - connect(singularPressureLossPurge.C1, WaterHeating.C2ex) - annotation (Line(points={{54,-128},{54,-90},{52,-90}})); - connect(Pression_purge.y, Puit_condenseur1.IPressure) - annotation (Line(points={{183,-168},{196,-168},{196,-182},{151,-182}})); - connect(checkValve.C2, PressureLoss_Steam.C1) annotation (Line( - points={{-84,130},{-48,130}}, - color={127,0,0}, - thickness=1)); - connect(WaterHeating.C1vap, PressureLoss_Steam.C2) annotation (Line( - points={{52,96},{52,130},{30,130}}, - color={127,0,0}, - thickness=1)); - connect(singularPressureLossPurge.C2, ControlValve_eau.C1) annotation (Line( - points={{54,-148},{54,-182},{88,-182}}, color={0,0,255})); - connect(Pression_Turbine1.y, sourceP.IPressure) annotation (Line(points={{ - -174,170},{-174,152},{-190,152},{-190,130},{-181.5,130}})); - connect(Pression_eauA2.y, sourceP1.IPressure) annotation (Line(points={{-174, - 2},{-174,-10},{-194,-10},{-194,-38},{-181.5,-38}})); - connect(Debit_eauA.y, refQ.IMassFlow) - annotation (Line(points={{-174,88},{-125,88},{-125,55}})); - connect(Level.y, ControlValve_eau.Ouv) - annotation (Line(points={{111.9,-141},{98,-141},{98,-165}})); - connect(Temperature_eauA1.y, sourceP1.ISpecificEnthalpyOrTemperature) - annotation (Line(points={{-175,-74},{-171,-74},{-171,-49}}, color={0,0,255})); - annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,200}}), - graphics={ - Text( - extent={{-124,206},{130,146}}, - lineColor={0,0,255}, - textString= - "1 Ouv et 1 Cvmax = false, Qvap et niveau=true ou P cavite"), - Text( - extent={{-74,-190},{118,-222}}, - lineColor={0,0,255}, - textString= - "COP0l_coef_h =false , T_Dp_purge=true"), - Text( - extent={{-186,-198},{-84,-212}}, - lineColor={0,0,255}, - textString= - "Qvap=true ==> Erreur"), - Text( - extent={{16,170},{130,156}}, - lineColor={0,0,255}, - textString= - "checkValve Qmin =0.5"), - Text( - extent={{-136,168},{-18,154}}, - lineColor={0,0,255}, - textString="With guess values")}), - experiment(StopTime=1000, Tolerance=1e-004), - experimentSetupOutput, - Icon(graphics={ - Rectangle( - lineColor={128,128,128}, - extent={{-220,-240},{220,240}}, - radius=25.0), - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicWaterHeating; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo deleted file mode 100644 index 9d9573f8..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterHeatingOnePipe.mo +++ /dev/null @@ -1,298 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicWaterHeatingOnePipe - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater(fixed=false, start=68.5297) - "Maximum CV (active if mode_caract=0)"; - parameter Real LambdaPipe(fixed=false,start=0.003003) - "Friction pressure loss coefficient (active if lambda_fixed=true)"; - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=2750.e3, - P0=40e5) - annotation (Placement(transformation(extent={{-192,110},{-150,150}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur1( - option_temperature=false, P0(fixed=true) = 10e5) - annotation (Placement(transformation(extent={{124,-202},{160,-162}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve ControlValve_eau( - mode_caract=0, - Cvmax=CvmaxWater, - Q(fixed=false, start=38.0656), - Pm(start=24.771e5), - h(start=906345), - C1(h_vol_1(start=906345), h(start=906345)), - Cv(start=34.26, fixed=false)) - annotation (Placement(transformation(extent={{88,-186}, - {108,-166}}, rotation=0))); - - ThermoSysPro.Fluid.HeatExchangers.DynamicWaterHeaterOnePipe WaterHeating( - ec=2e-3, - Ns=10, - Rv=1.2, - Lc=2.5, - PasL=0.028, - PasT=0.024, - ntubes3=1500, - Dc=0.018, - ntubes1=400, - ntubes2=400, - L1=11, - L2=11, - L3=22, - C2ex(P(start=3953920.2674434385)), - Wall_3( - Tp(start={497.4216192636609,502.69423468274414,506.9759296757205, - 510.4223715331536,513.1750788320363,515.3580718035844, - 517.0775540203194,518.4230303861297,519.4690257033071, - 520.2769753151857,520.8970764101637,521.3700027404278, - 521.7284442755915,521.9984626845046,522.2006676867453, - 522.3512258466948,522.4627164232634,522.5440949624972, - 522.5983494885799,522.6391412946117}), - Tp1(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4, - 516,516.4,517,517.4,518,518.4,519,519.4}), - Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4,515,515.4, - 516,516.4,517,517.4,518,518.4,519,519.4})), - volumeC(h(start=1083284.4675828198), P(start=22239324.06759518)), - volumeD(h(start=812750.3853612987), P(start=222.72e5)), - WaterHeating( - steady_state=true, - Vertical=false, - step_square=true, - Kvl=1, - Klp=1500, - Kvp=1200, - Kpa=0.2, - V=70, - Mp=50000, - zl(fixed=true, start=0.5), - P(fixed=true, start=39.5e5), - Cv(Q(fixed=false, start=35), P(fixed=false, start=39.5e5)), - hv(start=1431115.3931413875), - hl(start=1083784.8007690564), - Pfond(start=39.542e5), - Tp1(start={500,501,502,503,504,505,506,507,508,510}), - Tp2(start={510,510.4,511,511.4,512,512.4,513,513.4,514,514.4}), - Tp3(start={502.0668232342926,506.5603551100769,510.17517354535573, - 513.0552006761686,515.3300849797615,517.1125155075463, - 518.4982207642074,519.5672140241339,520.3855368446975, - 521.0071208743625,521.475583235511,521.8258726586643, - 522.0857355520467,522.276996946816,522.4166635499804, - 522.5178617542946,522.5906259809204,522.6416937796047, - 522.6717272169116,522.6943081560064}), - Tp(start=522.7203786935834)), - pipe_3( - z2=1, - Tp(start={492.2865845099074,498.42043682971996,503.43932965553495, - 507.5119139438755,510.7928300582301,513.4186242679523, - 515.5070797958261,517.1581940553467,518.4558696409629, - 519.4698368458761,520.2575667844292,520.866061927203, - 521.3334770960658,521.6905573412918,521.9618953291181, - 522.1670184035046,522.3213189657012,522.4362044759667, - 522.5172341741693,522.5781571584042}), - h(start={812750.375,863278.0600600096,905331.3426571415,940130.751800155, - 968769.0495620216,992209.8823638612,1011293.6430149649, - 1026746.7829727756,1039192.5095809929,1049161.7546575891, - 1057103.8294379094,1063396.4712379558,1068355.1441001317, - 1072241.5390561111,1075271.2636377309,1077620.734010462, - 1079433.2969658624,1080824.6185597836,1081886.238523024, - 1082684.3963576336,1083284.4675828198,1083284.5}), - hb(start={813e3,826e3,850e3,865e3,880e3,895e3,905e3,920e3,935e3,950e3, - 965e3,980e3,995e3,1010e3,1120e3,1130e3,1040e3,1050e3,1060e3,1070e3, - 1080e3}), - Q(start={202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4, - 202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4,202.4}), - P(start={22269346.0,22267948.39153832,22266544.294239394, - 22265134.171108145,22263718.740660597,22262298.715698708, - 22260874.773397826,22259447.536273584,22258017.56171816, - 22256585.338030815,22255151.28511641,22253715.75831186, - 22252279.054104224,22250841.416797128,22249403.045444023, - 22247964.100585815,22246524.71050402,22245084.976831134, - 22243644.979685582,22242204.783200525,22240764.436308913,22239324.0})), - P0c=4000000) annotation (Placement(transformation(extent={{-58,-90},{162,96}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur2 - annotation (Placement(transformation(extent={{-150,22},{-192,66}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossWaterIn( K=35, Q(fixed=false, - start=250), - Pm(start=22270672.891128033)) - annotation (Placement(transformation(extent={{-99, - -48},{-79,-28}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossWaterOut( K=30, Q(fixed=false, - start=250), - Pm(start=22238086.493105933), - C2(h_vol_1(start=1082650), h(start=1082650))) - annotation (Placement(transformation(extent={{ - -80,34},{-100,54}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - option_temperature=true, - P0=220e5, - h0=900e3, - T0=482.87) - annotation (Placement(transformation(extent={{-192,-60},{-150,-16}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(Q0=53, C1(h_vol_1(start= - 1082.65e3), h(start=1082.65e3))) - annotation (Placement(transformation(extent={{-115,34},{-135,54}}, rotation= - 0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps Debit_eauA( - Table=[0,260; 378,260; 390,238; 438,275; 507,135; 936,65; 1404,50; 1872, - 50]) annotation (Placement(transformation(extent={{-195,78},{-175, - 98}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante Level(k=0.50) - annotation (Placement(transformation(extent={{135, - -152},{113,-130}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.IdealCheckValve checkValve(Qmin=0.5, C2(h_vol_1( - start=2750.e3), h(start=2750.e3))) - annotation (Placement(transformation(extent={{-100,122},{-84,138}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossPurge( K=1e-3, - T(fixed=false, start=461.56), - Q(fixed=false, start=35), - Pm(start=3953920.266328794), - C2(h_vol_1(start=906340), h(start=906340))) - annotation (Placement(transformation( - origin={54,-138}, - extent={{-10,-10},{10,10}}, - rotation=270))); - ThermoSysPro.InstrumentationAndControl.Blocks.Tables.Table1DTemps - Pression_purge(Table=[0,10e5; 378,10e5; 418,7e5; 1145,3.9e5; 2000,3.9e5]) - annotation (Placement(transformation(extent={{162,-178},{182, - -158}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PressureLoss_Steam( - Q(fixed=false, start=35), - L=10, - D=0.1, - lambda=LambdaPipe, - Pm(start=40.34e5), - C1(h_vol_1(start=2750e3), h(start=2750e3))) - annotation (Placement(transformation(extent={{-48,162}, - {30,98}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_Turbine1(Table= - [0,41.19e5; 378,41.19e5; 418,21.e5; 1145,5.e5; 2000,5.e5]) - annotation (Placement(transformation(extent={{-195,160},{ - -175,180}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Pression_eauA2( - Table=[0,222.72e5; 378,222.72e5; 438,230e5; 597,217e5; 1000, - 216e5; 1533,214e5; 1863,213.5e5; 2340,213e5; 2500,213e5]) - annotation (Placement(transformation(extent={{-195,-8},{-175, - 12}}, rotation=0))); - InstrumentationAndControl.Blocks.Tables.Table1DTemps Temperature_eauA1(Table= - [0,462; 448,462; 1155,420.0; 2000,420.0]) - annotation (Placement(transformation(extent={{-196,-84},{ - -176,-64}}, rotation=0))); -equation - connect(ControlValve_eau.C2, Puit_condenseur1.C) - annotation (Line(points={{108,-182},{124,-182}}, color={0,0,255})); - connect(Puit_condenseur2.C,refQ. C2) annotation (Line( - points={{-150,44},{-135,44}}, - color={255,0,0}, - thickness=0.5)); - connect(refQ.C1, singularPressureLossWaterOut.C2) - annotation (Line( - points={{-115,44},{-100,44}}, - color={255,0,0}, - thickness=0.5)); - connect(sourceP1.C, singularPressureLossWaterIn.C1) - annotation (Line( - points={{-150,-38},{-99,-38}}, - color={0,0,255}, - thickness=0.5)); - connect(singularPressureLossWaterOut.C1, WaterHeating.Ce2) - annotation (Line( - points={{-80,44},{-64,44},{-64,43.92},{-58,43.92}}, - color={255,0,0}, - thickness=0.5)); - connect(singularPressureLossWaterIn.C2, WaterHeating.Ce1) - annotation (Line( - points={{-79,-38},{-58,-38},{-58,-38.85}}, - color={0,0,255}, - thickness=0.5)); - connect(sourceP.C, checkValve.C1) annotation (Line( - points={{-150,130},{-100,130}}, - color={127,0,0}, - thickness=1)); - connect(singularPressureLossPurge.C1, WaterHeating.C2ex) - annotation (Line(points={{54,-128},{54,-90},{52,-90}})); - connect(Pression_purge.y, Puit_condenseur1.IPressure) - annotation (Line(points={{183,-168},{196,-168},{196,-182},{151,-182}})); - connect(checkValve.C2, PressureLoss_Steam.C1) annotation (Line( - points={{-84,130},{-48,130}}, - color={127,0,0}, - thickness=1)); - connect(WaterHeating.C1vap, PressureLoss_Steam.C2) annotation (Line( - points={{52,96},{52,130},{30,130}}, - color={127,0,0}, - thickness=1)); - connect(singularPressureLossPurge.C2, ControlValve_eau.C1) annotation (Line( - points={{54,-148},{54,-182},{88,-182}}, color={0,0,255})); - connect(Pression_Turbine1.y, sourceP.IPressure) annotation (Line(points={{ - -174,170},{-174,152},{-190,152},{-190,130},{-181.5,130}})); - connect(Pression_eauA2.y, sourceP1.IPressure) annotation (Line(points={{-174, - 2},{-174,-10},{-194,-10},{-194,-38},{-181.5,-38}})); - connect(Debit_eauA.y, refQ.IMassFlow) - annotation (Line(points={{-174,88},{-125,88},{-125,55}})); - connect(Level.y, ControlValve_eau.Ouv) - annotation (Line(points={{111.9,-141},{98,-141},{98,-165}})); - connect(Temperature_eauA1.y, sourceP1.ISpecificEnthalpyOrTemperature) - annotation (Line(points={{-175,-74},{-171,-74},{-171,-49}}, color={0,0,255})); - annotation (Diagram(coordinateSystem(extent={{-200,-200},{200,200}}), - graphics={ - Text( - extent={{-124,206},{130,146}}, - lineColor={0,0,255}, - textString= - "1 Ouv et 1 Cvmax = false, Qvap et niveau=true ou P cavite"), - Text( - extent={{-74,-190},{118,-222}}, - lineColor={0,0,255}, - textString= - "COP0l_coef_h =false , T_Dp_purge=true"), - Text( - extent={{-186,-198},{-84,-212}}, - lineColor={0,0,255}, - textString= - "Qvap=true ==> Erreur"), - Text( - extent={{16,170},{130,156}}, - lineColor={0,0,255}, - textString= - "checkValve Qmin =0.5"), - Text( - extent={{-136,168},{-18,154}}, - lineColor={0,0,255}, - textString="With guess values")}), - experiment(StopTime=1000, Tolerance=1e-004), - experimentSetupOutput, - Icon(graphics={ - Rectangle( - lineColor={128,128,128}, - extent={{-220,-240},{220,240}}, - radius=25.0), - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicWaterHeatingOnePipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo deleted file mode 100644 index 2ec43ae6..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestDynamicWaterSteamMultiFluidHeatExchanger.mo +++ /dev/null @@ -1,84 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestDynamicWaterSteamMultiFluidHeatExchanger - - BoundaryConditions.SourceQ sourceP(C(h_vol_2(start= - 71016.12237181065)), - Q0=10, - option_temperature=true) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(C(h_vol_1(start= - 71016.1223718086))) - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - HeatExchangers.DynamicWaterSteamMultiFluidsHeatExchanger dynamicMultiFluidHeatExchanger( - steady_state=true, - Cfg1(h_vol_2(start=71016.12237181155)), - Cfg2(h_vol_1(start=71016.12237181314)), - ExchangerMultiFluids( - P(start={300000.0,260001.59713260198,220002.3957916478,180002.39588440701, - 140001.5973181204,100000.0}), - Q(start={2702.7912398488343,2702.7912398488343,2702.7912398488343, - 2702.7912398488343,2702.7912398488343}), - h(start={71016.125,71016.125,71016.12237180988,71016.1223718091,71016.125, - 70825.8984375})), - TwoPhaseFlowPipe( - P(start={300000.0,260001.59801114563,220002.39710936273,180002.3972020214, - 140001.59819646296,100000.0}), - Q(start={3482.228448926616,3482.228448926616,3482.228448926616, - 3482.228448926616,3482.228448926616}), - h(start={71016.125,71016.125,71016.12237181216,71016.12237181274, - 71016.125,70825.8984375})), - ExchangerWall(Tp(start={290.03103270324897,290.0401814264445, - 290.0493302229999,290.05847909289605}), Tp1(start={ - 290.03103270331616,290.04018142654525,290.0493302231005, - 290.0584790929629})), - Ntubes=10, - Ns=4, - diffusion=true, - dynamic_mass_balance=true, - dynamic_energy_balance=false, - inertia=false) - annotation (Placement(transformation(extent={{-20,20},{0,40}}))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=5000000, - T0=1273.15) - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=90, - origin={-10,70}))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1 - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, - rotation=90, - origin={-10,-10}))); -equation - connect(sourceP.C, dynamicMultiFluidHeatExchanger.Cws1) - annotation (Line(points={{-40,30},{-20,30}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchanger.Cws2, sinkP.C) - annotation (Line(points={{0,30},{20,30}}, color={0,0,0})); - connect(sourceP1.C, dynamicMultiFluidHeatExchanger.Cfg1) - annotation (Line(points={{-10,60},{-10,35}}, color={0,0,0})); - connect(dynamicMultiFluidHeatExchanger.Cfg2, sinkP1.C) - annotation (Line(points={{-10,25},{-10,0}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestDynamicWaterSteamMultiFluidHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo deleted file mode 100644 index cb583f64..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFixedPowerHeatExchanger.mo +++ /dev/null @@ -1,53 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestFixedPowerHeatExchanger - - ThermoSysPro.Fluid.HeatExchangers.FixedPowerHeatExchanger - plateHeatExchanger(region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - DW=1.e6) annotation (Placement(transformation(extent={{-20,40},{0,60}}, - rotation=0))); - BoundaryConditions.SourcePQ sourceP2(T0=340, - option_temperature=true) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - BoundaryConditions.SourcePQ sourceP3(option_temperature= - true) - annotation (Placement(transformation(extent={{-60,40},{-40,60}}, rotation=0))); - BoundaryConditions.Sink puitsP2 - annotation (Placement(transformation( - extent={{20,20},{40,40}}, rotation=0))); - BoundaryConditions.Sink puitsP3 - annotation (Placement(transformation( - extent={{20,40},{40,60}}, rotation=0))); -equation - connect(sourceP3.C, plateHeatExchanger.Ef) - annotation (Line(points={{-40,50},{-20,50}}, color={0,0,0})); - connect(plateHeatExchanger.Sf, puitsP3.C) annotation (Line(points={{-0.2,50.1}, - {9.9,50.1},{9.9,50},{20,50}}, color={0,0,0})); - connect(plateHeatExchanger.Sc, puitsP2.C) annotation (Line(points={{-4.2,44}, - {-4,44},{-4,30},{20,30}}, color={0,0,0})); - connect(plateHeatExchanger.Ec, sourceP2.C) annotation (Line(points={{-15.8,44}, - {-16,44},{-16,30},{-40,30}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestFixedPowerHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo deleted file mode 100644 index 95d64b9f..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFossilFuelBoiler.mo +++ /dev/null @@ -1,82 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestFossilFuelBoiler - import ThermoSysPro; - ThermoSysPro.Fluid.Boilers.FossilFuelBoiler FossilFuelBoiler( - Wloss=0, - Ke=1.e6, - Tsf=386.16) - annotation (Placement(transformation(extent={{-45,-51},{45,51}}, rotation=0))); - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( - T0=338.16, - Cp=1282, - Xh=0.24403, - Xc=0.75323, - Q0=1.45) annotation (Placement(transformation(extent={{-36,-78},{0,-41}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( - Xco2=0, - Xh2o=0.01, - Q0=27., - Xo2=0.233, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - T0=298.16, - option_temperature=true) - annotation (Placement(transformation(extent={{-110,-50},{-71,-13}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP annotation (Placement(transformation( - extent={{68,-51},{110,-12}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( - Q0=24., - h0=600e3, - P0=14000000) - annotation (Placement(transformation(extent={{-107,14},{-71,48}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation( - extent={{74,13},{110,49}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(K=1e-3) - annotation (Placement(transformation(extent={{-64,25},{-56,37}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1(K=1e-3) - annotation (Placement(transformation(extent={{57,25},{65,37}}, rotation=0))); -equation - connect(sourceQ.C, FossilFuelBoiler.Cair) annotation (Line( - points={{-71,-31.5},{-63.5,-31.5},{-63.5,-31.62},{-45,-31.62}}, - color={0,0,0}, - thickness=1)); - connect(FossilFuelBoiler.Cfg, sinkP.C) annotation (Line( - points={{45,-31.62},{62,-31.62},{62,-31.5},{68,-31.5}}, - color={0,0,0}, - thickness=1)); - connect(fuelSourcePQ.C, FossilFuelBoiler.Cfuel) annotation (Line(points={ - {0,-59.5},{0,-40.8}}, color={0,0,0})); - connect(sourcePQ.C, singularPressureLoss.C1) - annotation (Line(points={{-71,31},{-64,31}}, color={0,0,255})); - connect(singularPressureLoss.C2, FossilFuelBoiler.Cws1) annotation (Line( - points={{-56,31},{-50,31},{-50,30.6},{-45,30.6}}, color={0,0,255})); - connect(singularPressureLoss1.C2, sink.C) - annotation (Line(points={{65,31},{74,31}}, color={0,0,255})); - connect(FossilFuelBoiler.Cws2, singularPressureLoss1.C1) annotation (Line( - points={{45,30.6},{51,30.6},{51,31},{57,31}}, color={0,0,255})); - annotation ( Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestFossilFuelBoiler; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo deleted file mode 100644 index 17a20108..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestFresnelField.mo +++ /dev/null @@ -1,172 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestFresnelField - parameter Integer Nt=3 "Number of trains"; -public - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall( - ntubes=1, - steady_state=true, - D=0.07, - e=0.004, - Ns=30, - T0=500, - lambda=20, - cpw=500, - rhow=8000, - Tp(start={628.0843201819387,627.9310075597404,627.8220175907211, - 627.7368992018166,627.6679716601412,627.6112649113921, - 627.5643995456558,627.5258238160011,627.4944728950805, - 627.4695948757801,627.4506537300122,627.4372716636091, - 627.4291939746797,627.426267226699,627.428426585461,627.4356896138493, - 627.4481553612113,627.4660085346942,627.4895290639054, - 627.5191082002851,627.5552734790091,627.5987264837852, - 627.6504001032708,627.7115474128314,627.7838847016081, - 627.8698331666657,627.9729350144038,629.4253815385038, - 633.135688507217,636.2622387488283}), - Tp1(start={610.2709965207655,610.0984334604643,609.9757644369477, - 609.8799665740102,609.8023932206363,609.7385750723525, - 609.6858335131916,609.6424216866362,609.6071408778737, - 609.5791446660139,609.5578296140685,609.5427704711935, - 609.533680491646,609.5303869740989,609.5328169418054,609.540990157294, - 609.5550181389947,609.5751088339957,609.6015773714007, - 609.6348642175905,609.6755632868924,609.7244644309128, - 609.7826179283193,609.8514345863706,609.9328467812495, - 610.0295806069864,610.1456244663702,611.7808730290952, - 615.9622431406954,619.4903247027197}), - Tp2(start={644.9596553467713,644.824579502235,644.7285482944553, - 644.6535470354397,644.592810046145,644.5428402353538, - 644.5015416419557,644.4675473586904,644.4399193877858, - 644.4179953736024,644.4013031238645,644.3895098327511, - 644.3823911261306,644.3798118348441,644.3817148399042,644.38811560583, - 644.3991013774125,644.4148348525065,644.4355626048274, - 644.4616292617266,644.4934994867675,644.531791236838, - 644.5773261834961,644.6312079828199,644.6949482231629, - 644.7706792525222,644.8615205623447,646.1407907783827, - 649.404839172216,652.1510013554424}), - L=1e4/11.46) - annotation (Placement(transformation(extent={{-40,-36},{40,-2}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP(Q0=11, h0=1500e3) - annotation (Placement(transformation(extent={{-101,-55},{-81,-35}}, - rotation=0))); - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe - dynamicTwoPhaseFlowPipe( - ntubes=1, - steady_state=true, - rugosrel=0.00005, - dpfCorr=1, - Ns=30, - P(start={12512365.778485337,12512269.4730028,12512159.010926897, - 12512028.619141866,12511878.28140543,12511707.984695798, - 12511517.718132183,12511307.472416837,12511077.239500606, - 12510827.012364838,12510556.784871727,12510266.551658653, - 12509956.30806284,12509626.050068311,12509275.774270097, - 12508905.477852736,12508515.15858121,12508104.814803492, - 12507674.445464557,12507224.050132478,12506753.629037917, - 12506263.183129327,12505752.714147368,12505222.224723859, - 12504671.718513375,12504101.200370008,12503510.676589508, - 12502896.415784404,12502231.48634808,12501522.52554151, - 12500776.553197166,12500000.0}), - h(start={1500000.0,1536254.1810191544,1572547.5410785251,1608868.7411348266, - 1645211.676359884,1681572.2077847784,1717947.2125321354, - 1754334.1766730088,1790730.9833788855,1827135.788296852, - 1863546.9394607474,1899962.9220483964,1936382.3178860326, - 1972803.7739566958,2009225.9764870608,2045647.6282789519, - 2082067.4276265746,2118484.0474634594,2154896.1134394333, - 2191302.179544121,2227700.6996020116,2264089.9923674623, - 2300468.196934767,2336833.213464297,2373182.6211112435, - 2409513.559261445,2445822.5467506223,2482105.1942732874, - 2518015.7979130256,2552967.680496474,2587102.355161259, - 82548.43470391157}), - D=0.07, - inertia=false, - L=1e4/11.46) annotation (Placement(transformation(extent={{-36, - -67},{36,-20}}, rotation=0))); - ThermoSysPro.Solar.Collectors.FresnelField champThermosolaireLFR_N( - Ns=30, - T(start=fill(500, 30)), - F12=0.6366, - A=1e4, - T0=303) - annotation (Placement(transformation(extent={{-40,-16},{40,72}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( - h0=2000e3, P0=125e5) annotation (Placement(transformation(extent={{80,-54}, - {100,-34}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe DNI( - Starttime=100, - Initialvalue=100, - Duration=3600, - Finalvalue=900) annotation (Placement(transformation(extent={{72,39},{58,53}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Angles( - Starttime=100, - Initialvalue=45, - Finalvalue=45, - Duration=3600) annotation (Placement(transformation(extent={{-26,77},{-12, - 90}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Q( - Starttime=100, - Duration=3600, - Initialvalue=2, - Finalvalue=3) annotation (Placement(transformation(extent={{7,-6.5},{-7, - 6.5}}, rotation=90, - origin={-90,-9.5}))); - Junctions.MassFlowMultiplier massFlowMultiplier1(alpha=1/Nt) - annotation (Placement(transformation(extent={{-70,-54},{-50,-34}}))); - Junctions.MassFlowMultiplier massFlowMultiplier2(alpha=Nt) - annotation (Placement(transformation(extent={{52,-54},{72,-34}}))); -equation - connect(champThermosolaireLFR_N.P, heatExchangerWall.WT2) - annotation (Line(points={{0,1.6},{0,-15.6}}, color={191,95,0})); - connect(heatExchangerWall.WT1, dynamicTwoPhaseFlowPipe.CTh) annotation (Line( - points={{0,-22.4},{0,-36.45}}, color={191,95,0})); - connect(champThermosolaireLFR_N.SunDNI, DNI.y) - annotation (Line(points={{44,45.6},{51,45.6},{51,46},{57.3,46}})); - connect(champThermosolaireLFR_N.SunA, Angles.y) - annotation (Line(points={{36.8,58.8},{36.8,84},{28,84},{28,83.5},{-11.3, - 83.5}})); - connect(sourceP.C, massFlowMultiplier1.Ce) annotation (Line(points={{-81,-45}, - {-76.5,-45},{-76.5,-44},{-70,-44}}, color={0,0,0})); - connect(massFlowMultiplier1.Cs, dynamicTwoPhaseFlowPipe.C1) annotation (Line( - points={{-50,-44},{-44,-44},{-44,-43.5},{-36,-43.5}}, color={0,0,0})); - connect(dynamicTwoPhaseFlowPipe.C2, massFlowMultiplier2.Ce) annotation (Line( - points={{36,-43.5},{47,-43.5},{47,-44},{52,-44}}, color={0,0,0})); - connect(massFlowMultiplier2.Cs, sinkP.C) - annotation (Line(points={{72,-44},{80,-44}}, color={0,0,0})); - connect(Q.y, sourceP.IMassFlow) annotation (Line(points={{-90,-17.2},{-91, - -17.2},{-91,-40}}, color={0,0,255})); - connect(Angles.y, champThermosolaireLFR_N.SunG) annotation (Line(points={{ - -11.3,83.5},{27.2,83.5},{27.2,58.8}}, color={0,0,255})); - annotation ( - Documentation(revisions=" -Author
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - experiment(StopTime=5000), - Diagram(graphics={Text( - extent={{-36,-64},{54,-82}}, - lineColor={28,108,200}, - textString="Fresnel field with Nt=%Nt trains")})); -end TestFresnelField; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo deleted file mode 100644 index c0db0246..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGTCombustionChamber.mo +++ /dev/null @@ -1,83 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestGTCombustionChamber - import ThermoSysPro; - - ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees2 - annotation (Placement(transformation( - origin={149,-2}, - extent={{23,-24},{-23,24}}, - rotation=180))); - ThermoSysPro.Fluid.Combustion.CombustionChambers.GTCombustionChamber GTCombustionChamber2(Cfg(P( - fixed=true, start=14.1e5)), kcham(fixed=false, start=1)) annotation ( - Placement(transformation(extent={{-67,-68},{67,64}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ2( - Q0=0, - P0=15e5, - h0=300e3) - annotation (Placement(transformation(extent={{-112,48},{-72,88}}, - rotation=0))); - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceCombustible2( - Hum=0, - Xo=0, - Xn=0, - Xs=0, - rho=0.838, - Xc=0.755, - Xh=0.245, - Cp=2255, - T0=410, - Q0=9.30, - LHV=47500e3) annotation (Placement(transformation(extent={{-107,-93},{-71,-57}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees2( - Xso2=0, - Xco2=0.0, - Xo2=0.23, - Xh2o=0.01, - P0=15e5, - Q0=415, - T0=680, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - option_temperature=true) - annotation (Placement(transformation(extent={{-174,-26},{-128,22}}, - rotation=0))); - -equation - connect(GTCombustionChamber2.Cws, sourcePQ2.C) - annotation (Line(points={{-40.2,57.4},{-40.2,68},{-72,68}})); - connect(GTCombustionChamber2.Cfuel, sourceCombustible2.C) annotation (Line( - points={{0,-61.4},{0,-75},{-71,-75}}, color={0,0,0})); - connect(GTCombustionChamber2.Cfg, Puits_Fumees2.C) annotation (Line( - points={{60.3,-2},{126,-2}}, - color={0,0,0}, - thickness=1)); - connect(Source_Fumees2.C, GTCombustionChamber2.Ca) annotation (Line( - points={{-128,-2},{-60.3,-2}}, - color={0,0,0}, - thickness=1)); - annotation (Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-200},{200,200}}, - initialScale=0.1)), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestGTCombustionChamber; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo deleted file mode 100644 index b5802c7d..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion.mo +++ /dev/null @@ -1,86 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestGenericCombustion - - ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion genericCombustionCCS( - kcham=0.1, - Acham=275, - Xbf=0, - ImbCV=0.05, - ImbBF=0.0, - Psf(start=113275)) annotation (Placement(transformation(extent={{-32,-56},{ - 92,72}}, - rotation=0))); - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( - Xn=0.0208, - Xashes=0.136, - Cp=1200, - rho=1100, - LHV=29245e3, - Xc=0.719, - Xh=0.0414, - Xo=0.086, - Xs=0.0044, - Vol=0.286, - Q0=57.20, - T0=358.15, - Hum=0.08) annotation (Placement(transformation(extent={{24,-95},{58,-57}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(Q0=0, P0=100000) - annotation (Placement(transformation(extent={{-83,-3},{-47,31}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( - Xso2=0, - Q0=609.29, - Xh2o=0.01, - Xo2=0.230, - Xco2=0, - P0=191000, - T0=524.89, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - option_temperature=true) - annotation (Placement(transformation(extent={{-54,-94},{-10,-54}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation( - extent={{30,70},{74,112}},rotation=0))); -equation - connect(fuelSourcePQ.C, genericCombustionCCS.Cfuel) annotation (Line(points={{58,-76}, - {73.4,-76},{73.4,-49.6}}, color={0,0,0})); - connect(SourcePQ_Water.C, genericCombustionCCS.Cws) annotation (Line(points={{-47,14}, - {-36,14},{-36,14.4},{-25.8,14.4}}, color={0,0,0})); - connect(genericCombustionCCS.Ca, sourceAir.C) annotation (Line( - points={{11.4,-49.6},{11.4,-74},{-10,-74}}, - color={0,0,0}, - thickness=1)); - connect(genericCombustionCCS.Cfg, sink.C) annotation (Line( - points={{11.4,65.6},{11.4,91},{30,91}}, - color={0,0,0}, - thickness=1)); - annotation ( Documentation(revisions=" -Author
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})})); -end TestGenericCombustion; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo deleted file mode 100644 index 3407226d..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGenericCombustion1D.mo +++ /dev/null @@ -1,144 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestGenericCombustion1D - - parameter Integer NCEL = 7; - - ThermoSysPro.Fluid.Combustion.CombustionChambers.GenericCombustion1D genericCombustionCCS( - NCEL=7, - Qm(fixed=false), - Qsf(fixed=false), - kcham(fixed=true) = 0.1, - Acham=275, - Xbf=0, - ImbCV=0.05, - EPSPAR=0.7, - Kec=8.8, - SM={639.92,198.58,466.48,466.48,466.48,358.56,358.56}, - ImbBF=0.0, - Psf(start=113275)) annotation (Placement(transformation(extent={{-62,-56},{62, - 72}}, rotation=0))); - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( - Xn=0.0208, - Xashes=0.136, - Cp=1200, - rho=1100, - LHV=29245e3, - Xc=0.719, - Xh=0.0414, - Xo=0.086, - Xs=0.0044, - Vol=0.286, - Q0=57.20, - T0=358.15, - Hum=0.08) annotation (Placement(transformation(extent={{-106,-43},{-72,-5}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( - Xso2=0, - Q0=609.29, - Xh2o=0.01, - Xo2=0.230, - Xco2=0, - P0=191000, - T0=524.89, - option_temperature=true, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-44,-98},{0,-58}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation( - extent={{0,70},{44,112}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(Q0=0, P0=100000) - annotation (Placement(transformation(extent={{-107,23},{-71,57}}, rotation= - 0))); - ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe PipeWaterSteam( - Ns=7, - z2=56, - rugosrel=5e-5, - ntubes=403, - L=58, - D=0.0327, - C2(Q(fixed=false, start=486.69), P( - fixed=false, - start=1.96318e+07, - displayUnit="Pa")), - dpfCorr=3.5) - annotation (Placement(transformation( - origin={91,8}, - extent={{49,16},{-49,-16}}, - rotation=270))); - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall paroiEcrans( - Ns=7, - lambda=40, - steady_state=true, - ntubes=403, - L=58, - D=0.0327, - e=0.001) - annotation (Placement(transformation( - origin={73,7.5}, - extent={{51.5,-15},{-51.5,15}}, - rotation=270))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam2( - option_temperature=false, - Q(start=486.69, fixed=true), - h0=2.5e+06, - P0(fixed=false) = 19621600) - annotation (Placement(transformation( - origin={90,90.5}, - extent={{14.5,-15},{-14.5,15}}, - rotation=270))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceEcrans( - h0=1.292e+06, - option_temperature=false, - P0=20112000) - annotation (Placement(transformation( - origin={91,-81}, - extent={{15,-15},{-15,15}}, - rotation=270))); -equation - connect(fuelSourcePQ.C, genericCombustionCCS.Cfuel) - annotation (Line(points={{-72,-24},{-55.8,-24}}, color={0,0,0})); - connect(genericCombustionCCS.Cfg, sink.C) annotation (Line( - points={{0,65.6},{0,91},{0,91}}, - color={0,0,0}, - thickness=1)); - connect(genericCombustionCCS.Ca, sourceAir.C) annotation (Line( - points={{0,-49.6},{0,-78}}, - color={0,0,0}, - thickness=1)); - connect(SourcePQ_Water.C, genericCombustionCCS.Cws) - annotation (Line(points={{-71,40},{-55.8,40}}, color={0,0,255})); - connect(genericCombustionCCS.Cth,paroiEcrans. WT2) annotation (Line(points={{55.8,8}, - {68,8},{68,7.5},{76,7.5}}, color={191,95,0})); - connect(paroiEcrans.WT1,PipeWaterSteam. CTh) annotation (Line(points={{70,7.5}, - {71,7.5},{71,8},{86.2,8}}, color={191,95,0})); - connect(sourceEcrans.C,PipeWaterSteam. C1) - annotation (Line(points={{91,-66},{91,-41}}, color={0,0,255})); - connect(PipeWaterSteam.C2,sinkWaterSteam2. C) annotation (Line(points={{91,57}, - {91,76},{90,76}}, color={0,0,255})); - annotation ( Documentation(revisions=" -Author
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})})); -end TestGenericCombustion1D; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo deleted file mode 100644 index 082d7f17..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestGridFurnace.mo +++ /dev/null @@ -1,90 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestGridFurnace - import ThermoSysPro; - - parameter Integer NCEL = 7; - - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( - Xn=0.0208, - Xashes=0.136, - Cp=1200, - rho=1100, - LHV=29245e3, - Xc=0.719, - Xh=0.0414, - Xo=0.086, - Xs=0.0044, - Vol=0.286, - Q0=57.20, - T0=358.15, - Hum=0.08) annotation (Placement(transformation(extent={{-106,-23},{-72,15}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( - Xso2=0, - Xh2o=0.01, - Xo2=0.230, - Xco2=0, - T0=300, - Q0=10, - P0=1.9e5, - option_temperature=true, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-74,-80},{-30,-40}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink(option_temperature=true) - annotation (Placement(transformation( - extent={{28,50},{72,92}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water(P0=1.e5, Q0=1) - annotation (Placement(transformation(extent={{89,13},{53,47}}, rotation= - 0))); - ThermoSysPro.Fluid.Combustion.CombustionChambers.GridFurnace gridFurnace - annotation (Placement(transformation(extent={{-40,-40},{40,40}}))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceAir1( - Xso2=0, - Xh2o=0.01, - Xo2=0.230, - Xco2=0, - option_temperature=true, - T0=300, - Q0=10, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-90,4},{-46,44}}, rotation=0))); -equation - connect(fuelSourcePQ.C, gridFurnace.Com) - annotation (Line(points={{-72,-4},{-36,-4}}, color={0,0,0})); - connect(gridFurnace.Cfg, sink.C) - annotation (Line(points={{0,36},{0,71},{28,71}}, color={0,0,0})); - connect(SourcePQ_Water.C, gridFurnace.port_eau_refroid) - annotation (Line(points={{53,30},{32,30},{32,12}}, color={0,0,0})); - connect(sourceAir1.C, gridFurnace.Ca2) - annotation (Line(points={{-46,24},{-20,24}}, color={0,0,0})); - connect(sourceAir.C, gridFurnace.Ca1) - annotation (Line(points={{-30,-60},{0,-60},{0,-36}}, color={0,0,0})); - annotation ( Documentation(revisions=" -Author
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})})); -end TestGridFurnace; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo deleted file mode 100644 index 1ecc9dbf..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealCheckValve.mo +++ /dev/null @@ -1,111 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestIdealCheckValve - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1 - annotation (Placement(transformation( - extent={{-60,-80},{-40,-60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1( - P0=6e5) annotation (Placement(transformation( - extent={{80,-80},{100,-60}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Pulse pulse( - amplitude=6e5, - width=50, - period=100, - offset=3e5) annotation (Placement(transformation(extent={{-100,-80},{-80, - -60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve3 - annotation (Placement(transformation(extent={{10,-80},{30,-60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP2 - annotation (Placement(transformation( - extent={{-30,-80},{-10,-60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP3 - annotation (Placement(transformation( - extent={{50,-80},{70,-60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent= - {{-104,20},{-84,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP( - P0=6e5) annotation (Placement(transformation( - extent={{84,20},{104,40}}, rotation=0))); - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump1 - annotation (Placement(transformation(extent={{-30,60},{-10,80}}, rotation=0))); - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump2 - annotation (Placement(transformation(extent={{-30,-20},{-10,0}}, rotation=0))); - ThermoSysPro.Fluid.Volumes.VolumeD volumeD annotation (Placement( - transformation(extent={{-50,20},{-30,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve1 - annotation (Placement(transformation(extent={{10,60},{30,80}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.IdealCheckValve idealCheckValve2 - annotation (Placement(transformation(extent={{8,-20},{28,0}}, rotation=0))); - ThermoSysPro.Fluid.Volumes.VolumeC volumeC annotation (Placement( - transformation(extent={{30,20},{50,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP - annotation (Placement(transformation( - extent={{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1 - annotation (Placement(transformation( - extent={{60,20},{80,40}}, rotation=0))); -equation - connect(sourceP1.C, perteDP2.C1) - annotation (Line(points={{-40,-70},{-30,-70}}, color={0,0,255})); - connect(perteDP2.C2, idealCheckValve3.C1) - annotation (Line(points={{-10,-70},{10,-70}}, color={0,0,255})); - connect(idealCheckValve3.C2, perteDP3.C1) - annotation (Line(points={{30,-70},{50,-70}}, color={0,0,255})); - connect(perteDP3.C2, puitsP1.C) - annotation (Line(points={{70,-70},{80,-70}}, color={0,0,255})); - connect(pulse.y, sourceP1.IPressure) annotation (Line(points={{-79,-70},{-55, - -70}})); - connect(staticCentrifugalPump1.C2,idealCheckValve1. C1) annotation (Line( - points={{-10,70},{-2,70},{-2,70},{10,70}}, color={0,0,255})); - connect(staticCentrifugalPump2.C2,idealCheckValve2. C1) annotation (Line( - points={{-10,-10},{0,-10},{0,-10},{8,-10}}, color={0,0,255})); - connect(perteDP1.C2,puitsP. C) - annotation (Line(points={{80,30},{84,30}}, color={0,0,255})); - connect(sourceP.C,perteDP. C1) - annotation (Line(points={{-84,30},{-80,30}}, color={0,0,255})); - connect(perteDP.C2, volumeD.Ce) - annotation (Line(points={{-60,30},{-50,30}}, color={0,0,0})); - connect(volumeD.Cs1, staticCentrifugalPump1.C1) - annotation (Line(points={{-40,40},{-40,70},{-30,70}}, color={0,0,0})); - connect(volumeD.Cs2, staticCentrifugalPump2.C1) - annotation (Line(points={{-40,20},{-40,-10},{-30,-10}}, color={0,0,0})); - connect(idealCheckValve1.C2, volumeC.Ce2) - annotation (Line(points={{30,70},{40,70},{40,40}}, color={0,0,0})); - connect(volumeC.Cs, perteDP1.C1) - annotation (Line(points={{50,30},{60,30}}, color={0,0,0})); - connect(idealCheckValve2.C2, volumeC.Ce3) - annotation (Line(points={{28,-10},{40,-10},{40,20}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2})), - Window( - x=0.28, - y=0.03, - width=0.5, - height=0.6), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestIdealCheckValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo deleted file mode 100644 index a751ce0e..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestIdealSwitchValve.mo +++ /dev/null @@ -1,65 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestIdealSwitchValve - - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.IdealSwitchValve SwitchValve - annotation (Placement(transformation( - extent={{-20,26},{0,46}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Pulse pulse( - width=10, period=20) - annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP2 - annotation (Placement(transformation( - extent={{-60,20},{-40,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1 - annotation (Placement(transformation( - extent={{20,20},{40,40}}, rotation=0))); -equation - connect(pulse.yL, SwitchValve.Ouv) annotation (Line(points={{-39,70},{-10,70}, - {-10,43}})); - connect(SourceP1.C, perteDP2.C1) annotation (Line(points={{-80,30},{-60,30}}, - color={0,0,255})); - connect(perteDP2.C2, SwitchValve.C1) annotation (Line(points={{-40,30},{-30, - 30},{-30,30},{-20,30}}, color={0,0,255})); - connect(SwitchValve.C2, perteDP1.C1) annotation (Line(points={{0,30},{20,30}}, - color={0,0,255})); - connect(perteDP1.C2, PuitsP1.C) annotation (Line(points={{40,30},{60,30}}, - color={0,0,255})); - annotation (experiment(StopTime=100), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestIdealSwitchValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo deleted file mode 100644 index cb736e23..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInternalCombustionEngine.mo +++ /dev/null @@ -1,113 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestInternalCombustionEngine - import ThermoSysPro; - - parameter Integer NCEL = 7; - - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ fuelSourcePQ( - Hum=0, - Xh=0.25, - Xs=0, - Xashes=0, - Xc=0.75, - Xo=0, - Xn=0, - Q0=0.0676, - rho=0.744, - LHV=50e6, - T0(displayUnit="K") = 299, - P0=210300, - Vol=100) annotation (Placement(transformation(extent={{-106,-81},{-72,-43}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceAir( - Xso2=0, - Xco2=0, - Xh2o=0.005, - Xo2=0.23, - Q0=1.9627, - T0=30 + 273.16, - option_temperature=true, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=191000) - annotation (Placement(transformation(extent={{111,-79},{73,-45}},rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink(option_temperature=true) - annotation (Placement(transformation( - extent={{0,44},{44,86}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ SourcePQ_Water( - Q0=15.3, - h0=334.41e3, - P0=410000) - annotation (Placement(transformation(extent={{-107,-19},{-71,15}},rotation= - 0))); - ThermoSysPro.Fluid.Machines.InternalCombustionEngine alternatingEngine( - mechanical_efficiency_type=2, - Rmeca_nom=0.41, - Coef_Rm_a=-5.4727e-9, - Coef_Rm_b=4.9359e-5, - Coef_Rm_c=0.30814, - Xpth=0.05, - MMg=20, - DPe=1, - RV=6.45, - Kc=1.28, - Kd=1.33, - Wmeca(start=1400e3), - Welec(start=1358e3), - Wcomb(start=3.4942e6), - exc(start=1.8), - Gamma=1.2085, - Tsf(start=1088.15)) - annotation (Placement(transformation(extent={{-44,-46},{44,42}}))); - ThermoSysPro.Fluid.BoundaryConditions.Sink Sink_Water1 annotation (Placement( - transformation(extent={{75,-19},{111,15}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss - annotation (Placement(transformation(extent={{-63,-8},{-51,4}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1 - annotation (Placement(transformation(extent={{51,-9},{65,5}}))); -equation - connect(alternatingEngine.Cair, sourceAir.C) annotation (Line( - points={{0,-41.6},{0,-62},{73,-62}}, - color={0,0,0}, - thickness=1)); - connect(alternatingEngine.Cfuel, fuelSourcePQ.C) annotation (Line(points={{-30.8, - -41.6},{-30.8,-62},{-72,-62}}, color={0,0,0})); - connect(SourcePQ_Water.C, singularPressureLoss.C1) - annotation (Line(points={{-71,-2},{-63,-2}}, - color={0,0,255})); - connect(alternatingEngine.Cws1, singularPressureLoss.C2) annotation (Line( - points={{-39.6,-2},{-51,-2}}, color={0,0,255})); - connect(alternatingEngine.Cws2, singularPressureLoss1.C1) - annotation (Line(points={{39.6,-2},{48,-2},{51,-2}}, color={0,0,255})); - connect(Sink_Water1.C, singularPressureLoss1.C2) - annotation (Line(points={{75,-2},{75,-2},{65,-2}}, color={0,0,255})); - connect(alternatingEngine.Cfg, sink.C) annotation (Line( - points={{0,37.6},{0,65},{0,65}}, - color={0,0,0}, - thickness=1)); - annotation ( Documentation(revisions=" -Author
-Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})})); -end TestInternalCombustionEngine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo deleted file mode 100644 index f889cea8..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestInvSingularPressureLoss.mo +++ /dev/null @@ -1,38 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestInvSingularPressureLoss - - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ - annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkQ - annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.InvSingularPressureLoss - invSingularPressureLoss annotation (Placement(transformation(extent={{-20,0}, - {0,20}}, rotation=0))); -equation - connect(sourcePQ.C, invSingularPressureLoss.C1) annotation (Line(points={{-60, - 10},{-20,10}}, color={0,0,255})); - connect(invSingularPressureLoss.C2, sinkQ.C) annotation (Line(points={{0,10}, - {40,10}}, color={0,0,255})); -annotation(experiment(StopTime=1000), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestInvSingularPressureLoss; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo deleted file mode 100644 index 987f9475..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions1.mo +++ /dev/null @@ -1,115 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestJunctions1 - - ThermoSysPro.Fluid.Junctions.Splitter2 splitter2 - annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP(Q0=200) - annotation (Placement(transformation(extent={{-100,40},{-80,60}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss annotation (Placement(transformation(extent={{-60,40}, - {-40,60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP - annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1 - annotation (Placement(transformation(extent={{80,0},{100,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{40,80}, - {60,100}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2 annotation (Placement(transformation(extent={{40,0},{ - 60,20}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k= - 0.5) annotation (Placement(transformation(extent={{-40,60},{-20,80}}, - rotation=0))); - ThermoSysPro.Fluid.Junctions.Splitter3 splitter3 - annotation (Placement(transformation(extent={{-20,-60},{0,-40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceP1(Q0=400) - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3 annotation (Placement(transformation(extent={{-60,-60}, - {-40,-40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2 - annotation (Placement(transformation(extent={{80,-20},{100,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP3 - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss4 annotation (Placement(transformation(extent={{40,-20}, - {60,0}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss5 annotation (Placement(transformation(extent={{40,-100}, - {60,-80}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k= - 0) annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP4 - annotation (Placement(transformation(extent={{80,-60},{100,-40}}, rotation= - 0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante2(k= - 0) annotation (Placement(transformation(extent={{-40,-80},{-20,-60}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss6 annotation (Placement(transformation(extent={{40,-60}, - {60,-40}}, - rotation=0))); -equation - connect(sourceP.C, singularPressureLoss.C1) - annotation (Line(points={{-80,50},{-60,50}}, color={0,0,255})); - connect(singularPressureLoss.C2, splitter2.Ce) - annotation (Line(points={{-40,50},{-20,50}}, color={0,0,255})); - connect(splitter2.Cs1, singularPressureLoss1.C1) annotation (Line(points={{-6, - 60},{-6,90},{40,90}}, color={0,0,255})); - connect(singularPressureLoss1.C2, sinkP.C) - annotation (Line(points={{60,90},{80,90}}, color={0,0,255})); - connect(splitter2.Cs2, singularPressureLoss2.C1) annotation (Line(points={{-6, - 40},{-6,10},{40,10}}, color={0,0,255})); - connect(singularPressureLoss2.C2, sinkP1.C) - annotation (Line(points={{60,10},{80,10}}, color={0,0,255})); - connect(constante.y, splitter2.Ialpha1) - annotation (Line(points={{-19,70},{-14,70},{-14,56},{-9,56}})); - connect(sourceP1.C, singularPressureLoss3.C1) - annotation (Line(points={{-80,-50},{-60,-50}}, color={0,0,255})); - connect(singularPressureLoss3.C2, splitter3.Ce) annotation (Line(points={{-40, - -50},{-19.8,-50}}, color={0,0,255})); - connect(splitter3.Cs1, singularPressureLoss4.C1) annotation (Line(points={{-6, - -40},{-6,-10},{40,-10}}, color={0,0,255})); - connect(singularPressureLoss4.C2, sinkP2.C) - annotation (Line(points={{60,-10},{80,-10}}, color={0,0,255})); - connect(splitter3.Cs2, singularPressureLoss5.C1) annotation (Line(points={{-6, - -60},{-6,-90},{40,-90}}, color={0,0,255})); - connect(singularPressureLoss5.C2, sinkP3.C) - annotation (Line(points={{60,-90},{80,-90}}, color={0,0,255})); - connect(constante1.y, splitter3.Ialpha1) - annotation (Line(points={{-19,-30},{-14,-30},{-14,-44},{-9,-44}})); - connect(splitter3.Ialpha2, constante2.y) - annotation (Line(points={{-9,-56},{-14,-56},{-14,-70},{-19,-70}})); - connect(splitter3.Cs3, singularPressureLoss6.C1) - annotation (Line(points={{0,-50},{40,-50}}, color={0,0,0})); - connect(singularPressureLoss6.C2, sinkP4.C) - annotation (Line(points={{60,-50},{80,-50}}, color={0,0,0})); - annotation (experiment(StopTime=10), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestJunctions1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo deleted file mode 100644 index c7162a60..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions2.mo +++ /dev/null @@ -1,131 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestJunctions2 - - ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1 - annotation (Placement(transformation(extent={{0,60},{20,80}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss annotation (Placement(transformation(extent={{40,60},{ - 60,80}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{-40,80}, - {-20,100}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2 annotation (Placement(transformation(extent={{-40,40}, - {-20,60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Source sourceP - annotation (Placement(transformation(extent={{-80,80},{-60,100}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1 - annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP - annotation (Placement(transformation(extent={{80,60},{100,80}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante(k=0) - annotation (Placement(transformation(extent={{-40,60},{-20,80}}, - rotation=0))); - ThermoSysPro.Fluid.Junctions.Mixer3 mixer2_2 - annotation (Placement(transformation(extent={{0,-60},{20,-40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3 annotation (Placement(transformation(extent={{40,-60}, - {60,-40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss4 annotation (Placement(transformation(extent={{-40,-40}, - {-20,-20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss5 annotation (Placement(transformation(extent={{-40,-80}, - {-20,-60}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Source sourceP2 - annotation (Placement(transformation(extent={{-80,-40},{-60,-20}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3 - annotation (Placement(transformation(extent={{-80,-80},{-60,-60}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1 - annotation (Placement(transformation(extent={{80,-60},{100,-40}}, rotation= - 0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante1(k= - 0.5) annotation (Placement(transformation(extent={{-40,-20},{-20,0}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ - annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss6 annotation (Placement(transformation(extent={{-40,-60}, - {-20,-40}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier(alpha= - 2) annotation (Placement(transformation(extent={{0,20},{20,40}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ1 - annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss7 annotation (Placement(transformation(extent={{-40,20}, - {-20,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss8 annotation (Placement(transformation(extent={{40,20}, - {60,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP2 - annotation (Placement(transformation(extent={{80,20},{100,40}}, rotation=0))); -equation - connect(singularPressureLoss1.C2, mixer2_1.Ce1) annotation (Line(points={{-20, - 90},{6,90},{6,80}}, color={0,0,255})); - connect(singularPressureLoss2.C2, mixer2_1.Ce2) annotation (Line(points={{-20, - 50},{6,50},{6,60}}, color={0,0,255})); - connect(mixer2_1.Cs, singularPressureLoss.C1) - annotation (Line(points={{20,70},{40,70}}, color={0,0,255})); - connect(sourceP.C, singularPressureLoss1.C1) - annotation (Line(points={{-60,90},{-40,90}}, color={0,0,255})); - connect(sourceP1.C, singularPressureLoss2.C1) - annotation (Line(points={{-60,50},{-40,50}}, color={0,0,255})); - connect(singularPressureLoss.C2, sinkP.C) - annotation (Line(points={{60,70},{80,70}}, color={0,0,255})); - connect(constante.y, mixer2_1.Ialpha1) - annotation (Line(points={{-19,70},{-8,70},{-8,76},{3,76}})); - connect(singularPressureLoss4.C2, mixer2_2.Ce1) annotation (Line(points={{-20, - -30},{6,-30},{6,-40}}, color={0,0,255})); - connect(singularPressureLoss5.C2, mixer2_2.Ce2) annotation (Line(points={{-20, - -70},{6,-70},{6,-60}}, color={0,0,255})); - connect(mixer2_2.Cs, singularPressureLoss3.C1) - annotation (Line(points={{20,-50},{40,-50}}, color={0,0,255})); - connect(sourceP2.C, singularPressureLoss4.C1) - annotation (Line(points={{-60,-30},{-40,-30}}, color={0,0,255})); - connect(sourceP3.C, singularPressureLoss5.C1) - annotation (Line(points={{-60,-70},{-40,-70}}, color={0,0,255})); - connect(singularPressureLoss3.C2, sinkP1.C) - annotation (Line(points={{60,-50},{80,-50}}, color={0,0,255})); - connect(sourceQ.C, singularPressureLoss6.C1) - annotation (Line(points={{-60,-50},{-40,-50}}, color={0,0,255})); - connect(singularPressureLoss6.C2, mixer2_2.Ce3) annotation (Line(points={{-20,-50}, - {-10,-50},{0,-50}}, color={0,0,255})); - connect(constante1.y, mixer2_2.Ialpha1) - annotation (Line(points={{-19,-10},{-8,-10},{-8,-44},{3,-44}})); - connect(sourceQ1.C, singularPressureLoss7.C1) - annotation (Line(points={{-60,30},{-40,30}}, color={0,0,255})); - connect(singularPressureLoss7.C2, massFlowMultiplier.Ce) - annotation (Line(points={{-20,30},{0,30}}, color={0,0,255})); - connect(massFlowMultiplier.Cs, singularPressureLoss8.C1) - annotation (Line(points={{20,30},{40,30}}, color={0,0,255})); - connect(singularPressureLoss8.C2, sinkP2.C) - annotation (Line(points={{60,30},{80,30}}, color={0,0,255})); - annotation (experiment(StopTime=10), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestJunctions2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo deleted file mode 100644 index 7bb8c86c..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions3.mo +++ /dev/null @@ -1,121 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestJunctions3 - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation( - extent={{-104,0},{-84,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( P0=2e5, Q(start= - 323.48244470861454)) - annotation (Placement(transformation(extent={{-104,-60},{-84,-40}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve valve1( - C2(h_vol_1(start=70977.89042837733)), - Pm(start=120690.8728732298), - C1( - h_vol_1(start=71016.12237181116), - Xco2(start=4.2755644765396636E-32), - Xso2(start=2.0610804919205873E-32), - h_vol_2(start=70977.89042837733), - Xh2o(start=1.4925957069001078E-32), - Xo2(start=1.8180778675015506E-31))) - annotation (Placement(transformation(extent={{-10,6},{10,26}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve valve2(C1(h_vol_1(start= - 70921.01678153824), - Xco2(start=7.395570986446986E-32), - Xh2o(start=1.9721522630525295E-31), - Xo2(start=1.9721522630525295E-31), - Xso2(start=6.998299036616324E-32)), - Pm(start=118970.64778985853)) - annotation (Placement(transformation(extent={{-10,-54},{10,-34}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve valve3(Q(start= - 804.6933031325926), Pm(start=108776.21727782265), - C1( - Xco2(start=3.4137108264263755E-31), - Xo2(start=1.9413373839423337E-31), - Xso2(start=1.7792131856876708E-31), - Xh2o(start=2.3303752327085554E-31))) - annotation (Placement(transformation(extent={{50,-24},{70,-4}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2 - annotation (Placement(transformation( - extent={{82,-30},{102,-10}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe2( - Duration=1, - Initialvalue=1, - Finalvalue=0.05) - annotation (Placement(transformation(extent={{32,20},{52,40}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe3( - Initialvalue=1, - Starttime=2, - Finalvalue=0.001) - annotation (Placement(transformation(extent={{-30,30},{-10,50}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe4( - Initialvalue=1, - Starttime=1, - Finalvalue=0.001) - annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe pipe1 - annotation (Placement(transformation(extent={{-80,0},{-60,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe pipe2 - annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}, rotation= - 0))); - ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume - annotation (Placement(transformation(extent={{-40,0},{-20,20}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume1 - annotation (Placement(transformation(extent={{20,-30},{40,-10}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.Mixer8 staticVolume2 - annotation (Placement(transformation(extent={{-40,-60},{-20,-40}}, rotation= - 0))); -equation - connect(valve3.C2, puitsP2.C) annotation (Line(points={{70,-20},{82, - -20}}, color={0,0,255})); - connect(rampe2.y, valve3.Ouv) - annotation (Line(points={{53,30},{60,30},{60,-3}})); - connect(rampe3.y, valve1.Ouv) annotation (Line(points={{-9,40},{0,40}, - {0,27}})); - connect(rampe4.y, valve2.Ouv) annotation (Line(points={{-9,-20},{0, - -20},{0,-33}})); - connect(sourceP.C, pipe1.C1) - annotation (Line(points={{-84,10},{-80,10}}, color={0,0,255})); - connect(sourceP1.C, pipe2.C1) - annotation (Line(points={{-84,-50},{-80,-50}}, color={0,0,255})); - connect(pipe1.C2, staticVolume.Ce4) annotation (Line(points={{-60,10},{-50,10}, - {-50,14},{-40.2,14}}, color={0,0,255})); - connect(staticVolume.Cs, valve1.C1) annotation (Line(points={{-20,10},{-10,10}}, - color={0,0,255})); - connect(staticVolume1.Cs, valve3.C1) annotation (Line(points={{40,-20},{50, - -20}}, color={0,0,255})); - connect(valve1.C2, staticVolume1.Ce1) annotation (Line(points={{10,10},{33,10}, - {33,-9.8}}, color={0,0,255})); - connect(valve2.C2, staticVolume1.Ce8) annotation (Line(points={{10,-50},{33, - -50},{33,-29.9}}, color={0,0,255})); - connect(pipe2.C2, staticVolume2.Ce4) annotation (Line(points={{-60,-50},{-50, - -50},{-50,-46},{-40.2,-46}}, color={0,0,255})); - connect(staticVolume2.Cs, valve2.C1) annotation (Line(points={{-20,-50},{-10, - -50}}, color={0,0,255})); - annotation (experiment(StopTime=10), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestJunctions3; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo deleted file mode 100644 index 510707f9..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestJunctions4.mo +++ /dev/null @@ -1,59 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestJunctions4 - - ThermoSysPro.Fluid.Junctions.DeheaterMixer2 deheaterMixer2_1(Tmax=308) - annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss annotation (Placement(transformation(extent={{-60,20}, - {-40,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{20,20}, - {40,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2 annotation (Placement(transformation(extent={{-60,-20}, - {-40,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP - annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP(T0=310) - annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.Source source(h0=30000) - annotation (Placement(transformation(extent={{-100,-20},{-80,0}}, rotation= - 0))); -equation - connect(singularPressureLoss.C2, deheaterMixer2_1.Ce) annotation (Line(points= - {{-40,30},{-30,30},{-30,36},{-20,36}}, color={0,0,255})); - connect(deheaterMixer2_1.Cs, singularPressureLoss1.C1) annotation (Line( - points={{0,36},{10,36},{10,30},{20,30}}, color={0,0,255})); - connect(singularPressureLoss2.C2, deheaterMixer2_1.Ce_mix) annotation (Line( - points={{-40,-10},{-9.9,-10},{-9.9,20}}, color={0,0,255})); - connect(singularPressureLoss1.C2, sinkP.C) - annotation (Line(points={{40,30},{60,30}}, color={0,0,255})); - connect(sourceP.C, singularPressureLoss.C1) - annotation (Line(points={{-80,30},{-60,30}}, color={0,0,255})); - connect(source.C, singularPressureLoss2.C1) - annotation (Line(points={{-80,-10},{-60,-10}}, color={0,0,255})); - annotation (experiment(StopTime=10), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestJunctions4; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo deleted file mode 100644 index 813d3b01..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestLoopBreaker.mo +++ /dev/null @@ -1,73 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestLoopBreaker - - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ - annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1 - annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2 - annotation (Placement(transformation(extent={{-20,-20},{0,0}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.Splitter2 splitter2_1 annotation (Placement( - transformation(extent={{-56,0},{-36,20}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.Mixer2 mixer2_1 annotation (Placement(transformation( - extent={{40,0},{60,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink annotation (Placement(transformation( - extent={{80,0},{100,20}}, rotation=0))); - InstrumentationAndControl.Blocks.Sources.Constante constante(k=0.5) - annotation (Placement(transformation(extent={{-80,40},{-60,60}}, rotation=0))); - ThermoSysPro.Fluid.LoopBreakers.LoopBreakerP loopBreakerP - annotation (Placement(transformation(extent={{10,-20},{30,0}}, rotation=0))); -equation - connect(sourcePQ.C, splitter2_1.Ce) annotation (Line( - points={{-80,10},{-56,10}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(splitter2_1.Cs1, singularPressureLoss1.C1) annotation (Line( - points={{-42,20},{-42,30},{-20,30}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(splitter2_1.Cs2, singularPressureLoss2.C1) annotation (Line( - points={{-42,0},{-42,-10},{-20,-10}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(mixer2_1.Ce1, singularPressureLoss1.C2) - annotation (Line(points={{46,20},{46,30},{0,30}}, smooth=Smooth.None)); - connect(mixer2_1.Cs, sink.C) annotation (Line( - points={{60,10},{80,10}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(constante.y, splitter2_1.Ialpha1) - annotation (Line(points={{-59,50},{-52,50},{-52,16},{-45,16}}, smooth= - Smooth.None)); - connect(singularPressureLoss2.C2, loopBreakerP.C1) annotation (Line( - points={{0,-10},{10,-10}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(loopBreakerP.C2, mixer2_1.Ce2) annotation (Line( - points={{30,-10},{46,-10},{46,0}}, - color={0,0,255}, - smooth=Smooth.None)); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestLoopBreaker; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo deleted file mode 100644 index 8a7fd8ea..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestMassFlowMultiplier.mo +++ /dev/null @@ -1,47 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestMassFlowMultiplier - - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ - annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink - annotation (Placement(transformation(extent={{60,0},{80,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss annotation (Placement(transformation(extent={{-60,0},{ - -40,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{20,0},{ - 40,20}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.MassFlowMultiplier massFlowMultiplier - annotation (Placement(transformation(extent={{-20,0},{0,20}}, rotation=0))); -equation - connect(sourcePQ.C, singularPressureLoss.C1) annotation (Line(points={{-80,10}, - {-60,10}}, color={0,0,255})); - connect(singularPressureLoss1.C2, sink.C) annotation (Line(points={{40,10},{ - 60,10}}, color={0,0,255})); - connect(singularPressureLoss.C2, massFlowMultiplier.Ce) annotation (Line( - points={{-40,10},{-20,10}}, color={0,0,255})); - connect(massFlowMultiplier.Cs, singularPressureLoss1.C1) annotation (Line( - points={{0,10},{20,10}}, color={0,0,255})); -annotation(experiment(StopTime=1000), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestMassFlowMultiplier; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo deleted file mode 100644 index e2232d2f..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestNTUWaterHeater0.mo +++ /dev/null @@ -1,105 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestNTUWaterHeater0 - - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_condenseur( - P0=80.0e5, - Q0=1780, - h0=872.0e3) - annotation (Placement(transformation(extent={{-182,-10},{-162,10}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur(C(h(start= - 980281.0129225359))) - annotation (Placement(transformation(extent={{152,-10},{172,10}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - P0=27.e5, - h0=2.6e6, - C(h_vol_2(start=883556.9736276601)), - Q(start=112.29047515166533)) - annotation (Placement(transformation(extent={{-182,90},{-162,110}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2(K=1e-4, C2(P(start=7999999.633732218))) - annotation (Placement(transformation(extent={{-106, - -10},{-86,10}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=1e-4) - annotation (Placement(transformation(extent={{-106,90}, - {-86,110}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1 - annotation (Placement(transformation(extent={{152,-106},{172,-86}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss4(K=1e-4, - C1(P(start=7618062.482445708)), - rho(start=834.862478836879)) - annotation (Placement(transformation(extent={{92,-10}, - {112,10}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss5(K=1e-4, rho(start=857.3159873035071)) - annotation (Placement(transformation(extent={{34,-106}, - {54,-86}}, rotation=0))); - - ThermoSysPro.Fluid.HeatExchangers.NTUWaterHeater nTUWaterHeating( - lambdaE=102.5, - SCondDes=6314, - KCond=5024, - SPurge=656, - KPurge=1767, - HeiF(start=878162.3337936474), - HDesF(start=980281.0129225359), - Hep(start=981240.7187349163), - Ee(h_vol_2(start=880000), Q(start=1800), h(start=880000), P(start=80e5)), - Ev(h_vol_1(start=3500000), P(start=27e5)), - Ep(Q(start=10)), - Se(P(start=80e5)), - SDes(start=1E-09), - continuous_flow_reversal=true) - annotation (Placement(transformation(extent={{-44,-52}, - {64,54}}, rotation=0))); -equation - connect(Source_condenseur.C, singularPressureLoss2.C1) - annotation (Line(points={{-162,0},{-106,0}}, color={0,0,255})); - connect(sourceP.C, singularPressureLoss3.C1) - annotation (Line(points={{-162,100},{-106,100}}, - color={0,0,255})); - connect(singularPressureLoss4.C2, Puit_condenseur.C) - annotation (Line(points={{112,0},{152,0}}, color={0,0,255})); - connect(singularPressureLoss5.C2, Puit_condenseur1.C) - annotation (Line(points={{54,-96},{152,-96}}, color={0,0,255})); - connect(singularPressureLoss3.C2, nTUWaterHeating.Ev) annotation (Line(points={{-86,100}, - {42.4,100},{42.4,19.02}}, color={0,0,255})); - connect(nTUWaterHeating.Se, singularPressureLoss4.C1) - annotation (Line(points={{64,1},{68,1},{68,0},{92,0}}, - color={0,0,255})); - connect(singularPressureLoss2.C2, nTUWaterHeating.Ee) - annotation (Line(points={{-86,0},{-44,0},{-44,1}}, - color={0,0,255})); - connect(singularPressureLoss5.C1, nTUWaterHeating.Sp) - annotation (Line(points={{34,-96},{-18,-96},{-18,-16.49},{-22.4,-16.49}})); - annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, - -200},{200,200}})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestNTUWaterHeater0; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo deleted file mode 100644 index 7eb31034..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPostCombustionGas.mo +++ /dev/null @@ -1,93 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestPostCombustionGas - import ThermoSysPro; - - ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees2 - annotation (Placement(transformation( - origin={151,-6}, - extent={{23,-24},{-23,24}}, - rotation=180))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees2( - Xso2=0, - Xco2=0.0, - Xo2=0.23, - Xh2o=0.01, - P0=15e5, - Q0=415, - T0=680, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - option_temperature=true) - annotation (Placement(transformation(extent={{-174,-30},{-128,18}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePQ2( - h0=300e3, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - Q0=10) - annotation (Placement(transformation(extent={{-172,68},{-132,108}}, - rotation=0))); - - ThermoSysPro.Fluid.Combustion.BoundaryConditions.FuelSourcePQ sourceCombustible2( - Hum=0, - Xo=0, - Xn=0, - Xs=0, - rho=0.838, - Xc=0.755, - Xh=0.245, - Cp=2255, - T0=410, - Q0=9.30, - LHV=47500e3) annotation (Placement(transformation(extent={{-107,-109},{-71, - -73}}, - rotation=0))); - - ThermoSysPro.Fluid.Combustion.CombustionChambers.PostCombustionGas - postCombustionGas - annotation (Placement(transformation(extent={{-52,-74},{74,50}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss - annotation (Placement(transformation(extent={{-100,78},{-80,98}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1 - annotation (Placement(transformation(extent={{-102,-16},{-82,4}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2 - annotation (Placement(transformation(extent={{90,-16},{110,4}}))); -equation - connect(sourceCombustible2.C, postCombustionGas.Cfuel) annotation (Line( - points={{-71,-91},{-7.9,-91},{-7.9,-67.8}}, color={0,0,0})); - connect(sourcePQ2.C, singularPressureLoss.C1) - annotation (Line(points={{-132,88},{-100,88}}, color={0,0,0})); - connect(singularPressureLoss.C2, postCombustionGas.Ca) annotation (Line( - points={{-80,88},{-20.5,88},{-20.5,43.8}}, color={0,0,0})); - connect(Source_Fumees2.C, singularPressureLoss1.C1) - annotation (Line(points={{-128,-6},{-102,-6}}, color={0,0,0})); - connect(singularPressureLoss1.C2, postCombustionGas.Cfg1) annotation (Line( - points={{-82,-6},{-64,-6},{-64,-5.8},{-45.7,-5.8}}, color={0,0,0})); - connect(postCombustionGas.Cfg2, singularPressureLoss2.C1) annotation (Line( - points={{67.7,-5.8},{79.85,-5.8},{79.85,-6},{90,-6}}, color={0,0,0})); - connect(singularPressureLoss2.C2, Puits_Fumees2.C) - annotation (Line(points={{110,-6},{128,-6}}, color={0,0,0})); - annotation (Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-200},{200,200}}, - initialScale=0.1)), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestPostCombustionGas; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo deleted file mode 100644 index b4b47281..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestPressurizer.mo +++ /dev/null @@ -1,149 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestPressurizer - - parameter Units.SI.Power Wch(fixed=false) = 0.29e6 - "Power released by the electrical heaters"; - parameter Real OUVfeedwaterValve( fixed=false)=0.01 - "OUV feed water valve"; - - ThermoSysPro.Fluid.PressureLosses.ControlValve FeedwaterValve( - Cv(start=100), - C1( - P(start=160e5), - h_vol_1(start=1270e3), - Q(start=0.3), - h(start=1270e3)), - Q(fixed=false, start=0.32), - Cvmax=5000) annotation (Placement(transformation(extent={{-110,130},{ - -90,150}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve SteamValve( - Cv(start=25000), - Cvmax(fixed=true) = 5000, - Pm(start=15500000)) - annotation (Placement(transformation(extent={{58,130},{78,150}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante OuvFeedwaterValve1(k= - OUVfeedwaterValve) - annotation (Placement(transformation(extent={{-140,176},{-120,196}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe( - L=1, - D=1, - z1=1, - z2=0, - C1(P(start=160e5)), - C2(P(start=160e5)), - Q(fixed=false, start=0)) - annotation (Placement(transformation( - origin={-30,-42}, - extent={{10,-10},{-10,10}}, - rotation=90))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante OuvSteamrValve(k(fixed= - true) = 0.5) annotation (Placement(transformation(extent={{0,176},{20, - 196}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=1270e3, - P0=160e5) - annotation (Placement(transformation(extent={{-168,124},{-148,144}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(Q0=0, h0=3e6) - annotation (Placement(transformation(extent={{106,124},{126,144}}, rotation= - 0))); - ThermoSysPro.Fluid.Volumes.Pressurizer pressurizer( - Zm=10.15, - Klv=0.5e6, - cpp=600, - hl(start=1629887.98290107), - hv(start=2596216.59571565), - Zl(start=5.5900717167325), - Yw0=60, - V=61.12, - Rp=1.27, - Ae=96.23, - Klp=1780, - Kvp=7500, - Mp=107e3, - Kpa=5.63, - Ccond=0.02, - Cevap=0.05, - Yw(start=32.92), - y(start=0.3292, fixed=true), - P0=15500000, - P(start=15500000, fixed=true), - Tp(start=617.94155291055)) annotation (Placement(transformation(extent={{-92, - -12},{32,118}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ1( Q0=0, h0=1600000) - annotation (Placement(transformation(extent={{-30,-76},{-10,-56}}, - rotation=0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC1( - option_temperature=2, - T0={310}, - W0={Wch}) - annotation (Placement(transformation( - origin={-133,32}, - extent={{-17,17},{17,-17}}, - rotation=270))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource SourceC2( - T0={310}, - W0={0.286e6}, - option_temperature=1) - annotation (Placement(transformation( - origin={-133,55}, - extent={{-17,17},{17,-17}}, - rotation=270))); -equation - connect(sourceP.C, FeedwaterValve.C1) annotation (Line(points={{-148,134},{ - -110,134}}, color={0,0,255})); - connect(SteamValve.C2, sinkQ.C) annotation (Line(points={{78,134},{106,134}}, - color={0,0,255})); - connect(OuvSteamrValve.y, SteamValve.Ouv) - annotation (Line(points={{21,186},{68,186},{68,151}})); - connect(FeedwaterValve.C2, pressurizer.Cas) annotation (Line(points={{-90,134}, - {-30,134},{-30,118}}, color={0,0,255})); - connect(pressurizer.Cs, SteamValve.C1) annotation (Line(points={{32,116.7},{ - 32,134},{58,134}}, color={0,0,255})); - connect(sinkQ1.C, lumpedStraightPipe.C2) - annotation (Line(points={{-30,-66},{-30,-52}})); - connect(lumpedStraightPipe.C1, pressurizer.Cex) - annotation (Line(points={{-30,-32},{-30,-12}})); - connect(SourceC2.C[1], pressurizer.Ca) annotation (Line(points={{-116.34,55}, - {-103.17,55},{-103.17,54.3},{-85.8,54.3}}, color={191,95,0})); - connect(SourceC1.C[1], pressurizer.Cc) annotation (Line(points={{-116.34,32}, - {-73.17,32},{-73.17,32.2},{-30,32.2}}, color={191,95,0})); - connect(OuvFeedwaterValve1.y, FeedwaterValve.Ouv) annotation (Line(points={{ - -119,186},{-100,186},{-100,151}}, color={0,0,255})); - annotation ( - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(graphics, - coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-100},{140,200}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - experiment(StopTime=1000)); -end TestPressurizer; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo deleted file mode 100644 index fe67477b..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP.mo +++ /dev/null @@ -1,62 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestRefP - - ThermoSysPro.Fluid.BoundaryConditions.RefP refP - annotation (Placement(transformation(extent={{-90,0},{-70,20}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante( - k=2.e5) - annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation= - 0))); - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump - annotation (Placement(transformation(extent={{-30,0},{-10,20}}, rotation=0))); - ThermoSysPro.Fluid.LoopBreakers.LoopBreakerQ loopBreakerQ - annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); - ThermoSysPro.Fluid.LoopBreakers.LoopBreakerH loopBreakerH - annotation (Placement(transformation(extent={{30,0},{50,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.RefT refT - annotation (Placement(transformation(extent={{-60,0},{-40,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe - annotation (Placement(transformation(extent={{60,0},{80,20}}, rotation=0))); - Volumes.VolumeA volumeA(dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{10,-30},{-10,-10}}))); -equation - connect(refP.C2, refT.C1) annotation (Line(points={{-70,10},{-60,10}}, color= - {0,0,255})); - connect(refT.C2, pump.C1) annotation (Line(points={{-40,10},{-30,10}}, color= - {0,0,255})); - connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60, - 70},{-60,34},{-80,34},{-80,21}})); - connect(pump.C2, loopBreakerQ.C1) - annotation (Line(points={{-10,10},{0,10}}, color={0,0,255})); - connect(loopBreakerQ.C2, loopBreakerH.C1) - annotation (Line(points={{20,10},{30,10}}, color={0,0,255})); - connect(loopBreakerH.C2, lumpedStraightPipe.C1) - annotation (Line(points={{50,10},{60,10}}, color={0,0,255})); - connect(lumpedStraightPipe.C2, volumeA.Ce1) annotation (Line(points={{80,10}, - {100,10},{100,-20},{10,-20}}, color={0,0,0})); - connect(volumeA.Cs1, refP.C1) annotation (Line(points={{-10,-20},{-100,-20},{ - -100,10},{-90,10}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestRefP; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo deleted file mode 100644 index 7a704094..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestRefP1.mo +++ /dev/null @@ -1,56 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestRefP1 - - ThermoSysPro.Fluid.BoundaryConditions.RefP refP - annotation (Placement(transformation(extent={{-70,0},{-50,20}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante constante( - k=2.e5) - annotation (Placement(transformation(extent={{-100,60},{-80,80}}, rotation= - 0))); - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump pump - annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe - annotation (Placement(transformation(extent={{40,0},{60,20}}, rotation=0))); - BoundaryConditions.Source source - annotation (Placement(transformation(extent={{-100,0},{-80,20}}))); - BoundaryConditions.Sink sink - annotation (Placement(transformation(extent={{80,0},{100,20}}))); - BoundaryConditions.RefQ refQ - annotation (Placement(transformation(extent={{-40,0},{-20,20}}))); -equation - connect(constante.y, refP.IPressure) annotation (Line(points={{-79,70},{-60, - 70},{-60,21}})); - connect(source.C, refP.C1) - annotation (Line(points={{-80,10},{-70,10}}, color={0,0,0})); - connect(lumpedStraightPipe.C2, sink.C) - annotation (Line(points={{60,10},{80,10}}, color={0,0,0})); - connect(pump.C2, lumpedStraightPipe.C1) - annotation (Line(points={{20,10},{40,10}}, color={0,0,0})); - connect(refP.C2, refQ.C1) - annotation (Line(points={{-50,10},{-40,10}}, color={0,0,0})); - connect(pump.C1, refQ.C2) - annotation (Line(points={{0,10},{-20,10}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestRefP1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo deleted file mode 100644 index 520cba18..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSensors.mo +++ /dev/null @@ -1,61 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSensors - - ThermoSysPro.Fluid.Sensors.SensorH specificEnthalpySensor - annotation (Placement(transformation(extent={{-60,8},{-40,28}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorQ massFlowSensor - annotation (Placement(transformation(extent={{-20,8},{0,28}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorQv volumetricFlowSensor - annotation (Placement(transformation(extent={{20,8},{40,28}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorP pressureSensor - annotation (Placement(transformation(extent={{-60,-32},{-40,-12}}, rotation= - 0))); - ThermoSysPro.Fluid.Sensors.SensorT temperatureSensor - annotation (Placement(transformation(extent={{-20,-32},{0,-12}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP - annotation (Placement(transformation( - extent={{60,-40},{80,-20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation( - extent={{-100,0},{-80,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP - annotation (Placement(transformation(extent={{20,-40},{40,-20}}, rotation=0))); -equation - connect(sourceP.C, specificEnthalpySensor.C1) - annotation (Line(points={{-80,10},{-60,10}}, color={0,0,255})); - connect(specificEnthalpySensor.C2, massFlowSensor.C1) - annotation (Line(points={{-39.8,10},{-20,10}}, color={0,0,255})); - connect(massFlowSensor.C2, volumetricFlowSensor.C1) - annotation (Line(points={{0.2,10},{20,10}}, color={0,0,255})); - connect(volumetricFlowSensor.C2, pressureSensor.C1) annotation (Line(points={ - {40.2,10},{60,10},{60,0},{-80,0},{-80,-30},{-60,-30}}, color={0,0,255})); - connect(pressureSensor.C2, temperatureSensor.C1) annotation (Line(points={{ - -39.8,-30},{-20,-30}}, color={0,0,255})); - connect(temperatureSensor.C2, perteDP.C1) - annotation (Line(points={{0.2,-30},{20,-30}}, color={0,0,255})); - connect(perteDP.C2, puitsP.C) - annotation (Line(points={{40,-30},{60,-30}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSensors; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo deleted file mode 100644 index c9877780..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser.mo +++ /dev/null @@ -1,122 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSimpleDynamicCondenser - -parameter Real L1 = 425 "Longueur de la première chaine de capteurs"; -parameter Integer Ns1 = 80 - "Nombre de mailles de la première chaine de capteurs"; - -parameter Real L2 = 75 "Longueur de la deuxième chaine de capteurs"; -parameter Integer Ns2 = 1 "Nombre de mailles de la deuxième chaine de capteurs"; - - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur( - P0=1e5, - option_temperature=false) annotation (Placement(transformation(extent={{48,30}, - {88,70}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - PerteChargeCondPompe( K=1e-6, Q(start= - 0.598447), - C1(P(start=9035.18437098087)), - rho(start=990.6632738884383)) - annotation (Placement(transformation( - origin={-90,-38}, - extent={{-10,-10},{10,10}}, - rotation=180))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceRechauffeurEau( - option_temperature=false, - h0=2401e3, - P0=15050) annotation (Placement(transformation(extent={{-207, - 148},{-183,170}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ PuitsRechauffeurEau( - h0=191812, Q0(start=192, fixed=false)) - annotation (Placement(transformation(extent={{-184, - -52},{-208,-24}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePCaloporteur(Q0=29804.5, h0=113e3) - annotation (Placement(transformation(extent={{-212,30}, - {-172,68}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - PerteChargeCondPompe1( K=1e-6, rho( - start=995.5397398431962)) - annotation (Placement(transformation( - origin={36,50}, - extent={{6,-10},{-6,10}}, - rotation=180))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - PerteChargeCondPompe2( K=1e-6, rho( - start=996.552939890412)) - annotation (Placement(transformation( - origin={-154,49}, - extent={{6,-10},{-6,10}}, - rotation=180))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - PerteChargeCondPompe3(K(fixed=false) = 1e-3, Q(start=192, fixed=true)) - annotation (Placement(transformation( - origin={-120,159}, - extent={{10,-10},{-10,10}}, - rotation=180))); - ThermoSysPro.Fluid.HeatExchangers.SimpleDynamicCondenser Condenseur( D=0.018, - V=1000, - A=100, - lambda=0.01, - ntubes=28700, - yNiveau(signal(fixed=false, start=1.5)), - Vf0=0.15, - Vl(start=500, fixed=true), - P(fixed=false, start=9035.18437098087), - hl(start=183576.8570917718), - hv(start=187278.68509678004), - proe(d(start=996.0593559031695))) - annotation (Placement(transformation(extent={{-118,6},{1, - 116}}, rotation=0))); -equation - - connect(sourcePCaloporteur.C, PerteChargeCondPompe2.C1) annotation (Line( - points={{-172,49},{-160,49}}, color={0,0,255})); - connect(PerteChargeCondPompe1.C2, puitsPCaloporteur.C) annotation (Line( - points={{42,50},{48,50}}, color={0,0,255})); - connect(SourceRechauffeurEau.C, PerteChargeCondPompe3.C1) annotation (Line( - points={{-183,159},{-130,159}}, color={0,0,255})); - connect(PuitsRechauffeurEau.C, PerteChargeCondPompe.C2) - annotation (Line(points={{-184,-38},{-100,-38}})); - connect(PerteChargeCondPompe2.C2, Condenseur.Cee) annotation (Line(points={{ - -148,49},{-133,49},{-133,48.9},{-118,48.9}}, color={0,0,255})); - connect(PerteChargeCondPompe.C1, Condenseur.Cl) - annotation (Line(points={{-80,-38},{-57.31,-38},{-57.31,6}})); - connect(PerteChargeCondPompe3.C2, Condenseur.Cv) annotation (Line(points={{ - -110,159},{-58.5,159},{-58.5,116}}, color={0,0,255})); - connect(PerteChargeCondPompe1.C1, Condenseur.Cse) - annotation (Line(points={{30,50},{15.5,50},{15.5,50},{1,50}})); - annotation ( - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-250,-60},{130,180}}, - grid={2,2}, - initialScale=0.1)), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - experiment(StopTime=1000)); -end TestSimpleDynamicCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo deleted file mode 100644 index 2a3bb2db..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleDynamicCondenser1.mo +++ /dev/null @@ -1,95 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSimpleDynamicCondenser1 - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump staticCentrifugalPump(Pm(displayUnit = "Pa", start= - 355000.00000015664), Q(fixed = false), hn(fixed = false, start= - 71.08245675235786), p_rho(displayUnit = "kg/m3"), rho(displayUnit = "kg/m3"), - a1(start=-88.67, fixed=false), - C2(h(start=195297.69906611618), h_vol_1(start=195297.69906611618)), - Qv(start=0.009081311621074862), - h(start=193554.9971298399), - C1(P(start=10000.0))) annotation ( - Placement(visible = true, transformation(origin={-10,-60}, extent={{10,-10}, - {-10,10}}, rotation = 0))); - ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Pe(displayUnit = "Pa", fixed = true, start = 700000), Ps(displayUnit = "Pa", fixed = false), W_fric = 0, eta_is(fixed = false), eta_is_wet(fixed = false), rhos(displayUnit = "kg/m3", fixed = false), - xm(fixed=false, start=0.9856238368898451), - proe(x(start=1, fixed=true)), - Ce(h_vol_2(start=3128840.013040668), h(start=3128840.0130323363)), - pros(d(start=0.07018147245152216))) annotation ( - Placement(visible = true, transformation(origin={-10,60}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); - ThermoSysPro.Fluid.HeatExchangers.SimpleDynamicCondenser Condenseur(A = 100, D = 0.018, - dynamic_energy_balance=true, - P(fixed=false, start=10000), - P0(displayUnit="Pa") = 1000, V = 1000, continuous_flow_reversal = true, lambda = 0.01, ntubes = 28700, rhol(displayUnit = "kg/m3"), rhom(displayUnit = "kg/m3"), rhov(displayUnit = "kg/m3"), yNiveau(signal(fixed = false, start = 1.5)), - steady_state=false, - proe(d(start=0.7468807684211932))) annotation ( - Placement(visible = true, transformation(origin={40.5,-1}, extent = {{-20.5, -16}, {20.5, 16}}, rotation = 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsPCaloporteur(P0 = 1e5, T0 = 373.05, option_temperature = true) annotation ( - Placement(visible = true, transformation(origin={85,-1}, extent = {{-11, -12}, {11, 12}}, rotation = 0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourcePCaloporteur(Q0 = 5, h0 = 113e3) annotation ( - Placement(visible = true, transformation(origin={-24,-1}, extent = {{-10, -9}, {10, 9}}, rotation = 0))); - Volumes.VolumeATh volumeA( - P(start=70e5), - h(start=2.e6), - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-70,10},{-50,-10}}))); - Thermal.BoundaryConditions.HeatSource heatSource(W0(start={2e6}, each fixed=false), - option_temperature=2) annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={-88,12}))); -equation - connect(Condenseur.Cv,stodolaTurbine. Cs) annotation ( - Line(points={{40.5,15},{40.5,60},{0.1,60}}, color = {0, 0, 255})); - connect(Condenseur.Cse,puitsPCaloporteur. C) annotation ( - Line(points={{61,-4.2},{62,-4.2},{62,-1},{74,-1}}, - color = {0, 0, 255})); - connect(sourcePCaloporteur.C,Condenseur. Cee) annotation ( - Line(points={{-14,-1},{-9,-1},{-9,-4.52},{20,-4.52}}, color = {0, 0, 255})); - connect(Condenseur.Cl, staticCentrifugalPump.C1) annotation (Line(points={{40.91, - -17},{40,-17},{40,-60},{0,-60}}, color={28,108,200})); - connect(staticCentrifugalPump.C2, volumeA.Ce2) - annotation (Line(points={{-20,-60},{-60,-60},{-60,-10}}, color={28,108,200})); - connect(volumeA.Cs2, stodolaTurbine.Ce) - annotation (Line(points={{-60,10},{-60,60},{-20.1,60}}, color={28,108,200})); - connect(heatSource.C[1], volumeA.Cth) annotation (Line(points={{-78.2,12},{-64, - 12},{-64,0},{-60,0}}, color={0,0,0})); - annotation ( Diagram(graphics={ - Text( - extent={{-94,34},{-64,24}}, - lineColor={28,108,200}, - textString="W: free"), - Text( - extent={{-26,-38},{8,-48}}, - lineColor={28,108,200}, - textString="a1: free"), - Text( - extent={{-28,94},{8,84}}, - lineColor={28,108,200}, - textString="Pe: fixed"), - Text( - extent={{-28,84},{10,72}}, - lineColor={28,108,200}, - textString="proe.x: fixed")}), Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - experiment(StopTime=1000, __Dymola_Algorithm="Dassl")); -end TestSimpleDynamicCondenser1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo deleted file mode 100644 index a2f4c5bf..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleEvaporatorWaterSteamFlueGases.mo +++ /dev/null @@ -1,71 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSimpleEvaporatorWaterSteamFlueGases - - ThermoSysPro.Fluid.BoundaryConditions.Sink puits_Eau - annotation (Placement(transformation( - extent={{64,-17},{84,3}}, rotation=0))); - - ThermoSysPro.Fluid.HeatExchangers.SimpleEvaporatorWaterSteamFlueGases - EchangeurEfficacite(Kdpf=1, Kdpe=1) - annotation (Placement(transformation(extent={{-44,-35},{44,21}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ source_Eau( - Q0=38.92/3.6, - h0=1242080, - P0=6527000) - annotation (Placement(transformation(extent={{-84,-17},{-64,3}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees( - Xso2=0, - Q0=86.7429, - Xco2=0.04725, - Xh2o=0.051874, - Xo2=0.15011, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=101000, - T0=750.54, - option_temperature=true) - annotation (Placement(transformation(extent={{-34,45},{0,75}}, rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees - annotation (Placement(transformation( - origin={16,-70}, - extent={{16,-15},{-16,15}}, - rotation=180))); -equation - connect(Source_Fumees.C, EchangeurEfficacite.Cfg1) annotation (Line( - points={{0,60},{0,18.2}}, - color={0,0,0}, - thickness=1)); - connect(EchangeurEfficacite.Cfg2, Puits_Fumees.C) annotation (Line( - points={{0,-32.2},{0,-70},{0,-70}}, - color={0,0,0}, - thickness=1)); - connect(EchangeurEfficacite.Cws2, puits_Eau.C) annotation (Line(points={{44, - -7},{54,-7},{54,-7},{64,-7}}, color={0,0,255})); - connect(EchangeurEfficacite.Cws1, source_Eau.C) - annotation (Line(points={{-44,-7},{-54,-7},{-54,-7},{-64,-7}})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSimpleEvaporatorWaterSteamFlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo deleted file mode 100644 index ef928dcd..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSimpleStaticCondenser.mo +++ /dev/null @@ -1,53 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSimpleStaticCondenser - - ThermoSysPro.Fluid.HeatExchangers.SimpleStaticCondenser - simpleStaticCondenser( - Ec(h(start=532983.7176868258)), - Ef(h(start=71016.12237181116)), - Qc(start=1049.6385508765125), - Qf(start=4469.84281279143), - Sf(h(start=64330.208038325145))) - annotation (Placement(transformation(extent={{-20,20}, - {0,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1(T0=400) - annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1 - annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); -equation - connect(sourceP.C, simpleStaticCondenser.Ef) annotation (Line(points={{-40,30}, - {-20,30}}, color={0,0,255})); - connect(sourceP1.C, simpleStaticCondenser.Ec) annotation (Line(points={{-40, - -10},{-16,-10},{-16,20}}, color={0,0,255})); - connect(simpleStaticCondenser.Sf, sinkP.C) annotation (Line(points={{0,29.9}, - {10,29.9},{10,30},{20,30}}, color={0,0,255})); - connect(simpleStaticCondenser.Sc, sinkP1.C) annotation (Line(points={{-4,20}, - {-4,-10},{20,-10}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSimpleStaticCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo deleted file mode 100644 index f24da7e9..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSingularPressureLoss.mo +++ /dev/null @@ -1,51 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSingularPressureLoss - - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss( fluid=1) - annotation (Placement(transformation( - extent={{-20,20},{0,40}}, rotation=0))); -equation - connect(singularPressureLoss.C2, PuitsP1.C) - annotation (Line(points={{0,30},{60,30}}, color={0,0,255})); - connect(SourceP1.C, singularPressureLoss.C1) - annotation (Line(points={{-80,30},{-20,30}}, color={0,0,255})); - annotation (experiment(StopTime=1000), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSingularPressureLoss; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo deleted file mode 100644 index 079db785..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticAerocondenser.mo +++ /dev/null @@ -1,97 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticAerocondenser - - parameter Units.SI.AbsolutePressure Pin_1=20000 - "Flow pressure at inlet 1 (sourceP)"; - parameter Units.SI.AbsolutePressure Pin_2=20000 - "Flow pressure at inlet 3 (sourceP2)"; - - BoundaryConditions.SourcePQ Source_condenseur( - Q0(fixed=true) = 4000, - h0=15e3, - option_temperature=true, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=100000, - T0=287.15) - annotation (Placement(transformation(extent={{190,-90},{170,-70}}, - rotation=0))); - - BoundaryConditions.Sink Puit_condenseur - annotation (Placement(transformation(extent={{170,90},{190,110}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=2.5817e6, - C(Q(fixed=false, start=100)), - P0=Pin_1) - annotation (Placement(transformation(extent={{-100,90},{-80,110}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - option_temperature=false, - h0=2.5055e6, - C(Q(fixed=false, start=1e-5)), - P0=Pin_2) annotation (Placement(transformation(extent={{-182, - -40},{-162,-20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1(K=10) - annotation (Placement(transformation(extent={{-120,-40}, - {-100,-20}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=10) - annotation (Placement(transformation(extent={{-38,90}, - {-18,110}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1 - annotation (Placement(transformation(extent={{-100,-90},{-120,-70}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss5(K=1e-4) - annotation (Placement(transformation(extent={{-40,-90}, - {-60,-70}},rotation=0))); - - Fluid.HeatExchangers.StaticAerocondenser staticAerocondenser - annotation (Placement(transformation(extent={{-64,-44},{66,70}}))); -equation - connect(sourceP2.C, singularPressureLoss1.C1) - annotation (Line(points={{-162,-30},{-120,-30}}, - color={0,0,255})); - connect(sourceP.C, singularPressureLoss3.C1) - annotation (Line(points={{-80,100},{-38,100}}, color={0,0,255})); - connect(singularPressureLoss1.C2, staticAerocondenser.Cw) annotation (Line( - points={{-100,-30},{-70,-30},{-70,-29.75},{-58.5833,-29.75}},color={0,0, - 0})); - connect(singularPressureLoss3.C2, staticAerocondenser.Cws1) - annotation (Line(points={{-18,100},{1,100},{1,65.25}}, color={0,0,0})); - connect(Puit_condenseur1.C, singularPressureLoss5.C2) - annotation (Line(points={{-100,-80},{-60,-80}},color={0,0,0})); - connect(singularPressureLoss5.C1, staticAerocondenser.Cws2) - annotation (Line(points={{-40,-80},{1,-80},{1,-39.25}}, color={0,0,0})); - connect(Source_condenseur.C, staticAerocondenser.Cair1) annotation (Line( - points={{170,-80},{60.5833,-80},{60.5833,-38.775}}, color={0,0,0})); - connect(Puit_condenseur.C, staticAerocondenser.Cair2) annotation (Line(points={{170,100}, - {60.5833,100},{60.5833,65.25}}, color={0,0,0})); - annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, - -200},{200,200}})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticAerocondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo deleted file mode 100644 index 7f098428..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCentrifugalPump1.mo +++ /dev/null @@ -1,52 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticCentrifugalPump1 - - ThermoSysPro.Fluid.Machines.StaticCentrifugalPump StaticCentrifugalPump1( - fixed_rot_or_power=2, MPower=0.15e6) - annotation (Placement(transformation(extent={{-20,20},{0,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP - annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(P0=600000) - annotation (Placement(transformation(extent={{40,20},{60,40}}, rotation=0))); -equation - connect(sourceP.C, StaticCentrifugalPump1.C1) annotation (Line( - points={{-60,30},{-20,30}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(StaticCentrifugalPump1.C2, sinkP.C) annotation (Line( - points={{0,30},{40,30}}, - color={0,0,255}, - smooth=Smooth.None)); - annotation (experiment(StopTime=1000), - Window( - x=0.32, - y=0.02, - width=0.39, - height=0.47), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticCentrifugalPump1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo deleted file mode 100644 index 70340b52..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenser.mo +++ /dev/null @@ -1,123 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticCondenser - - parameter Units.SI.AbsolutePressure Pin_1(fixed=false, start=20000) - "Flow pressure at inlet 1 (sourceP)"; - parameter Units.SI.AbsolutePressure Pin_2(fixed=false, start=20000) - "Flow pressure at inlet 2 (sourceP1)"; - parameter Units.SI.AbsolutePressure Pin_3(fixed=false, start=20000) - "Flow pressure at inlet 3 (sourceP2)"; - - ThermoSysPro.Fluid.BoundaryConditions.SourceQ Source_condenseur( - h0=60e3, Q0(fixed=true) = 4000) - annotation (Placement(transformation(extent={{-180,0},{-160,20}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur - annotation (Placement(transformation(extent={{160,0},{180,20}}, - rotation=0))); - ThermoSysPro.Fluid.HeatExchangers.StaticCondenser condenseur( - CPCE=0, - KCO=100, - QC0=200, - z=5, - SCO=15e3, - Qee(start=4000, fixed=false), - Pcond(fixed=false, start=2154.77)) annotation (Placement(transformation( - extent={{-20,-16},{72,82}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=2.5817e6, - C(Q(fixed=true, start=100)), - P0=Pin_1) - annotation (Placement(transformation(extent={{-100,140},{-80,160}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - option_temperature=false, - h0=2.5481e6, - C(Q(fixed=true, start=1e-5)), - P0=Pin_2) annotation (Placement(transformation(extent={ - {-182,80},{-162,100}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - option_temperature=false, - h0=2.5055e6, - C(Q(fixed=true, start=1e-5)), - P0=Pin_3) annotation (Placement(transformation(extent= - {{-180,40},{-160,60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss(K=10) - annotation (Placement(transformation(extent={{-100,80}, - {-80,100}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1(K=10) - annotation (Placement(transformation(extent={{-100,40}, - {-80,60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2(K=1e-4) - annotation (Placement(transformation(extent={{-100,0}, - {-80,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=10) - annotation (Placement(transformation(extent={{-40,140}, - {-20,160}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1 - annotation (Placement(transformation(extent={{100,-100},{120,-80}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss4(K=1e-4) - annotation (Placement(transformation(extent={{100,0}, - {120,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss5(K=1e-4) - annotation (Placement(transformation(extent={{40,-100}, - {60,-80}}, rotation=0))); - -equation - connect(sourceP1.C, singularPressureLoss.C1) - annotation (Line(points={{-162,90},{-100,90}}, color={0,0,255})); - connect(singularPressureLoss.C2, condenseur.Cev) annotation (Line(points={{ - -80,90},{-50,90},{-50,62.89},{-20,62.89}}, color={0,0,255})); - connect(sourceP2.C, singularPressureLoss1.C1) - annotation (Line(points={{-160,50},{-100,50}}, color={0,0,255})); - connect(singularPressureLoss1.C2, condenseur.Cep) annotation (Line(points={{ - -80,50},{-52,50},{-52,42.31},{-20,42.31}}, color={0,0,255})); - connect(Source_condenseur.C, singularPressureLoss2.C1) - annotation (Line(points={{-160,10},{-100,10}}, color={0,0,255})); - connect(singularPressureLoss2.C2, condenseur.Cee) annotation (Line(points={{ - -80,10},{-52,10},{-52,3.11},{-20,3.11}}, color={0,0,255})); - connect(sourceP.C, singularPressureLoss3.C1) - annotation (Line(points={{-80,150},{-40,150}}, color={0,0,255})); - connect(singularPressureLoss3.C2, condenseur.Cvt) annotation (Line(points={{ - -20,150},{26,150},{26,82.49}}, color={0,0,255})); - connect(singularPressureLoss4.C2, Puit_condenseur.C) - annotation (Line(points={{120,10},{160,10}}, color={0,0,255})); - connect(condenseur.Cse, singularPressureLoss4.C1) annotation (Line(points={{ - 72.92,3.11},{86,3.11},{86,10},{100,10}}, color={0,0,255})); - connect(singularPressureLoss5.C2, Puit_condenseur1.C) - annotation (Line(points={{60,-90},{100,-90}}, color={0,0,255})); - connect(singularPressureLoss5.C1, condenseur.Cex) - annotation (Line(points={{40,-90},{26.46,-90},{26.46,-16}})); - annotation (experiment(StopTime=1000), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-200, - -200},{200,200}})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticCondenser; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo deleted file mode 100644 index a2628b2f..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticCondenserHEI.mo +++ /dev/null @@ -1,126 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticCondenserHEI - - parameter Units.SI.AbsolutePressure Pin_1(fixed=false, start= - 179979.0023433965) "Flow pressure at inlet 1 (sourceP)"; - parameter Units.SI.AbsolutePressure Pin_2(fixed=false, start= - 4691.365030963762) "Flow pressure at inlet 2 (sourceP1)"; - parameter Units.SI.AbsolutePressure Pin_3(fixed=false, start= - 4691.365030911197) "Flow pressure at inlet 3 (sourceP2)"; - - ThermoSysPro.Fluid.BoundaryConditions.SourceQ Source_condenseur( - h0=60e3, Q0(fixed=true) = 4000) - annotation (Placement(transformation(extent={{-180,0},{-160,20}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP Puit_condenseur(C(h(start= - 121216.39257552983))) - annotation (Placement(transformation(extent={{160,0},{180,20}}, - rotation=0))); - ThermoSysPro.Fluid.HeatExchangers.StaticCondenserHEI condenseur( - Kf=0, - z1c=5, - Cee( - Q( start=4000, fixed=false)), - Pcond(fixed=false, start=2154.77), - DPf(start=-7.816453667652961E-26), - Wcut_off(start=116804805.25936648), - procs(d(start=9.50351941496327))) annotation (Placement(transformation( - extent={{-20,-16},{72,82}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - option_temperature=false, - h0=2.5817e6, - C(Q(fixed=true, start=100)), - P0=Pin_1) - annotation (Placement(transformation(extent={{-100,140},{-80,160}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - option_temperature=false, - h0=2.5481e6, - C(Q(fixed=true, start=1e-5)), - P0=Pin_2) annotation (Placement(transformation(extent={ - {-182,80},{-162,100}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - option_temperature=false, - h0=2.5055e6, - C(Q(fixed=true, start=1e-5)), - P0=Pin_3) annotation (Placement(transformation(extent= - {{-180,40},{-160,60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss(K=10) - annotation (Placement(transformation(extent={{-100,80}, - {-80,100}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1(K=10) - annotation (Placement(transformation(extent={{-100,40}, - {-80,60}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2(K=1e-4, rho(start=999.2051327991054)) - annotation (Placement(transformation(extent={{-100,0}, - {-80,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=10) - annotation (Placement(transformation(extent={{-40,140}, - {-20,160}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink Puit_condenseur1 - annotation (Placement(transformation(extent={{100,-100},{120,-80}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss4(K=1e-4, rho(start=995.9727926518547)) - annotation (Placement(transformation(extent={{100,0}, - {120,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss5(K=1e-4, rho(start=9.502298036944223)) - annotation (Placement(transformation(extent={{40,-100}, - {60,-80}}, rotation=0))); - -equation - connect(sourceP1.C, singularPressureLoss.C1) - annotation (Line(points={{-162,90},{-100,90}}, color={0,0,255})); - connect(singularPressureLoss.C2, condenseur.Cev) annotation (Line(points={{ - -80,90},{-50,90},{-50,62.89},{-20,62.89}}, color={0,0,255})); - connect(sourceP2.C, singularPressureLoss1.C1) - annotation (Line(points={{-160,50},{-100,50}}, color={0,0,255})); - connect(singularPressureLoss1.C2, condenseur.Cep) annotation (Line(points={{ - -80,50},{-52,50},{-52,42.31},{-20,42.31}}, color={0,0,255})); - connect(Source_condenseur.C, singularPressureLoss2.C1) - annotation (Line(points={{-160,10},{-100,10}}, color={0,0,255})); - connect(singularPressureLoss2.C2, condenseur.Cee) annotation (Line(points={{ - -80,10},{-52,10},{-52,3.11},{-20,3.11}}, color={0,0,255})); - connect(sourceP.C, singularPressureLoss3.C1) - annotation (Line(points={{-80,150},{-40,150}}, color={0,0,255})); - connect(singularPressureLoss3.C2, condenseur.Cvt) annotation (Line(points={{ - -20,150},{26,150},{26,82.49}}, color={0,0,255})); - connect(singularPressureLoss4.C2, Puit_condenseur.C) - annotation (Line(points={{120,10},{160,10}}, color={0,0,255})); - connect(condenseur.Cse, singularPressureLoss4.C1) annotation (Line(points={{ - 72.92,3.11},{86,3.11},{86,10},{100,10}}, color={0,0,255})); - connect(singularPressureLoss5.C2, Puit_condenseur1.C) - annotation (Line(points={{60,-90},{100,-90}}, color={0,0,255})); - connect(singularPressureLoss5.C1, condenseur.Cex) - annotation (Line(points={{40,-90},{26.46,-90},{26.46,-16}})); - annotation (experiment(StopTime=1000), Diagram(graphics, - coordinateSystem(preserveAspectRatio=false, extent={{-200, - -200},{200,200}})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticCondenserHEI; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo deleted file mode 100644 index b125b099..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum1.mo +++ /dev/null @@ -1,92 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticDrum1 - - ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1 - annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossVALI1(K=1e-4) - annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossVALI2(K=1e-4) - annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(Q0=10) - annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorT sensorT - annotation (Placement(transformation(extent={{40,-82},{60,-62}}, rotation=0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( - option_temperature=2, - W0={2.4e8}, - T0={290}) annotation (Placement(transformation(extent={{-80,20},{-60,40}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossVALI3(K=1e-4) - annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); - BoundaryConditions.PlugB sinkP2 - annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorT sensorT1 - annotation (Placement(transformation(extent={{20,58},{40,78}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.RefP refP(P0=3e5) - annotation (Placement(transformation(extent={{-26,-90},{-6,-70}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.RefQ refQ(Q0=100) - annotation (Placement(transformation(extent={{-56,-90},{-36,-70}}, rotation= - 0))); - BoundaryConditions.PlugA sourcePlug(C(h(fixed=true))) - annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation= - 0))); - BoundaryConditions.RefXgas refXgas - annotation (Placement(transformation(extent={{8,-90},{28,-70}}))); -equation - connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) - annotation (Line( - points={{-60,-40},{-60,0.6},{-48,0.6}}, color={0,0,255})); - connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20, - 0},{40,0}}, color={0,0,255})); - connect(sensorT.C2, singularPressureLossVALI2.C1) annotation (Line(points={{60.2, - -80},{80,-80},{80,-60},{-80,-60},{-80,-40}}, color={0,0,255})); - connect(heatSource.C[1], StaticDrumTh1.Cth) - annotation (Line(points={{-70,20.2},{ - -70,10},{-44,10}}, color={191,95,0})); - connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1) - annotation (Line( - points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255})); - connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1) - annotation (Line( - points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255})); - connect(singularPressureLossVALI3.C2, sensorT1.C1) - annotation (Line(points={{0,60},{20,60}}, color={0,0,255})); - connect(sensorT1.C2, sinkP2.C) - annotation (Line(points={{40.2,60},{60,60}}, color={0,0,255})); - connect(refQ.C2, refP.C1) annotation (Line(points={{-36,-80},{-26,-80}}, - color={0,0,255})); - connect(sourcePlug.C, refQ.C1) annotation (Line(points={{-70,-80},{-56,-80}}, - color={0,0,255})); - connect(refP.C2, refXgas.C1) - annotation (Line(points={{-6,-80},{8,-80}}, color={0,0,0})); - connect(refXgas.C2, sensorT.C1) - annotation (Line(points={{28,-80},{40,-80}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticDrum1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo deleted file mode 100644 index f235cd28..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticDrum2.mo +++ /dev/null @@ -1,77 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticDrum2 - - ThermoSysPro.Fluid.Junctions.StaticDrum StaticDrumTh1 - annotation (Placement(transformation(extent={{-54,0},{-34,20}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossVALI1(K=1e-4) - annotation (Placement(transformation(extent={{0,-10},{20,10}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossVALI2(K=1e-4) - annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkP1(Q0=10) - annotation (Placement(transformation(extent={{40,-10},{60,10}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorT sensorT - annotation (Placement(transformation(extent={{-40,-82},{-20,-62}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(P0=100e5) - annotation (Placement(transformation(extent={{-90,-90},{-70,-70}}, rotation= - 0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSink heatSource - annotation (Placement(transformation(extent= - {{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossVALI3(K=1e-4) - annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP2 - annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorT sensorT1 - annotation (Placement(transformation(extent={{20,58},{40,78}}, rotation=0))); -equation - connect(singularPressureLossVALI2.C2, StaticDrumTh1.Ce_eco) - annotation (Line( - points={{-60,-40},{-48,-40},{-48,0.6}}, color={0,0,255})); - connect(singularPressureLossVALI1.C2, sinkP1.C) annotation (Line(points={{20, - 0},{40,0}}, color={0,0,255})); - connect(sensorT.C2, singularPressureLossVALI2.C1) annotation (Line(points={{ - -19.8,-80},{-10,-80},{-10,-54},{-80,-54},{-80,-40}}, color={0,0,255})); - connect(sourcePQ.C, sensorT.C1) annotation (Line(points={{-70,-80},{-40,-80}}, - color={0,0,255})); - connect(heatSource.C[1], StaticDrumTh1.Cth) - annotation (Line(points={{-70,20.2},{ - -70,10},{-44,10}}, color={191,95,0})); - connect(StaticDrumTh1.Cs_purg, singularPressureLossVALI1.C1) - annotation (Line( - points={{-34.6,6.6},{-19.3,6.6},{-19.3,0},{0,0}}, color={0,0,255})); - connect(StaticDrumTh1.Cs_sur, singularPressureLossVALI3.C1) - annotation (Line( - points={{-40.2,19.4},{-40.2,60},{-20,60}}, color={0,0,255})); - connect(singularPressureLossVALI3.C2, sensorT1.C1) - annotation (Line(points={{0,60},{20,60}}, color={0,0,255})); - connect(sensorT1.C2, sinkP2.C) - annotation (Line(points={{40.2,60},{60,60}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticDrum2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo deleted file mode 100644 index a60588e8..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerDTorWorEff.mo +++ /dev/null @@ -1,63 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticExchangerDTorWorEff - - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FF( - C(P(start=219.E5)), - Q0=481.07, - h0=1067.9E3) - annotation (Placement(transformation(extent={{-60,-20},{-40,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FF( - P0=217.68E5) - annotation (Placement(transformation(extent={{20,-20},{40,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWaterSteam_FC( - C(P(start=24E5)), - Q0=23.377, - h0=3420.3E3) - annotation (Placement(transformation( - origin={-30,30}, - extent={{10,-10},{-10,10}}, - rotation=180))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkWaterSteam_FC( - P0=24.13E5) - annotation (Placement(transformation(extent={{-2,20},{20,40}}, rotation=0))); - ThermoSysPro.Fluid.HeatExchangers.StaticExchangerDTorWorEff - exchangerWaterSteamDTorWorEFF( - EffEch=1, - Kf=597.832, - Ec(P(start=23e5)), - Ef(P(start=219E5)), - exchanger_type=3) annotation (Placement(transformation(extent={{-20,-20}, - {0,0}}, rotation=0))); -equation - connect(sourceWaterSteam_FF.C, exchangerWaterSteamDTorWorEFF.Ef) - annotation (Line(points={{-40,-10},{-20,-10}}, color={0,0,255})); - connect(exchangerWaterSteamDTorWorEFF.Sf, sinkWaterSteam_FF.C) annotation (Line( - points={{0,-9.9},{10.2,-9.9},{10.2,-10},{20,-10}}, color={0,0,255})); - connect(sourceWaterSteam_FC.C, exchangerWaterSteamDTorWorEFF.Ec) annotation (Line( - points={{-20,30},{-14,30},{-14,-5.9}}, color={0,0,255})); - connect(exchangerWaterSteamDTorWorEFF.Sc, sinkWaterSteam_FC.C) annotation (Line( - points={{-6,-5.9},{-6,30},{-2,30}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticExchangerDTorWorEff; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo deleted file mode 100644 index a36c0d45..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticExchangerKS.mo +++ /dev/null @@ -1,53 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticExchangerKS - - ThermoSysPro.Fluid.HeatExchangers.StaticExchangerKS - plateHeatExchanger(region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1) - annotation (Placement(transformation(extent={{-20,34},{20,66}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - T0=340) - annotation (Placement(transformation(extent={{-80,20},{-60,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3 - annotation (Placement(transformation(extent={{-80,60},{-60,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2 - annotation (Placement(transformation( - extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP3 - annotation (Placement(transformation( - extent={{60,60},{80,80}}, rotation=0))); -equation - connect(sourceP2.C, plateHeatExchanger.Ec) - annotation (Line(points={{-60,30},{-40,30},{-40,45.2},{-20,45.2}}, - color={0,0,255})); - connect(sourceP3.C, plateHeatExchanger.Ef) annotation (Line(points={{-60,70}, - {-40,70},{-40,54.8},{-20,54.8}}, color={0,0,0})); - connect(plateHeatExchanger.Sc, puitsP2.C) annotation (Line(points={{20,45.2}, - {26,45.2},{26,46},{40,46},{40,30},{60,30}}, color={0,0,0})); - connect(plateHeatExchanger.Sf, puitsP3.C) annotation (Line(points={{20,54.8}, - {40,54.8},{40,70},{60,70}}, color={0,0,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticExchangerKS; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo deleted file mode 100644 index 23c3c502..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticFan.mo +++ /dev/null @@ -1,223 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticFan - - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ Source_Fumees( - Xso2=0, - Xco2=0.0, - Xh2o=0.006, - Xo2=0.23, - Q0=4, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - P0=130000, - T0=300, - option_temperature=true) - annotation (Placement(transformation(extent={{-210,-24},{-164,24}}, - rotation=0))); - - ThermoSysPro.Fluid.BoundaryConditions.Sink Puits_Fumees - annotation (Placement(transformation( - origin={182,0}, - extent={{10,-10},{-10,10}}, - rotation=180))); - ThermoSysPro.Fluid.Volumes.VolumeATh dynamicExchanger(ftype= - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-68,50},{-48,70}}, rotation=0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( - option_temperature=2, W0={1e4}) - annotation (Placement(transformation(extent={{-48, - 90},{-28,110}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossFlueGases( Q(fixed=false, start=10), K=10) - annotation (Placement(transformation(extent={ - {12,50},{32,70}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossFlueGases1( Q(fixed=false, start= - 11), K=0.01) annotation (Placement(transformation(extent={ - {-108,50},{-88,70}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe( - Starttime=50, - Duration=50, - Initialvalue=1e4, - Finalvalue=2e5) annotation (Placement(transformation(extent={{0,100},{-20, - 120}}, rotation=0))); - ThermoSysPro.Fluid.Machines.StaticFan staticFan( - VRotn=2700, - rm=1, - a2=0, - b1=-1.315, - b2=2.4593, - VRot=2700, - a1=-263.145, - a3=500, - Q(start=2), - Qv(start=1.4), - rho(start=1.4)) - annotation (Placement(transformation(extent={{52,50},{72,70}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.CheckValve - singularPressureLossFlueGases2( Q(fixed=false, start=10)) - annotation (Placement(transformation(extent={ - {92,50},{112,70}}, rotation=0))); - ThermoSysPro.Fluid.Volumes.VolumeATh dynamicExchanger1(ftype= - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-68,-70},{-48,-50}}, rotation= - 0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource1( - option_temperature=2, W0={1e4}) - annotation (Placement(transformation(extent={{-48, - -90},{-28,-110}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossFlueGases3( Q(fixed=false, start=10), K=10) - annotation (Placement(transformation(extent={ - {12,-70},{32,-50}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLossFlueGases4( Q(fixed=false, start= - 11), K=0.01) annotation (Placement(transformation(extent={ - {-108,-70},{-88,-50}}, rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe1( - Starttime=50, - Duration=50, - Initialvalue=1e4, - Finalvalue=2e5) annotation (Placement(transformation(extent={{0,-120},{-20, - -100}}, rotation=0))); - ThermoSysPro.Fluid.Machines.StaticFan staticFan1( - VRotn=2700, - rm=1, - b2=2.4593, - b1=-1.315, - VRot=2700, - a1=-263.145, - a2=0, - a3=500, - Q(start=2), - Qv(start=1.4), - rho(start=1.4)) - annotation (Placement(transformation(extent={{52,-70},{72,-50}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.CheckValve - singularPressureLossFlueGases5( Q(fixed=false, start=10)) - annotation (Placement(transformation(extent={ - {92,-70},{112,-50}}, rotation=0))); - ThermoSysPro.Fluid.Junctions.Mixer2 mixerFlueGases2_1(ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{132,-10},{152,10}}, rotation= - 0))); - ThermoSysPro.Fluid.Volumes.VolumeDTh volume2S( - dynamic_composition_balance=true, ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-148,-10},{-128,10}}, - rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorT temperatureSensor - annotation (Placement(transformation(extent={{-28,58},{-8,78}}, rotation=0))); - ThermoSysPro.Fluid.Sensors.SensorT temperatureSensor1 - annotation (Placement(transformation(extent={{-28,-62},{-8,-42}}, rotation= - 0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Qin( - Starttime=50, - Duration=50, - Initialvalue=4, - Finalvalue=1) annotation (Placement(transformation(extent={{-200,40},{ - -180,60}}, rotation=0))); -equation - connect(singularPressureLossFlueGases.C2, staticFan.C1) annotation (Line( - points={{32,60},{52,60}}, - color={0,0,0}, - thickness=1)); - connect(staticFan.C2, singularPressureLossFlueGases2.C1) annotation (Line( - points={{72,60},{91,60}}, - color={0,0,0}, - thickness=1)); - connect(singularPressureLossFlueGases3.C2, staticFan1.C1) annotation (Line( - points={{32,-60},{52,-60}}, - color={0,0,0}, - thickness=1)); - connect(staticFan1.C2, singularPressureLossFlueGases5.C1) annotation (Line( - points={{72,-60},{91,-60}}, - color={0,0,0}, - thickness=1)); - connect(singularPressureLossFlueGases2.C2, mixerFlueGases2_1.Ce1) annotation (Line( - points={{113,60},{138,60},{138,10}}, - color={0,0,0}, - thickness=1)); - connect(singularPressureLossFlueGases5.C2, mixerFlueGases2_1.Ce2) annotation (Line( - points={{113,-60},{138,-60},{138,-10}}, - color={0,0,0}, - thickness=1)); - connect(temperatureSensor1.C2, singularPressureLossFlueGases3.C1) annotation (Line( - points={{-7.8,-60},{12,-60}}, - color={0,0,0}, - thickness=1)); - connect(temperatureSensor.C2, singularPressureLossFlueGases.C1) annotation (Line( - points={{-7.8,60},{12,60}}, - color={0,0,0}, - thickness=1)); - connect(Source_Fumees.C, volume2S.Ce) annotation (Line( - points={{-164,0},{-148,0}}, - color={0,0,0}, - thickness=1)); - connect(volume2S.Cs1, singularPressureLossFlueGases1.C1) annotation (Line( - points={{-138,10},{-138,60},{-108,60}}, - color={0,0,0}, - thickness=1)); - connect(volume2S.Cs2, singularPressureLossFlueGases4.C1) annotation (Line( - points={{-138,-10},{-138,-60},{-108,-60}}, - color={0,0,0}, - thickness=1)); - connect(heatSource.C[1], dynamicExchanger.Cth) annotation (Line(points={{-38, - 90.2},{-58,60}}, color={191,95,0})); - connect(heatSource1.C[1], dynamicExchanger1.Cth) annotation (Line(points={{ - -38,-90.2},{-58,-60}}, color={191,95,0})); - connect(mixerFlueGases2_1.Cs, Puits_Fumees.C) annotation (Line( - points={{152,0},{162,0},{162,-1.20011e-015},{172,-1.20011e-015}}, - color={0,0,0}, - thickness=1)); - connect(singularPressureLossFlueGases1.C2, dynamicExchanger.Ce1) annotation (Line( - points={{-88,60},{-68,60}}, - color={0,0,0}, - thickness=1, - smooth=Smooth.None)); - connect(dynamicExchanger.Cs1, temperatureSensor.C1) annotation (Line( - points={{-48,60},{-28,60}}, - color={0,0,0}, - thickness=1, - smooth=Smooth.None)); - connect(Qin.y, Source_Fumees.IMassFlow) - annotation (Line(points={{-179,50},{-170,50},{-170,28},{-187,28},{-187,12}})); - connect(singularPressureLossFlueGases4.C2, dynamicExchanger1.Ce1) annotation ( - Line( - points={{-88,-60},{-68,-60}}, - color={0,0,0}, - thickness=1)); - connect(dynamicExchanger1.Cs1, temperatureSensor1.C1) annotation (Line( - points={{-48,-60},{-38,-60},{-28,-60}}, - color={0,0,0}, - thickness=1)); - connect(rampe.y, heatSource.ISignal) - annotation (Line(points={{-21,110},{-38,110},{-38,105}}, color={0,0,255})); - connect(rampe1.y, heatSource1.ISignal) annotation (Line(points={{-21,-110},{ - -38,-110},{-38,-105}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-150},{200,150}}, - initialScale=0.1)), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticFan; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo deleted file mode 100644 index 1deede17..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticPlateHeatExchanger.mo +++ /dev/null @@ -1,55 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticPlateHeatExchanger - - ThermoSysPro.Fluid.HeatExchangers.StaticPlateHeatExchanger - plateHeatExchanger(region_c=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1, - region_f=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_1) - annotation (Placement(transformation(extent={{-20,44},{0,64}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - T0=340) - annotation (Placement(transformation(extent={{-80,44},{-60,64}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP3 - annotation (Placement(transformation(extent={{-60,24},{-40,44}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP2 - annotation (Placement(transformation( - extent={{40,44},{60,64}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP3 - annotation (Placement(transformation( - extent={{20,24},{40,44}}, rotation=0))); -equation - connect(sourceP2.C, plateHeatExchanger.Ec) - annotation (Line(points={{-60,54},{-20,54}}, color={0,0,255})); - connect(sourceP3.C, plateHeatExchanger.Ef) - annotation (Line(points={{-40,34},{ - -15,34},{-15,48}}, color={0,0,255})); - connect(plateHeatExchanger.Sc, puitsP2.C) - annotation (Line(points={{0,54.2},{ - 20,54.2},{20,54},{40,54}}, color={0,0,255})); - connect(plateHeatExchanger.Sf, puitsP3.C) - annotation (Line(points={{-5,48},{-6, - 48},{-6,34},{20,34}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticPlateHeatExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo deleted file mode 100644 index 8f971ba9..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStaticWallFlueGasesExchanger.mo +++ /dev/null @@ -1,68 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStaticWallFlueGasesExchanger - - HeatExchangers.StaticWallFlueGasesExchanger - dynamicOnePhaseFlowPipe( - Q(start={536.5750641592207,536.5750641592207,536.5750641592207, - 536.5750641592207,536.5750641592207,536.5750641592207, - 536.5750641592207,536.5750641592207,536.5750641592207, - 536.5750641592207,536.5750641592207}), - h(start={71016.12237181116,74743.46665892199,78470.81094603281, - 82198.15523314364,85925.49952025448,89652.84380736532, - 93380.18809447614,97107.53238158698,100834.8766686978, - 104562.22095580865,108289.56524291947,70825.9016030344}), - p_rho=998, - P(start={300000,281833.41863537,263664.30473175,245492.47958308, - 227317.76827098,209139.99948382,190959.00534677,172774.621262, - 154586.68575823,136395.04034906,118199.5293995,100000})) - annotation (Placement(transformation(extent={{-20, - 20},{0,40}}, rotation=0))); - BoundaryConditions.SourcePQ sourceP( - option_temperature=true, - Q0=1, - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); - BoundaryConditions.Sink sinkP - annotation (Placement(transformation(extent={{20,20},{40,40}}, rotation=0))); - ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( - T0={273 + 400,273 + 400,273 + 400,273 + 400,273 + 400,273 + 400,273 + 400, - 273 + 400,273 + 400,273 + 400}, - option_temperature=2, - W0={6e4,6e4,6e4,6e4,6e4,6e4,6e4,6e4,6e4,6e4}) - annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0))); - ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall heatExchangerWall(Ns=10, - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-20,40},{0,60}}, rotation=0))); -equation - connect(sourceP.C, dynamicOnePhaseFlowPipe.C1) annotation (Line(points={{-40, - 30},{-20,30}}, color={0,0,255})); - connect(dynamicOnePhaseFlowPipe.C2, sinkP.C) annotation (Line(points={{0,30}, - {20,30}}, color={0,0,255})); - connect(heatSource.C, heatExchangerWall.WT2) annotation (Line(points={{-10, - 60.2},{-10,52}}, color={191,95,0})); - connect(heatExchangerWall.WT1, dynamicOnePhaseFlowPipe.CTh) - annotation (Line(points={{-10,48},{-10,33}}, color={191,95,0})); - annotation (experiment(StopTime=1000), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStaticWallFlueGasesExchanger; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo deleted file mode 100644 index 22da154a..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer1.mo +++ /dev/null @@ -1,62 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSteamDryer1 - - ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer( - eta=1, - h(start=3e6), - P(start=10000000)) - annotation (Placement(transformation(extent={{-20,20},{0,40}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(h0=3000000) - annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2 annotation (Placement(transformation(extent={{-60,20}, - {-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(P0=100e5) - annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{20,20}, - {40,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=2.e-3) - annotation (Placement(transformation(extent={{0,-20}, - {20,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink - annotation (Placement(transformation(extent={{40,-20},{60,0}}, rotation=0))); -equation - connect(sourceQ.C,singularPressureLoss2. C1) annotation (Line(points={{-80,30}, - {-60,30}}, color={0,0,255})); - connect(singularPressureLoss1.C2,sinkP. C) - annotation (Line(points={{40,30},{60,30}}, color={0,0,255})); - connect(singularPressureLoss3.C2,sink. C) - annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255})); - connect(singularPressureLoss2.C2, steamDryer.Cev) annotation (Line(points={{ - -40,30},{-30,30},{-30,34},{-19.9,34}}, color={0,0,255})); - connect(steamDryer.Csv, singularPressureLoss1.C1) annotation (Line(points={{ - -0.1,34},{10,34},{10,30},{20,30}}, color={0,0,255})); - connect(steamDryer.Csl, singularPressureLoss3.C1) annotation (Line(points={{ - -9.9,20},{-10,20},{-10,-10},{0,-10}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSteamDryer1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo deleted file mode 100644 index 00593ee7..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamDryer2.mo +++ /dev/null @@ -1,62 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSteamDryer2 - - ThermoSysPro.Fluid.Junctions.SteamDryer steamDryer(eta=0.9, P(start= - 10000000)) annotation (Placement(transformation(extent={{-10,-8},{10, - 12}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourceQ(P0=10000000, h0= - 2400000) - annotation (Placement(transformation(extent={{-90,-4},{-70,16}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2 annotation (Placement(transformation(extent={{-50,-4}, - {-30,16}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sinkP - annotation (Placement(transformation(extent={{70,-4},{90,16}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{30,-4}, - {50,16}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=1.e-4) - annotation (Placement(transformation(extent={{30,-44}, - {50,-24}}, - rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.Sink sink - annotation (Placement(transformation(extent={{70,-44},{90,-24}}, - rotation=0))); -equation - connect(sourceQ.C,singularPressureLoss2. C1) annotation (Line(points={{-70,6}, - {-50,6}}, color={0,0,255})); - connect(singularPressureLoss1.C2,sinkP. C) - annotation (Line(points={{50,6},{70,6}}, color={0,0,255})); - connect(singularPressureLoss3.C2,sink. C) - annotation (Line(points={{50,-34},{70,-34}}, color={0,0,255})); - connect(singularPressureLoss2.C2, steamDryer.Cev) annotation (Line(points={{-30,6}, - {-20,6},{-9.9,6}}, color={0,0,255})); - connect(steamDryer.Csv, singularPressureLoss1.C1) annotation (Line(points={{9.9,6}, - {20,6},{30,6}}, color={0,0,255})); - connect(steamDryer.Csl, singularPressureLoss3.C1) annotation (Line(points={{0.1,-8}, - {0,-8},{0,-34},{30,-34}}, color={0,0,255})); - annotation (experiment(StopTime=10), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSteamDryer2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo deleted file mode 100644 index 92d0af3c..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamEngine.mo +++ /dev/null @@ -1,51 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSteamEngine - - ThermoSysPro.Fluid.Machines.SteamEngine steamEngine1 - annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(P0=100000) - annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - h0=3.e6, - option_temperature=false, - P0=16e5) annotation (Placement(transformation(extent={{-100,60},{-80,80}}, - rotation=0))); -equation - connect(sourceP.C, steamEngine1.C1) - annotation (Line(points={{-80,70},{-57,70}}, color={0,0,255})); - connect(steamEngine1.C2, puitsP.C) - annotation (Line(points={{-43,70},{-31.5,70},{-31.5,70},{-20,70}}, color={0, - 0,255})); - annotation (experiment(StopTime=1000), - Window( - x=0.32, - y=0.02, - width=0.39, - height=0.47), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSteamEngine; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo deleted file mode 100644 index a80faebc..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSteamExtractionSplitter.mo +++ /dev/null @@ -1,61 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSteamExtractionSplitter - - ThermoSysPro.Fluid.Junctions.SteamExtractionSplitter - steamExtractionSplitter(alpha=0.9) - annotation (Placement(transformation(extent={{-20, - 20},{0,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(h0=2600000) - annotation (Placement(transformation(extent={{-100,20},{-80,40}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss2 annotation (Placement(transformation(extent={{-60,20}, - {-40,40}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(P0=100e5) - annotation (Placement(transformation(extent={{60,20},{80,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss1 annotation (Placement(transformation(extent={{20,20}, - {40,40}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss - singularPressureLoss3(K=2.e-3) - annotation (Placement(transformation(extent={{0,-20}, - {20,0}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkQ sink(Q0=10) - annotation (Placement(transformation(extent={{40,-20},{60,0}}, rotation=0))); -equation - connect(sourceQ.C, singularPressureLoss2.C1) annotation (Line(points={{-80,30}, - {-60,30}}, color={0,0,255})); - connect(singularPressureLoss2.C2, steamExtractionSplitter.Ce) annotation (Line( - points={{-40,30},{-20.3,30}}, color={0,0,255})); - connect(steamExtractionSplitter.Cs, singularPressureLoss1.C1) annotation (Line( - points={{0.3,30},{20,30}}, color={0,0,255})); - connect(steamExtractionSplitter.Cex, singularPressureLoss3.C1) annotation (Line( - points={{-6,20},{-6,-10},{0,-10}}, color={0,0,255})); - connect(singularPressureLoss1.C2, sinkP.C) - annotation (Line(points={{40,30},{60,30}}, color={0,0,255})); - connect(singularPressureLoss3.C2, sink.C) - annotation (Line(points={{20,-10},{40,-10}}, color={0,0,255})); - annotation (experiment(StopTime=1000), Diagram(graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSteamExtractionSplitter; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo deleted file mode 100644 index e1c0bdb3..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine1.mo +++ /dev/null @@ -1,92 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStodolaTurbine1 - parameter Units.SI.AbsolutePressure PoutPump(fixed=false, start=13e5) - "Flow pressure at the outlet of the pump"; - ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(pros1(x(start= - 1)), Hrs(start=2931e3), - pros(d(start=19.715136086827403)), - Ce(h(start=3000000.0)), - proe(T(start=613.0), x(start=1.0))) - annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(P0=45e5, - C(h_vol_1(start=75002))) - annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - h0=3.e6, - option_temperature=false, - P0=6500000, - region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_2) - annotation (Placement(transformation(extent={{-100,60},{-80,80}}, - rotation=0))); - ThermoSysPro.Fluid.Machines.CentrifugalPump - DynamicCentrifugalPump1( - Q(fixed=true, start=50), - Qv(start=23.0), - Pm(start=1158163.6), - h(start=3041170.0441966015), - C1(P(start=10e5)), - C2(P(start=3.e6), h(start=3082340.088393203)), - hn(start=7119.0), - w_a(start=20.0)) - annotation (Placement(transformation(extent={{20,-40},{40,-20}}, rotation=0))); - ThermoSysPro.ElectroMechanics.Machines.Shaft Shaft1 - annotation (Placement(transformation(extent={{-20,-90},{0,-70}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP1(P0=13e5) - annotation (Placement(transformation(extent={{60,-40},{80,-20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - h0=3.e6, - option_temperature=false, - P0=1000000, - region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_2) - annotation (Placement(transformation(extent={{-20,-40},{0,-20}}, - rotation=0))); - InstrumentationAndControl.Blocks.Sources.Constante Pout(k=PoutPump) - annotation (Placement(transformation(extent={{56,-12},{68,0}}, rotation=0))); -equation - connect(Shaft1.C2, DynamicCentrifugalPump1.M) - annotation (Line(points={{1,-80},{30,-80},{30,-41}})); - connect(stodolaTurbine.M, Shaft1.C1) - annotation (Line(points={{-50,60},{-50,-80},{-21,-80}})); - connect(sourceP1.C, DynamicCentrifugalPump1.C1) - annotation (Line(points={{0,-30},{20,-30}}, color={0,0,255})); - connect(DynamicCentrifugalPump1.C2, puitsP1.C) annotation (Line(points={{40,-30}, - {50,-30},{50,-30},{60,-30}}, color={0,0,255})); - connect(sourceP.C, stodolaTurbine.Ce) - annotation (Line(points={{-80,70},{-60.1,70}}, color={0,0,255})); - connect(stodolaTurbine.Cs, puitsP.C) - annotation (Line(points={{-39.9,70},{-20,70}}, color={0,0,255})); - connect(Pout.y, puitsP1.IPressure) - annotation (Line(points={{68.6,-6},{88,-6},{88,-30},{75,-30}})); - annotation (experiment(StopTime=1000), - Window( - x=0.32, - y=0.02, - width=0.39, - height=0.47), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStodolaTurbine1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo deleted file mode 100644 index 79bba323..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestStodolaTurbine2.mo +++ /dev/null @@ -1,53 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestStodolaTurbine2 - - ThermoSysPro.Fluid.Machines.StodolaTurbine stodolaTurbine(Ce(h(start= - 3000000.0))) - annotation (Placement(transformation(extent={{-60,60},{-40,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP puitsP(P0=5000) - annotation (Placement(transformation(extent={{-20,60},{0,80}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - h0=3.e6, - option_temperature=false, - P0=300000, - region=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region.Region_2) - annotation (Placement(transformation(extent={{-100,60},{-80,80}}, - rotation=0))); -equation - connect(sourceP.C, stodolaTurbine.Ce) - annotation (Line(points={{-80,70},{-60.1,70}}, color={0,0,255})); - connect(stodolaTurbine.Cs, puitsP.C) - annotation (Line(points={{-39.9,70},{-20,70}}, color={0,0,255})); - annotation (experiment(StopTime=1000), - Window( - x=0.32, - y=0.02, - width=0.39, - height=0.47), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2}), graphics), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestStodolaTurbine2; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo deleted file mode 100644 index d36a372d..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestSwitchValve.mo +++ /dev/null @@ -1,67 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestSwitchValve - - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement(transformation(extent={{-100,-10},{-80,10}},rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{80,-10},{100,10}}, - rotation=0))); - ThermoSysPro.Fluid.PressureLosses.SwitchValve SwitchValve - annotation (Placement(transformation( - extent={{-10,-4},{10,16}},rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Logique.Pulse pulse( - width=10, period=20) - annotation (Placement(transformation(extent={{-60,50},{-40,70}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP2 - annotation (Placement(transformation( - extent={{-60,-10},{-39,10}},rotation=0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe perteDP1 - annotation (Placement(transformation( - extent={{40,-10},{60,10}},rotation=0))); -equation - connect(pulse.yL, SwitchValve.Ouv) annotation (Line(points={{-39,60},{0,60},{ - 0,13.2}})); - connect(SourceP1.C, perteDP2.C1) - annotation (Line(points={{-80,0},{-60,0}}, color={0,0,255})); - connect(perteDP2.C2, SwitchValve.C1) annotation (Line(points={{-39,0},{-10,0}}, - color={0,0,255})); - connect(SwitchValve.C2, perteDP1.C1) annotation (Line(points={{10,0},{40,0}}, - color={0,0,255})); - connect(perteDP1.C2, PuitsP1.C) - annotation (Line(points={{60,0},{80,0}}, color={0,0,255})); - annotation (experiment(StopTime=100), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), - Diagram(graphics, - coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestSwitchValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo deleted file mode 100644 index 75adcf07..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTank.mo +++ /dev/null @@ -1,67 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestTank - - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP1(C1(P(start= - 400000.0)), Q(start=600.0)) - annotation (Placement(transformation(extent={{30,-50},{50,-30}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1(Pm(start= - 200000.0), Q(start=0.0)) - annotation (Placement(transformation(extent={{-50,2},{-30,22}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement( - transformation(extent={{-90,-4},{-70,16}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{70,-50},{90,-30}}, rotation=0))); - ThermoSysPro.Fluid.Volumes.Tank Tank1(z(fixed=false, start=5), Cs1(Q(start= - 0.0)), - steady_state=true) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1 - annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP2 - annotation (Placement(transformation(extent={{30,-4},{50,16}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2 - annotation (Placement(transformation( - extent={{70,-4},{90,16}}, rotation=0))); -equation - connect(PerteDP1.C2, PuitsP1.C) - annotation (Line(points={{50,-40},{70,-40}}, color={0,0,255})); - connect(SourceP1.C, VanneReglante1.C1) - annotation (Line(points={{-70,6},{-50,6}}, color={0,0,255})); - connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{10,-6},{20,-6},{20, - -40},{30,-40}}, color={0,0,255})); - connect(Rampe1.y, VanneReglante1.Ouv) - annotation (Line(points={{-69,40},{-40,40},{-40,23}})); - connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,6},{-20,6}, - {-10,6}}, color={0,0,255})); - connect(Tank1.Cs1, PerteDP2.C1) - annotation (Line(points={{10.2,6},{20,6},{30,6}}, color={0,0,255})); - connect(PerteDP2.C2, PuitsP2.C) - annotation (Line(points={{50,6},{50,6},{70,6}}, color={0,0,255})); - annotation (experiment(StopTime=20), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestTank; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo deleted file mode 100644 index 67788b89..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTankHorizontal.mo +++ /dev/null @@ -1,69 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestTankHorizontal - - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP1(C1(P(start= - 400000.0)), Q(start=600.0)) - annotation (Placement(transformation(extent={{32,-20},{52,0}}, rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1(Pm(start= - 200000.0), Q(start=0.0)) - annotation (Placement(transformation(extent={{-50,6},{-30,26}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement( - transformation(extent={{-90,0},{-70,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{70,-20},{90,0}}, rotation=0))); - Volumes.TankHorizontal Tank1(z(fixed=false, start=5), Cs1(Q(start= - 0.0)), - diffusion=true, - dynamic_mass_balance=true) - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1 - annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation= - 0))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe PerteDP2 - annotation (Placement(transformation(extent={{32,0},{52,20}}, rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2 - annotation (Placement(transformation( - extent={{70,0},{90,20}}, rotation=0))); -equation - connect(PerteDP1.C2, PuitsP1.C) - annotation (Line(points={{52,-10},{70,-10}}, color={0,0,255})); - connect(SourceP1.C, VanneReglante1.C1) - annotation (Line(points={{-70,10},{-50,10}}, color={0,0,255})); - connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{20,-10},{32,-10}}, - color={0,0,255})); - connect(Rampe1.y, VanneReglante1.Ouv) - annotation (Line(points={{-69,40},{-40,40},{-40,27}})); - connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,10},{-20, - 10}}, color={0,0,255})); - connect(Tank1.Cs1, PerteDP2.C1) - annotation (Line(points={{20.4,9.8},{20.4,10},{32,10}}, - color={0,0,255})); - connect(PerteDP2.C2, PuitsP2.C) - annotation (Line(points={{52,10},{70,10}}, color={0,0,255})); - annotation (experiment(StopTime=20), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestTankHorizontal; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo deleted file mode 100644 index f473116f..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestThreeWayValve.mo +++ /dev/null @@ -1,64 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestThreeWayValve - - ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1 - annotation (Placement(transformation(extent={{-90,-10},{-70,10}}, rotation= - 0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1 - annotation (Placement(transformation( - extent={{70,-10},{90,10}},rotation=0))); - ThermoSysPro.Fluid.PressureLosses.ThreeWayValve threeWayValve( - C2(Q(start=-7.902947109890763E-33)), - C3(Q(start=2716.4138702433384)), - Valve1(Pm(start=200000.0)), - VolumeA1(h(start=71016.12237181117))) - annotation (Placement(transformation(extent={{-10,-6},{10,14}},rotation=0))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2 - annotation (Placement(transformation( - extent={{70,-50},{90,-30}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe rampe - annotation (Placement(transformation( - extent={{-50,30},{-30,50}}, rotation=0))); -equation - connect(rampe.y, threeWayValve.Ouv) - annotation (Line(points={{-29,40},{0,40},{0,15}})); - connect(SourceP1.C, threeWayValve.C1) - annotation (Line(points={{-70,0},{-10,0}}, color={0,0,0})); - connect(threeWayValve.C2, PuitsP1.C) - annotation (Line(points={{10,0},{70,0}}, color={0,0,0})); - connect(threeWayValve.C3, PuitsP2.C) - annotation (Line(points={{0,-6},{0,-40},{70,-40}}, color={0,0,0})); - annotation (experiment(StopTime=5), - Window( - x=0.45, - y=0.01, - width=0.35, - height=0.49), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-100,-100},{100,100}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestThreeWayValve; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo deleted file mode 100644 index 094b27d6..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavity.mo +++ /dev/null @@ -1,116 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestTwoPhaseCavity - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater=670 - "Maximum CV (active if mode_caract=0)"; - PressureLosses.ControlValve feedwaterValve( - Cv(start=335), - C1( - h_vol_1(start=1400e3), - h(start=1400e3), - P(start=13300000), - h_vol_2(start=1975433.4222685455)), - rho(start=888), - h(start=1400000), - Cvmax=CvmaxWater, - Q(start=10), - Pm(start=13200000.029884)) - annotation (Placement(transformation(extent={{-98,96},{-78, - 116}}, rotation=0))); - PressureLosses.ControlValve steamValve( - Cv(start=25000), - Q(start=0.0), - rho(start=78.5), - h(start=2657930), - C1(h_vol_2(start=2655313.7785675577)), - Cvmax(fixed=false), - Pm(start=12998726.577779)) - annotation (Placement(transformation(extent={{-60,136},{-40,156}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon(k=0.5) - annotation (Placement(transformation(extent={{-138,120},{-118,140}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon1(k=0.5) - annotation (Placement(transformation(extent={{-100,160},{-80,180}}, - rotation=0))); - BoundaryConditions.SourceP sourceP(h0=1400000, - option_temperature=false, - P0=13200000) - annotation (Placement(transformation(extent={{-138,90},{-118,110}}, - rotation=0))); - BoundaryConditions.SinkP sinkQ(P0=13200000, Q(start= - 51.00572315373906)) - annotation (Placement(transformation(extent={{0,-60},{20,-40}}, rotation=0))); - Volumes.TwoPhaseCavity twoPhaseVolume( - Vv(start=0.5, fixed=true), - diffusion=true, - dynamic_energy_balance=false, - P0=13200000, - Pfond(start=13200000)) - annotation (Placement(transformation(extent={{-60,20},{20,100}}))); - PressureLosses.LumpedStraightPipe lumpedStraightPipe annotation (Placement( - transformation( - extent={{10,-10},{-10,10}}, - rotation=90, - origin={-20,-10}))); - BoundaryConditions.SourceP sourceP1( - P0(fixed=true) = 13200000, - option_temperature=false, - h0=2600000) - annotation (Placement(transformation(extent={{-100,130},{-80,150}}, - rotation=0))); -equation - connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv) - annotation (Line(points={{-117,130},{-88,130},{-88,117}}, smooth=Smooth.None)); - connect(sourceP.C,feedwaterValve. C1) annotation (Line( - points={{-118,100},{-98,100}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(ConsigneNiveauBallon1.y,steamValve. Ouv) - annotation (Line(points={{-79,170},{-50,170},{-50,157}}, - smooth=Smooth.None)); - connect(lumpedStraightPipe.C2, sinkQ.C) - annotation (Line(points={{-20,-20},{-20,-50},{0,-50}}, color={0,0,0})); - connect(sourceP1.C, steamValve.C1) - annotation (Line(points={{-80,140},{-60,140}}, color={0,0,0})); - connect(twoPhaseVolume.Cl, lumpedStraightPipe.C1) annotation (Line(points={{ - -19.5556,30.6667},{-19.5556,15.3333},{-20,15.3333},{-20,0}}, color={0, - 0,0})); - connect(steamValve.C2, twoPhaseVolume.Cv) annotation (Line(points={{-40,140}, - {-19.5556,140},{-19.5556,89.3333}}, color={0,0,0})); - connect(feedwaterValve.C2, twoPhaseVolume.Ce) annotation (Line(points={{-78,100}, - {-35.5556,100},{-35.5556,89.3333}}, color={0,0,0})); - annotation (experiment(__Dymola_Algorithm="Dassl"), - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-100},{140,200}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestTwoPhaseCavity; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo deleted file mode 100644 index a70d61b5..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseCavityOnePipe.mo +++ /dev/null @@ -1,122 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestTwoPhaseCavityOnePipe - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater=670 - "Maximum CV (active if mode_caract=0)"; - PressureLosses.ControlValve feedwaterValve( - Cv(start=335), - C1( - h_vol_1(start=1400e3), - h(start=1400e3), - P(start=13300000), - h_vol_2(start=1399988.8233534198)), - rho(start=888), - h(start=1400000), - Cvmax=CvmaxWater, - Q(start=58.005768798668484), - Pm(start=13146647.912081594)) - annotation (Placement(transformation(extent={{-98,96},{-78, - 116}}, rotation=0))); - PressureLosses.ControlValve steamValve( - Cv(start=25000), - Q(start=6.303270420619601E-10), - rho(start=78.5), - h(start=2657930), - C1(h_vol_2(start=2658519.5634182408)), - Cvmax(fixed=false), - Pm(start=12998726.577779)) - annotation (Placement(transformation(extent={{-60,136},{-40,156}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon(k=0.5) - annotation (Placement(transformation(extent={{-138,120},{-118,140}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon1(k=0.5) - annotation (Placement(transformation(extent={{-100,160},{-80,180}}, - rotation=0))); - BoundaryConditions.SourceP sourceP(h0=1400000, - option_temperature=false, - P0=13200000) - annotation (Placement(transformation(extent={{-138,90},{-118,110}}, - rotation=0))); - BoundaryConditions.SinkP sinkQ(P0=13200000, Q(start= - 51.00572315373906)) - annotation (Placement(transformation(extent={{0,-60},{20,-40}}, rotation=0))); - Volumes.TwoPhaseCavityOnePipe - twoPhaseVolume( - Vv(start=0.5, fixed=true), - diffusion=true, - hl(start=1400000.0), - hv(start=2410000.0), - Cal_hcond=false, - dynamic_energy_balance=false, - P0=13200000, - Pfond(start=13203663.545897305), - Tp(start=583.6846968972088), - hvIn(start=2400966.7047930923)) - annotation (Placement(transformation(extent={{-60,20},{20,100}}))); - PressureLosses.LumpedStraightPipe lumpedStraightPipe annotation (Placement( - transformation( - extent={{10,-10},{-10,10}}, - rotation=90, - origin={-20,-10}))); - BoundaryConditions.SourceP sourceP1( - P0(fixed=true) = 13200000, - option_temperature=false, - h0=2600000) - annotation (Placement(transformation(extent={{-100,130},{-80,150}}, - rotation=0))); -equation - connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv) - annotation (Line(points={{-117,130},{-88,130},{-88,117}}, smooth=Smooth.None)); - connect(sourceP.C,feedwaterValve. C1) annotation (Line( - points={{-118,100},{-98,100}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(ConsigneNiveauBallon1.y,steamValve. Ouv) - annotation (Line(points={{-79,170},{-50,170},{-50,157}}, - smooth=Smooth.None)); - connect(lumpedStraightPipe.C2, sinkQ.C) - annotation (Line(points={{-20,-20},{-20,-50},{0,-50}}, color={0,0,0})); - connect(sourceP1.C, steamValve.C1) - annotation (Line(points={{-80,140},{-60,140}}, color={0,0,0})); - connect(twoPhaseVolume.Cl, lumpedStraightPipe.C1) annotation (Line(points={{-20, - 30.6667},{-20,15.3333},{-20,15.3333},{-20,0}}, color={0, - 0,0})); - connect(feedwaterValve.C2, twoPhaseVolume.Ce) annotation (Line(points={{-78,100}, - {-50.6286,100},{-50.6286,81.0667}}, color={0,0,0})); - connect(steamValve.C2, twoPhaseVolume.CvBP) annotation (Line(points={{-40,140}, - {-20.2286,140},{-20.2286,89.3333}}, color={0,0,0})); - annotation (experiment(__Dymola_Algorithm="Dassl"), - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-100},{140,200}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestTwoPhaseCavityOnePipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo deleted file mode 100644 index 15f1f896..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestTwoPhaseVolume.mo +++ /dev/null @@ -1,116 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestTwoPhaseVolume - parameter ThermoSysPro.Units.xSI.Cv CvmaxWater=670 - "Maximum CV (active if mode_caract=0)"; - PressureLosses.ControlValve feedwaterValve( - Cv(start=335), - C1( - h_vol_1(start=1400e3), - h(start=1400e3), - P(start=13300000), - h_vol_2(start=1975433.4222685455)), - rho(start=888), - h(start=1400000), - Cvmax=CvmaxWater, - Q(start=10), - Pm(start=13200000.029884)) - annotation (Placement(transformation(extent={{-120,76},{ - -100,96}}, rotation=0))); - PressureLosses.ControlValve steamValve( - Cv(start=25000), - Q(start=0.0), - rho(start=78.5), - h(start=2657930), - C1(h_vol_2(start=2655313.7785675577)), - Cvmax(fixed=false), - Pm(start=12998726.577779)) - annotation (Placement(transformation(extent={{-120,136},{-100,156}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon(k=0.5) - annotation (Placement(transformation(extent={{-160,100},{-140,120}}, - rotation=0))); - ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Constante - ConsigneNiveauBallon1(k=0.5) - annotation (Placement(transformation(extent={{-160,160},{-140,180}}, - rotation=0))); - BoundaryConditions.SourceP sourceP(h0=1400000, - option_temperature=false, - P0=13200000) - annotation (Placement(transformation(extent={{-200,70},{-180,90}}, - rotation=0))); - BoundaryConditions.SinkP sinkQ(P0=13200000, Q(start= - 51.00572315373906)) - annotation (Placement(transformation(extent={{-38,-40},{-18,-20}}, - rotation=0))); - Volumes.TwoPhaseVolume twoPhaseVolume(diffusion=true, - steady_state=true, - Vv(start=0.5, fixed=true), - dynamic_energy_balance=true, - P0=13200000, - Pfond(start=13200000)) - annotation (Placement(transformation(extent={{-80,50},{-20,110}}))); - PressureLosses.LumpedStraightPipe lumpedStraightPipe annotation (Placement( - transformation( - extent={{10,-10},{-10,10}}, - rotation=90, - origin={-50,10}))); - BoundaryConditions.SourceP sourceP1( - P0(fixed=true) = 13200000, - option_temperature=false, - h0=2600000) - annotation (Placement(transformation(extent={{-200,130},{-180,150}}, - rotation=0))); -equation - connect(ConsigneNiveauBallon.y,feedwaterValve. Ouv) - annotation (Line(points={{-139,110},{-110,110},{-110,97}}, smooth=Smooth.None)); - connect(sourceP.C,feedwaterValve. C1) annotation (Line( - points={{-180,80},{-120,80}}, - color={0,0,255}, - smooth=Smooth.None)); - connect(ConsigneNiveauBallon1.y,steamValve. Ouv) - annotation (Line(points={{-139,170},{-110,170},{-110,157}}, - smooth=Smooth.None)); - connect(feedwaterValve.C2, twoPhaseVolume.Ce) - annotation (Line(points={{-100,80},{-80,80}}, color={0,0,0})); - connect(lumpedStraightPipe.C2, sinkQ.C) - annotation (Line(points={{-50,0},{-50,-30},{-38,-30}}, color={0,0,0})); - connect(sourceP1.C, steamValve.C1) - annotation (Line(points={{-180,140},{-120,140}}, color={0,0,0})); - connect(steamValve.C2, twoPhaseVolume.Cv) - annotation (Line(points={{-100,140},{-50,140},{-50,110}}, color={0,0,0})); - connect(twoPhaseVolume.Cl, lumpedStraightPipe.C1) - annotation (Line(points={{-50,50},{-50,20}}, color={0,0,0})); - annotation (experiment(__Dymola_Algorithm="Dassl"), - Window( - x=0.43, - y=0, - width=0.57, - height=0.63), - Diagram(coordinateSystem( - preserveAspectRatio=false, - extent={{-200,-100},{140,200}}, - grid={2,2})), - Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestTwoPhaseVolume; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo deleted file mode 100644 index e7d070a4..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA.mo +++ /dev/null @@ -1,112 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestVolumeA - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - continuous_flow_reversal=true, - T0=288.15, - diffusion=true, - C(h_vol_2(start=63269.22110794238))) - annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( - Q(start=356.3142593657128), - P0=300000, - T0=369.15, - diffusion=true) - annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - ThermoSysPro.Fluid.Volumes.VolumeA volumeA( - dynamic_composition_balance=false, - steady_state=true, - V=1.e-6, - Ce2(Q(start=-4.6367791499652465E-36)), - continuous_flow_reversal=true, - dynamic_mass_balance=false, - dynamic_energy_balance=false, - diffusion=true, - P(start=200002.5108577)) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - - InstrumentationAndControl.Blocks.Sources.Rampe rampe( - Duration=10, - Initialvalue=1e5, - Finalvalue=5e5) - annotation (Placement(transformation(extent={{60,-40},{80,-20}}))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe1(gamma_diff( - start=4.4340701734837724E-07)) - annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe3( - gamma_diff(start=4.4336099270975624E-07)) - annotation (Placement(transformation(extent={{50,-10},{70,10}}))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe2(inertia= - false) - annotation (Placement(transformation(extent={{-70,40},{-50,60}}))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - continuous_flow_reversal=false, - T0=288.15, - diffusion=true) - annotation (Placement(transformation(extent={{-100,40},{-80,60}}))); - - PressureLosses.ControlValve controlValve1(Pm(start=201722.05301761828)) - annotation (Placement(transformation(extent={{-40,-4},{-20,16}}))); - PressureLosses.ControlValve controlValve2(C2(Q(start=0)), Pm(start= - 250001.25542885027)) - annotation (Placement(transformation(extent={{-40,46},{-20,66}}))); - PressureLosses.ControlValve controlValve3(Pm(start=198282.96276544)) - annotation (Placement(transformation(extent={{20,-4},{40,16}}))); - InstrumentationAndControl.Blocks.Sources.Constante constante1(k=1) - annotation (Placement(transformation(extent={{-56,24},{-44,36}}))); - InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0) - annotation (Placement(transformation(extent={{-56,74},{-44,86}}))); - InstrumentationAndControl.Blocks.Sources.Constante constante3 - annotation (Placement(transformation(extent={{4,22},{16,34}}))); -equation - connect(rampe.y, sinkP.IPressure) annotation (Line(points={{81,-30},{100,-30}, - {100,0},{95,0}}, color={0,0,255})); - connect(sourceP1.C, lumpedStraightPipe1.C1) - annotation (Line(points={{-80,0},{-70,0}}, color={0,0,0})); - connect(lumpedStraightPipe3.C2, sinkP.C) - annotation (Line(points={{70,0},{80,0}}, color={0,0,0})); - connect(sourceP2.C, lumpedStraightPipe2.C1) - annotation (Line(points={{-80,50},{-70,50}}, color={0,0,0})); - connect(lumpedStraightPipe1.C2, controlValve1.C1) - annotation (Line(points={{-50,0},{-40,0}}, color={0,0,0})); - connect(lumpedStraightPipe2.C2, controlValve2.C1) - annotation (Line(points={{-50,50},{-40,50}}, color={0,0,0})); - connect(controlValve2.C2, volumeA.Ce2) - annotation (Line(points={{-20,50},{0,50},{0,10}}, color={0,0,0})); - connect(volumeA.Cs1, controlValve3.C1) - annotation (Line(points={{10,0},{20,0}}, color={0,0,0})); - connect(controlValve3.C2, lumpedStraightPipe3.C1) - annotation (Line(points={{40,0},{50,0}}, color={0,0,0})); - connect(constante1.y, controlValve1.Ouv) - annotation (Line(points={{-43.4,30},{-30,30},{-30,17}}, color={0,0,255})); - connect(constante2.y, controlValve2.Ouv) - annotation (Line(points={{-43.4,80},{-30,80},{-30,67}}, color={0,0,255})); - connect(constante3.y, controlValve3.Ouv) - annotation (Line(points={{16.6,28},{30,28},{30,17}}, color={0,0,255})); - connect(volumeA.Ce1, controlValve1.C2) - annotation (Line(points={{-10,0},{-20,0}}, color={0,0,255})); - annotation (Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - experiment(StopTime=12), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestVolumeA; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo deleted file mode 100644 index 94c923e8..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeA1.mo +++ /dev/null @@ -1,78 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestVolumeA1 - - ThermoSysPro.Fluid.Volumes.VolumeA volumeA(ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - Ce2(Q(start=5381683.17323685)), - Cs1(Q(start=5381683.173236847)), - Cs2(Q(start=5381683.173236847)), - Xo2(start=0.22), - h(start=999999.9999999997), - dynamic_energy_balance=false) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss(rho(start= - 164.8075648419657)) - annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss1 - annotation (Placement(transformation(extent={{-60,-40},{-40,-20}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss2 - annotation (Placement(transformation(extent={{40,20},{60,40}}))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss singularPressureLoss3 - annotation (Placement(transformation(extent={{40,-40},{60,-20}}))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - option_temperature=false, - h0=1e6, - P0=600e5) - annotation (Placement(transformation(extent={{-100,20},{-80,40}}))); - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - ftype=ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType.FlueGases, - T0=1000, - option_temperature=false, - h0=1e6, - P0=600e5) - annotation (Placement(transformation(extent={{-100,-40},{-80,-20}}))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP(option_temperature=false) - annotation (Placement(transformation(extent={{80,20},{100,40}}))); - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP1(option_temperature=false) - annotation (Placement(transformation(extent={{80,-40},{100,-20}}))); -equation - connect(singularPressureLoss.C2, volumeA.Ce2) - annotation (Line(points={{-40,30},{0,30},{0,10}}, color={0,0,0})); - connect(singularPressureLoss1.C2, volumeA.Ce1) annotation (Line(points={{-40, - -30},{-20,-30},{-20,0},{-10,0}}, color={0,0,0})); - connect(volumeA.Cs1, singularPressureLoss2.C1) annotation (Line(points={{10,0}, - {10,0},{20,0},{20,30},{40,30},{40,30}}, color={0,0,0})); - connect(volumeA.Cs2, singularPressureLoss3.C1) annotation (Line(points={{0, - -10},{0,-10},{0,-30},{40,-30},{40,-30}}, color={0,0,0})); - connect(sourceP.C, singularPressureLoss.C1) - annotation (Line(points={{-80,30},{-60,30}}, color={0,0,0})); - connect(sourceP1.C, singularPressureLoss1.C1) - annotation (Line(points={{-80,-30},{-60,-30}}, color={0,0,0})); - connect(singularPressureLoss2.C2, sinkP.C) - annotation (Line(points={{60,30},{70,30},{70,30},{80,30}}, color={0,0,0})); - connect(singularPressureLoss3.C2, sinkP1.C) annotation (Line(points={{60,-30}, - {70,-30},{70,-30},{80,-30}}, color={0,0,0})); - annotation (Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-"), Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})})); -end TestVolumeA1; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo deleted file mode 100644 index 8b52572c..00000000 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/TestVolumeI.mo +++ /dev/null @@ -1,111 +0,0 @@ -within ThermoSysPro.Fluid.Examples.SimpleExamples; -model TestVolumeI - - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP1( - continuous_flow_reversal=true, - T0=288.15, - diffusion=true) - annotation (Placement(transformation(extent={{-100,-10},{-80,10}}))); - - ThermoSysPro.Fluid.BoundaryConditions.SinkP sinkP( - Q(start=356.3142593657128), - P0=300000, - T0=369.15, - diffusion=true) - annotation (Placement(transformation(extent={{80,-10},{100,10}}))); - Volumes.VolumeI volumeA( - dynamic_composition_balance=false, - steady_state=true, - V=1.e-6, - Ce2(Q(start=-1.2064107019298721E-33)), - continuous_flow_reversal=true, - dynamic_mass_balance=false, - diffusion=false, - dynamic_energy_balance=true, - P(start=200002.5108577), - h(start=63269.22110794238)) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - - InstrumentationAndControl.Blocks.Sources.Rampe rampe( - Duration=10, - Initialvalue=1e5, - Finalvalue=5e5) - annotation (Placement(transformation(extent={{60,-40},{80,-20}}))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe1(gamma_diff( - start=4.4340701734837724E-07)) - annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe3 - annotation (Placement(transformation(extent={{50,-10},{70,10}}))); - ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe lumpedStraightPipe2(inertia= - false) - annotation (Placement(transformation(extent={{-70,40},{-50,60}}))); - ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP2( - continuous_flow_reversal=false, - T0=288.15, - diffusion=true) - annotation (Placement(transformation(extent={{-100,40},{-80,60}}))); - - PressureLosses.ControlValve controlValve1(Pm(start=201722.05301761828)) - annotation (Placement(transformation(extent={{-40,-4},{-20,16}}))); - PressureLosses.ControlValve controlValve2(C2(Q(start=0)), Pm(start= - 250001.25542885027)) - annotation (Placement(transformation(extent={{-40,46},{-20,66}}))); - PressureLosses.ControlValve controlValve3(Pm(start=198282.96276544)) - annotation (Placement(transformation(extent={{20,-4},{40,16}}))); - InstrumentationAndControl.Blocks.Sources.Constante constante1(k=1) - annotation (Placement(transformation(extent={{-56,24},{-44,36}}))); - InstrumentationAndControl.Blocks.Sources.Constante constante2(k=0) - annotation (Placement(transformation(extent={{-56,74},{-44,86}}))); - InstrumentationAndControl.Blocks.Sources.Constante constante3 - annotation (Placement(transformation(extent={{4,22},{16,34}}))); -equation - connect(rampe.y, sinkP.IPressure) annotation (Line(points={{81,-30},{100,-30}, - {100,0},{95,0}}, color={0,0,255})); - connect(sourceP1.C, lumpedStraightPipe1.C1) - annotation (Line(points={{-80,0},{-70,0}}, color={0,0,0})); - connect(lumpedStraightPipe3.C2, sinkP.C) - annotation (Line(points={{70,0},{80,0}}, color={0,0,0})); - connect(sourceP2.C, lumpedStraightPipe2.C1) - annotation (Line(points={{-80,50},{-70,50}}, color={0,0,0})); - connect(lumpedStraightPipe1.C2, controlValve1.C1) - annotation (Line(points={{-50,0},{-40,0}}, color={0,0,0})); - connect(lumpedStraightPipe2.C2, controlValve2.C1) - annotation (Line(points={{-50,50},{-40,50}}, color={0,0,0})); - connect(controlValve3.C2, lumpedStraightPipe3.C1) - annotation (Line(points={{40,0},{50,0}}, color={0,0,0})); - connect(constante1.y, controlValve1.Ouv) - annotation (Line(points={{-43.4,30},{-30,30},{-30,17}}, color={0,0,255})); - connect(constante2.y, controlValve2.Ouv) - annotation (Line(points={{-43.4,80},{-30,80},{-30,67}}, color={0,0,255})); - connect(constante3.y, controlValve3.Ouv) - annotation (Line(points={{16.6,28},{30,28},{30,17}}, color={0,0,255})); - connect(controlValve1.C2, volumeA.Ce2) - annotation (Line(points={{-20,0},{-10,0}}, color={0,0,0})); - connect(controlValve2.C2, volumeA.Ce1) annotation (Line(points={{-20,50},{-14, - 50},{-14,8},{-10,8}}, color={0,0,0})); - connect(volumeA.Cs2, controlValve3.C1) - annotation (Line(points={{10,0},{20,0}}, color={0,0,0})); - annotation (Icon(graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Polygon( - origin={8.0,14.0}, - lineColor={78,138,73}, - fillColor={78,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), - experiment(StopTime=12), - Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); -end TestVolumeI; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestDynamicDrum.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestDynamicDrum.mo new file mode 100644 index 00000000..653e56e1 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestDynamicDrum.mo @@ -0,0 +1,34 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestDynamicDrum + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.Volumes.DynamicDrum drum( + redeclare package Medium = Medium, + Vertical=false, + steady_state=false, + Vv(start=39), + hl(start=1454400), + hv(start=2.658e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + P0=13000000, + P(start=13000000, fixed=true), + Tp(start=592.6), + zl(start=1.05)) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium, Q0=1) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={80,-20}))); +equation + + connect(drum.Cs, sinkQ.C) annotation (Line(points={{40,-2},{64,-2},{64,-20},{70,-20}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestDynamicDrum; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestDynamicDrum_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestDynamicDrum_Traces.mo new file mode 100644 index 00000000..2b29f22e --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestDynamicDrum_Traces.mo @@ -0,0 +1,37 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestDynamicDrum_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.Volumes.DynamicDrum drum( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation(x=drum.xv), + Vertical=false, + steady_state=false, + Vv(start=39), + hl(start=1454400), + hv(start=2.658e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + P0=13000000, + P(start=13000000, fixed=true), + Tp(start=592.6), + zl(start=1.05), + SubCl0={0}, + SubCv0={10}) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium, Q0=1) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={80,-20}))); +equation + + connect(drum.Cs, sinkQ.C) annotation (Line(points={{40,-2},{64,-2},{64,-20},{70,-20}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestDynamicDrum_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestPressurizer.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestPressurizer.mo new file mode 100644 index 00000000..ca7ac920 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestPressurizer.mo @@ -0,0 +1,123 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestPressurizer + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + parameter Units.SI.Power Wch(fixed=true) = 0.29e6 "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed=true) = 0.01 "Position of the feedwater valve"; + + ThermoSysPro.Fluid.Volumes.Pressurizer pressurizer( + redeclare package Medium = Medium, + Zm=10.15, + Klv=0.5e6, + cpp=600, + hl(start=1629887.98290107), + hv(start=2596216.59571565), + Zl(start=5.5900717167325), + Yw0=32.92, + steady_state=false, + V=61.12, + Rp=1.27, + Ae=96.23, + Klp=1780, + Kvp=7500, + Mp=107e3, + Kpa=5.63, + Ccond=0.02, + Cevap=0.05, + Yw(start=32.92), + y(start=0.3292), + P0=15500000, + P(start=15500000), + Tp(start=617.94155291055)) + annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.PressureLosses.ControlValve FeedwaterValve_Spray( + Cv(start=100), + C1( + P(start=160e5), + h_vol_2(start=1270e3), + Q(start=0.3), + h(start=1270e3)), + Q(fixed=false, start=0.32), + Cvmax=5000, + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-80,36},{-60,56}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + option_temperature=false, + h0=1270e3, + P0=16000000, + redeclare package Medium = Medium) + annotation (Placement(transformation(extent={{-138,30},{-118,50}}, rotation=0))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps FeedwaterValveSpray(Table=[0,OUVfeedwaterValve; 200,OUVfeedwaterValve; 250,OUVfeedwaterValve + 0.005; 300,OUVfeedwaterValve + 0.005; 400,0; 1000,0]) annotation (Placement(transformation(extent={{-104,60},{-78,86}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve SteamValve( + Cv(start=25000), + Cvmax(fixed=true) = 5000, + Pm(start=15500000), + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{88,36},{108,56}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante SteamrValve_O(k(fixed=true) = 0.5) annotation (Placement(transformation(extent={{30,62},{50,82}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ( + Q0=0, + h0=3e6, + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{136,30},{156,50}}, rotation=0))); + Thermal.BoundaryConditions.HeatSource SourceC1( + option_temperature=2, + T0={310}, + W0={1e5}) annotation (Placement(transformation( + origin={-67,-12}, + extent={{-17,17},{17,-17}}, + rotation=270))); + Thermal.BoundaryConditions.HeatSource SourceC2( + T0={310}, + W0={0.286e6}, + option_temperature=1) annotation (Placement(transformation( + origin={-67,11}, + extent={{-17,17},{17,-17}}, + rotation=270))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps ElectricalHeaters(Table=[0,Wch; 100,Wch; 110,Wch; 120,Wch; 300,Wch; 1200,Wch; 1400,Wch*7.75; 1600,Wch*7.75; 1900,Wch; 3000,Wch]) annotation (Placement(transformation(extent={{-109,-25},{-83,1}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss lumpedStraightPipe( + z1=1, + z2=0, + C1(P(start=160e5), redeclare package Medium = Medium), + C2(P(start=160e5), redeclare package Medium = Medium), + Q(fixed=false, start=0)) annotation (Placement(transformation( + origin={10,-44}, + extent={{10,-10},{-10,10}}, + rotation=90))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ1( + Q0=0, + h0=1600000, + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{12,-78},{32,-58}}, rotation=0))); + ThermoSysPro.Examples.Control.Drum_LevelControl regulation_Niveau( + Ti=50, + add(k1=+1, k2=-1), + minval=-100, + pIsat( + Limiteur1(u(signal(start=0.001))), + ureset0=0.0, + maxval=100, + Ti=2000)) annotation (Placement(transformation(extent={{94,-54},{66,-28}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante Level_y100(k=32.92) annotation (Placement(transformation(extent={{129,-58},{110,-39}}, rotation=0))); +equation + connect(FeedwaterValveSpray.y, FeedwaterValve_Spray.Ouv) annotation (Line(points={{-76.7,73},{-70,73},{-70,57}}, color={0,0,255})); + connect(SteamrValve_O.y, SteamValve.Ouv) annotation (Line(points={{51,72},{98,72},{98,57}})); + connect(pressurizer.Cs, SteamValve.C1) annotation (Line(points={{40,39.4},{64,39.4},{64,40},{88,40}}, color={0,0,0})); + connect(sinkQ.C, SteamValve.C2) annotation (Line(points={{136,40},{108,40}}, color={0,0,0})); + connect(sourceP.C, FeedwaterValve_Spray.C1) annotation (Line(points={{-118,40},{-80,40}}, color={0,0,0})); + connect(FeedwaterValve_Spray.C2, pressurizer.Cas) annotation (Line(points={{-60,40},{-24,40},{-24,48},{10,48},{10,40}}, color={0,0,0})); + connect(SourceC2.C[1], pressurizer.Ca) annotation (Line(points={{-50.34,11},{-33.67,11},{-33.67,10.6},{-17,10.6}}, color={191,95,0})); + connect(SourceC1.C[1], pressurizer.Cc) annotation (Line(points={{-50.34,-12},{10,-12},{10,0.4}}, color={191,95,0})); + connect(ElectricalHeaters.y, SourceC1.ISignal) annotation (Line(points={{-81.7,-12},{-75.5,-12}}, color={0,0,255})); + connect(Level_y100.y, regulation_Niveau.ConsigneNiveauEau) annotation (Line( + points={{109.05,-48.5},{106,-48.5},{106,-48.8},{94.7,-48.8}}, + color={0,0,0}, + pattern=LinePattern.Dash)); + connect(regulation_Niveau.SortieReelle1, sinkQ1.IMassFlow) annotation (Line(points={{65.3,-52.7},{22,-52.7},{22,-63}}, color={0,0,255})); + connect(pressurizer.yLevel, regulation_Niveau.MesureNiveauEau) annotation (Line(points={{37,10},{100,10},{100,-29.3},{94.7,-29.3}}, color={0,0,255})); + connect(pressurizer.Cex, lumpedStraightPipe.C1) annotation (Line(points={{10,-20},{10,-34}}, color={0,0,0})); + connect(lumpedStraightPipe.C2, sinkQ1.C) annotation (Line(points={{10,-54},{10,-68},{12,-68}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestPressurizer; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestPressurizer_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestPressurizer_Traces.mo new file mode 100644 index 00000000..7c770e2a --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestPressurizer_Traces.mo @@ -0,0 +1,126 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestPressurizer_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + parameter Units.SI.Power Wch(fixed=true) = 0.29e6 "Power released by the electrical heaters"; + parameter Real OUVfeedwaterValve(fixed=true) = 0.01 "Position of the feedwater valve"; + + ThermoSysPro.Fluid.Volumes.Pressurizer pressurizer( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation (x=1), + Zm=10.15, + Klv=0.5e6, + cpp=600, + hl(start=1629887.98290107), + hv(start=2596216.59571565), + Zl(start=5.5900717167325), + Yw0=32.92, + steady_state=false, + V=61.12, + Rp=1.27, + Ae=96.23, + Klp=1780, + Kvp=7500, + Mp=107e3, + Kpa=5.63, + Ccond=0.02, + Cevap=0.05, + Yw(start=32.92), + y(start=0.3292), + P0=15500000, + P(start=15500000), + Tp(start=617.94155291055), + SubCl0={0}, + SubCv0={10}) + annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.PressureLosses.ControlValve FeedwaterValve_Spray( + Cv(start=100), + C1( + P(start=160e5), + h_vol_2(start=1270e3), + Q(start=0.3), + h(start=1270e3)), + Q(fixed=false, start=0.32), + Cvmax=5000, + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-80,36},{-60,56}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP sourceP( + option_temperature=false, + h0=1270e3, + P0=16000000, + redeclare package Medium = Medium, + SubC0={10}) annotation (Placement(transformation(extent={{-138,30},{-118,50}}, rotation=0))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps FeedwaterValveSpray(Table=[0,OUVfeedwaterValve; 200,OUVfeedwaterValve; 250,OUVfeedwaterValve + 0.005; 300,OUVfeedwaterValve + 0.005; 400,0; 1000,0]) annotation (Placement(transformation(extent={{-104,60},{-78,86}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve SteamValve( + Cv(start=25000), + Cvmax(fixed=true) = 5000, + Pm(start=15500000), + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{88,36},{108,56}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante SteamrValve_O(k(fixed=true) = 0.5) annotation (Placement(transformation(extent={{30,62},{50,82}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ( + Q0=0, + h0=3e6, + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{136,30},{156,50}}, rotation=0))); + Thermal.BoundaryConditions.HeatSource SourceC1( + option_temperature=2, + T0={310}, + W0={1e5}) annotation (Placement(transformation( + origin={-67,-12}, + extent={{-17,17},{17,-17}}, + rotation=270))); + Thermal.BoundaryConditions.HeatSource SourceC2( + T0={310}, + W0={0.286e6}, + option_temperature=1) annotation (Placement(transformation( + origin={-67,11}, + extent={{-17,17},{17,-17}}, + rotation=270))); + InstrumentationAndControl.Blocks.Tables.Table1DTemps ElectricalHeaters(Table=[0,Wch; 100,Wch; 110,Wch; 120,Wch; 300,Wch; 1200,Wch; 1400,Wch*7.75; 1600,Wch*7.75; 1900,Wch; 3000,Wch]) annotation (Placement(transformation(extent={{-109,-25},{-83,1}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss lumpedStraightPipe( + z1=1, + z2=0, + C1(P(start=160e5), redeclare package Medium = Medium), + C2(P(start=160e5), redeclare package Medium = Medium), + Q(fixed=false, start=0)) annotation (Placement(transformation( + origin={10,-44}, + extent={{10,-10},{-10,10}}, + rotation=90))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ1( + Q0=0, + h0=1600000, + redeclare package Medium = Medium) annotation (Placement(transformation(extent={{12,-78},{32,-58}}, rotation=0))); + ThermoSysPro.Examples.Control.Drum_LevelControl regulation_Niveau( + Ti=50, + add(k1=+1, k2=-1), + minval=-100, + pIsat( + Limiteur1(u(signal(start=0.001))), + ureset0=0.0, + maxval=100, + Ti=2000)) annotation (Placement(transformation(extent={{94,-54},{66,-28}}, rotation=0))); + InstrumentationAndControl.Blocks.Sources.Constante Level_y100(k=32.92) annotation (Placement(transformation(extent={{129,-58},{110,-39}}, rotation=0))); +equation + connect(FeedwaterValveSpray.y, FeedwaterValve_Spray.Ouv) annotation (Line(points={{-76.7,73},{-70,73},{-70,57}}, color={0,0,255})); + connect(SteamrValve_O.y, SteamValve.Ouv) annotation (Line(points={{51,72},{98,72},{98,57}})); + connect(pressurizer.Cs, SteamValve.C1) annotation (Line(points={{40,39.4},{64,39.4},{64,40},{88,40}}, color={0,0,0})); + connect(sinkQ.C, SteamValve.C2) annotation (Line(points={{136,40},{108,40}}, color={0,0,0})); + connect(sourceP.C, FeedwaterValve_Spray.C1) annotation (Line(points={{-118,40},{-80,40}}, color={0,0,0})); + connect(FeedwaterValve_Spray.C2, pressurizer.Cas) annotation (Line(points={{-60,40},{-24,40},{-24,48},{10,48},{10,40}}, color={0,0,0})); + connect(SourceC2.C[1], pressurizer.Ca) annotation (Line(points={{-50.34,11},{-33.67,11},{-33.67,10.6},{-17,10.6}}, color={191,95,0})); + connect(SourceC1.C[1], pressurizer.Cc) annotation (Line(points={{-50.34,-12},{10,-12},{10,0.4}}, color={191,95,0})); + connect(ElectricalHeaters.y, SourceC1.ISignal) annotation (Line(points={{-81.7,-12},{-75.5,-12}}, color={0,0,255})); + connect(Level_y100.y, regulation_Niveau.ConsigneNiveauEau) annotation (Line( + points={{109.05,-48.5},{106,-48.5},{106,-48.8},{94.7,-48.8}}, + color={0,0,0}, + pattern=LinePattern.Dash)); + connect(regulation_Niveau.SortieReelle1, sinkQ1.IMassFlow) annotation (Line(points={{65.3,-52.7},{22,-52.7},{22,-63}}, color={0,0,255})); + connect(pressurizer.yLevel, regulation_Niveau.MesureNiveauEau) annotation (Line(points={{37,10},{100,10},{100,-29.3},{94.7,-29.3}}, color={0,0,255})); + connect(pressurizer.Cex, lumpedStraightPipe.C1) annotation (Line(points={{10,-20},{10,-34}}, color={0,0,0})); + connect(lumpedStraightPipe.C2, sinkQ1.C) annotation (Line(points={{10,-54},{10,-68},{12,-68}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestPressurizer_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTankHorizontal_Traces_withPipePressureLosses.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTankHorizontal_Traces_withPipePressureLosses.mo new file mode 100644 index 00000000..4c6c1f47 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTankHorizontal_Traces_withPipePressureLosses.mo @@ -0,0 +1,65 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTankHorizontal_Traces_withPipePressureLosses + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP1( + redeclare package Medium = Medium, + K=1.5, + Q(start=5282.482640023983), + rho(start=997.40780979054, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-50},{50,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1( + redeclare package Medium = Medium, + Pm(start=21741.77302868171, displayUnit="bar"), + Q(start=-1.3278998585228342E-31)) annotation (Placement(transformation(extent={{-50,2},{-30,22}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1(redeclare package Medium = Medium, SubC0={0.3}) annotation (Placement(transformation(extent={{-90,-4},{-70,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-50},{90,-30}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.TankHorizontal Tank1( + redeclare package Medium = Medium, + SubC(start={0.9}), + z(fixed=false, start=1), + Cs1(Q(start=1.2116903504194741E-27)), + Cs2(P(start=3.2e5)), + rho(start=997.4119292829444, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1 annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP2( + redeclare package Medium = Medium, + K=1.5, + rho(start=997.33695032119, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-4},{50,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-4},{90,16}}, rotation=0))); +equation + connect(PerteDP1.C2, PuitsP1.C) annotation (Line(points={{50,-40},{70,-40}}, color={0,0,255})); + connect(SourceP1.C, VanneReglante1.C1) annotation (Line(points={{-70,6},{-50,6}}, color={0,0,255})); + connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{10,-5},{20,-5},{20,-40},{30,-40}}, color={0,0,255})); + connect(Rampe1.y, VanneReglante1.Ouv) annotation (Line(points={{-69,40},{-40,40},{-40,23}})); + connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,6},{-20,6},{-20,5},{-10,5}}, color={0,0,255})); + connect(Tank1.Cs1, PerteDP2.C1) annotation (Line(points={{10.2,4.9},{20,4.9},{20,6},{30,6}}, color={0,0,255})); + connect(PerteDP2.C2, PuitsP2.C) annotation (Line(points={{50,6},{70,6}}, color={0,0,255})); + annotation ( + experiment(StopTime=20), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestTankHorizontal_Traces_withPipePressureLosses; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTankHorizontal_withPipePressureLosses.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTankHorizontal_withPipePressureLosses.mo new file mode 100644 index 00000000..b8ff2542 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTankHorizontal_withPipePressureLosses.mo @@ -0,0 +1,61 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTankHorizontal_withPipePressureLosses + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP1( + redeclare package Medium = Medium, + K=1.5, + Q(start=5282.482640023983), + rho(start=997.40780979054, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-50},{50,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1( + redeclare package Medium = Medium, + Pm(start=21741.77302868171, displayUnit="bar"), + Q(start=-1.3278998585228342E-31)) annotation (Placement(transformation(extent={{-50,2},{-30,22}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,-4},{-70,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-50},{90,-30}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.TankHorizontal Tank1( + redeclare package Medium = Medium, + z(fixed=false, start=1), + Cs1(Q(start=1.2116903504194741E-27)), + Cs2(P(start=3.2e5)), + rho(start=997.4119292829444, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1 annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP2( + redeclare package Medium = Medium, + K=1.5, + rho(start=997.33695032119, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-4},{50,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-4},{90,16}}, rotation=0))); +equation + connect(PerteDP1.C2, PuitsP1.C) annotation (Line(points={{50,-40},{70,-40}}, color={0,0,255})); + connect(SourceP1.C, VanneReglante1.C1) annotation (Line(points={{-70,6},{-50,6}}, color={0,0,255})); + connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{10,-5},{20,-5},{20,-40},{30,-40}}, color={0,0,255})); + connect(Rampe1.y, VanneReglante1.Ouv) annotation (Line(points={{-69,40},{-40,40},{-40,23}})); + connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,6},{-20,6},{-20,5},{-10,5}}, color={0,0,255})); + connect(Tank1.Cs1, PerteDP2.C1) annotation (Line(points={{10.2,4.9},{20,4.9},{20,6},{30,6}}, color={0,0,255})); + connect(PerteDP2.C2, PuitsP2.C) annotation (Line(points={{50,6},{70,6}}, color={0,0,255})); + annotation ( + experiment(StopTime=20), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestTankHorizontal_withPipePressureLosses; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTank_Traces_withPipePressureLosses.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTank_Traces_withPipePressureLosses.mo new file mode 100644 index 00000000..0107dd5f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTank_Traces_withPipePressureLosses.mo @@ -0,0 +1,66 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTank_Traces_withPipePressureLosses + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP1( + redeclare package Medium = Medium, + K=1.5, + Q(start=5282.482640023983), + rho(start=997.40780979054, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-50},{50,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1( + redeclare package Medium = Medium, + Pm(start=21741.77302868171, displayUnit="bar"), + Q(start=-1.3278998585228342E-31)) annotation (Placement(transformation(extent={{-50,2},{-30,22}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1(redeclare package Medium = Medium, SubC0={0.3}) + annotation (Placement(transformation(extent={{-90,-4},{-70,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-50},{90,-30}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.Tank Tank1( + redeclare package Medium = Medium, + SubC(start={0.9}), + z(fixed=false, start=5), + Cs1(Q(start=1.2116903504194741E-27)), + Cs2(P(start=3.2e5)), + rho(start=997.4119292829444, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1 annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP2( + redeclare package Medium = Medium, + K=1.5, + rho(start=997.33695032119, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-4},{50,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-4},{90,16}}, rotation=0))); +equation + connect(PerteDP1.C2, PuitsP1.C) annotation (Line(points={{50,-40},{70,-40}}, color={0,0,255})); + connect(SourceP1.C, VanneReglante1.C1) annotation (Line(points={{-70,6},{-50,6}}, color={0,0,255})); + connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{10,-6},{20,-6},{20,-40},{30,-40}}, color={0,0,255})); + connect(Rampe1.y, VanneReglante1.Ouv) annotation (Line(points={{-69,40},{-40,40},{-40,23}})); + connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,6},{-20,6},{-10,6}}, color={0,0,255})); + connect(Tank1.Cs1, PerteDP2.C1) annotation (Line(points={{10.2,6},{20,6},{30,6}}, color={0,0,255})); + connect(PerteDP2.C2, PuitsP2.C) annotation (Line(points={{50,6},{50,6},{70,6}}, color={0,0,255})); + annotation ( + experiment(StopTime=20), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestTank_Traces_withPipePressureLosses; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTank_withPipePressureLosses.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTank_withPipePressureLosses.mo new file mode 100644 index 00000000..24010d0b --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTank_withPipePressureLosses.mo @@ -0,0 +1,61 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTank_withPipePressureLosses + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP1( + redeclare package Medium = Medium, + K=1.5, + Q(start=5282.482640023983), + rho(start=997.40780979054, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-50},{50,-30}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.ControlValve VanneReglante1( + redeclare package Medium = Medium, + Pm(start=21741.77302868171, displayUnit="bar"), + Q(start=-1.3278998585228342E-31)) annotation (Placement(transformation(extent={{-50,2},{-30,22}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceP SourceP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-90,-4},{-70,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-50},{90,-30}}, rotation=0))); + ThermoSysPro.Fluid.Volumes.Tank Tank1( + redeclare package Medium = Medium, + z(fixed=false, start=5), + Cs1(Q(start=1.2116903504194741E-27)), + Cs2(P(start=3.2e5)), + rho(start=997.4119292829444, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=0))); + ThermoSysPro.InstrumentationAndControl.Blocks.Sources.Rampe Rampe1 annotation (Placement(transformation(extent={{-90,30},{-70,50}}, rotation=0))); + ThermoSysPro.Fluid.PressureLosses.PipePressureLoss PerteDP2( + redeclare package Medium = Medium, + K=1.5, + rho(start=997.33695032119, displayUnit="g/cm3")) annotation (Placement(transformation(extent={{30,-4},{50,16}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkP PuitsP2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{70,-4},{90,16}}, rotation=0))); +equation + connect(PerteDP1.C2, PuitsP1.C) annotation (Line(points={{50,-40},{70,-40}}, color={0,0,255})); + connect(SourceP1.C, VanneReglante1.C1) annotation (Line(points={{-70,6},{-50,6}}, color={0,0,255})); + connect(Tank1.Cs2, PerteDP1.C1) annotation (Line(points={{10,-6},{20,-6},{20,-40},{30,-40}}, color={0,0,255})); + connect(Rampe1.y, VanneReglante1.Ouv) annotation (Line(points={{-69,40},{-40,40},{-40,23}})); + connect(VanneReglante1.C2, Tank1.Ce1) annotation (Line(points={{-30,6},{-20,6},{-10,6}}, color={0,0,255})); + connect(Tank1.Cs1, PerteDP2.C1) annotation (Line(points={{10.2,6},{20,6},{30,6}}, color={0,0,255})); + connect(PerteDP2.C2, PuitsP2.C) annotation (Line(points={{50,6},{50,6},{70,6}}, color={0,0,255})); + annotation ( + experiment(StopTime=20), + Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Polygon( + origin={8.0,14.0}, + lineColor={78,138,73}, + fillColor={78,138,73}, + pattern=LinePattern.None, + fillPattern=FillPattern.Solid, + points={{-58.0,46.0},{42.0,-14.0},{-58.0,-74.0},{-58.0,46.0}})}), + Documentation(info=" +
Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1 +")); +end TestTank_withPipePressureLosses; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavity.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavity.mo new file mode 100644 index 00000000..59e389cc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavity.mo @@ -0,0 +1,60 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTwoPhaseCavity + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.Volumes.TwoPhaseCavity cavity( + redeclare package Medium = Medium, + steady_state=false, + P0=13000000, + P(start=13000000, fixed=true), + hl(start=1454400), + hv(start=2.658e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + Ns=1, + Vf0=0.5, + Cal_hconv=false) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWater( + redeclare package Medium = Medium, + Q0=1, + h0=1454400) annotation (Placement(transformation(extent={{-90,20},{-70,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSteam( + redeclare package Medium = Medium, + Q0=1, + h0=2.8e6) annotation (Placement(transformation(extent={{-60,50},{-40,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkWater( + redeclare package Medium = Medium, + Q0=2) annotation (Placement(transformation(extent={{-90,-60},{-70,-40}}, rotation=0))); + + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource1( + option_temperature=2, + W0={1e5}) annotation (Placement(transformation(extent={{60,-70},{80,-50}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource2( + option_temperature=2, + W0={1e5}) annotation (Placement(transformation(extent={{70,0},{90,20}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource3a( + T0={293.15,293.15}, + option_temperature=2, + W0={1e5,1e5}) + annotation (Placement(transformation(extent={{70,50},{90,70}}, rotation=0))); +equation + cavity.Cth3[3:2*cavity.Ns].W = fill(0, 2*cavity.Ns - 2); + connect(sourceWater.C, cavity.Ce) annotation (Line(points={{-70,30},{-40,30},{-40,32},{-1.66667,32}}, + color={0,0,0})); + connect(sourceSteam.C, cavity.Cv) annotation (Line(points={{-40,60},{10.3333,60},{10.3333,32}}, + color={0,0,0})); + connect(cavity.Cl, sinkWater.C) annotation (Line(points={{10.3333,-12},{10.3333,-50},{-90,-50}}, + color={0,0,0})); + connect(heatSource1.C, cavity.Cth1) annotation (Line(points={{70,-69.8},{20,-69.8},{20,-5.3},{10.1667,-5.3}},color={255,0,0})); + connect(heatSource2.C, cavity.Cth2) annotation (Line(points={{80,0.2},{42,0.2},{42,25.1},{10.1667,25.1}}, + color={255,0,0})); + connect(cavity.Cth3, heatSource3a.C) annotation (Line(points={{10.1667,10.6},{58,10.6},{58,50.2},{80,50.2}}, color={255,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestTwoPhaseCavity; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavityOnePipe.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavityOnePipe.mo new file mode 100644 index 00000000..b435abf8 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavityOnePipe.mo @@ -0,0 +1,57 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTwoPhaseCavityOnePipe + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.Volumes.TwoPhaseCavityOnePipe cavity( + redeclare package Medium = Medium, + steady_state=false, + P0=13000000, + P(start=13000000, fixed=true), + hl(start=1454400), + hv(start=2.658e6), + hvIn(start=2.8e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + Ns=2, + Vf0=0.5, + Cal_hcond=false) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWater( + redeclare package Medium = Medium, + Q0=1, + h0=1454400) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSteamBP( + redeclare package Medium = Medium, + Q0=1, + h0=2.8e6) annotation (Placement(transformation(extent={{-80,50},{-60,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSteamGCT( + redeclare package Medium = Medium, + Q0=1, + h0=2.8e6) annotation (Placement(transformation(extent={{-110,50},{-90,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkWater( + redeclare package Medium = Medium, + Q0=3) annotation (Placement(transformation(extent={{-90,-60},{-70,-40}}, rotation=0))); + + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0={293.15, 293.15}, + option_temperature=2, + W0={1e5, 1e5}) annotation (Placement(transformation(extent={{70,30},{90,50}}, rotation=0))); +equation + connect(sourceWater.C, cavity.Ce) annotation (Line(points={{-80,10},{-26,10},{-26,25.8},{-12.971,25.8}}, + color={0,0,0})); + connect(sourceSteamBP.C, cavity.CvBP) annotation (Line(points={{-60,60},{9.82857,60},{9.82857,32}}, + color={0,0,0})); + connect(sourceSteamGCT.C, cavity.CvGCT) annotation (Line(points={{-90,60},{-84,60},{-84,46},{-2.857,46},{-2.857,32}}, + color={0,0,0})); + connect(cavity.Cl, sinkWater.C) annotation (Line(points={{10,-12},{10,-34},{-94,-34},{-94,-50},{-90,-50}}, + color={0,0,0})); + connect(cavity.Cth3, heatSource.C) annotation (Line(points={{9.82857,21.2},{50,21.2},{50,30.2},{80,30.2}}, + color={255,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestTwoPhaseCavityOnePipe; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavityOnePipe_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavityOnePipe_Traces.mo new file mode 100644 index 00000000..7a5465cd --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavityOnePipe_Traces.mo @@ -0,0 +1,63 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTwoPhaseCavityOnePipe_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.Volumes.TwoPhaseCavityOnePipe cavity( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation(x=cavity.xv), + steady_state=false, + P0=13000000, + P(start=13000000, fixed=true), + hl(start=1454400), + hv(start=2.658e6), + hvIn(start=2.8e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + Ns=2, + Vf0=0.5, + Cal_hcond=false, + SubCl0={1}, + SubCv0={10}) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWater( + redeclare package Medium = Medium, + Q0=1, + h0=1454400, + SubC0={1}) annotation (Placement(transformation(extent={{-100,0},{-80,20}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSteamBP( + redeclare package Medium = Medium, + Q0=1, + h0=2.8e6, + SubC0={10}) annotation (Placement(transformation(extent={{-80,50},{-60,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSteamGCT( + redeclare package Medium = Medium, + Q0=1, + h0=2.8e6, + SubC0={10}) annotation (Placement(transformation(extent={{-110,50},{-90,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkWater( + redeclare package Medium = Medium, Q0=3) + annotation (Placement(transformation(extent={{-90,-60},{-70,-40}}, rotation=0))); + + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource( + T0={293.15, 293.15}, + option_temperature=2, + W0={1e5, 1e5}) annotation (Placement(transformation(extent={{70,30},{90,50}}, rotation=0))); +equation + connect(sourceWater.C, cavity.Ce) annotation (Line(points={{-80,10},{-26,10},{-26,25.8},{-12.971,25.8}}, + color={0,0,0})); + connect(sourceSteamBP.C, cavity.CvBP) annotation (Line(points={{-60,60},{9.82857,60},{9.82857,32}}, + color={0,0,0})); + connect(sourceSteamGCT.C, cavity.CvGCT) annotation (Line(points={{-90,60},{-84,60},{-84,46},{-2.857,46},{-2.857,32}}, + color={0,0,0})); + connect(cavity.Cl, sinkWater.C) annotation (Line(points={{10,-12},{10,-34},{-94,-34},{-94,-50},{-90,-50}}, + color={0,0,0})); + connect(cavity.Cth3, heatSource.C) annotation (Line(points={{9.82857,21.2},{50,21.2},{50,30.2},{80,30.2}}, + color={255,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestTwoPhaseCavityOnePipe_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavity_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavity_Traces.mo new file mode 100644 index 00000000..c526b9af --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseCavity_Traces.mo @@ -0,0 +1,65 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTwoPhaseCavity_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.Volumes.TwoPhaseCavity cavity( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation(x=cavity.xv), + steady_state=false, + P0=13000000, + P(start=13000000, fixed=true), + hl(start=1454400), + hv(start=2.658e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + Ns=1, + Vf0=0.5, + Cal_hconv=false, + SubCl0={0}, + SubCv0={0}) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceWater( + redeclare package Medium = Medium, + Q0=1, + h0=1454400, + SubC0={0}) annotation (Placement(transformation(extent={{-90,20},{-70,40}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceSteam( + redeclare package Medium = Medium, + Q0=1, + h0=2.8e6, + SubC0={10}) annotation (Placement(transformation(extent={{-60,50},{-40,70}}, rotation=0))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkWater( + redeclare package Medium = Medium, + Q0=2) annotation (Placement(transformation(extent={{-90,-60},{-70,-40}}, rotation=0))); + + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource1( + option_temperature=2, + W0={1e5}) annotation (Placement(transformation(extent={{60,-70},{80,-50}}, rotation=0))); + ThermoSysPro.Thermal.BoundaryConditions.HeatSource heatSource2( + option_temperature=2, + W0={1e5}) annotation (Placement(transformation(extent={{70,0},{90,20}}, rotation=0))); + Thermal.BoundaryConditions.HeatSource heatSource3a( + T0={293.15,293.15}, + option_temperature=2, + W0={1e5,1e5}) + annotation (Placement(transformation(extent={{68,56},{88,76}}, rotation=0))); +equation + cavity.Cth3[3:2*cavity.Ns].W = fill(0, 2*cavity.Ns - 2); + connect(sourceWater.C, cavity.Ce) annotation (Line(points={{-70,30},{-40,30},{-40,32},{-1.66667,32}}, + color={0,0,0})); + connect(sourceSteam.C, cavity.Cv) annotation (Line(points={{-40,60},{10.3333,60},{10.3333,32}}, + color={0,0,0})); + connect(cavity.Cl, sinkWater.C) annotation (Line(points={{10.3333,-12},{10.3333,-50},{-90,-50}}, + color={0,0,0})); + connect(heatSource1.C, cavity.Cth1) annotation (Line(points={{70,-69.8},{20,-69.8},{20,-5.3},{10.1667,-5.3}},color={255,0,0})); + connect(heatSource2.C, cavity.Cth2) annotation (Line(points={{80,0.2},{42,0.2},{42,25.1},{10.1667,25.1}}, + color={255,0,0})); + connect(cavity.Cth3, heatSource3a.C) annotation (Line(points={{10.1667,10.6},{64,10.6},{64,52},{78,52},{78,56.2}}, color={255,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestTwoPhaseCavity_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseVolume.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseVolume.mo new file mode 100644 index 00000000..1279de8f --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseVolume.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTwoPhaseVolume + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.Volumes.TwoPhaseVolume volume( + steady_state=false, + P0=13000000, + P(start=13000000, fixed=true), + hl(start=1454400), + hv(start=2.658e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + V=80, + A=20, + Vf0=0.5, + redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium, Q0=1) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={30,-40}))); +equation + connect(sinkQ.C, volume.Cl) annotation (Line(points={{20,-40},{10,-40},{10,-20}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestTwoPhaseVolume; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseVolume_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseVolume_Traces.mo new file mode 100644 index 00000000..b3ab2755 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestTwoPhaseVolume_Traces.mo @@ -0,0 +1,35 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestTwoPhaseVolume_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Fluid.Examples.SimpleExamples.Media.WaterSteam_FullyVolatileTrace; + + ThermoSysPro.Fluid.Volumes.TwoPhaseVolume volume( + redeclare package Medium = Medium, + redeclare function PhasesSeparationFunction = Medium.PhasesSeparation(x=volume.xv), + steady_state=false, + P0=13000000, + P(start=13000000, fixed=true), + hl(start=1454400), + hv(start=2.658e6), + xv(start=0.01), + rhol(start=670), + rhov(start=78), + V=80, + A=20, + Vf0=0.5, + SubCl0={0}, + SubCv0={10}) annotation (Placement(transformation(extent={{-20,-20},{40,40}}, rotation=0))); + + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium, Q0=1) + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={30,-40}))); +equation + connect(sinkQ.C, volume.Cl) annotation (Line(points={{20,-40},{10,-40},{10,-20}}, color={0,0,0})); + annotation ( + experiment(StopTime=1000), + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,80}}))); +end TestTwoPhaseVolume_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo new file mode 100644 index 00000000..13e231d2 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA.mo @@ -0,0 +1,19 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeA + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable + package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); +equation + connect(sourcePQ.C,volumeA. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeA.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(volumeA.Cs1, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeA; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh.mo new file mode 100644 index 00000000..6b2789bd --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh.mo @@ -0,0 +1,17 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeATh + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeATh volumeATh(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-22},{10,-42}}))); +equation + connect(sourcePQ.C, volumeATh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeATh.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(volumeATh.Cs1, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(heatSource.C[1], volumeATh.Cth) annotation (Line(points={{0,-22.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeATh; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh_FlueGases.mo new file mode 100644 index 00000000..2f1a9e64 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh_FlueGases.mo @@ -0,0 +1,32 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeATh_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeATh volumeATh(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Thermal.BoundaryConditions.HeatSource heatSource(T0 = {573.15}) annotation( + Placement(transformation(extent = {{-10, -20}, {10, -40}}))); +equation + connect(sourcePQ.C, volumeATh.Ce1) annotation( + Line(points = {{-30, 0}, {-10, 0}}, color = {0, 0, 0})); + connect(volumeATh.Ce2, sourceQ.C) annotation( + Line(points = {{0, 10}, {0, 30}, {-30, 30}}, color = {0, 0, 0})); + connect(volumeATh.Cs1, sink.C) annotation( + Line(points = {{10, 0}, {30, 0}}, color = {0, 0, 0})); + connect(volumeATh.Cth, heatSource.C[1]) annotation( + Line(points = {{0, 0}, {0, -20.2}}, color = {0, 0, 0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeATh_FlueGases; \ No newline at end of file diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh_Traces.mo new file mode 100644 index 00000000..ecbf2734 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeATh_Traces.mo @@ -0,0 +1,26 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeATh_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeATh volumeATh( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.2}) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-20},{10,-40}}))); +equation + connect(sourcePQ.C, volumeATh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeATh.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(volumeATh.Cs1, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(volumeATh.Cth, heatSource.C[1]) annotation (Line(points={{0,0},{0,-20.2}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeATh_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo new file mode 100644 index 00000000..a154a30d --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_FlueGases.mo @@ -0,0 +1,26 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeA_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium,h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable + package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); +equation + connect(sourcePQ.C,volumeA. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeA.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(volumeA.Cs1, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeA_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo new file mode 100644 index 00000000..35f5de29 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeA_Traces.mo @@ -0,0 +1,26 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeA_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam (extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package + Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare + replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeA volumeA(redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-10,-10}, + {10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable + package Medium = Medium, + SubC0={0.2}) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); +equation + connect(sourcePQ.C,volumeA. Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeA.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30, + 30}}, color={0,0,0})); + connect(volumeA.Cs1, sink.C) + annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeA_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo new file mode 100644 index 00000000..70a46a81 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeB + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{20,28},{40,48}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeB volumeB(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={42,0}))); +equation + connect(sourcePQ.C, volumeB.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeB.Ce2, sourceQ.C) annotation (Line(points={{10,0},{21,0},{21,7.21645e-16},{32,7.21645e-16}}, color={0,0,0})); + connect(volumeB.Cs1, sink.C) annotation (Line(points={{0,10},{0,38},{20,38}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeB; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh.mo new file mode 100644 index 00000000..927f3cd4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh.mo @@ -0,0 +1,23 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeBTh + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,38}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeBTh volumeBTh(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={42,0}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-22},{10,-42}}))); +equation + connect(sourcePQ.C, volumeBTh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeBTh.Ce2, sourceQ.C) annotation (Line(points={{10,0},{21,0},{21,7.21645e-16},{32,7.21645e-16}}, color={0,0,0})); + connect(volumeBTh.Cs1, sink.C) annotation (Line(points={{0,10},{0,19},{-5.55112e-16,19},{-5.55112e-16,28}}, color={0,0,0})); + connect(heatSource.C[1], volumeBTh.Cth) annotation (Line(points={{0,-22.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeBTh; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh_FlueGases.mo new file mode 100644 index 00000000..ae9b8890 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh_FlueGases.mo @@ -0,0 +1,33 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeBTh_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,40}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeBTh volumeBTh(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={40,0}))); + Thermal.BoundaryConditions.HeatSource heatSource(T0={573.15}) annotation (Placement(transformation(extent={{-10,-22},{10,-42}}))); +equation + connect(sourcePQ.C, volumeBTh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeBTh.Ce2, sourceQ.C) annotation (Line(points={{10,0},{25,0},{25,6.66134e-16},{30,6.66134e-16}}, color={0,0,0})); + connect(volumeBTh.Cs1, sink.C) annotation (Line(points={{0,10},{0,20},{-5.55112e-16,20},{-5.55112e-16,30}}, color={0,0,0})); + connect(heatSource.C[1], volumeBTh.Cth) annotation (Line(points={{0,-22.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeBTh_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh_Traces.mo new file mode 100644 index 00000000..23543d62 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeBTh_Traces.mo @@ -0,0 +1,32 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeBTh_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={0,36}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeBTh volumeBTh( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.2}) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={38,0}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-22},{10,-42}}))); +equation + connect(sourcePQ.C, volumeBTh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeBTh.Ce2, sourceQ.C) annotation (Line(points={{10,0},{19,0},{19,7.21645e-16},{28,7.21645e-16}}, color={0,0,0})); + connect(volumeBTh.Cs1, sink.C) annotation (Line(points={{0,10},{0,26},{-6.66134e-16,26}}, color={0,0,0})); + connect(heatSource.C[1], volumeBTh.Cth) annotation (Line(points={{0,-22.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeBTh_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo new file mode 100644 index 00000000..034bfd84 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_FlueGases.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeB_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{26,16},{46,36}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeB volumeB(redeclare package Medium = Medium,h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={40,0}))); +equation + connect(sourcePQ.C, volumeB.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeB.Ce2, sourceQ.C) annotation (Line(points={{10,0},{23,0},{23,7.21645e-16},{30,7.21645e-16}}, color={0,0,0})); + connect(volumeB.Cs1, sink.C) annotation (Line(points={{0,10},{0,26},{26,26}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeB_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo new file mode 100644 index 00000000..1622f1d4 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeB_Traces.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeB_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeB volumeB( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.2}) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=180, + origin={40,0}))); +equation + connect(sourcePQ.C, volumeB.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeB.Ce2, sourceQ.C) annotation (Line(points={{10,0},{24,0},{24,7.21645e-16},{30,7.21645e-16}}, color={0,0,0})); + connect(volumeB.Cs1, sink.C) annotation (Line(points={{0,10},{0,30},{20,30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeB_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo new file mode 100644 index 00000000..60ba1d38 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC.mo @@ -0,0 +1,15 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeC + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); +equation + connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sink.C, volumeC.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0})); + connect(volumeC.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeC; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh.mo new file mode 100644 index 00000000..ff030840 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh.mo @@ -0,0 +1,17 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeCTh + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeCTh volumeCTh(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-26},{10,-46}}))); +equation + connect(sourcePQ.C, volumeCTh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sink.C, volumeCTh.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0})); + connect(volumeCTh.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(heatSource.C[1], volumeCTh.Cth) annotation (Line(points={{0,-26.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeCTh; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh_FlueGases.mo new file mode 100644 index 00000000..224fc061 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh_FlueGases.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeCTh_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeCTh volumeCTh(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Thermal.BoundaryConditions.HeatSource heatSource(T0={573.15}) annotation (Placement(transformation(extent={{-10,-24},{10,-44}}))); +equation + connect(sourcePQ.C, volumeCTh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sink.C, volumeCTh.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0})); + connect(volumeCTh.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(heatSource.C[1], volumeCTh.Cth) annotation (Line(points={{0,-24.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeCTh_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh_Traces.mo new file mode 100644 index 00000000..7b584788 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeCTh_Traces.mo @@ -0,0 +1,20 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeCTh_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.2}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeCTh volumeCTh(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.1}) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-22},{10,-42}}))); +equation + connect(sourcePQ.C, volumeCTh.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sink.C, volumeCTh.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0})); + connect(volumeCTh.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + connect(heatSource.C[1], volumeCTh.Cth) annotation (Line(points={{0,-22.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeCTh_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo new file mode 100644 index 00000000..e17f46c6 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_FlueGases.mo @@ -0,0 +1,25 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeC_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); +equation + connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sink.C, volumeC.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0})); + connect(volumeC.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeC_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo new file mode 100644 index 00000000..77037832 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeC_Traces.mo @@ -0,0 +1,17 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeC_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = Properties.Media.WaterSteam(extraPropertiesNames={"Trace"}, C_nominal={0.1}, C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium, SubC0={0.2}) + annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeC volumeC(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium, SubC0={0.1}) + annotation (Placement(transformation(extent={{-50,20},{-30,40}}))); +equation + connect(sourcePQ.C, volumeC.Ce1) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sink.C, volumeC.Cs) annotation (Line(points={{30,0},{10,0}}, color={0,0,0})); + connect(volumeC.Ce2, sourceQ.C) annotation (Line(points={{0,10},{0,30},{-30,30}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeC_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD.mo new file mode 100644 index 00000000..141159c5 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD.mo @@ -0,0 +1,15 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeD + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeD volumeD(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-52,-10},{-32,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{12,22},{32,42}}))); +equation + connect(sourcePQ.C, volumeD.Ce) annotation (Line(points={{-32,0},{-10,0}}, color={0,0,0})); + connect(volumeD.Cs3, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(volumeD.Cs1, sinkQ.C) annotation (Line(points={{0,10},{0,32},{12,32}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeD; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh.mo new file mode 100644 index 00000000..7f9fc507 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeDTh + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeDTh volumeDTh(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-52,-10},{-32,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{12,22},{32,42}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-28},{10,-48}}))); +equation + connect(sourcePQ.C, volumeDTh.Ce) annotation (Line(points={{-32,0},{-10,0}}, color={0,0,0})); + connect(volumeDTh.Cs3, sink.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(volumeDTh.Cs1, sinkQ.C) annotation (Line(points={{0,10},{0,32},{12,32}}, color={0,0,0})); + connect(heatSource.C[1], volumeDTh.Cth) annotation (Line(points={{0,-28.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeDTh; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh_FlueGases.mo new file mode 100644 index 00000000..25920676 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh_FlueGases.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeDTh_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{26,16},{46,36}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeDTh volumeDTh(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); + Thermal.BoundaryConditions.HeatSource heatSource(T0={573.15}) annotation (Placement(transformation(extent={{-10,-28},{10,-48}}))); +equation + connect(volumeDTh.Cs1, sink.C) annotation (Line(points={{0,10},{0,26},{26,26}}, color={0,0,0})); + connect(sourcePQ.C, volumeDTh.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeDTh.Cs3, sinkQ.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + connect(heatSource.C[1], volumeDTh.Cth) annotation (Line(points={{0,-28.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeDTh_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh_Traces.mo new file mode 100644 index 00000000..bd6a3ae9 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeDTh_Traces.mo @@ -0,0 +1,30 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeDTh_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeDTh volumeDTh( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-12,-10},{8,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-12,-28},{8,-48}}))); +equation + connect(volumeDTh.Cs1, sink.C) annotation (Line(points={{-2,10},{-2,30},{20,30}}, color={0,0,0})); + connect(sourcePQ.C, volumeDTh.Ce) annotation (Line(points={{-30,0},{-12,0}}, color={0,0,0})); + connect(volumeDTh.Cs3, sinkQ.C) annotation (Line(points={{8,0},{30,0}}, color={0,0,0})); + connect(heatSource.C[1], volumeDTh.Cth) annotation (Line(points={{-2,-28.2},{-2,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeDTh_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD_FlueGases.mo new file mode 100644 index 00000000..aad09e10 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD_FlueGases.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeD_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{26,16},{46,36}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeD volumeD(redeclare package Medium = Medium,h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); +equation + connect(volumeD.Cs1, sink.C) annotation (Line(points={{0,10},{0,26},{26,26}}, color={0,0,0})); + connect(sourcePQ.C, volumeD.Ce) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(volumeD.Cs3, sinkQ.C) annotation (Line(points={{10,0},{30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeD_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD_Traces.mo new file mode 100644 index 00000000..767e33ce --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeD_Traces.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeD_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeD volumeD( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-12,-10},{8,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SinkQ sinkQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,0}))); +equation + connect(volumeD.Cs1, sink.C) annotation (Line(points={{-2,10},{-2,30},{20,30}}, color={0,0,0})); + connect(sourcePQ.C, volumeD.Ce) annotation (Line(points={{-30,0},{-12,0}}, color={0,0,0})); + connect(volumeD.Cs3, sinkQ.C) annotation (Line(points={{8,0},{30,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeD_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI.mo new file mode 100644 index 00000000..4ffc4874 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI.mo @@ -0,0 +1,15 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeI + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeI volumeI(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-52,-10},{-32,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,10},{-30,30}}))); +equation + connect(volumeI.Cs3, sink.C) annotation (Line(points={{10,-8},{20,-8},{20,0},{30,0}}, color={0,0,0})); + connect(sourcePQ.C, volumeI.Ce2) annotation (Line(points={{-32,0},{-10,0}}, color={0,0,0})); + connect(sourceQ.C, volumeI.Ce1) annotation (Line(points={{-30,20},{-10,20},{-10,8}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeI; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh.mo new file mode 100644 index 00000000..7bb2b515 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh.mo @@ -0,0 +1,18 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeITh + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam; + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeITh volumeITh(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-52,-10},{-32,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{-50,10},{-30,30}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-10,-24},{10,-44}}))); +equation + connect(volumeITh.Cs3, sink.C) annotation (Line(points={{10,-8},{20,-8},{20,0},{30,0}}, color={0,0,0})); + connect(sourcePQ.C, volumeITh.Ce2) annotation (Line(points={{-32,0},{-10,0}}, color={0,0,0})); + connect(sourceQ.C, volumeITh.Ce1) annotation (Line(points={{-30,20},{-10,20},{-10,8}}, color={0,0,0})); + connect(heatSource.C[1], volumeITh.Cth) annotation (Line(points={{0,-24.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeITh; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh_FlueGases.mo new file mode 100644 index 00000000..dd23d458 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh_FlueGases.mo @@ -0,0 +1,31 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeITh_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{26,-18},{46,2}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeITh volumeITh(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-40,20}))); + Thermal.BoundaryConditions.HeatSource heatSource(T0={573.15}) annotation (Placement(transformation(extent={{-10,-26},{10,-46}}))); +equation + connect(sourcePQ.C, volumeITh.Ce2) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sourceQ.C, volumeITh.Ce1) annotation (Line(points={{-30,20},{-10,20},{-10,8}}, color={0,0,0})); + connect(volumeITh.Cs3, sink.C) annotation (Line(points={{10,-8},{26,-8}}, color={0,0,0})); + connect(heatSource.C[1], volumeITh.Cth) annotation (Line(points={{0,-26.2},{0,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeITh_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh_Traces.mo new file mode 100644 index 00000000..9b182a61 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeITh_Traces.mo @@ -0,0 +1,30 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeITh_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeITh volumeITh( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-12,-10},{8,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-56,18},{-36,38}}))); + Thermal.BoundaryConditions.HeatSource heatSource annotation (Placement(transformation(extent={{-12,-28},{8,-48}}))); +equation + connect(volumeITh.Cs1, sink.C) annotation (Line(points={{8,8},{8,30},{20,30}}, color={0,0,0})); + connect(sourcePQ.C, volumeITh.Ce2) annotation (Line(points={{-30,0},{-12,0}}, color={0,0,0})); + connect(sourceQ.C, volumeITh.Ce1) annotation (Line(points={{-36,28},{-12,28},{-12,8}}, color={0,0,0})); + connect(heatSource.C[1], volumeITh.Cth) annotation (Line(points={{-2,-28.2},{-2,0}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeITh_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI_FlueGases.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI_FlueGases.mo new file mode 100644 index 00000000..b8b11661 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI_FlueGases.mo @@ -0,0 +1,28 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeI_FlueGases + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases; + ThermoSysPro.Fluid.BoundaryConditions.Sink sink( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{26,-18},{46,2}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + P0=4500000, + T0=573.15, + option_temperature=true) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeI volumeI(redeclare package Medium = Medium, h(start=2.83057e6)) annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + T0=573.15, + option_temperature=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-40,20}))); +equation + connect(sourcePQ.C, volumeI.Ce2) annotation (Line(points={{-30,0},{-10,0}}, color={0,0,0})); + connect(sourceQ.C, volumeI.Ce1) annotation (Line(points={{-30,20},{-10,20},{-10,8}}, color={0,0,0})); + connect(volumeI.Cs3, sink.C) annotation (Line(points={{10,-8},{26,-8}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeI_FlueGases; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI_Traces.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI_Traces.mo new file mode 100644 index 00000000..3ee353d0 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/TestVolumeI_Traces.mo @@ -0,0 +1,27 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples.Volumes; +model TestVolumeI_Traces + extends ThermoSysPro.UsersGuide.Icons.Example; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam ( + extraPropertiesNames={"Trace"}, + C_nominal={0.1}, + C_default={0.2}); + ThermoSysPro.Fluid.BoundaryConditions.Sink sink(redeclare replaceable package Medium = Medium) annotation (Placement(transformation(extent={{20,20},{40,40}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourcePQ sourcePQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); + ThermoSysPro.Fluid.Volumes.VolumeI volumeI( + redeclare package Medium = Medium, + V=1, + dynamic_mass_balance=false) annotation (Placement(transformation(extent={{-12,-10},{8,10}}))); + ThermoSysPro.Fluid.BoundaryConditions.SourceQ sourceQ( + redeclare replaceable package Medium = Medium, + Q0=100, + SubC0={0.5}) annotation (Placement(transformation(extent={{-56,18},{-36,38}}))); +equation + connect(volumeI.Cs1, sink.C) annotation (Line(points={{8,8},{8,30},{20,30}}, color={0,0,0})); + connect(sourcePQ.C, volumeI.Ce2) annotation (Line(points={{-30,0},{-12,0}}, color={0,0,0})); + connect(sourceQ.C, volumeI.Ce1) annotation (Line(points={{-36,28},{-12,28},{-12,8}}, color={0,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false))); +end TestVolumeI_Traces; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo new file mode 100644 index 00000000..b6942729 --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.mo @@ -0,0 +1,116 @@ +within ThermoSysPro.Fluid.Examples.SimpleExamples; +package Volumes + + annotation (Icon(graphics={ + Text( + extent={{-102,0},{24,-26}}, + lineColor={242,148,0}, + textString= + "Thermo"), + Text( + extent={{-4,8},{68,-34}}, + lineColor={46,170,220}, + textString= + "SysPro"), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-8,14},{-8,24},{-6,24},{-6,14},{-8,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,30},{-6,26}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,36},{-6,32}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,42},{-6,38}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-8,48},{-6,44}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-4,14},{-4,26},{-2,26},{-2,14},{-4,14}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,32},{-2,28}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,38},{-2,34}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,44},{-2,40}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-4,50},{-2,46}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-2,20},{8,20},{8,22},{10,22},{18,22},{18,12},{-4,14},{-2,20}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, + lineColor={242,148,0}, + fillColor={242,148,0}, + fillPattern=FillPattern.Solid), + Line( + points={{22,12},{22,14},{22,16},{24,14},{20,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{26,12},{26,14},{26,16},{28,14},{24,18}}, + color={46,170,220}, + thickness=0.5), + Line( + points={{30,10},{30,12},{30,14},{32,12},{28,16}}, + color={46,170,220}, + thickness=0.5), + Polygon( + points={{36,8},{36,30},{34,34},{36,38},{40,38},{40,8},{36,8}}, + lineColor={46,170,220}, + fillColor={46,170,220}, + fillPattern=FillPattern.Solid), + Rectangle(extent={{-100,80},{80,-100}}, lineColor={0,0,255}), + Line( + points={{-100,80},{-80,100},{100,100},{100,-80},{80,-100}}, + color={0,0,255}, + smooth=Smooth.None), + Line( + points={{80,80},{100,100}}, + color={0,0,255}, + smooth=Smooth.None)})); +end Volumes; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order new file mode 100644 index 00000000..f8cc92cc --- /dev/null +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/Volumes/package.order @@ -0,0 +1,44 @@ +TestVolumeC +TestVolumeC_FlueGases +TestVolumeC_Traces +TestVolumeA +TestVolumeA_FlueGases +TestVolumeA_Traces +TestVolumeD +TestVolumeD_FlueGases +TestVolumeD_Traces +TestVolumeB +TestVolumeB_FlueGases +TestVolumeB_Traces +TestVolumeI +TestVolumeI_FlueGases +TestVolumeI_Traces +TestVolumeATh +TestVolumeATh_Traces +TestVolumeATh_FlueGases +TestVolumeBTh +TestVolumeBTh_FlueGases +TestVolumeBTh_Traces +TestVolumeCTh +TestVolumeCTh_FlueGases +TestVolumeCTh_Traces +TestVolumeDTh +TestVolumeDTh_FlueGases +TestVolumeDTh_Traces +TestVolumeITh +TestVolumeITh_FlueGases +TestVolumeITh_Traces +TestTank_withPipePressureLosses +TestTank_Traces_withPipePressureLosses +TestTankHorizontal_withPipePressureLosses +TestTankHorizontal_Traces_withPipePressureLosses +TestDynamicDrum +TestDynamicDrum_Traces +TestTwoPhaseVolume +TestTwoPhaseVolume_Traces +TestTwoPhaseCavity +TestTwoPhaseCavity_Traces +TestTwoPhaseCavityOnePipe +TestTwoPhaseCavityOnePipe_Traces +TestPressurizer +TestPressurizer_Traces diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo index 1a2191ef..bb934deb 100644 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.mo @@ -1,7 +1,6 @@ within ThermoSysPro.Fluid.Examples; package SimpleExamples - -annotation (Icon(graphics={ + annotation (Icon(graphics={ Text( extent={{-102,0},{24,-26}}, lineColor={242,148,0}, @@ -13,21 +12,17 @@ annotation (Icon(graphics={ textString= "SysPro"), Polygon( - points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8}, - {52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{ - -62,2}}, + points={{-62,2},{-58,4},{-48,8},{-32,12},{-16,14},{6,14},{26,12},{42,8},{52,2},{42,6},{28,10},{6,12},{-12,12},{-16,12},{-34,10},{-50,6},{-62,2}}, lineColor={46,170,220}, fillColor={46,170,220}, fillPattern=FillPattern.Solid), Polygon( - points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{ - -42,22},{-42,30},{-44,38}}, + points={{-44,38},{-24,38},{-26,30},{-26,22},{-24,14},{-24,12},{-46,8},{-42,22},{-42,30},{-44,38}}, lineColor={46,170,220}, fillColor={46,170,220}, fillPattern=FillPattern.Solid), Polygon( - points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12}, - {-26,12},{-28,12},{-26,20}}, + points={{-26,20},{-20,20},{-20,22},{-14,22},{-14,20},{-12,20},{-12,12},{-26,12},{-28,12},{-26,20}}, lineColor={46,170,220}, fillColor={46,170,220}, fillPattern=FillPattern.Solid), @@ -87,9 +82,7 @@ annotation (Icon(graphics={ fillColor={46,170,220}, fillPattern=FillPattern.Solid), Polygon( - points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6}, - {52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62, - 2}}, + points={{-62,2},{-58,4},{-48,8},{-36,10},{-18,12},{6,12},{26,10},{42,6},{52,0},{42,4},{28,8},{6,10},{-12,10},{-18,10},{-38,8},{-50,6},{-62,2}}, lineColor={242,148,0}, fillColor={242,148,0}, fillPattern=FillPattern.Solid), @@ -118,8 +111,5 @@ annotation (Icon(graphics={ Line( points={{80,80},{100,100}}, color={0,0,255}, - smooth=Smooth.None)}), Documentation(info=" -
Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
-")); + smooth=Smooth.None)})); end SimpleExamples; diff --git a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order index f1d67d76..6f19330f 100644 --- a/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order +++ b/ThermoSysPro/Fluid/Examples/SimpleExamples/package.order @@ -1,86 +1,11 @@ -TestAirHumidity -TestBend -TestBoilerSystem -TestCentrifugalPump1 -TestCheckValve -TestCHPEngineBarkantineSystem -TestCombustionTurbine -TestCompressor -TestDiaphragm -TestDiffusion_DynamicOnePhaseFlowPipe -TestDiffusion_DynamicPlateHeatExchanger -TestDiffusion_DynamicTwoPhaseFlowPipe -TestDiffusion_VolumeA -TestDynamicCheckValve -TestDynamicCondenser -TestDynamicDrum -TestDynamicDrum_CC -TestDynamicFlueGasesMultiFluidHeatExchanger -TestDynamicMultiFluidHeatExchanger -TestDynamicMultiFluidHeatExchangerShell -TestDynamicOnePhaseFlowPipe -TestDynamicOnePhaseFlowShell -TestDynamicPlateHeatExchanger -TestDynamicReliefValve -TestDynamicTwoPhaseFlowPipe -TestDynamicTwoPhaseFlowRiser -TestDynamicWaterHeating -TestDynamicWaterHeatingOnePipe -TestDynamicWaterSteamMultiFluidHeatExchanger -TestFixedPowerHeatExchanger -TestFossilFuelBoiler -TestFresnelField -TestGasTurbine -TestGenericCombustion -TestGenericCombustion1D -TestGridFurnace -TestGTCombustionChamber -TestHeatPumpCompressor -TestIdealCheckValve -TestIdealSwitchValve -TestInternalCombustionEngine -TestInvSingularPressureLoss -TestJunctions1 -TestJunctions2 -TestJunctions3 -TestJunctions4 -TestLoopBreaker -TestMassFlowMultiplier -TestNTUWaterHeater0 -TestPostCombustionGas -TestPressurizer -TestRefP -TestRefP1 -TestSensors -TestSimpleDynamicCondenser -TestSimpleDynamicCondenser1 -TestSimpleEvaporatorWaterSteamFlueGases -TestSimpleStaticCondenser -TestSingularPressureLoss -TestStaticAerocondenser -TestStaticCentrifugalPump1 -TestStaticCondenser -TestStaticCondenserHEI -TestStaticDrum1 -TestStaticDrum2 -TestStaticExchangerDTorWorEff -TestStaticExchangerKS -TestStaticFan -TestStaticPlateHeatExchanger -TestStaticWallFlueGasesExchanger -TestSteamDryer1 -TestSteamDryer2 -TestSteamEngine -TestSteamExtractionSplitter -TestStodolaTurbine1 -TestStodolaTurbine2 -TestSwitchValve -TestTank -TestTankHorizontal -TestThreeWayValve -TestTwoPhaseCavity -TestTwoPhaseCavityOnePipe -TestTwoPhaseVolume -TestVolumeA -TestVolumeA1 -TestVolumeI +Boilers +BoundaryConditions +Combustion +HeatExchangers +Junctions +LoopBreakers +Machines +PressureLosses +Sensors +Volumes +Media diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicCondenser.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicCondenser.mo index 78f20d96..4615b798 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicCondenser.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicCondenser.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicCondenser "Dynamic condenser" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condensing cavity" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cooling pipes" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Radius Rv=1.0 "Radius of the Cavity cross-sectional area"; parameter Units.SI.Length Lv=15 "Cavity length"; @@ -45,6 +45,7 @@ model DynamicCondenser "Dynamic condenser" parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; Volumes.TwoPhaseCavityOnePipe DynamicCondenser( + redeclare package Medium = Medium, Vf0=Vf0, P0=P0c, Ns=Ns, @@ -56,7 +57,6 @@ model DynamicCondenser "Dynamic condenser" R=Rv, L=Lv, Vertical=true, - wsftype=wsftype, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, continuous_flow_reversal=continuous_flow_reversal, @@ -64,6 +64,7 @@ model DynamicCondenser "Dynamic condenser" annotation ( Placement(transformation(extent={{-100,-100}, {100,100}}, rotation=0))); DynamicOnePhaseFlowPipe pipe_3( + redeclare package Medium = Medium_Cooling, D=Dc, L=L2, ntubes=ntubest, @@ -80,20 +81,20 @@ model DynamicCondenser "Dynamic condenser" T0=T0, h0=h0) annotation (Placement(transformation(extent={{-58,-20},{54,18}}, rotation=0))); - Interfaces.Connectors.FluidInlet C1vap "Vapor inlet" annotation (Placement( + Interfaces.Connectors.FluidInlet C1vap(redeclare package Medium = Medium) "Vapor inlet" annotation (Placement( transformation(extent={{-10,90},{10,110}}, rotation=0))); - Interfaces.Connectors.FluidOutlet C2ex "Condensed water extraction outlet" + Interfaces.Connectors.FluidOutlet C2ex(redeclare package Medium = Medium) "Condensed water extraction outlet" annotation (Placement(transformation(extent={{-10,-110},{10,-90}}, rotation= 0))); - Interfaces.Connectors.FluidInlet Ce1 "Cooling water inlet" annotation ( + Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium_Cooling) "Cooling water inlet" annotation ( Placement(transformation(extent={{-110,-11},{-90,9}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Ce2 "Cooling water outlet" annotation ( + Interfaces.Connectors.FluidOutlet Ce2(redeclare package Medium = Medium_Cooling) "Cooling water outlet" annotation ( Placement(transformation(extent={{89,-11},{109,9}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal sortieReelle annotation (Placement(transformation(extent={{98,-62},{118,-42}}, rotation= 0))); - Interfaces.Connectors.FluidInlet C1 "Extra water inlet" annotation ( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) "Extra water inlet" annotation ( Placement(transformation(extent={{-91,65},{-71,85}}, rotation=0), iconTransformation(extent={{-91,65},{-71,85}}))); Thermal.HeatTransfer.HeatExchangerWall Wall_3( @@ -108,7 +109,7 @@ model DynamicCondenser "Dynamic condenser" dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state) annotation (Placement(transformation(extent={{-58,-4},{54,40}}, rotation=0))); - Interfaces.Connectors.FluidInlet C2vap "Vapor inlet" annotation (Placement( + Interfaces.Connectors.FluidInlet C2vap(redeclare package Medium = Medium) "Vapor inlet" annotation (Placement( transformation(extent={{-49,82},{-29,102}}, rotation=0), iconTransformation(extent={{-49,82},{-29,102}}))); equation @@ -119,11 +120,8 @@ equation C1.h_vol_1 = 1.e5; C1.diff_res_1 = 0; C1.diff_on_1 = false; - C1.ftype = ftype; - C1.Xco2 = 0; - C1.Xh2o = 0; - C1.Xo2 = 0; - C1.Xso2 = 0; + C1.Xi = Medium.X_default[1:Medium.nXi]; + C1.SubC = Medium.C_default; end if; if (cardinality(C2vap) == 1) then @@ -132,11 +130,8 @@ equation C2vap.h_vol_1 = 1.e5; C2vap.diff_res_1 = 0; C2vap.diff_on_1 = false; - C2vap.ftype = ftype; - C2vap.Xco2 = 0; - C2vap.Xh2o = 0; - C2vap.Xo2 = 0; - C2vap.Xso2 = 0; + C2vap.Xi = Medium.X_default[1:Medium.nXi]; + C2vap.SubC = Medium.C_default; end if; connect(DynamicCondenser.Cl, C2ex) diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicFlueGasesMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicFlueGasesMultiFluidHeatExchanger.mo index fd87f70f..75b5109b 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicFlueGasesMultiFluidHeatExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicFlueGasesMultiFluidHeatExchanger.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicFlueGasesMultiFluidHeatExchanger "Dynamic flue gases - water/steam heat exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the flue gases side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=1 "Exchanger length"; parameter Units.SI.Position z1=0 "Exchanger inlet altitude"; @@ -35,10 +36,10 @@ model DynamicFlueGasesMultiFluidHeatExchanger "Dynamic flue gases - water/steam parameter Boolean option_temperature=true "true: initial temperature is fixed - false: initial specific enthalpy is fixed (active if steady_state=false)" annotation(Evaluate=true, Dialog(enable=not steady_state)); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); StaticWallFlueGasesExchanger ExchangerFlueGasesMetal( + redeclare package Medium = Medium_FlueGases, Dext=0.022, Ns=Ns, NbTub=Ntubes, @@ -60,6 +61,7 @@ model DynamicFlueGasesMultiFluidHeatExchanger "Dynamic flue gases - water/steam T0=T0[1]) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0))); Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe TwoPhaseFlowPipe( + redeclare package Medium = Medium, L=L, D=Dint, ntubes=Ntubes, @@ -79,13 +81,13 @@ model DynamicFlueGasesMultiFluidHeatExchanger "Dynamic flue gases - water/steam h0=h0) annotation (Placement(transformation(extent={{-10,-30},{10,-10}}, rotation= 0))); - Interfaces.Connectors.FluidInlet Cfg1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cfg1(redeclare package Medium = Medium_FlueGases) annotation (Placement(transformation( extent={{-10,40},{10,60}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cfg2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cfg2(redeclare package Medium = Medium_FlueGases) annotation (Placement(transformation( extent={{-10,-60},{10,-40}}, rotation=0))); - Interfaces.Connectors.FluidInlet Cws1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cws2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{90,-10},{110,10}}, rotation=0))); equation connect(Cws2, TwoPhaseFlowPipe.C2) diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchanger.mo index 524ae21b..fe49ab75 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchanger.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicMultiFluidHeatExchanger "Dynamic one-phase heat exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_1 = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for fluid 1" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_2 = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for fluid 2" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=1 "Exchanger length"; parameter Units.SI.Position z1=0 "Exchanger inlet altitude"; @@ -51,9 +52,9 @@ model DynamicMultiFluidHeatExchanger "Dynamic one-phase heat exchanger" "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); DynamicOnePhaseFlowPipe DynamicOnePhaseFlowPipe_2( + redeclare package Medium = Medium_2, Ns=Ns, L=L, ntubes=Ntubes, @@ -68,7 +69,6 @@ model DynamicMultiFluidHeatExchanger "Dynamic one-phase heat exchanger" option_temperature=option_temperature, diffusion=diffusion, simplified_dynamic_energy_balance=simplified_dynamic_energy_balance, - region=region, P0=P0, z1=z1, z2=z2, @@ -90,6 +90,7 @@ model DynamicMultiFluidHeatExchanger "Dynamic one-phase heat exchanger" lambda=lambda) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0))); Fluid.HeatExchangers.DynamicOnePhaseFlowPipe DynamicOnePhaseFlowPipe_1( + redeclare package Medium = Medium_1, ntubes=Ntubes, Ns=Ns, T0=T0, @@ -103,7 +104,6 @@ model DynamicMultiFluidHeatExchanger "Dynamic one-phase heat exchanger" option_temperature=option_temperature, continuous_flow_reversal=continuous_flow_reversal, diffusion=diffusion, - region=region, P0=P0, L=L, D=Dint, @@ -111,13 +111,13 @@ model DynamicMultiFluidHeatExchanger "Dynamic one-phase heat exchanger" z1=z1, z2=z2) annotation (Placement(transformation(extent={{-10,-30},{10,-10}}, rotation=0))); - Interfaces.Connectors.FluidInlet Cfg1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cfg1(redeclare package Medium = Medium_2) annotation (Placement(transformation( extent={{-10,40},{10,60}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cfg2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cfg2(redeclare package Medium = Medium_2) annotation (Placement(transformation( extent={{-10,-60},{10,-40}}, rotation=0))); - Interfaces.Connectors.FluidInlet Cws1 annotation ( + Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium_1) annotation ( Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cws2 annotation ( + Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium_1) annotation ( Placement(transformation(extent={{90,-10},{110,10}}, rotation=0))); equation connect(Cws2, DynamicOnePhaseFlowPipe_1.C2) annotation (Line( diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchangerShell.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchangerShell.mo index 22151929..3d06449f 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchangerShell.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicMultiFluidHeatExchangerShell.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicMultiFluidHeatExchangerShell "Dynamic one-phase heat exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_shell = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for shell-side fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_pipe = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for pipe-side fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=1 "Exchanger length"; parameter Units.SI.Position z1=0 "Exchanger inlet altitude"; @@ -41,10 +42,10 @@ model DynamicMultiFluidHeatExchangerShell "Dynamic one-phase heat exchanger" "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowShell dynamicOnePhaseFlowShell( + redeclare package Medium = Medium_shell, Ns=Ns, L=L, ntubes=Ntubes, @@ -59,8 +60,7 @@ model DynamicMultiFluidHeatExchangerShell "Dynamic one-phase heat exchanger" advection=advection, diffusion=diffusion, T0=T0, - h0=h0, - region=region) + h0=h0) annotation (Placement(transformation(extent={{-10,30},{10,10}}, rotation=0))); ThermoSysPro.Thermal.HeatTransfer.HeatExchangerWall ExchangerWall( @@ -72,6 +72,7 @@ model DynamicMultiFluidHeatExchangerShell "Dynamic one-phase heat exchanger" steady_state=steady_state) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0))); Fluid.HeatExchangers.DynamicOnePhaseFlowPipe DynamicOnePhaseFlowPipe( + redeclare package Medium = Medium_pipe, L=L, D=Dint, ntubes=Ntubes, @@ -89,17 +90,16 @@ model DynamicMultiFluidHeatExchangerShell "Dynamic one-phase heat exchanger" dynamic_mass_balance=dynamic_mass_balance, T0=T0, h0=h0, - P0=P0, - region=region) + P0=P0) annotation (Placement(transformation(extent={{-10,-30},{10,-10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cfg1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cfg1(redeclare package Medium = Medium_shell) annotation ( Placement(transformation(extent={{-10,40},{10,60}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cfg2 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cfg2(redeclare package Medium = Medium_shell) annotation ( Placement(transformation(extent={{-10,-60},{10,-40}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cws1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium_pipe) annotation ( Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cws2 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium_pipe) annotation ( Placement(transformation(extent={{90,-10},{110,10}}, rotation=0))); equation connect(Cws2, DynamicOnePhaseFlowPipe.C2) annotation (Line( diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowPipe.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowPipe.mo index 56cc2ce2..17a39810 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowPipe.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowPipe.mo @@ -1,9 +1,8 @@ -within ThermoSysPro.Fluid.HeatExchangers; +within ThermoSysPro.Fluid.HeatExchangers; model DynamicOnePhaseFlowPipe "Dynamic one-phase flow pipe" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=10. "Pipe length"; parameter Units.SI.Diameter D=0.2 "Internal pipe diameter"; parameter Real rugosrel=0.0007 "Pipe relative roughness"; @@ -43,12 +42,10 @@ model DynamicOnePhaseFlowPipe "Dynamic one-phase flow pipe" "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Integer N=Ns + 1 "Number of hydraulic nodes (= number of thermal nodes + 1)"; parameter Units.SI.Area A=ntubes*pi*D^2/4 "Internal cross sectional pipe area"; @@ -122,12 +119,9 @@ public "Friction pressure loss coefficient in node i"; Units.SI.DerDensityByPressure ddph[N - 1] "Density derivative wrt. pressure"; Units.SI.DerDensityByEnthalpy ddhp[N - 1] "Density derivative srt. enthalpy"; - FluidType ftype "Fluid type"; - Integer fluid=Integer(ftype) "Fluid number"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H2O mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Medium.ThermodynamicState state1[N - 1]; + Medium.ThermodynamicState state2[N]; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions"; Real diff_res[N] "Diffusion resistance in hydraulic node i"; Real diff_res_t "Total diffusion resistance in the pipe"; Real diff_res_e[N - 1] "Diffusion resistance at inlet of thermal node i"; @@ -147,9 +141,9 @@ public Real rs[N - 1] "Value of r(Q/gamma) for outlet of thermal node i"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); ThermoSysPro.Thermal.Connectors.ThermalPort CTh[Ns] annotation (Placement(transformation(extent={{-10,20},{10,40}}, rotation=0))); @@ -162,7 +156,7 @@ initial equation else if option_temperature then for i in 2:N loop - h[i] = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P0, T0[i-1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + h[i] = Medium.specificEnthalpy_pTX(P0, T0[i-1], X); end for; else for i in 2:N loop @@ -212,19 +206,11 @@ equation C2.diff_res_1 = C1.diff_res_1 + diff_res_t; C1.diff_res_2 = C2.diff_res_2 + diff_res_t; - C1.ftype = C2.ftype; + C1.SubC = C2.SubC; - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; + C1.Xi = C2.Xi; - ftype = C1.ftype; - - Xco2 = C1.Xco2; - Xh2o = C1.Xh2o; - Xo2 = C1.Xo2; - Xso2 = C1.Xso2; + X = C1.Xi; /* Mass and energy balance equations (thermal nodes) */ for i in 1:N - 1 loop @@ -318,14 +304,15 @@ equation end if; /* Fluid thermodynamic properties */ - ddph[i] = ThermoSysPro.Properties.Fluid.Density_derp_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - ddhp[i] = ThermoSysPro.Properties.Fluid.Density_derh_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - - rho1[i] = ThermoSysPro.Properties.Fluid.Density_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - T1[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - cp1[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - mu1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - k1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + state1[i] = Medium.setState_phX(p=P[i + 1], h=h[i + 1], X=X); + ddph[i] = Medium.density_derp_h(state1[i]); + ddhp[i] = Medium.density_derh_p(state1[i]); + + rho1[i] = Medium.density(state1[i]); + T1[i] = Medium.temperature(state1[i]); + cp1[i] = Medium.specificHeatCapacityCp(state1[i]); + mu1[i] = Medium.dynamicViscosity(state1[i]); + k1[i] = Medium.thermalConductivity(state1[i]); end for; /* Momentum balance equations (hydraulic nodes) */ @@ -359,11 +346,13 @@ equation gamma[i] = if diffusion then 1/diff_res[i] else gamma0; /* Fluid thermodynamic properties */ - rho2[i] = ThermoSysPro.Properties.Fluid.Density_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - T2[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - cp2[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - mu2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - k2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + state2[i] = Medium.setState_phX(p=(P[i] + P[i + 1])/2, h=hb[i], X=X); + + rho2[i] = Medium.density(state2[i]); + T2[i] = Medium.temperature(state2[i]); + cp2[i] = Medium.specificHeatCapacityCp(state2[i]); + mu2[i] = Medium.dynamicViscosity(state2[i]); + k2[i] = Medium.thermalConductivity(state2[i]); end for; /* Fluid densities at the boundaries of the nodes */ @@ -371,8 +360,8 @@ equation rhoc[i] = rho1[i - 1]; end for; - rhoc[1] = ThermoSysPro.Properties.Fluid.Density_Ph(P[1],h[1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - rhoc[N + 1] = ThermoSysPro.Properties.Fluid.Density_Ph((P[N + 1]), h[N + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + rhoc[1] = Medium.density_phX(p=P[1],h=h[1],X=X); + rhoc[N + 1] = Medium.density_phX(p=P[N + 1],h=h[N + 1],X=X); W1t = sum(dW1); diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowShell.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowShell.mo index a5aff1ce..9586a99a 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowShell.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicOnePhaseFlowShell.mo @@ -1,8 +1,8 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicOnePhaseFlowShell "Dynamic one-phase flow shell" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Integer option_arrangement = 1 "1:triangle - 2: square"; parameter Units.SI.Length L=12 "Shell length"; @@ -31,12 +31,10 @@ model DynamicOnePhaseFlowShell "Dynamic one-phase flow shell" parameter Boolean option_temperature=true "true: initial temperature is fixed - false: initial specific enthalpy is fixed (active if steady_state=false)" annotation(Evaluate=true, Dialog(enable=not steady_state)); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Integer Nb = integer(floor(L/B)); parameter Units.SI.Distance dt=dc - De "Distance between two tubes"; parameter Integer N=Ns + 1 "Number of hydraulic nodes (= number of thermal nodes + 1)"; @@ -116,12 +114,9 @@ public "Friction pressure loss coefficient in node i"; Units.SI.DerDensityByPressure ddph[N - 1] "Density derivative wrt. pressure"; Units.SI.DerDensityByEnthalpy ddhp[N - 1] "Density derivative wrt. enthalpy"; - FluidType ftype "Fluid type"; - Integer fluid=Integer(ftype) "Fluid number"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H2O mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Medium.ThermodynamicState state1[N - 1]; + Medium.ThermodynamicState state2[N]; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions"; Real diff_res[N] "Diffusion resistance in hydraulic node i"; Real diff_res_t "Total diffusion resistance in the pipe"; Real diff_res_e[N - 1] "Diffusion resistance at inlet of thermal node i"; @@ -141,9 +136,9 @@ public Real rs[N - 1] "Value of r(Q/gamma) for outlet of thermal node i"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); ThermoSysPro.Thermal.Connectors.ThermalPort CTh[Ns] annotation (Placement(transformation(extent={{-10,20},{10,40}}, rotation=0))); @@ -156,7 +151,7 @@ initial equation else if option_temperature then for i in 2:N loop - h[i] = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P[i], T0[i - 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + h[i] = Medium.specificEnthalpy_pTX(P[i], T0[i - 1], X); end for; else for i in 2:N loop @@ -209,19 +204,11 @@ equation C2.diff_res_1 = C1.diff_res_1 + diff_res_t; C1.diff_res_2 = C2.diff_res_2 + diff_res_t; - C1.ftype = C2.ftype; - - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; + C1.SubC = C2.SubC; - ftype = C1.ftype; + C1.Xi = C2.Xi; - Xco2 = C1.Xco2; - Xh2o = C1.Xh2o; - Xo2 = C1.Xo2; - Xso2 = C1.Xso2; + X = C1.Xi; /* Mass and energy balance equations (thermal nodes) */ for i in 1:N - 1 loop @@ -310,15 +297,16 @@ equation end if; /* Fluid thermodynamic properties */ - ddph[i] = ThermoSysPro.Properties.Fluid.Density_derp_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - ddhp[i] = ThermoSysPro.Properties.Fluid.Density_derh_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + state1[i] = Medium.setState_phX(p=P[i + 1], h=h[i + 1], X=X); + ddph[i] = Medium.density_derp_h(state1[i]); + ddhp[i] = Medium.density_derh_p(state1[i]); - rho1[i] = ThermoSysPro.Properties.Fluid.Density_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - T1[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - cp1[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + rho1[i] = Medium.density(state1[i]); + T1[i] = Medium.temperature(state1[i]); + cp1[i] = Medium.specificHeatCapacityCp(state1[i]); - mu1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - k1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph(P[i + 1], h[i + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + mu1[i] = Medium.dynamicViscosity(state1[i]); + k1[i] = Medium.thermalConductivity(state1[i]); end for; /* Momentum balance equations (hydraulic nodes) */ @@ -350,11 +338,13 @@ equation gamma[i] = if diffusion then 1/diff_res[i] else gamma0; /* Fluid thermodynamic properties */ - rho2[i] = ThermoSysPro.Properties.Fluid.Density_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - T2[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph((P[i] + P[i + 1])/2,hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - cp2[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - mu2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - k2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph((P[i] + P[i + 1])/2, hb[i], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + state2[i] = Medium.setState_phX(p=(P[i] + P[i + 1])/2, h=hb[i], X=X); + + rho2[i] = Medium.density(state2[i]); + T2[i] = Medium.temperature(state2[i]); + cp2[i] = Medium.specificHeatCapacityCp(state2[i]); + mu2[i] = Medium.dynamicViscosity(state2[i]); + k2[i] = Medium.thermalConductivity(state2[i]); end for; /* Fluid densities at the boundaries of the nodes */ @@ -362,8 +352,8 @@ equation rhoc[i] = rho1[i - 1]; end for; - rhoc[1] = ThermoSysPro.Properties.Fluid.Density_Ph(P[1], h[1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); - rhoc[N + 1] = ThermoSysPro.Properties.Fluid.Density_Ph((P[N + 1]), h[N + 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + rhoc[1] = Medium.density(Medium.setState_phX(p=P[1], h=h[1], X=X)); + rhoc[N + 1] = Medium.density(Medium.setState_phX(p=P[N + 1], h=h[N + 1], X=X)); W1t = sum(dW1); diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicPlateHeatExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicPlateHeatExchanger.mo index de113766..04b48756 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicPlateHeatExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicPlateHeatExchanger.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicPlateHeatExchanger "Dynamic plate heat exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_c = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the hot fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_f = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cold fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.ThermalConductivity lambdam=15.0 "Metal thermal conductivity"; @@ -63,14 +64,10 @@ model DynamicPlateHeatExchanger "Dynamic plate heat exchanger" parameter Units.SI.Density p_rhof=0 "If > 0, fixed fluid density for the cold fluid" annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties")); - parameter IF97Region region_c=IF97Region.All_regions "Hot fluid IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype_c==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "Cold fluid IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype_f==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer mode_c=Integer(region_c) - 1 "Hot fluid IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "Cold fluid IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Integer N=Ns + 1 "Number of hydraulic nodes (= number of thermal nodes + 1)"; parameter Units.SI.Area Ac=1 "Internal cross sectional pipe area for the hot fluid"; @@ -174,18 +171,16 @@ public Units.SI.Temperature Tsc "Fluid temperature at the hot outlet"; Units.SI.Temperature Tef "Fluid temperature at the cold inlet"; Units.SI.Temperature Tsf "Fluid temperature at the cold outlet"; - FluidType ftype_c "Hot fluid type"; - FluidType ftype_f "Cold fluid type"; - Integer fluid_c=Integer(ftype_c) "Hot fluid number"; - Integer fluid_f=Integer(ftype_f) "Cold fluid number"; - ThermoSysPro.Units.SI.MassFraction Xco2_c "Hot fluid CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xco2_f "Cold fluid CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o_c "Hot fluid H2O mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o_f "Cold fluid H2O mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2_c "Hot fluid O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2_f "Cold fluid O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2_c "Hot fluid SO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2_f "Cold fluid SO2 mass fraction"; + Medium_c.MassFraction Xc[Medium_c.nXi](start=Medium_c.X_default[1:Medium_c.nXi]) "Mass fractions of the hot fluid"; + Medium_f.MassFraction Xf[Medium_f.nXi](start=Medium_f.X_default[1:Medium_f.nXi]) "Mass fractions of the cold fluid"; + Medium_c.ThermodynamicState state_c1[N - 1] "Hot fluid thermodynamic state in thermal node i"; + Medium_f.ThermodynamicState state_f1[N - 1] "Cold fluid thermodynamic state in thermal node i"; + Medium_c.ThermodynamicState state_c2[N] "Hot fluid thermodynamic state in hydraulic node i"; + Medium_f.ThermodynamicState state_f2[N] "Cold fluid thermodynamic state in hydraulic node i"; + Medium_c.ThermodynamicState state_ce "Thermodynamic state of the hot fluid at the inlet"; + Medium_c.ThermodynamicState state_cs "Thermodynamic state of the hot fluid at the outlet"; + Medium_f.ThermodynamicState state_fe "Thermodynamic state of the cold fluid at the inlet"; + Medium_f.ThermodynamicState state_fs "Thermodynamic state of the cold fluid at the outlet"; Real diff_res_c[N] "Diffusion resistance in hydraulic node i for the hot fluid"; Real diff_res_f[N] "Diffusion resistance in hydraulic node i for the cold fluid"; Real diff_res_t_c "Total diffusion resistance in the pipe for the hot fluid"; @@ -224,13 +219,13 @@ public Real rs_f[N - 1] "Value of r(Q/gamma) for outlet of thermal node i for the cold fluid"; public - Interfaces.Connectors.FluidInlet Ec annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ec(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ef annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ef(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{-60,-70},{-40,-50}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sf annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sf(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{40,-70},{60,-50}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sc annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sc(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{90,-10},{110,10}}, rotation=0))); initial equation if dynamic_energy_balance then @@ -242,8 +237,8 @@ initial equation else if option_temperature then for i in 2:N loop - hc[i] = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Pc0, Tc0[i - 1], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - hf[i] = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Pf0, Tf0[i - 1], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); + hc[i] = Medium_c.specificEnthalpy(Medium_c.setState_pTX(p=Pc0, T=Tc0[i - 1], X=Medium_c.X_default)); + hf[i] = Medium_f.specificEnthalpy(Medium_f.setState_pTX(p=Pf0, T=Tf0[i - 1], X=Medium_f.X_default)); end for; else for i in 2:N loop @@ -299,31 +294,14 @@ equation Sf.diff_res_1 = Ef.diff_res_1 + diff_res_t_f; Ef.diff_res_2 = Sf.diff_res_2 + diff_res_t_f; - Ec.ftype = Sc.ftype; - Sf.ftype = Ef.ftype; - - Ec.Xco2 = Sc.Xco2; - Ec.Xh2o = Sc.Xh2o; - Ec.Xo2 = Sc.Xo2; - Ec.Xso2 = Sc.Xso2; - - Sf.Xco2 = Ef.Xco2; - Sf.Xh2o = Ef.Xh2o; - Sf.Xo2 = Ef.Xo2; - Sf.Xso2 = Ef.Xso2; + Ec.Xi = Sc.Xi; + Ec.SubC = Sc.SubC; - ftype_c = Ec.ftype; - ftype_f = Sf.ftype; + Sf.Xi = Ef.Xi; + Sf.SubC = Ef.SubC; - Xco2_c = Ec.Xco2; - Xh2o_c = Ec.Xh2o; - Xo2_c = Ec.Xo2; - Xso2_c = Ec.Xso2; - - Xco2_f = Sf.Xco2; - Xh2o_f = Sf.Xh2o; - Xo2_f = Sf.Xo2; - Xso2_f = Sf.Xso2; + Xc = Ec.Xi; + Xf = Ef.Xi; /* Exchange area for the plate exchanger */ dS = (nbp - 2)*Sp/(N - 1); @@ -457,26 +435,28 @@ equation if (p_rhoc > 0) then rhoc1[i] = p_rhoc; else - rhoc1[i] = ThermoSysPro.Properties.Fluid.Density_Ph(Pc[i + 1], hc[i + 1], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); + rhoc1[i] = Medium_c.density(state_c1[i]); end if; - Tc1[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pc[i + 1], hc[i + 1], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - cpc1[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Pc[i + 1], hc[i + 1], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - muc1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph(Pc[i + 1], hc[i + 1], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - kc1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph(Pc[i + 1], hc[i + 1], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - lambdac1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhoc1[i], Tc1[i], Pc[i + 1], 0, fluid_c); + state_c1[i] = Medium_c.setState_phX(p=Pc[i + 1], h=hc[i + 1], X=Xc); + Tc1[i] = Medium_c.temperature(state_c1[i]); + cpc1[i] = Medium_c.specificHeatCapacityCp(state_c1[i]); + muc1[i] = Medium_c.dynamicViscosity(state_c1[i]); + kc1[i] = Medium_c.thermalConductivity(state_c1[i]); + lambdac1[i] = Medium_c.thermalConductivity(state_c1[i]); if (p_rhof > 0) then rhof1[i] = p_rhof; else - rhof1[i] = ThermoSysPro.Properties.Fluid.Density_Ph(Pf[i + 1], hf[i + 1], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); + rhof1[i] = Medium_f.density(state_f1[i]); end if; - Tf1[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pf[i + 1], hf[i + 1], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - cpf1[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Pf[i + 1], hf[i + 1], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - muf1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph(Pf[i + 1], hf[i + 1], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - kf1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph(Pf[i + 1], hf[i + 1], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - lambdaf1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhof1[i], Tf1[i], Pf[i + 1], 0, fluid_f); + state_f1[i] = Medium_f.setState_phX(p=Pf[i + 1], h=hf[i + 1], X=Xf); + Tf1[i] = Medium_f.temperature(state_f1[i]); + cpf1[i] = Medium_f.specificHeatCapacityCp(state_f1[i]); + muf1[i] = Medium_f.dynamicViscosity(state_f1[i]); + kf1[i] = Medium_f.thermalConductivity(state_f1[i]); + lambdaf1[i] = Medium_f.thermalConductivity(state_f1[i]); end for; /* Pressure losses correlations */ @@ -517,32 +497,38 @@ equation if (p_rhoc > 0) then rhoc2[i] = p_rhoc; else - rhoc2[i] = ThermoSysPro.Properties.Fluid.Density_Ph((Pc[i] + Pc[i + 1])/2, hbc[i], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); + rhoc2[i] = Medium_c.density(state_c2[i]); end if; - Tc2[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph((Pc[i] + Pc[i + 1])/2, hbc[i], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - cpc2[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph((Pc[i] + Pc[i + 1])/2, hbc[i], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - muc2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph((Pc[i] + Pc[i + 1])/2, hbc[i], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - kc2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph((Pc[i] + Pc[i + 1])/2, hbc[i], fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); + state_c2[i] = Medium_c.setState_phX(p=(Pc[i] + Pc[i + 1])/2, h=hbc[i], X=Xc); + Tc2[i] = Medium_c.temperature(state_c2[i]); + cpc2[i] = Medium_c.specificHeatCapacityCp(state_c2[i]); + muc2[i] = Medium_c.dynamicViscosity(state_c2[i]); + kc2[i] = Medium_c.thermalConductivity(state_c2[i]); if (p_rhof > 0) then rhof2[i] = p_rhof; else - rhof2[i] = ThermoSysPro.Properties.Fluid.Density_Ph((Pf[i] + Pf[i + 1])/2, hbf[i], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); + rhof2[i] = Medium_f.density(state_f2[i]); end if; - Tf2[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph((Pf[i] + Pf[i + 1])/2, hbf[i], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - cpf2[i] = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph((Pf[i] + Pf[i + 1])/2, hbf[i], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - muf2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_Ph((Pf[i] + Pf[i + 1])/2, hbf[i], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - kf2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph((Pf[i] + Pf[i + 1])/2, hbf[i], fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); + state_f2[i] = Medium_f.setState_phX(p=(Pf[i] + Pf[i + 1])/2, h=hbf[i], X=Xf); + Tf2[i] = Medium_f.temperature(state_f2[i]); + cpf2[i] = Medium_f.specificHeatCapacityCp(state_f2[i]); + muf2[i] = Medium_f.dynamicViscosity(state_f2[i]); + kf2[i] = Medium_f.thermalConductivity(state_f2[i]); end for; /* Calcul des températures en entrée et en sortie de l'échangeur */ - Tec = ThermoSysPro.Properties.Fluid.Temperature_Ph(Ec.P, Ec.h, fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - Tsc = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sc.P, Sc.h, fluid_c, mode_c, Xco2_c, Xh2o_c, Xo2_c, Xso2_c); - - Tef = ThermoSysPro.Properties.Fluid.Temperature_Ph(Ef.P, Ef.h, fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); - Tsf = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sf.P, Sf.h, fluid_f, mode_f, Xco2_f, Xh2o_f, Xo2_f, Xso2_f); + state_ce = Medium_c.setState_phX(p=Ec.P, h=Ec.h, X=Xc); + state_cs = Medium_c.setState_phX(p=Sc.P, h=Sc.h, X=Xc); + Tec = Medium_c.temperature(state_ce); + Tsc = Medium_c.temperature(state_cs); + + state_fe = Medium_f.setState_phX(p=Ef.P, h=Ef.h, X=Xf); + state_fs = Medium_f.setState_phX(p=Sf.P, h=Sf.h, X=Xf); + Tef = Medium_f.temperature(state_fe); + Tsf = Medium_f.temperature(state_fs); /* Total fluid diffusion resistance */ diff_res_t_c = sum(diff_res_c); diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowPipe.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowPipe.mo index 796c3ef6..6b445671 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowPipe.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowPipe.mo @@ -1,8 +1,8 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicTwoPhaseFlowPipe "Dynamic two-phase flow pipe" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=10. "Pipe length"; parameter Units.SI.Diameter D=0.2 "Internal pipe diameter"; @@ -41,12 +41,10 @@ model DynamicTwoPhaseFlowPipe "Dynamic two-phase flow pipe" "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Integer N=Ns + 1 "Number of hydraulic nodes (= number of thermal nodes + 1)"; parameter Units.SI.Area A=ntubes*pi*D^2/4 @@ -57,12 +55,9 @@ protected parameter Units.SI.Area dSi=pi*Di*dx1 "Internal heat exchange area for a node"; parameter Real Mmol=18.015 "Water molar mass"; - parameter Units.SI.AbsolutePressure pcrit=ThermoSysPro.Properties.WaterSteam.BaseIF97.data.PCRIT - "Critical pressure"; - parameter Units.SI.Temperature Tcrit=ThermoSysPro.Properties.WaterSteam.BaseIF97.data.TCRIT - "Critical temperature"; - parameter Units.SI.AbsolutePressure ptriple=ThermoSysPro.Properties.WaterSteam.BaseIF97.triple.ptriple - "Triple point pressure"; + parameter Units.SI.AbsolutePressure pcrit=Medium.fluidConstants[1].criticalPressure "Critical pressure"; + parameter Units.SI.Temperature Tcrit=Medium.fluidConstants[1].criticalTemperature "Critical temperature"; + parameter Units.SI.AbsolutePressure ptriple=Medium.fluidConstants[1].triplePointPressure "Triple point pressure"; parameter Real xb1=0.0002 "Min value for vapor mass fraction"; parameter Real xb2=0.85 "Max value for vapor mass fraction"; parameter Units.SI.MassFlowRate gamma0=1.e-4 @@ -183,12 +178,14 @@ public Real lambdav[N](start=fill(0.03, N), nominal=fill(0.03, N)) "Friction pressure loss coefficient in node i for the vapor)"; Real filo[N] "Pressure loss coefficient for two-phase flow"; - FluidType ftype "Fluid type"; - Integer fluid=Integer(ftype) "Fluid number"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H2O mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Units.SI.DerDensityByPressure ddph[N - 1] "Density derivative wrt. pressure"; + Units.SI.DerDensityByEnthalpy ddhp[N - 1] "Density derivative wrt. enthalpy"; + Medium.ThermodynamicState state1[N - 1]; + Medium.ThermodynamicState state2[N]; + Medium.ThermodynamicState state_c[2]; + Medium.SaturationProperties sat1[N - 1]; + Medium.SaturationProperties sat2[N]; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions"; Real diff_res_l[N] "Diffusion resistance in hydraulic node i for the liquid"; Real diff_res_v[N] "Diffusion resistance in hydraulic node i for the vapor"; Real diff_res[N] "Total diffusion resistance in hydraulic node i"; @@ -209,32 +206,12 @@ public Real re[N - 1] "Value of r(Q/gamma) for inlet of thermal node i"; Real rs[N - 1] "Value of r(Q/gamma) for outlet of thermal node i"; - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro1[N - 1] - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proc[2] - annotation (Placement(transformation(extent={{-20,80},{0,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro2[N] - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat2[N] - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat2[N] - annotation (Placement(transformation(extent={{40,-100},{60,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat1[N - 1] - annotation (Placement(transformation(extent={{-60,-100},{-40,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat1[N - 1] - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}, - rotation=0))); public - Interfaces.Connectors.FluidInlet C1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); ThermoSysPro.Thermal.Connectors.ThermalPort CTh[Ns] annotation (Placement(transformation(extent={{-10,20},{10,40}}, rotation=0))); - Interfaces.Connectors.FluidOutlet C2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{90,-10},{110,10}}, rotation=0))); initial equation if dynamic_energy_balance then @@ -245,7 +222,7 @@ initial equation else if option_temperature then for i in 2:N loop - h[i] = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Pb[i], T0[i - 1], fluid, mode, Xco2, Xh2o, Xo2, Xso2); + h[i] = Medium.specificEnthalpy_pTX(Pb[i], T0[i - 1], X); end for; else for i in 2:N loop @@ -269,9 +246,6 @@ initial equation equation - /* Check that the fluid type is water/steam */ - assert((ftype == FluidType.WaterSteam) or (ftype == FluidType.WaterSteamSimple), "DynamicTwoPhaseFlowPipe: the fluid type must be water/steam"); - /* Wall temperature */ Tp1 = CTh.T; CTh.W = dW1; @@ -301,19 +275,9 @@ equation C2.diff_res_1 = C1.diff_res_1 + diff_res_t; C1.diff_res_2 = C2.diff_res_2 + diff_res_t; - C1.ftype = C2.ftype; - - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; - - ftype = C1.ftype; - - Xco2 = C1.Xco2; - Xh2o = C1.Xh2o; - Xo2 = C1.Xo2; - Xso2 = C1.Xso2; + C1.Xi = C2.Xi; + X = C1.Xi; + C1.SubC = C2.SubC; /* Mass and energy balance equations (thermal nodes) */ for i in 1:N - 1 loop @@ -321,7 +285,7 @@ equation BQ[i] = Q[i] - Q[i + 1]; if dynamic_energy_balance and dynamic_mass_balance then - A*(pro1[i].ddph*der(P[i + 1]) + pro1[i].ddhp*der(h[i + 1]))*dx1 = BQ[i]; + A*(ddph[i]*der(P[i + 1]) + ddhp[i]*der(h[i + 1]))*dx1 = BQ[i]; else 0 = BQ[i]; end if; @@ -334,7 +298,7 @@ equation if simplified_dynamic_energy_balance then A*(-der(P[i + 1]) + rho1[i]*der(h[i + 1]))*dx1 = BH[i]; else - A*((h[i + 1]*pro1[i].ddph - 1)*der(P[i + 1]) + (h[i + 1]*pro1[i].ddhp + rho1[i])*der(h[i + 1]))*dx1 = BH[i]; + A*((h[i + 1]*ddph[i] - 1)*der(P[i + 1]) + (h[i + 1]*ddhp[i] + rho1[i])*der(h[i + 1]))*dx1 = BH[i]; end if; else A*rho1[i]*der(h[i + 1])*dx1 = BH[i]; @@ -421,37 +385,39 @@ equation end if; /* Fluid thermodynamic properties */ - pro1[i] = ThermoSysPro.Properties.Fluid.Ph(P[i + 1], h[i + 1], mode, fluid); + state1[i] = Medium.setState_phX(P[i + 1], h[i + 1], X); - rho1[i] = pro1[i].d; - T1[i] = pro1[i].T; - xv1[i] = if noEvent((P[i+1] > pcrit) or (T1[i] > Tcrit)) then 1 else pro1[i].x; + rho1[i] = Medium.density(state1[i]); + T1[i] = Medium.temperature(state1[i]); + xv1[i] = if noEvent((P[i+1] > pcrit) or (T1[i] > Tcrit)) then 1 else Medium.vapourQuality(state1[i]); + ddph[i] = Medium.density_derp_h(state1[i]); + ddhp[i] = Medium.density_derh_p(state1[i]); - (lsat1[i],vsat1[i]) = ThermoSysPro.Properties.Fluid.Water_sat_P(P[i + 1], fluid); + sat1[i] = Medium.setSat_p(P[i + 1]); if noEvent((P[i+1] > pcrit) or (T1[i] > Tcrit)) then xbs[i] = 0; xbi[i] = 1; - rhol1[i] = pro1[i].d; - rhov1[i] = pro1[i].d; - cpl1[i] = pro1[i].cp; - cpv1[i] = pro1[i].cp; + rhol1[i] = rho1[i]; + rhov1[i] = rho1[i]; + cpl1[i] = Medium.specificHeatCapacityCp(state1[i]); + cpv1[i] = Medium.specificHeatCapacityCp(state1[i]); lv[i] = 1; else - xbs[i] = min(pro1[i].x, 0.90); - xbi[i] = max(pro1[i].x, 0.10); - rhol1[i] = max(pro1[i].d, lsat1[i].rho); - rhov1[i] = min(pro1[i].d, vsat1[i].rho); - cpl1[i] = if noEvent(xv1[i] <= 0.0) then pro1[i].cp else lsat1[i].cp; - cpv1[i] = if noEvent(xv1[i] >= 1.0) then pro1[i].cp else vsat1[i].cp; - lv[i] = vsat1[i].h - lsat1[i].h; + xbs[i] = min(xv1[i], 0.90); + xbi[i] = max(xv1[i], 0.10); + rhol1[i] = max(rho1[i], Medium.bubbleDensity(sat1[i])); + rhov1[i] = min(rho1[i], Medium.dewDensity(sat1[i])); + cpl1[i] = if noEvent(xv1[i] <= 0.0) then Medium.specificHeatCapacityCp(state1[i]) else Medium.specificHeatCapacityCp(Medium.setBubbleState(sat1[i])); + cpv1[i] = if noEvent(xv1[i] >= 1.0) then Medium.specificHeatCapacityCp(state1[i]) else Medium.specificHeatCapacityCp(Medium.setDewState(sat1[i])); + lv[i] = Medium.dewEnthalpy(sat1[i]) - Medium.bubbleEnthalpy(sat1[i]); end if; - mul1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhol1[i], T1[i], fluid); - muv1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhov1[i], T1[i], fluid); + mul1[i] = Medium.dynamicViscosity(Medium.setBubbleState(sat1[i])); + muv1[i] = Medium.dynamicViscosity(Medium.setDewState(sat1[i])); - kl1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhol1[i], T1[i], P[i + 1], mode, fluid); - kv1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhov1[i], T1[i], P[i + 1], mode, fluid); + kl1[i] = Medium.thermalConductivity(Medium.setBubbleState(sat1[i])); + kv1[i] = Medium.thermalConductivity(Medium.setDewState(sat1[i])); Pb[i + 1] = max(min(P[i + 1], pcrit - 1), ptriple); end for; @@ -506,31 +472,31 @@ equation gamma[i] = if diffusion then 1/diff_res[i] else gamma0; /* Fluid thermodynamic properties */ - pro2[i] = ThermoSysPro.Properties.Fluid.Ph((P[i] + P[i + 1])/2, hb[i], mode, fluid); + state2[i] = Medium.setState_phX((P[i] + P[i + 1])/2, hb[i], X); - rho2[i] = pro2[i].d; - xv2[i] = if noEvent(((P[i] + P[i + 1])/2 > pcrit) or (T2[i] > Tcrit)) then 1 else pro2[i].x; - T2[i] = pro2[i].T; + rho2[i] = Medium.density(state2[i]); + xv2[i] = if noEvent(((P[i] + P[i + 1])/2 > pcrit) or (T2[i] > Tcrit)) then 1 else Medium.vapourQuality(state2[i]); + T2[i] = Medium.temperature(state2[i]); - (lsat2[i],vsat2[i]) = ThermoSysPro.Properties.Fluid.Water_sat_P((P[i] + P[i + 1])/2, fluid); + sat2[i] = Medium.setSat_p((P[i] + P[i + 1])/2); if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then - rhol2[i] = pro2[i].d; - rhov2[i] = pro2[i].d; - cpl2[i] = pro2[i].cp; - cpv2[i] = pro2[i].cp; + rhol2[i] = rho2[i]; + rhov2[i] = rho2[i]; + cpl2[i] = Medium.specificHeatCapacityCp(state2[i]); + cpv2[i] = Medium.specificHeatCapacityCp(state2[i]); else - rhol2[i] = max(pro2[i].d, lsat2[i].rho); - rhov2[i] = min(pro2[i].d, vsat2[i].rho); - cpl2[i] = if noEvent(xv2[i] <= 0.0) then pro2[i].cp else lsat2[i].cp; - cpv2[i] = if noEvent(xv2[i] >= 1.0) then pro2[i].cp else vsat2[i].cp; + rhol2[i] = max(rho2[i], Medium.bubbleDensity(sat2[i])); + rhov2[i] = min(rho2[i], Medium.dewDensity(sat2[i])); + cpl2[i] = if noEvent(xv2[i] <= 0.0) then Medium.specificHeatCapacityCp(state2[i]) else Medium.specificHeatCapacityCp(Medium.setBubbleState(sat2[i])); + cpv2[i] = if noEvent(xv2[i] >= 1.0) then Medium.specificHeatCapacityCp(state2[i]) else Medium.specificHeatCapacityCp(Medium.setDewState(sat2[i])); end if; - mul2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhol2[i], T2[i], fluid); - muv2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhov2[i], T2[i], fluid); + mul2[i] = Medium.dynamicViscosity(Medium.setBubbleState(sat2[i])); + muv2[i] = Medium.dynamicViscosity(Medium.setDewState(sat2[i])); - kl2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhol2[i], T2[i], (P[i] + P[i + 1])/2, mode, fluid); - kv2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhov2[i], T2[i], (P[i] + P[i + 1])/2, mode, fluid); + kl2[i] = Medium.thermalConductivity(Medium.setBubbleState(sat2[i])); + kv2[i] = Medium.thermalConductivity(Medium.setDewState(sat2[i])); end for; /* Fluid densities at the boundaries of the nodes */ @@ -538,11 +504,11 @@ equation rhoc[i] = rho1[i - 1]; end for; - proc[1] = ThermoSysPro.Properties.Fluid.Ph(P[1], h[1], mode, fluid); - proc[2] = ThermoSysPro.Properties.Fluid.Ph(P[N + 1], h[N + 1], mode, fluid); + state_c[1] = Medium.setState_phX(P[1], h[1], X); + state_c[2] = Medium.setState_phX(P[N + 1], h[N + 1], X); - rhoc[1] = proc[1].d; - rhoc[N + 1] = proc[2].d; + rhoc[1] = Medium.density(state_c[1]); + rhoc[N + 1] = Medium.density(state_c[2]); W1t = sum(dW1); diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowRiser.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowRiser.mo index 050ef5ac..d95d7279 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowRiser.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicTwoPhaseFlowRiser.mo @@ -1,8 +1,8 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicTwoPhaseFlowRiser "Dynamic two-phase flow riser" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=10. "Pipe length"; parameter Units.SI.Diameter D=0.02 "Hydraulic diameter"; @@ -41,12 +41,10 @@ model DynamicTwoPhaseFlowRiser "Dynamic two-phase flow riser" "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Integer N=Ns + 1 "Number of hydraulic nodes (= number of thermal nodes + 1)"; parameter Units.SI.Area A=ntubes*pi*D^2/4 @@ -193,12 +191,14 @@ public Real lambdav[N](start=fill(0.03, N), nominal=fill(0.03, N)) "Friction pressure loss coefficient in node i for the vapor)"; Real filo[N] "Pressure loss coefficient for two-phase flow"; - FluidType ftype "Fluid type"; - Integer fluid=Integer(ftype) "Fluid number"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H2O mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Units.SI.DerDensityByPressure ddph[N - 1] "Density derivative wrt. pressure"; + Units.SI.DerDensityByEnthalpy ddhp[N - 1] "Density derivative wrt. enthalpy"; + Medium.ThermodynamicState state1[N - 1]; + Medium.ThermodynamicState state2[N]; + Medium.ThermodynamicState state_c[2]; + Medium.SaturationProperties sat1[N - 1]; + Medium.SaturationProperties sat2[N]; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions"; Real diff_res_l[N] "Diffusion resistance in hydraulic node i for the liquid"; Real diff_res_v[N] "Diffusion resistance in hydraulic node i for the vapor"; Real diff_res[N] "Total diffusion resistance in hydraulic node i"; @@ -219,32 +219,12 @@ public Real re[N - 1] "Value of r(Q/gamma) for inlet of thermal node i"; Real rs[N - 1] "Value of r(Q/gamma) for outlet of thermal node i"; - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro1[N - 1] - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proc[2] - annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph pro2[N] - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat2[N] - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat2[N] - annotation (Placement(transformation(extent={{40,-100},{60,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat1[N - 1] - annotation (Placement(transformation(extent={{-60,-100},{-40,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat1[N - 1] - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}, - rotation=0))); public - Interfaces.Connectors.FluidInlet C1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-110,0},{-90,20}}, rotation=0))); ThermoSysPro.Thermal.Connectors.ThermalPort CTh1[Ns] annotation (Placement(transformation(extent={{-10,60},{10,80}}, rotation=0))); - Interfaces.Connectors.FluidOutlet C2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{90,0},{110,20}}, rotation=0))); ThermoSysPro.Thermal.Connectors.ThermalPort CTh2[Ns] annotation (Placement(transformation(extent={{-10,-60},{10,-40}}, rotation= @@ -259,7 +239,7 @@ initial equation else if option_temperature then for i in 2:N loop - h[i] = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Pb[i], T0[i - 1],fluid, mode, Xco2, Xh2o, Xo2, Xso2); + h[i] = Medium.specificEnthalpy_pTX(Pb[i], T0[i - 1], X); end for; else for i in 2:N loop @@ -283,9 +263,6 @@ initial equation equation - /* Check that the fluid type is water/steam */ - assert((ftype == FluidType.WaterSteam) or (ftype == FluidType.WaterSteamSimple), "DynamicTwoPhaseFlowRiser: the fluid type must be water/steam"); - /* Wall temperature */ Tp1 = CTh1.T; CTh1.W = dW1; @@ -318,19 +295,9 @@ equation C2.diff_res_1 = C1.diff_res_1 + diff_res_t; C1.diff_res_2 = C2.diff_res_2 + diff_res_t; - C1.ftype = C2.ftype; - - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; - - ftype = C1.ftype; - - Xco2 = C1.Xco2; - Xh2o = C1.Xh2o; - Xo2 = C1.Xo2; - Xso2 = C1.Xso2; + C1.Xi = C2.Xi; + X = C1.Xi; + C1.SubC = C2.SubC; /* Mass and energy balance equations (thermal nodes) */ for i in 1:N - 1 loop @@ -338,7 +305,7 @@ equation /* Mass balance equation */ if dynamic_energy_balance and dynamic_mass_balance then - A*(pro1[i].ddph*der(P[i + 1]) + pro1[i].ddhp*der(h[i + 1]))*dx1 = BQ[i]; + A*(ddph[i]*der(P[i + 1]) + ddhp[i]*der(h[i + 1]))*dx1 = BQ[i]; else 0 = BQ[i]; end if; @@ -351,7 +318,7 @@ equation if simplified_dynamic_energy_balance then A*(-der(P[i + 1]) + rho1[i]*der(h[i + 1]))*dx1 = BH[i]; else - A*((h[i + 1]*pro1[i].ddph - 1)*der(P[i + 1]) + (h[i + 1]*pro1[i].ddhp + rho1[i])*der(h[i + 1]))*dx1 = BH[i]; + A*((h[i + 1]*ddph[i] - 1)*der(P[i + 1]) + (h[i + 1]*ddhp[i] + rho1[i])*der(h[i + 1]))*dx1 = BH[i]; end if; else A*rho1[i]*der(h[i + 1])*dx1 = BH[i]; @@ -447,37 +414,39 @@ equation end if; /* Fluid thermodynamic properties */ - pro1[i] = ThermoSysPro.Properties.Fluid.Ph(P[i + 1], h[i + 1], mode, fluid); + state1[i] = Medium.setState_phX(P[i + 1], h[i + 1], X); - rho1[i] = pro1[i].d; - T1[i] = pro1[i].T; - xv1[i] = if noEvent((P[i+1] > pcrit) or (T1[i] > Tcrit)) then 1 else pro1[i].x; + rho1[i] = Medium.density(state1[i]); + T1[i] = Medium.temperature(state1[i]); + xv1[i] = if noEvent((P[i+1] > pcrit) or (T1[i] > Tcrit)) then 1 else Medium.vapourQuality(state1[i]); + ddph[i] = Medium.density_derp_h(state1[i]); + ddhp[i] = Medium.density_derh_p(state1[i]); - (lsat1[i],vsat1[i]) = ThermoSysPro.Properties.Fluid.Water_sat_P(P[i + 1], fluid); + sat1[i] = Medium.setSat_p(P[i + 1]); if noEvent((P[i+1] > pcrit) or (T1[i] > Tcrit)) then xbs[i] = 0; xbi[i] = 1; - rhol1[i] = pro1[i].d; - rhov1[i] = pro1[i].d; - cpl1[i] = pro1[i].cp; - cpv1[i] = pro1[i].cp; + rhol1[i] = rho1[i]; + rhov1[i] = rho1[i]; + cpl1[i] = Medium.specificHeatCapacityCp(state1[i]); + cpv1[i] = Medium.specificHeatCapacityCp(state1[i]); lv[i] = 1; else - xbs[i] = min(pro1[i].x, 0.90); - xbi[i] = max(pro1[i].x, 0.10); - rhol1[i] = max(pro1[i].d, lsat1[i].rho); - rhov1[i] = min(pro1[i].d, vsat1[i].rho); - cpl1[i] = if noEvent(xv1[i] <= 0.0) then pro1[i].cp else lsat1[i].cp; - cpv1[i] = if noEvent(xv1[i] >= 1.0) then pro1[i].cp else vsat1[i].cp; - lv[i] = vsat1[i].h - lsat1[i].h; + xbs[i] = min(xv1[i], 0.90); + xbi[i] = max(xv1[i], 0.10); + rhol1[i] = max(rho1[i], Medium.bubbleDensity(sat1[i])); + rhov1[i] = min(rho1[i], Medium.dewDensity(sat1[i])); + cpl1[i] = if noEvent(xv1[i] <= 0.0) then Medium.specificHeatCapacityCp(state1[i]) else Medium.specificHeatCapacityCp(Medium.setBubbleState(sat1[i])); + cpv1[i] = if noEvent(xv1[i] >= 1.0) then Medium.specificHeatCapacityCp(state1[i]) else Medium.specificHeatCapacityCp(Medium.setDewState(sat1[i])); + lv[i] = Medium.dewEnthalpy(sat1[i]) - Medium.bubbleEnthalpy(sat1[i]); end if; - mul1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhol1[i], T1[i], fluid); - muv1[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhov1[i], T1[i], fluid); + mul1[i] = Medium.dynamicViscosity(Medium.setBubbleState(sat1[i])); + muv1[i] = Medium.dynamicViscosity(Medium.setDewState(sat1[i])); - kl1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhol1[i], T1[i], P[i + 1], mode, fluid); - kv1[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhov1[i], T1[i], P[i + 1], mode, fluid); + kl1[i] = Medium.thermalConductivity(Medium.setBubbleState(sat1[i])); + kv1[i] = Medium.thermalConductivity(Medium.setDewState(sat1[i])); Pb[i + 1] = max(min(P[i + 1], pcrit - 1), ptriple); end for; @@ -532,25 +501,25 @@ equation gamma[i] = if diffusion then 1/diff_res[i] else gamma0; /* Fluid thermodynamic properties */ - pro2[i] = ThermoSysPro.Properties.Fluid.Ph((P[i] + P[i + 1])/2, hb[i],mode,fluid); + state2[i] = Medium.setState_phX((P[i] + P[i + 1])/2, hb[i], X); - rho2[i] = pro2[i].d; - xv2[i] = if noEvent(((P[i] + P[i + 1])/2 > pcrit) or (T2[i] > Tcrit)) then 1 else pro2[i].x; - T2[i] = pro2[i].T; + rho2[i] = Medium.density(state2[i]); + xv2[i] = if noEvent(((P[i] + P[i + 1])/2 > pcrit) or (T2[i] > Tcrit)) then 1 else Medium.vapourQuality(state2[i]); + T2[i] = Medium.temperature(state2[i]); - (lsat2[i],vsat2[i]) = ThermoSysPro.Properties.Fluid.Water_sat_P((P[i] + P[i + 1])/2, fluid); + sat2[i] = Medium.setSat_p((P[i] + P[i + 1])/2); - rhol2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then pro2[i].d else max(pro2[i].d, lsat2[i].rho); - rhov2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then pro2[i].d else min(pro2[i].d, vsat2[i].rho); + rhol2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then rho2[i] else max(rho2[i], Medium.bubbleDensity(sat2[i])); + rhov2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then rho2[i] else min(rho2[i], Medium.dewDensity(sat2[i])); - cpl2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then pro2[i].cp else (if noEvent(xv2[i] <= 0.0) then pro2[i].cp else lsat2[i].cp); - cpv2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then pro2[i].cp else (if noEvent(xv2[i] >= 1.0) then pro2[i].cp else vsat2[i].cp); + cpl2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then Medium.specificHeatCapacityCp(state2[i]) else (if noEvent(xv2[i] <= 0.0) then Medium.specificHeatCapacityCp(state2[i]) else Medium.specificHeatCapacityCp(Medium.setBubbleState(sat2[i]))); + cpv2[i] = if noEvent((P[i+1] > pcrit) or (T2[i] > Tcrit)) then Medium.specificHeatCapacityCp(state2[i]) else (if noEvent(xv2[i] >= 1.0) then Medium.specificHeatCapacityCp(state2[i]) else Medium.specificHeatCapacityCp(Medium.setDewState(sat2[i]))); - mul2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhol2[i], T2[i],fluid); - muv2[i] = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhov2[i], T2[i],fluid); + mul2[i] = Medium.dynamicViscosity(Medium.setBubbleState(sat2[i])); + muv2[i] = Medium.dynamicViscosity(Medium.setDewState(sat2[i])); - kl2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhol2[i], T2[i], (P[i] + P[i + 1])/2, mode, fluid); - kv2[i] = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhov2[i], T2[i], (P[i] + P[i + 1])/2, mode, fluid); + kl2[i] = Medium.thermalConductivity(Medium.setBubbleState(sat2[i])); + kv2[i] = Medium.thermalConductivity(Medium.setDewState(sat2[i])); end for; /* Fluid densities at the boundaries of the nodes */ @@ -558,11 +527,11 @@ equation rhoc[i] = rho1[i - 1]; end for; - proc[1] = ThermoSysPro.Properties.Fluid.Ph(P[1], h[1], mode, fluid); - proc[2] = ThermoSysPro.Properties.Fluid.Ph(P[N + 1], h[N + 1], mode, fluid); + state_c[1] = Medium.setState_phX(P[1], h[1], X); + state_c[2] = Medium.setState_phX(P[N + 1], h[N + 1], X); - rhoc[1] = proc[1].d; - rhoc[N + 1] = proc[2].d; + rhoc[1] = Medium.density(state_c[1]); + rhoc[N + 1] = Medium.density(state_c[2]); W1t = sum(dW1); diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeater.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeater.mo index db36e781..c078ba6a 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeater.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeater.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicWaterHeater "Dynamic water heater" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the water/steam cavity" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cooling pipes" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); //parameter Modelica.SIunits.Volume Vc=4510 "Cavity total volume"; //parameter Modelica.SIunits.Area Ac=200 "Cavity cross-sectional area"; @@ -39,7 +39,7 @@ model DynamicWaterHeater "Dynamic water heater" parameter Boolean inertia=true "true: momentum balance equation with inertia - false: without inertia"; parameter Boolean advection=true "true: momentum balance equation with advection terme - false: without advection terme"; parameter Boolean dynamic_energy_balance=true "true: dynamic energy balance equation - false: static energy balance equation"; - parameter Boolean dynamic_mass_balance=true "true: dynamic mass balance equation - false: static mass balance equation (active if the fluid is compressible and if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=isCompressible and dynamic_energy_balance)); + parameter Boolean dynamic_mass_balance=true "true: dynamic mass balance equation - false: static mass balance equation (active if the fluid is compressible and if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=Medium_Cooling.isCompressible and dynamic_energy_balance)); parameter Boolean simplified_dynamic_energy_balance=true "true: simplified dynamic energy balance equation - false: full dynamic energy balance equation (active if dynamic_energy_balance=true and dynamic_mass_balance=true)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance and dynamic_mass_balance)); parameter Boolean steady_state=true "true: start from steady state - false: start from (P0c, Vf0) (active if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance)); parameter Real Vf0=0.66 "Fraction of initial water volume in the drum (active if dynamic_energy_balance=true and steady_state=false)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance and not steady_state)); @@ -51,6 +51,7 @@ model DynamicWaterHeater "Dynamic water heater" parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; Volumes.TwoPhaseCavity WaterHeating( + redeclare package Medium = Medium, Vf0=Vf0, P0=P0c, Ns=Ns, @@ -73,11 +74,11 @@ model DynamicWaterHeater "Dynamic water heater" steady_state=steady_state, Cal_hconv=true, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - wsftype=wsftype) + diffusion=diffusion) annotation ( Placement(transformation(extent={{-100, -100},{100,100}}, rotation=0))); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe pipe_3( + redeclare package Medium = Medium_Cooling, option_temperature=false, D=Dc, Ns=Ns*2, @@ -95,20 +96,20 @@ model DynamicWaterHeater "Dynamic water heater" simplified_dynamic_energy_balance=simplified_dynamic_energy_balance, advection=advection) annotation (Placement(transformation(extent={{-35,-34},{60,0}}, rotation=0))); - Interfaces.Connectors.FluidInlet C1vap "Vapor inlet" annotation (Placement( + Interfaces.Connectors.FluidInlet C1vap(redeclare package Medium = Medium) "Vapor inlet" annotation (Placement( transformation(extent={{-10,90},{10,110}}, rotation=0))); - Interfaces.Connectors.FluidOutlet C2ex "Condensed water extraction outlet" + Interfaces.Connectors.FluidOutlet C2ex(redeclare package Medium = Medium) "Condensed water extraction outlet" annotation (Placement(transformation(extent={{-10,-110},{10,-90}}, rotation= 0))); - Interfaces.Connectors.FluidInlet Ce1 "Cooling water inlet" annotation ( + Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium_Cooling) "Cooling water inlet" annotation ( Placement(transformation(extent={{-110,-55},{-90,-35}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Ce2 "Cooling water outlet" annotation ( + Interfaces.Connectors.FluidOutlet Ce2(redeclare package Medium = Medium_Cooling) "Cooling water outlet" annotation ( Placement(transformation(extent={{-110,34},{-90,54}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal sortieReelle annotation (Placement(transformation(extent={{92,-86},{112,-66}}, rotation= 0))); - Interfaces.Connectors.FluidInlet C1 "Extra water inlet" annotation ( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) "Extra water inlet" annotation ( Placement(transformation(extent={{-74,82},{-54,102}}, rotation=0))); Thermal.HeatTransfer.HeatExchangerWall Wall_3( D=Dc, @@ -123,6 +124,7 @@ model DynamicWaterHeater "Dynamic water heater" steady_state=steady_state) annotation (Placement(transformation(extent={{-34,-24},{60,24}}, rotation=0))); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe pipe_1( + redeclare package Medium = Medium_Cooling, option_temperature=false, D=Dc, Ns=Ns, @@ -155,6 +157,7 @@ model DynamicWaterHeater "Dynamic water heater" annotation (Placement(transformation(extent={{-35,-69},{59,-21}}, rotation= 0))); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe pipe_2( + redeclare package Medium = Medium_Cooling, option_temperature=false, D=Dc, Ns=Ns, @@ -186,30 +189,30 @@ model DynamicWaterHeater "Dynamic water heater" steady_state=steady_state) annotation (Placement(transformation(extent={{-35,21},{59,69}}, rotation=0))); Volumes.VolumeC volumeC( + redeclare package Medium = Medium_Cooling, h0=890e3, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, diffusion=diffusion, dynamic_mass_balance=dynamic_mass_balance, - continuous_flow_reversal=continuous_flow_reversal, - ftype=ftype) annotation (Placement(transformation(extent={{ + continuous_flow_reversal=continuous_flow_reversal) annotation (Placement(transformation(extent={{ -56,35},{-74,53}}, rotation=0))); Volumes.VolumeD volumeD( + redeclare package Medium = Medium_Cooling, h0=790e3, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, diffusion=diffusion, dynamic_mass_balance=dynamic_mass_balance, - continuous_flow_reversal=continuous_flow_reversal, - ftype=ftype) annotation (Placement(transformation(extent={{-74,-54},{-56, + continuous_flow_reversal=continuous_flow_reversal) annotation (Placement(transformation(extent={{-74,-54},{-56, -36}}, rotation=0))); Volumes.VolumeD volumeD1( + redeclare package Medium = Medium_Cooling, h0=850e3, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, diffusion=diffusion, - dynamic_mass_balance=dynamic_mass_balance, - ftype=ftype) annotation (Placement(transformation( + dynamic_mass_balance=dynamic_mass_balance) annotation (Placement(transformation( origin={75,-33}, extent={{-9,-9},{9,9}}, rotation=90))); @@ -221,11 +224,8 @@ equation C1.h_vol_1 = 1.e5; C1.diff_res_1 = 0; C1.diff_on_1 = false; - C1.ftype = ftype; - C1.Xco2 = 0; - C1.Xh2o = 0; - C1.Xo2 = 0; - C1.Xso2 = 0; + C1.Xi = Medium.X_default[1:Medium.nXi]; + C1.SubC = Medium.C_default; end if; connect(C1vap, WaterHeating.Cv) diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeaterOnePipe.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeaterOnePipe.mo index 85cf51ee..983d6f73 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeaterOnePipe.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterHeaterOnePipe.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicWaterHeaterOnePipe "Dynamic water heater" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the water/steam cavity" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cooling pipe" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); //parameter Modelica.SIunits.Volume Vc=4510 "Cavity total volume"; //parameter Modelica.SIunits.Area Ac=200 "Cavity cross-sectional area"; @@ -39,7 +39,7 @@ model DynamicWaterHeaterOnePipe "Dynamic water heater" parameter Boolean inertia=true "true: momentum balance equation with inertia - false: without inertia"; parameter Boolean advection=true "true: momentum balance equation with advection terme - false: without advection terme"; parameter Boolean dynamic_energy_balance=true "true: dynamic energy balance equation - false: static energy balance equation"; - parameter Boolean dynamic_mass_balance=true "true: dynamic mass balance equation - false: static mass balance equation (active if the fluid is compressible and if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=isCompressible and dynamic_energy_balance)); + parameter Boolean dynamic_mass_balance=true "true: dynamic mass balance equation - false: static mass balance equation (active if the fluid is compressible and if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=Medium_Cooling.isCompressible and dynamic_energy_balance)); parameter Boolean simplified_dynamic_energy_balance=true "true: simplified dynamic energy balance equation - false: full dynamic energy balance equation (active if dynamic_energy_balance=true and dynamic_mass_balance=true)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance and dynamic_mass_balance)); parameter Boolean steady_state=true "true: start from steady state - false: start from (Vf0, P0c, T0 or h0) (active if dynamic_energy_balance=true)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance)); parameter Real Vf0=0.66 "Fraction of initial water volume in the drum (active if dynamic_energy_balance=true and steady_state=false)" annotation(Evaluate=true, Dialog(enable=dynamic_energy_balance and not steady_state)); @@ -60,6 +60,7 @@ model DynamicWaterHeaterOnePipe "Dynamic water heater" parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; Volumes.TwoPhaseCavity WaterHeating( + redeclare package Medium = Medium, Vf0=Vf0, P0=P0c, Ns=Ns, @@ -81,11 +82,11 @@ model DynamicWaterHeaterOnePipe "Dynamic water heater" dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - wsftype=wsftype) + diffusion=diffusion) annotation ( Placement(transformation(extent={{-100, -100},{100,100}}, rotation=0))); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe pipe_3( + redeclare package Medium = Medium_Cooling, D=Dc, Ns=Ns*2, dpfCorr=DpfCorr, @@ -105,20 +106,20 @@ model DynamicWaterHeaterOnePipe "Dynamic water heater" option_temperature=option_temperature, P0=P0c) annotation (Placement(transformation(extent={{-35,-34},{60,0}}, rotation=0))); - Interfaces.Connectors.FluidInlet C1vap "Vapor inlet" annotation (Placement( + Interfaces.Connectors.FluidInlet C1vap(redeclare package Medium = Medium) "Vapor inlet" annotation (Placement( transformation(extent={{-10,90},{10,110}}, rotation=0))); - Interfaces.Connectors.FluidOutlet C2ex "Condensed water extraction outlet" + Interfaces.Connectors.FluidOutlet C2ex(redeclare package Medium = Medium) "Condensed water extraction outlet" annotation (Placement(transformation(extent={{-10,-110},{10,-90}}, rotation= 0))); - Interfaces.Connectors.FluidInlet Ce1 "Cooling water inlet" annotation ( + Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium_Cooling) "Cooling water inlet" annotation ( Placement(transformation(extent={{-110,-55},{-90,-35}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Ce2 "Cooling water outlet" annotation ( + Interfaces.Connectors.FluidOutlet Ce2(redeclare package Medium = Medium_Cooling) "Cooling water outlet" annotation ( Placement(transformation(extent={{-110,34},{-90,54}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal sortieReelle annotation (Placement(transformation(extent={{92,-86},{112,-66}}, rotation= 0))); - Interfaces.Connectors.FluidInlet C1 "Extra water inlet" annotation ( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) "Extra water inlet" annotation ( Placement(transformation(extent={{-74,82},{-54,102}}, rotation=0))); Thermal.HeatTransfer.HeatExchangerWall Wall_3( D=Dc, @@ -134,22 +135,22 @@ model DynamicWaterHeaterOnePipe "Dynamic water heater" annotation (Placement(transformation(extent={{-34,-24},{60,24}}, rotation=0))); Volumes.VolumeD volumeD( + redeclare package Medium = Medium_Cooling, h0=790e3, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, diffusion=diffusion, dynamic_mass_balance=dynamic_mass_balance, - continuous_flow_reversal=continuous_flow_reversal, - ftype=ftype) annotation (Placement(transformation(extent={{-72,-54},{-54,-36}}, + continuous_flow_reversal=continuous_flow_reversal) annotation (Placement(transformation(extent={{-72,-54},{-54,-36}}, rotation=0))); Volumes.VolumeC volumeC( + redeclare package Medium = Medium_Cooling, h0=890e3, dynamic_energy_balance=dynamic_energy_balance, dynamic_mass_balance=dynamic_mass_balance, steady_state=steady_state, diffusion=diffusion, - continuous_flow_reversal=continuous_flow_reversal, - ftype=ftype) annotation (Placement(transformation(extent={{-52,35}, + continuous_flow_reversal=continuous_flow_reversal) annotation (Placement(transformation(extent={{-52,35}, {-70,53}}, rotation=0))); equation if (cardinality(C1) == 1) then @@ -158,11 +159,8 @@ equation C1.h_vol_1 = 1.e5; C1.diff_res_1 = 0; C1.diff_on_1 = false; - C1.ftype = ftype; - C1.Xco2 = 0; - C1.Xh2o = 0; - C1.Xo2 = 0; - C1.Xso2 = 0; + C1.Xi = Medium.X_default[1:Medium.nXi]; + C1.SubC = Medium.C_default; end if; connect(C1vap, WaterHeating.Cv) diff --git a/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterSteamMultiFluidsHeatExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterSteamMultiFluidsHeatExchanger.mo index 2492a6bb..fce224ee 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterSteamMultiFluidsHeatExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/DynamicWaterSteamMultiFluidsHeatExchanger.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model DynamicWaterSteamMultiFluidsHeatExchanger "Dynamic water/steam heat exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_1 = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the one-phase side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_2 = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Length L=1 "Exchanger length"; parameter Units.SI.Position z1=0 "Exchanger inlet altitude"; @@ -41,9 +42,9 @@ model DynamicWaterSteamMultiFluidsHeatExchanger "Dynamic water/steam heat exchan "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); Fluid.HeatExchangers.DynamicOnePhaseFlowPipe ExchangerMultiFluids( + redeclare package Medium = Medium_1, Ns=Ns, L=L, ntubes=Ntubes, @@ -71,6 +72,7 @@ model DynamicWaterSteamMultiFluidsHeatExchanger "Dynamic water/steam heat exchan T0=T0[1]) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0))); Fluid.HeatExchangers.DynamicTwoPhaseFlowPipe TwoPhaseFlowPipe( + redeclare package Medium = Medium_2, L=L, D=Dint, ntubes=Ntubes, @@ -90,13 +92,13 @@ model DynamicWaterSteamMultiFluidsHeatExchanger "Dynamic water/steam heat exchan continuous_flow_reversal=continuous_flow_reversal) annotation (Placement(transformation(extent={{-10,-30},{10,-10}}, rotation= 0))); - Interfaces.Connectors.FluidInlet Cfg1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cfg1(redeclare package Medium = Medium_1) annotation (Placement(transformation( extent={{-10,40},{10,60}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cfg2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cfg2(redeclare package Medium = Medium_1) annotation (Placement(transformation( extent={{-10,-60},{10,-40}}, rotation=0))); - Interfaces.Connectors.FluidInlet Cws1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium_2) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cws2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium_2) annotation (Placement(transformation( extent={{90,-10},{110,10}}, rotation=0))); equation connect(Cws2, TwoPhaseFlowPipe.C2) diff --git a/ThermoSysPro/Fluid/HeatExchangers/FixedPowerHeatExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/FixedPowerHeatExchanger.mo index 1ad2ba65..0732ed7b 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/FixedPowerHeatExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/FixedPowerHeatExchanger.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model FixedPowerHeatExchanger "Heat exchanger with fixed delta power" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_c = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the hot fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_f = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cold fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Power DW=0 "Power exchanged between the hot and the cold fluid"; @@ -12,12 +13,6 @@ model FixedPowerHeatExchanger "Heat exchanger with fixed delta power" "Diffusion conductance for the hot fluid (active if diffusion=true in neighbouring volumes)"; parameter Units.SI.MassFlowRate gamma_diff_f=1e-4 "Diffusion conductance for the cold fluid (active if diffusion=true in neighbouring volumes)"; - parameter IF97Region region_c=IF97Region.All_regions "IF97 region for the hot fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "IF97 region for the cold fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - -protected - parameter Integer mode_c=Integer(region_c) - 1 "IF97 region for the hot fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "IF97 region for the cold fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Units.SI.Temperature Tec "Fluid temperature at the inlet of the hot side"; @@ -26,31 +21,22 @@ public Units.SI.Temperature Tsf "Fluid temperature at the outlet of the cold side"; Units.SI.MassFlowRate Qc(start=100) "Hot fluid mass flow rate"; Units.SI.MassFlowRate Qf(start=100) "Cold fluid mass flow rate"; - FluidType ftype_c "Fluid type for the hot fluid"; - Integer fluid_c=Integer(ftype_c) "Fluid number for the hot fluid"; - FluidType ftype_f "Fluid type for the cold fluid"; - Integer fluid_f=Integer(ftype_f) "Fluid number for the cold fluid"; + Medium_c.MassFraction Xc[Medium_c.nXi](start=Medium_c.X_default[1:Medium_c.nXi]) "Mass fractions of the hot fluid"; + Medium_f.MassFraction Xf[Medium_f.nXi](start=Medium_f.X_default[1:Medium_f.nXi]) "Mass fractions of the cold fluid"; + Medium_c.ThermodynamicState state_ce "Thermodynamic state of the hot fluid at the inlet"; + Medium_c.ThermodynamicState state_cs "Thermodynamic state of the hot fluid at the outlet"; + Medium_f.ThermodynamicState state_fe "Thermodynamic state of the cold fluid at the inlet"; + Medium_f.ThermodynamicState state_fs "Thermodynamic state of the cold fluid at the outlet"; public - Interfaces.Connectors.FluidInlet Ec annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ec(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{-68,-70},{-48,-50}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ef annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ef(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sf annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sf(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{88,-9},{108,11}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sc annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sc(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{48,-70},{68,-50}}, rotation=0))); - - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proce - annotation (Placement(transformation(extent={{-20,80},{0,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph procs - annotation (Placement(transformation(extent={{20,80},{40,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profe - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profs - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); equation /* Mass flow rates */ @@ -65,14 +51,8 @@ equation Sc.diff_res_1 = Ec.diff_res_1 + 1/gamma_diff_c; Ec.diff_res_2 = Sc.diff_res_2 + 1/gamma_diff_c; - Ec.ftype = Sc.ftype; - - Ec.Xco2 = Sc.Xco2; - Ec.Xh2o = Sc.Xh2o; - Ec.Xo2 = Sc.Xo2; - Ec.Xso2 = Sc.Xso2; - - ftype_c = Ec.ftype; + Ec.Xi = Sc.Xi; + Ec.SubC = Sc.SubC; Ef.Q = Sf.Q; @@ -85,17 +65,13 @@ equation Sf.diff_res_1 = Ef.diff_res_1 + 1/gamma_diff_f; Ef.diff_res_2 = Sf.diff_res_2 + 1/gamma_diff_f; - Ef.ftype = Sf.ftype; - - Ef.Xco2 = Sf.Xco2; - Ef.Xh2o = Sf.Xh2o; - Ef.Xo2 = Sf.Xo2; - Ef.Xso2 = Sf.Xso2; - - ftype_f = Ef.ftype; + Ef.Xi = Sf.Xi; + Ef.SubC = Sf.SubC; Qc = Ec.Q; Qf = Ef.Q; + Xc = Ec.Xi; + Xf = Ef.Xi; /* Power exchanged between the hot and cold fluid */ DW = Qf*(Sf.h - Ef.h); @@ -106,18 +82,18 @@ equation Sf.P = if (Qf > 0) then Ef.P - DPf*Ef.P/100 else Ef.P + DPf*Ef.P/100; /* Fluid thermodynamic properties for the hot fluid */ - proce = ThermoSysPro.Properties.Fluid.Ph(Ec.P, Ec.h, mode_c, fluid_c); - procs = ThermoSysPro.Properties.Fluid.Ph(Sc.P, Sc.h, mode_c, fluid_c); + state_ce = Medium_c.setState_phX(p=Ec.P, h=Ec.h, X=Xc); + state_cs = Medium_c.setState_phX(p=Sc.P, h=Sc.h, X=Xc); - Tec = proce.T; - Tsc = procs.T; + Tec = Medium_c.temperature(state_ce); + Tsc = Medium_c.temperature(state_cs); /* Fluid thermodynamic properties for the cold fluid */ - profe = ThermoSysPro.Properties.Fluid.Ph(Ef.P, Ef.h, mode_f, fluid_f); - profs = ThermoSysPro.Properties.Fluid.Ph(Sf.P, Sf.h, mode_f, fluid_f); + state_fe = Medium_f.setState_phX(p=Ef.P, h=Ef.h, X=Xf); + state_fs = Medium_f.setState_phX(p=Sf.P, h=Sf.h, X=Xf); - Tef = profe.T; - Tsf = profs.T; + Tef = Medium_f.temperature(state_fe); + Tsf = Medium_f.temperature(state_fs); annotation ( Icon(coordinateSystem( diff --git a/ThermoSysPro/Fluid/HeatExchangers/NTUWaterHeater.mo b/ThermoSysPro/Fluid/HeatExchangers/NTUWaterHeater.mo index dc5082df..6105d18c 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/NTUWaterHeater.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/NTUWaterHeater.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model NTUWaterHeater "NTU water heater" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_e = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the water side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_c = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condensing side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real lambdaE=0 "Pressure loss coefficient on the water side"; parameter Units.SI.Area SCondDes=3000 @@ -18,23 +17,8 @@ model NTUWaterHeater "NTU water heater" "Diffusion conductance for the water side (active if diffusion=true in neighbouring volumes)"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region_eeF=IF97Region.All_regions "IF97 region at the inlet of the water side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_seF=IF97Region.All_regions "IF97 region at the outlet of the water side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_evC=IF97Region.All_regions "IF97 region at the inlet of the vapor side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_mF=IF97Region.All_regions "IF97 region in the drain (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_epC=IF97Region.All_regions "IF97 region at the inlet of the drain (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_spC=IF97Region.All_regions "IF97 region at the outlet of the drain (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_flash=IF97Region.All_regions "IF97 region in the flash zone of the drain (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected - parameter Integer fluid=Integer(ftype) "Fluid number"; - parameter Integer mode_eeF=Integer(region_eeF) "IF97 region at the inlet of the water side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_seF=Integer(region_seF) "IF97 region at the outlet of the water side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_evC=Integer(region_evC) "IF97 region at the inlet of the vapor side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_mF=Integer(region_mF) "IF97 region in the drain. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_epC=Integer(region_epC) "IF97 region at the inlet of the drain. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_spC=Integer(region_spC) "IF97 region at the outlet of the drain. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_flash=Integer(region_flash) "IF97 region in the flash zone of the drain. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; parameter Real eps=1.e-3 "Small number for pressure loss equation"; @@ -63,13 +47,9 @@ public Units.SI.SpecificEnthalpy Hep(start=3e5) "Mixing specific enthalpy of the drain and the condensate"; Units.SI.Density rho(start=1e3, min=0) "Average water density"; - FluidType fluids[4] "Fluids mixing in volume"; - FluidType ftype_e "Fluid type for the water side"; - Integer fluid_e=Integer(ftype_e) "Fluid number for the water side"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Medium_e.MassFraction Xe[Medium_e.nXi](start=Medium_e.X_default[1:Medium_e.nXi]) "Mass fractions on the water side"; + Medium_c.MassFraction Xc[Medium_c.nXi](start=Medium_c.X_default[1:Medium_c.nXi]) "Mass fractions in the condensing volume"; + Medium_c.ExtraProperty SubCc[Medium_c.nC](quantity=Medium_c.extraPropertiesNames, start=Medium_c.C_default) "Trace substances in the condensing volume"; Units.SI.Power Jep "Thermal power diffusion from the inlet of the drain"; Units.SI.Power Jev "Thermal power diffusion from the inlet of the vapor side"; Units.SI.Power Jsp "Thermal power diffusion from the outlet of the drain"; @@ -84,90 +64,46 @@ public Real rev "Value of r(Q/gamma) for inlet for the inlet of the vapor side"; Real rsp "Value of r(Q/gamma) for the outlet of the drain"; - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proeeF - "Water inlet fluid properties (4F)" - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proseF - "Water outlet fluid properties (1F)" - annotation (Placement(transformation(extent={{-70,-100},{-50,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prospC - "Drain outlet fluid properties (4C)" - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - Interfaces.Connectors.FluidInlet Ee "Water inlet" + Medium_e.ThermodynamicState state_eeF "Water inlet fluid state (4F)"; + Medium_e.ThermodynamicState state_seF "Water outlet fluid state (1F)"; + Medium_c.ThermodynamicState state_spC "Drain outlet fluid state (4C)"; + Interfaces.Connectors.FluidInlet Ee(redeclare package Medium = Medium_e) "Water inlet" annotation (Placement(transformation(extent={{-90,-10},{-110,10}}, rotation= 0))); - Interfaces.Connectors.FluidOutlet Se "Water outlet" annotation (Placement( + Interfaces.Connectors.FluidOutlet Se(redeclare package Medium = Medium_e) "Water outlet" annotation (Placement( transformation(extent={{110,-10},{90,10}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ep "Drain inlet" + Interfaces.Connectors.FluidInlet Ep(redeclare package Medium = Medium_c) "Drain inlet" annotation (Placement(transformation(extent={{-50,24},{-70,44}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sp "Drain outlet" annotation (Placement( + Interfaces.Connectors.FluidOutlet Sp(redeclare package Medium = Medium_c) "Drain outlet" annotation (Placement( transformation(extent={{-50,-43},{-70,-23}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ev "Vapor inlet" + Interfaces.Connectors.FluidInlet Ev(redeclare package Medium = Medium_c) "Vapor inlet" annotation (Placement(transformation(extent={{70,24},{50,44}}, rotation=0), iconTransformation(extent={{70,24},{50,44}}))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proevC - "Vapor inlet fluid properties (1C)" - annotation (Placement(transformation(extent={{-70,80},{-50,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsatC - "Saturation conditions for the liquid phase" - annotation (Placement(transformation(extent={{10,40},{30,60}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsatC - "Saturation conditions for the vapor phase" - annotation (Placement(transformation(extent={{-30,40},{-10,60}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph promeF - "Average water fluid properties (between 4F and 3F)" - annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prodesmC - "Deheating average fluid properties (between 1C and 2C)" - annotation (Placement(transformation(extent={{50,80},{70,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph promcF - "Average deheating fluid properties (between 3F and 2F)" - annotation (Placement(transformation(extent={{50,-100},{70,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prodesF - "Deheating inlet fluid properties (2F)" - annotation (Placement(transformation(extent={{-10,-100},{10,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prodesmF - "Average deheating fluid properties (between 2F and 1F)" - annotation (Placement(transformation(extent={{20,-100},{40,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prosp - "Drain outlet fluid properties before cooling (near 3C)" - annotation (Placement(transformation(extent={{-40,80},{-20,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prompC - "Average fluid properties in the drain (between 3C and 4C)" - annotation (Placement(transformation(extent={{20,80},{40,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prompF - "Average water fluid properties (between 4F and 3F)" - annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proecF - "Water fluid properties (3F)" - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph flashepC - "Flash fluid properties (near 4C)" - annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0))); + Medium_c.ThermodynamicState state_evC "Vapor inlet fluid state (1C)"; + Medium_c.SaturationProperties satC "Saturation conditions at the vapor inlet pressure"; + Medium_c.ThermodynamicState state_lsatC "Saturated liquid state"; + Medium_c.ThermodynamicState state_vsatC "Saturated vapor state"; + Medium_e.ThermodynamicState state_meF "Average water fluid state (between 4F and 3F)"; + Medium_c.ThermodynamicState state_desmC "Deheating average fluid state (between 1C and 2C)"; + Medium_e.ThermodynamicState state_mcF "Average deheating fluid state (between 3F and 2F)"; + Medium_e.ThermodynamicState state_desF "Deheating inlet fluid state (2F)"; + Medium_e.ThermodynamicState state_desmF "Average deheating fluid state (between 2F and 1F)"; + Medium_c.ThermodynamicState state_sp "Drain outlet fluid state before cooling (near 3C)"; + Medium_c.ThermodynamicState state_mpC "Average fluid state in the drain (between 3C and 4C)"; + Medium_e.ThermodynamicState state_mpF "Average water fluid state (between 4F and 3F)"; + Medium_e.ThermodynamicState state_ecF "Water fluid state (3F)"; + Units.SI.SpecificHeatCapacity cp_desmC; + Units.SI.SpecificHeatCapacity cp_mcF; + Units.SI.SpecificHeatCapacity cp_desmF; + Units.SI.SpecificHeatCapacity cp_mpC; + Units.SI.SpecificHeatCapacity cp_mpF; + Units.SI.Temperature T_evC; + Units.SI.Temperature T_desF; + Units.SI.Temperature T_sp; + Units.SI.Temperature T_eeF; + Real x_flashepC "Steam mass fraction in the flash state"; equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ev.ftype; - fluids[3] = Ep.ftype; - fluids[4] = Sp.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), "NTUWaterHeater: fluids mixing in water heater volume are not compatible with each other"); - - /* Check that the fluid type is water/steam for the water side */ - assert((ftype_e == FluidType.WaterSteam) or (ftype_e == FluidType.WaterSteamSimple), "NTUWaterHeater: the fluid type for the water side must be water/steam"); - /* Unconnected connectors */ if cardinality(Ep) == 0 then Ep.Q = 0; @@ -175,11 +111,8 @@ equation Ep.h_vol_1 = 1.e5; Ep.diff_res_1 = 0; Ep.diff_on_1 = false; - Ep.ftype = ftype; - Ep.Xco2 = 0; - Ep.Xh2o = 0; - Ep.Xo2 = 0; - Ep.Xso2 = 0; + Ep.Xi = Medium_c.X_default[1:Medium_c.nXi]; + Ep.SubC = fill(0, Medium_c.nC); end if; // Cooling pipe @@ -196,14 +129,10 @@ equation Se.diff_res_1 = Ee.diff_res_1 + 1/gamma_diff_e; Ee.diff_res_2 = Se.diff_res_2 + 1/gamma_diff_e; - Ee.ftype = Se.ftype; + Ee.Xi = Se.Xi; + Ee.SubC = Se.SubC; - Ee.Xco2 = Se.Xco2; - Ee.Xh2o = Se.Xh2o; - Ee.Xo2 = Se.Xo2; - Ee.Xso2 = Se.Xso2; - - ftype_e = Ee.ftype; + Xe = Ee.Xi; /* Pressure loss equation in the water pipe */ Ee.P - Se.P = lambdaE*ThermoSysPro.Functions.ThermoSquare(Ee.Q, eps)/rho; @@ -237,7 +166,7 @@ equation if (HsatvC < Ev.h) then 0 = Ev.Q*(Ev.h - HsatvC) - Ee.Q*(Se.h - HDesF) + J/3; Wdes = Ee.Q*(Se.h - HDesF); - Wdes = noEvent(min(Ev.Q*prodesmC.cp, Ee.Q*prodesmF.cp)*ThermoSysPro.Correlations.Thermal.WBHeatExchangerEfficiency(Ev.Q, Ee.Q, prodesmC.cp, prodesmF.cp, KCond/2, SDes, 1)*(proevC.T - prodesF.T)); + Wdes = noEvent(min(Ev.Q*cp_desmC, Ee.Q*cp_desmF)*ThermoSysPro.Correlations.Thermal.WBHeatExchangerEfficiency(Ev.Q, Ee.Q, cp_desmC, cp_desmF, KCond/2, SDes, 1)*(T_evC - T_desF)); /* If deheating is absent */ else Wdes = 1e-9; @@ -256,20 +185,20 @@ equation end if; Wcond = Ee.Q*(HDesF - HeiF); - Wcond = Ee.Q*promcF.cp*ThermoSysPro.Correlations.Thermal.WBHeatExchangerEfficiency(Ev.Q, Ee.Q, 1.e20, promcF.cp, KCond, (SCondDes - SDes), 0.5)*(TsatC - TeiF); + Wcond = Ee.Q*cp_mcF*ThermoSysPro.Correlations.Thermal.WBHeatExchangerEfficiency(Ev.Q, Ee.Q, 1.e20, cp_mcF, KCond, (SCondDes - SDes), 0.5)*(TsatC - TeiF); // Flash zone //----------- /* Heat power in case of partial vaporization in the drain */ - if (flashepC.x > 0) then + if (x_flashepC > 0) then Wflash = Ep.Q*(Ep.h - HsateC); else Wflash = 0; end if; /* Condition for partial vaporisation in the drain (flash) */ - if (flashepC.x > 0) then + if (x_flashepC > 0) then Hep = HsateC; else Sp.Q*Hep = HsateC*Ev.Q + Ep.h*Ep.Q; @@ -282,27 +211,21 @@ equation if noEvent(SPurge > 0) then 0 = Sp.Q*(Hep - Sp.h) - Ee.Q*(HeiF - Ee.h) + J/3; Wpurge = Ee.Q*(HeiF - Ee.h); - Wpurge = noEvent(min(Sp.Q*prompC.cp, Ee.Q*prompF.cp)*ThermoSysPro.Correlations.Thermal.WBHeatExchangerEfficiency(Sp.Q, Ee.Q, prompC.cp, prompF.cp, KPurge, SPurge, 0)*(prosp.T - proeeF.T)); - TeiF = proecF.T; + Wpurge = noEvent(min(Sp.Q*cp_mpC, Ee.Q*cp_mpF)*ThermoSysPro.Correlations.Thermal.WBHeatExchangerEfficiency(Sp.Q, Ee.Q, cp_mpC, cp_mpF, KPurge, SPurge, 0)*(T_sp - T_eeF)); + TeiF = Medium_e.temperature(state_ecF); else HeiF = Ee.h; Wpurge = 0; Hep = Sp.h; - TeiF = proeeF.T; + TeiF = T_eeF; end if; /* Fluid composition balance equations */ - 0 = Ep.Xco2*Ep.Q + Ev.Xco2*Ev.Q - Sp.Xco2*Sp.Q; - 0 = Ep.Xh2o*Ep.Q + Ev.Xh2o*Ev.Q - Sp.Xh2o*Sp.Q; - 0 = Ep.Xo2*Ep.Q + Ev.Xo2*Ev.Q - Sp.Xo2*Sp.Q; - 0 = Ep.Xso2*Ep.Q + Ev.Xso2*Ev.Q - Sp.Xso2*Sp.Q; - - Sp.ftype = ftype; + zeros(Medium_c.nXi) = Ep.Xi*Ep.Q + Ev.Xi*Ev.Q - Sp.Xi*Sp.Q; + zeros(Medium_c.nC) = Ep.SubC*Ep.Q + Ev.SubC*Ev.Q - Sp.SubC*Sp.Q; - Sp.Xco2 = Xco2; - Sp.Xh2o = Xh2o; - Sp.Xo2 = Xo2; - Sp.Xso2 = Xso2; + Xc = Sp.Xi; + SubCc = Sp.SubC; /* Flow reversal */ if continuous_flow_reversal then @@ -349,30 +272,43 @@ equation Sp.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - proeeF = ThermoSysPro.Properties.Fluid.Ph(Ee.P, Ee.h, mode_eeF, fluid_e); - proseF = ThermoSysPro.Properties.Fluid.Ph(Se.P, Se.h, mode_seF, fluid_e); - promeF = ThermoSysPro.Properties.Fluid.Ph((Ee.P + Se.P)/2,(Ee.h + Se.h)/2, mode_eeF, fluid_e); - proevC = ThermoSysPro.Properties.Fluid.Ph(Ev.P, Ev.h, mode_evC, fluid); - prospC = ThermoSysPro.Properties.Fluid.Ph(Sp.P, Sp.h, mode_spC, fluid); - prosp = ThermoSysPro.Properties.Fluid.Ph(Ev.P, Hep, mode_spC, fluid); - prodesF = ThermoSysPro.Properties.Fluid.Ph(Se.P, HDesF, mode_seF, fluid_e); - prompC = ThermoSysPro.Properties.Fluid.Ph(Ev.P, (Hep + Sp.h)/2, mode_spC, fluid); - prodesmC = ThermoSysPro.Properties.Fluid.Ph(Ev.P, (vsatC.h + Ev.h)/2, mode_evC, fluid); - prompF = ThermoSysPro.Properties.Fluid.Ph(Ee.P, (Ee.h + HeiF)/2, mode_eeF, fluid_e); - promcF = ThermoSysPro.Properties.Fluid.Ph((Ee.P + Se.P)/2, (HeiF + HDesF)/2, mode_mF, fluid_e); - prodesmF = ThermoSysPro.Properties.Fluid.Ph(Se.P, (HDesF + Se.h)/2, mode_seF, fluid_e); - proecF = ThermoSysPro.Properties.Fluid.Ph(Ee.P, HeiF, mode_eeF, fluid_e); - flashepC = ThermoSysPro.Properties.Fluid.Ph(Ev.P, Ep.h, mode_flash, fluid); + state_eeF = Medium_e.setState_phX(p=Ee.P, h=Ee.h, X=Xe); + state_seF = Medium_e.setState_phX(p=Se.P, h=Se.h, X=Xe); + state_meF = Medium_e.setState_phX(p=(Ee.P + Se.P)/2, h=(Ee.h + Se.h)/2, X=Xe); + state_evC = Medium_c.setState_phX(p=Ev.P, h=Ev.h, X=Ev.Xi); + state_spC = Medium_c.setState_phX(p=Sp.P, h=Sp.h, X=Xc); + state_sp = Medium_c.setState_phX(p=Ev.P, h=Hep, X=Xc); + state_desF = Medium_e.setState_phX(p=Se.P, h=HDesF, X=Xe); + state_mpC = Medium_c.setState_phX(p=Ev.P, h=(Hep + Sp.h)/2, X=Xc); + state_desmC = Medium_c.setState_phX(p=Ev.P, h=(HsatvC + Ev.h)/2, X=Ev.Xi); + state_mpF = Medium_e.setState_phX(p=Ee.P, h=(Ee.h + HeiF)/2, X=Xe); + state_mcF = Medium_e.setState_phX(p=(Ee.P + Se.P)/2, h=(HeiF + HDesF)/2, X=Xe); + state_desmF = Medium_e.setState_phX(p=Se.P, h=(HDesF + Se.h)/2, X=Xe); + state_ecF = Medium_e.setState_phX(p=Ee.P, h=HeiF, X=Xe); + cp_desmC = Medium_c.specificHeatCapacityCp(state_desmC); + cp_mcF = Medium_e.specificHeatCapacityCp(state_mcF); + cp_desmF = Medium_e.specificHeatCapacityCp(state_desmF); + cp_mpC = Medium_c.specificHeatCapacityCp(state_mpC); + cp_mpF = Medium_e.specificHeatCapacityCp(state_mpF); + + T_evC = Medium_c.temperature(state_evC); + T_desF = Medium_e.temperature(state_desF); + T_sp = Medium_c.temperature(state_sp); + T_eeF = Medium_e.temperature(state_eeF); + + x_flashepC = noEvent(if (Ep.h <= HsateC) then 0 else if (Ep.h >= HsatvC) then 1 else (Ep.h - HsateC)/(HsatvC - HsateC)); /* Fluid density */ - rho = promeF.d; + rho = Medium_e.density(state_meF); /* Saturation point at the vapor inlet pressure */ - (lsatC, vsatC) = ThermoSysPro.Properties.Fluid.Water_sat_P(Ev.P, fluid); + satC = Medium_c.setSat_p(Ev.P); + state_lsatC = Medium_c.setBubbleState(satC); + state_vsatC = Medium_c.setDewState(satC); - TsatC = lsatC.T; - HsateC = lsatC.h; - HsatvC = vsatC.h; + TsatC = Medium_c.saturationTemperature(Ev.P); + HsateC = Medium_c.specificEnthalpy(state_lsatC); + HsatvC = Medium_c.specificEnthalpy(state_vsatC); annotation ( Icon(coordinateSystem( diff --git a/ThermoSysPro/Fluid/HeatExchangers/SimpleDynamicCondenser.mo b/ThermoSysPro/Fluid/HeatExchangers/SimpleDynamicCondenser.mo index 43bf0d62..8861ebeb 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/SimpleDynamicCondenser.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/SimpleDynamicCondenser.mo @@ -1,10 +1,11 @@ -within ThermoSysPro.Fluid.HeatExchangers; +within ThermoSysPro.Fluid.HeatExchangers; model SimpleDynamicCondenser "Simple dynamic condenser" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condenser cavity" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the cooling pipes" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable function SaS = Medium.noSaS(SubC = SubCv) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable function PhasesSeparationFunction = Medium.HomogeneousPhasesSeparation(SubC = Cv.SubC) annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Volume V=1 "Cavity volume"; parameter Units.SI.Area A=1 "Cavity cross-sectional area"; @@ -33,15 +34,20 @@ model SimpleDynamicCondenser "Simple dynamic condenser" "Fluid initial pressure (active if dynamic_energy_balance=true and steady_state=false)" annotation (Evaluate=true, Dialog(enable=dynamic_energy_balance and not steady_state)); + parameter Medium.ExtraProperty SubCl0[Medium.nC](quantity=Medium.extraPropertiesNames)=Medium.C_default + "Initial liquid phase trace substances (active if dynamic_energy_balance=true and steady_state=false)" + annotation (Evaluate=true, Dialog(enable=dynamic_energy_balance and not + steady_state)); + parameter Medium.ExtraProperty SubCv0[Medium.nC](quantity=Medium.extraPropertiesNames)=Medium.C_default + "Initial vapor phase trace substances (active if dynamic_energy_balance=true and steady_state=false)" + annotation (Evaluate=true, Dialog(enable=dynamic_energy_balance and not + steady_state)); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region for the pipes (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer fluid_c=Integer(ftype) "Fluid number in the cavity"; - parameter Integer mode=Integer(region) - 1 "IF97 region for the pipes. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; @@ -78,6 +84,11 @@ public "Right hand side of the mass balance equation of the liquid phase in the cavity"; Units.SI.MassFlowRate BQv "Right hand side of the mass balance equation of the gas phase in the cavity"; + Medium.ExtraProperty BSubCl[Medium.nC](quantity=Medium.extraPropertiesNames) + "Right hand side of the trace balance equation of the liquid phase in the cavity"; + Medium.ExtraProperty BSubCv[Medium.nC](quantity=Medium.extraPropertiesNames) + "Right hand side of the trace balance equation of the vapor phase in the cavity"; + Medium.C_BiPhase C_record; Units.SI.Power BHl "Right hand side of the energy balance equation of the liquid phase in the cavity"; Units.SI.Power BHv @@ -102,37 +113,28 @@ public Real rl "Value of r(Q/gamma) for outlet Cl"; Units.SI.MassFlowRate gamma_diff(start=1.e-4) "Diffusion conductance in the pipes"; - FluidType ftype_p "Fluid type in the pipes"; - Integer fluid_p=Integer(ftype_p) "Fluid number in the pipes"; - - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prol - "Propriétés de l'eau dans le ballon" annotation (Placement(transformation( - extent={{-100,80},{-80,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prov - "Propriétés de la vapeur dans le ballon" annotation (Placement( - transformation(extent={{80,80},{100,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat - annotation (Placement(transformation(extent={{-30,40},{-10,60}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat - annotation (Placement(transformation( - extent={{10,40},{30,60}}, rotation=0))); - Interfaces.Connectors.FluidInlet Cv annotation (Placement(transformation( + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions in the condenser cavity"; + Medium.ExtraProperty SubCl[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Liquid phase trace substances in the cavity"; + Medium.ExtraProperty SubCv[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Vapor phase trace substances in the cavity"; + Medium.ExtraProperty SubCSaS[Medium.nC](quantity=Medium.extraPropertiesNames) "Trace modification in the trace balance equation"; + Medium_Cooling.MassFraction Xp[Medium_Cooling.nXi](start=Medium_Cooling.X_default[1:Medium_Cooling.nXi]) "Mass fractions in the cooling pipes"; + Medium.ThermodynamicState state_l "Liquid phase thermodynamic state in the cavity"; + Medium.ThermodynamicState state_v "Vapor phase thermodynamic state in the cavity"; + Medium.ThermodynamicState state_d "Outlet liquid thermodynamic state"; + Medium_Cooling.ThermodynamicState state_e "Average cooling pipe thermodynamic state"; + Medium.SaturationProperties sat "Saturation properties in the cavity"; + + Interfaces.Connectors.FluidInlet Cv(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-10,90},{10,110}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cl annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cl(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-8,-110},{12,-90}}, rotation=0))); ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal yNiveau annotation (Placement( transformation(extent={{100,-82},{120,-62}}, rotation=0))); public - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prod - annotation (Placement(transformation(extent={{-60,20},{-40,40}}, rotation=0))); -public - Interfaces.Connectors.FluidInlet Cee annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cee(redeclare package Medium = Medium_Cooling) annotation (Placement(transformation( extent={{-110,-32},{-90,-12}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cse annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cse(redeclare package Medium = Medium_Cooling) annotation (Placement(transformation( extent={{90,-30},{110,-10}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proe - "Propriétés de l'eau " annotation (Placement( - transformation(extent={{40,20},{60,40}}, rotation=0))); initial equation if dynamic_energy_balance then if steady_state then @@ -140,19 +142,20 @@ initial equation der(hv) = 0; der(Vl) = 0; der(P) = 0; + der(SubCl) = fill(0, Medium.nC); + der(SubCv) = fill(0, Medium.nC); else - hl = lsat.h; - hv = vsat.h; + hl = Medium.bubbleEnthalpy(Medium.setSat_p(P0)); + hv = Medium.dewEnthalpy(Medium.setSat_p(P0)); Vl = Vf0*V; P = P0; + SubCl = SubCl0; + SubCv = SubCv0; end if; end if; equation - /* Check that the fluid type for the cooling pipe is water/steam */ - assert((ftype_p == FluidType.WaterSteam) or (ftype_p == FluidType.WaterSteamSimple), "SimpleDynamicCondenser: the fluid type for the cooling pipe must be water/steam"); - /* Unconnected connectors */ if (cardinality(Cv) == 0) then Cv.Q = 0; @@ -160,11 +163,8 @@ equation Cv.h_vol_1 = 1.e5; Cv.diff_res_1 = 0; Cv.diff_on_1 = false; - Cv.ftype = ftype; - Cv.Xco2 = 0; - Cv.Xh2o = 0; - Cv.Xo2 = 0; - Cv.Xso2 = 0; + Cv.Xi = Medium.X_default[1:Medium.nXi]; + Cv.SubC = fill(0, Medium.nC); end if; if (cardinality(Cee) == 0) then @@ -173,11 +173,8 @@ equation Cee.h_vol_1 = 1.e5; Cee.diff_res_1 = 0; Cee.diff_on_1 = false; - Cee.ftype = ftype; - Cee.Xco2 = 0; - Cee.Xh2o = 0; - Cee.Xo2 = 0; - Cee.Xso2 = 0; + Cee.Xi = Medium_Cooling.X_default[1:Medium_Cooling.nXi]; + Cee.SubC = fill(0, Medium_Cooling.nC); end if; if (cardinality(Cl) == 0) then @@ -185,6 +182,8 @@ equation Cl.h_vol_2 = 1.e5; Cl.diff_res_2 = 0; Cl.diff_on_2 = false; + Cl.Xi = Medium.X_default[1:Medium.nXi]; + Cl.SubC = fill(0, Medium.nC); end if; if (cardinality(Cse) == 0) then @@ -192,6 +191,8 @@ equation Cse.h_vol_2 = 1.e5; Cse.diff_res_2 = 0; Cse.diff_on_2 = false; + Cse.Xi = Medium_Cooling.X_default[1:Medium_Cooling.nXi]; + Cse.SubC = fill(0, Medium_Cooling.nC); end if; /* Drum volume */ @@ -201,13 +202,13 @@ equation yNiveau.signal = Vl/A; /* Pressure at the bottom of the condenser */ - Pfond = if gravity_pressure then P + prod.d*g*Vl/A else P; + Pfond = if gravity_pressure then P + Medium.density(state_d)*g*Vl/A else P; /* Liquid phase mass balance equation in the cavity */ BQl = -Cl.Q + Qcond - Qevap; if dynamic_energy_balance then - rhol*der(Vl) + Vl*(prol.ddph*der(P) + prol.ddhp*der(hl)) = BQl; + rhol*der(Vl) + Vl*(Medium.density_derp_h(state_l)*der(P) + Medium.density_derh_p(state_l)*der(hl)) = BQl; else 0 = BQl; end if; @@ -216,7 +217,7 @@ equation BQv = Cv.Q + Qevap - Qcond; if dynamic_energy_balance then - rhov*der(Vv) + Vv*(prov.ddph*der(P) + prov.ddhp*der(hv)) = BQv; + rhov*der(Vv) + Vv*(Medium.density_derp_h(state_v)*der(P) + Medium.density_derh_p(state_v)*der(hv)) = BQv; else 0 = BQv; end if; @@ -229,19 +230,19 @@ equation Cl.P = Pfond; /* Liquid phase energy balance equation in the cavity */ - BHl = -Cl.Q*(Cl.h - (hl - P/rhol)) + Qcond*(lsat.h - (hl - P/rhol)) - Qevap*(vsat.h - (hl - P/rhol)) + Wvl + Jt_l; + BHl = -Cl.Q*(Cl.h - (hl - P/rhol)) + Qcond*(Medium.bubbleEnthalpy(sat) - (hl - P/rhol)) - Qevap*(Medium.dewEnthalpy(sat) - (hl - P/rhol)) + Wvl + Jt_l; if dynamic_energy_balance then - Vl*((P/rhol*prol.ddph - 1)*der(P) + (P/rhol*prol.ddhp + rhol)*der(hl)) = BHl; + Vl*((P/rhol*Medium.density_derp_h(state_l) - 1)*der(P) + (P/rhol*Medium.density_derh_p(state_l) + rhol)*der(hl)) = BHl; else 0 = BHl; end if; /* Vapor phase energy balance equation in the cavity */ - BHv = Cv.Q*(Cv.h - (hv - P/rhov)) + Qevap*(vsat.h - (hv - P/rhov)) - Qcond*(lsat.h - (hv - P/rhov)) - Wvl + Wout + Jt_v; + BHv = Cv.Q*(Cv.h - (hv - P/rhov)) + Qevap*(Medium.dewEnthalpy(sat) - (hv - P/rhov)) - Qcond*(Medium.bubbleEnthalpy(sat) - (hv - P/rhov)) - Wvl + Wout + Jt_v; if dynamic_energy_balance then - Vv*((P/rhov*prov.ddph - 1)*der(P) + (P/rhov*prov.ddhp + rhov)*der(hv)) = BHv; + Vv*((P/rhov*Medium.density_derp_h(state_v) - 1)*der(P) + (P/rhov*Medium.density_derh_p(state_v) + rhov)*der(hv)) = BHv; else 0 = BHv; end if; @@ -257,12 +258,26 @@ equation Wout = -Cee.Q*(Cse.h - Cee.h); /* Fluid composition in the cavity (no balance equations) */ - Cl.ftype = ftype; + Cv.Xi = Cl.Xi; + X = Cv.Xi; + + /* Traces composition balance equations */ + C_record = PhasesSeparationFunction(); + + SubCSaS = SaS(); - Cl.Xco2 = 0; - Cl.Xh2o = 0; - Cl.Xo2 = 0; - Cl.Xso2 = 0; + BSubCl = Qcond*C_record.Cl - Qevap*SubCl - Cl.Q*Cl.SubC; + BSubCv = Cv.Q*Cv.SubC + Qevap*SubCl - Qcond*C_record.Cg; + + if dynamic_energy_balance then + Vl*rhol*der(SubCl) + SubCl*BQl = BSubCl; + Vv*rhov*der(SubCv) + SubCv*BQv + Vv*rhov*SubCSaS = BSubCv; + else + SubCl*BQl = BSubCl; + SubCv*BQv + Vv*rhov*SubCSaS = BSubCv; + end if; + + Cl.SubC = SubCl; /* Pipes inlet and outlet */ Cee.Q = Cse.Q; @@ -276,14 +291,9 @@ equation Cse.diff_res_1 = Cee.diff_res_1 + 1/gamma_diff; Cee.diff_res_2 = Cse.diff_res_2 + 1/gamma_diff; - Cee.ftype = Cse.ftype; - - Cee.Xco2 = Cse.Xco2; - Cee.Xh2o = Cse.Xh2o; - Cee.Xo2 = Cse.Xo2; - Cee.Xso2 = Cse.Xso2; - - ftype_p = Cee.ftype; + Cee.Xi = Cse.Xi; + Cee.SubC = Cse.SubC; + Xp = Cee.Xi; Q = Cee.Q; deltaP = Cee.P - Cse.P; @@ -339,25 +349,24 @@ equation Pm = (Cee.P + Cse.P)/2; hm = (Cee.h + Cse.h)/2; - prol = ThermoSysPro.Properties.Fluid.Ph(P, hl,0, fluid_c); - prov = ThermoSysPro.Properties.Fluid.Ph(P, hv,0, fluid_c); - prod = ThermoSysPro.Properties.Fluid.Ph(Pfond, Cl.h, 0, fluid_c); - proe = ThermoSysPro.Properties.Fluid.Ph(Pm, hm, mode, fluid_p); - - (lsat,vsat) = ThermoSysPro.Properties.Fluid.Water_sat_P(P, fluid_c); + sat = Medium.setSat_p(P); + state_l = Medium.setState_phX(p=P, h=hl, X=X); + state_v = Medium.setState_phX(p=P, h=hv, X=X); + state_d = Medium.setState_phX(p=Pfond, h=Cl.h, X=X); + state_e = Medium_Cooling.setState_phX(p=Pm, h=hm, X=Xp); - rhom = proe.d; + rhom = Medium_Cooling.density(state_e); - Tl = prol.T; - rhol = prol.d; - xl = prol.x; + Tl = Medium.temperature(state_l); + rhol = Medium.density(state_l); + xl = (hl - Medium.bubbleEnthalpy(sat))/(Medium.dewEnthalpy(sat) - Medium.bubbleEnthalpy(sat)); - Tv = prov.T; - rhov = prov.d; - xv = prov.x; + Tv = Medium.temperature(state_v); + rhov = Medium.density(state_v); + xv = (hv - Medium.bubbleEnthalpy(sat))/(Medium.dewEnthalpy(sat) - Medium.bubbleEnthalpy(sat)); - k = ThermoSysPro.Properties.Fluid.ThermalConductivity_Ph(Pm, hm, fluid_p, mode, Cee.Xco2, Cee.Xh2o,Cee.Xo2, Cee.Xso2); - cp = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Pm, hm, fluid_p, mode, Cee.Xco2, Cee.Xh2o, Cee.Xo2, Cee.Xso2); + k = Medium_Cooling.thermalConductivity(state_e); + cp = Medium_Cooling.specificHeatCapacityCp(state_e); annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/HeatExchangers/SimpleEvaporatorWaterSteamFlueGases.mo b/ThermoSysPro/Fluid/HeatExchangers/SimpleEvaporatorWaterSteamFlueGases.mo index 12091190..01274522 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/SimpleEvaporatorWaterSteamFlueGases.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/SimpleEvaporatorWaterSteamFlueGases.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model SimpleEvaporatorWaterSteamFlueGases "Simple water/steam - flue gases evaporator" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_FlueGases = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the flue gases side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real Kdpf=10 "Flue gases pressure drop coefficient"; parameter Real Kdpe=10 "Water/steam pressure drop coefficient"; @@ -10,10 +11,8 @@ model SimpleEvaporatorWaterSteamFlueGases "Simple water/steam - flue gases evapo "Diffusion conductance for the water/steam side (active if diffusion=true in neighbouring volumes)"; parameter Units.SI.MassFlowRate gamma_diff_fg=1e-4 "Diffusion conductance for the flue gases side (active if diffusion=true in neighbouring volumes)"; - parameter IF97Region region=IF97Region.All_regions "IF97 region for the water/steam side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected - parameter Integer mode=Integer(region) - 1 "IF97 region for the water/steam side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; public @@ -39,37 +38,26 @@ public Units.SI.Density rhof(start=0.9) "Flue gases density"; Units.SI.Density rhoe(start=700) "Water density"; Units.SI.Power W(start=1e8) "Power exchanged"; - FluidType ftype_ws "Fluid type for the water/steam side"; - Integer fluid_ws=Integer(ftype_ws) "Fluid number for the water/steam side"; - FluidType ftype_fg "Fluid type for the flue gases side"; - Integer fluid_fg=Integer(ftype_fg) "Fluid number for the flue gases side"; - - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cws2 annotation ( + Medium.MassFraction Xws[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Water/steam mass fractions"; + Medium_FlueGases.MassFraction Xfg[Medium_FlueGases.nXi](start=Medium_FlueGases.X_default[1:Medium_FlueGases.nXi]) "Flue gases mass fractions"; + Medium.ExtraProperty SubCws[Medium.nC](quantity=Medium.extraPropertiesNames, start=Medium.C_default) "Water/steam trace substances"; + Medium_FlueGases.ExtraProperty SubCfg[Medium_FlueGases.nC](quantity=Medium_FlueGases.extraPropertiesNames, start=Medium_FlueGases.C_default) "Flue gases trace substances"; + Medium.ThermodynamicState state_ws_in "Water/steam inlet thermodynamic state"; + Medium.ThermodynamicState state_ws_out "Water/steam outlet thermodynamic state"; + Medium.ThermodynamicState state_ws_m "Water/steam average thermodynamic state"; + Medium.SaturationProperties sat_ws "Water/steam saturation properties at the outlet pressure"; + Medium_FlueGases.ThermodynamicState state_fg_in "Flue gases inlet thermodynamic state"; + Medium_FlueGases.ThermodynamicState state_fg_out "Flue gases outlet thermodynamic state"; + + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium) annotation ( Placement(transformation(extent={{90,-10},{110,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cws1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium) annotation ( Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cfg1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cfg1(redeclare package Medium = Medium_FlueGases) annotation ( Placement(transformation(extent={{-10,80},{10,100}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cfg2 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cfg2(redeclare package Medium = Medium_FlueGases) annotation ( Placement(transformation(extent={{-10,-100},{10,-80}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proee - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proes - annotation (Placement(transformation(extent={{-52,80},{-32,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proem - annotation (Placement(transformation(extent={{-76,80},{-56,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat - annotation (Placement(transformation( - extent={{80,80},{100,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat - annotation (Placement(transformation(extent={{58,80},{78,100}}, rotation=0))); equation - /* Check that the fluid type for the water/steam side is water/steam */ - assert((ftype_ws == FluidType.WaterSteam) or (ftype_ws == FluidType.WaterSteamSimple), "SimpleEvaporatorWaterSteamFlueGases: the fluid type must be water/steam for the water/steam side"); - /* Flue gases inlet */ Pef = Cfg1.P; Hef = Cfg1.h; @@ -89,14 +77,10 @@ equation Cfg2.diff_res_1 = Cfg1.diff_res_1 + 1/gamma_diff_fg; Cfg1.diff_res_2 = Cfg2.diff_res_2 + 1/gamma_diff_fg; - Cfg1.ftype = Cfg2.ftype; - - Cfg2.Xco2 = Cfg1.Xco2; - Cfg2.Xh2o = Cfg1.Xh2o; - Cfg2.Xo2 = Cfg1.Xo2; - Cfg2.Xso2 = Cfg1.Xso2; - - ftype_fg = Cfg1.ftype; + Cfg1.Xi = Cfg2.Xi; + Xfg = Cfg1.Xi; + Cfg1.SubC = Cfg2.SubC; + SubCfg = Cfg1.SubC; /* Water inlet */ Pee = Cws1.P; @@ -117,14 +101,10 @@ equation Cws2.diff_res_1 = Cws1.diff_res_1 + 1/gamma_diff_ws; Cws1.diff_res_2 = Cws2.diff_res_2 + 1/gamma_diff_ws; - Cws1.ftype = Cws2.ftype; - - Cws2.Xco2 = Cws1.Xco2; - Cws2.Xh2o = Cws1.Xh2o; - Cws2.Xo2 = Cws1.Xo2; - Cws2.Xso2 = Cws1.Xso2; - - ftype_ws = Cws1.ftype; + Cws1.Xi = Cws2.Xi; + Xws = Cws1.Xi; + Cws1.SubC = Cws2.SubC; + SubCws = Cws1.SubC; /* Pressure losses */ Pef = Psf + Kdpf*ThermoSysPro.Functions.ThermoSquare(Qf, eps)/rhof; @@ -135,26 +115,28 @@ equation W = Qe*(Hse - Hee); /* Flue gases specific enthalpy at the inlet */ - Tef = ThermoSysPro.Properties.Fluid.Temperature_Ph(Pef, Hef, fluid_fg, 0, Cfg1.Xco2, Cfg1.Xh2o, Cfg1.Xo2, Cfg1.Xso2); + state_fg_in = Medium_FlueGases.setState_phX(p=Pef, h=Hef, X=Xfg); + Tef = Medium_FlueGases.temperature(state_fg_in); /* Flue gases specific enthalpy at the outlet */ - Tsf = ThermoSysPro.Properties.Fluid.Temperature_Ph(Psf, Hsf, fluid_fg, 0, Cfg1.Xco2, Cfg1.Xh2o, Cfg1.Xo2, Cfg1.Xso2); + state_fg_out = Medium_FlueGases.setState_phX(p=Psf, h=Hsf, X=Xfg); + Tsf = Medium_FlueGases.temperature(state_fg_out); /* Flue gases density */ - rhof = ThermoSysPro.Properties.Fluid.Density_Ph(Pef, Hef, fluid_fg, 0, Cfg1.Xco2, Cfg1.Xh2o, Cfg1.Xo2, Cfg1.Xso2); + rhof = Medium_FlueGases.density(state_fg_in); /* Water/steam thermodynamic properties */ - proee = ThermoSysPro.Properties.Fluid.Ph(Pee, Hee, mode, fluid_ws); - Tee = proee.T; + state_ws_in = Medium.setState_phX(p=Pee, h=Hee, X=Xws); + Tee = Medium.temperature(state_ws_in); - proem = ThermoSysPro.Properties.Fluid.Ph((Pee + Pse)/2, (Hee + Hse)/2, mode, fluid_ws); - rhoe = proem.d; + state_ws_m = Medium.setState_phX(p=(Pee + Pse)/2, h=(Hee + Hse)/2, X=Xws); + rhoe = Medium.density(state_ws_m); - proes = ThermoSysPro.Properties.Fluid.Ph(Pse, Hse, mode, fluid_ws); - Tse = proes.T; + state_ws_out = Medium.setState_phX(p=Pse, h=Hse, X=Xws); + Tse = Medium.temperature(state_ws_out); - (lsat,vsat) = ThermoSysPro.Properties.Fluid.Water_sat_P(Pse, fluid_ws); - Hse = vsat.h; + sat_ws = Medium.setSat_p(Pse); + Hse = Medium.dewEnthalpy(sat_ws); annotation (Diagram(graphics={ Rectangle( diff --git a/ThermoSysPro/Fluid/HeatExchangers/SimpleStaticCondenser.mo b/ThermoSysPro/Fluid/HeatExchangers/SimpleStaticCondenser.mo index 8f8210f0..28800a03 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/SimpleStaticCondenser.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/SimpleStaticCondenser.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model SimpleStaticCondenser "Simple static condenser" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condensing side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the cooling side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real Kc=10 "Friction pressure loss coefficient for the hot side"; parameter Real Kf=10 "Friction pressure loss coefficient for the cold side"; @@ -18,15 +19,8 @@ model SimpleStaticCondenser "Simple static condenser" "Diffusion conductance for the hot fluid (active if diffusion=true in neighbouring volumes)"; parameter Units.SI.MassFlowRate gamma_diff_f=1e-4 "Diffusion conductance for the cold fluid (active if diffusion=true in neighbouring volumes)"; - parameter IF97Region region_c=IF97Region.All_regions "IF97 region for the hot fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_cs=IF97Region.All_regions "IF97 region of the water at the outlet of the hot side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "IF97 region for the cold fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; - parameter Integer mode_c=Integer(region_c) - 1 "IF97 region for the hot fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_cs=Integer(region_cs) - 1 "IF97 region of the water at the outlet of the hot side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "IF97 region for the cold fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; public @@ -56,47 +50,27 @@ public Units.SI.Density rhof(start=998) "Density of the fluid in the cold side"; Units.SI.MassFlowRate Qc(start=100) "Hot fluid mass flow rate"; Units.SI.MassFlowRate Qf(start=100) "Cold fluid mass flow rate"; - FluidType ftype_c "Fluid type for the hot fluid"; - Integer fluid_c=Integer(ftype_c) "Fluid number for the hot fluid"; - FluidType ftype_f "Fluid type for the cold fluid"; - Integer fluid_f=Integer(ftype_f) "Fluid number for the cold fluid"; + Medium.MassFraction Xc[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions in the condensing side"; + Medium_Cooling.MassFraction Xf[Medium_Cooling.nXi](start=Medium_Cooling.X_default[1:Medium_Cooling.nXi]) "Mass fractions in the cooling side"; + Medium.ThermodynamicState state_ce "Thermodynamic state at the condensing-side inlet"; + Medium.ThermodynamicState state_cs "Thermodynamic state at the condensing-side outlet"; + Medium.ThermodynamicState state_mc "Average thermodynamic state in the condensing side"; + Medium_Cooling.ThermodynamicState state_fe "Thermodynamic state at the cooling-side inlet"; + Medium_Cooling.ThermodynamicState state_fs "Thermodynamic state at the cooling-side outlet"; + Medium_Cooling.ThermodynamicState state_mf "Average thermodynamic state in the cooling side"; + Medium.SaturationProperties sat_c "Saturation properties at the condensing-side inlet pressure"; public - Interfaces.Connectors.FluidInlet Ec annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ec(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-70,-110},{-50,-90}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ef annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ef(redeclare package Medium = Medium_Cooling) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sf annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sf(redeclare package Medium = Medium_Cooling) annotation (Placement(transformation( extent={{90,-11},{110,9}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sc annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sc(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{50,-110},{70,-90}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proce - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph procs - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profe - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph promf - annotation (Placement(transformation(extent={{-20,80},{0,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat - annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat - annotation (Placement(transformation( - extent={{40,80},{60,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph promc - annotation (Placement(transformation(extent={{0,-100},{20,-80}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profs - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); equation - /* Check that the fluid type for both sides is water/steam */ - assert((ftype_c == FluidType.WaterSteam) or (ftype_c == FluidType.WaterSteamSimple), "SimpleStaticCondenser: the fluid type must be water/steam for the hot side"); - assert((ftype_f == FluidType.WaterSteam) or (ftype_f == FluidType.WaterSteamSimple), "SimpleStaticCondenser: the fluid type must be water/steam for the cold side"); - /* Mass flow rates */ Ec.Q = Sc.Q; @@ -109,14 +83,8 @@ equation Sc.diff_res_1 = Ec.diff_res_1 + 1/gamma_diff_c; Ec.diff_res_2 = Sc.diff_res_2 + 1/gamma_diff_c; - Ec.ftype = Sc.ftype; - - Ec.Xco2 = Sc.Xco2; - Ec.Xh2o = Sc.Xh2o; - Ec.Xo2 = Sc.Xo2; - Ec.Xso2 = Sc.Xso2; - - ftype_c = Ec.ftype; + Ec.Xi = Sc.Xi; + Ec.SubC = Sc.SubC; Ef.Q = Sf.Q; @@ -129,20 +97,16 @@ equation Sf.diff_res_1 = Ef.diff_res_1 + 1/gamma_diff_f; Ef.diff_res_2 = Sf.diff_res_2 + 1/gamma_diff_f; - Ef.ftype = Sf.ftype; - - Ef.Xco2 = Sf.Xco2; - Ef.Xh2o = Sf.Xh2o; - Ef.Xo2 = Sf.Xo2; - Ef.Xso2 = Sf.Xso2; - - ftype_f = Ef.ftype; + Ef.Xi = Sf.Xi; + Ef.SubC = Sf.SubC; Qc = Ec.Q; Qf = Ef.Q; + Xc = Ec.Xi; + Xf = Ef.Xi; /* The fluid specific enthalpy at the outlet of the hot side is assumed to be at the saturation point */ - Sc.h = lsat.h; + Sc.h = Medium.bubbleEnthalpy(sat_c); /* Power exchanged between the two sides */ W = Qf*(Sf.h - Ef.h); @@ -163,33 +127,32 @@ equation DPf = DPff + DPgf; /* Fluid thermodynamic properties at the hot side */ - proce = ThermoSysPro.Properties.Fluid.Ph(Ec.P, Ec.h, mode_c, fluid_c); - procs = ThermoSysPro.Properties.Fluid.Ph(Sc.P, Sc.h, mode_cs, fluid_c); - promc = ThermoSysPro.Properties.Fluid.Ph((Ec.P + Sc.P)/2, (Ec.h + Sc.h)/2, mode_c, fluid_c); - - Tec = proce.T; - Tsc = procs.T; + sat_c = Medium.setSat_p(Ec.P); + state_ce = Medium.setState_phX(p=Ec.P, h=Ec.h, X=Xc); + state_cs = Medium.setState_phX(p=Sc.P, h=Sc.h, X=Xc); + state_mc = Medium.setState_phX(p=(Ec.P + Sc.P)/2, h=(Ec.h + Sc.h)/2, X=Xc); - (lsat,vsat) = ThermoSysPro.Properties.Fluid.Water_sat_P(Ec.P, fluid_c); + Tec = Medium.temperature(state_ce); + Tsc = Medium.temperature(state_cs); if (p_rhoc > 0) then rhoc = p_rhoc; else - rhoc = promc.d; + rhoc = Medium.density(state_mc); end if; /* Fluid thermodynamic properties at the cold side */ - profe = ThermoSysPro.Properties.Fluid.Ph(Ef.P, Ef.h, mode_f, fluid_f); - profs = ThermoSysPro.Properties.Fluid.Ph(Sf.P, Sf.h, mode_f, fluid_f); - promf = ThermoSysPro.Properties.Fluid.Ph((Ef.P + Sf.P)/2, (Ef.h + Sf.h)/2, mode_f, fluid_f); + state_fe = Medium_Cooling.setState_phX(p=Ef.P, h=Ef.h, X=Xf); + state_fs = Medium_Cooling.setState_phX(p=Sf.P, h=Sf.h, X=Xf); + state_mf = Medium_Cooling.setState_phX(p=(Ef.P + Sf.P)/2, h=(Ef.h + Sf.h)/2, X=Xf); - Tef = profe.T; - Tsf = profs.T; + Tef = Medium_Cooling.temperature(state_fe); + Tsf = Medium_Cooling.temperature(state_fs); if (p_rhof > 0) then rhof = p_rhof; else - rhof = promf.d; + rhof = Medium_Cooling.density(state_mf); end if; annotation ( diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticAerocondenser.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticAerocondenser.mo index 40d08f2a..6b9ec23d 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticAerocondenser.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticAerocondenser.mo @@ -1,35 +1,27 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticAerocondenser "Static aerocondenser" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condensing side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Air = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the air side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.CoefficientOfHeatTransfer Uref=50 "Reference heat transfer coefficient between the air and the condenser external wall"; parameter Real UCOR=1. "Heat transfer corrective coefficient"; parameter Units.SI.Area Se=1.e4 "Condenser external wall area"; parameter Units.SI.Height z=0 "Water level in the condenser"; - parameter Real K=0.02 "Pressure loss coefficient for the water/steam pipe (Pa.s²/(kg.m**3))"; - parameter Real Ka=0.00 "Pressure loss coefficient for the air (Pa.s²/(kg.m**3))"; + parameter Real K=0.02 "Pressure loss coefficient for the water/steam pipe (Pa.s2/(kg.m3))"; + parameter Real Ka=0.00 "Pressure loss coefficient for the air (Pa.s2/(kg.m3))"; parameter Units.SI.MassFlowRate gamma_diff=1e-4 "Air diffusion conductance (active if diffusion=true in neighbouring volumes)"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region_e=IF97Region.All_regions "IF97 region at the inlet (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_s=IF97Region.All_regions "IF97 region at the outlet (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); + parameter Boolean use_Cw=false "true: enable drain inlet Cw" annotation(Evaluate=true, Dialog(tab="General", group="Optional connectors")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; - constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer fluid_w=Integer(ftype) "Water fluid number"; - parameter Integer mode_e=Integer(region_e) - 1 "IF97 region at the inlet. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_s=Integer(region_s) - 1 "IF97 region at the outlet. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Units.SI.MassFlowRate Qeps=1.e-3 - "Small mass flow rate for continuous flow reversal"; public Units.SI.SpecificEnthalpy he(start=370000) @@ -63,7 +55,6 @@ public Units.SI.Density rho_e(start=998) "Water density at the outlet of the condenser"; Units.SI.Density rho_a(start=1) "Air density"; - FluidType fluids[4] "Fluids mixing in volume"; Units.SI.Power Jws1 "Thermal power diffusion from inlet Cws1"; Units.SI.Power Jw "Thermal power diffusion from inlet Cw"; Units.SI.Power Jws2 "Thermal power diffusion from outlet Cws2"; @@ -74,48 +65,34 @@ public Real rws1 "Value of r(Q/gamma) for inlet Cws1"; Real rw "Value of r(Q/gamma) for inlet Cw"; Real rws2 "Value of r(Q/gamma) for outlet Cws1"; - FluidType ftype_a "Air fluid type"; - Integer fluid_a=Integer(ftype_a) "Air fluid number"; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions in the condenser cavity"; + Medium.ExtraProperty SubC[Medium.nC](start=Medium.C_default) "Trace substance concentrations in the condenser cavity"; + Medium_Air.MassFraction X_Air[Medium_Air.nXi](start=Medium_Air.X_default[1:Medium_Air.nXi]) "Air mass fractions"; + Medium.SaturationProperties sat "Saturation properties inside the condenser"; public - Interfaces.Connectors.FluidInlet Cws1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cws1(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-10,100},{10,120}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cws2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cws2(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-10,-120},{10,-100}}, rotation=0))); - Interfaces.Connectors.FluidInlet Cair1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cair1(redeclare package Medium = Medium_Air) annotation (Placement(transformation( extent={{100,-119},{120,-99}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Cair2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Cair2(redeclare package Medium = Medium_Air) annotation (Placement(transformation( extent={{100,100},{120,120}}, rotation=0))); public - Interfaces.Connectors.FluidInlet Cw annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Cw(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-120,-100},{-100,-80}}, rotation=0), iconTransformation( extent={{-120,-100},{-100,-80}}))); - Properties.WaterSteam.Common.ThermoProperties_ph proe "Water properties" - annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0))); - Properties.WaterSteam.Common.PropThermoSat lsat annotation (Placement( - transformation(extent={{-100,80},{-80,100}}, rotation=0))); equation - - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Cws1.ftype; - fluids[3] = Cw.ftype; - fluids[4] = Cws2.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), "StaticAerocondenser: fluids mixing in condenser volume are not compatible with each other"); - /* Unconnected connectors */ - if (cardinality(Cw) == 0) then + if not use_Cw then Cw.Q = 0; Cw.h = 1.e5; Cw.h_vol_1 = 1.e5; Cw.diff_res_1 = 0; Cw.diff_on_1 = false; - Cw.ftype = ftype; - Cw.Xco2 = 0; - Cw.Xh2o = 0; - Cw.Xo2 = 0; - Cw.Xso2 = 0; + Cw.Xi = Medium.X_default[1:Medium.nXi]; + Cw.SubC = Medium.C_default; end if; /* Pressure at the bottom of the condenser*/ @@ -132,23 +109,16 @@ equation /* Water/steam energy balance equation */ 0 = (Cws1.h - he)*Cws1.Q + (Cw.h - he)*Cw.Q - (Cws2.h - he)*Cws2.Q - W + J; - // if noEvent(Qa > 0) then - // (has - hae)*Qa - ((Cws1.h - he)*Q + (Cw.h - he)*Cw.Q) = 0; - // else - // (has - hae)*1.e-6 - ((Cws1.h - he)*Q + (Cw.h - he)*Cw.Q) = 0; - // end if; Cws1.h_vol_2 = he; Cw.h_vol_2 = he; Cws2.h_vol_1 = he; /* Fluid composition in the cavity (no balance equations) */ - Cws2.ftype = ftype; - - Cws2.Xco2 = 0; - Cws2.Xh2o = 0; - Cws2.Xo2 = 0; - Cws2.Xso2 = 0; + X = Cws1.Xi; + SubC = Cws1.SubC; + Cws2.Xi = X; + Cws2.SubC = SubC; /* Air inlet and outlet */ Cair1.Q = Cair2.Q; @@ -162,14 +132,9 @@ equation Cair2.diff_res_1 = Cair1.diff_res_1 + 1/gamma_diff; Cair1.diff_res_2 = Cair2.diff_res_2 + 1/gamma_diff; - Cair1.ftype = Cair2.ftype; - - Cair1.Xco2 = Cair2.Xco2; - Cair1.Xh2o = Cair2.Xh2o; - Cair1.Xo2 = Cair2.Xo2; - Cair1.Xso2 = Cair2.Xso2; - - ftype_a = Cair1.ftype; + Cair1.Xi = Cair2.Xi; + Cair1.SubC = Cair2.SubC; + X_Air = Cair1.Xi; Qa = Cair1.Q; Pae = Cair1.P; @@ -242,22 +207,20 @@ equation Tcond = ((Tas + Tae*(Ef - 1.0))/Ef); /* Condensation pressure */ - Pcond = ThermoSysPro.Properties.Fluid.P_sat(Tcond, fluid_w); + Pcond = Medium.saturationPressure(Tcond); /* Water/steam thermodynamic properties */ - proe = ThermoSysPro.Properties.Fluid.Ph((Pfond + Pcond)/2, he, mode_s, fluid_w); - rho_e = proe.d; + rho_e = Medium.density_phX(p=(Pfond + Pcond)/2, h=he, X=X); /* Water specific enthalpy at the saturation point with pressure Pcond */ - lsat = ThermoSysPro.Properties.Fluid.Water_sat_P(Pcond, fluid_w); - he = lsat.h; + sat = Medium.setSat_p(Pcond); + he = Medium.bubbleEnthalpy(sat); /* Air thermodynamic properties */ - hae = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Pae, Tae, fluid_a, 0, Cair1.Xco2, Cair1.Xh2o, Cair1.Xo2, Cair1.Xso2); - has = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Pas, Tas, fluid_a, 0, Cair1.Xco2, Cair1.Xh2o, Cair1.Xo2, Cair1.Xso2); - rho_a = ThermoSysPro.Properties.Fluid.Density_Ph(Pae, hae, fluid_a, 0, Cair1.Xco2, Cair1.Xh2o, Cair1.Xo2, Cair1.Xso2); - cp_a = ThermoSysPro.Properties.FlueGases.FlueGases_cp((Pae + Pas)/2, (Tae + Tas)/2, Cair1.Xco2, Cair1.Xh2o, Cair1.Xo2, Cair1.Xso2); - //cp_a = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_PT((Pae + Pas)/2, (Tae + Tas)/2, fluid_a, 0, Cair1.Xco2, Cair1.Xh2o, Cair1.Xo2, Cair1.Xso2); + Tae = Medium_Air.temperature_phX(p=Pae, h=hae, X=X_Air); + has = Medium_Air.specificEnthalpy_pTX(p=Pas, T=Tas, X=X_Air); + rho_a = Medium_Air.density_phX(p=Pae, h=hae, X=X_Air); + cp_a = Medium_Air.specificHeatCapacityCp(Medium_Air.setState_pTX(p=(Pae + Pas)/2, T=(Tae + Tas)/2, X=X_Air)); annotation ( Diagram(coordinateSystem( @@ -508,8 +471,72 @@ equation width=0.76, height=0.76), Documentation(info=" -Copyright © EDF 2002 - 2024
-ThermoSysPro Version 4.1
+
+Static model of an air-cooled condenser. A water/steam flow is condensed at the
+condensation pressure and the released heat is transferred to a cooling-air flow.
+An optional drain inlet Cw can be enabled with use_Cw=true.
+
Pcond.he is the saturated liquid enthalpy at Pcond.Pfond = Pcond + rho_e*g*z.deltaP = Ka*Qa*abs(Qa)/rho_a.Pcond, Pfond, and the connected ports.Cws1: steam inlet on the condensing side.Cws2: condensate outlet on the condensing side.Cw: optional drain inlet on the condensing side; disabled internally when use_Cw=false.Cair1: cooling-air inlet.Cair2: cooling-air outlet.0 = Cws1.Q + Cw.Q - Cws2.Q.0 = (Cws1.h - he)*Cws1.Q + (Cw.h - he)*Cw.Q - (Cws2.h - he)*Cws2.Q - W + J.W = Qa*(has - hae).Nut = Se*U/(Qa*cp_a) when Qa*cp_a > 0.Ef = 1 - exp(-Nut).Tcond = (Tas + Tae*(Ef - 1))/Ef.Pcond = Medium.saturationPressure(Tcond).Medium is the condensing-side medium and must provide two-phase saturation properties.Medium_Air is the air-side medium and is evaluated with the generic Medium API.Cws1.Xi and propagated to Cws2.Xi.Cair1 and Cair2.
+The reference heat-transfer coefficient Uref is corrected by
+UCOR and by an empirical dependency on the inlet air temperature:
+
U = UCOR*Uref*(-2e-4*(Tae - 273.16)^2 + 0.0187*(Tae - 273.16) + 0.5007)
continuous_flow_reversal option.Copyright © EDF 2002 - 2024
+ThermoSysPro Version 4.1
", revisions="Author
diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticCondenser.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticCondenser.mo index c7986653..b8a6630e 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticCondenser.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticCondenser.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticCondenser "Static condenser" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condensing side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cooling side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Area SCO=10000 "Heat exchange surface"; parameter Real CPCE=0.02 "Pressure loss coefficient for the water side (Pa.s²/(kg.m**3))"; @@ -19,16 +18,9 @@ model StaticCondenser "Static condenser" "Air diffusion conductance (active if diffusion=true in neighbouring volumes)"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region_ee=IF97Region.All_regions "IF97 region at the water inlet (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_se=IF97Region.All_regions "IF97 region at the water outlet (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_ex=IF97Region.All_regions "IF97 region at the extraction point (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; - parameter Integer fluid=Integer(ftype) "Water fluid number"; - parameter Integer mode_ee=Integer(region_ee) - 1 "IF97 region at the water inlet. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_se=Integer(region_se) - 1 "IF97 region at the water outlet. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_ex=Integer(region_ex) - 1 "IF97 region at the extraction point. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; @@ -79,7 +71,6 @@ public Units.SI.SpecificEnthalpy Hml(start=250000) "Extraction water average specific enthalpy"; Units.SI.Power W "Heat power released to the cold source"; - FluidType fluids[5] "Fluids mixing in volume"; Units.SI.Power Jvt "Thermal power diffusion from inlet Cvt"; Units.SI.Power Jev "Thermal power diffusion from inlet Cev"; Units.SI.Power Jep "Thermal power diffusion from inlet Cep"; @@ -93,60 +84,34 @@ public Real rev "Value of r(Q/gamma) for inlet Cev"; Real rep "Value of r(Q/gamma) for inlet Cep"; Real rex "Value of r(Q/gamma) for outlet Cex"; - FluidType ftype_p "Cooling pipe fluid type"; - Integer fluid_p=Integer(ftype_p) "Cooling pipe fluid number"; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions in the condenser cavity"; + Medium.ExtraProperty SubC[Medium.nC](start=Medium.C_default) "Trace substance concentrations in the condenser cavity"; + Medium_Cooling.MassFraction X_Cooling[Medium_Cooling.nXi](start=Medium_Cooling.X_default[1:Medium_Cooling.nXi]) "Mass fractions in the cooling pipe"; + Medium.ThermodynamicState state_ex "Thermodynamic state at the extraction point"; + Medium_Cooling.ThermodynamicState state_ee "Thermodynamic state at the cooling water inlet"; + Medium_Cooling.ThermodynamicState state_se "Thermodynamic state at the cooling water outlet"; + Medium.SaturationProperties sat "Saturation properties inside the condenser"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cee "Cooling water inlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cee(redeclare package Medium = Medium_Cooling) "Cooling water inlet" annotation (Placement(transformation(extent={{-112,-72},{-88,-50}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cse + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cse(redeclare package Medium = Medium_Cooling) "Cooling water outlet" annotation (Placement(transformation(extent={{90,-72}, {114,-50}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cex "Extraction water" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cex(redeclare package Medium = Medium) "Extraction water" annotation (Placement(transformation(extent={{-12,-112},{14,-88}}, rotation= 0), iconTransformation(extent={{-12,-112},{14,-88}}))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cvt "Turbine outlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cvt(redeclare package Medium = Medium) "Turbine outlet" annotation (Placement(transformation(extent={{-13,88},{13,114}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proex - "Propriétés de l'eau" - annotation (Placement(transformation(extent={{60,80},{80,100}}, rotation=0))); -public - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proee - "Propriétés de l'eau" - annotation (Placement(transformation(extent={{20,80},{40,100}}, rotation=0))); -public - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prose - "Propriétés de l'eau" - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat1 - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat1 - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cep "Drain inlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cep(redeclare package Medium = Medium) "Drain inlet" annotation (Placement(transformation(extent={{-112,8},{-88,30}}, rotation=0))); public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cev "Vapor inlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cev(redeclare package Medium = Medium) "Vapor inlet" annotation (Placement(transformation(extent={{-112,50},{-88,72}}, rotation= 0))); equation - - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Cvt.ftype; - fluids[3] = Cev.ftype; - fluids[4] = Cep.ftype; - fluids[5] = Cex.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), "StaticCondenser: fluids mixing in condenser volume are not compatible with each other"); - - /* Check that the fluid type for the cooling pipe is water/steam */ - assert((ftype_p == FluidType.WaterSteam) or (ftype_p == FluidType.WaterSteamSimple), "StaticCondenser: the fluid type for the cooling pipe must be water/steam"); - /* Unconnected connectors */ if (cardinality(Cev) == 0) then Cev.Q = 0; @@ -154,11 +119,8 @@ equation Cev.h_vol_1 = 1.e5; Cev.diff_res_1 = 0; Cev.diff_on_1 = false; - Cev.ftype = ftype; - Cev.Xco2 = 0; - Cev.Xh2o = 0; - Cev.Xo2 = 0; - Cev.Xso2 = 0; + Cev.Xi = Medium.X_default[1:Medium.nXi]; + Cev.SubC = Medium.C_default; end if; if (cardinality(Cep) == 0) then @@ -167,11 +129,8 @@ equation Cep.h_vol_1 = 1.e5; Cep.diff_res_1 = 0; Cep.diff_on_1 = false; - Cep.ftype = ftype; - Cep.Xco2 = 0; - Cep.Xh2o = 0; - Cep.Xo2 = 0; - Cep.Xso2 = 0; + Cep.Xi = Medium.X_default[1:Medium.nXi]; + Cep.SubC = Medium.C_default; end if; // Water/steam cavity @@ -227,12 +186,10 @@ equation 0 = Tsat - Tse - (Tsat - Tee)*exp(XKCO*SCO*((Tee - Tse)/W)); /* Fluid composition in the cavity (no balance equations) */ - Cex.ftype = ftype; - - Cex.Xco2 = 0; - Cex.Xh2o = 0; - Cex.Xo2 = 0; - Cex.Xso2 = 0; + X = Cvt.Xi; + SubC = Cvt.SubC; + Cex.Xi = X; + Cex.SubC = SubC; /* Flow reversal */ if continuous_flow_reversal then @@ -301,17 +258,12 @@ equation Cse.diff_res_1 = Cee.diff_res_1 + 1/gamma_diff; Cee.diff_res_2 = Cse.diff_res_2 + 1/gamma_diff; - Cee.ftype = Cse.ftype; - - Cee.Xco2 = Cse.Xco2; - Cee.Xh2o = Cse.Xh2o; - Cee.Xo2 = Cse.Xo2; - Cee.Xso2 = Cse.Xso2; - - ftype_p = Cee.ftype; + Cee.Xi = Cse.Xi; + Cee.SubC = Cse.SubC; Qee = Cee.Q; Qse = Cse.Q; + X_Cooling = Cee.Xi; Pee = Cee.P; Pse = Cse.P; @@ -326,23 +278,23 @@ equation W = Qee*(Hse - Hee); /* Fluid thermodynamic properties */ - proee = ThermoSysPro.Properties.Fluid.Ph(Pee, Hee, mode_ee, fluid_p); - proex = ThermoSysPro.Properties.Fluid.Ph(Pex, Hex, mode_ex, fluid); - prose = ThermoSysPro.Properties.Fluid.Ph(Pse, Hse, mode_se, fluid_p); + state_ee = Medium_Cooling.setState_phX(p=Pee, h=Hee, X=X_Cooling); + state_ex = Medium.setState_phX(p=Pex, h=Hex, X=X); + state_se = Medium_Cooling.setState_phX(p=Pse, h=Hse, X=X_Cooling); - rho_ee = proee.d; - rho_ex = proex.d; + rho_ee = Medium_Cooling.density(state_ee); + rho_ex = Medium.density(state_ex); - Tee = proee.T; - Tse = prose.T; + Tee = Medium_Cooling.temperature(state_ee); + Tse = Medium_Cooling.temperature(state_se); /* Vapor pressure inside the condenser */ - Pcond = ThermoSysPro.Properties.Fluid.P_sat(Tsat, fluid); + Pcond = Medium.saturationPressure(Tsat); /* Fluid thermodynamic properties at the saturation point */ - (lsat1,vsat1) = ThermoSysPro.Properties.Fluid.Water_sat_P(Pcond, fluid); + sat = Medium.setSat_p(Pcond); - Hsate = lsat1.h; + Hsate = Medium.bubbleEnthalpy(sat); annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticCondenserHEI.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticCondenserHEI.mo index 0380ebca..789972c3 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticCondenserHEI.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticCondenserHEI.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticCondenserHEI "HEI static condenser" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the condensing side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Cooling = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cooling side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real Kf=0 "Friction pressure loss coefficient for the cold side"; parameter Units.SI.Position z1c=0 "Hot inlet altitude"; @@ -72,17 +71,10 @@ model StaticCondenserHEI "HEI static condenser" "Air diffusion conductance (active if diffusion=true in neighbouring volumes)"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region_c=IF97Region.All_regions "IF97 region for the hot side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_cs=IF97Region.All_regions "IF97 region at the outlet of the hot side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "IF97 region for the cold side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; constant Real pi=Modelica.Constants.pi "pi"; - parameter Integer fluid=Integer(ftype) "Water fluid number"; - parameter Integer mode_c=Integer(region_c) - 1 "IF97 region for the hot side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_cs=Integer(region_cs) - 1 "IF97 region at the outlet of the hot side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "IF97 region for the cold side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; @@ -150,7 +142,6 @@ public "Extraction water average specific enthalpy"; Units.SI.SpecificEnthalpy Hex(start=100000) "Drain specific enthalpy at the outlet"; - FluidType fluids[5] "Fluids mixing in volume"; Units.SI.Power Jvt "Thermal power diffusion from inlet Cvt"; Units.SI.Power Jev "Thermal power diffusion from inlet Cev"; Units.SI.Power Jep "Thermal power diffusion from inlet Cep"; @@ -164,67 +155,37 @@ public Real rev "Value of r(Q/gamma) for inlet Cev"; Real rep "Value of r(Q/gamma) for inlet Cep"; Real rex "Value of r(Q/gamma) for outlet Cex"; - FluidType ftype_p "Cooling pipe fluid type"; - Integer fluid_p=Integer(ftype_p) "Cooling pipe fluid number"; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions in the condenser cavity"; + Medium.ExtraProperty SubC[Medium.nC](start=Medium.C_default) "Trace substance concentrations in the condenser cavity"; + Medium_Cooling.MassFraction X_Cooling[Medium_Cooling.nXi](start=Medium_Cooling.X_default[1:Medium_Cooling.nXi]) "Mass fractions in the cooling pipe"; + Medium.ThermodynamicState state_ce "Thermodynamic state at the condensing-side inlet average enthalpy"; + Medium.ThermodynamicState state_cs "Thermodynamic state at the extraction outlet"; + Medium_Cooling.ThermodynamicState state_fe "Thermodynamic state at the cooling water inlet"; + Medium_Cooling.ThermodynamicState state_fs "Thermodynamic state at the cooling water outlet"; + Medium_Cooling.ThermodynamicState state_mf "Average thermodynamic state of the cooling water"; + Medium.SaturationProperties sat "Saturation properties inside the condenser"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cee "Cooling water inlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cee(redeclare package Medium = Medium_Cooling) "Cooling water inlet" annotation (Placement(transformation(extent={{-112,-72},{-88,-50}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cse + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cse(redeclare package Medium = Medium_Cooling) "Cooling water outlet" annotation (Placement(transformation(extent={{90,-72}, {114,-50}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cex "Extraction water" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cex(redeclare package Medium = Medium) "Extraction water" annotation (Placement(transformation(extent={{-12,-112},{14,-88}}, rotation= 0), iconTransformation(extent={{-12,-112},{14,-88}}))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cvt "Turbine outlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cvt(redeclare package Medium = Medium) "Turbine outlet" annotation (Placement(transformation(extent={{-13,88},{13,114}}, rotation=0), iconTransformation(extent={{-13,88},{13,114}}))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profs - "Proprietes eau" - annotation (Placement(transformation(extent={{50,80},{70,100}}, rotation=0))); -public - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profe - "Proprietes eau" - annotation (Placement(transformation(extent={{20,80},{40,100}}, rotation=0))); -public - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proce - "Proprietes eau" - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat lsat - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat vsat - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cep "Drain inlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cep(redeclare package Medium = Medium) "Drain inlet" annotation (Placement(transformation(extent={{-112,8},{-88,30}}, rotation=0))); public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cev "Vapor inlet" + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Cev(redeclare package Medium = Medium) "Vapor inlet" annotation (Placement(transformation(extent={{-112,50},{-88,72}}, rotation= 0))); -public - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph procs - "Proprietes eau" - annotation (Placement(transformation(extent={{80,-100},{100,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph promf - "Proprietes eau" - annotation (Placement(transformation(extent={{80,80},{100,100}}, rotation=0))); equation - - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Cvt.ftype; - fluids[3] = Cev.ftype; - fluids[4] = Cep.ftype; - fluids[5] = Cex.ftype; - - /* Check that the fluid type for the cooling pipe is water/steam */ - assert((ftype_p == FluidType.WaterSteam) or (ftype_p == FluidType.WaterSteamSimple), "StaticCondenserHEI: the fluid type for the cooling pipe must be water/steam"); - /* Unconnected connectors */ if (cardinality(Cev) == 0) then Cev.Q = 0; @@ -232,11 +193,8 @@ equation Cev.h_vol_1 = 1.e5; Cev.diff_res_1 = 0; Cev.diff_on_1 = false; - Cev.ftype = ftype; - Cev.Xco2 = 0; - Cev.Xh2o = 0; - Cev.Xo2 = 0; - Cev.Xso2 = 0; + Cev.Xi = Medium.X_default[1:Medium.nXi]; + Cev.SubC = Medium.C_default; end if; if (cardinality(Cep) == 0) then @@ -245,11 +203,8 @@ equation Cep.h_vol_1 = 1.e5; Cep.diff_res_1 = 0; Cep.diff_on_1 = false; - Cep.ftype = ftype; - Cep.Xco2 = 0; - Cep.Xh2o = 0; - Cep.Xo2 = 0; - Cep.Xso2 = 0; + Cep.Xi = Medium.X_default[1:Medium.nXi]; + Cep.SubC = Medium.C_default; end if; // Water/steam cavity @@ -273,7 +228,7 @@ equation // 0 = Cvt.Q*(Cvt.h - lsat.h) + Cev.Q*(Cev.h - lsat.h) + Cep.Q*(Cep.h - lsat.h) - W; /* Extraction water average specific enthalpy */ - Hml = lsat.h; + Hml = Medium.bubbleEnthalpy(sat); // Hml = (lsat.h + Hex)/2; Cvt.h_vol_2 = Hml; @@ -290,18 +245,16 @@ equation // Cex.h_vol_1 = Hex; /* Extraction water specific enthalpy */ - Hex = noEvent(if (rho_ex > 0) then lsat.h + ((Cex.P - Pcond)/rho_ex) else lsat.h); + Hex = noEvent(if (rho_ex > 0) then Medium.bubbleEnthalpy(sat) + ((Cex.P - Pcond)/rho_ex) else Medium.bubbleEnthalpy(sat)); /* Gravity pressure losses in the hot side */ DPgc = rho_ex*g*(z2c - z1c); /* Fluid composition in the cavity (no balance equations) */ - Cex.ftype = ftype; - - Cex.Xco2 = 0; - Cex.Xh2o = 0; - Cex.Xo2 = 0; - Cex.Xso2 = 0; + X = Cvt.Xi; + SubC = Cvt.SubC; + Cex.Xi = X; + Cex.SubC = SubC; /* Flow reversal */ if continuous_flow_reversal then @@ -370,16 +323,11 @@ equation Cse.diff_res_1 = Cee.diff_res_1 + 1/gamma_diff; Cee.diff_res_2 = Cse.diff_res_2 + 1/gamma_diff; - Cee.ftype = Cse.ftype; - - Cee.Xco2 = Cse.Xco2; - Cee.Xh2o = Cse.Xh2o; - Cee.Xo2 = Cse.Xo2; - Cee.Xso2 = Cse.Xso2; - - ftype_p = Cee.ftype; + Cee.Xi = Cse.Xi; + Cee.SubC = Cse.SubC; Qf = Cee.Q; + X_Cooling = Cee.Xi; /* Pressure losses in the cold side */ Cee.P - Cse.P = DPf; @@ -392,33 +340,33 @@ equation W = Qf*(Cse.h - Cee.h); /* Fluid thermodynamic properties of the hot side */ - proce = ThermoSysPro.Properties.Fluid.Ph(Cvt.P, Hmv, mode_c, fluid); - procs = ThermoSysPro.Properties.Fluid.Ph(Cex.P, Cex.h, mode_cs, fluid); - //procs = ThermoSysPro.Properties.Fluid.Ph(Pcond + Cex.P)/2, (lsat.h + Cex.h)/2, modecs); + state_ce = Medium.setState_phX(p=Cvt.P, h=Hmv, X=X); + state_cs = Medium.setState_phX(p=Cex.P, h=Cex.h, X=X); + // state_cs could alternatively use an average pressure and enthalpy between saturation and extraction outlet. - Tec = proce.T; - Tsc = procs.T; + Tec = Medium.temperature(state_ce); + Tsc = Medium.temperature(state_cs); - (lsat,vsat) = ThermoSysPro.Properties.Fluid.Water_sat_P(Pcond, fluid); + sat = Medium.setSat_p(Pcond); if (p_rhoc > 0) then rho_ex = p_rhoc; else - rho_ex = procs.d; + rho_ex = Medium.density(state_cs); end if; /* Fluid thermodynamic properties of the cold side */ - profe = ThermoSysPro.Properties.Fluid.Ph(Cee.P, Cee.h, mode_f, fluid_p); - profs = ThermoSysPro.Properties.Fluid.Ph(Cse.P, Cse.h, mode_f, fluid_p); - promf = ThermoSysPro.Properties.Fluid.Ph((Cee.P + Cse.P)/2, (Cee.h + Cse.h)/2, mode_f, fluid_p); + state_fe = Medium_Cooling.setState_phX(p=Cee.P, h=Cee.h, X=X_Cooling); + state_fs = Medium_Cooling.setState_phX(p=Cse.P, h=Cse.h, X=X_Cooling); + state_mf = Medium_Cooling.setState_phX(p=(Cee.P + Cse.P)/2, h=(Cee.h + Cse.h)/2, X=X_Cooling); - Tef = profe.T; - Tsf = profs.T; + Tef = Medium_Cooling.temperature(state_fe); + Tsf = Medium_Cooling.temperature(state_fs); if (p_rhof > 0) then rhof = p_rhof; else - rhof = promf.d; + rhof = Medium_Cooling.density(state_mf); end if; /* Calculation of the heat exchange surface */ @@ -461,19 +409,19 @@ equation U = Ucorr*U1*FM*FC*Fw; /* Calculation of the average specific heat capacity of the cold water */ - Cpmf = promf.cp; + Cpmf = Medium_Cooling.specificHeatCapacityCp(state_mf); /* Calculation of the expected HEI saturation temperature */ Tsat_att = Tef + (W/(Qf*Cpmf))*(1/(1 - Modelica.Math.exp(-(U*S_ech)/(Qf*Cpmf)))); /* Calculation of expected HEI saturation pressure */ - Psat_att = ThermoSysPro.Properties.Fluid.P_sat(Tsat_att, fluid); + Psat_att = Medium.saturationPressure(Tsat_att); /* Calculation of the HEI pressure cut-off */ Pcut_off = (5.752433E-04*(Tef-273.15)^3 + 1.735162E-02*(Tef-273.15)^2 + 8.052739E-02*(Tef-273.15) + 2.109159E+01)*100; /* Calculation of the HEI saturation temperature at pressure cut-off */ - Tcut_off = ThermoSysPro.Properties.Fluid.T_sat(Pcut_off, fluid); + Tcut_off = Medium.saturationTemperature(Pcut_off); /* Calculation of HEI zero-load pressure */ Pzero_load = (5.008000E-04*(Tef - 273.15)^3 + 2.039549E-02*(Tef - 273.15)^2 + 2.277566E-01*(Tef - 273.15) + 1.027824E+01)*100; @@ -489,7 +437,7 @@ equation end if; /* Calculation of the expected HEI corrected saturation pressure */ - Tsat = ThermoSysPro.Properties.Fluid.T_sat(Pcond, fluid); + Tsat = Medium.saturationTemperature(Pcond); /* Calculation of the Terminal Temperature Difference */ TTD = Tsat - Tsf; diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerDTorWorEff.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerDTorWorEff.mo index 412b35e6..51548bd1 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerDTorWorEff.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerDTorWorEff.mo @@ -1,8 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticExchangerDTorWorEff "Static heat exchanger with fixed delta temperature, delta power or efficiency" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium_c = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the hot fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_f = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cold fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Integer exchanger_type=1 "Exchanger type - 1: delta temperature is fixed - 2: delta power is fixed - 3: efficiency is fixed"; parameter ThermoSysPro.Units.SI.TemperatureDifference DTfroid=0 @@ -24,15 +25,9 @@ model StaticExchangerDTorWorEff "Static heat exchanger with fixed delta temperat "If > 0, fixed fluid density for the hot fluid"; parameter Units.SI.Density p_rhof=0 "If > 0, fixed fluid density for the cold fluid"; - parameter IF97Region region_c=IF97Region.All_regions "IF97 region for the hot fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_cs=IF97Region.All_regions "IF97 region of the water at the outlet of the hot side (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "IF97 region for the cold fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; - parameter Integer mode_c=Integer(region_c) - 1 "IF97 region for the hot fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_cs=Integer(region_cs) - 1 "IF97 region of the water at the outlet of the hot side. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "IF97 region for the cold fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; public @@ -64,19 +59,23 @@ public Units.SI.SpecificHeatCapacity Cpc "Specific heat capacity of the hot fluid"; Units.SI.MassFlowRate Qc(start=100) "Hot fluid mass flow rate"; Units.SI.MassFlowRate Qf(start=100) "Cold fluid mass flow rate"; - FluidType ftype_c "Fluid type for the hot fluid"; - Integer fluid_c=Integer(ftype_c) "Fluid number for the hot fluid"; - FluidType ftype_f "Fluid type for the cold fluid"; - Integer fluid_f=Integer(ftype_f) "Fluid number for the cold fluid"; + Medium_c.MassFraction Xc[Medium_c.nXi](start=Medium_c.X_default[1:Medium_c.nXi]) "Mass fractions of the hot fluid"; + Medium_f.MassFraction Xf[Medium_f.nXi](start=Medium_f.X_default[1:Medium_f.nXi]) "Mass fractions of the cold fluid"; + Medium_c.ThermodynamicState state_ce "Thermodynamic state of the hot fluid at the inlet"; + Medium_c.ThermodynamicState state_cs "Thermodynamic state of the hot fluid at the outlet"; + Medium_c.ThermodynamicState state_cm "Average thermodynamic state of the hot fluid"; + Medium_f.ThermodynamicState state_fe "Thermodynamic state of the cold fluid at the inlet"; + Medium_f.ThermodynamicState state_fs "Thermodynamic state of the cold fluid at the outlet"; + Medium_f.ThermodynamicState state_fm "Average thermodynamic state of the cold fluid"; public - Interfaces.Connectors.FluidInlet Ec "Hot inlet" annotation (Placement( + Interfaces.Connectors.FluidInlet Ec(redeclare package Medium = Medium_c) "Hot inlet" annotation (Placement( transformation(extent={{-50,31},{-30,51}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ef "Cold inlet" annotation (Placement( + Interfaces.Connectors.FluidInlet Ef(redeclare package Medium = Medium_f) "Cold inlet" annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sf "Cold outlet" annotation (Placement( + Interfaces.Connectors.FluidOutlet Sf(redeclare package Medium = Medium_f) "Cold outlet" annotation (Placement( transformation(extent={{90,-9},{110,11}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sc "Hot outlet" annotation (Placement( + Interfaces.Connectors.FluidOutlet Sc(redeclare package Medium = Medium_c) "Hot outlet" annotation (Placement( transformation(extent={{30,31},{50,51}}, rotation=0))); equation @@ -92,14 +91,8 @@ equation Sc.diff_res_1 = Ec.diff_res_1 + 1/gamma_diff_c; Ec.diff_res_2 = Sc.diff_res_2 + 1/gamma_diff_c; - Ec.ftype = Sc.ftype; - - Ec.Xco2 = Sc.Xco2; - Ec.Xh2o = Sc.Xh2o; - Ec.Xo2 = Sc.Xo2; - Ec.Xso2 = Sc.Xso2; - - ftype_c = Ec.ftype; + Ec.Xi = Sc.Xi; + Ec.SubC = Sc.SubC; Ef.Q = Sf.Q; @@ -112,34 +105,30 @@ equation Sf.diff_res_1 = Ef.diff_res_1 + 1/gamma_diff_f; Ef.diff_res_2 = Sf.diff_res_2 + 1/gamma_diff_f; - Ef.ftype = Sf.ftype; - - Ef.Xco2 = Sf.Xco2; - Ef.Xh2o = Sf.Xh2o; - Ef.Xo2 = Sf.Xo2; - Ef.Xso2 = Sf.Xso2; - - ftype_f = Ef.ftype; + Ef.Xi = Sf.Xi; + Ef.SubC = Sf.SubC; Qc = Ec.Q; Qf = Ef.Q; + Xc = Ec.Xi; + Xf = Ef.Xi; /* Power exchanged between the hot and cold fluids */ if (exchanger_type == 1) then W = Qf*(Sf.h - Ef.h); W = Qc*(Ec.h - Sc.h); - Sf.h = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(Sf.P, Tsf, fluid_f, mode_f, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + Sf.h = Medium_f.specificEnthalpy_pTX(p=Sf.P, T=Tsf, X=Xf); Tsf = Tef + DTfroid; elseif (exchanger_type == 2) then W = Qf*(Sf.h - Ef.h); DW = Qf*(Sf.h - Ef.h); DW = Qc*(Ec.h - Sc.h); - Tsf = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sf.P, Sf.h, fluid_f, mode_f, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + Tsf = Medium_f.temperature(state_fs); elseif (exchanger_type == 3) then W = noEvent(min(Qc*Cpc, Qf*Cpf)*EffEch*(Tec - Tef)); Sf.h = Ef.h + W/Qf; Sc.h = Ec.h - W/Qc; - Tsf = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sf.P, Sf.h, fluid_f, mode_f, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + Tsf = Medium_f.temperature(state_fs); else assert(false, "StaticWaterWaterExchangerDTorWorEff: invalid option"); end if; @@ -159,29 +148,35 @@ equation DPf = DPff + DPgf; /* Hot fluid Temperature at the inlet and at the outlet */ - Tec = ThermoSysPro.Properties.Fluid.Temperature_Ph(Ec.P, Ec.h, fluid_c, mode_c, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); - Tsc = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sc.P, Sc.h, fluid_c, mode_cs, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); + state_ce = Medium_c.setState_phX(p=Ec.P, h=Ec.h, X=Xc); + state_cs = Medium_c.setState_phX(p=Sc.P, h=Sc.h, X=Xc); + state_cm = Medium_c.setState_phX(p=(Ec.P + Sc.P)/2, h=(Ec.h + Sc.h)/2, X=Xc); + Tec = Medium_c.temperature(state_ce); + Tsc = Medium_c.temperature(state_cs); /* Hot fluid density */ if (p_rhoc > 0) then rhoc = p_rhoc; else - rhoc = ThermoSysPro.Properties.Fluid.Density_Ph((Ec.P + Sc.P)/2,(Ec.h + Sc.h)/2, fluid_c, mode_c, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); + rhoc = Medium_c.density(state_cm); end if; /* Cold fluid Temperature at the inlet */ - Tef = ThermoSysPro.Properties.Fluid.Temperature_Ph(Ef.P, Ef.h, fluid_f, mode_f, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + state_fe = Medium_f.setState_phX(p=Ef.P, h=Ef.h, X=Xf); + state_fs = Medium_f.setState_phX(p=Sf.P, h=Sf.h, X=Xf); + state_fm = Medium_f.setState_phX(p=(Ef.P + Sf.P)/2, h=(Ef.h + Sf.h)/2, X=Xf); + Tef = Medium_f.temperature(state_fe); /* Cold fluid density */ if (p_rhof > 0) then rhof = p_rhof; else - rhof = ThermoSysPro.Properties.Fluid.Density_Ph((Ef.P + Sf.P)/2,(Ef.h + Sf.h)/2, fluid_f, mode_f, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + rhof = Medium_f.density(state_fm); end if; /* Average specific heat capacities */ - Cpf = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Ef.P, Ef.h, fluid_f, mode_f, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); - Cpc = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Ec.P, Ec.h, fluid_c, mode_c, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); + Cpf = Medium_f.specificHeatCapacityCp(state_fe); + Cpc = Medium_c.specificHeatCapacityCp(state_ce); annotation ( Icon(coordinateSystem( diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerKS.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerKS.mo index 6dc0f49e..9854ece7 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerKS.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticExchangerKS.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticExchangerKS "Static heat exchanger with fixed K and S (Coefficient of heat transfer and Heat exchanger surface)" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + replaceable package Medium_c = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the hot fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_f = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cold fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.CoefficientOfHeatTransfer K=100 "Global heat exchange coefficient"; parameter Units.SI.Area S=10 "Heat exchange surface"; @@ -20,13 +20,9 @@ model StaticExchangerKS "Static heat exchanger with fixed K and S (Coefficient o parameter Units.SI.Density p_rhof=0 "If > 0, fixed fluid density for the cold fluid" annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties")); - parameter IF97Region region_c=IF97Region.All_regions "IF97 region for the hot fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "IF97 region for the cold fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; - parameter Integer mode_c=Integer(region_c) - 1 "IF97 region for the hot fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "IF97 region for the cold fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; parameter Real eps=1.e-0 "Small number for pressure loss equation"; public @@ -49,22 +45,22 @@ public Units.SI.Density rhof(start=998) "Cold fluid density"; Units.SI.MassFlowRate Qc(start=100) "Mass flow rate of the hot fluid"; Units.SI.MassFlowRate Qf(start=100) "Mass flow rate of the cold fluid"; + Medium_c.MassFraction Xc[Medium_c.nXi](start=Medium_c.X_default[1:Medium_c.nXi]) "Mass fractions of the hot fluid"; + Medium_f.MassFraction Xf[Medium_f.nXi](start=Medium_f.X_default[1:Medium_f.nXi]) "Mass fractions of the cold fluid"; + Medium_c.ThermodynamicState state_c "Thermodynamic state of the hot fluid"; + Medium_f.ThermodynamicState state_f "Thermodynamic state of the cold fluid"; Real Kcor "Corrective term for the global heat exchange coefficient"; - FluidType ftype_c "Fluid type for the hot fluid"; - Integer fluid_c=Integer(ftype_c) "Fluid number for the hot fluid"; - FluidType ftype_f "Fluid type for the cold fluid"; - Integer fluid_f=Integer(ftype_f) "Fluid number for the cold fluid"; - Interfaces.Connectors.FluidOutlet Sc annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sc(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{90,-40},{110,-20}}, rotation=0), iconTransformation(extent={ {90,-40},{110,-20}}))); - Interfaces.Connectors.FluidInlet Ec annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ec(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{-110,-40},{-90,-20}}, rotation=0), iconTransformation(extent= {{-110,-40},{-90,-20}}))); - Interfaces.Connectors.FluidInlet Ef annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ef(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{-110,20},{-90,40}}, rotation=0), iconTransformation(extent={ {-110,20},{-90,40}}))); - Interfaces.Connectors.FluidOutlet Sf annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sf(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{90,20},{110,40}}, rotation=0), iconTransformation(extent={{ 90,20},{110,40}}))); InstrumentationAndControl.Connectors.InputReal Kcorr "K_correction" @@ -92,14 +88,8 @@ equation Sc.diff_res_1 = Ec.diff_res_1 + 1/gamma_diff_c; Ec.diff_res_2 = Sc.diff_res_2 + 1/gamma_diff_c; - Ec.ftype = Sc.ftype; - - Ec.Xco2 = Sc.Xco2; - Ec.Xh2o = Sc.Xh2o; - Ec.Xo2 = Sc.Xo2; - Ec.Xso2 = Sc.Xso2; - - ftype_c = Ec.ftype; + Ec.Xi = Sc.Xi; + Ec.SubC = Sc.SubC; Ef.Q = Sf.Q; @@ -112,17 +102,13 @@ equation Sf.diff_res_1 = Ef.diff_res_1 + 1/gamma_diff_f; Ef.diff_res_2 = Sf.diff_res_2 + 1/gamma_diff_f; - Ef.ftype = Sf.ftype; - - Ef.Xco2 = Sf.Xco2; - Ef.Xh2o = Sf.Xh2o; - Ef.Xo2 = Sf.Xo2; - Ef.Xso2 = Sf.Xso2; - - ftype_f = Ef.ftype; + Ef.Xi = Sf.Xi; + Ef.SubC = Sf.SubC; Qc = Ec.Q; Qf = Ef.Q; + Xc = Ec.Xi; + Xf = Ef.Xi; /* Presure losses */ Ec.P - Sc.P = Kc*ThermoSysPro.Functions.ThermoSquare(Qc, eps)/rhoc; @@ -149,30 +135,32 @@ equation W = Qc*(Ec.h-Sc.h); W = Qf*(Sf.h - Ef.h); - /* Fluid specific enthalpy at the inlet */ - Tef = ThermoSysPro.Properties.Fluid.Temperature_Ph(Ef.P, Ef.h, fluid_f, 0, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); - Tsf = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sf.P, Sf.h, fluid_f, 0, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + /* Cold fluid temperatures */ + Tef = Medium_f.temperature_phX(p=Ef.P, h=Ef.h, X=Xf); + Tsf = Medium_f.temperature_phX(p=Sf.P, h=Sf.h, X=Xf); - /* Fluid specific enthalpy at the outlet */ - Tec = ThermoSysPro.Properties.Fluid.Temperature_Ph(Ec.P, Ec.h, fluid_c, 0, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); - Tsc = ThermoSysPro.Properties.Fluid.Temperature_Ph(Sc.P, Sc.h, fluid_c, 0, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); + /* Hot fluid temperatures */ + Tec = Medium_c.temperature_phX(p=Ec.P, h=Ec.h, X=Xc); + Tsc = Medium_c.temperature_phX(p=Sc.P, h=Sc.h, X=Xc); /* Specific heat capacities */ - Cpf = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Ef.P, Ef.h, fluid_f, 0, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); - Cpc = ThermoSysPro.Properties.Fluid.SpecificHeatCapacityCp_Ph(Ec.P, Ec.h, fluid_c, 0, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); + state_f = Medium_f.setState_phX(p=Ef.P, h=Ef.h, X=Xf); + state_c = Medium_c.setState_phX(p=Ec.P, h=Ec.h, X=Xc); + Cpf = Medium_f.specificHeatCapacityCp(state_f); + Cpc = Medium_c.specificHeatCapacityCp(state_c); /* Hot fluid density */ if (p_rhoc > 0) then rhoc = p_rhoc; else - rhoc = ThermoSysPro.Properties.Fluid.Density_Ph((Ec.P + Sc.P)/2,(Ec.h + Sc.h)/2, fluid_c, 0, Ec.Xco2, Ec.Xh2o, Ec.Xo2, Ec.Xso2); + rhoc = Medium_c.density_phX(p=(Ec.P + Sc.P)/2, h=(Ec.h + Sc.h)/2, X=Xc); end if; /* Cold fluid density */ if (p_rhof > 0) then rhof = p_rhof; else - rhof = ThermoSysPro.Properties.Fluid.Density_Ph((Ef.P+Sf.P)/2,(Ef.h + Sf.h)/2, fluid_f, 0, Ef.Xco2, Ef.Xh2o, Ef.Xo2, Ef.Xso2); + rhof = Medium_f.density_phX(p=(Ef.P + Sf.P)/2, h=(Ef.h + Sf.h)/2, X=Xf); end if; annotation ( diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticPlateHeatExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticPlateHeatExchanger.mo index 4b15b7d3..578799c8 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticPlateHeatExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticPlateHeatExchanger.mo @@ -1,9 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticPlateHeatExchanger "Static plate heat exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + replaceable package Medium_c = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the hot fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_f = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the cold fluid" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.ThermalConductivity lambdam=15.0 "Metal thermal conductivity"; parameter Units.SI.CoefficientOfHeatTransfer p_hc=6000 @@ -29,12 +29,6 @@ model StaticPlateHeatExchanger "Static plate heat exchanger" parameter Units.SI.Density p_rhof=0 "If > 0, fixed fluid density for the cold fluid" annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties")); - parameter IF97Region region_c=IF97Region.All_regions "IF97 region for the hot fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - parameter IF97Region region_f=IF97Region.All_regions "IF97 region for the cold fluid (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - -protected - parameter Integer mode_c=Integer(region_c) - 1 "IF97 region for the hot fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; - parameter Integer mode_f=Integer(region_f) - 1 "IF97 region for the cold fluid. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Units.SI.Power W "Thermal power exchanged between the two sides"; @@ -82,37 +76,24 @@ public "Hot fluid average specific enthalpy"; Units.SI.SpecificEnthalpy Hmf(start=100000) "Cold fluid average specific enthalpy"; - FluidType ftype_c "Fluid type for the hot fluid"; - Integer fluid_c=Integer(ftype_c) "Fluid number for the hot fluid"; - FluidType ftype_f "Fluid type for the cold fluid"; - Integer fluid_f=Integer(ftype_f) "Fluid number for the cold fluid"; + Medium_c.MassFraction Xc[Medium_c.nXi](start=Medium_c.X_default[1:Medium_c.nXi]) "Mass fractions of the hot fluid"; + Medium_f.MassFraction Xf[Medium_f.nXi](start=Medium_f.X_default[1:Medium_f.nXi]) "Mass fractions of the cold fluid"; + Medium_c.ThermodynamicState state_c "Average thermodynamic state of the hot fluid"; + Medium_f.ThermodynamicState state_f "Average thermodynamic state of the cold fluid"; + Medium_c.ThermodynamicState state_ce "Thermodynamic state of the hot fluid at the inlet"; + Medium_c.ThermodynamicState state_cs "Thermodynamic state of the hot fluid at the outlet"; + Medium_f.ThermodynamicState state_fe "Thermodynamic state of the cold fluid at the inlet"; + Medium_f.ThermodynamicState state_fs "Thermodynamic state of the cold fluid at the outlet"; public - Interfaces.Connectors.FluidInlet Ec annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ec(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); - Interfaces.Connectors.FluidInlet Ef annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet Ef(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{-60,-70},{-40,-50}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sf annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sf(redeclare package Medium = Medium_f) annotation (Placement(transformation( extent={{40,-70},{60,-50}}, rotation=0))); - Interfaces.Connectors.FluidOutlet Sc annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet Sc(redeclare package Medium = Medium_c) annotation (Placement(transformation( extent={{90,-8},{110,12}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proce - annotation (Placement(transformation(extent={{-60,80},{-40,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph procs - annotation (Placement(transformation(extent={{-20,80},{0,100}}, rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profe - annotation (Placement(transformation(extent={{-60,-100},{-40,-80}}, - rotation=0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph profs - annotation (Placement(transformation(extent={{-20,-100},{0,-80}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph proc - annotation (Placement(transformation(extent={{-100,80},{-80,100}}, rotation= - 0))); - ThermoSysPro.Properties.WaterSteam.Common.ThermoProperties_ph prof - annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}, - rotation=0))); equation /* Mass flow rates */ @@ -127,14 +108,8 @@ equation Sc.diff_res_1 = Ec.diff_res_1 + 1/gamma_diff_c; Ec.diff_res_2 = Sc.diff_res_2 + 1/gamma_diff_c; - Ec.ftype = Sc.ftype; - - Ec.Xco2 = Sc.Xco2; - Ec.Xh2o = Sc.Xh2o; - Ec.Xo2 = Sc.Xo2; - Ec.Xso2 = Sc.Xso2; - - ftype_c = Ec.ftype; + Ec.Xi = Sc.Xi; + Ec.SubC = Sc.SubC; Ef.Q = Sf.Q; @@ -147,17 +122,13 @@ equation Sf.diff_res_1 = Ef.diff_res_1 + 1/gamma_diff_f; Ef.diff_res_2 = Sf.diff_res_2 + 1/gamma_diff_f; - Ef.ftype = Sf.ftype; - - Ef.Xco2 = Sf.Xco2; - Ef.Xh2o = Sf.Xh2o; - Ef.Xo2 = Sf.Xo2; - Ef.Xso2 = Sf.Xso2; - - ftype_f = Ef.ftype; + Ef.Xi = Sf.Xi; + Ef.SubC = Sf.SubC; Qc = Ec.Q; Qf = Ef.Q; + Xc = Ec.Xi; + Xf = Ef.Xi; /* Pressures */ Sc.P = if Qc > 0 then Ec.P - DPc else Ec.P + DPc; @@ -168,13 +139,13 @@ equation W = K*S*DTm; if (abs(Qc) > 1.e-3) then - W = Qc*proc.cp*(Tec - Tsc); + W = Qc*Medium_c.specificHeatCapacityCp(state_c)*(Tec - Tsc); else Tec = Tsc; end if; if (abs(Qf) > 1.e-3) then - W = Qf*prof.cp*(Tsf - Tef); + W = Qf*Medium_f.specificHeatCapacityCp(state_f)*(Tsf - Tef); else Tef = Tsf; end if; @@ -214,8 +185,8 @@ equation hc = p_hc; hf = p_hf; elseif (heat_exchange_correlation == 1) then - hc = noEvent(if (qmc < 1.e-3) then 0 else 11.245*qmc^0.8*abs(muc*proc.cp/lambdac)^0.4*lambdac); - hf = noEvent(if (qmf < 1.e-3) then 0 else 11.245*qmf^0.8*abs(muf*prof.cp/lambdaf)^0.4*lambdaf); + hc = noEvent(if (qmc < 1.e-3) then 0 else 11.245*qmc^0.8*abs(muc*Medium_c.specificHeatCapacityCp(state_c)/lambdac)^0.4*lambdac); + hf = noEvent(if (qmf < 1.e-3) then 0 else 11.245*qmf^0.8*abs(muf*Medium_f.specificHeatCapacityCp(state_f)/lambdaf)^0.4*lambdaf); else hc = 0; hf = 0; @@ -245,41 +216,41 @@ equation Hmc = (Ec.h + Sc.h)/2; Hmf = (Ef.h + Sf.h)/2; - proc = ThermoSysPro.Properties.Fluid.Ph(Pmc, Hmc, mode_c, fluid_c); - prof = ThermoSysPro.Properties.Fluid.Ph(Pmf, Hmf, mode_f, fluid_f); + state_c = Medium_c.setState_phX(p=Pmc, h=Hmc, X=Xc); + state_f = Medium_f.setState_phX(p=Pmf, h=Hmf, X=Xf); - Tmc = proc.T; - Tmf = prof.T; + Tmc = Medium_c.temperature(state_c); + Tmf = Medium_f.temperature(state_f); if (p_rhoc > 0) then rhoc = p_rhoc; else - rhoc = proc.d; + rhoc = Medium_c.density(state_c); end if; if (p_rhof > 0) then rhof = p_rhof; else - rhof = prof.d; + rhof = Medium_f.density(state_f); end if; - muc = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhoc, Tmc, fluid_c); - muf = ThermoSysPro.Properties.Fluid.DynamicViscosity_rhoT(rhof, Tmf, fluid_f); + muc = Medium_c.dynamicViscosity(state_c); + muf = Medium_f.dynamicViscosity(state_f); - lambdac = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhoc, Tmc, Pmc, 0, fluid_c); - lambdaf = ThermoSysPro.Properties.Fluid.ThermalConductivity_rhoT(rhof, Tmf, Pmf, 0, fluid_f); + lambdac = Medium_c.thermalConductivity(state_c); + lambdaf = Medium_f.thermalConductivity(state_f); - /* Calcul des températures en entrée et en sortie de l'échangeur */ - proce = ThermoSysPro.Properties.Fluid.Ph(Ec.P, Ec.h, mode_c, fluid_c); - procs = ThermoSysPro.Properties.Fluid.Ph(Sc.P, Sc.h, mode_c, fluid_f); + /* Fluid temperatures at the inlet and outlet of the exchanger */ + state_ce = Medium_c.setState_phX(p=Ec.P, h=Ec.h, X=Xc); + state_cs = Medium_c.setState_phX(p=Sc.P, h=Sc.h, X=Xc); - profe = ThermoSysPro.Properties.Fluid.Ph(Ef.P, Ef.h, mode_f, fluid_c); - profs = ThermoSysPro.Properties.Fluid.Ph(Sf.P, Sf.h, mode_f, fluid_f); + state_fe = Medium_f.setState_phX(p=Ef.P, h=Ef.h, X=Xf); + state_fs = Medium_f.setState_phX(p=Sf.P, h=Sf.h, X=Xf); - Tec = proce.T; - Tsc = procs.T; - Tef = profe.T; - Tsf = profs.T; + Tec = Medium_c.temperature(state_ce); + Tsc = Medium_c.temperature(state_cs); + Tef = Medium_f.temperature(state_fe); + Tsf = Medium_f.temperature(state_fs); annotation ( Icon(coordinateSystem( diff --git a/ThermoSysPro/Fluid/HeatExchangers/StaticWallFlueGasesExchanger.mo b/ThermoSysPro/Fluid/HeatExchangers/StaticWallFlueGasesExchanger.mo index 40765bd4..491d03af 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/StaticWallFlueGasesExchanger.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/StaticWallFlueGasesExchanger.mo @@ -1,8 +1,8 @@ within ThermoSysPro.Fluid.HeatExchangers; model StaticWallFlueGasesExchanger "Static wall - flue gases exchanger" extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.FlueGases constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Mixture gas medium" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Integer Ns=10 "Number of segments"; parameter Integer NbTub=100 "Number of pipes"; @@ -30,11 +30,6 @@ model StaticWallFlueGasesExchanger "Static wall - flue gases exchanger" parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; protected - constant Real Mco2=44.009 "CO2 molar mass"; - constant Real Mh2o=18.0148 "H2O molar mass"; - constant Real Mo2=31.998 "O2 molar mass"; - constant Real Mn2=28.014 "N2 molar mass"; - constant Real Mso2=64.063 "SO2 molar mass"; constant Real pi=Modelica.Constants.pi; constant Units.SI.Acceleration g=Modelica.Constants.g_n "Gravity constant"; parameter Integer N=Ns + 1 "Number of hydraulic nodes (= number of thermal nodes + 1)"; @@ -49,6 +44,8 @@ protected parameter Units.SI.Length Perb=Surf_ext/Ls "Geometrical parameter"; parameter Units.SI.CoefficientOfHeatTransfer Kdef=50 "Heat exchange coefficient in case of zero flow"; + parameter Integer iH2O=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium.substanceNames, {"H2O", "Water", "water"}) "Index of water vapor in the medium composition"; + parameter Integer iCO2=ThermoSysPro.Properties.Media.Functions.findSubstanceIndex(Medium.substanceNames, {"CO2", "Carbondioxide", "Carbon dioxide", "carbondioxide"}) "Index of carbon dioxide in the medium composition"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal=true)"; parameter Real eps=1.e-1 "Small number for the computation of the pressure losses"; @@ -74,14 +71,8 @@ public "H2O partial pressure in thermal node i"; ThermoSysPro.Units.SI.MassFraction Xh2o "H2O mass fraction"; ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xn2 "N2 mass fraction"; ThermoSysPro.Units.SI.MassFraction Xvh2o "H2O volume fraction"; ThermoSysPro.Units.SI.MassFraction Xvco2 "CO2 volume fraction"; - ThermoSysPro.Units.SI.MassFraction Xvo2 "O2 volume fraction"; - ThermoSysPro.Units.SI.MassFraction Xvn2 "N2 volume fraction"; - ThermoSysPro.Units.SI.MassFraction Xvso2 "SO2 volume fraction"; Units.SI.CoefficientOfHeatTransfer K(start=0) "Total heat exchange coefficient"; Units.SI.CoefficientOfHeatTransfer Kc(start=0) @@ -99,8 +90,9 @@ public - 1)) "Temperature difference between the fluid and the wall"; Units.SI.Temperature TFilm[N - 1] "Film temperature"; Real Mmt "Total flue gases molar mass"; - FluidType ftype "Fluid type"; - Integer fluid=Integer(ftype) "Fluid number"; + parameter Units.SI.MolarMass MM[Medium.nX]={Medium.fluidConstants[j].molarMass for j in 1:Medium.nX} "Component molar masses"; + Medium.ThermodynamicState state1[N - 1] "Thermodynamic state in thermal node i"; + Medium.ThermodynamicState state2[N] "Thermodynamic state in hydraulic node i"; Real diff_res[N] "Diffusion resistance in hydraulic node i"; Real diff_res_t "Total diffusion resistance in the pipe"; Real diff_res_e[N - 1] "Diffusion resistance at inlet of thermal node i"; @@ -120,20 +112,21 @@ public Real rs[N - 1] "Value of r(Q/gamma) for outlet of thermal node i"; public - Interfaces.Connectors.FluidInlet C1 annotation (Placement(transformation( + Interfaces.Connectors.FluidInlet C1(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{-110,-10},{-90,10}}, rotation=0))); ThermoSysPro.Thermal.Connectors.ThermalPort CTh[Ns] annotation (Placement(transformation(extent={{-10,20},{10,40}}, rotation=0))); - Interfaces.Connectors.FluidOutlet C2 annotation (Placement(transformation( + Interfaces.Connectors.FluidOutlet C2(redeclare package Medium = Medium) annotation (Placement(transformation( extent={{90,-10},{110,10}}, rotation=0))); equation - /* Check that the fluid type is flue gases */ - assert(ftype == FluidType.FlueGases, "StaticWallFlueGasesExchanger: the fluid type must be flue gases"); + assert(Medium.nX > 1, "StaticWallFlueGasesExchanger: Medium must be a gas mixture"); + assert(iH2O > 0, "StaticWallFlueGasesExchanger: Medium.substanceNames must contain H2O/Water for radiative heat transfer"); + assert(iCO2 > 0, "StaticWallFlueGasesExchanger: Medium.substanceNames must contain CO2/Carbondioxide for radiative heat transfer"); /* Wall boundary */ CTh.W = -dW1; - CTh.T = Tp; + Tp = CTh.T; /* Pipe boundaries */ P[1] = C1.P; @@ -157,30 +150,18 @@ equation C2.diff_res_1 = C1.diff_res_1 + diff_res_t; C1.diff_res_2 = C2.diff_res_2 + diff_res_t; - C1.ftype = C2.ftype; - - C1.Xco2 = C2.Xco2; - C1.Xh2o = C2.Xh2o; - C1.Xo2 = C2.Xo2; - C1.Xso2 = C2.Xso2; + C1.Xi = C2.Xi; + C1.SubC = C2.SubC; - ftype = C1.ftype; - - Xh2o = C1.Xh2o; - Xco2 = C1.Xco2; - Xo2 = C1.Xo2; - Xso2 = C1.Xso2; - Xn2 = 1 - C1.Xco2 - C1.Xh2o - C1.Xo2 - C1.Xso2; + Xh2o = C1.Xi[iH2O]; + Xco2 = C1.Xi[iCO2]; /* Volume fractions */ - Xvco2 = (Xco2/Mco2)/(Xco2/Mco2 + Xh2o/Mh2o + Xo2/Mo2 + Xn2/Mn2 + Xso2/Mso2); - Xvh2o = (Xh2o/Mh2o)/(Xco2/Mco2 + Xh2o/Mh2o + Xo2/Mo2 + Xn2/Mn2 + Xso2/Mso2); - Xvo2 = (Xo2/Mo2)/(Xco2/Mco2 + Xh2o/Mh2o + Xo2/Mo2 + Xn2/Mn2 + Xso2/Mso2); - Xvn2 = (Xn2/Mn2)/(Xco2/Mco2 + Xh2o/Mh2o + Xo2/Mo2 + Xn2/Mn2 + Xso2/Mso2); - Xvso2 = (Xso2/Mso2)/(Xco2/Mco2 + Xh2o/Mh2o + Xo2/Mo2 + Xn2/Mn2 + Xso2/Mso2); + Xvco2 = Xco2/MM[iCO2]/sum({C1.Xi[k]/MM[k] for k in 1:Medium.nX}); + Xvh2o = Xh2o/MM[iH2O]/sum({C1.Xi[k]/MM[k] for k in 1:Medium.nX}); /* Total molar mass */ - Mmt = Xvco2*Mco2 + Xvh2o*Mh2o + Xvo2*Mo2 + Xvn2*Mn2 + Xvso2*Mso2; + Mmt = sum({C1.Xi[k]/MM[k] for k in 1:Medium.nX})^(-1); /* Mass and energy balance equations (thermal nodes) */ for i in 1:N - 1 loop @@ -194,8 +175,8 @@ equation deltaT[i] = T1[i] - Tp[i]; /* Partial gas pressures */ - Ph2o[i] = P[i + 1]*Xh2o*Mmt/Mh2o; - Pco2[i] = P[i + 1]*Xco2*Mmt/Mco2; + Ph2o[i] = P[i + 1]*Xvh2o; + Pco2[i] = P[i + 1]*Xvco2; if (abs(Q[i]) >= Qmin) then /* Convective heat exchange coefficient */ @@ -267,7 +248,8 @@ equation J[i] = Je[i] + Js[i]; /* Fluid thermodynamic properties */ - T1[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph(P[i + 1], h[i + 1], fluid, 0, Xco2, Xh2o, Xo2, Xso2); + state1[i] = Medium.setState_phX(p=P[i + 1], h=h[i + 1], X=C1.Xi); + T1[i] = Medium.temperature(state1[i]); end for; /* Momentum balance equations (hydraulic nodes) */ @@ -280,13 +262,15 @@ equation gamma[i] = if diffusion then 1/diff_res[i] else gamma0; /* Fluid thermodynamic properties */ + state2[i] = Medium.setState_phX(p=(P[i] + P[i + 1])/2, h=hb[i], X=C1.Xi); + if (p_rho > 0) then rho2[i] = p_rho; else - rho2[i] = ThermoSysPro.Properties.Fluid.Density_Ph((P[i] + P[i + 1])/2, hb[i], fluid, 0, Xco2, Xh2o, Xo2, Xso2); + rho2[i] = Medium.density(state2[i]); end if; - T2[i] = ThermoSysPro.Properties.Fluid.Temperature_Ph((P[i] + P[i + 1])/2, hb[i], fluid, 0, Xco2, Xh2o, Xo2, Xso2); + T2[i] = Medium.temperature(state2[i]); end for; /* Total heat exchange coefficient ??? */ diff --git a/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_1SG.mo b/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_1SG.mo index d7f788fb..a44a2548 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_1SG.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_1SG.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model SteamGenerator_1SG "Single steam generator" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the secondary water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Primary = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the primary side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real H0_Mix_AlimDomeGV=1194812.89980521; parameter Boolean inertia=false @@ -33,6 +32,7 @@ model SteamGenerator_1SG "Single steam generator" public ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe UtubeHotLeg( + redeclare package Medium = Medium_Primary, L=10.848, D=0.01687, z2=10.848, @@ -60,6 +60,7 @@ public rotation=270))); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe UtubeColdtLeg( + redeclare package Medium = Medium_Primary, L=10.848, D=0.01687, h(start={1326153.46646787,1310848.36111251,1299218.76228131, @@ -87,6 +88,7 @@ public rotation=90))); ThermoSysPro.Fluid.Volumes.DynamicDrum DomeGV( + redeclare package Medium = Medium, hl(start=1257382.15477056), hv(start=2771260.46625813), cpp=500, @@ -100,12 +102,12 @@ public continuous_flow_reversal=continuous_flow_reversal, diffusion=diffusion, Vf0=Vf0, - P0=P0, - wsftype=wsftype) + P0=P0) annotation (Placement(transformation(extent={{-22,64},{22,107}}, rotation=0))); protected ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe DPSeparateurCyclone( + redeclare package Medium = Medium, L=1, D=0.95886, lambda=0.03, @@ -116,6 +118,7 @@ protected rotation=90))); public ThermoSysPro.Fluid.Volumes.VolumeC MixAlimDomeGV( + redeclare package Medium = Medium, h0=H0_Mix_AlimDomeGV, h(start=1194851.37111438), V=0.01, @@ -123,39 +126,40 @@ public steady_state=steady_state, dynamic_mass_balance=dynamic_mass_balance, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - ftype=ftype) " " + diffusion=diffusion) " " annotation (Placement(transformation( origin={94,63}, extent={{-8,-8},{8,8}}, rotation=270))); ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss DPnulle_AlimDwnc( + redeclare package Medium = Medium, K=1e-4) annotation (Placement(transformation( origin={94,88}, extent={{-6,-7},{6,7}}, rotation=270))); ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss DPnulle_DomeDwnc( + redeclare package Medium = Medium, p_rho=0, C2(P(start=6829391.22090726), Q(fixed=false, start=6643)), K=0.172144) annotation (Placement(transformation(extent={{53,53}, {63,73}}, rotation=0))); public - ThermoSysPro.Fluid.Sensors.SensorP CapteurPAlim + ThermoSysPro.Fluid.Sensors.SensorP CapteurPAlim(redeclare package Medium = Medium) annotation (Placement(transformation( origin={99,26}, extent={{-6,-6},{6,6}}, rotation=270))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,139},{10,159}}, rotation= 0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet(redeclare package Medium = Medium) annotation ( Placement(transformation(extent={{42,102},{62,122}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet1(redeclare package Medium = Medium_Primary) annotation ( Placement(transformation(extent={{-56,-132},{-36,-112}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI1 + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI1(redeclare package Medium = Medium_Primary) annotation (Placement(transformation(extent={{36,-132},{56,-112}}, rotation= 0))); ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal @@ -163,6 +167,7 @@ public 0))); public ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe DownComerGV( + redeclare package Medium = Medium, p_rho=0, h(start=1194851.3), z1=10.8, @@ -217,6 +222,7 @@ public rotation=270))); ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowRiser RiserGV( + redeclare package Medium = Medium, Ns=5, h(start={1194851.37008144,1260885.3160958,1364323.64228458,1450411.24087846, 1525552.01981793,1595519.78942018,1595519.78863864}), @@ -247,24 +253,24 @@ public rotation=90))); ThermoSysPro.Fluid.Volumes.VolumeC volumeA( + redeclare package Medium = Medium, h0=1185.2e3, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, dynamic_mass_balance=dynamic_mass_balance, continuous_flow_reversal=continuous_flow_reversal, diffusion=diffusion, - ftype=ftype, P0=6849350) annotation (Placement(transformation( origin={1,-90}, extent={{-10,-10},{10,10}}, rotation=90))); ThermoSysPro.Fluid.Volumes.VolumeC volumeA1( + redeclare package Medium = Medium, dynamic_energy_balance=dynamic_energy_balance, steady_state=steady_state, dynamic_mass_balance=dynamic_mass_balance, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - ftype=ftype) annotation ( + diffusion=diffusion) annotation ( Placement(transformation( origin={0,18}, extent={{-10,-10},{10,10}}, diff --git a/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_4SG.mo b/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_4SG.mo index 73f41820..7a19f642 100644 --- a/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_4SG.mo +++ b/ThermoSysPro/Fluid/HeatExchangers/SteamGenerator_4SG.mo @@ -1,10 +1,9 @@ within ThermoSysPro.Fluid.HeatExchangers; model SteamGenerator_4SG "Single steam generator equivalent to four steam generators" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.WaterSteamFluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; + + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialTwoPhaseThermoSysProMedium "Medium model for the secondary water/steam side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); + replaceable package Medium_Primary = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model for the primary side" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real H0_Mix_AlimDomeGV=1194812.89980521; parameter Boolean inertia=false @@ -33,6 +32,7 @@ model SteamGenerator_4SG "Single steam generator equivalent to four steam genera public ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe UtubeHotLeg( + redeclare package Medium = Medium_Primary, L=10.848, D=0.01687, z2=10.848, @@ -60,6 +60,7 @@ public rotation=270))); ThermoSysPro.Fluid.HeatExchangers.DynamicOnePhaseFlowPipe UtubeColdtLeg( + redeclare package Medium = Medium_Primary, L=10.848, D=0.01687, z1=10.848, @@ -87,6 +88,7 @@ public rotation=90))); ThermoSysPro.Fluid.Volumes.DynamicDrum DomeGV( + redeclare package Medium = Medium, hl(start=1257382.15477056), hv(start=2771260.46625813), Mp=32000, @@ -100,11 +102,11 @@ public Vf0=Vf0, P0=P0, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - wsftype=wsftype) annotation (Placement(transformation(extent={{ + diffusion=diffusion) annotation (Placement(transformation(extent={{ -22,64},{22,107}}, rotation=0))); protected ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe DPSeparateurCyclone( + redeclare package Medium = Medium, L=1, D=0.95886, lambda=0.03, @@ -115,6 +117,7 @@ protected rotation=90))); public ThermoSysPro.Fluid.Volumes.VolumeC MixAlimDomeGV( + redeclare package Medium = Medium, h0=H0_Mix_AlimDomeGV, h(start=1194851.37111438), V=0.01, @@ -122,19 +125,19 @@ public dynamic_mass_balance=dynamic_mass_balance, steady_state=steady_state, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - ftype=ftype) " " + diffusion=diffusion) " " annotation (Placement(transformation( origin={94,63}, extent={{-8,-8},{8,8}}, rotation=270))); ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss DPnulle_AlimDwnc( - K=1e-4, rho(start=839)) + redeclare package Medium = Medium, K=1e-4, rho(start=839)) annotation (Placement(transformation( origin={94,88}, extent={{-6,-7},{6,7}}, rotation=270))); ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss DPnulle_DomeDwnc( + redeclare package Medium = Medium, p_rho=0, C2(P(start=6829391.22090726), Q(fixed=false, start=6643)), K=0.172144, @@ -142,20 +145,20 @@ public {{53,53},{63,73}}, rotation=0))); public - ThermoSysPro.Fluid.Sensors.SensorP CapteurPAlim + ThermoSysPro.Fluid.Sensors.SensorP CapteurPAlim(redeclare package Medium = Medium) annotation (Placement(transformation( origin={99,26}, extent={{-6,-6},{6,6}}, rotation=270))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-10,139},{10,159}}, rotation= 0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet(redeclare package Medium = Medium) annotation ( Placement(transformation(extent={{42,102},{62,122}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet fluidInlet1(redeclare package Medium = Medium_Primary) annotation ( Placement(transformation(extent={{-56,-132},{-36,-112}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI1 + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet fluidOutletI1(redeclare package Medium = Medium_Primary) annotation (Placement(transformation(extent={{36,-132},{56,-112}}, rotation= 0))); ThermoSysPro.InstrumentationAndControl.Connectors.OutputReal outputReal @@ -163,6 +166,7 @@ public 0))); public ThermoSysPro.Fluid.PressureLosses.LumpedStraightPipe DownComerGV( + redeclare package Medium = Medium, p_rho=0, h(start=1194851.3), z1=10.8, @@ -218,6 +222,7 @@ public rotation=270))); ThermoSysPro.Fluid.HeatExchangers.DynamicTwoPhaseFlowRiser RiserGV( + redeclare package Medium = Medium, Ns=5, Q(start={8600,8600,8600,8600,8600,8600}), h(start={1194851.37008144,1260885.3160958,1364323.64228458,1450411.24087846, @@ -246,26 +251,26 @@ public rotation=90))); ThermoSysPro.Fluid.Volumes.VolumeC volumeA( + redeclare package Medium = Medium, h0=1185.2e3, dynamic_energy_balance=dynamic_energy_balance, dynamic_mass_balance=dynamic_mass_balance, - ftype=ftype, P0=6849350) annotation (Placement(transformation( origin={0.5,-92}, extent={{-8,-8.5},{8,8.5}}, rotation=90))); ThermoSysPro.Fluid.Volumes.VolumeC volumeA1( + redeclare package Medium = Medium, dynamic_energy_balance=dynamic_energy_balance, dynamic_mass_balance=dynamic_mass_balance, steady_state=steady_state, continuous_flow_reversal=continuous_flow_reversal, - diffusion=diffusion, - ftype=ftype) annotation ( + diffusion=diffusion) annotation ( Placement(transformation( origin={-0.5,17}, extent={{-9,-9.5},{9,9.5}}, rotation=90))); - ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss DPnulle_Vapeur(K= + ThermoSysPro.Fluid.PressureLosses.SingularPressureLoss DPnulle_Vapeur(redeclare package Medium = Medium, K= 1e-4, Q(start=2113)) annotation (Placement(transformation( origin={-0.5,124}, diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo index 0b4a67c1..cf97ea60 100644 --- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo +++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidInlet.mo @@ -1,5 +1,8 @@ within ThermoSysPro.Fluid.Interfaces.Connectors; connector FluidInlet "Fluid inlet connector" + replaceable package Medium = + ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium + "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",group="Medium")); Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume"; Units.SI.MassFlowRate Q(start=500) "Mass flow rate of the fluid crossing the boundary of the control volume"; @@ -9,16 +12,10 @@ connector FluidInlet "Fluid inlet connector" "Fluid specific enthalpy in the control volume 1"; Units.SI.SpecificEnthalpy h_vol_2(start=1.e5) "Fluid specific enthalpy in the control volume 2"; - input ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType ftype - "Fluid type"; - ThermoSysPro.Units.SI.MassFraction Xco2(start=0.01) - "CO2 mass fraction of the fluid crossing the boundary of the control volume"; - ThermoSysPro.Units.SI.MassFraction Xh2o - "H2O mass fraction of the fluid crossing the boundary of the control volume"; - ThermoSysPro.Units.SI.MassFraction Xo2(start=0.2) - "O2 mass fraction of the fluid crossing the boundary of the control volume"; - ThermoSysPro.Units.SI.MassFraction Xso2(start=0) - "SO2 mass fraction of the fluid crossing the boundary of the control volume"; + Medium.ExtraProperty SubC[Medium.nC] + "Substances concentration (ppm) of the fluid crossing the boundary of the control volume"; + Medium.MassFraction Xi[Medium.nXi] + "Independent mixture mass fractions m_i/m of the fluid crossing the boundary of the control volume"; input Real diff_res_1(start=1e4) "Diffusion resistance from control volume 1"; output Real diff_res_2(start=1e4) diff --git a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo index 3579500b..913ee8dd 100644 --- a/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo +++ b/ThermoSysPro/Fluid/Interfaces/Connectors/FluidOutlet.mo @@ -1,5 +1,8 @@ within ThermoSysPro.Fluid.Interfaces.Connectors; connector FluidOutlet "Fluid outlet connector" + replaceable package Medium = + ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialThermoSysProMedium + "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid",group="Medium")); Units.SI.Pressure P(start=1.e5) "Fluid pressure in the control volume"; Units.SI.MassFlowRate Q(start=500) "Mass flow rate of the fluid crossing the boundary of the control volume"; @@ -9,16 +12,10 @@ connector FluidOutlet "Fluid outlet connector" "Fluid specific enthalpy in the control volume 1"; Units.SI.SpecificEnthalpy h_vol_2(start=1.e5) "Fluid specific enthalpy in the control volume 2"; - output ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType ftype - "Fluid type"; - ThermoSysPro.Units.SI.MassFraction Xco2(start=0.01) - "CO2 mass fraction of the fluid crossing the boundary of the control volume"; - ThermoSysPro.Units.SI.MassFraction Xh2o - "H2O mass fraction of the fluid crossing the boundary of the control volume"; - ThermoSysPro.Units.SI.MassFraction Xo2(start=0.2) - "O2 mass fraction of the fluid crossing the boundary of the control volume"; - ThermoSysPro.Units.SI.MassFraction Xso2(start=0) - "SO2 mass fraction of the fluid crossing the boundary of the control volume"; + Medium.ExtraProperty SubC[Medium.nC] + "Substances concentration (ppm) of the fluid crossing the boundary of the control volume"; + Medium.MassFraction Xi[Medium.nXi] + "Independent mixture mass fractions m_i/m of the fluid crossing the boundary of the control volume"; output Real diff_res_1(start=1e4) "Diffusion resistance from control volume 1"; input Real diff_res_2(start=1e4) diff --git a/ThermoSysPro/Fluid/Junctions/DeheaterMixer2.mo b/ThermoSysPro/Fluid/Junctions/DeheaterMixer2.mo index ce58b140..aabce226 100644 --- a/ThermoSysPro/Fluid/Junctions/DeheaterMixer2.mo +++ b/ThermoSysPro/Fluid/Junctions/DeheaterMixer2.mo @@ -1,33 +1,22 @@ within ThermoSysPro.Fluid.Junctions; model DeheaterMixer2 - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Units.SI.Temperature Tmax=700 "Maximum fluid temperature"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Units.SI.AbsolutePressure P(start=50e5) "Fluid pressure"; Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy"; Units.SI.Temperature T(start=700) "Fluid temperature"; Units.SI.SpecificEnthalpy hmax(start=10e5) "Maximum fluid specific enthalpy"; - FluidType fluids[4] "Fluids mixing in volume"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; Units.SI.Power Je "Thermal power diffusion from inlet e"; Units.SI.Power Je_mix "Thermal power diffusion from inlet e_mix"; Units.SI.Power Js "Thermal power diffusion from outlet s"; @@ -40,24 +29,11 @@ public Real rs "Value of r(Q/gamma) for outlet s"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce_mix annotation ( - Placement(transformation(extent={{-9,-110},{11,-90}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs annotation (Placement( - transformation(extent={{90,50},{110,70}}, rotation=0))); -public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce annotation (Placement( - transformation(extent={{-110,50},{-90,70}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce_mix(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-9,-110},{11,-90}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{90,50},{110,70}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-110,50},{-90,70}}, rotation=0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ce.ftype; - fluids[3] = Ce_mix.ftype; - fluids[4] = Cs.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), - "DeheaterMixer2: fluids mixing in volume are not compatible with each other"); - /* Mass balance equation */ 0 = Ce.Q + Ce_mix.Q - Cs.Q; @@ -80,17 +56,10 @@ equation end if; /* Fluid composition balance equations */ - 0 = Ce.Xco2*Ce.Q + Ce_mix.Xco2*Ce_mix.Q - Cs.Xco2*Cs.Q; - 0 = Ce.Xh2o*Ce.Q + Ce_mix.Xh2o*Ce_mix.Q - Cs.Xh2o*Cs.Q; - 0 = Ce.Xo2*Ce.Q + Ce_mix.Xo2*Ce_mix.Q - Cs.Xo2*Cs.Q; - 0 = Ce.Xso2*Ce.Q + Ce_mix.Xso2*Ce_mix.Q - Cs.Xso2*Cs.Q; - - Cs.ftype = ftype; + Cs.Xi*Cs.Q = Ce.Xi*Ce.Q + Ce_mix.Xi*Ce_mix.Q; - Cs.Xco2 = Xco2; - Cs.Xh2o = Xh2o; - Cs.Xo2 = Xo2; - Cs.Xso2 = Xso2; + /* Traces composition balance equations */ + Cs.SubC*Cs.Q = Ce.SubC*Ce.Q + Ce_mix.SubC*Ce_mix.Q; /* Flow reversal */ if continuous_flow_reversal then @@ -137,9 +106,9 @@ equation Cs.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Cs.Xco2, Cs.Xh2o, Cs.Xo2, Cs.Xso2); + T = Medium.temperature_phX(P, h, Cs.Xi); - hmax = ThermoSysPro.Properties.Fluid.SpecificEnthalpy_PT(P, Tmax, fluid, mode, Cs.Xco2, Cs.Xh2o, Cs.Xo2, Cs.Xso2); + hmax = Medium.specificEnthalpy_pTX(P, Tmax, Cs.Xi); annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/Junctions/MassFlowMultiplier.mo b/ThermoSysPro/Fluid/Junctions/MassFlowMultiplier.mo index a15f17b6..d130ffb3 100644 --- a/ThermoSysPro/Fluid/Junctions/MassFlowMultiplier.mo +++ b/ThermoSysPro/Fluid/Junctions/MassFlowMultiplier.mo @@ -1,11 +1,7 @@ within ThermoSysPro.Fluid.Junctions; model MassFlowMultiplier "Mass flow multipliier" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Real alpha=2 "Flow multiplier"; parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; @@ -13,24 +9,16 @@ model MassFlowMultiplier "Mass flow multipliier" "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; parameter Units.SI.Density p_rho=0 "If > 0, fixed fluid density" annotation (Evaluate=true, Dialog(tab="Fluid", group="Fluid properties")); - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected - parameter Boolean flue_gases=(ftype == FluidType.FlueGases) "Flue gases"; parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Units.SI.AbsolutePressure P(start=10e5) "Fluid pressure"; Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy"; Units.SI.Temperature T "Fluid temperature"; Units.SI.Density rho(start=998) "Fluid density"; - FluidType fluids[3] "Fluids mixing in volume"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; Units.SI.Power Je "Thermal power diffusion from inlet e"; Units.SI.Power Js "Thermal power diffusion from outlet s"; Units.SI.Power J "Total thermal power diffusion"; @@ -40,20 +28,12 @@ public Real rs "Value of r(Q/gamma) for outlet s"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ce.ftype; - fluids[3] = Cs.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), - "MassFlowMultiplier: fluids mixing in volume are not compatible with each other"); - /* Mass balance equation */ 0 = alpha*Ce.Q - Cs.Q; @@ -67,17 +47,9 @@ equation Cs.h_vol_1 = h; /* Fluid composition */ - 0 = Ce.Xco2*alpha*Ce.Q - Cs.Xco2*Cs.Q; - 0 = Ce.Xh2o*alpha*Ce.Q - Cs.Xh2o*Cs.Q; - 0 = Ce.Xo2*alpha*Ce.Q - Cs.Xo2*Cs.Q; - 0 = Ce.Xso2*alpha*Ce.Q - Cs.Xso2*Cs.Q; - - Cs.ftype = ftype; + Ce.Xi*alpha*Ce.Q = Cs.Xi*Cs.Q; - Cs.Xco2 = Xco2; - Cs.Xh2o = Xh2o; - Cs.Xo2 = Xo2; - Cs.Xso2 = Xso2; + Ce.SubC*alpha*Ce.Q = Cs.SubC*Cs.Q; /* Flow reversal */ if continuous_flow_reversal then @@ -116,12 +88,12 @@ equation Cs.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Cs.Xco2, Cs.Xh2o, Cs.Xo2, Cs.Xso2); + T = Medium.temperature_phX(P, h, Cs.Xi); if (p_rho > 0) then rho = p_rho; else - rho = ThermoSysPro.Properties.Fluid.Density_Ph(P,h,fluid,mode, Cs.Xco2, Cs.Xh2o, Cs.Xo2, Cs.Xso2); + rho = Medium.density_phX(P,h,Cs.Xi); end if; annotation ( diff --git a/ThermoSysPro/Fluid/Junctions/Mixer2.mo b/ThermoSysPro/Fluid/Junctions/Mixer2.mo index 206eeb5f..caeea6c0 100644 --- a/ThermoSysPro/Fluid/Junctions/Mixer2.mo +++ b/ThermoSysPro/Fluid/Junctions/Mixer2.mo @@ -1,32 +1,22 @@ within ThermoSysPro.Fluid.Junctions; model Mixer2 "Mixer with two inlets" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Real alpha1 "Extraction coefficient for inlet 1 (<=1)"; Units.SI.AbsolutePressure P(start=10e5) "Fluid pressure"; Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy"; Units.SI.Temperature T "Fluid temperature"; - FluidType fluids[4] "Fluids mixing in volume"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions"; Units.SI.Power Je1 "Thermal power diffusion from inlet e1"; Units.SI.Power Je2 "Thermal power diffusion from inlet e2"; Units.SI.Power Js "Thermal power diffusion from outlet s"; @@ -39,12 +29,11 @@ public Real rs "Value of r(Q/gamma) for outlet s"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-50,-110},{-30,-90}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{90,-10},{110,10}}, rotation=0))); -public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1 annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-50,90},{-30,110}}, rotation=0))); InstrumentationAndControl.Connectors.InputReal Ialpha1 "Extraction coefficient for inlet 1 (<=1)" @@ -53,15 +42,6 @@ public annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ce1.ftype; - fluids[3] = Ce2.ftype; - fluids[4] = Cs.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), - "Mixer2: fluids mixing in volume are not compatible with each other"); - /* Unconnected connectors */ if (cardinality(Ialpha1) == 0) then Ialpha1.signal = 0.5; @@ -82,17 +62,12 @@ equation Cs.h_vol_1 = h; /* Fluid composition balance equations */ - 0 = Ce1.Xco2*Ce1.Q + Ce2.Xco2*Ce2.Q - Cs.Xco2*Cs.Q; - 0 = Ce1.Xh2o*Ce1.Q + Ce2.Xh2o*Ce2.Q - Cs.Xh2o*Cs.Q; - 0 = Ce1.Xo2*Ce1.Q + Ce2.Xo2*Ce2.Q - Cs.Xo2*Cs.Q; - 0 = Ce1.Xso2*Ce1.Q + Ce2.Xso2*Ce2.Q - Cs.Xso2*Cs.Q; + fill(0,Medium.nXi) = Ce1.Xi*Ce1.Q + Ce2.Xi*Ce2.Q - Cs.Xi*Cs.Q; - Cs.ftype = ftype; + Cs.Xi = X; - Cs.Xco2 = Xco2; - Cs.Xh2o = Xh2o; - Cs.Xo2 = Xo2; - Cs.Xso2 = Xso2; + /* Traces composition balance equations */ + Ce1.Q*Ce1.SubC + Ce2.Q*Ce2.SubC = Cs.Q*Cs.SubC; /* Mass flow at the outlet */ if (cardinality(Ialpha1) <> 0) then @@ -147,7 +122,7 @@ equation Cs.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2); + T = Medium.temperature_phX(p=P, h=h, X=X); annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/Junctions/Mixer3.mo b/ThermoSysPro/Fluid/Junctions/Mixer3.mo index cc6dde0c..185dbf65 100644 --- a/ThermoSysPro/Fluid/Junctions/Mixer3.mo +++ b/ThermoSysPro/Fluid/Junctions/Mixer3.mo @@ -1,21 +1,15 @@ within ThermoSysPro.Fluid.Junctions; model Mixer3 "Mixer with three inlets" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Real alpha1 "Extraction coefficient for inlet 1 (<=1)"; @@ -23,11 +17,6 @@ public Units.SI.AbsolutePressure P(start=10e5) "Fluid pressure"; Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy"; Units.SI.Temperature T "Fluid temperature"; - FluidType fluids[5] "Fluids mixing in volume"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; Units.SI.Power Je1 "Thermal power diffusion from inlet e1"; Units.SI.Power Je2 "Thermal power diffusion from inlet e2"; Units.SI.Power Je3 "Thermal power diffusion from inlet e3"; @@ -43,39 +32,16 @@ public Real rs "Value of r(Q/gamma) for outlet s"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2 annotation (Placement( - transformation(extent={{-50,-110},{-30,-90}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs annotation (Placement( - transformation(extent={{90,-10},{110,10}}, rotation=0))); -public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1 annotation (Placement( - transformation(extent={{-50,90},{-30,110}}, rotation=0))); - InstrumentationAndControl.Connectors.InputReal Ialpha1 - "Extraction coefficient for inlet 1 (<=1)" - annotation (Placement(transformation(extent={{-80,50},{-60,70}}, rotation=0))); - InstrumentationAndControl.Connectors.OutputReal Oalpha1 - annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); -public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce3 annotation (Placement( - transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - InstrumentationAndControl.Connectors.InputReal Ialpha2 - "Extraction coefficient for inlet 2 (<=1)" - annotation (Placement(transformation(extent={{-80,-70},{-60,-50}}, rotation= - 0))); - InstrumentationAndControl.Connectors.OutputReal Oalpha2 - annotation (Placement(transformation(extent={{-20,-70},{0,-50}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,-110},{-30,-90}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{90,-10},{110,10}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-50,90},{-30,110}}, rotation=0))); + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce3(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); + InstrumentationAndControl.Connectors.InputReal Ialpha1 "Extraction coefficient for inlet 1 (<=1)" annotation (Placement(transformation(extent={{-80,50},{-60,70}}, rotation=0))); + InstrumentationAndControl.Connectors.OutputReal Oalpha1 annotation (Placement(transformation(extent={{-20,50},{0,70}}, rotation=0))); + InstrumentationAndControl.Connectors.InputReal Ialpha2 "Extraction coefficient for inlet 2 (<=1)" annotation (Placement(transformation(extent={{-80,-70},{-60,-50}}, rotation=0))); + InstrumentationAndControl.Connectors.OutputReal Oalpha2 annotation (Placement(transformation(extent={{-20,-70},{0,-50}}, rotation=0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ce1.ftype; - fluids[3] = Ce2.ftype; - fluids[4] = Ce3.ftype; - fluids[5] = Cs.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), - "Mixer3: fluids mixing in volume are not compatible with each other"); - /* Unconnected connectors */ if (cardinality(Ialpha1) == 0) then Ialpha1.signal = 0.3; @@ -89,6 +55,7 @@ equation 0 = Ce1.Q + Ce2.Q + Ce3.Q - Cs.Q; P = Ce1.P; + P = Ce2.P; P = Ce3.P; P = Cs.P; @@ -117,17 +84,9 @@ equation Oalpha2.signal = alpha2; /* Fluid composition balance equations */ - 0 = Ce1.Xco2*Ce1.Q + Ce2.Xco2*Ce2.Q + Ce3.Xco2*Ce3.Q - Cs.Xco2*Cs.Q; - 0 = Ce1.Xh2o*Ce1.Q + Ce2.Xh2o*Ce2.Q + Ce3.Xh2o*Ce3.Q - Cs.Xh2o*Cs.Q; - 0 = Ce1.Xo2*Ce1.Q + Ce2.Xo2*Ce2.Q + Ce3.Xo2*Ce3.Q - Cs.Xo2*Cs.Q; - 0 = Ce1.Xso2*Ce1.Q + Ce2.Xso2*Ce2.Q + Ce3.Xso2*Ce3.Q - Cs.Xso2*Cs.Q; - - Cs.ftype = ftype; + Cs.Xi*Cs.Q = Ce1.Xi*Ce1.Q + Ce2.Xi*Ce2.Q + Ce3.Xi*Ce3.Q; - Cs.Xco2 = Xco2; - Cs.Xh2o = Xh2o; - Cs.Xo2 = Xo2; - Cs.Xso2 = Xso2; + Cs.SubC*Cs.Q = Ce1.SubC*Ce1.Q + Ce2.SubC*Ce2.Q + Ce3.SubC*Ce3.Q; /* Flow reversal */ if continuous_flow_reversal then @@ -182,7 +141,7 @@ equation Cs.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Cs.Xco2, Cs.Xh2o, Cs.Xo2, Cs.Xso2); + T = Medium.temperature_phX(P, h, Cs.Xi); annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/Junctions/Mixer8.mo b/ThermoSysPro/Fluid/Junctions/Mixer8.mo index 43ddc361..dbb347e6 100644 --- a/ThermoSysPro/Fluid/Junctions/Mixer8.mo +++ b/ThermoSysPro/Fluid/Junctions/Mixer8.mo @@ -1,31 +1,19 @@ within ThermoSysPro.Fluid.Junctions; model Mixer8 "Mixer with eight inlets" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); - protected parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Units.SI.AbsolutePressure P(start=10e5) "Fluid pressure"; Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy"; Units.SI.Temperature T "Fluid temperature"; - FluidType fluids[10] "Fluids mixing in volume"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; Units.SI.Power Je1 "Thermal power diffusion from inlet e1"; Units.SI.Power Je2 "Thermal power diffusion from inlet e2"; Units.SI.Power Je3 "Thermal power diffusion from inlet e3"; @@ -56,47 +44,32 @@ public Real rs "Value of r(Q/gamma) for outlet s"; - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce5 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce5(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{-110,-50},{-90,-30}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce6 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce6(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{-112,-109},{-92,-89}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce7 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce7(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{-40,-109},{-20,-89}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce3 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce3(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{-112,90},{-92,110}}, rotation= 0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce2(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{-40,90},{-20,110}}, rotation= 0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce1(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{20,92},{40,112}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{90,-10},{110,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce8 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce8(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{20,-109},{40,-89}}, rotation= 0))); - - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce4 annotation (layer= + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce4(redeclare package Medium = Medium) annotation (layer= "icon", Placement(transformation(extent={{-112,30},{-92,50}}, rotation= 0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ce1.ftype; - fluids[3] = Ce2.ftype; - fluids[4] = Ce3.ftype; - fluids[5] = Ce4.ftype; - fluids[6] = Ce5.ftype; - fluids[7] = Ce6.ftype; - fluids[8] = Ce7.ftype; - fluids[9] = Ce8.ftype; - fluids[10] = Cs.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), - "Mixer8: fluids mixing in volume are not compatible with each other"); /* Unconnected connectors */ if (cardinality(Ce1) == 0) then @@ -105,11 +78,8 @@ equation Ce1.h_vol_1 = 1.e5; Ce1.diff_res_1 = 0; Ce1.diff_on_1 = false; - Ce1.ftype = ftype; - Ce1.Xco2 = 0; - Ce1.Xh2o = 0; - Ce1.Xo2 = 0; - Ce1.Xso2 = 0; + Ce1.Xi = Medium.X_default[1:Medium.nXi]; + Ce1.SubC = Medium.C_default; end if; if (cardinality(Ce2) == 0) then @@ -118,11 +88,8 @@ equation Ce2.h_vol_1 = 1.e5; Ce2.diff_res_1 = 0; Ce2.diff_on_1 = false; - Ce2.ftype = ftype; - Ce2.Xco2 = 0; - Ce2.Xh2o = 0; - Ce2.Xo2 = 0; - Ce2.Xso2 = 0; + Ce2.Xi = Medium.X_default[1:Medium.nXi]; + Ce2.SubC = Medium.C_default; end if; if (cardinality(Ce3) == 0) then @@ -131,11 +98,8 @@ equation Ce3.h_vol_1 = 1.e5; Ce3.diff_res_1 = 0; Ce3.diff_on_1 = false; - Ce3.ftype = ftype; - Ce3.Xco2 = 0; - Ce3.Xh2o = 0; - Ce3.Xo2 = 0; - Ce3.Xso2 = 0; + Ce3.Xi = Medium.X_default[1:Medium.nXi]; + Ce3.SubC = Medium.C_default; end if; if (cardinality(Ce4) == 0) then @@ -144,11 +108,8 @@ equation Ce4.h_vol_1 = 1.e5; Ce4.diff_res_1 = 0; Ce4.diff_on_1 = false; - Ce4.ftype = ftype; - Ce4.Xco2 = 0; - Ce4.Xh2o = 0; - Ce4.Xo2 = 0; - Ce4.Xso2 = 0; + Ce4.Xi = Medium.X_default[1:Medium.nXi]; + Ce4.SubC = Medium.C_default; end if; if (cardinality(Ce5) == 0) then @@ -157,11 +118,8 @@ equation Ce5.h_vol_1 = 1.e5; Ce5.diff_res_1 = 0; Ce5.diff_on_1 = false; - Ce5.ftype = ftype; - Ce5.Xco2 = 0; - Ce5.Xh2o = 0; - Ce5.Xo2 = 0; - Ce5.Xso2 = 0; + Ce5.Xi = Medium.X_default[1:Medium.nXi]; + Ce5.SubC = Medium.C_default; end if; if (cardinality(Ce6) == 0) then @@ -170,11 +128,8 @@ equation Ce6.h_vol_1 = 1.e5; Ce6.diff_res_1 = 0; Ce6.diff_on_1 = false; - Ce6.ftype = ftype; - Ce6.Xco2 = 0; - Ce6.Xh2o = 0; - Ce6.Xo2 = 0; - Ce6.Xso2 = 0; + Ce6.Xi = Medium.X_default[1:Medium.nXi]; + Ce6.SubC = Medium.C_default; end if; if (cardinality(Ce7) == 0) then @@ -183,11 +138,8 @@ equation Ce7.h_vol_1 = 1.e5; Ce7.diff_res_1 = 0; Ce7.diff_on_1 = false; - Ce7.ftype = ftype; - Ce7.Xco2 = 0; - Ce7.Xh2o = 0; - Ce7.Xo2 = 0; - Ce7.Xso2 = 0; + Ce7.Xi = Medium.X_default[1:Medium.nXi]; + Ce7.SubC = Medium.C_default; end if; if (cardinality(Ce8) == 0) then @@ -196,11 +148,8 @@ equation Ce8.h_vol_1 = 1.e5; Ce8.diff_res_1 = 0; Ce8.diff_on_1 = false; - Ce8.ftype = ftype; - Ce8.Xco2 = 0; - Ce8.Xh2o = 0; - Ce8.Xo2 = 0; - Ce8.Xso2 = 0; + Ce8.Xi = Medium.X_default[1:Medium.nXi]; + Ce8.SubC = Medium.C_default; end if; if (cardinality(Cs) == 0) then @@ -237,17 +186,9 @@ equation Cs.h_vol_1 = h; /* Fluid composition balance equations */ - 0 = Ce1.Xco2*Ce1.Q + Ce2.Xco2*Ce2.Q + Ce3.Xco2*Ce3.Q + Ce4.Xco2*Ce4.Q + Ce5.Xco2*Ce5.Q + Ce6.Xco2*Ce6.Q + Ce7.Xco2*Ce7.Q + Ce8.Xco2*Ce8.Q - Cs.Xco2*Cs.Q; - 0 = Ce1.Xh2o*Ce1.Q + Ce2.Xh2o*Ce2.Q + Ce3.Xh2o*Ce3.Q + Ce4.Xh2o*Ce4.Q + Ce5.Xh2o*Ce5.Q + Ce6.Xh2o*Ce6.Q + Ce7.Xh2o*Ce7.Q + Ce8.Xh2o*Ce8.Q - Cs.Xh2o*Cs.Q; - 0 = Ce1.Xo2*Ce1.Q + Ce2.Xo2*Ce2.Q + Ce3.Xo2*Ce3.Q + Ce4.Xo2*Ce4.Q + Ce5.Xo2*Ce5.Q + Ce6.Xo2*Ce6.Q + Ce7.Xo2*Ce7.Q + Ce8.Xo2*Ce8.Q - Cs.Xo2*Cs.Q; - 0 = Ce1.Xso2*Ce1.Q + Ce2.Xso2*Ce2.Q + Ce3.Xso2*Ce3.Q + Ce4.Xso2*Ce4.Q + Ce5.Xso2*Ce5.Q + Ce6.Xso2*Ce6.Q + Ce7.Xso2*Ce7.Q + Ce8.Xso2*Ce8.Q - Cs.Xso2*Cs.Q; - - Cs.ftype = ftype; + Cs.Xi*Cs.Q = Ce1.Xi*Ce1.Q + Ce2.Xi*Ce2.Q + Ce3.Xi*Ce3.Q + Ce4.Xi*Ce4.Q + Ce5.Xi*Ce5.Q + Ce6.Xi*Ce6.Q + Ce7.Xi*Ce7.Q + Ce8.Xi*Ce8.Q; - Cs.Xco2 = Xco2; - Cs.Xh2o = Xh2o; - Cs.Xo2 = Xo2; - Cs.Xso2 = Xso2; + Cs.SubC*Cs.Q = Ce1.SubC*Ce1.Q + Ce2.SubC*Ce2.Q + Ce3.SubC*Ce3.Q + Ce4.SubC*Ce4.Q + Ce5.SubC*Ce5.Q + Ce6.SubC*Ce6.Q + Ce7.SubC*Ce7.Q + Ce8.SubC*Ce8.Q; /* Flow reversal */ if continuous_flow_reversal then @@ -342,7 +283,7 @@ equation Cs.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Cs.Xco2, Cs.Xh2o, Cs.Xo2, Cs.Xso2); + T = Medium.temperature_phX(P, h, Cs.Xi); annotation ( Diagram(coordinateSystem( diff --git a/ThermoSysPro/Fluid/Junctions/Splitter2.mo b/ThermoSysPro/Fluid/Junctions/Splitter2.mo index 94e4a836..6fb76fa9 100644 --- a/ThermoSysPro/Fluid/Junctions/Splitter2.mo +++ b/ThermoSysPro/Fluid/Junctions/Splitter2.mo @@ -1,32 +1,22 @@ within ThermoSysPro.Fluid.Junctions; model Splitter2 "Splitter with two outlets" - extends - ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidTypeParameterInterface; extends ThermoSysPro.Fluid.Interfaces.IconColors; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.FluidType; - import ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.IF97Region; - + replaceable package Medium = ThermoSysPro.Properties.Media.WaterSteam constrainedby ThermoSysPro.Properties.Media.PartialSubCMedium "Medium model" annotation (choicesAllMatching=true, Dialog(tab="Fluid", group="Medium")); parameter Boolean continuous_flow_reversal=false "true: continuous flow reversal - false: discontinuous flow reversal"; parameter Boolean diffusion=false "true: energy balance equation with diffusion - false: energy balance equation without diffusion"; - parameter IF97Region region=IF97Region.All_regions "IF97 region (active for IF97 water/steam only)" annotation(Evaluate=true, Dialog(enable=(ftype==FluidType.WaterSteam), tab="Fluid", group="Fluid properties")); protected parameter Units.SI.MassFlowRate gamma0=1.e-4 "Pseudo-diffusion conductance use for continuous flow reversal (active if diffusion=false and continuous_flow_reversal = true)"; - parameter Integer mode=Integer(region) - 1 "IF97 region. 1:liquid - 2:steam - 4:saturation line - 0:automatic"; public Real alpha1 "Extraction coefficient for outlet 1 (<=1)"; Units.SI.AbsolutePressure P(start=10e5) "Fluid pressure"; Units.SI.SpecificEnthalpy h(start=10e5) "Fluid specific enthalpy"; Units.SI.Temperature T "Fluid temperature"; - FluidType fluids[4] "Fluids mixing in volume"; - ThermoSysPro.Units.SI.MassFraction Xco2 "CO2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xh2o "H20 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xo2 "O2 mass fraction"; - ThermoSysPro.Units.SI.MassFraction Xso2 "SO2 mass fraction"; + Medium.MassFraction X[Medium.nXi](start=Medium.X_default[1:Medium.nXi]) "Mass fractions"; Units.SI.Power Je "Thermal power diffusion from inlet e"; Units.SI.Power Js1 "Thermal power diffusion from outlet s1"; Units.SI.Power Js2 "Thermal power diffusion from outlet s2"; @@ -39,11 +29,11 @@ public Real rs2 "Value of r(Q/gamma) for outlet s2"; public - ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce annotation (Placement( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidInlet Ce(redeclare package Medium = Medium) annotation (Placement( transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs1 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs1(redeclare package Medium = Medium) annotation ( Placement(transformation(extent={{30,90},{50,110}}, rotation=0))); - ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs2 annotation ( + ThermoSysPro.Fluid.Interfaces.Connectors.FluidOutlet Cs2(redeclare package Medium = Medium) annotation ( Placement(transformation(extent={{30,-110},{50,-90}}, rotation=0))); InstrumentationAndControl.Connectors.InputReal Ialpha1 "Extraction coefficient for outlet 1 (<=1)" @@ -52,15 +42,6 @@ public annotation (Placement(transformation(extent={{60,50},{80,70}}, rotation=0))); equation - /* Check that incoming fluids are compatible with fluid in volume */ - fluids[1] = ftype; - fluids[2] = Ce.ftype; - fluids[3] = Cs1.ftype; - fluids[4] = Cs2.ftype; - - assert(ThermoSysPro.Fluid.Interfaces.PropertyInterfaces.isCompatible(fluids), - "Splitter2: fluids mixing in volume are not compatible with each other"); - /* Unconnected connectors */ if (cardinality(Ialpha1) == 0) then Ialpha1.signal = 0.5; @@ -81,23 +62,15 @@ equation Cs2.h_vol_1 = h; /* Fluid composition balance equations */ - 0 = Ce.Xco2*Ce.Q - Cs1.Xco2*Cs1.Q - Cs2.Xco2*Cs2.Q; - 0 = Ce.Xh2o*Ce.Q - Cs1.Xh2o*Cs1.Q - Cs2.Xh2o*Cs2.Q; - 0 = Ce.Xo2*Ce.Q - Cs1.Xo2*Cs1.Q - Cs2.Xo2*Cs2.Q; - 0 = Ce.Xso2*Ce.Q - Cs1.Xso2*Cs1.Q - Cs2.Xso2*Cs2.Q; + fill(0,Medium.nXi) = Ce.Xi*Ce.Q - Cs1.Xi*Cs1.Q - Cs2.Xi*Cs2.Q; - Cs1.ftype = ftype; - Cs2.ftype = ftype; + Cs1.Xi = X; + Cs2.Xi = X; - Cs1.Xco2 = Xco2; - Cs1.Xh2o = Xh2o; - Cs1.Xo2 = Xo2; - Cs1.Xso2 = Xso2; + /* Traces composition balance equations */ + Cs1.Q*Cs1.SubC + Cs2.Q*Cs2.SubC = Ce.Q*Ce.SubC; - Cs2.Xco2 = Xco2; - Cs2.Xh2o = Xh2o; - Cs2.Xo2 = Xo2; - Cs2.Xso2 = Xso2; + Cs2.SubC = Cs1.SubC; /* Mass flow at outlet 1 */ if (cardinality(Ialpha1) <> 0) then @@ -154,7 +127,7 @@ equation Cs2.diff_on_1 = diffusion; /* Fluid thermodynamic properties */ - T = ThermoSysPro.Properties.Fluid.Temperature_Ph(P, h, fluid, mode, Xco2, Xh2o, Xo2, Xso2); + T = Medium.temperature_phX(p=P, h=h, X=X); annotation ( Diagram(coordinateSystem( @@ -203,6 +176,5 @@ equation