diff --git a/docs/ci_updates/index.html b/docs/ci_updates/index.html index 2dd90469cd..4cbe6d1451 100644 --- a/docs/ci_updates/index.html +++ b/docs/ci_updates/index.html @@ -8,6 +8,7 @@
+
  • ci/result/naming_violations.txt


  • ci/result/syntax/HTML_error_log.txt


  • ci/result/syntax/HTML_correct_log.txt

  • diff --git a/docs/ci_updates/naming_violations.txt b/docs/ci_updates/naming_violations.txt index 666039fcbb..4f86a1e116 100644 --- a/docs/ci_updates/naming_violations.txt +++ b/docs/ci_updates/naming_violations.txt @@ -1,60 +1,6 @@ -AixLib/ThermalZones/HighOrder/Components/Walls/BaseClasses/ConvNLayerClearanceStar.mo -1: Name 'l' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: l. Affected line: parameter Modelica.Units.SI.Length l "Length" annotation (Dialog(group="Geometry")); - -2: Name 'clearance' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: clearance. Affected line: parameter Modelica.Units.SI.Area clearance=0 "Area of clearance" annotation (Dialog(group="Geometry")); - -3: Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: replaceable parameter AixLib.DataBase.Walls.WallBaseDataDefinition wallType constrainedby AixLib.DataBase.Walls.WallBaseDataDefinition "Type of wall" annotation(Dialog(group = "Structure of wall layers"), choicesAllMatching = true, Placement(transformation(extent={{48,-98},{68,-78}}))); - -4: Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodRadiativeHeatTransfer radCalcMethod= AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodRadiativeHeatTransfer.No_approx "Calculation method for radiation heat transfer" annotation ( Evaluate=true, Dialog(group = "Radiation", compact=true)); - -5: Name 'T_ref' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: T_ref. Affected line: parameter Modelica.Units.SI.Temperature T_ref= Modelica.Units.Conversions.from_degC(16) "Reference temperature for optional linearization" annotation (Dialog(group="Radiation", enable=radCalcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodRadiativeHeatTransfer.Linear_constant_T_ref)); - -6: Name 'T0' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: T0. Affected line: parameter Modelica.Units.SI.Temperature T0= Modelica.Units.Conversions.from_degC(16) "Initial temperature" annotation (Dialog(group="Thermal")); - -7: Missing documentation. Affected line: Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a annotation ( Placement(transformation(extent={{-110,-10},{-90,10}}), iconTransformation(extent={{-110,-10},{-90,10}}))); - -8: Missing documentation. Affected line: Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b annotation ( Placement(transformation(extent={{90,-10},{110,10}}), iconTransformation( extent={{90,-10},{110,10}}))); - -9: Missing documentation, Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: AixLib.ThermalZones.HighOrder.Components.Walls.BaseClasses.SimpleNLayer simpleNLayer( final A=A, each final T_start=fill(T0, n), final wallRec=wallType, final energyDynamics=energyDynamics) annotation (Placement(transformation(extent={{-14,-12},{12,12}}))); - -10: Missing documentation, Name 'port_b1' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: port_b. Affected line: Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b1 annotation ( Placement(transformation(extent={{-10,88},{10,108}}), iconTransformation( extent={{-12,88},{8,108}}))); - -11: Missing documentation. Affected line: protected parameter Modelica.Units.SI.Area A=h*l - clearance; - - -AixLib/ThermalZones/HighOrder/Rooms/BaseClasses/PartialRoomFourWalls.mo -1: Name 'room_height' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: room_height. Affected line: parameter Modelica.Units.SI.Height room_height=2.7 "height" annotation (Dialog(group="Dimensions", descriptionLabel=true)); - -2: Name 'room_width' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: room_width. Affected line: parameter Modelica.Units.SI.Length room_width=8 "width" annotation (Dialog(group="Dimensions", descriptionLabel=true)); - -3: Name 'Win_Area' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: Win_, Area. Affected line: parameter Modelica.Units.SI.Area Win_Area=12 "Window area " annotation ( Dialog( group="Windows", descriptionLabel=true)); - -4: Name 'use_shortWaveRadIn' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: use_short, Wave, In. Affected line: parameter Boolean use_shortWaveRadIn=true "Use bus connector for incoming shortwave radiation" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation")); - -5: Name 'use_shortWaveRadOut' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: use_short, Wave. Affected line: parameter Boolean use_shortWaveRadOut=true "Use bus connector for outgoing shortwave radiation" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable=use_shortWaveRadIn)); - -6: Name 'use_dynamicShortWaveRadMethod' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: use_dynamic, Short, Wave, Method. Affected line: parameter Boolean use_dynamicShortWaveRadMethod=false "True = dynamic as holistic approach, false = static approach to obtain the same values as provided in tables of the ASHREA" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable= use_shortWaveRadIn)); - -7: Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: parameter Components.Types.selectorCoefficients absInnerWallSurf=AixLib.ThermalZones.HighOrder.Components.Types.selectorCoefficients.abs06 "Coefficients for interior solar absorptance of wall surface abs={0.6, 0.9, 0.1}" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable= use_shortWaveRadIn and not use_dynamicShortWaveRadMethod));replaceable parameter ThermalZones.HighOrder.Components.Types.CoeffTableEastWestWindow coeffTableSolDistrFractions constrainedby AixLib.ThermalZones.HighOrder.Components.Types.PartialCoeffTable(final abs=absInnerWallSurf) "Record holding the values to reproduce the tables" annotation (choicesAllMatching=true, Dialog(tab="Inner walls", group="Shortwave Radiation", enable= use_shortWaveRadIn and not use_dynamicShortWaveRadMethod), Placement(transformation(extent={{78,78},{98,98}})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallSouth( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, wall_length=room_width, solar_absorptance=solar_absorptance_OW, calcMethodOut=calcMethodOut, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, wall_height=room_height, surfaceType=AixLib.DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster()) annotation (Placement(transformation( extent={{-5,-35},{5,35}}, rotation=90, origin={18,-68})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallWest( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_height, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-5,-27},{5,27}}, rotation=0, origin={-83,13})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallEast( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_height, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-5,-27},{5,27}}, rotation=180, origin={69,13})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallNorth( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_height=room_height, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, wall_length=room_width, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{5.00001,-30},{-5.00001,30}}, rotation=90, origin={18,69})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall ceiling( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_width, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-2,-12},{2,12}}, rotation=270, origin={-42,80})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall floor( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, outside=false, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_width, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, solar_absorptance=solar_absorptance_OW, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-2.00031,-12},{2.00003,12}}, rotation=90, origin={-42,-68})));Utilities.Interfaces.SolarRad_in SolarRadiationPort[5] "N,E,S,W,Hor" annotation (Placement(transformation(extent={{-120,46},{-100,66}}), iconTransformation(extent={{-120,46},{-100,66}}))); - -8: Missing documentation, Name 'WindSpeedPort' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: Wind, Speed, Port. Affected line: Modelica.Blocks.Interfaces.RealInput WindSpeedPort annotation (Placement(transformation(extent={{-116,28},{-100,44}}), iconTransformation(extent={{-120,-16},{-100,4}}))); - -9: Missing documentation, Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: Utilities.HeatTransfer.SolarRadInRoom solarRadInRoom( final use_dynamicMethod=use_dynamicShortWaveRadMethod, final nWalls=4, final nWin=nWin, final nFloors=1, final nCei=1, final floor_length=room_length, final floor_width=room_height, final staticCoeffTable=coeffTableSolDistrFractions) if use_shortWaveRadIn and nWin > 0 annotation (Placement(transformation(extent={{-50,26},{-30,46}}))); - -10: Documentation too short, Name 'transShoWaveRadWin' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: trans, Wave. Affected line: Modelica.Blocks.Interfaces.RealOutput transShoWaveRadWin(final quantity="Power", final unit="W") if use_shortWaveRadOut annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={60,-110}))); - -11: Missing documentation, Name 'multiSum' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: multi. Affected line: Modelica.Blocks.Math.MultiSum multiSum(nu=nWin) if use_shortWaveRadOut annotation (Placement(transformation( extent={{2,-2},{-2,2}}, rotation=90, origin={60,-96}))); - -12: Missing documentation, Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: protected Utilities.Interfaces.ShortRadSurf shortRadSurf[nWin] if use_shortWaveRadOut annotation (Placement(transformation(extent={{58,-92}, {62,-88}}), iconTransformation(extent={{58,-92}, {62,-88}}))); - -13: Missing documentation, Name 'usesWindow' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: uses, Window. Affected line: protected parameter Boolean usesWindow[4] = {wallEast.withWindow, wallSouth.withWindow, wallWest.withWindow, wallNorth.withWindow}; - -14: Missing documentation, Name 'usesWindowInt' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: uses, Window. Affected line: parameter Integer usesWindowInt[4] = {if usesWindow[i] then 1 else 0 for i in 1:size(usesWindow, 1)}; - - AixLib/ThermalZones/HighOrder/Validation/EmpiricalValidation/Warehouse.mo 1: Name 'MediumAir' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: Medium. Affected line: replaceable package MediumAir = AixLib.Media.Air "Medium within the room";Rooms.RoomEmpiricalValidation.RoomWarehouse room( energyDynamicsWalls=Modelica.Fluid.Types.Dynamics.FixedInitial, redeclare package Medium = MediumAir, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T0_air=283.15, TWalls_start=283.15, redeclare model WindowModel = Components.WindowsDoors.WindowSimple, redeclare DataBase.WindowsDoors.Simple.WindowSimple_Warehouse Type_Win, redeclare model CorrSolarGainWin = Components.WindowsDoors.BaseClasses.CorrectionSolarGain.CorGSimple) annotation (Placement(transformation(extent={{2,-30},{68,42}})));BoundaryConditions.WeatherData.Old.WeatherTRY.Weather weather( Latitude=52.37, Longitude=8.44, tableName="weather", fileName=ModelicaServices.ExternalReferences.loadResource("modelica://AixLib/Resources/Data/ThermalZones/HighOrder/Validation/EmpiricalValidation/TRY2010_03_Warehouse.txt"), Wind_dir=false, Wind_speed=true, Air_temp=true) annotation (Placement(transformation(extent={{-90,78},{-60,98}}))); @@ -120,4 +66,58 @@ AixLib/ThermalZones/HighOrder/Validation/EmpiricalValidation/Warehouse.mo 32: Missing documentation, Name 'meanMeasuredTemp' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: mean, Measured, Temp. Affected line: Modelica.Blocks.Interfaces.RealOutput meanMeasuredTemp annotation (Placement(transformation(extent={{148,2},{168,22}}))); -33: Missing documentation. Affected line: Modelica.Blocks.Math.Gain gain(k=1/3) annotation (Placement(transformation(extent={{122,6},{134,18}}))); \ No newline at end of file +33: Missing documentation. Affected line: Modelica.Blocks.Math.Gain gain(k=1/3) annotation (Placement(transformation(extent={{122,6},{134,18}}))); + + +AixLib/ThermalZones/HighOrder/Components/Walls/BaseClasses/ConvNLayerClearanceStar.mo +1: Name 'l' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: l. Affected line: parameter Modelica.Units.SI.Length l "Length" annotation (Dialog(group="Geometry")); + +2: Name 'clearance' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: clearance. Affected line: parameter Modelica.Units.SI.Area clearance=0 "Area of clearance" annotation (Dialog(group="Geometry")); + +3: Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: replaceable parameter AixLib.DataBase.Walls.WallBaseDataDefinition wallType constrainedby AixLib.DataBase.Walls.WallBaseDataDefinition "Type of wall" annotation(Dialog(group = "Structure of wall layers"), choicesAllMatching = true, Placement(transformation(extent={{48,-98},{68,-78}}))); + +4: Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodRadiativeHeatTransfer radCalcMethod= AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodRadiativeHeatTransfer.No_approx "Calculation method for radiation heat transfer" annotation ( Evaluate=true, Dialog(group = "Radiation", compact=true)); + +5: Name 'T_ref' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: T_ref. Affected line: parameter Modelica.Units.SI.Temperature T_ref= Modelica.Units.Conversions.from_degC(16) "Reference temperature for optional linearization" annotation (Dialog(group="Radiation", enable=radCalcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodRadiativeHeatTransfer.Linear_constant_T_ref)); + +6: Name 'T0' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: T0. Affected line: parameter Modelica.Units.SI.Temperature T0= Modelica.Units.Conversions.from_degC(16) "Initial temperature" annotation (Dialog(group="Thermal")); + +7: Missing documentation. Affected line: Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a annotation ( Placement(transformation(extent={{-110,-10},{-90,10}}), iconTransformation(extent={{-110,-10},{-90,10}}))); + +8: Missing documentation. Affected line: Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b annotation ( Placement(transformation(extent={{90,-10},{110,10}}), iconTransformation( extent={{90,-10},{110,10}}))); + +9: Missing documentation, Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: AixLib.ThermalZones.HighOrder.Components.Walls.BaseClasses.SimpleNLayer simpleNLayer( final A=A, each final T_start=fill(T0, n), final wallRec=wallType, final energyDynamics=energyDynamics) annotation (Placement(transformation(extent={{-14,-12},{12,12}}))); + +10: Missing documentation, Name 'port_b1' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: port_b. Affected line: Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b1 annotation ( Placement(transformation(extent={{-10,88},{10,108}}), iconTransformation( extent={{-12,88},{8,108}}))); + +11: Missing documentation. Affected line: protected parameter Modelica.Units.SI.Area A=h*l - clearance; + + +AixLib/ThermalZones/HighOrder/Rooms/BaseClasses/PartialRoomFourWalls.mo +1: Name 'room_height' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: room_height. Affected line: parameter Modelica.Units.SI.Height room_height=2.7 "height" annotation (Dialog(group="Dimensions", descriptionLabel=true)); + +2: Name 'room_width' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: room_width. Affected line: parameter Modelica.Units.SI.Length room_width=8 "width" annotation (Dialog(group="Dimensions", descriptionLabel=true)); + +3: Name 'Win_Area' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: Win_, Area. Affected line: parameter Modelica.Units.SI.Area Win_Area=12 "Window area " annotation ( Dialog( group="Windows", descriptionLabel=true)); + +4: Name 'use_shortWaveRadIn' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: use_short, Wave, In. Affected line: parameter Boolean use_shortWaveRadIn=true "Use bus connector for incoming shortwave radiation" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation")); + +5: Name 'use_shortWaveRadOut' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: use_short, Wave. Affected line: parameter Boolean use_shortWaveRadOut=true "Use bus connector for outgoing shortwave radiation" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable=use_shortWaveRadIn)); + +6: Name 'use_dynamicShortWaveRadMethod' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: use_dynamic, Short, Wave, Method. Affected line: parameter Boolean use_dynamicShortWaveRadMethod=false "True = dynamic as holistic approach, false = static approach to obtain the same values as provided in tables of the ASHREA" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable= use_shortWaveRadIn)); + +7: Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: parameter Components.Types.selectorCoefficients absInnerWallSurf=AixLib.ThermalZones.HighOrder.Components.Types.selectorCoefficients.abs06 "Coefficients for interior solar absorptance of wall surface abs={0.6, 0.9, 0.1}" annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable= use_shortWaveRadIn and not use_dynamicShortWaveRadMethod));replaceable parameter ThermalZones.HighOrder.Components.Types.CoeffTableEastWestWindow coeffTableSolDistrFractions constrainedby AixLib.ThermalZones.HighOrder.Components.Types.PartialCoeffTable(final abs=absInnerWallSurf) "Record holding the values to reproduce the tables" annotation (choicesAllMatching=true, Dialog(tab="Inner walls", group="Shortwave Radiation", enable= use_shortWaveRadIn and not use_dynamicShortWaveRadMethod), Placement(transformation(extent={{78,78},{98,98}})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallSouth( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, wall_length=room_width, solar_absorptance=solar_absorptance_OW, calcMethodOut=calcMethodOut, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, wall_height=room_height, surfaceType=AixLib.DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster()) annotation (Placement(transformation( extent={{-5,-35},{5,35}}, rotation=90, origin={18,-68})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallWest( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_height, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-5,-27},{5,27}}, rotation=0, origin={-83,13})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallEast( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_height, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-5,-27},{5,27}}, rotation=180, origin={69,13})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall wallNorth( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_height=room_height, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, wall_length=room_width, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{5.00001,-30},{-5.00001,30}}, rotation=90, origin={18,69})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall ceiling( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_width, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, solar_absorptance=solar_absorptance_OW, surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster(), calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-2,-12},{2,12}}, rotation=270, origin={-42,80})));AixLib.ThermalZones.HighOrder.Components.Walls.Wall floor( use_shortWaveRadIn=use_shortWaveRadIn, use_shortWaveRadOut=use_shortWaveRadOut, outside=false, energyDynamics=energyDynamicsWalls, radLongCalcMethod=radLongCalcMethod, T_ref=T_ref, calcMethodIn=calcMethodIn, wall_length=room_length, wall_height=room_width, WindowType=Type_Win, redeclare model WindowModel = WindowModel, redeclare model CorrSolarGainWin = CorrSolarGainWin, T0=TWalls_start, solar_absorptance=solar_absorptance_OW, withSunblind=use_sunblind, Blinding=1 - ratioSunblind, LimitSolIrr=solIrrThreshold, TOutAirLimit=TOutAirLimit, calcMethodOut=calcMethodOut) annotation (Placement(transformation( extent={{-2.00031,-12},{2.00003,12}}, rotation=90, origin={-42,-68})));Utilities.Interfaces.SolarRad_in SolarRadiationPort[5] "N,E,S,W,Hor" annotation (Placement(transformation(extent={{-120,46},{-100,66}}), iconTransformation(extent={{-120,46},{-100,66}}))); + +8: Missing documentation, Name 'WindSpeedPort' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: Wind, Speed, Port. Affected line: Modelica.Blocks.Interfaces.RealInput WindSpeedPort annotation (Placement(transformation(extent={{-116,28},{-100,44}}), iconTransformation(extent={{-120,-16},{-100,4}}))); + +9: Missing documentation, Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: Utilities.HeatTransfer.SolarRadInRoom solarRadInRoom( final use_dynamicMethod=use_dynamicShortWaveRadMethod, final nWalls=4, final nWin=nWin, final nFloors=1, final nCei=1, final floor_length=room_length, final floor_width=room_height, final staticCoeffTable=coeffTableSolDistrFractions) if use_shortWaveRadIn and nWin > 0 annotation (Placement(transformation(extent={{-50,26},{-30,46}}))); + +10: Documentation too short, Name 'transShoWaveRadWin' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: trans, Wave. Affected line: Modelica.Blocks.Interfaces.RealOutput transShoWaveRadWin(final quantity="Power", final unit="W") if use_shortWaveRadOut annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={60,-110}))); + +11: Missing documentation, Name 'multiSum' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: multi. Affected line: Modelica.Blocks.Math.MultiSum multiSum(nu=nWin) if use_shortWaveRadOut annotation (Placement(transformation( extent={{2,-2},{-2,2}}, rotation=90, origin={60,-96}))); + +12: Missing documentation, Could not extract name from line and check correctness, is your type specification correct (full library path)?. Affected line: protected Utilities.Interfaces.ShortRadSurf shortRadSurf[nWin] if use_shortWaveRadOut annotation (Placement(transformation(extent={{58,-92}, {62,-88}}), iconTransformation(extent={{58,-92}, {62,-88}}))); + +13: Missing documentation, Name 'usesWindow' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: uses, Window. Affected line: protected parameter Boolean usesWindow[4] = {wallEast.withWindow, wallSouth.withWindow, wallWest.withWindow, wallNorth.withWindow}; + +14: Missing documentation, Name 'usesWindowInt' contains parts with more/less than 3 characters or which are not part of special cases. Affected parts: uses, Window. Affected line: parameter Integer usesWindowInt[4] = {if usesWindow[i] then 1 else 0 for i in 1:size(usesWindow, 1)}; \ No newline at end of file diff --git a/docs/ci_updates/syntax/HTML_correct_log.txt b/docs/ci_updates/syntax/HTML_correct_log.txt index 49cb551457..6864e32fef 100644 --- a/docs/ci_updates/syntax/HTML_correct_log.txt +++ b/docs/ci_updates/syntax/HTML_correct_log.txt @@ -1,9414 +1,6978 @@ ----- AixLib/ThermalZones/ReducedOrder/RC/FourElements.mo ---- +---- AixLib/Media/Air.mo ---- -------- HTML Code -------- +

    + Model with basic thermodynamic properties. +

    +

    + This model provides equation for the following thermodynamic properties: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    VariableUnitDescription
    TKtemperature
    pPaabsolute pressure
    dkg/m3density
    hJ/kgspecific enthalpy
    uJ/kgspecific internal energy
    Xi[nXi]kg/kgindependent mass fractions m_i/m
    RJ/kg.Kgas constant
    Mkg/molmolar mass
    + -

    - This model adds another element for the roof. Roofs commonly - exhibit the same excitations as exterior walls but have different coefficients - of heat transfer due to their orientation. Adding an extra element for the roof - might lead to a finer resolution of the dynamic behaviour but increases - calculation times. The roof is parameterized via the length of the RC-chain - nRoof, - the vector of capacities CRoof[nRoof], the vector of resistances - RRoof[nRoof] and remaining resistances RRoofRem. -

    -

    - The image below shows the RC-network of this model. -

    -

    - \"image\"/ -

    - --------- Corrected Code -------- - -

    - This model adds another element for the roof. Roofs commonly exhibit - the same excitations as exterior walls but have different - coefficients of heat transfer due to their orientation. Adding an - extra element for the roof might lead to a finer resolution of the - dynamic behaviour but increases calculation times. The roof is - parameterized via the length of the RC-chain nRoof, the - vector of capacities CRoof[nRoof], the vector of - resistances RRoof[nRoof] and remaining resistances - RRoofRem. -

    -

    - The image below shows the RC-network of this model. -

    -

    - \"image\" -

    - --------- Errors -------- -line 15 column 4 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/ActiveBeams/BaseClasses/Convector.mo ---- --------- HTML Code -------- - + Density is computed from pressure, temperature and composition in the thermodynamic state record applying the ideal gas law. +

    - In cooling mode, this model adds heat to the water stream. The heat added is equal to: -

    -

    - QBeam = Qrated fΔT fSA fW + This function returns the dynamic viscosity.

    +

    Implementation

    - In heating mode, the heat is removed from the water stream. + The function is based on the 5th order polynomial + of + + Modelica.Media.Air.MoistAir.dynamicViscosity. + However, for the typical range of temperatures encountered + in building applications, a linear function sufficies. + This implementation is therefore the above 5th order polynomial, + linearized around 20°C. + The relative error of this linearization is + 0.4% at -20°C, + and less then + 0.2% between -5°C and +50°C.

    --------- Corrected Code -------- -

    - In cooling mode, this model adds heat to the water stream. The heat - added is equal to: -

    -

    - QBeam = Qrated fΔT - fSA fW -

    -

    - In heating mode, the heat is removed from the water stream. -

    - - --------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Utilities/Math/Functions/biquadratic.mo ---- --------- HTML Code -------- - - This function computes + The ideal gas constant for moist air is computed from thermodynamic state assuming that all water is in the gas phase. + + Pressure is returned from the thermodynamic state record input as a simple assignment. + +

    + This function returns the isobaric expansion coefficient at constant pressure, + which is zero for this medium. + The isobaric expansion coefficient at constant pressure is +

    - y = a1 + a2 x1 - + a3 x12 - + a4 x2 + a5 x22 - + a6 x1 x2 + βp = - 1 ⁄ v   (∂ v ⁄ ∂ T)p = 0, +

    +

    + where + v is the specific volume, + T is the temperature and + p is the pressure.

    --------- Corrected Code -------- -This function computes -

    - y = a1 + a2 x1 + a3 - x12 + a4 x2 + - a5 x22 + a6 x1 - x2 -

    - - --------- Errors -------- -line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/finiteLineSource_Erfint.mo ---- --------- HTML Code -------- -

    - This function evaluates the integral of the error function, given by: + This function returns the isothermal compressibility coefficient. + The isothermal compressibility is

    -

    - \"image\" +

    + κT = -1 ⁄ v   (∂ v ⁄ ∂ p)T + = -1 ⁄ p, +

    +

    + where + v is the specific volume, + T is the temperature and + p is the pressure.

    --------- Corrected Code -------- -

    - This function evaluates the integral of the error function, given by: -

    -

    - \"image\" -

    - - --------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/ActiveBeams/UsersGuide.mo ---- --------- HTML Code -------- - -

    -This package contains models of active beams. -Active beams are devices used for heating, cooling and ventilation of spaces. -A schematic diagram of an active beam unit is given below. -

    -

    -\"image\" -

    -

    -The active beam unit consists of a primary air plenum, a mixing chamber, a heat exchanger (coil) and several nozzles. -Typically, an air-handling unit supplies primary air to the active beams. -The primary air is discharged to the mixing chamber through the nozzles. -This generates a low-pressure region which induces air from the room up through the heat exchanger, -where hot or cold water is circulating. -The conditioned induced air is then mixed with primary air, and the mixture descents back to the space. -

    -

    -This package contains two models. The model - -AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling -is for cooling only, while the model - -AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating -has two water streams, one for heating and one for cooling. -

    - -

    Model equations for cooling

    -

    -The performance of the model - -AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling -is computed based on manufacturer data -specified in the package - -AixLib.Fluid.HeatExchangers.ActiveBeams.Data. -

    -

    -For off-design conditions, the performance is adjusted using modification factors -that account for changes in water flow rate, -primary air flow rate and temperature difference. -The total heat flow rate of the active beam unit is the sum of the heat flow rate provided by the primary air supply -Qsa and the cooling heat flow rate provided by the beam convector Qc,Beam -which injects room air and mixes it with the primary air. -

    -

    -The heat flow rate -Qsa is delivered to a thermal zone -through the fluid ports, while the heat flow rate from the convector Qc,Beam -is coupled directly to the heat port. -See for example - -AixLib.Fluid.HeatExchangers.ActiveBeams.Examples.CoolingOnly -for how to connect these heat flow rates to a control volume. -

    -

    -The primary air contribution is -

    -

    - Qsa = ṁsa cp,sa (Tsa-Tz) -

    -

    -where sa is the primary air mass flow rate, -cp,sa is the air specific heat capacity, -Tsa is the primary air temperature -and Tz is the zone air temperature. -

    -

    -The heat flow rate of the beam convector Qc,Beam is determined using -the rated capacity which is modified by three separate functions as -

    -

    - Qc,Beam = Qc,nominal -fΔT ( ΔTc ⁄ ΔTc,nominal ) -fsa( ṁsa ⁄ ṁsa,nominal ) -fw( ṁc,w ), -

    -

    -the modification factors are as follows: -The modification factor fΔT(·) -describes how the capacity is adjusted to account for the temperature difference -between the zone air and the water entering the convector. -The independent variable is the ratio between the current temperature difference -ΔTc and the temperature difference used to rate beam performance ΔTc,nominal. -The temperature difference is -

    -

    - ΔTc = Tcw-Tz, -

    -

    -where Tcw is the chilled water temperature entering the convector. - -The modification factor fsa(·) adjusts the cooling capacity to account for varying primary air flow rate. -The independent variable is the ratio between the current primary air flow rate sa -and the nominal air flow rate used to rate the beam performance. - -The modification factor fw(·) adjusts the cooling capacity for changes in water flow rate through the convector. -The independent variable is the ratio between the current water flow rate w -and the nominal water flow rate used to rate the beam performance. -

    - -

    Model equations for heating

    -

    -The performance of the model - -AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating -is computed identical to the above described model that only provides cooling, -with the exception that this model contains an additional water stream that -can be used to provide heating. -

    -

    -For the heating water stream, the temperature difference ΔTh -used for the calculation of the modification factor fΔT(·) is -

    -

    -ΔTh = Thw-Tz, -

    -

    -where Thw is the hot water temperature entering the convector in heating mode -and Tz is the zone air temperature. -

    - -

    Dynamics

    -

    -The model can be configured to be steady-state or dynamic. -If configured as dynamic, then a dynamic conservation equation is applied to the water streams -for heating and for cooling. -However, because the capacity of the beam depends on its inlet temperature, and is independent of the -outlet temperature, the heat transferred -to the room at the port heaPor.Q_flow, as well as the heat added to or removed from the -water streams, will instantaneously change. -The only dynamic responses are the water outlet temperatures, which change with a first -order response, parameterized with the time constant tau. -

    - -

    Energy balance

    -

    -All heat flow rate that is added to or extracted from the room is transmitted through the heat port -heaPor. Hence, this model does not cool the supply air between the ports -air_a and air_b. Rather, it adds this heat flow rate -to the heat port heaPor. -The rationale for this implementation is that the beam transfers heat by convection directly to the room, and -by induction of room air into the supply air. As this split of heat flow rate is generally not known, -and because the amount of inducted air is also unknown, -it was decided to transfer all heat through the heat port heaPor. -This also avoids having to add an extra air flow path for the air induced from the room. -

    - --------- Corrected Code -------- -

    - This package contains models of active beams. Active beams are - devices used for heating, cooling and ventilation of spaces. A - schematic diagram of an active beam unit is given below. -

    -

    - \"image\" -

    -

    - The active beam unit consists of a primary air plenum, a mixing - chamber, a heat exchanger (coil) and several nozzles. Typically, an - air-handling unit supplies primary air to the active beams. The - primary air is discharged to the mixing chamber through the nozzles. - This generates a low-pressure region which induces air from the room - up through the heat exchanger, where hot or cold water is - circulating. The conditioned induced air is then mixed with primary - air, and the mixture descents back to the space. -

    -

    - This package contains two models. The model AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling - is for cooling only, while the model - AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating has two - water streams, one for heating and one for cooling. -

    -

    - Model equations for cooling -

    -

    - The performance of the model AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling - is computed based on manufacturer data specified in the package - AixLib.Fluid.HeatExchangers.ActiveBeams.Data. -

    -

    - For off-design conditions, the performance is adjusted using - modification factors that account for changes in water flow rate, - primary air flow rate and temperature difference. The total heat flow - rate of the active beam unit is the sum of the heat flow rate - provided by the primary air supply Qsa and the - cooling heat flow rate provided by the beam convector - Qc,Beam which injects room air and mixes it with - the primary air. -

    -

    - The heat flow rate Qsa is delivered to a thermal - zone through the fluid ports, while the heat flow rate from the - convector Qc,Beam is coupled directly to the heat - port. See for example - AixLib.Fluid.HeatExchangers.ActiveBeams.Examples.CoolingOnly for - how to connect these heat flow rates to a control volume. -

    -

    - The primary air contribution is -

    -

    - Qsa = ṁsa cp,sa - (Tsa-Tz) -

    -

    - where sa is the primary air mass flow rate, - cp,sa is the air specific heat capacity, - Tsa is the primary air temperature and - Tz is the zone air temperature. -

    -

    - The heat flow rate of the beam convector Qc,Beam is - determined using the rated capacity which is modified by three - separate functions as -

    -

    - Qc,Beam = Qc,nominal fΔT ( - ΔTc ⁄ ΔTc,nominal ) fsa( - ṁsa ⁄ ṁsa,nominal ) fw( - ṁc,w ), -

    -

    - the modification factors are as follows: The modification factor - fΔT(·) describes how the capacity is adjusted to - account for the temperature difference between the zone air and the - water entering the convector. The independent variable is the ratio - between the current temperature difference ΔTc and - the temperature difference used to rate beam performance - ΔTc,nominal. The temperature difference is -

    -

    - ΔTc = Tcw-Tz, -

    -

    - where Tcw is the chilled water temperature entering - the convector. The modification factor fsa(·) - adjusts the cooling capacity to account for varying primary air flow - rate. The independent variable is the ratio between the current - primary air flow rate sa and the nominal air flow - rate used to rate the beam performance. The modification factor - fw(·) adjusts the cooling capacity for changes in - water flow rate through the convector. The independent variable is - the ratio between the current water flow rate w - and the nominal water flow rate used to rate the beam performance. -

    -

    - Model equations for heating -

    -

    - The performance of the model - AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating is - computed identical to the above described model that only provides - cooling, with the exception that this model contains an additional - water stream that can be used to provide heating. -

    -

    - For the heating water stream, the temperature difference - ΔTh used for the calculation of the - modification factor fΔT(·) is -

    -

    - ΔTh = Thw-Tz, -

    -

    - where Thw is the hot water temperature entering the - convector in heating mode and Tz is the zone air - temperature. -

    -

    - Dynamics -

    -

    - The model can be configured to be steady-state or dynamic. If - configured as dynamic, then a dynamic conservation equation is - applied to the water streams for heating and for cooling. However, - because the capacity of the beam depends on its inlet temperature, - and is independent of the outlet temperature, the heat transferred to - the room at the port heaPor.Q_flow, as well as the heat - added to or removed from the water streams, will instantaneously - change. The only dynamic responses are the water outlet temperatures, - which change with a first order response, parameterized with the time - constant tau. -

    -

    - Energy balance -

    -

    - All heat flow rate that is added to or extracted from the room is - transmitted through the heat port heaPor. Hence, this - model does not cool the supply air between the ports - air_a and air_b. Rather, it adds this heat - flow rate to the heat port heaPor. The rationale for - this implementation is that the beam transfers heat by convection - directly to the room, and by induction of room air into the supply - air. As this split of heat flow rate is generally not known, and - because the amount of inducted air is also unknown, it was decided to - transfer all heat through the heat port heaPor. This - also avoids having to add an extra air flow path for the air induced - from the room. -

    - --------- Errors -------- -line 7 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 59 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 72 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 87 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 115 column 1 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Media/Specialized/Air/PerfectGas.mo ---- --------- HTML Code -------- - - Function to set the state for given pressure, enthalpy and species concentration. - - The thermodynamic state record - is computed from density d, temperature T and composition X. - - Saturation pressure of water above the triple point temperature is computed from temperature. It's range of validity is between - 273.16 and 373.16 K. Outside these limits a less accurate result is returned. - - Derivative function of - - AixLib.Media.Specialized.Air.PerfectGas.saturationPressureLiquid - - Pressure is returned from the thermodynamic state record input as a simple assignment. - - Temperature is returned from the thermodynamic state record input as a simple assignment. - - Density is computed from pressure, temperature and composition in the thermodynamic state record applying the ideal gas law. - - Specific entropy is calculated from the thermodynamic state record, assuming ideal gas behavior and including entropy of mixing. Liquid or solid water is not taken into account, the entire water content X[1] is assumed to be in the vapor state (relative humidity below 1.0). - - Temperature as a function of specific enthalpy and species concentration. - The pressure is input for compatibility with the medium models, but the temperature - is independent of the pressure. -

    - This data record contains the coefficients for perfect gases. + This function computes the specific entropy.

    - - -

    - This package contains a thermally perfect model of moist air. + The specific entropy of the mixture is obtained from

    -

    - A medium is called thermally perfect if +

    + s = ss + sm,

    -

    - In addition, this medium model is calorically perfect, i.e., the - specific heat capacities at constant pressure cp - and constant volume cv are both constant (Bower 1998). + where + ss is the entropy change due to the state change + (relative to the reference temperature) and + sm is the entropy change due to mixing + of the dry air and water vapor.

    - This medium uses the ideal gas law + The entropy change due to change in state is obtained from

    - ρ = p ⁄(R T), + ss = cv ln(T/T0) + R ln(v/v0)
    + = cv ln(T/T0) + R ln(ρ0/ρ) +

    +

    If we assume ρ = p0/(R T), + and because cp = cv + R, + we can write +

    +

    + ss = cv ln(T/T0) + R ln(T/T0)
    + =cp ln(T/T0).

    - where - ρ is the density, - p is the pressure, - R is the gas constant and - T is the temperature. + Next, the entropy of mixing is obtained from a reversible isothermal + expansion process. Hence, +

    +

    + sm = -R ∑i( Xi ⁄ Mi + ln(Yi p/p0)),

    - The enthalpy is computed using the convention that h=0 - if T=0 °C and no water vapor is present. + where R is the gas constant, + X is the mass fraction, + M is the molar mass, and + Y is the mole fraction.

    - Note that for typical building simulations, the media - AixLib.Media.Air - should be used as it leads generally to faster simulation. + To obtain the state for a given pressure, entropy and mass fraction, use + + AixLib.Media.Air.setState_psX.

    -

    References

    +

    Limitations

    - Bower, William B. A primer in fluid mechanics: Dynamics of flows in one - space dimension. CRC Press. 1998. + This function is only valid for a relative humidity below 100%.

    + +

    + This function returns the partial derivative of density + with respect to pressure at constant temperature. +

    + + + +

    + This function computes the derivative of density with respect to temperature + at constant pressure. +

    + + + +

    + This function returns the partial derivative of density + with respect to mass fraction. + This value is zero because in this medium, density is proportional + to pressure, but independent of the species concentration. +

    + + + +

    + The thermodynamic state record + is computed from density d, temperature T and composition X. +

    + + The + thermodynamic state record is computed from pressure p, specific enthalpy h and composition X. + + The + thermodynamic state record is computed from pressure p, temperature T and composition X. + +

    + This function returns the thermodynamic state based on pressure, + specific entropy and mass fraction. +

    +

    + The state is computed by symbolically solving + + AixLib.Media.Air.specificEntropy + for temperature. +

    + + + + Specific enthalpy as a function of temperature and species concentration. + The pressure is input for compatibility with the medium models, but the specific enthalpy + is independent of the pressure. + + + +

    + This function computes the specific enthalpy for + an isentropic state change from the temperature + that corresponds to the state refState + to reference_T. +

    + + + + Temperature is returned from the thermodynamic state record input as a simple assignment. + +

    + This function returns the molar mass. +

    + + --------- Corrected Code -------- -Function to set the state for given pressure, enthalpy and species -concentration. -The thermodynamic state record is computed from density d, temperature -T and composition X. -Saturation pressure of water above the triple point temperature is -computed from temperature. It's range of validity is between 273.16 and -373.16 K. Outside these limits a less accurate result is returned. -Derivative function of -AixLib.Media.Specialized.Air.PerfectGas.saturationPressureLiquid -Pressure is returned from the thermodynamic state record input as a -simple assignment. -Temperature is returned from the thermodynamic state record input as a -simple assignment. -Density is computed from pressure, temperature and composition in the -thermodynamic state record applying the ideal gas law. -Specific entropy is calculated from the thermodynamic state record, -assuming ideal gas behavior and including entropy of mixing. Liquid or -solid water is not taken into account, the entire water content X[1] is -assumed to be in the vapor state (relative humidity below 1.0). -Temperature as a function of specific enthalpy and species -concentration. The pressure is input for compatibility with the medium -models, but the temperature is independent of the pressure. -

    - This data record contains the coefficients for perfect gases. -

    - -

    - This package contains a thermally perfect model of moist air. -

    -

    - A medium is called thermally perfect if -

    - -

    - In addition, this medium model is calorically perfect, i.e., - the specific heat capacities at constant pressure - cp and constant volume cv are - both constant (Bower 1998). -

    -

    - This medium uses the ideal gas law -

    -

    - ρ = p ⁄(R T), -

    -

    - where ρ is the density, p is the pressure, R is - the gas constant and T is the temperature. -

    -

    - The enthalpy is computed using the convention that h=0 if - T=0 °C and no water vapor is present. -

    -

    - Note that for typical building simulations, the media AixLib.Media.Air should be used as - it leads generally to faster simulation. -

    -

    - References -

    -

    - Bower, William B. A primer in fluid mechanics: Dynamics of flows - in one space dimension. CRC Press. 1998. -

    - - --------- Errors -------- -line 25 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/BoundaryConditions/UsersGuide.mo ---- --------- HTML Code -------- - -

    This package contains models to read or compute boundary conditions, such as weather data, solar irradition and sky temperatures. -The calculations follow the description in Wetter (2004), Appendix A.4.2.

    -

    Accessing weather data

    -

    -The model - -AixLib.BoundaryConditions.WeatherData.ReaderTMY3 -can read TMY3 weather data for different locations. -The documentation of that model explains how to add -weather data for locations that are not distributed with the -AixLib library. -

    -

    -To access these weather data from the graphical model editor, -proceed as follows: -

    -
      -
    1. -

      -Create an instance of - -AixLib.BoundaryConditions.WeatherData.ReaderTMY3. -

      -
    2. -
    3. -

      -Create an instance of - -AixLib.BoundaryConditions.WeatherData.Bus. -

      -
    4. -
    5. -

      -Draw a connection between these two instances. -

      -
    6. -
    7. -

      -Finally, to send weather data to an input connector of a model, -connect the input connector of that model with the instance of - -AixLib.BoundaryConditions.WeatherData.Bus. -Some models connect to the whole weather data bus, such as - -AixLib.BoundaryConditions.SolarGeometry.Examples.IncidenceAngle, -in which case the connection will directly be drawn. -Other models require only an individual signal from the weather data bus, -such as - -AixLib.BoundaryConditions.SkyTemperature.Examples.BlackBody. -In this situation, Modelica modeling environments typically show a window that allows you to -select what data from this weather data bus you want to connect -with your model. -

      -
    8. -
    -

    Conventions for surface azimuth and tilt

    -

    To compute the solar irradiation, parameters such as the surface azimuth and the surface tilt are defined as shown in the following three figures.

    -

    \"image\"

    -

    \"image\"

    -

    \"image\"

    -

    -For the surface azimuth and tilt, the enumerations - -AixLib.Types.Azimuth -and - -AixLib.Types.Tilt -can be used. -

    -

    -Note that a ceiling has a tilt of 0 - -if they are facing straight upwards. -This is correct because -the solar irradiation on a ceiling construction is on the other-side surface, -which faces upwards toward the sky. Hence, a construction is considered -a ceiling from the view point of a person standing inside a room. -

    - -

    References

    - - --------- Corrected Code -------- -

    - This package contains models to read or compute boundary conditions, - such as weather data, solar irradition and sky temperatures. The - calculations follow the description in Wetter (2004), Appendix A.4.2. -

    -

    - Accessing weather data -

    -

    - The model AixLib.BoundaryConditions.WeatherData.ReaderTMY3 - can read TMY3 weather data for different locations. The documentation - of that model explains how to add weather data for locations that are - not distributed with the AixLib library. -

    -

    - To access these weather data from the graphical model editor, proceed - as follows: -

    -
      -
    1. -

      - Create an instance of AixLib.BoundaryConditions.WeatherData.ReaderTMY3. -

      -
    2. -
    3. -

      - Create an instance of AixLib.BoundaryConditions.WeatherData.Bus. -

      -
    4. -
    5. -

      - Draw a connection between these two instances. -

      -
    6. -
    7. -

      - Finally, to send weather data to an input connector of a model, - connect the input connector of that model with the instance of - AixLib.BoundaryConditions.WeatherData.Bus. - Some models connect to the whole weather data bus, such as - - AixLib.BoundaryConditions.SolarGeometry.Examples.IncidenceAngle, - in which case the connection will directly be drawn. Other models - require only an individual signal from the weather data bus, such - as - AixLib.BoundaryConditions.SkyTemperature.Examples.BlackBody. - In this situation, Modelica modeling environments typically show - a window that allows you to select what data from this weather - data bus you want to connect with your model. -

      -
    8. -
    -

    - Conventions for surface azimuth and tilt -

    -

    - To compute the solar irradiation, parameters such as the surface - azimuth and the surface tilt are defined as shown in the following - three figures. -

    -

    - \"image\" -

    -

    - \"image\" -

    -

    - \"image\" -

    -

    - For the surface azimuth and tilt, the enumerations AixLib.Types.Azimuth and - AixLib.Types.Tilt can be - used. -

    -

    - Note that a ceiling has a tilt of 0 - if they are facing straight upwards. This is correct because the - solar irradiation on a ceiling construction is on the other-side - surface, which faces upwards toward the sky. Hence, a construction is - considered a ceiling from the view point of a person standing inside - a room. -

    -

    - References -

    - - --------- Errors -------- -line 60 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 61 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 62 column 1 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/BaseClasses/WetCoilWetRegime.mo ---- --------- HTML Code -------- - + Temperature as a function of specific enthalpy and species concentration. + The pressure is input for compatibility with the medium models, but the temperature + is independent of the pressure. +

    - This model implements the calculation for a 100% wet coil. -

    -

    - The equations from Braun (1988) and Mitchell and Braun (2012a and b), - which are essentially the extension of the ε-NTU approach to - simultaneous sensible and latent heat transfer, are utilized. -

    -

    - The mathematical equations are analogous to that of the sensible heat exchanger. - However, the key distinction is that the heat transfer is driven by an enthalpy difference - not by an temperature difference. This change in the driving potential results in re-defining - capacitances and heat transfer coefficients accordingly. + This data record contains the coefficients for perfect gases.

    + +

    - The total heat transfer rate is expressed as -

    -

    - Qtot=ε* C*min - (hair,in-hsat(Twat,in)), + This medium package models moist air using a gas law in which pressure and temperature + are independent, which often leads to significantly faster and more robust computations. + The specific heat capacities at constant pressure and at constant volume are constant. + The air is assumed to be not saturated.

    - where ε*=f(Cr*,NTU*) and f is the same ε-NTU relationships - (depending on the heat exchanger configuration) for the sensible heat exchanger. + This medium uses the gas law

    -

    - hair,in and hsat(Twat,in) are - the specific enthalpies of the incoming moist air and saturated moist air - at the water inlet temperature. +

    + ρ/ρstp = p/pstp,

    - The capacitances of water and air streams are defined as + where + pstd and ρstp are constant reference + temperature and density, rathern than the ideal gas law

    -

    C*air=mair and - C*wat=mwatcp,wat/csat, +

    + ρ = p ⁄(R T),

    - where csat is an specific heat capacity, which indicates the sensitivity - of the enthalpy of the staturated moist air w.r.t. the temperature, and is defined - here as csat=(hsat(Twat,out)-hsat(Twat,in)) - /(Twat,out-Twat,in). -

    -

    - The capacitance ratio and minimum capacitance are naturally defined as -

    -

    Cr*=min(C*air,C*wat)/max(C*air,C*wat) - and C*min=min(C*air,C*wat). -

    -


    - The number of transfer unit for the wet-coil is defined as NTU*=UA*/C*min, where -

    -

    - UA*=1/(1/(UAair/cp,air)+1/(UAwat/csat). + where R is the gas constant and T is the temperature.

    - -

    References

    - Braun, James E. 1988. - "Methodologies for the Design and Control of Central Cooling Plants". - PhD Thesis. University of Wisconsin - Madison. - Available - - online. + This formulation often leads to smaller systems of nonlinear equations + because equations for pressure and temperature are decoupled. + Therefore, if air inside a control volume such as room air is heated, it + does not increase its specific volume. Consequently, merely heating or cooling + a control volume does not affect the air flow calculations in a duct network + that may be connected to that volume. + Note that multizone air exchange simulation in which buoyancy drives the + air flow is still possible as the models in + + AixLib.Airflow.Multizone compute the mass density using the function + + AixLib.Utilities.Psychrometrics.Functions.density_pTX in which density + is a function of temperature.

    - Mitchell, John W., and James E. Braun. 2012a. - Principles of heating, ventilation, and air conditioning in buildings. - Hoboken, N.J.: Wiley. + Note that models in this package implement the equation for the internal energy as

    -

    - Mitchell, John W., and James E. Braun. 2012b. - "Supplementary Material Chapter 2: Heat Exchangers for Cooling Applications". - Excerpt from Principles of heating, ventilation, and air conditioning in buildings. - Hoboken, N.J.: Wiley. - Available - - online. +

    + u = h - pstp ⁄ ρstp,

    - --------- Corrected Code -------- - -

    - This model implements the calculation for a 100% wet coil. -

    -

    - The equations from Braun (1988) and Mitchell and Braun (2012a and b), - which are essentially the extension of the ε-NTU approach to - simultaneous sensible and latent heat transfer, are utilized. -

    -

    - The mathematical equations are analogous to that of the sensible heat - exchanger. However, the key distinction is that the heat transfer is - driven by an enthalpy difference not by an temperature difference. - This change in the driving potential results in re-defining - capacitances and heat transfer coefficients accordingly. -

    -

    - The total heat transfer rate is expressed as -

    -

    - Qtot=ε* C*min - (hair,in-hsat(Twat,in)), -

    -

    - where ε*=f(Cr*,NTU*) and f is the same ε-NTU - relationships (depending on the heat exchanger configuration) for the - sensible heat exchanger. -

    -

    - hair,in and - hsat(Twat,in) are the specific - enthalpies of the incoming moist air and saturated moist air at the - water inlet temperature. -

    -

    - The capacitances of water and air streams are defined as -

    -

    - C*air=mair and - C*wat=mwatcp,wat/csat, -

    -

    - where csat is an specific heat capacity, which indicates the - sensitivity of the enthalpy of the staturated moist air w.r.t. the - temperature, and is defined here as - csat=(hsat(Twat,out)-hsat(Twat,in)) - /(Twat,out-Twat,in). -

    -

    - The capacitance ratio and minimum capacitance are naturally defined - as -

    -

    - Cr*=min(C*air,C*wat)/max(C*air,C*wat) - and C*min=min(C*air,C*wat). -

    -

    -
    - The number of transfer unit for the wet-coil is defined as - NTU*=UA*/C*min, where -

    -

    - UA*=1/(1/(UAair/cp,air)+1/(UAwat/csat). -

    -

    - References -

    -

    - Braun, James E. 1988. \"Methodologies for the Design and Control of - Central Cooling Plants\". PhD Thesis. University of Wisconsin - - Madison. Available online. -

    -

    - Mitchell, John W., and James E. Braun. 2012a. Principles of heating, - ventilation, and air conditioning in buildings. Hoboken, N.J.: Wiley. -

    -

    - Mitchell, John W., and James E. Braun. 2012b. \"Supplementary Material - Chapter 2: Heat Exchangers for Cooling Applications\". Excerpt from - Principles of heating, ventilation, and air conditioning in - buildings. Hoboken, N.J.: Wiley. Available - online. -

    - --------- Errors -------- -line 20 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 36 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 48 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 54 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/DryCoilEffectivenessNTU.mo ---- --------- HTML Code -------- -

    - Model of a coil without humidity condensation. - This model transfers heat in the amount of + where + u is the internal energy per unit mass, + h is the enthalpy per unit mass, + pstp is the static pressure and + ρstp is the mass density at standard pressure and temperature. + The reason for this implementation is that in general,

    - Q̇ = Q̇max ε
    - ε = f(NTU, Z, flowRegime), + h = u + p v,

    - where - max is the maximum heat that can be transferred, - ε is the heat transfer effectiveness, - NTU is the Number of Transfer Units, - Z is the ratio of minimum to maximum capacity flow rate and - flowRegime is the heat exchanger flow regime. - such as - parallel flow, cross flow or counter flow. + from which follows that

    -

    - The flow regimes depend on the heat exchanger configuration. All configurations - defined in - - AixLib.Fluid.Types.HeatExchangerConfiguration - are supported. +

    + u = h - p v = h - p ⁄ ρ = h - pstp ⁄ ρstd,

    - The convective heat transfer coefficients scale proportional to - (ṁ/ṁ0)n, where - is the mass flow rate, - 0 is the nominal mass flow rate, and - n=0.8 on the air-side and n=0.85 on the water side. + because p ⁄ ρ = pstp ⁄ ρstp in this medium model.

    - For a heat and moisture exchanger, use - - AixLib.Fluid.MassExchangers.ConstantEffectiveness. + The enthalpy is computed using the convention that h=0 + if T=0 °C and no water vapor is present.

    - --------- Corrected Code -------- -

    - Model of a coil without humidity condensation. This model transfers - heat in the amount of -

    -

    - Q̇ = Q̇max ε
    - ε = f(NTU, Z, flowRegime), -

    -

    - where max is the maximum heat that can be - transferred, ε is the heat transfer effectiveness, NTU - is the Number of Transfer Units, Z is the ratio of minimum to - maximum capacity flow rate and flowRegime is the heat - exchanger flow regime. such as parallel flow, cross flow or counter - flow. -

    -

    - The flow regimes depend on the heat exchanger configuration. All - configurations defined in AixLib.Fluid.Types.HeatExchangerConfiguration - are supported. -

    -

    - The convective heat transfer coefficients scale proportional to - (ṁ/ṁ0)n, where is the mass - flow rate, 0 is the nominal mass flow rate, and - n=0.8 on the air-side and n=0.85 on the water side. -

    -

    - For a heat and moisture exchanger, use AixLib.Fluid.MassExchangers.ConstantEffectiveness. -

    - - --------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/BaseClasses/PartialEffectivenessNTU.mo ---- --------- HTML Code -------- - -

    - Partial model of a heat exchanger without humidity condensation. - This model transfers heat in the amount of -

    -

    - Q = Qmax ε
    - ε = f(NTU, Z, flowRegime), -

    -

    - where - Qmax is the maximum heat that can be transferred, - ε is the heat transfer effectiveness, - NTU is the Number of Transfer Units, - Z is the ratio of minimum to maximum capacity flow rate and - flowRegime is the heat exchanger flow regime. - such as - parallel flow, cross flow or counter flow. -

    -

    - The flow regimes depend on the heat exchanger configuration. All configurations - defined in - - AixLib.Fluid.Types.HeatExchangerConfiguration - are supported. -

    -

    - Models that extend from this partial model need to provide an assignment - for UA. -

    - - -------- Corrected Code --------

    - Partial model of a heat exchanger without humidity condensation. This - model transfers heat in the amount of -

    -

    - Q = Qmax ε
    - ε = f(NTU, Z, flowRegime), -

    -

    - where Qmax is the maximum heat that can be - transferred, ε is the heat transfer effectiveness, NTU - is the Number of Transfer Units, Z is the ratio of minimum to - maximum capacity flow rate and flowRegime is the heat - exchanger flow regime. such as parallel flow, cross flow or counter - flow. -

    -

    - The flow regimes depend on the heat exchanger configuration. All - configurations defined in AixLib.Fluid.Types.HeatExchangerConfiguration - are supported. + Model with basic thermodynamic properties.

    - Models that extend from this partial model need to provide an - assignment for UA. -

    - - --------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Movers/BaseClasses/Characteristics/power.mo ---- --------- HTML Code -------- - -

    - This function computes the fan power consumption for given volume flow rate, - speed and performance data. The power consumption is -

    -

    - P = rN3   s(V̇/rN, d), -

    -

    - where - P is the power consumption, - rN is the normalized fan speed, - is the volume flow rate and - d are performance data for fan or pump power consumption at rN=1. -

    -

    Implementation

    -

    - The function s(·, ·) is a cubic hermite spline. - If the data d define a monotone decreasing sequence, then - s(·, d) is a monotone decreasing function. -

    - - - --------- Corrected Code -------- -

    - This function computes the fan power consumption for given volume - flow rate, speed and performance data. The power consumption is -

    -

    - P = rN3   s(V̇/rN, d), + This model provides equation for the following thermodynamic + properties:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Variable + + Unit + + Description +
    + T + + K + + temperature +
    + p + + Pa + + absolute pressure +
    + d + + kg/m3 + + density +
    + h + + J/kg + + specific enthalpy +
    + u + + J/kg + + specific internal energy +
    + Xi[nXi] + + kg/kg + + independent mass fractions m_i/m +
    + R + + J/kg.K + + gas constant +
    + M + + kg/mol + + molar mass +
    + +Density is computed from pressure, temperature and composition in the +thermodynamic state record applying the ideal gas law.

    - where P is the power consumption, rN is the - normalized fan speed, is the volume flow rate and d - are performance data for fan or pump power consumption at - rN=1. + This function returns the dynamic viscosity.

    Implementation

    - The function s(·, ·) is a cubic hermite spline. If the data - d define a monotone decreasing sequence, then s(·, d) - is a monotone decreasing function. + The function is based on the 5th order polynomial of Modelica.Media.Air.MoistAir.dynamicViscosity. + However, for the typical range of temperatures encountered in + building applications, a linear function sufficies. This + implementation is therefore the above 5th order polynomial, + linearized around 20°C. The relative error of this + linearization is 0.4% at -20°C, and less then + 0.2% between -5°C and +50°C.

    - --------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/timeGeometric.mo ---- --------- HTML Code -------- - -

    - This function attemps to build a vector of length nTim with a geometric - expansion of the time variable between dt and t_max. -

    -

    - If t_max > nTim*dt, then a geometrically expanding vector is built as -

    -

    - t = [dt, dt*(1-r2)/(1-r), ... , dt*(1-rn)/(1-r), ... , tmax], -

    -

    - where r is the geometric expansion factor. -

    -

    - If t_max < nTim*dt, then a linearly expanding vector is built as -

    -

    - t = [dt, 2*dt, ... , n*dt, ... , nTim*dt] -

    - - - --------- Corrected Code -------- -

    - This function attemps to build a vector of length nTim - with a geometric expansion of the time variable between - dt and t_max. -

    +The ideal gas constant for moist air is computed from thermodynamic +state assuming that all water is in the gas phase. +Pressure is returned from the thermodynamic state record input as a +simple assignment.

    - If t_max > nTim*dt, then a geometrically expanding - vector is built as + This function returns the isobaric expansion coefficient at constant + pressure, which is zero for this medium. The isobaric expansion + coefficient at constant pressure is

    -

    - t = [dt, dt*(1-r2)/(1-r), ... , - dt*(1-rn)/(1-r), ... , tmax], +

    + βp = - 1 ⁄ v   (∂ v ⁄ ∂ T)p = 0,

    - where r is the geometric expansion factor. + where v is the specific volume, T is the temperature + and p is the pressure.

    +

    - If t_max < nTim*dt, then a linearly expanding vector - is built as + This function returns the isothermal compressibility coefficient. The + isothermal compressibility is

    -

    - t = [dt, 2*dt, ... , n*dt, ... , nTim*dt] +

    + κT = -1 ⁄ v   (∂ v ⁄ ∂ p)T = -1 ⁄ p, +

    +

    + where v is the specific volume, T is the temperature + and p is the pressure.

    - --------- Errors -------- -line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/Radiators/RadiatorEN442_2.mo ---- --------- HTML Code -------- - -

    - This is a model of a radiator that can be used as a dynamic or steady-state model. - The required parameters are data that are typically available from - manufacturers that follow the European Norm EN 442-2. -

    -

    - However, to allow for varying mass flow rates, the transferred heat is computed - using a discretization along the water flow path, and heat is exchanged between - each compartment and a uniform room air and radiation temperature. - This discretization is different from the computation in EN 442-2, which - may yield water outlet temperatures that are below - the room temperature at low mass flow rates. - Furthermore, rather than using only one room temperature, this model uses - a room air and room radiation temperature. -

    -

    - The transferred heat is modeled as follows: - Let N denote the number of elements used to discretize the radiator model. - For each element i ∈ {1, … , N}, - the convective and radiative heat transfer - Qic and - Qir - from the radiator to the room is -

    -

    - Qic = sign(Ti-Ta) - (1-fr) UA ⁄ N |Ti-Ta|n -

    - Qir = sign(Ti-Tr) - fr UA ⁄ N |Ti-Tr|n -

    -

    - where - Ti is the water temperature of the element, - Ta is the temperature of the room air, - Tr is the radiative temperature, - 0 < fr < 1 is the fraction of radiant to total heat transfer, - UA is the UA-value of the radiator, - and - n is an exponent for the heat transfer. - The model computes the UA-value by numerically solving the above equations - for given - nominal heating power, nominal temperatures, fraction radiant to total heat transfer - and exponent for heat transfer. -

    -

    - The parameter energyDynamics (in the Assumptions tab), - determines whether the model computes the dynamic or the steady-state response. - For the transient response, heat storage is computed using a - finite volume approach for the - water and the metal mass, which are both assumed to be at the same - temperature. -

    -

    - The default parameters for the heat capacities are valid for a flat plate radiator without fins, - with one plate of water carying fluid, and a height of 0.42 meters. -

    - - - --------- Corrected Code --------

    - This is a model of a radiator that can be used as a dynamic or - steady-state model. The required parameters are data that are - typically available from manufacturers that follow the European Norm - EN 442-2. + This function computes the specific entropy.

    - However, to allow for varying mass flow rates, the transferred heat - is computed using a discretization along the water flow path, and - heat is exchanged between each compartment and a uniform room air and - radiation temperature. This discretization is different from the - computation in EN 442-2, which may yield water outlet temperatures - that are below the room temperature at low mass flow rates. - Furthermore, rather than using only one room temperature, this model - uses a room air and room radiation temperature. + The specific entropy of the mixture is obtained from +

    +

    + s = ss + sm,

    - The transferred heat is modeled as follows: Let N denote the - number of elements used to discretize the radiator model. For each - element i ∈ {1, … , N}, the convective and radiative heat - transfer Qic and - Qir from the radiator to the room is + where ss is the entropy change due to the state + change (relative to the reference temperature) and + sm is the entropy change due to mixing of the dry + air and water vapor. +

    +

    + The entropy change due to change in state is obtained from

    - Qic = sign(Ti-Ta) - (1-fr) UA ⁄ N - |Ti-Ta|n
    -
    - Qir = sign(Ti-Tr) - fr UA ⁄ N |Ti-Tr|n + ss = cv ln(T/T0) + R + ln(v/v0)
    + = cv ln(T/T0) + R ln(ρ0/ρ)

    - where Ti is the water temperature of the element, - Ta is the temperature of the room air, - Tr is the radiative temperature, 0 < - fr < 1 is the fraction of radiant to total heat - transfer, UA is the UA-value of the radiator, and n is - an exponent for the heat transfer. The model computes the UA-value by - numerically solving the above equations for given nominal heating - power, nominal temperatures, fraction radiant to total heat transfer - and exponent for heat transfer. + If we assume ρ = p0/(R T), and because + cp = cv + R, we can write +

    +

    + ss = cv ln(T/T0) + R + ln(T/T0)
    + =cp ln(T/T0).

    - The parameter energyDynamics (in the Assumptions tab), - determines whether the model computes the dynamic or the steady-state - response. For the transient response, heat storage is computed using - a finite volume approach for the water and the metal mass, which are - both assumed to be at the same temperature. + Next, the entropy of mixing is obtained from a reversible isothermal + expansion process. Hence, +

    +

    + sm = -R ∑i( Xi ⁄ Mi + ln(Yi p/p0)),

    - The default parameters for the heat capacities are valid for a flat - plate radiator without fins, with one plate of water carying fluid, - and a height of 0.42 meters. + where R is the gas constant, X is the mass fraction, + M is the molar mass, and Y is the mole fraction. +

    +

    + To obtain the state for a given pressure, entropy and mass fraction, + use AixLib.Media.Air.setState_psX. +

    +

    + Limitations +

    +

    + This function is only valid for a relative humidity below 100%.

    - --------- Errors -------- -line 26 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Utilities/Math/Bicubic.mo ---- --------- HTML Code -------- - -

    - This block computes -

    -

    - y = a1 - + a2 x1 + a3 x12 - + a4 x2 + a5 x22 - + a6 x1 x2 - + a7 x1^3 - + a8 x2^3 - + a9 x12 x2 - + a10 x1 x22 -

    - - - --------- Corrected Code --------

    - This block computes -

    -

    - y = a1 + a2 x1 + a3 - x12 + a4 x2 + - a5 x22 + a6 x1 - x2 + a7 x1^3 + a8 - x2^3 + a9 x12 - x2 + a10 x1 - x22 + This function returns the partial derivative of density with respect + to pressure at constant temperature.

    - --------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/ThermalZones/ReducedOrder/RC/ThreeElements.mo ---- --------- HTML Code -------- - -

    - -

    This model adds one further element for - the floor plate. Long-term effects dominate the excitation of the floor plate - and thus the excitation fundamentally differs from excitation of outer walls. - Adding an extra element for the floor plate leads to a finer resolution of the - dynamic behaviour but increases calculation times. The floor plate is - parameterized via the length of the RC-chain nFloor, - the vector of the capacities - CFloor[nFloor], the vector of the resistances - RFloor[nFloor] - and the remaining resistance RFloorRem. -

    -

    - The image below shows the RC-network of this model. -

    -

    - \"image\"/ -

    - --------- Corrected Code -------- +

    + This function computes the derivative of density with respect to + temperature at constant pressure. +

    - This model adds one further element for the floor plate. Long-term - effects dominate the excitation of the floor plate and thus the - excitation fundamentally differs from excitation of outer walls. - Adding an extra element for the floor plate leads to a finer - resolution of the dynamic behaviour but increases calculation times. - The floor plate is parameterized via the length of the RC-chain - nFloor, the vector of the capacities - CFloor[nFloor], the vector of the resistances - RFloor[nFloor] and the remaining resistance - RFloorRem. + This function returns the partial derivative of density with respect + to mass fraction. This value is zero because in this medium, density + is proportional to pressure, but independent of the species + concentration.

    +

    - The image below shows the RC-network of this model. -

    -

    - \"image\" + The + thermodynamic state record is computed from density + d, temperature T and composition + X.

    - --------- Errors -------- -line 16 column 4 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/BoundaryConditions/Validation/UsersGuide.mo ---- --------- HTML Code -------- - +The +thermodynamic state record is computed from pressure p, specific +enthalpy h and composition X. +The +thermodynamic state record is computed from pressure p, temperature +T and composition X.

    -The package AixLib.BoundaryConditions.Validation.BESTEST -contains the models that are used for the BESTEST validation ASHRAE 2020 for weather data acquisition and postprocessing. + This function returns the thermodynamic state based on pressure, + specific entropy and mass fraction.

    -Each model represents a different climate with different days as shown in the tables below. -All examples have a script that runs the simulation according to the specifications and derive the required Json file as reported below. -

    -

    -The weather radiation data has to be provided at different orientations and inclinations. + The state is computed by symbolically solving AixLib.Media.Air.specificEntropy + for temperature.

    -

    Table 2: Azimuth and Slope for Surfaces

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Azimuth

    Slope

    Horizontal

    0° from horizontal

    South

    90° from horizontal

    East

    90° from horizontal

    North

    90° from horizontal

    West

    90° from horizontal

    45° East of South

    90° from horizontal

    45° West of South

    90° from horizontal

    East

    30° from horizontal

    South

    30° from horizontal

    West

    30° from horizontal

    - -

    Additional parameters and correlations

    -

    Outputs required

    -

    Annual Outputs

    -

     The following outputs are provided for an annual simulation:

    +Specific enthalpy as a function of temperature and species +concentration. The pressure is input for compatibility with the medium +models, but the specific enthalpy is independent of the pressure. -

    Hourly Outputs

    -

    The following outputs are provided for each hour of the days specified for each test case in Table 3:

    +

    + This function computes the specific enthalpy for an isentropic state + change from the temperature that corresponds to the state + refState to reference_T. +

    -

    Table 3: Specific Days for Output

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Case

    Days

    WD100

    May 4th, July 14th, September 6th

    WD200

    May 24th, August 26th

    WD300

    February 7th, August 13th

    WD400

    January 24th, July 1st

    WD500

    March 1st, September 14th

    WD600

    May 4th, July 14th, September 6th

    -

    Sub-hourly Outputs

    -

    The following outputs are provided at each timestep of the days specified for each test case in Table 3:

    +Temperature is returned from the thermodynamic state record input as a +simple assignment. +

    + This function returns the molar mass. +

    -

    The following outputs are provided integrated hourly for the days specified for each test case in Table 3:

    +Temperature as a function of specific enthalpy and species +concentration. The pressure is input for compatibility with the medium +models, but the temperature is independent of the pressure. -

    Validation results

    -

    (Not available yet)

    -

    Implementation

    -

    To generate the data shown in this user guide, run

    -
    -cd AixLib/Resources/Data/BoundaryConditions/Validation/BESTEST
    -python3 generateResults.py -p
    -
    -

    At the beginning of the Python script there are several options that the user can choose, by default the script will: +

    + This data record contains the coefficients for perfect gases.

    -

    References

    -

    (Not available yet)

    - - - --------- Corrected Code --------

    - The package AixLib.BoundaryConditions.Validation.BESTEST - contains the models that are used for the BESTEST validation ASHRAE - 2020 for weather data acquisition and postprocessing. + This medium package models moist air using a gas law in which + pressure and temperature are independent, which often leads to + significantly faster and more robust computations. The specific heat + capacities at constant pressure and at constant volume are constant. + The air is assumed to be not saturated.

    - Each model represents a different climate with different days as - shown in the tables below. All examples have a script that runs the - simulation according to the specifications and derive the required - Json file as reported below. + This medium uses the gas law +

    +

    + ρ/ρstp = p/pstp,

    - The weather radiation data has to be provided at different - orientations and inclinations. + where pstd and ρstp are constant + reference temperature and density, rathern than the ideal gas law +

    +

    + ρ = p ⁄(R T),

    - Table 2: Azimuth and Slope for Surfaces + where R is the gas constant and T is the temperature.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Azimuth -

    -
    -

    - Slope -

    -
    -

    - Horizontal -

    -
    -

    - 0° from horizontal -

    -
    -

    - South -

    -
    -

    - 90° from horizontal -

    -
    -

    - East -

    -
    -

    - 90° from horizontal -

    -
    -

    - North -

    -
    -

    - 90° from horizontal -

    -
    -

    - West -

    -
    -

    - 90° from horizontal -

    -
    -

    - 45° East of South -

    -
    -

    - 90° from horizontal -

    -
    -

    - 45° West of South -

    -
    -

    - 90° from horizontal -

    -
    -

    - East -

    -
    -

    - 30° from horizontal -

    -
    -

    - South -

    -
    -

    - 30° from horizontal -

    -
    -

    - West -

    -
    -

    - 30° from horizontal -

    -

    - Additional parameters and correlations + This formulation often leads to smaller systems of nonlinear + equations because equations for pressure and temperature are + decoupled. Therefore, if air inside a control volume such as room air + is heated, it does not increase its specific volume. Consequently, + merely heating or cooling a control volume does not affect the air + flow calculations in a duct network that may be connected to that + volume. Note that multizone air exchange simulation in which buoyancy + drives the air flow is still possible as the models in AixLib.Airflow.Multizone + compute the mass density using the function AixLib.Utilities.Psychrometrics.Functions.density_pTX + in which density is a function of temperature.

    - -

    - Outputs required -

    - Annual Outputs + Note that models in this package implement the equation for the + internal energy as +

    +

    + u = h - pstp ⁄ ρstp,

    -  The following outputs are provided for an annual - simulation: + where u is the internal energy per unit mass, h is the + enthalpy per unit mass, pstp is the static pressure + and ρstp is the mass density at standard pressure + and temperature. The reason for this implementation is that in + general, +

    +

    + h = u + p v,

    -

    - Hourly Outputs + from which follows that +

    +

    + u = h - p v = h - p ⁄ ρ = h - pstp ⁄ ρstd,

    - The following outputs are provided for each hour of the days - specified for each test case in Table 3: + because p ⁄ ρ = pstp ⁄ ρstp in this + medium model. +

    +

    + The enthalpy is computed using the convention that h=0 if + T=0 °C and no water vapor is present.


    -

    - Table 3: Specific Days for Output -

    - - - +
  • November 14, 2013, by Michael Wetter:
    + Removed function HeatCapacityOfWater which is neither + needed nor implemented in the Modelica Standard Library. +
  • +
  • November 13, 2013, by Michael Wetter:
    + Removed non-used computations in specificEnthalpy_pTX + and in temperature_phX. +
  • +
  • March 29, 2013, by Michael Wetter:
    + Added final standardOrderComponents=true in the + BaseProperties declaration. This avoids an error when + models are checked in Dymola 2014 in the pedenatic mode. +
  • +
  • April 12, 2012, by Michael Wetter:
    + Added keyword each to + Xi(stateSelect=...). +
  • +
  • April 4, 2012, by Michael Wetter:
    + Added redeclaration of ThermodynamicState to avoid a + warning during model check and translation. +
  • +
  • August 3, 2011, by Michael Wetter:
    + Fixed bug in u=h-R*T, which is only valid for ideal + gases. For this medium, the function is u=h-pStd/dStp. +
  • +
  • January 27, 2010, by Michael Wetter:
    + Fixed bug in else branch of function + setState_phX that lead to a run-time error when the + constructor of this function was called. +
  • +
  • January 22, 2010, by Michael Wetter:
    + Added implementation of function + enthalpyOfNonCondensingGas and its derivative. +
  • +
  • January 13, 2010, by Michael Wetter:
    + Fixed implementation of derivative functions. +
  • +
  • August 28, 2008, by Michael Wetter:
    + First implementation. +
  • + + +-------- Errors -------- +line 8 column 2 - Warning: The summary attribute on the
    -

    - Case -

    -
    element is obsolete in HTML5 + + +line 7 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 21 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 37 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 19 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 43 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 54 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 60 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/Actuators/Valves/Examples/TwoWayValveTable.mo ---- +-------- HTML Code -------- + +

    + Test model for a two way valve in which a table is used to specify the + opening characteristics. + The valve has the following opening characteristics, which is taken from a test case + of the IEA EBC Annex 60 project. +

    +
    + + + + + +
    y0 0.1667 0.3333 0.5 0.6667 1
    Kv0 0.19 0.35 0.45 0.5 0.65
    +

    + The Kv value is the volume flow rate in m3/h at a pressure difference + of 1 bar. + Hence, the Kv value of the fully open valve is Kv=0.65. +

    +

    + Plotting the variables kv.y versus y.y shows that the valve + reproduces the Kv values shown in the above table. +

    +

    + \"image\" +

    +

    + The parameter filterOpening is set to false, + as this model is used to plot the flow at different opening signals + without taking into account the travel time of the actuator. +

    + + + +-------- Corrected Code -------- +

    + Test model for a two way valve in which a table is used to specify + the opening characteristics. The valve has the following opening + characteristics, which is taken from a test case of the IEA EBC Annex + 60 project. +

    + + - - - - - - - - - - + -
    -

    - Days -

    + y
    -

    - WD100 -

    + 0
    -

    - May 4th, July 14th, September 6th -

    + 0.1667
    -

    - WD200 -

    + 0.3333
    -

    - May 24th, August 26th -

    + 0.5
    -

    - WD300 -

    + 0.6667
    -

    - February 7th, August 13th -

    + 1
    -

    - WD400 -

    + Kv
    -

    - January 24th, July 1st -

    + 0
    -

    - WD500 -

    + 0.19
    -

    - March 1st, September 14th -

    + 0.35
    -

    - WD600 -

    + 0.45
    -

    - May 4th, July 14th, September 6th -

    + 0.5 +
    + 0.65

    +

    - Sub-hourly Outputs + The Kv value is the volume flow rate in + m3/h at a pressure difference of 1 bar. Hence, the + Kv value of the fully open valve is + Kv=0.65.

    - The following outputs are provided at each timestep of the days - specified for each test case in Table 3: + Plotting the variables kv.y versus y.y + shows that the valve reproduces the Kv values shown + in the above table. +

    +

    + \"image\"

    -

    - The following outputs are provided integrated hourly for the days - specified for each test case in Table 3: + The parameter filterOpening is set to + false, as this model is used to plot the flow at + different opening signals without taking into account the travel time + of the actuator.

    -

    - Validation results -

    -

    - (Not available yet) -

    -

    - Implementation -

    -

    - To generate the data shown in this user guide, run -

    -
    -cd AixLib/Resources/Data/BoundaryConditions/Validation/BESTEST
    -python3 generateResults.py -p
    -
    -

    - At the beginning of the Python script there are several options that - the user can choose, by default the script will: -

    - -

    - References -

    -

    - (Not available yet) -

    - -------- Errors -------- -line 14 column 1 - Warning: The summary attribute on the element is obsolete in HTML5 -line 98 column 1 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 8 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Controls/Discrete/BooleanDelay.mo ---- +---- AixLib/Fluid/HeatPumps/ReciprocatingWaterToWater.mo ---- -------- HTML Code --------

    - Block that delays the boolean input signal by - one sampling interval. - For example, - if u denotes the input, - y denotes the output, and - ti and ti+1 - denote subsequent sampling - instants, then the model outputs + Model for a water to water heat pump with a reciprocating compressor, as + described in Jin (2002). The thermodynamic heat pump cycle is represented below. +

    +

    + \"image\" +

    +

    + The rate of heat transferred to the evaporator is given by:

    - y(ti+1) = u(ti). + Q̇Eva = ṁref ( hVap(TEva) - hLiq(TCon) ).

    - - - --------- Corrected Code -------- -

    - Block that delays the boolean input signal by one sampling interval. - For example, if u denotes the input, y denotes the - output, and ti and ti+1 denote - subsequent sampling instants, then the model outputs -

    -

    - y(ti+1) = u(ti). -

    - - --------- Errors -------- -line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/PlugFlowULg.mo ---- --------- HTML Code -------- -

    - The example contains - experimental data from a real district heating network. + The power consumed by the compressor is given by a linear efficiency relation: +

    +

    + P = PTheoretical / η + PLoss,constant.

    - This model compares the results with the original Modelica Standard Library pipes. + Heat transfer in the evaporator and condenser is calculated using an + ε-NTU method, assuming constant refrigerant temperature and constant heat + transfer coefficient between fluid and refrigerant.

    -

    The pipes' temperatures are not initialized. Therefore, results of - outflow temperature before approximately the first 10000 seconds should not be - considered. +

    + Variable speed is acheived by multiplying the full load piston displacement + by the normalized compressor speed. The power and heat transfer rates are forced + to zero if the resulting heat pump state has higher evaporating pressure than + condensing pressure.

    -

    Test bench schematic

    -

    \"Schematic

    -

    Calibration

    +

    Options

    - There are some uncertainties about the heat loss coefficient between pipe and - surrounding air as well as regarding the heat conductivity of the insulation - material. - With the - given data, the length specific thermal resistance is R = 2.164 - ((m K)/W), calculated as follows: + Parameters TConMax and TEvaMin + may be used to set an upper or lower bound for the + condenser and evaporator. + The compressor is disabled when these conditions + are not satisfied, or when the + evaporator temperature is larger + than the condenser temperature. + This mimics the temperature protection + of heat pumps and moreover it avoids + non-converging algebraic loops of equations, + or freezing of evaporator medium. + This option can be disabled by setting + enable_temperature_protection = false. +

    +

    Assumptions and limitations

    +

    + The compression process is assumed isentropic. The thermal energy + of superheating is ignored in the evaluation of the heat transferred to the refrigerant + in the evaporator. There is no supercooling. +

    +

    References

    +

    + H. Jin. + + Parameter estimation based models of water source heat pumps. + + PhD Thesis. Oklahoma State University. Stillwater, Oklahoma, USA. 2002.

    -

    - R=((1/(2*pipe.kIns)*log((0.0603+2*pipe.dIns)/(0.0603)))+1/(5*(0.0603+2*pipe.dIns)))/Modelica.Constants.pi

    -

    - U = 1/R = 0.462 W/(m K)

    -------- Corrected Code --------

    - The example contains experimental data from a real district heating - network. + Model for a water to water heat pump with a reciprocating compressor, + as described in Jin (2002). The thermodynamic heat pump cycle is + represented below. +

    +

    + \"image\"

    - This model compares the results with the original Modelica Standard - Library pipes. + The rate of heat transferred to the evaporator is given by: +

    +

    + Q̇Eva = ṁref ( + hVap(TEva) - hLiq(TCon) + ).

    - The pipes' temperatures are not initialized. Therefore, results of - outflow temperature before approximately the first 10000 seconds - should not be considered. + The power consumed by the compressor is given by a linear efficiency + relation: +

    +

    + P = PTheoretical / η + PLoss,constant. +

    +

    + Heat transfer in the evaporator and condenser is calculated using an + ε-NTU method, assuming constant refrigerant temperature and constant + heat transfer coefficient between fluid and refrigerant. +

    +

    + Variable speed is acheived by multiplying the full load piston + displacement by the normalized compressor speed. The power and heat + transfer rates are forced to zero if the resulting heat pump state + has higher evaporating pressure than condensing pressure.

    - Test bench schematic + Options

    - \"Schematic + Parameters TConMax and TEvaMin may be used + to set an upper or lower bound for the condenser and evaporator. The + compressor is disabled when these conditions are not satisfied, or + when the evaporator temperature is larger than the condenser + temperature. This mimics the temperature protection of heat pumps and + moreover it avoids non-converging algebraic loops of equations, or + freezing of evaporator medium. This option can be disabled by setting + enable_temperature_protection = false.

    - Calibration + Assumptions and limitations

    - There are some uncertainties about the heat loss coefficient between - pipe and surrounding air as well as regarding the heat conductivity - of the insulation material. With the - given data, the length specific thermal resistance is R = - 2.164 ((m K)/W), calculated as follows: -

    -

    - R=((1/(2*pipe.kIns)*log((0.0603+2*pipe.dIns)/(0.0603)))+1/(5*(0.0603+2*pipe.dIns)))/Modelica.Constants.pi + The compression process is assumed isentropic. The thermal energy of + superheating is ignored in the evaluation of the heat transferred to + the refrigerant in the evaporator. There is no supercooling.

    -

    - U = 1/R = 0.462 W/(m K) +

    + References +

    +

    + H. Jin. Parameter estimation based models of water source heat + pumps. PhD Thesis. Oklahoma State University. Stillwater, + Oklahoma, USA. 2002.

    -------- Errors -------- -line 25 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 27 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Sensors/SensibleEnthalpyFlowRate.mo ---- +---- AixLib/Fluid/Movers/UsersGuide.mo ---- -------- HTML Code -------- -

    - This model outputs the sensible enthalphy flow rate of the medium in the flow - between its fluid ports. In particular, if the total enthalpy flow rate is -

    -

    - Ḣtot = Ḣsen + Ḣlat, -

    -

    - where - sen = ṁ (1-Xw) cp,air, - then this sensor outputs Ḣ = Ḣsen. -

    - -

    - If the parameter tau is non-zero, then the measured - specific sensible enthalpy hout that is used to - compute the sensible enthalpy flow rate - sen = ṁ hout - is computed using a first order differential equation. - See - AixLib.Fluid.Sensors.UsersGuide for an explanation. -

    - -

    - For a sensor that measures - tot, use - - AixLib.Fluid.Sensors.EnthalpyFlowRate.
    - For a sensor that measures - lat, use - - AixLib.Fluid.Sensors.LatentEnthalpyFlowRate. -

    - -

    - The sensor is ideal, i.e., it does not influence the fluid. - The sensor can only be used with medium models that implement the function - enthalpyOfNonCondensingGas(T).

    - - - - --------- Corrected Code --------

    - This model outputs the sensible enthalphy flow rate of the - medium in the flow between its fluid ports. In particular, if the - total enthalpy flow rate is +This package contains models for fans and pumps. The same models +are used for fans or pumps. +

    + +

    Model description

    +

    A detailed description of the fan and pump models can be +found in +Wetter (2013). +The models are implemented as described in this paper, except +that equation (20) is no longer used. The reason is that +the transition (24) caused the derivative

    - Ḣtot = Ḣsen + Ḣlat, + d Δp(r(t), V(t)) ⁄ d r(t)

    - where sen = ṁ (1-Xw) - cp,air, then this sensor outputs Ḣ = - Ḣsen. +to have an inflection point in the regularization region +r(t) ∈ (δ/2, δ). +This caused some models to not converge. +To correct this, for r(t) < δ, +the term V(t) ⁄ r(t) in (16) +has been modified so that (16) can be used for any +value of r(t).

    - If the parameter tau is non-zero, then the measured - specific sensible enthalpy hout that is used to - compute the sensible enthalpy flow rate sen = ṁ - hout is computed using a first order differential - equation. See AixLib.Fluid.Sensors.UsersGuide - for an explanation. +Below, the models are briefly described.

    +
    Performance data

    - For a sensor that measures tot, use AixLib.Fluid.Sensors.EnthalpyFlowRate.
    - - For a sensor that measures lat, use AixLib.Fluid.Sensors.LatentEnthalpyFlowRate. +The models use +performance curves that compute pressure rise, +electrical power draw and efficiency as a function +of the volume flow rate and the speed. +The following performance curves are implemented: +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Independent variableDependent variableRecord for performance dataFunction
    Volume flow ratePressure +flowParameters +pressure
    Volume flow rateEfficiency +efficiencyParameters +efficiency
    Volume flow ratePower* +powerParameters +power
    +

    *Note: This record should not be used +(i.e. use_powerCharacteristic should be false) +for the movers that take as a control signal +the mass flow rate or the head, +unless also values for the record pressure are provided. +The reason is that for these movers the record pressure +is required to be able to compute the mover speed, +which is required to be able to compute the electrical power +correctly using similarity laws. +If a Pressure record is not provided, +the model will internally override use_powerCharacteristic=false. +In this case the efficiency records will be used. +Note that in this case an error is still introduced, +but it is smaller than when using the power records. +Compare + +AixLib.Fluid.Movers.Validation.PowerSimplified +with + +AixLib.Fluid.Movers.Validation.PowerExact +for an illustration of this error.

    - The sensor is ideal, i.e., it does not influence the fluid. The - sensor can only be used with medium models that implement the - function enthalpyOfNonCondensingGas(T). +These performance curves are implemented in + +AixLib.Fluid.Movers.BaseClasses.Characteristics, +and are used in the performance records in the package + +AixLib.Fluid.Movers.Data. +The package + +AixLib.Fluid.Movers.Data +contains different data records.

    - - --------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FMI/UsersGuide.mo ---- --------- HTML Code -------- - +

    Models that use performance curves for pressure rise

    -This user's guide describes the FMI package (Wetter et al., 2015). -The FMI package has been implemented to facilitate the export -of thermofluid flow models such as HVAC components, HVAC systems -and thermal zones as Functional Mockup Units (FMUs). -This allows to export thermofluid flow models as FMUs so that they can be -imported in other simulators. -To export thermofluid flow components, a Modelica block is needed -in order for the model to only have input and output signals -rather than fluid connectors, as fluid connectors do not impose any causality -on the signal flow. -This package implements such blocks and its connectors. +The models + +AixLib.Fluid.Movers.SpeedControlled_y and + +AixLib.Fluid.Movers.SpeedControlled_Nrpm +take as an input either a control signal between 0 and 1, or the +rotational speed in units of [1/min]. From this input and the current flow rate, +they compute the pressure rise. +This pressure rise is computed using a user-provided list of operating points that +defines the fan or pump curve at full speed. +For other speeds, similarity laws are used to scale the performance curves, as +described in + +AixLib.Fluid.Movers.BaseClasses.Characteristics.pressure.

    +

    -The main packages are as follows: +For example, suppose a pump needs to be modeled whose pressure versus flow relation crosses, at +full speed, the points shown in the table below.

    - - - - - - - - - - - - - - - - - - - - -
    PackageDescription
    - - AixLib.Fluid.FMI.ExportContainers - -

    - Package with blocks to export thermofluid flow components and systems. -

    -

    - To export an HVAC component or system with a single inlet and outlet port, instantiate - - AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort - with a replaceable model, - or extend from - - AixLib.Fluid.FMI.ExportContainers.PartialTwoPort - and add components.
    - See - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.Fan - and - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ResistanceVolume. -

    -

    - To export an HVAC system that serves a single thermal zone, extend from - - AixLib.Fluid.FMI.ExportContainers.HVACZone - and add the HVAC system.
    - See - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone. -

    -

    - To export an HVAC system that serves multiple thermal zones, extend from - - AixLib.Fluid.FMI.ExportContainers.HVACZones - and add the HVAC system.
    - See - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones. -

    -

    - To export a single thermal zone, extend from - - AixLib.Fluid.FMI.ExportContainers.ThermalZone - and add the thermal zone.
    - See - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone. -

    -

    - To export multiple thermal zones, extend from - - AixLib.Fluid.FMI.ExportContainers.ThermalZones - and add the thermal zone models.
    - See - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. -

    -
    - - AixLib.Fluid.FMI.Adaptors - -

    - Package with adaptors to connect models with fluid ports to blocks that - have input and output signals. -

    -
    -

    - - AixLib.Fluid.FMI.Conversion -

    -
    -

    - Package with blocks that convert between the signal connectors of - - AixLib.Fluid.FMI.Interfaces - and the real input and output signal connectors of the Modelica Standard Library. -

    -
    - - AixLib.Fluid.FMI.Interfaces - -

    - Package with composite connectors that have different input and output - signals. These connectors are used to export FMUs, and they contain - quantities such as mass flow rate, temperature, optional pressure, etc. -

    -
    + + + + + + + + + + + + + + + + + +
    Volume flow rate [m3⁄s] Head [Pa]
    0.000345000
    0.000635000
    0.000815000

    -The package - -AixLib.Fluid.FMI.ExportContainers.Examples.FMUs -contains various examples in which HVAC components, HVAC systems -and thermal zones are exported as an FMU. +Then, a declaration would be

    -

    Typical use

    +
    +  AixLib.Fluid.Movers.SpeedControlled_y pum(
    +    redeclare package Medium = Medium,
    +    per.pressure(V_flow={0.0003,0.0006,0.0008},
    +                 dp    ={45,35,15}*1000))
    +    \"Circulation pump\";
    +
    +

    -Users who want to export a single thermofluid flow component, or a -subsystem of thermofluid flow components, can use the block - -AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort. -This block has a fluid inlet, a fluid outlet, and a replaceable -component that can be replaced with an HVAC component or system that -has an inlet and outlet fluid port. +This will model the following pump curve for the pump input signal y=1. +

    +

    +\"image\"

    + +
    Models that directly control the head or the mass flow rate

    -Users who want to export a whole HVAC system that serves a single thermal zone -can do so by extending the partial block - -AixLib.Fluid.FMI.ExportContainers.HVACZone. -The example - -AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone -illustrates how this can be accomplished.
    -Similar export containers and examples are implemented for HVAC systems that serve multiple thermal zones. +The models +AixLib.Fluid.Movers.FlowControlled_dp and + +AixLib.Fluid.Movers.FlowControlled_m_flow +take as an input the pressure difference or the mass flow rate. +This pressure difference or mass flow rate will be provided by the fan or pump, +i.e., the fan or pump has idealized perfect control and infinite capacity. +Using these models that take as an input the head or the mass flow rate often leads +to smaller system of equations compared to using the models that take +as an input the speed.

    -Conversely, to export a thermal zone, users can extend the partial block - -AixLib.Fluid.FMI.ExportContainers.ThermalZone. -The example - -AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone -illustrates how this can be accomplished.
    -Similar export containers and examples are implemented for models of multiple thermal zones. +These models can be configured for three different control inputs. +For + +AixLib.Fluid.Movers.FlowControlled_dp, +the head is as follows:

    +

    -Note the following when exporting HVAC component models as an FMU: +Similarly, for + +AixLib.Fluid.Movers.FlowControlled_m_flow, +the mass flow rate is as follows:

    -
      + +

      +These two models do not need to use a performance curve for the flow +characteristics. +The reason is that

      +

      -The model - -AixLib.Fluid.Movers.FlowControlled_m_flow -cannot be exported as an FMU. -This is because it assignes the mass flow rate. -However, the input connector - -AixLib.Fluid.FMI.Interfaces.Inlet -already declares the mass flow rate as an input. -Therefore, the mass flow rate is overdetermined. -As a fall back, if a user needs to set the mass flow rate, he/she can -do so by using - -AixLib.Fluid.FMI.Source_T, -which takes as an input signal the mass flow rate. +However, the computation of the electrical power consumption +requires the mover speed to be known +and the computation of the mover speed requires the performance +curves for the flow and efficiency/power characteristics. +Therefore these performance curves do need to be provided +if the user desires a correct electrical power computation. +If the curves are not provided, a simplified computation is used, +where the efficiency curve is used and assumed to be correct for all speeds. +This loss of accuracy has the advantage that it allows to use the +mover models without requiring flow and efficiency/power characteristics.

      - -

    -When connecting fluid flow components in a loop, -be careful to avoid circular assignments for example for the temperature, -as these can of course not be simulated. -An example of such an ill-posed problem is to connect the outlet of - -AixLib.Fluid.FixedResistances.PressureDrop -to its inlet. In this situation, neither pressure, nor mass flow rate or temperature -can be computed. To model such loops, a control volume with a dynamic energy -balance must be presented, and the medium needs to be compressible. +The model +AixLib.Fluid.Movers.FlowControlled_dp +has an option to control the mover such +that the pressure difference set point is obtained +across two remote points in the system. +To use this functionality +parameter prescribeSystemPressure has +to be enabled and a differential pressure measurement +must be connected to +the pump input dpMea. +This functionality is demonstrated in + +AixLib.Fluid.Movers.Validation.FlowControlled_dpSystem.

    -

    References

    -Michael Wetter, Marcus Fuchs and Thierry Stephane Nouidui.
    - -Design choices for thermofluid flow components and systems that are exported as Functional Mockup Units.
    -Proc. of the 11th International Modelica Conference, - p. 31-41, - Versailles, France, September 2015. +The models +AixLib.Fluid.Movers.FlowControlled_dp and + +AixLib.Fluid.Movers.FlowControlled_m_flow +both have a parameter m_flow_nominal. For + +AixLib.Fluid.Movers.FlowControlled_m_flow, this parameter +is used for convenience to set a default value for the parameters +constantMassFlowRate and +massFlowRates. +For both models, the value is also used for the following:

    --------- Corrected Code -------- +

    - This user's guide describes the FMI package (Wetter et al., 2015). - The FMI package has been implemented to facilitate the export of - thermofluid flow models such as HVAC components, HVAC systems and - thermal zones as Functional Mockup Units (FMUs). This allows to - export thermofluid flow models as FMUs so that they can be imported - in other simulators. To export thermofluid flow components, a - Modelica block is needed in order for the model to only have input - and output signals rather than fluid connectors, as fluid connectors - do not impose any causality on the signal flow. This package - implements such blocks and its connectors. +However, otherwise m_flow_nominal does not affect the mass flow rate of the mover as +the mass flow rate is determined by the input signal or the above explained parameters.

    +
    Start-up and shut-down transients

    - The main packages are as follows: +All models have a parameter use_inputFilter. This +parameter affects the fan output as follows:

    - - - - - - - - - - - - - - - - - - - - - -
    - Package - - Description -
    - AixLib.Fluid.FMI.ExportContainers - -

    - Package with blocks to export thermofluid flow components and - systems. -

    -

    - To export an HVAC component or system with a single inlet and - outlet port, instantiate - AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort with a - replaceable model, or extend from AixLib.Fluid.FMI.ExportContainers.PartialTwoPort - and add components.
    - See - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.Fan and - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ResistanceVolume. -

    -

    - To export an HVAC system that serves a single thermal zone, - extend from AixLib.Fluid.FMI.ExportContainers.HVACZone - and add the HVAC system.
    - See - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone. -

    -

    - To export an HVAC system that serves multiple thermal zones, - extend from AixLib.Fluid.FMI.ExportContainers.HVACZones - and add the HVAC system.
    - See - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones. -

    -

    - To export a single thermal zone, extend from AixLib.Fluid.FMI.ExportContainers.ThermalZone - and add the thermal zone.
    - See - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone. -

    -

    - To export multiple thermal zones, extend from AixLib.Fluid.FMI.ExportContainers.ThermalZones - and add the thermal zone models.
    - See - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. -

    -
    - AixLib.Fluid.FMI.Adaptors - -

    - Package with adaptors to connect models with fluid ports to - blocks that have input and output signals. -

    -
    -

    - AixLib.Fluid.FMI.Conversion -

    -
    -

    - Package with blocks that convert between the signal connectors - of AixLib.Fluid.FMI.Interfaces - and the real input and output signal connectors of the Modelica - Standard Library. -

    -
    - AixLib.Fluid.FMI.Interfaces - -

    - Package with composite connectors that have different input and - output signals. These connectors are used to export FMUs, and - they contain quantities such as mass flow rate, temperature, - optional pressure, etc. -

    -
    +
      +
    1. +If use_inputFilter=false, then the input signal y (or +Nrpm, m_flow_in, or dp_in) +is equal to the fan speed (or the mass flow rate or pressure rise). +Thus, a step change in the input signal causes a step change in the fan speed (or mass flow rate or pressure rise). +
    2. +
    3. +If use_inputFilter=true, which is the default, +then the fan speed (or the mass flow rate or the pressure rise) +is equal to the output of a filter. This filter is implemented +as a 2nd order differential equation and can be thought of as +approximating the inertia of the rotor and the fluid. +Thus, a step change in the fan input signal will cause a gradual change +in the fan speed. +The filter has a parameter riseTime, which by default is set to +30 seconds. +The rise time is the time required to reach 99.6% of the full speed, or, +if the fan is switched off, to reach a fan speed of 0.4%. +
    4. +

    - The package AixLib.Fluid.FMI.ExportContainers.Examples.FMUs - contains various examples in which HVAC components, HVAC systems and - thermal zones are exported as an FMU. +The figure below shows for a fan with use_inputFilter=true +and riseTime=30 seconds the +speed input signal and the actual speed.

    +

    +\"image\"

    -

    - Typical use -

    +

    - Users who want to export a single thermofluid flow component, or a - subsystem of thermofluid flow components, can use the block AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort. - This block has a fluid inlet, a fluid outlet, and a replaceable - component that can be replaced with an HVAC component or system that - has an inlet and outlet fluid port. +Although many simulations do not require such a detailed model +that approximates the transients of fans or pumps, it turns +out that using this filter can reduce computing time and +can lead to fewer convergence problems in large system models. +With a filter, any sudden change in control signal, such as when +a fan switches on, is damped before it affects the air flow rate. +This continuous change in flow rate turns out to be easier, and in +some cases faster, to simulate compared to a step change. +For most simulations, we therefore recommend to use the default settings +of use_inputFilter=true and riseTime=30 seconds. +An exception are situations in which the fan or pump is operated at a fixed speed during +the whole simulation. In this case, set use_inputFilter=false.

    - Users who want to export a whole HVAC system that serves a single - thermal zone can do so by extending the partial block AixLib.Fluid.FMI.ExportContainers.HVACZone. - The example - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone - illustrates how this can be accomplished.
    - Similar export containers and examples are implemented for HVAC - systems that serve multiple thermal zones. +Note that if the fan is part of a closed loop control, then the filter affects +the transient response of the control. +When changing the value of use_inputFilter, the control gains +may need to be retuned. +We now present values control parameters that seem to work in most cases. +Suppose there is a closed loop control with a PI-controller + +AixLib.Controls.Continuous.LimPID +and a fan or pump, configured with use_inputFilter=true and riseTime=30 seconds. +Assume that the transient response of the other dynamic elements in the control loop is fast +compared to the rise time of the filter. +Then, a proportional gain of k=0.5 and an integrator time constant of +Ti=15 seconds often yields satisfactory closed loop control performance. +These values may need to be changed for different applications as they are also a function +of the loop gain. +If the control loop shows oscillatory behavior, then reduce k and/or increase Ti. +If the control loop reacts too slow, do the opposite.

    + +
    Efficiency and electrical power consumption

    - Conversely, to export a thermal zone, users can extend the partial - block AixLib.Fluid.FMI.ExportContainers.ThermalZone. - The example - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone - illustrates how this can be accomplished.
    - Similar export containers and examples are implemented for models of - multiple thermal zones. +All models compute the motor power draw Pele, +the hydraulic power input Whyd, the flow work +Wflo and the heat dissipated into the medium +Q. Based on the first law, the flow work is

    -

    - Each example and validation model has a Dymola script that either - simulates the model, or exports the model as an FMU. The script can - be invoked from the pull down menu Commands -> Export - FMU. +

    + Wflo = | V̇ Δp |,

    -

    - Options -

    - In the AixLib.Fluid package, - most models have a boolean parameter called - allowFlowReversal. If set to true, then the - flow can be in either direction, otherwise it needs to be from the - inlet to the outlet port. This parameter is also used in the AixLib.Fluid.FMI package. The - package was designed in such a way that an FMU, if exported with - allowFlowReversal=false has as input the mass flow rate, - pressure and fluid properties of the inflowing fluid. The outputs are - the outlet mass flow rate, outlet pressure and the fluid properties - of the outflowing medium. This allows simulators such as Ptolemy II - to evaluate the FMUs in the direction of the mass flow by first - setting all inputs, then evaluating the model equations, and finally - retrieving the outputs before proceeding the simulation with the next - downstream component. If allowFlowReversal=true, then - the connectors have additional signals for the properties of the - fluid if it flows backwards. +where is the volume flow rate and +Δp is the pressure rise. +The heat dissipated into the medium is as follows: +If the motor is cooled by the fluid, as indicated by +per.motorCooledByFluid=true, then the heat dissipated into the medium is +

    +

    + Q = Pele - Wflo.

    +

    - Most components have a boolean parameter use_p_in. If - use_p_in=true, then the pressure is used from the - connector, and based on the mass flow rate, the outlet pressure is - computed and assigned to the outlet connectors. If - use_p_in=false, then the pressure as declared by the - constant p_default of the medium model is used, and the - component computes no pressure drop. Setting - use_p_in=false therefore leads to fewer equations, but - it requires a component that specifies the mass flow rate, such as - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.IdealSource_m_flow. +If per.motorCooledByFluid=false, then the motor is outside the fluid stream, +and only the shaft, or hydraulic, work Whyd enters the thermodynamic +control volume. Hence,

    -

    - Notes -

    -

    - Note the following when exporting HVAC component models as an FMU: +

    + Q = Whyd - Wflo.

    -
      -
    1. -

      - For models with control volumes, the mass balance must be - configured using - massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState - when used with the media AixLib.Media.Air. Otherwise, - the translation stops with the error -

      -
      -The model requires derivatives of some inputs as listed below:
      -1 inlet.p
      -
      -

      - The reason is that for AixLib.Media.Air, mass is - proportional to pressure and pressure is proportional to density. - Hence, dm/dt requires dp/dt, but the time - derivative of the pressure is not an input to the model. -

      -

      - For AixLib.Media.Water, this - setting is not needed as the mass is independent of pressure. -

      -
    2. -
    3. -

      - The model AixLib.Fluid.Movers.FlowControlled_m_flow - cannot be exported as an FMU. This is because it assignes the - mass flow rate. However, the input connector AixLib.Fluid.FMI.Interfaces.Inlet - already declares the mass flow rate as an input. Therefore, the - mass flow rate is overdetermined. As a fall back, if a user needs - to set the mass flow rate, he/she can do so by using AixLib.Fluid.FMI.Source_T, - which takes as an input signal the mass flow rate. -

      -
    4. -
    -

    - When connecting fluid flow components in a loop, be careful to avoid - circular assignments for example for the temperature, as these can of - course not be simulated. An example of such an ill-posed problem is - to connect the outlet of AixLib.Fluid.FixedResistances.PressureDrop - to its inlet. In this situation, neither pressure, nor mass flow rate - or temperature can be computed. To model such loops, a control volume - with a dynamic energy balance must be presented, and the medium needs - to be compressible. +

    The efficiencies are computed as

    +

    + η = Wflo ⁄ Pele = ηhyd   ηmot
    + ηhyd = Wflo ⁄ Whyd
    + ηmot = Whyd ⁄ Pele

    -

    - References -

    -

    - Michael Wetter, Marcus Fuchs and Thierry Stephane Nouidui.
    - - Design choices for thermofluid flow components and systems that are - exported as Functional Mockup Units.
    - Proc. of the 11th International Modelica Conference, p. 31-41, - Versailles, France, September 2015. +

    where +ηhyd is the hydraulic efficiency, +ηmot is the motor efficiency and +Q is the heat released by the motor.

    - --------- Errors -------- -line 18 column 1 - Warning: The summary attribute on the element is obsolete in HTML5 - - ----- AixLib/Fluid/Sources/Outside_CpLowRise.mo ---- --------- HTML Code -------- - -

    - This model describes boundary conditions for - pressure, enthalpy, and species concentration that can be obtained - from weather data. The model is identical to - - AixLib.Fluid.Sources.Outside, - except that it adds the wind pressure to the - pressure at the fluid port ports. - The correlation that is used to compute the wind pressure is based - on Swami and Chandra (1987) and valid for low-rise buildings - with rectangular shape. - The same correlation is also implemented in CONTAM (Persily and Ivy, 2001). - -

    -

    - The wind pressure coefficient is computed based on the - side ratio of the walls, which is defined as -

    -

    - s = x ⁄ y -

    -

    - where x is the length of the wall that will be connected to - this model, and y is the length of the adjacent wall. - The wind direction is computed relative to the azimuth of this surface, - which is equal to the parameter azi. - The surface azimuth is defined in - - AixLib.Types.Azimuth. - For example, if an exterior wall is South oriented, i.e., its outside-facing - surface is towards South, use - AixLib.Types.Azimuth.S. -

    -

    - Based on the surface azimuth, the wind direction and the side ratio - of the walls, the model computes how much the wind pressure - is attenuated compared to the reference wind pressure Cp0. - The reference wind pressure Cp0 is a user-defined parameter, - and must be equal to the wind pressure at zero wind incidence angle. - Swami and Chandra (1987) recommend Cp0 = 0.6 for - all low-rise buildings as this represents the average of - various values reported in the literature. - The computation of the actual wind pressure coefficient Cp - is explained in the function - - Buildings.Airflow.Multizone.BaseClasses.windPressureLowRise - that is called by this model. -

    -

    - The pressure p at the port ports is computed as -

    -

    - p = pw + Cp 1 ⁄ 2 v2 ρ, -

    -

    - where - pw is the atmospheric pressure from the weather bus, - v is the wind speed from the weather bus, and - ρ is the fluid density. -

    - -

    - This model differs from - AixLib.Fluid.Sources.Outside_CpData by the calculation of the wind pressure coefficient Cp,act. - The wind pressure coefficient is defined by an equation in stead of a user-defined table. - This model is only suited for low-rise rectangular buildings. -

    - -

    References

    - - - - --------- Corrected Code --------

    - This model describes boundary conditions for pressure, enthalpy, and - species concentration that can be obtained from weather data. The - model is identical to AixLib.Fluid.Sources.Outside, - except that it adds the wind pressure to the pressure at the fluid - port ports. The correlation that is used to compute the - wind pressure is based on Swami and Chandra (1987) and valid for - low-rise buildings with rectangular shape. The same correlation is - also implemented in CONTAM (Persily and Ivy, 2001). - +If per.use_powerCharacteristic=true, +then a set of data points for the power Pele for different +volume flow rates at full speed needs to be provided by the user. +Using the flow work Wflo and the electrical power input +Pele, the total efficiency is computed as +

    +

    + η = Wflo ⁄ Pele,

    - The wind pressure coefficient is computed based on the side ratio of - the walls, which is defined as +and the two efficiencies +ηhyd +and ηmot are computed as

    - s = x ⁄ y + ηhyd = 1,
    + ηmot = η.

    - where x is the length of the wall that will be connected to - this model, and y is the length of the adjacent wall. The wind - direction is computed relative to the azimuth of this surface, which - is equal to the parameter azi. The surface azimuth is - defined in AixLib.Types.Azimuth. For - example, if an exterior wall is South oriented, i.e., its - outside-facing surface is towards South, use - AixLib.Types.Azimuth.S. +However, if per.use_powerCharacteristic=false, then +performance data for +ηhyd and + ηmot need to be provided by the user, and hence +the model computes

    -

    - Based on the surface azimuth, the wind direction and the side ratio - of the walls, the model computes how much the wind pressure is - attenuated compared to the reference wind pressure Cp0. - The reference wind pressure Cp0 is a user-defined - parameter, and must be equal to the wind pressure at zero wind - incidence angle. Swami and Chandra (1987) recommend Cp0 - = 0.6 for all low-rise buildings as this represents the average - of various values reported in the literature. The computation of the - actual wind pressure coefficient Cp is explained in - the function - Buildings.Airflow.Multizone.BaseClasses.windPressureLowRise that - is called by this model. +

    + η = ηhyd   ηmot
    + Pele = Wflo ⁄ η.

    +

    - The pressure p at the port ports is computed as +The efficiency data for the motor are a list of points + and ηmot.

    -

    - p = pw + Cp 1 ⁄ 2 v2 ρ, + +

    Fluid volume of the component
    +

    +All models can be configured to have a fluid volume at the low-pressure side. +Adding such a volume sometimes helps the solver to find a solution during +initialization and time integration of large models.

    + +
    Enthalpy change of the component

    - where pw is the atmospheric pressure from the - weather bus, v is the wind speed from the weather bus, and - ρ is the fluid density. +If per.motorCooledByFluid=true, then +the enthalpy change between the inlet and outlet fluid port is equal +to the electrical power Pele that is consumed by the component. +Otherwise, it is equal to the hydraulic work Whyd. +The parameter addPowerToMedium, which is by default set to +true, can be used to simplify the equations. +If addPowerToMedium = false, then no enthalpy change occurs between +inlet and outlet. +This can lead to simpler equations, but the temperature rise across the component +will be zero. In particular for fans, this simplification may not be permissible.

    + +

    Differences to models in Modelica.Fluid.Machines

    - This model differs from AixLib.Fluid.Sources.Outside_CpData - by the calculation of the wind pressure coefficient - Cp,act. The wind pressure coefficient is defined by an - equation in stead of a user-defined table. This model is only suited - for low-rise rectangular buildings. +The models in this package differ from +Modelica.Fluid.Machines +primarily in the following points:

    -

    - References -

    - +

    References

    +

    +Michael Wetter. + +Fan and pump model that has a unique solution for any pressure +boundary condition and control signal. +Proc. of the 13th Conference of the International Building Performance +Simulation Association, p. 3505-3512. Chambery, France. August 2013. +

    --------- Errors -------- -line 28 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 61 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/infiniteLineSource.mo ---- --------- HTML Code -------- - -

    - This function evaluates the infinite line source solution. This solution gives - the relation between the constant heat transfer rate (per unit length) injected - by a line heat source of infinite length and the temperature raise in the - medium. The infinite line source solution is defined by -

    -

    - \"image\" -

    -

    - where ΔT(t,r) is the temperature raise after a time t of - constant heat injection and at a distance r from the line source, - Q' is the heat injection rate per unit length, ks is - the soil thermal conductivity and hILS is the infinite line - source solution. -

    -

    - The infinite line source solution is given by the exponential integral -

    -

    - \"image\" -

    -

    - where αs is the ground thermal diffusivity. The - exponential integral is implemented in - AixLib.Utilities.Math.Functions.exponentialIntegralE1. -

    - - - -------- Corrected Code --------

    - This function evaluates the infinite line source solution. This - solution gives the relation between the constant heat transfer rate - (per unit length) injected by a line heat source of infinite length - and the temperature raise in the medium. The infinite line source - solution is defined by -

    -

    - \"image\" + This package contains models for fans and pumps. The same models are + used for fans or pumps.

    +

    + Model description +

    - where ΔT(t,r) is the temperature raise after a time t - of constant heat injection and at a distance r from the line - source, Q' is the heat injection rate per unit length, - ks is the soil thermal conductivity and - hILS is the infinite line source solution. + A detailed description of the fan and pump models can be found in + + Wetter (2013). The models are implemented as described in this + paper, except that equation (20) is no longer used. The reason is + that the transition (24) caused the derivative +

    +

    + d Δp(r(t), V(t)) ⁄ d r(t)

    - The infinite line source solution is given by the exponential - integral + to have an inflection point in the regularization region r(t) ∈ + (δ/2, δ). This caused some models to not converge. To correct + this, for r(t) < δ, the term V(t) ⁄ r(t) in (16) has + been modified so that (16) can be used for any value of r(t).

    -

    - \"image\" +

    + Below, the models are briefly described.

    +
    + Performance data +

    - where αs is the ground thermal diffusivity. The - exponential integral is implemented in AixLib.Utilities.Math.Functions.exponentialIntegralE1. + The models use performance curves that compute pressure rise, + electrical power draw and efficiency as a function of the volume flow + rate and the speed. The following performance curves are implemented:

    - - --------- Errors -------- -line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 21 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Interfaces/PrescribedOutlet.mo ---- --------- HTML Code -------- - -

    - This model sets the temperature or the water vapor mass fraction - of the medium that leaves port_a - to the value given by the input TSet or X_wSet, - subject to optional limitations on the capacity - for heating and cooling, or limitations on the humidification or dehumidification - moisture mass flow rate. - Also, optionally the model allows to take into account first order dynamics. -

    -

    - If the parameters energyDynamics is not equal to - Modelica.Fluid.Types.Dynamics.SteadyState, - the component models the dynamic response using a first order differential equation. - The time constant of the component is equal to the parameter tau. - This time constant is adjusted based on the mass flow rate using -

    -

    - τeff = τ |ṁ| ⁄ ṁnom -

    -

    - where - τeff is the effective time constant for the given mass flow rate - and - τ is the time constant at the nominal mass flow rate - nom. - This type of dynamics is equal to the dynamics that a completely mixed - control volume would have. -

    -

    - This model has no pressure drop. - See - AixLib.Fluid.HeatExchangers.PrescribedOutlet - for a model that instantiates this model and that has a pressure drop. -

    -

    - In case of reverse flow, - the fluid that leaves port_a has the same - properties as the fluid that enters port_b. -

    - - - --------- Corrected Code -------- +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + Independent variable + + Dependent variable + + Record for performance data + + Function +
    + Volume flow rate + + Pressure + + + flowParameters + + + pressure +
    + Volume flow rate + + Efficiency + + + efficiencyParameters + + + efficiency +
    + Volume flow rate + + Power* + + + powerParameters + + + power +

    - This model sets the temperature or the water vapor mass fraction of - the medium that leaves port_a to the value given by the - input TSet or X_wSet, subject to optional - limitations on the capacity for heating and cooling, or limitations - on the humidification or dehumidification moisture mass flow rate. - Also, optionally the model allows to take into account first order - dynamics. + *Note: This record should not be used (i.e. + use_powerCharacteristic should be false) + for the movers that take as a control signal the mass flow rate or + the head, unless also values for the record pressure are + provided. The reason is that for these movers the record + pressure is required to be able to compute the mover + speed, which is required to be able to compute the electrical power + correctly using similarity laws. If a Pressure record is + not provided, the model will internally override + use_powerCharacteristic=false. In this case the + efficiency records will be used. Note that in this case an error is + still introduced, but it is smaller than when using the power + records. Compare AixLib.Fluid.Movers.Validation.PowerSimplified + with AixLib.Fluid.Movers.Validation.PowerExact + for an illustration of this error.

    - If the parameters energyDynamics is not equal to - Modelica.Fluid.Types.Dynamics.SteadyState, the component - models the dynamic response using a first order differential - equation. The time constant of the component is equal to the - parameter tau. This time constant is adjusted based on - the mass flow rate using + These performance curves are implemented in AixLib.Fluid.Movers.BaseClasses.Characteristics, + and are used in the performance records in the package AixLib.Fluid.Movers.Data. + The package AixLib.Fluid.Movers.Data + contains different data records.

    -

    - τeff = τ |ṁ| ⁄ ṁnom +

    + Models that use performance curves for pressure rise +
    +

    + The models AixLib.Fluid.Movers.SpeedControlled_y + and AixLib.Fluid.Movers.SpeedControlled_Nrpm + take as an input either a control signal between 0 and + 1, or the rotational speed in units of [1/min]. From + this input and the current flow rate, they compute the pressure rise. + This pressure rise is computed using a user-provided list of + operating points that defines the fan or pump curve at full speed. + For other speeds, similarity laws are used to scale the performance + curves, as described in + AixLib.Fluid.Movers.BaseClasses.Characteristics.pressure.

    - where τeff is the effective time constant for the - given mass flow rate and τ is the time constant at - the nominal mass flow rate nom. This type of - dynamics is equal to the dynamics that a completely mixed control - volume would have. + For example, suppose a pump needs to be modeled whose pressure versus + flow relation crosses, at full speed, the points shown in the table + below.

    + + + + + + + + + + + + + + + + + +
    + Volume flow rate [m3⁄s] + + Head [Pa] +
    + 0.0003 + + 45000 +
    + 0.0006 + + 35000 +
    + 0.0008 + + 15000 +

    - This model has no pressure drop. See AixLib.Fluid.HeatExchangers.PrescribedOutlet - for a model that instantiates this model and that has a pressure - drop. + Then, a declaration would be

    +
    +  AixLib.Fluid.Movers.SpeedControlled_y pum(
    +    redeclare package Medium = Medium,
    +    per.pressure(V_flow={0.0003,0.0006,0.0008},
    +                 dp    ={45,35,15}*1000))
    +    \"Circulation pump\";
    +

    - In case of reverse flow, the fluid that leaves port_a - has the same properties as the fluid that enters port_b. + This will model the following pump curve for the pump input signal + y=1.

    - - --------- Errors -------- -line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FixedResistances/CheckValve.mo ---- --------- HTML Code -------- - -

    - Implementation of a hydraulic check valve. - Note that the small reverse flows can still occur with this model. -

    -

    Main equations

    -

    - The basic flow function -

    -

    - m = sign(Δp) k √ Δp  , -

    -

    - with regularization near the origin, is used to compute the pressure drop. - The flow coefficient -

    -

    - k = m ⁄ √ Δp   -

    -

    - is increased from l*KV_Si to KV_Si, - where KV_Si is equal to Kv but in SI units. - Therefore, the flow coefficient k is set to a value close to zero for negative pressure differences, thereby - restricting reverse flow to a small value. - The flow coefficient k saturates to its maximum value at the pressure dpValve_closing. - For larger pressure drops, the pressure drop is a quadratic function of the flow rate. -

    -

    Typical use and important parameters

    -

    - The parameters m_flow_nominal and dpValve_nominal - determine the flow coefficient of the check valve when it is fully opened. - A typical value for a nominal flow rate of 1 m/s is - dpValve_nominal = 3400 Pa. - The leakage ratio l determines the minimum flow coefficient, - for negative pressure differences. - The parameter dpFixed_nominal allows to include a series - pressure drop with a fixed flow coefficient into the model. - The parameter dpValve_closing determines when the - flow coefficient starts to increase, - which is typically in the order of dpValve_nominal. -

    -

    Implementation

    -

    - The check valve implementation approximates the physics - where a forward pressure difference opens the valve such that - the valve opening increases, causing a growing orifice area - and thus increasing the flow coefficient. - Near dp=dpValve_closing, the valve is fully open and the flow coefficient saturates - to the flow coefficient value determined by dpValve_nominal and m_flow_nominal. - For typical valve diameters, the check valve is only fully open - near nominal mass flow rate. Therefore, the model sets dpValve_closing=dpValve_nominal/2 - by default. -

    - - - --------- Corrected Code -------- -

    - Implementation of a hydraulic check valve. Note that the small - reverse flows can still occur with this model. -

    -

    - Main equations -

    -

    - The basic flow function -

    -

    - m = sign(Δp) k √ Δp -  , -

    -

    - with regularization near the origin, is used to compute the pressure - drop. The flow coefficient -

    -

    - k = m ⁄ √ Δp -   +

    + \"image\"

    +
    + Models that directly control the head or the mass flow rate +

    - is increased from l*KV_Si to KV_Si, where - KV_Si is equal to Kv but in SI units. - Therefore, the flow coefficient k is set to a value - close to zero for negative pressure differences, thereby restricting - reverse flow to a small value. The flow coefficient k - saturates to its maximum value at the pressure - dpValve_closing. For larger pressure drops, the pressure - drop is a quadratic function of the flow rate. + The models AixLib.Fluid.Movers.FlowControlled_dp + and AixLib.Fluid.Movers.FlowControlled_m_flow + take as an input the pressure difference or the mass flow rate. This + pressure difference or mass flow rate will be provided by the fan or + pump, i.e., the fan or pump has idealized perfect control and + infinite capacity. Using these models that take as an input the head + or the mass flow rate often leads to smaller system of equations + compared to using the models that take as an input the speed.

    -

    - Typical use and important parameters -

    - The parameters m_flow_nominal and - dpValve_nominal determine the flow coefficient of the - check valve when it is fully opened. A typical value for a nominal - flow rate of 1 m/s is dpValve_nominal = 3400 Pa. - The leakage ratio l determines the minimum flow - coefficient, for negative pressure differences. The parameter - dpFixed_nominal allows to include a series pressure drop - with a fixed flow coefficient into the model. The parameter - dpValve_closing determines when the flow coefficient - starts to increase, which is typically in the order of - dpValve_nominal. + These models can be configured for three different control inputs. + For AixLib.Fluid.Movers.FlowControlled_dp, + the head is as follows:

    -

    - Implementation -

    +

    - The check valve implementation approximates the physics where a - forward pressure difference opens the valve such that the valve - opening increases, causing a growing orifice area and thus increasing - the flow coefficient. Near dp=dpValve_closing, the valve - is fully open and the flow coefficient saturates to the flow - coefficient value determined by dpValve_nominal and - m_flow_nominal. For typical valve diameters, the check - valve is only fully open near nominal mass flow rate. Therefore, the - model sets dpValve_closing=dpValve_nominal/2 by default. + Similarly, for AixLib.Fluid.Movers.FlowControlled_m_flow, + the mass flow rate is as follows:

    - --------- Errors -------- -line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FixedResistances/PressureDrop.mo ---- --------- HTML Code -------- - -

    - Model of a flow resistance with a fixed flow coefficient. - The mass flow rate is -

    -

    - ṁ = k - √ΔP, -

    -

    - where - k is a constant and - ΔP is the pressure drop. - The constant k is equal to - k=m_flow_nominal/sqrt(dp_nominal), - where m_flow_nominal and dp_nominal - are parameters. -

    -

    Assumptions

    -

    - In the region - abs(m_flow) < m_flow_turbulent, - the square root is replaced by a differentiable function - with finite slope. - The value of m_flow_turbulent is - computed as - m_flow_turbulent = deltaM * abs(m_flow_nominal), - where deltaM=0.3 and - m_flow_nominal are parameters that can be set by the user. -

    -

    - The figure below shows the pressure drop for the parameters - m_flow_nominal=5 kg/s, - dp_nominal=10 Pa and - deltaM=0.3. -

    -

    - \"image\" -

    -

    Important parameters

    -

    - The parameter from_dp is used to determine - whether the mass flow rate is computed as a function of the - pressure drop (if from_dp=true), or vice versa. - This setting can affect the size of the nonlinear system of equations. -

    -

    - If the parameter linearized is set to true, - then the pressure drop is computed as a linear function of the - mass flow rate. -

    -

    - Setting allowFlowReversal=false can lead to simpler - equations. However, this should only be set to false - if one can guarantee that the flow never reverses its direction. - This can be difficult to guarantee, as pressure imbalance after - the initialization, or due to medium expansion and contraction, - can lead to reverse flow. -

    -

    - If the parameter - show_T is set to true, - then the model will compute the - temperature at its ports. Note that this can lead to state events - when the mass flow rate approaches zero, - which can increase computing time. -

    -

    Notes

    -

    - For more detailed models that compute the actual flow friction, - models from the package - - Modelica.Fluid - can be used and combined with models from the - AixLib library. -

    -

    - For a model that uses the hydraulic parameter and flow velocity at nominal conditions - as a parameter, use - - AixLib.Fluid.FixedResistances.HydraulicDiameter. -

    -

    Implementation

    -

    - The pressure drop is computed by calling a function in the package - - AixLib.Fluid.BaseClasses.FlowModels, - This package contains regularized implementations of the equation -

    -

    - m = sign(Δp) k √ Δp   -

    -

    - and its inverse function. -

    -

    - To decouple the energy equation from the mass equations, - the pressure drop is a function of the mass flow rate, - and not the volume flow rate. - This leads to simpler equations. -

    - - - --------- Corrected Code -------- +
  • +

    + If the parameter + inputType==AixLib.Fluid.Types.InputType.Constant, + the mass flow rate is m_flow=constantMassFlowRate, + where constantMassFlowRate is a parameter. +

    +
  • +
  • +

    + If the parameter + inputType==AixLib.Fluid.Types.InputType.Stages, the + mass flow rate is m_flow=massFlowRates, where + massFlowRates is a vectorized parameter. For + example, if a mover has two stages and the mass flow rate of the + first stage should be 60% of the nominal mass flow rate + and the second stage equal to m_flow_nominal, set + massFlowRates={0.6, 1}*m_flow_nominal. Then, the + mover will have the following mass flow rates: +

    + + + + + + + + + + + + + + + + + +
    + input signal stage + + Mass flow rates [kg/s] +
    + 0 + + 0 +
    + 1 + + 0.6*m_flow_nominal +
    + 2 + + m_flow_nominal +
    +
  • +

    - Model of a flow resistance with a fixed flow coefficient. The mass - flow rate is -

    -

    - ṁ = k √ΔP, + These two models do not need to use a performance curve for the flow + characteristics. The reason is that

    +

    - where k is a constant and ΔP is the pressure drop. The - constant k is equal to - k=m_flow_nominal/sqrt(dp_nominal), where - m_flow_nominal and dp_nominal are - parameters. + However, the computation of the electrical power consumption requires + the mover speed to be known and the computation of the mover speed + requires the performance curves for the flow and efficiency/power + characteristics. Therefore these performance curves do need to be + provided if the user desires a correct electrical power computation. + If the curves are not provided, a simplified computation is used, + where the efficiency curve is used and assumed to be correct for all + speeds. This loss of accuracy has the advantage that it allows to use + the mover models without requiring flow and efficiency/power + characteristics.

    -

    - Assumptions -

    - In the region abs(m_flow) < m_flow_turbulent, the - square root is replaced by a differentiable function with finite - slope. The value of m_flow_turbulent is computed as - m_flow_turbulent = deltaM * abs(m_flow_nominal), where - deltaM=0.3 and m_flow_nominal are - parameters that can be set by the user. + The model AixLib.Fluid.Movers.FlowControlled_dp + has an option to control the mover such that the pressure difference + set point is obtained across two remote points in the system. To use + this functionality parameter prescribeSystemPressure has + to be enabled and a differential pressure measurement must be + connected to the pump input dpMea. This functionality is + demonstrated in AixLib.Fluid.Movers.Validation.FlowControlled_dpSystem.

    - The figure below shows the pressure drop for the parameters - m_flow_nominal=5 kg/s, dp_nominal=10 Pa and - deltaM=0.3. + The models AixLib.Fluid.Movers.FlowControlled_dp + and AixLib.Fluid.Movers.FlowControlled_m_flow + both have a parameter m_flow_nominal. For AixLib.Fluid.Movers.FlowControlled_m_flow, + this parameter is used for convenience to set a default value for the + parameters constantMassFlowRate and + massFlowRates. For both models, the value is also used + for the following: +

    + +

    + However, otherwise m_flow_nominal does not affect the + mass flow rate of the mover as the mass flow rate is determined by + the input signal or the above explained parameters. +

    +
    + Start-up and shut-down transients +
    +

    + All models have a parameter use_inputFilter. This + parameter affects the fan output as follows: +

    +
      +
    1. If use_inputFilter=false, then the input signal + y (or Nrpm, m_flow_in, or + dp_in) is equal to the fan speed (or the mass flow rate + or pressure rise). Thus, a step change in the input signal causes a + step change in the fan speed (or mass flow rate or pressure rise). +
    2. +
    3. If use_inputFilter=true, which is the default, then + the fan speed (or the mass flow rate or the pressure rise) is equal + to the output of a filter. This filter is implemented as a 2nd order + differential equation and can be thought of as approximating the + inertia of the rotor and the fluid. Thus, a step change in the fan + input signal will cause a gradual change in the fan speed. The filter + has a parameter riseTime, which by default is set to + 30 seconds. The rise time is the time required to reach + 99.6% of the full speed, or, if the fan is switched off, to + reach a fan speed of 0.4%. +
    4. +
    +

    + The figure below shows for a fan with + use_inputFilter=true and riseTime=30 + seconds the speed input signal and the actual speed.

    \"image\" + \"modelica://AixLib/Resources/Images/Fluid/Movers/UsersGuide/fanSpeedFiltered.png\">

    -

    - Important parameters -

    - The parameter from_dp is used to determine whether the - mass flow rate is computed as a function of the pressure drop (if - from_dp=true), or vice versa. This setting can affect - the size of the nonlinear system of equations. + Although many simulations do not require such a detailed model that + approximates the transients of fans or pumps, it turns out that using + this filter can reduce computing time and can lead to fewer + convergence problems in large system models. With a filter, any + sudden change in control signal, such as when a fan switches on, is + damped before it affects the air flow rate. This continuous change in + flow rate turns out to be easier, and in some cases faster, to + simulate compared to a step change. For most simulations, we + therefore recommend to use the default settings of + use_inputFilter=true and riseTime=30 + seconds. An exception are situations in which the fan or pump is + operated at a fixed speed during the whole simulation. In this case, + set use_inputFilter=false.

    - If the parameter linearized is set to true, - then the pressure drop is computed as a linear function of the mass - flow rate. + Note that if the fan is part of a closed loop control, then the + filter affects the transient response of the control. When changing + the value of use_inputFilter, the control gains may need + to be retuned. We now present values control parameters that seem to + work in most cases. Suppose there is a closed loop control with a + PI-controller AixLib.Controls.Continuous.LimPID + and a fan or pump, configured with use_inputFilter=true + and riseTime=30 seconds. Assume that the transient + response of the other dynamic elements in the control loop is fast + compared to the rise time of the filter. Then, a proportional gain of + k=0.5 and an integrator time constant of + Ti=15 seconds often yields satisfactory closed loop + control performance. These values may need to be changed for + different applications as they are also a function of the loop gain. + If the control loop shows oscillatory behavior, then reduce + k and/or increase Ti. If the control loop + reacts too slow, do the opposite.

    +
    + Efficiency and electrical power consumption +

    - Setting allowFlowReversal=false can lead to simpler - equations. However, this should only be set to false if - one can guarantee that the flow never reverses its direction. This - can be difficult to guarantee, as pressure imbalance after the - initialization, or due to medium expansion and contraction, can lead - to reverse flow. + All models compute the motor power draw Pele, the + hydraulic power input Whyd, the flow work + Wflo and the heat dissipated into the medium + Q. Based on the first law, the flow work is +

    +

    + Wflo = | V̇ Δp |,

    - If the parameter show_T is set to true, - then the model will compute the temperature at its ports. Note that - this can lead to state events when the mass flow rate approaches - zero, which can increase computing time. + where is the volume flow rate and Δp is the pressure + rise. The heat dissipated into the medium is as follows: If the motor + is cooled by the fluid, as indicated by + per.motorCooledByFluid=true, then the heat dissipated + into the medium is +

    +

    + Q = Pele - Wflo.

    -

    - Notes -

    - For more detailed models that compute the actual flow friction, - models from the package Modelica.Fluid can be used and - combined with models from the AixLib library. + If per.motorCooledByFluid=false, then the motor is + outside the fluid stream, and only the shaft, or hydraulic, work + Whyd enters the thermodynamic control volume. + Hence, +

    +

    + Q = Whyd - Wflo.

    - For a model that uses the hydraulic parameter and flow velocity at - nominal conditions as a parameter, use AixLib.Fluid.FixedResistances.HydraulicDiameter. + The efficiencies are computed as +

    +

    + η = Wflo ⁄ Pele = ηhyd   + ηmot
    + ηhyd = Wflo ⁄ Whyd
    + ηmot = Whyd ⁄ Pele

    -

    - Implementation -

    - The pressure drop is computed by calling a function in the package - AixLib.Fluid.BaseClasses.FlowModels, - This package contains regularized implementations of the equation + where ηhyd is the hydraulic efficiency, + ηmot is the motor efficiency and Q is the + heat released by the motor. +

    +

    + If per.use_powerCharacteristic=true, then a set of data + points for the power Pele for different volume flow + rates at full speed needs to be provided by the user. Using the flow + work Wflo and the electrical power input + Pele, the total efficiency is computed as

    - m = sign(Δp) k √ Δp -   + η = Wflo ⁄ Pele,

    - and its inverse function. + and the two efficiencies ηhyd and + ηmot are computed as +

    +

    + ηhyd = 1,
    + ηmot = η.

    - To decouple the energy equation from the mass equations, the pressure - drop is a function of the mass flow rate, and not the volume flow - rate. This leads to simpler equations. + However, if per.use_powerCharacteristic=false, then + performance data for ηhyd and + ηmot need to be provided by the user, and hence the + model computes

    -

    - Implementation + Outputs required

    -
    - Start and end data for annual weather data files -

    - The TMY3 weather data, as well as the EnergyPlus weather data, start - at 1:00 AM on January 1, and provide hourly data until midnight on - December 31. Thus, the first entry for temperatures, humidity, wind - speed etc. are values at 1:00 AM and not at midnight. Furthermore, - the TMY3 weather data files can have values at midnight of December - 31 that may be significantly different from the values at 1:00 AM on - January 1. Since annual simulations require weather data that start - at 0:00 on January 1, data need to be provided for this hour. Due to - the possibly large change in weatherdata between 1:00 AM on January 1 - and midnight at December 31, the weather data files in the AixLib - library do not use the data entry from midnight at December 31 as the - value for t=0. Rather, the value from 1:00 AM on January 1 is - duplicated and used for 0:00 on January 1. To maintain a data record - with 8760 hours, the weather data record from midnight at - December 31 is deleted. These changes in the weather data file are - done in the Java program - AixLib/Resources/bin/ConvertWeatherData.jar that - converts EnergyPlus weather data file to Modelica weather data files, - and which is described above. The length of the weather data is - calculated as the end time stamp minus start time stamp plus average - increment, where the average increment is equal to the end time stamp - minus start time stamp divided by the number of rows minus 1. This - only works correctly for weather files with equidistant time stamps. + Annual Outputs

    -
    - Time shift for solar radiation data -

    - To read weather data from the TMY3 weather data file, there are two - data readers in this model. One data reader obtains all data except - solar radiation, and the other data reader reads only the solar - radiation data, shifted by 30 minutes. The reason for this - time shift is as follows: The TMY3 weather data file contains for - solar radiation the \"...radiation received on a horizontal surface - during the 60-minute period ending at the timestamp.\" Thus, as the - figure below shows, a more accurate interpolation is obtained if time - is shifted by 30 minutes prior to reading the weather data. -

    -

    - \"image\" +  The following outputs are provided for an annual + simulation:

    -

    - References -

    -
    +

    + Hourly Outputs +

    +

    + The following outputs are provided for each hour of the days + specified for each test case in Table 3: +

    +
    +

    + Table 3: Specific Days for Output +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Case +

    +
    +

    + Days +

    +
    +

    + WD100 +

    +
    +

    + May 4th, July 14th, September 6th +

    +
    +

    + WD200 +

    +
    +

    + May 24th, August 26th +

    +
    +

    + WD300 +

    +
    +

    + February 7th, August 13th +

    +
    +

    + WD400 +

    +
    +

    + January 24th, July 1st +

    +
    +

    + WD500 +

    +
    +

    + March 1st, September 14th +

    +
    +

    + WD600 +

    +
    +

    + May 4th, July 14th, September 6th +

    +

    +

    + Sub-hourly Outputs +

    +

    + The following outputs are provided at each timestep of the days + specified for each test case in Table 3: +

    + +

    + The following outputs are provided integrated hourly for the days + specified for each test case in Table 3: +

    + +

    + Validation results +

    +

    + (Not available yet) +

    +

    + Implementation +

    +

    + To generate the data shown in this user guide, run +

    +
    +cd AixLib/Resources/Data/BoundaryConditions/Validation/BESTEST
    +python3 generateResults.py -p
    +
    +

    + At the beginning of the Python script there are several options that + the user can choose, by default the script will: +

    + +

    + References +

    +

    + (Not available yet) +

    + -------- Errors -------- -line 24 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 -line 425 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 -line 469 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 -line 640 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 14 column 1 - Warning: The summary attribute on the

    element is obsolete in HTML5 +line 98 column 1 - Warning: The summary attribute on the
    element is obsolete in HTML5 ----- AixLib/BoundaryConditions/Validation/BESTEST/WD300.mo ---- +---- AixLib/Fluid/Chillers/Carnot_TEva.mo ---- -------- HTML Code -------- +

    + This is a model of a chiller whose coefficient of performance COP changes + with temperatures in the same way as the Carnot efficiency changes. + The control input is the setpoint of the evaporator leaving temperature, which + is met exactly at steady state if the chiller has sufficient capacity. +

    +

    + The model allows to either specify the Carnot effectivness + ηCarnot,0, or + a COP0 + at the nominal conditions, together with + the evaporator temperature Teva,0 and + the condenser temperature Tcon,0, in which + case the model computes the Carnot effectivness as +

    +

    + ηCarnot,0 = + COP0 + ⁄ (Teva,0 ⁄ (Tcon,0-Teva,0)). +

    +

    + On the Advanced tab, a user can specify the temperatures that + will be used as the evaporator and condenser temperature. +

    +

    + During the simulation, the chiller COP is computed as the product +

    +

    + COP = ηCarnot,0 COPCarnot ηPL, +

    +

    + where COPCarnot is the Carnot efficiency and + ηPL is a polynomial in the cooling part load ratio yPL + that can be used to take into account a change in COP at part load + conditions. + This polynomial has the form +

    +

    + ηPL = a1 + a2 yPL + a3 yPL2 + ... +

    +

    + where the coefficients ai + are declared by the parameter a. +

    +

    + On the Dynamics tag, the model can be parametrized to compute a transient + or steady-state response. + The transient response of the model is computed using a first + order differential equation for the evaporator and condenser fluid volumes. + The chiller outlet temperatures are equal to the temperatures of these lumped volumes. +

    +

    Typical use and important parameters

    +

    + When using this component, make sure that the condenser has sufficient mass flow rate. + Based on the evaporator mass flow rate, temperature difference and the efficiencies, + the model computes how much heat will be added to the condenser. + If the mass flow rate is too small, very high outlet temperatures can result. +

    +

    + The evaporator heat flow rate QEva_flow_nominal is used to assign + the default value for the mass flow rates, which are used for the pressure drop + calculations. + It is also used to compute the part load efficiency. + Hence, make sure that QEva_flow_nominal is set to a reasonable value. +

    +

    + The maximum cooling capacity is set by the parameter QEva_flow_min, + which is by default set to negative infinity. +

    +

    + The coefficient of performance depends on the + evaporator and condenser leaving temperature + since otherwise the second law of thermodynamics may be violated. +

    +

    Notes

    +

    + For a similar model that can be used as a heat pump, see + + AixLib.Fluid.HeatPumps.Examples.Carnot_TCon. +

    + -

    WD300: Southern Hemisphere Case

    -

    Weather data file : WD300.epw

    -

    Table 1: Site Data for Weather file WD300.epw

    -
    - - - - - - - - - - - - - - - -

    Latitude

    33.393° south

    Longitude

    70.786° west

    Altitude

    474 m

    Time Zone

    -4

    - -------- Corrected Code -------- +

    + This is a model of a chiller whose coefficient of performance COP + changes with temperatures in the same way as the Carnot efficiency + changes. The control input is the setpoint of the evaporator leaving + temperature, which is met exactly at steady state if the chiller has + sufficient capacity. +

    +

    + The model allows to either specify the Carnot effectivness + ηCarnot,0, or a COP0 at the + nominal conditions, together with the evaporator temperature + Teva,0 and the condenser temperature + Tcon,0, in which case the model computes the Carnot + effectivness as +

    +

    + ηCarnot,0 = COP0 ⁄ (Teva,0 ⁄ + (Tcon,0-Teva,0)). +

    +

    + On the Advanced tab, a user can specify the temperatures + that will be used as the evaporator and condenser temperature. +

    +

    + During the simulation, the chiller COP is computed as the product +

    +

    + COP = ηCarnot,0 COPCarnot ηPL, +

    +

    + where COPCarnot is the Carnot efficiency and + ηPL is a polynomial in the cooling part load ratio + yPL that can be used to take into account a change + in COP at part load conditions. This polynomial has the form +

    +

    + ηPL = a1 + a2 yPL + + a3 yPL2 + ... +

    +

    + where the coefficients ai are declared by the + parameter a. +

    +

    + On the Dynamics tag, the model can be parametrized to + compute a transient or steady-state response. The transient response + of the model is computed using a first order differential equation + for the evaporator and condenser fluid volumes. The chiller outlet + temperatures are equal to the temperatures of these lumped volumes. +

    +

    + Typical use and important parameters +

    +

    + When using this component, make sure that the condenser has + sufficient mass flow rate. Based on the evaporator mass flow rate, + temperature difference and the efficiencies, the model computes how + much heat will be added to the condenser. If the mass flow rate is + too small, very high outlet temperatures can result. +

    +

    + The evaporator heat flow rate QEva_flow_nominal is used + to assign the default value for the mass flow rates, which are used + for the pressure drop calculations. It is also used to compute the + part load efficiency. Hence, make sure that + QEva_flow_nominal is set to a reasonable value. +

    +

    + The maximum cooling capacity is set by the parameter + QEva_flow_min, which is by default set to negative + infinity. +

    +

    + The coefficient of performance depends on the evaporator and + condenser leaving temperature since otherwise the second law of + thermodynamics may be violated. +

    +

    + Notes +

    +

    + For a similar model that can be used as a heat pump, see AixLib.Fluid.HeatPumps.Examples.Carnot_TCon. +

    -

    - WD300: Southern Hemisphere Case -

    -

    - Weather data file : WD300.epw -

    -

    - Table 1: Site Data for Weather file WD300.epw -

    - - - - - - - - - - - - - - - - - -
    -

    - Latitude -

    -
    -

    - 33.393° south -

    -
    -

    - Longitude -

    -
    -

    - 70.786° west -

    -
    -

    - Altitude -

    -
    -

    - 474 m -

    -
    -

    - Time Zone -

    -
    -

    - -4 -

    -
    -------- Errors -------- -line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 39 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Utilities/Math/Functions/bicubic.mo ---- +---- AixLib/Utilities/Math/Biquadratic.mo ---- -------- HTML Code -------- - This function computes +

    + This block computes +

    - y = a1 - + a2 x1 + a3 x12 - + a4 x2 + a5 x22 - + a6 x1 x2 - + a7 x1^3 - + a8 x2^3 - + a9 x12 x2 - + a10 x1 x22 + y = a1 + a2 x1 + + a3 x12 + + a4 x2 + a5 x22 + + a6 x1 x2

    -------- Corrected Code -------- -This function computes +

    + This block computes +

    y = a1 + a2 x1 + a3 x12 + a4 x2 + a5 x22 + a6 x1 - x2 + a7 x1^3 + a8 - x2^3 + a9 x12 - x2 + a10 x1 - x22 + x2

    -------- Errors -------- -line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/cylindricalHeatSource.mo ---- +---- AixLib/Fluid/Sensors/SensibleEnthalpyFlowRate.mo ---- -------- HTML Code --------

    - This function evaluates the cylindrical heat source solution. This solution - gives the relation between the constant heat transfer rate (per unit length) - injected by a cylindrical heat source of infinite length and the temperature - raise in the medium. The cylindrical heat source solution is defined by + This model outputs the sensible enthalphy flow rate of the medium in the flow + between its fluid ports. In particular, if the total enthalpy flow rate is

    -

    - \"image\" +

    + Ḣtot = Ḣsen + Ḣlat,

    - where ΔT(t,r) is the temperature raise after a time t of - constant heat injection and at a distance r from the cylindrical source, - Q' is the heat injection rate per unit length, ks is - the soil thermal conductivity, Fo is the Fourier number, - aSois is the ground thermal diffusivity, - rb is the radius of the cylindrical source and G - is the cylindrical heat source solution. + where + sen = ṁ (1-Xw) cp,air, + then this sensor outputs Ḣ = Ḣsen.

    +

    - The cylindrical heat source solution is given by: -

    -

    - \"image\" + If the parameter tau is non-zero, then the measured + specific sensible enthalpy hout that is used to + compute the sensible enthalpy flow rate + sen = ṁ hout + is computed using a first order differential equation. + See + AixLib.Fluid.Sensors.UsersGuide for an explanation.

    +

    - The integral is solved numerically, with the integrand defined in - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource_Integrand. + For a sensor that measures + tot, use + + AixLib.Fluid.Sensors.EnthalpyFlowRate.
    + For a sensor that measures + lat, use + + AixLib.Fluid.Sensors.LatentEnthalpyFlowRate.

    +

    + The sensor is ideal, i.e., it does not influence the fluid. + The sensor can only be used with medium models that implement the function + enthalpyOfNonCondensingGas(T).

    + + -------- Corrected Code --------

    - This function evaluates the cylindrical heat source solution. This - solution gives the relation between the constant heat transfer rate - (per unit length) injected by a cylindrical heat source of infinite - length and the temperature raise in the medium. The cylindrical heat - source solution is defined by + This model outputs the sensible enthalphy flow rate of the + medium in the flow between its fluid ports. In particular, if the + total enthalpy flow rate is +

    +

    + Ḣtot = Ḣsen + Ḣlat, +

    +

    + where sen = ṁ (1-Xw) + cp,air, then this sensor outputs Ḣ = + Ḣsen. +

    +

    + If the parameter tau is non-zero, then the measured + specific sensible enthalpy hout that is used to + compute the sensible enthalpy flow rate sen = ṁ + hout is computed using a first order differential + equation. See AixLib.Fluid.Sensors.UsersGuide + for an explanation. +

    +

    + For a sensor that measures tot, use AixLib.Fluid.Sensors.EnthalpyFlowRate.
    + + For a sensor that measures lat, use AixLib.Fluid.Sensors.LatentEnthalpyFlowRate. +

    +

    + The sensor is ideal, i.e., it does not influence the fluid. The + sensor can only be used with medium models that implement the + function enthalpyOfNonCondensingGas(T). +

    + + +-------- Errors -------- +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/HeatExchangers/ActiveBeams/UsersGuide.mo ---- +-------- HTML Code -------- + +

    +This package contains models of active beams. +Active beams are devices used for heating, cooling and ventilation of spaces. +A schematic diagram of an active beam unit is given below. +

    +

    +\"image\" +

    +

    +The active beam unit consists of a primary air plenum, a mixing chamber, a heat exchanger (coil) and several nozzles. +Typically, an air-handling unit supplies primary air to the active beams. +The primary air is discharged to the mixing chamber through the nozzles. +This generates a low-pressure region which induces air from the room up through the heat exchanger, +where hot or cold water is circulating. +The conditioned induced air is then mixed with primary air, and the mixture descents back to the space. +

    +

    +This package contains two models. The model + +AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling +is for cooling only, while the model + +AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating +has two water streams, one for heating and one for cooling.

    -

    - \"image\" + +

    Model equations for cooling

    +

    +The performance of the model + +AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling +is computed based on manufacturer data +specified in the package + +AixLib.Fluid.HeatExchangers.ActiveBeams.Data.

    - where ΔT(t,r) is the temperature raise after a time t - of constant heat injection and at a distance r from the - cylindrical source, Q' is the heat injection rate per unit - length, ks is the soil thermal conductivity, - Fo is the Fourier number, aSois is the - ground thermal diffusivity, rb is the radius of the - cylindrical source and G is the cylindrical heat source - solution. +For off-design conditions, the performance is adjusted using modification factors +that account for changes in water flow rate, +primary air flow rate and temperature difference. +The total heat flow rate of the active beam unit is the sum of the heat flow rate provided by the primary air supply +Qsa and the cooling heat flow rate provided by the beam convector Qc,Beam +which injects room air and mixes it with the primary air.

    - The cylindrical heat source solution is given by: +The heat flow rate +Qsa is delivered to a thermal zone +through the fluid ports, while the heat flow rate from the convector Qc,Beam +is coupled directly to the heat port. +See for example + +AixLib.Fluid.HeatExchangers.ActiveBeams.Examples.CoolingOnly +for how to connect these heat flow rates to a control volume.

    -

    - \"image\" +

    +The primary air contribution is +

    +

    + Qsa = ṁsa cp,sa (Tsa-Tz)

    - The integral is solved numerically, with the integrand defined in - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource_Integrand. +where sa is the primary air mass flow rate, +cp,sa is the air specific heat capacity, +Tsa is the primary air temperature +and Tz is the zone air temperature.

    - +

    +The heat flow rate of the beam convector Qc,Beam is determined using +the rated capacity which is modified by three separate functions as +

    +

    + Qc,Beam = Qc,nominal +fΔT ( ΔTc ⁄ ΔTc,nominal ) +fsa( ṁsa ⁄ ṁsa,nominal ) +fw( ṁc,w ), +

    +

    +the modification factors are as follows: +The modification factor fΔT(·) +describes how the capacity is adjusted to account for the temperature difference +between the zone air and the water entering the convector. +The independent variable is the ratio between the current temperature difference +ΔTc and the temperature difference used to rate beam performance ΔTc,nominal. +The temperature difference is +

    +

    + ΔTc = Tcw-Tz, +

    +

    +where Tcw is the chilled water temperature entering the convector. --------- Errors -------- -line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 23 column 2 - Warning:

    attribute "align" not allowed for HTML5 +The modification factor fsa(·) adjusts the cooling capacity to account for varying primary air flow rate. +The independent variable is the ratio between the current primary air flow rate sa +and the nominal air flow rate used to rate the beam performance. +The modification factor fw(·) adjusts the cooling capacity for changes in water flow rate through the convector. +The independent variable is the ratio between the current water flow rate w +and the nominal water flow rate used to rate the beam performance. +

    ----- AixLib/Fluid/Actuators/Valves/ThreeWayTable.mo ---- --------- HTML Code -------- +

    Model equations for heating

    +

    +The performance of the model + +AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating +is computed identical to the above described model that only provides cooling, +with the exception that this model contains an additional water stream that +can be used to provide heating. +

    +

    +For the heating water stream, the temperature difference ΔTh +used for the calculation of the modification factor fΔT(·) is +

    +

    +ΔTh = Thw-Tz, +

    +

    +where Thw is the hot water temperature entering the convector in heating mode +and Tz is the zone air temperature. +

    + +

    Dynamics

    +

    +The model can be configured to be steady-state or dynamic. +If configured as dynamic, then a dynamic conservation equation is applied to the water streams +for heating and for cooling. +However, because the capacity of the beam depends on its inlet temperature, and is independent of the +outlet temperature, the heat transferred +to the room at the port heaPor.Q_flow, as well as the heat added to or removed from the +water streams, will instantaneously change. +The only dynamic responses are the water outlet temperatures, which change with a first +order response, parameterized with the time constant tau. +

    + +

    Energy balance

    +

    +All heat flow rate that is added to or extracted from the room is transmitted through the heat port +heaPor. Hence, this model does not cool the supply air between the ports +air_a and air_b. Rather, it adds this heat flow rate +to the heat port heaPor. +The rationale for this implementation is that the beam transfers heat by convection directly to the room, and +by induction of room air into the supply air. As this split of heat flow rate is generally not known, +and because the amount of inducted air is also unknown, +it was decided to transfer all heat through the heat port heaPor. +This also avoids having to add an extra air flow path for the air induced from the room. +

    -

    - Three way valve with table-specified opening characteristics. - A separate characteristic for each flow path is used. -

    -

    - Each flow path uses an instance of the model - - AixLib.Fluid.Actuators.Valves.TwoWayTable. - Therefore, this model needs to be parameterized the same way as - - AixLib.Fluid.Actuators.Valves.TwoWayTable. - Specifically, - the mass flow rate for the fully open valve is determined based - on the value of the parameter CvData. - For the different valve positions y ∈ [0, 1], this nominal flow rate is - scaled by the values of the parameter - flowCharacteristics1 and flowCharacteristics3, respectively. - These parameters declare a table of the form -

    -
    - - - - - - -
    y 0 ... 1
    φ l ... 1
    -

    - where l = Kv(y=0)/Kv(y=1) > 0 is the valve leakage. - The first row is the valve opening, and the second row is the - mass flow rate, relative to the mass flow rate of the fully open - valve, under the assumption of a constant pressure difference across the - valve. - A suggested value for the valve leakage is l=0.0001. - If l = 0, then this model will replace it with - l = 10-8 for numerical reasons. - For example, if a valve has Kv=0.5 [m3/h/bar1/2] and - a linear opening characteristics and - a valve leakage of l=0.0001, then one would set -

    -
    -  CvData=AixLib.Fluid.Types.CvTypes.Kv
    -  Kv = 0.5
    -  flowCharacteristics1(y={0,1}, phi={0.0001,1})
    -  flowCharacteristics3(y={0,1}, phi={0.0001,1})
    - 
    -

    - Note, however, that - - AixLib.Fluid.Actuators.Valves.ThreeWayLinear provides a more - efficient implementation for this simple case. -

    -

    - The parameters flowCharacteristics1 and flowCharacteristics3 must meet the following - requirements, otherwise the model stops with an error: -

    - -

    - This model is based on the partial valve model - - AixLib.Fluid.Actuators.BaseClasses.PartialTwoWayValve. - Check this model for more information, such - as the regularization near the origin. -

    -

    - For an example that specifies an opening characteristics, see - - AixLib.Fluid.Actuators.Valves.Examples.TwoWayValveTable. -

    - - - - -------- Corrected Code --------

    - Three way valve with table-specified opening characteristics. A - separate characteristic for each flow path is used. + This package contains models of active beams. Active beams are + devices used for heating, cooling and ventilation of spaces. A + schematic diagram of an active beam unit is given below. +

    +

    + \"image\"

    - Each flow path uses an instance of the model AixLib.Fluid.Actuators.Valves.TwoWayTable. - Therefore, this model needs to be parameterized the same way as + The active beam unit consists of a primary air plenum, a mixing + chamber, a heat exchanger (coil) and several nozzles. Typically, an + air-handling unit supplies primary air to the active beams. The + primary air is discharged to the mixing chamber through the nozzles. + This generates a low-pressure region which induces air from the room + up through the heat exchanger, where hot or cold water is + circulating. The conditioned induced air is then mixed with primary + air, and the mixture descents back to the space. +

    +

    + This package contains two models. The model AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling + is for cooling only, while the model + AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating has two + water streams, one for heating and one for cooling. +

    +

    + Model equations for cooling +

    +

    + The performance of the model AixLib.Fluid.HeatExchangers.ActiveBeams.Cooling + is computed based on manufacturer data specified in the package AixLib.Fluid.Actuators.Valves.TwoWayTable. - Specifically, the mass flow rate for the fully open valve is - determined based on the value of the parameter CvData. - For the different valve positions y ∈ [0, 1], this nominal - flow rate is scaled by the values of the parameter - flowCharacteristics1 and - flowCharacteristics3, respectively. These parameters - declare a table of the form + \"modelica://AixLib.Fluid.HeatExchangers.ActiveBeams.Data\">AixLib.Fluid.HeatExchangers.ActiveBeams.Data.

    - - - - - - - - - - - - - -
    - y - - 0 - - ... - - 1 -
    - φ - - l - - ... - - 1 -

    - where l = Kv(y=0)/Kv(y=1) > 0 is the - valve leakage. The first row is the valve opening, and the second row - is the mass flow rate, relative to the mass flow rate of the fully - open valve, under the assumption of a constant pressure difference - across the valve. A suggested value for the valve leakage is - l=0.0001. If l = 0, then this model will replace it - with l = 10-8 for numerical reasons. For example, - if a valve has Kv=0.5 - [m3/h/bar1/2] and a linear opening - characteristics and a valve leakage of l=0.0001, then one - would set + For off-design conditions, the performance is adjusted using + modification factors that account for changes in water flow rate, + primary air flow rate and temperature difference. The total heat flow + rate of the active beam unit is the sum of the heat flow rate + provided by the primary air supply Qsa and the + cooling heat flow rate provided by the beam convector + Qc,Beam which injects room air and mixes it with + the primary air.

    -
    -  CvData=AixLib.Fluid.Types.CvTypes.Kv
    -  Kv = 0.5
    -  flowCharacteristics1(y={0,1}, phi={0.0001,1})
    -  flowCharacteristics3(y={0,1}, phi={0.0001,1})
    - 

    - Note, however, that AixLib.Fluid.Actuators.Valves.ThreeWayLinear - provides a more efficient implementation for this simple case. + The heat flow rate Qsa is delivered to a thermal + zone through the fluid ports, while the heat flow rate from the + convector Qc,Beam is coupled directly to the heat + port. See for example + AixLib.Fluid.HeatExchangers.ActiveBeams.Examples.CoolingOnly for + how to connect these heat flow rates to a control volume.

    - The parameters flowCharacteristics1 and - flowCharacteristics3 must meet the following - requirements, otherwise the model stops with an error: + The primary air contribution is +

    +

    + Qsa = ṁsa cp,sa + (Tsa-Tz)

    -

    - This model is based on the partial valve model AixLib.Fluid.Actuators.BaseClasses.PartialTwoWayValve. - Check this model for more information, such as the regularization - near the origin. + where sa is the primary air mass flow rate, + cp,sa is the air specific heat capacity, + Tsa is the primary air temperature and + Tz is the zone air temperature.

    - For an example that specifies an opening characteristics, see - - AixLib.Fluid.Actuators.Valves.Examples.TwoWayValveTable. + The heat flow rate of the beam convector Qc,Beam is + determined using the rated capacity which is modified by three + separate functions as +

    +

    + Qc,Beam = Qc,nominal fΔT ( + ΔTc ⁄ ΔTc,nominal ) fsa( + ṁsa ⁄ ṁsa,nominal ) fw( + ṁc,w ), +

    +

    + the modification factors are as follows: The modification factor + fΔT(·) describes how the capacity is adjusted to + account for the temperature difference between the zone air and the + water entering the convector. The independent variable is the ratio + between the current temperature difference ΔTc and + the temperature difference used to rate beam performance + ΔTc,nominal. The temperature difference is +

    +

    + ΔTc = Tcw-Tz, +

    +

    + where Tcw is the chilled water temperature entering + the convector. The modification factor fsa(·) + adjusts the cooling capacity to account for varying primary air flow + rate. The independent variable is the ratio between the current + primary air flow rate sa and the nominal air flow + rate used to rate the beam performance. The modification factor + fw(·) adjusts the cooling capacity for changes in + water flow rate through the convector. The independent variable is + the ratio between the current water flow rate w + and the nominal water flow rate used to rate the beam performance. +

    +

    + Model equations for heating +

    +

    + The performance of the model + AixLib.Fluid.HeatExchangers.ActiveBeams.CoolingAndHeating is + computed identical to the above described model that only provides + cooling, with the exception that this model contains an additional + water stream that can be used to provide heating. +

    +

    + For the heating water stream, the temperature difference + ΔTh used for the calculation of the + modification factor fΔT(·) is +

    +

    + ΔTh = Thw-Tz, +

    +

    + where Thw is the hot water temperature entering the + convector in heating mode and Tz is the zone air + temperature. +

    +

    + Dynamics +

    +

    + The model can be configured to be steady-state or dynamic. If + configured as dynamic, then a dynamic conservation equation is + applied to the water streams for heating and for cooling. However, + because the capacity of the beam depends on its inlet temperature, + and is independent of the outlet temperature, the heat transferred to + the room at the port heaPor.Q_flow, as well as the heat + added to or removed from the water streams, will instantaneously + change. The only dynamic responses are the water outlet temperatures, + which change with a first order response, parameterized with the time + constant tau. +

    +

    + Energy balance +

    +

    + All heat flow rate that is added to or extracted from the room is + transmitted through the heat port heaPor. Hence, this + model does not cool the supply air between the ports + air_a and air_b. Rather, it adds this heat + flow rate to the heat port heaPor. The rationale for + this implementation is that the beam transfers heat by convection + directly to the room, and by induction of room air into the supply + air. As this split of heat flow rate is generally not known, and + because the amount of inducted air is also unknown, it was decided to + transfer all heat through the heat port heaPor. This + also avoids having to add an extra air flow path for the air induced + from the room.

    - -------- Errors -------- -line 21 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 7 column 1 - Warning:

    attribute "align" not allowed for HTML5 +line 59 column 1 - Warning:

    attribute "align" not allowed for HTML5 +line 72 column 1 - Warning:

    attribute "align" not allowed for HTML5 +line 87 column 1 - Warning:

    attribute "align" not allowed for HTML5 +line 115 column 1 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/BoundaryConditions/Validation/BESTEST/WD200.mo ---- +---- AixLib/Fluid/Movers/Validation/PowerSimplified.mo ---- -------- HTML Code -------- +

    + This example compares the power consumed by pumps that + take three different control signals. + Each pump has identical mass flow rate and pressure rise. +

    +

    + Note that for the instances + + AixLib.Fluid.Movers.FlowControlled_dp + and + + AixLib.Fluid.Movers.FlowControlled_m_flow, + we had to assign the efficiencies (otherwise the default constant + efficiency of 0.7 would have been used). + In these models, the power consumption is computed + using similarity laws, but using the mass flow rate as opposed + to the speed, because speed is not known in these two models. + This is an approximation at operating points in which + the speed is different from the nominal speed N_nominal + because similarity laws are valid for speed and not for + mass flow rate. +

    +

    + The figure below shows the approximation error for the + power calculation where the speed Nrpm differs from + the nominal speed Nnominal. +

    +

    + \"image\" +

    + -

    WD200: Low Elevation, Hot and Humid Case.

    -

    Weather data file : WD200.epw

    -

    Table 1: Site Data for Weather file WD200.epw

    -
    - - - - - - - - - - - - - - - -

    Latitude

    33.633° north

    Longitude

    84.433° west

    Altitude

    308 m

    Time Zone

    -5

    - -------- Corrected Code -------- +

    + This example compares the power consumed by pumps that take three + different control signals. Each pump has identical mass flow rate and + pressure rise. +

    +

    + Note that for the instances AixLib.Fluid.Movers.FlowControlled_dp + and AixLib.Fluid.Movers.FlowControlled_m_flow, + we had to assign the efficiencies (otherwise the default constant + efficiency of 0.7 would have been used). In these models, the + power consumption is computed using similarity laws, but using the + mass flow rate as opposed to the speed, because speed is not known in + these two models. This is an approximation at operating points in + which the speed is different from the nominal speed + N_nominal because similarity laws are valid for speed + and not for mass flow rate. +

    +

    + The figure below shows the approximation error for the power + calculation where the speed Nrpm differs from the + nominal speed Nnominal. +

    +

    + \"image\" +

    -

    - WD200: Low Elevation, Hot and Humid Case. -

    -

    - Weather data file : WD200.epw -

    -

    - Table 1: Site Data for Weather file WD200.epw -

    - - - - - - - - - - - - - - - - - -
    -

    - Latitude -

    -
    -

    - 33.633° north -

    -
    -

    - Longitude -

    -
    -

    - 84.433° west -

    -
    -

    - Altitude -

    -
    -

    - 308 m -

    -
    -

    - Time Zone -

    -
    -

    - -5 -

    -
    -------- Errors -------- -line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - +line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatPumps/Carnot_y.mo ---- --------- HTML Code -------- + +---- AixLib/Fluid/FMI/ExportContainers/HVACZone.mo ---- +-------- HTML Code --------

    - This is model of a heat pump whose coefficient of performance COP changes - with temperatures in the same way as the Carnot efficiency changes. - The input signal y is the control signal for the compressor. -

    -

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or - a COP0 - at the nominal conditions, together with - the evaporator temperature Teva,0 and - the condenser temperature Tcon,0, in which - case the model computes the Carnot effectivness as -

    -

    - ηCarnot,0 = - COP0 - ⁄ (Tcon,0 ⁄ (Tcon,0-Teva,0)). -

    -

    - The heat pump COP is computed as the product + Model that is used as a container for an HVAC system that is + to be exported as an FMU and that serves a single zone.

    -

    - COP = ηCarnot,0 COPCarnot ηPL, +

    Typical use and important parameters

    +

    + To use this model as a container for an FMU, extend + from this model, rather than instantiate it, + and add your HVAC system. By extending from this model, the top-level + signal connectors on the right stay at the top-level, and hence + will be visible at the FMI interface. + The example + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone + shows how a simple HVAC system can be implemented and exported as + an FMU. +

    - where COPCarnot is the Carnot efficiency and - ηPL is a polynomial in the heating part load ratio yPL - that can be used to take into account a change in COP at part load - conditions. - This polynomial has the form + The conversion between the fluid ports and signal ports is done + in the HVAC adapter hvacAda. + This adapter has a vector of fluid ports called ports. + The supply and return air ducts, including any resistance model for the inlet + diffusor or exhaust grill, need to be connected to these ports. + Also, if a thermal zone has interzonal air exchange or air infiltration, + these flows need to be connected to ports. + This model outputs at the port fluPor the mass flow rate for + each flow that is connected to ports, together with its + temperature, water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + If a medium has no moisture, e.g., if Medium.nXi=0, or + if it has no trace substances, e.g., if Medium.nC=0, then + the output signal for these properties are removed. + These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + Thus, a thermal zone model that uses these signals to compute the + heat added by the HVAC system needs to implement an equation such as

    - ηPL = a1 + a2 yPL + a3 yPL2 + ... + Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon),

    - where the coefficients ai are declared by the parameter a. + where + Qsen is the sensible heat flow rate added to the thermal zone, + sup is the supply air mass flow rate from + the port fluPor (which is negative if it is an exhaust), + cp is the specific heat capacity at constant pressure, + Tsup is the supply air temperature and + Tair,zon is the zone air temperature. + Note that without the max(·, ·), the energy + balance would be wrong.

    - On the Dynamics tag, the model can be parametrized to compute a transient - or steady-state response. - The transient response of the model is computed using a first - order differential equation for the evaporator and condenser fluid volumes. - The heat pump outlet temperatures are equal to the temperatures of these lumped volumes. + The input signals of this model are the zone radiative temperature. + The the zone air temperature, + the water vapor mass fraction per total mass of the air (unless Medium.nXi=0) + and trace substances (unless Medium.nC=0) are obtained from the connector + fluPor.backward. + The outflowing fluid stream(s) at the port ports will be at the + states obtained from fluPor.backward. + All fluid streams at port ports are at the same + pressure. + For convenience, the instance hvacAda also outputs the + properties obtained from fluPor.backward. These can be used + to connect a controller. The properties are available for each flow path in + fluPor.backward. For a thermal zone with mixed air, these are + all equal, while for a stratified room model, they can be different.

    -

    Typical use and important parameters

    +

    - When using this component, make sure that the evaporator and the condenser have sufficient mass flow rate. - Based on the mass flow rates, the compressor power, temperature difference and the efficiencies, - the model computes how much heat will be added to the condenser and removed at the evaporator. - If the mass flow rates are too small, very high temperature differences can result. + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone + for a model that uses this model.

    - The condenser heat flow rate QCon_flow_nominal is used to assign - the default value for the mass flow rates, which are used for the pressure drop - calculations. - It is also used to compute the part load efficiency. - Hence, make sure that QCon_flow_nominal is set to a reasonable value. + For models that multiple thermal zones connected to the HVAC system, + use the model + + AixLib.Fluid.FMI.ExportContainers.HVACZones.

    +

    Assumption and limitations

    - The maximum heating capacity is set by the parameter QCon_flow_max, - which is by default set to infinity. + The mass flow rates at ports sum to zero, hence this + model conserves mass.

    - The coefficient of performance depends on the - evaporator and condenser leaving temperature - since otherwise the second law of thermodynamics may be violated. + This model does not impose any pressure, other than setting the pressure + of all fluid connections to ports to be equal. + The reason is that setting a pressure can lead to non-physical system models, + for example if a mass flow rate is imposed and the HVAC system is connected + to a model that sets a pressure boundary condition such as + + AixLib.Fluid.Sources.Outside. + Also, setting a pressure would make it impossible to use multiple instances + of this model (one for each thermal zone) and build in Modelica an airflow network + model with pressure driven mass flow rates.

    -

    Notes

    - For a similar model that can be used as a chiller, see - AixLib.Fluid.Chillers.Carnot_y. + The model has no pressure drop. Hence, the pressure drop + of an air diffuser or of an exhaust grill needs to be modelled + in models that are connected to ports.

    -------- Corrected Code --------

    - This is model of a heat pump whose coefficient of performance COP - changes with temperatures in the same way as the Carnot efficiency - changes. The input signal y is the control signal for the - compressor. + Model that is used as a container for an HVAC system that is to be + exported as an FMU and that serves a single zone.

    +

    + Typical use and important parameters +

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or a COP0 at the - nominal conditions, together with the evaporator temperature - Teva,0 and the condenser temperature - Tcon,0, in which case the model computes the Carnot - effectivness as -

    -

    - ηCarnot,0 = COP0 ⁄ (Tcon,0 ⁄ - (Tcon,0-Teva,0)). + To use this model as a container for an FMU, extend from this model, + rather than instantiate it, and add your HVAC system. By extending + from this model, the top-level signal connectors on the right stay at + the top-level, and hence will be visible at the FMI interface. The + example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone shows + how a simple HVAC system can be implemented and exported as an FMU. +

    - The heat pump COP is computed as the product + The conversion between the fluid ports and signal ports is done in + the HVAC adapter hvacAda. This adapter has a vector of + fluid ports called ports. The supply and return air + ducts, including any resistance model for the inlet diffusor or + exhaust grill, need to be connected to these ports. Also, if a + thermal zone has interzonal air exchange or air infiltration, these + flows need to be connected to ports. This model outputs + at the port fluPor the mass flow rate for each flow that + is connected to ports, together with its temperature, + water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the + flow enters the room, even if the flow is zero or negative. If a + medium has no moisture, e.g., if Medium.nXi=0, or if it + has no trace substances, e.g., if Medium.nC=0, then the + output signal for these properties are removed. These quantities are + always as if the flow enters the room, even if the flow is zero or + negative. Thus, a thermal zone model that uses these signals to + compute the heat added by the HVAC system needs to implement an + equation such as

    - COP = ηCarnot,0 COPCarnot ηPL, + Qsen = max(0, ṁsup)   cp   + (Tsup - Tair,zon),

    - where COPCarnot is the Carnot efficiency and - ηPL is a polynomial in the heating part load ratio - yPL that can be used to take into account a change - in COP at part load conditions. This polynomial has the form + where Qsen is the sensible heat flow rate added to + the thermal zone, sup is the supply air mass flow + rate from the port fluPor (which is negative if it is an + exhaust), cp is the specific heat capacity at + constant pressure, Tsup is the supply air + temperature and Tair,zon is the zone air + temperature. Note that without the max(·, ·), the energy + balance would be wrong.

    -

    - ηPL = a1 + a2 yPL + - a3 yPL2 + ... +

    + The input signals of this model are the zone radiative temperature. + The the zone air temperature, the water vapor mass fraction per total + mass of the air (unless Medium.nXi=0) and trace + substances (unless Medium.nC=0) are obtained from the + connector fluPor.backward. The outflowing fluid + stream(s) at the port ports will be at the states + obtained from fluPor.backward. All fluid streams at port + ports are at the same pressure. For convenience, the + instance hvacAda also outputs the properties obtained + from fluPor.backward. These can be used to connect a + controller. The properties are available for each flow path in + fluPor.backward. For a thermal zone with mixed air, + these are all equal, while for a stratified room model, they can be + different.

    - where the coefficients ai are declared by the - parameter a. + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone for a + model that uses this model.

    - On the Dynamics tag, the model can be parametrized to - compute a transient or steady-state response. The transient response - of the model is computed using a first order differential equation - for the evaporator and condenser fluid volumes. The heat pump outlet - temperatures are equal to the temperatures of these lumped volumes. + For models that multiple thermal zones connected to the HVAC system, + use the model AixLib.Fluid.FMI.ExportContainers.HVACZones.

    - Typical use and important parameters + Assumption and limitations

    - When using this component, make sure that the evaporator and the - condenser have sufficient mass flow rate. Based on the mass flow - rates, the compressor power, temperature difference and the - efficiencies, the model computes how much heat will be added to the - condenser and removed at the evaporator. If the mass flow rates are - too small, very high temperature differences can result. -

    -

    - The condenser heat flow rate QCon_flow_nominal is used - to assign the default value for the mass flow rates, which are used - for the pressure drop calculations. It is also used to compute the - part load efficiency. Hence, make sure that - QCon_flow_nominal is set to a reasonable value. -

    -

    - The maximum heating capacity is set by the parameter - QCon_flow_max, which is by default set to infinity. + The mass flow rates at ports sum to zero, hence this + model conserves mass.

    - The coefficient of performance depends on the evaporator and - condenser leaving temperature since otherwise the second law of - thermodynamics may be violated. + This model does not impose any pressure, other than setting the + pressure of all fluid connections to ports to be equal. + The reason is that setting a pressure can lead to non-physical system + models, for example if a mass flow rate is imposed and the HVAC + system is connected to a model that sets a pressure boundary + condition such as AixLib.Fluid.Sources.Outside. + Also, setting a pressure would make it impossible to use multiple + instances of this model (one for each thermal zone) and build in + Modelica an airflow network model with pressure driven mass flow + rates.

    -

    - Notes -

    - For a similar model that can be used as a chiller, see AixLib.Fluid.Chillers.Carnot_y. + The model has no pressure drop. Hence, the pressure drop of an air + diffuser or of an exhaust grill needs to be modelled in models that + are connected to ports.

    -------- Errors -------- -line 16 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 34 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 47 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Movers/Validation/PowerSimplified.mo ---- +---- AixLib/Fluid/Actuators/BaseClasses/PartialDamperExponential.mo ---- -------- HTML Code --------

    - This example compares the power consumed by pumps that - take three different control signals. - Each pump has identical mass flow rate and pressure rise. + Partial model for air dampers with exponential opening characteristics. + This is the base model for air dampers. + The model implements the functions that relate the opening signal and the + flow coefficient. + The model also defines parameters that are used by different air damper + models.

    - Note that for the instances - - AixLib.Fluid.Movers.FlowControlled_dp - and - - AixLib.Fluid.Movers.FlowControlled_m_flow, - we had to assign the efficiencies (otherwise the default constant - efficiency of 0.7 would have been used). - In these models, the power consumption is computed - using similarity laws, but using the mass flow rate as opposed - to the speed, because speed is not known in these two models. - This is an approximation at operating points in which - the speed is different from the nominal speed N_nominal - because similarity laws are valid for speed and not for - mass flow rate. + The model is as in ASHRAE 825-RP except that a control signal of + y=0 means the damper is closed, and y=1 means + the damper is open. + This is opposite of the implementation of ASHRAE 825-RP, but used here + for consistency within this library.

    - The figure below shows the approximation error for the - power calculation where the speed Nrpm differs from - the nominal speed Nnominal. + For yL < y < yU, the damper characteristics is:

    -

    - \"image\" +

    + kd(y) = exp(a+b (1-y)) +

    +

    + where kd is the loss coefficient (total pressure drop divided + by dynamic pressure) and y is the fractional opening. +

    +

    + Outside this range, the damper characteristics is defined by a quadratic polynomial that + matches the damper resistance at y=0 and y=yL or + y=yU and y=1, respectively. + In addition, the polynomials are such that kd(y) is differentiable in + y and the derivative is continuous. +

    +

    + The damper characteristics is then used to compute the flow coefficient k(y) as: +

    +

    + k(y) = (2 ρ ⁄ kd(y))1/2 A +

    +

    + where A is the face area, which is computed using the nominal + mass flow rate m_flow_nominal, the nominal velocity + v_nominal and the density of the medium. +

    +

    + ASHRAE 825-RP lists the following parameter values as typical (note that the + default values in the model correspond to opposed blades). +
    +

    +
    + + + + + + + + + + + + + + + + + + +
    opposed bladessingle blades
    yL15/9015/90
    yU55/9065/90
    k10.2 to 0.50.2 to 0.5
    a-1.51-1.51
    b0.105*900.0842*90
    +

    + (The loss coefficient in fully closed position k0 is computed based on the leakage coefficient + and the coefficient in fully open position.) +

    +

    References

    +

    + P. Haves, L. K. Norford, M. DeSimone and L. Mei, + A Standard Simulation Testbed for the Evaluation of Control Algorithms & Strategies, + ASHRAE Final Report 825-RP, Atlanta, GA.

    -------- Corrected Code --------

    - This example compares the power consumed by pumps that take three - different control signals. Each pump has identical mass flow rate and - pressure rise. + Partial model for air dampers with exponential opening + characteristics. This is the base model for air dampers. The model + implements the functions that relate the opening signal and the flow + coefficient. The model also defines parameters that are used by + different air damper models.

    - Note that for the instances AixLib.Fluid.Movers.FlowControlled_dp - and AixLib.Fluid.Movers.FlowControlled_m_flow, - we had to assign the efficiencies (otherwise the default constant - efficiency of 0.7 would have been used). In these models, the - power consumption is computed using similarity laws, but using the - mass flow rate as opposed to the speed, because speed is not known in - these two models. This is an approximation at operating points in - which the speed is different from the nominal speed - N_nominal because similarity laws are valid for speed - and not for mass flow rate. + The model is as in ASHRAE 825-RP except that a control signal of + y=0 means the damper is closed, and y=1 + means the damper is open. This is opposite of the implementation of + ASHRAE 825-RP, but used here for consistency within this library.

    - The figure below shows the approximation error for the power - calculation where the speed Nrpm differs from the - nominal speed Nnominal. + For yL < y < yU, the damper characteristics is:

    -

    - \"image\" +

    + kd(y) = exp(a+b (1-y)) +

    +

    + where kd is the loss coefficient (total pressure drop divided + by dynamic pressure) and y is the fractional opening. +

    +

    + Outside this range, the damper characteristics is defined by a + quadratic polynomial that matches the damper resistance at + y=0 and y=yL or y=yU and + y=1, respectively. In addition, the polynomials are such + that kd(y) is differentiable in y and the + derivative is continuous. +

    +

    + The damper characteristics is then used to compute the flow + coefficient k(y) as: +

    +

    + k(y) = (2 ρ ⁄ kd(y))1/2 A +

    +

    + where A is the face area, which is computed using the nominal + mass flow rate m_flow_nominal, the nominal velocity + v_nominal and the density of the medium. +

    +

    + ASHRAE 825-RP lists the following parameter values as typical (note + that the default values in the model correspond to opposed + blades).
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + opposed blades + + single blades +
    + yL + + 15/90 + + 15/90 +
    + yU + + 55/90 + + 65/90 +
    + k1 + + 0.2 to 0.5 + + 0.2 to 0.5 +
    + a + + -1.51 + + -1.51 +
    + b + + 0.105*90 + + 0.0842*90 +
    +

    + (The loss coefficient in fully closed position k0 is + computed based on the leakage coefficient and the coefficient in + fully open position.) +

    +

    + References +

    +

    + P. Haves, L. K. Norford, M. DeSimone and L. Mei, A Standard + Simulation Testbed for the Evaluation of Control Algorithms & + Strategies, ASHRAE Final Report 825-RP, Atlanta, GA.

    -------- Errors -------- -line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 50 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 ----- AixLib/Fluid/Sources/Outside_CpData.mo ---- +---- AixLib/Media/Specialized/Water/TemperatureDependentDensity.mo ---- -------- HTML Code -------- +

    + Base properties of the medium. +

    +

    - This model describes boundary conditions for - pressure, enthalpy, and species concentration that can be obtained - from weather data. The model is identical to - - AixLib.Fluid.Sources.Outside, - except that it adds the wind pressure to the - pressure at the fluid ports ports. + This function computes the density as a function of temperature.

    +

    Implementation

    - The pressure p at the fluid ports is computed as: + The function is based on the IDA implementation in therpro.nmf, which + implements

    -

    - p = pw + Cp,act Cs v2 ρ ⁄ 2, +

    + d := 1000.12 + 1.43711e-2*T_degC -
    +  5.83576e-3*T_degC^2 + 1.5009e-5*T_degC^3;
    +  
    +

    + This has been converted to Kelvin, which resulted in the above expression. + In addition, below 5 °C and above 100 °C, the density is replaced + by a linear function to avoid inflection points. + This linear extension is such that the density is once continuously differentiable.

    + + +

    - where pw is the atmospheric pressure from the weather bus, - v is the wind speed from the weather bus, and - ρ is the fluid density. + This function computes the dynamic viscosity.

    + + +

    - The wind pressure coefficient Cp,act is a function of the surface wind incidence - angle and is defined relative to the surface azimuth (normal to the surface is 0). - The wind incidence angle incAng is computed from the wind direction obtained from the weather file - with the surface azimuth azi as the base of the angle. - The relation between the wind pressure coefficient Cp,act and the incidence angle incAng - is defined by a cubic hermite interpolation of the users table input. - Typical table values can be obtained from the "AIVC guide to energy efficient ventilation", - appendix 2 (1996). The default table is appendix 2, table 2.2, face 1. + This function computes the specific enthalpy.

    + + +

    - The wind speed modifier Cs can be used to incorporate the effect of the surroundings on the local wind speed. + This function computes the specific enthalpy of liquid water.

    -

    Definition of angles

    + + +

    - The angles incAngSurNor for the wind incidence angle relative to the surface normal - are measured counter-clock wise. - The figure below shows an example entry, which is also used in the model - - AixLib.Fluid.Sources.Examples.Outside_CpData_Specification. + This function computes the specific internal energy.

    -

    \"image\"

    + +

    - The wind incidence angle and surface azimuths are defined as follows: - The wind indicience angle is obtained directly from the weather data bus weaBus.winDir. - This variable contains the data from the weather data file that was read, such as a TMY3 file. - In accordance to TMY3, the data is as shown in the table below. + This function computes the specific entropy.

    -
    - - - - -
    Value of winDir if the wind blows from different directions.
    Wind from North:
    0
    Wind from West:
    3π/2
    270°
    Wind from East:
    π/2
    90°
    Wind from South:
    π
    180°

    - For the surface azimuth azi, the specification from - AixLib.Types.Azimuth is - used, which is as shown in the table below. + To obtain the state for a given pressure, entropy and mass fraction, use + + AixLib.Media.Air.setState_psX.

    - - - - - -
    Value of azi if the exterior wall faces in the different directions.
    Wall facing north:
    π
    180°
    Wall facing West:
    π/2
    90°
    Wall facing east:
    3π/2
    270°
    Wall facing South:
    0;
    + -

    Related model

    - This model differs from - AixLib.Fluid.Sources.Outside_CpLowRise by the calculation of the wind pressure coefficient - Cp,act. - The wind pressure coefficient is defined by a user-defined table instead of a generalized equation - such that it can be used for all building sizes and situations, for shielded buildings, - and for buildings with non-rectangular shapes. + This function computes the specific Gibbs energy. +

    + + + +

    + This function computes the specific Helmholtz energy. +

    + + + +

    + This function computes the specific enthalpy for + an isentropic state change from the temperature + that corresponds to the state refState + to reference_T. +

    + + + +

    + This function returns the isobaric expansion coefficient, +

    +

    + βp = - 1 ⁄ v   (∂ v ⁄ ∂ T)p, +

    +

    + where + v is the specific volume, + T is the temperature and + p is the pressure. +

    + + + +

    + This function returns the isothermal compressibility coefficient, + which is zero as this medium is incompressible. + The isothermal compressibility is defined as +

    +

    + κT = - 1 ⁄ v   (∂ v ⁄ ∂ p)T, +

    +

    + where + v is the specific volume, + T is the temperature and + p is the pressure.

    + + +

    - References + This function returns the partial derivative of density + with respect to pressure at constant temperature, + which is zero as the medium is incompressible.

    + +

    + This function computes the derivative of density with respect to temperature + at constant pressure. +

    + --------- Corrected Code -------- -

    - This model describes boundary conditions for pressure, enthalpy, and - species concentration that can be obtained from weather data. The - model is identical to AixLib.Fluid.Sources.Outside, - except that it adds the wind pressure to the pressure at the fluid - ports ports. -

    -

    - The pressure p at the fluid ports is computed as: -

    -

    - p = pw + Cp,act Cs v2 ρ ⁄ - 2, -

    -

    - where pw is the atmospheric pressure from the - weather bus, v is the wind speed from the weather bus, and - ρ is the fluid density. -

    -

    - The wind pressure coefficient Cp,act is a function - of the surface wind incidence angle and is defined relative to the - surface azimuth (normal to the surface is 0). The wind - incidence angle incAng is computed from the wind - direction obtained from the weather file with the surface azimuth - azi as the base of the angle. The relation between the - wind pressure coefficient Cp,act and the incidence - angle incAng is defined by a cubic hermite interpolation - of the users table input. Typical table values can be obtained from - the \"AIVC guide to energy efficient ventilation\", appendix 2 (1996). - The default table is appendix 2, table 2.2, face 1. -

    -

    - The wind speed modifier Cs can be used to - incorporate the effect of the surroundings on the local wind speed. -

    -

    - Definition of angles -

    -

    - The angles incAngSurNor for the wind incidence angle - relative to the surface normal are measured counter-clock wise. The - figure below shows an example entry, which is also used in the model - - AixLib.Fluid.Sources.Examples.Outside_CpData_Specification. -

    -

    - \"image\" -

    -

    - The wind incidence angle and surface azimuths are defined as follows: - The wind indicience angle is obtained directly from the weather data - bus weaBus.winDir. This variable contains the data from - the weather data file that was read, such as a TMY3 file. In - accordance to TMY3, the data is as shown in the table below. -

    - - - - - - - - - - - - - - - - - -
    - Value of winDir if the wind blows from different - directions. -
    - Wind from North:
    - 0
    - 0° -
    - Wind from West:
    - 3π/2
    - 270° -
    - Wind from East:
    - π/2
    - 90° -
    - Wind from South:
    - π
    - 180° -
    -

    - For the surface azimuth azi, the specification from - AixLib.Types.Azimuth is - used, which is as shown in the table below. -

    - - - - - - - - - - - - - - - - - -
    - Value of azi if the exterior wall faces in the - different directions. -
    - Wall facing north:
    - π
    - 180° -
    - Wall facing West:
    - π/2
    - 90° -
    - Wall facing east:
    - 3π/2
    - 270° -
    - Wall facing South:
    - 0;
    - 0° -
    -

    - Related model -

    -

    - This model differs from AixLib.Fluid.Sources.Outside_CpLowRise - by the calculation of the wind pressure coefficient - Cp,act. The wind pressure coefficient is defined by - a user-defined table instead of a generalized equation such that it - can be used for all building sizes and situations, for shielded - buildings, and for buildings with non-rectangular shapes. -

    -

    - References -

    - - - --------- Errors -------- -line 51 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 -line 63 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 -line 14 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 43 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Media/Air.mo ---- --------- HTML Code -------- - -

    - Model with basic thermodynamic properties. -

    - This model provides equation for the following thermodynamic properties: + This function returns the partial derivative of density + with respect to mass fraction, + which is zero as the medium is a single substance.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VariableUnitDescription
    TKtemperature
    pPaabsolute pressure
    dkg/m3density
    hJ/kgspecific enthalpy
    uJ/kgspecific internal energy
    Xi[nXi]kg/kgindependent mass fractions m_i/m
    RJ/kg.Kgas constant
    Mkg/molmolar mass
    - Density is computed from pressure, temperature and composition in the thermodynamic state record applying the ideal gas law. - -

    - This function returns the dynamic viscosity. -

    -

    Implementation

    - The function is based on the 5th order polynomial - of - - Modelica.Media.Air.MoistAir.dynamicViscosity. - However, for the typical range of temperatures encountered - in building applications, a linear function sufficies. - This implementation is therefore the above 5th order polynomial, - linearized around 20°C. - The relative error of this linearization is - 0.4% at -20°C, - and less then - 0.2% between -5°C and +50°C. + This function returns the specific heat capacity at constant pressure.

    - The ideal gas constant for moist air is computed from thermodynamic state assuming that all water is in the gas phase. - - Pressure is returned from the thermodynamic state record input as a simple assignment. - -

    - This function returns the isobaric expansion coefficient at constant pressure, - which is zero for this medium. - The isobaric expansion coefficient at constant pressure is -

    -

    - βp = - 1 ⁄ v   (∂ v ⁄ ∂ T)p = 0, -

    - where - v is the specific volume, - T is the temperature and - p is the pressure. + This function computes the specific heat capacity at constant volume.

    - This function returns the isothermal compressibility coefficient. - The isothermal compressibility is -

    -

    - κT = -1 ⁄ v   (∂ v ⁄ ∂ p)T - = -1 ⁄ p, + This function returns the thermal conductivity. + The expression is obtained from Ramires et al. (1995).

    +

    References

    - where - v is the specific volume, - T is the temperature and - p is the pressure. + Ramires, Maria L. V. and Nieto de Castro, Carlos A. and Nagasaka, Yuchi + and Nagashima, Akira and Assael, Marc J. and Wakeham, William A. + Standard Reference Data for the Thermal Conductivity of Water. + Journal of Physical and Chemical Reference Data, 24, p. 1377-1381, 1995. + DOI:10.1063/1.555963.

    - This function computes the specific entropy. -

    -

    - The specific entropy of the mixture is obtained from -

    -

    - s = ss + sm, -

    -

    - where - ss is the entropy change due to the state change - (relative to the reference temperature) and - sm is the entropy change due to mixing - of the dry air and water vapor. -

    -

    - The entropy change due to change in state is obtained from -

    -

    - ss = cv ln(T/T0) + R ln(v/v0)
    - = cv ln(T/T0) + R ln(ρ0/ρ) -

    -

    If we assume ρ = p0/(R T), - and because cp = cv + R, - we can write -

    -

    - ss = cv ln(T/T0) + R ln(T/T0)
    - =cp ln(T/T0). -

    -

    - Next, the entropy of mixing is obtained from a reversible isothermal - expansion process. Hence, -

    -

    - sm = -R ∑i( Xi ⁄ Mi - ln(Yi p/p0)), -

    -

    - where R is the gas constant, - X is the mass fraction, - M is the molar mass, and - Y is the mole fraction. -

    -

    - To obtain the state for a given pressure, entropy and mass fraction, use - - AixLib.Media.Air.setState_psX. -

    -

    Limitations

    -

    - This function is only valid for a relative humidity below 100%. + This function returns the pressure.

    - This function returns the partial derivative of density - with respect to pressure at constant temperature. + This function returns the temperature.

    - This function computes the derivative of density with respect to temperature - at constant pressure. + This function returns the molar mass, + which is assumed to be constant.

    - This function returns the partial derivative of density - with respect to mass fraction. - This value is zero because in this medium, density is proportional - to pressure, but independent of the species concentration. + This function returns the thermodynamic state for a given pressure, + specific enthalpy and composition.

    - The thermodynamic state record - is computed from density d, temperature T and composition X. + This function returns the thermodynamic state for a given pressure, + temperature and composition.

    - The - thermodynamic state record is computed from pressure p, specific enthalpy h and composition X. - - The - thermodynamic state record is computed from pressure p, temperature T and composition X. +

    This function returns the thermodynamic state based on pressure, @@ -9535,220 +7046,178 @@ line 43 column 2 - Warning:

    attribute "align" not allowed for HTML5

    The state is computed by symbolically solving - - AixLib.Media.Air.specificEntropy + + AixLib.Media.Specialized.Water.TemperatureDependentDensity.specificEntropy for temperature. -

    +

    - - Specific enthalpy as a function of temperature and species concentration. - The pressure is input for compatibility with the medium models, but the specific enthalpy - is independent of the pressure. - -

    - This function computes the specific enthalpy for - an isentropic state change from the temperature - that corresponds to the state refState - to reference_T. + This function computes the derivative of the specific heat capacity + at constant pressure with respect to the state.

    - Temperature is returned from the thermodynamic state record input as a simple assignment. -

    - This function returns the molar mass. + This function computes the temperature derivative of the enthalpy of liquid water + per unit mass.

    - Temperature as a function of specific enthalpy and species concentration. - The pressure is input for compatibility with the medium models, but the temperature - is independent of the pressure. - - -

    - This data record contains the coefficients for perfect gases. + This function computes the kinematic viscosity as a function of temperature. +

    +

    Implementation

    +

    + The function is based on the IDA implementation in therpro.nmf. + The original equation is +

    +
    + kinVis :=1E-6*Modelica.Math.exp(0.577449 - 3.253945e-2*T_degC + 2.17369e-4*
    +       T_degC^2 - 7.22111e-7*T_degC^3);
    +       
    +

    + This has been converted to Kelvin, which resulted in the above expression. + In addition, at 5 °C the kinematic viscosity is linearly extrapolated + to avoid a large gradient at very low temperatures. + We selected the same point for the linearization as we used for the density, + as the density and the kinematic viscosity are combined in + + AixLib.Media.Specialized.Water.TemperatureDependentDensity.dynamicViscosity.

    - This medium package models moist air using a gas law in which pressure and temperature - are independent, which often leads to significantly faster and more robust computations. - The specific heat capacities at constant pressure and at constant volume are constant. - The air is assumed to be not saturated. -

    -

    - This medium uses the gas law -

    -

    - ρ/ρstp = p/pstp, + This medium package models liquid water.

    - where - pstd and ρstp are constant reference - temperature and density, rathern than the ideal gas law + The mass density is computed using a 3rd order polynomial, which yields the + density as a function of temperature as shown in the figure below. Note, however, + that computing density as a function of temperature can lead to considerably + slower computing time compared to using + + AixLib.Media.Water + in which the density is a constant. We therefore recommend to use + + AixLib.Media.Water + for typical building energy simulations.

    -

    - ρ = p ⁄(R T), +

    + \"Mass

    - where R is the gas constant and T is the temperature. + For the specific heat capacities at constant pressure and at constant volume, + a constant value of 4184 J/(kg K), which corresponds to 20°C + is used. + The figure below shows the relative error of the specific heat capacity that + is introduced by this simplification. + Using a constant value for the specific heat capacity allows to compute + temperature from enthalpy without having to solve an implicit equation, + and therefore leads to faster simulation.

    -

    - This formulation often leads to smaller systems of nonlinear equations - because equations for pressure and temperature are decoupled. - Therefore, if air inside a control volume such as room air is heated, it - does not increase its specific volume. Consequently, merely heating or cooling - a control volume does not affect the air flow calculations in a duct network - that may be connected to that volume. - Note that multizone air exchange simulation in which buoyancy drives the - air flow is still possible as the models in - - AixLib.Airflow.Multizone compute the mass density using the function - - AixLib.Utilities.Psychrometrics.Functions.density_pTX in which density - is a function of temperature. +

    + \"Relative

    + +

    - Note that models in this package implement the equation for the internal energy as + Thermal conductivity is calculated as a function of temperature as shown in the figure below. + The correlation used to calculate the thermal conductivity is

    +

    - u = h - pstp ⁄ ρstp, + λ(T) = λ(298.15 K) ⋅ (-1.48445+4.12292⋅(T/298.15)-1.63866⋅(T/298.15)2),

    - where - u is the internal energy per unit mass, - h is the enthalpy per unit mass, - pstp is the static pressure and - ρstp is the mass density at standard pressure and temperature. - The reason for this implementation is that in general, + where λ(298.15 K) = 0.6065 W/(m ⋅ K) is the adopted standard value + of the thermal conductivity of water at 298.15 K and 0.1 MPa.

    -

    - h = u + p v, +

    + \"Thermal

    +

    - from which follows that + Dynamic viscosity is calculated as the product of density and kinematic viscosity, + both temperature dependent. However, the kinematic viscosity + has its own temperature dependent correlation, implemented at + + AixLib.Media.Specialized.Water.TemperatureDependentDensity.kinematicViscosity. + Results of the kinematic viscosity as a function of temperature are shown in the figure below.

    -

    - u = h - p v = h - p ⁄ ρ = h - pstp ⁄ ρstd, +

    + \"Kinematic

    +

    - because p ⁄ ρ = pstp ⁄ ρstp in this medium model. + The enthalpy is computed using the convention that h=0 + if T=0 °C.

    +

    Limitations

    - The enthalpy is computed using the convention that h=0 - if T=0 °C and no water vapor is present. + Phase changes are not modeled.

    -------- Corrected Code --------

    - Model with basic thermodynamic properties. + Base properties of the medium. +

    +

    + This function computes the density as a function of temperature. +

    +

    + Implementation +

    +

    + The function is based on the IDA implementation in + therpro.nmf, which implements +

    +
    + d := 1000.12 + 1.43711e-2*T_degC -
    +  5.83576e-3*T_degC^2 + 1.5009e-5*T_degC^3;
    +  
    +

    + This has been converted to Kelvin, which resulted in the above + expression. In addition, below 5 °C and above 100 °C, the density is + replaced by a linear function to avoid inflection points. This linear + extension is such that the density is once continuously + differentiable. +

    + +

    + This function computes the dynamic viscosity. +

    + +

    + This function computes the specific enthalpy. +

    + +

    + This function computes the specific enthalpy of liquid water.

    +

    - This model provides equation for the following thermodynamic - properties: + This function computes the specific internal energy. +

    + +

    + This function computes the specific entropy. +

    +

    + To obtain the state for a given pressure, entropy and mass fraction, + use AixLib.Media.Air.setState_psX. +

    + +

    + This function computes the specific Gibbs energy. +

    + +

    + This function computes the specific Helmholtz energy. +

    + +

    + This function computes the specific enthalpy for an isentropic state + change from the temperature that corresponds to the state + refState to reference_T. +

    + +

    + This function returns the isobaric expansion coefficient, +

    +

    + βp = - 1 ⁄ v   (∂ v ⁄ ∂ T)p, +

    +

    + where v is the specific volume, T is the temperature + and p is the pressure. +

    + +

    + This function returns the isothermal compressibility coefficient, + which is zero as this medium is incompressible. The isothermal + compressibility is defined as +

    +

    + κT = - 1 ⁄ v   (∂ v ⁄ ∂ p)T, +

    +

    + where v is the specific volume, T is the temperature + and p is the pressure. +

    + +

    + This function returns the partial derivative of density with respect + to pressure at constant temperature, which is zero as the medium is + incompressible. +

    + +

    + This function computes the derivative of density with respect to + temperature at constant pressure. +

    + +

    + This function returns the partial derivative of density with respect + to mass fraction, which is zero as the medium is a single substance. +

    + +

    + This function returns the specific heat capacity at constant + pressure. +

    + +

    + This function computes the specific heat capacity at constant volume. +

    + +

    + This function returns the thermal conductivity. The expression is + obtained from Ramires et al. (1995). +

    +

    + References +

    +

    + Ramires, Maria L. V. and Nieto de Castro, Carlos A. and Nagasaka, + Yuchi and Nagashima, Akira and Assael, Marc J. and Wakeham, William + A. Standard Reference Data for the Thermal Conductivity of Water. + Journal of Physical and Chemical Reference Data, 24, p. + 1377-1381, 1995. DOI:10.1063/1.555963.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Variable - - Unit - - Description -
    - T - - K - - temperature -
    - p - - Pa - - absolute pressure -
    - d - - kg/m3 - - density -
    - h - - J/kg - - specific enthalpy -
    - u - - J/kg - - specific internal energy -
    - Xi[nXi] - - kg/kg - - independent mass fractions m_i/m -
    - R - - J/kg.K - - gas constant -
    - M - - kg/mol - - molar mass -
    -Density is computed from pressure, temperature and composition in the -thermodynamic state record applying the ideal gas law.

    - This function returns the dynamic viscosity. + This function returns the pressure.

    -

    - Implementation -

    +

    - The function is based on the 5th order polynomial of Modelica.Media.Air.MoistAir.dynamicViscosity. - However, for the typical range of temperatures encountered in - building applications, a linear function sufficies. This - implementation is therefore the above 5th order polynomial, - linearized around 20°C. The relative error of this - linearization is 0.4% at -20°C, and less then - 0.2% between -5°C and +50°C. + This function returns the temperature.

    -The ideal gas constant for moist air is computed from thermodynamic -state assuming that all water is in the gas phase. -Pressure is returned from the thermodynamic state record input as a -simple assignment.

    - This function returns the isobaric expansion coefficient at constant - pressure, which is zero for this medium. The isobaric expansion - coefficient at constant pressure is + This function returns the molar mass, which is assumed to be + constant.

    -

    - βp = - 1 ⁄ v   (∂ v ⁄ ∂ T)p = 0, +

    +

    + This function returns the thermodynamic state for a given pressure, + specific enthalpy and composition.

    +

    - where v is the specific volume, T is the temperature - and p is the pressure. + This function returns the thermodynamic state for a given pressure, + temperature and composition.

    - This function returns the isothermal compressibility coefficient. The - isothermal compressibility is + This function returns the thermodynamic state based on pressure, + specific entropy and mass fraction.

    -

    - κT = -1 ⁄ v   (∂ v ⁄ ∂ p)T = -1 ⁄ p, +

    + The state is computed by symbolically solving + AixLib.Media.Specialized.Water.TemperatureDependentDensity.specificEntropy + for temperature.

    +

    - where v is the specific volume, T is the temperature - and p is the pressure. + This function computes the derivative of the specific heat capacity + at constant pressure with respect to the state.

    - This function computes the specific entropy. + This function computes the temperature derivative of the enthalpy of + liquid water per unit mass.

    +

    - The specific entropy of the mixture is obtained from + This function computes the kinematic viscosity as a function of + temperature. +

    +

    + Implementation +

    +

    + The function is based on the IDA implementation in + therpro.nmf. The original equation is +

    +
    + kinVis :=1E-6*Modelica.Math.exp(0.577449 - 3.253945e-2*T_degC + 2.17369e-4*
    +       T_degC^2 - 7.22111e-7*T_degC^3);
    +       
    +

    + This has been converted to Kelvin, which resulted in the above + expression. In addition, at 5 °C the kinematic viscosity is linearly + extrapolated to avoid a large gradient at very low temperatures. We + selected the same point for the linearization as we used for the + density, as the density and the kinematic viscosity are combined in + + AixLib.Media.Specialized.Water.TemperatureDependentDensity.dynamicViscosity. +

    + +

    + This medium package models liquid water. +

    +

    + The mass density is computed using a 3rd order polynomial, which + yields the density as a function of temperature as shown in the + figure below. Note, however, that computing density as a function of + temperature can lead to considerably slower computing time compared + to using AixLib.Media.Water in which the + density is a constant. We therefore recommend to use AixLib.Media.Water for typical + building energy simulations. +

    +

    + \"Mass +

    +

    + For the specific heat capacities at constant pressure and at constant + volume, a constant value of 4184 J/(kg K), which corresponds + to 20°C is used. The figure below shows the relative error of + the specific heat capacity that is introduced by this simplification. + Using a constant value for the specific heat capacity allows to + compute temperature from enthalpy without having to solve an implicit + equation, and therefore leads to faster simulation. +

    +

    + + +

    +

    + Thermal conductivity is calculated as a function of temperature as + shown in the figure below. The correlation used to calculate the + thermal conductivity is

    - s = ss + sm, + λ(T) = λ(298.15 K) ⋅ + (-1.48445+4.12292⋅(T/298.15)-1.63866⋅(T/298.15)2),

    - where ss is the entropy change due to the state - change (relative to the reference temperature) and - sm is the entropy change due to mixing of the dry - air and water vapor. + where λ(298.15 K) = 0.6065 W/(m ⋅ K) is the adopted standard + value of the thermal conductivity of water at 298.15 K and + 0.1 MPa. +

    +

    + \"Thermal +

    +

    + Dynamic viscosity is calculated as the product of density and + kinematic viscosity, both temperature dependent. However, the + kinematic viscosity has its own temperature dependent correlation, + implemented at + AixLib.Media.Specialized.Water.TemperatureDependentDensity.kinematicViscosity. + Results of the kinematic viscosity as a function of temperature are + shown in the figure below. +

    +

    + \"Kinematic +

    +

    + The enthalpy is computed using the convention that h=0 if + T=0 °C.

    +

    + Limitations +

    +

    + Phase changes are not modeled. +

    + + +-------- Errors -------- +line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +line 7 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 31 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 42 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 49 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 62 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/gFunction.mo ---- +-------- HTML Code -------- + +

    + This function implements the g-function evaluation method introduced by + Cimmino and Bernier (see: Cimmino and Bernier (2014), and Cimmino (2018)) based + on the g-function function concept first introduced by Eskilson (1987). + The g-function gives the relation between the variation of the borehole + wall temperature at a time t and the heat extraction and injection rates + at all times preceding time t as +

    +

    + \"image\" +

    +

    + where Tb is the borehole wall temperature, + Tg is the undisturbed ground temperature, Q is the + heat injection rate into the ground through the borehole wall per unit borehole + length, ks is the soil thermal conductivity and g is + the g-function. +

    +

    + The g-function is constructed from the combination of the combination of + the finite line source (FLS) solution (see + + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource), + the cylindrical heat source (CHS) solution (see + + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource), + and the infinite line source (ILS) solution (see + + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.infiniteLineSource). + To obtain the g-function of a bore field, each borehole is divided into a + series of nSeg segments of equal length, each modeled as a line + source of finite length. The finite line source solution is superimposed in + space to obtain a system of equations that gives the relation between the heat + injection rate at each of the segments and the borehole wall temperature at each + of the segments. The system is solved to obtain the uniform borehole wall + temperature required at any time to maintain a constant total heat injection + rate (Qtot = 2πksHtot) into the bore + field. The uniform borehole wall temperature is then equal to the finite line + source based g-function. +

    +

    + Since this g-function is based on line sources of heat, rather than + cylinders, the g-function is corrected to consider the cylindrical + geometry. The correction factor is then the difference between the cylindrical + heat source solution and the infinite line source solution, as proposed by + Li et al. (2014) as +

    +

    + g(t) = gFLS + (gCHS - gILS) +

    +

    Implementation

    +

    + The calculation of the g-function is separated into two regions: the + short-time region and the long-time region. In the short-time region, + corresponding to times t < 1 hour, heat interaction between boreholes + and axial variations of heat injection rate are not considered. The + g-function is calculated using only one borehole and one segment. In the + long-time region, corresponding to times t > 1 hour, all boreholes + are represented as series of nSeg line segments and the + g-function is evaluated as described above. +

    +

    References

    +

    + Cimmino, M. and Bernier, M. 2014. A semi-analytical method to generate + g-functions for geothermal bore fields. International Journal of Heat and + Mass Transfer 70: 641-650. +

    +

    + Cimmino, M. 2018. Fast calculation of the g-functions of geothermal borehole + fields using similarities in the evaluation of the finite line source + solution. Journal of Building Performance Simulation. DOI: + 10.1080/19401493.2017.1423390. +

    +

    + Eskilson, P. 1987. Thermal analysis of heat extraction boreholes. Ph.D. + Thesis. Department of Mathematical Physics. University of Lund. Sweden. +

    +

    + Li, M., Li, P., Chan, V. and Lai, A.C.K. 2014. Full-scale temperature + response function (G-function) for heat transfer by borehole heat exchangers + (GHEs) from sub-hour to decades. Applied Energy 136: 197-205. +

    + + + +-------- Corrected Code --------

    - The entropy change due to change in state is obtained from + This function implements the g-function evaluation method + introduced by Cimmino and Bernier (see: Cimmino and Bernier (2014), + and Cimmino (2018)) based on the g-function function concept + first introduced by Eskilson (1987). The g-function gives the + relation between the variation of the borehole wall temperature at a + time t and the heat extraction and injection rates at all + times preceding time t as

    -

    - ss = cv ln(T/T0) + R - ln(v/v0)
    - = cv ln(T/T0) + R ln(ρ0/ρ) +

    + \"image\"

    - If we assume ρ = p0/(R T), and because - cp = cv + R, we can write -

    -

    - ss = cv ln(T/T0) + R - ln(T/T0)
    - =cp ln(T/T0). + where Tb is the borehole wall temperature, + Tg is the undisturbed ground temperature, Q + is the heat injection rate into the ground through the borehole wall + per unit borehole length, ks is the soil thermal + conductivity and g is the g-function.

    - Next, the entropy of mixing is obtained from a reversible isothermal - expansion process. Hence, -

    -

    - sm = -R ∑i( Xi ⁄ Mi - ln(Yi p/p0)), + The g-function is constructed from the combination of the + combination of the finite line source (FLS) solution (see + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource), + the cylindrical heat source (CHS) solution (see + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource), + and the infinite line source (ILS) solution (see + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.infiniteLineSource). + To obtain the g-function of a bore field, each borehole is + divided into a series of nSeg segments of equal length, + each modeled as a line source of finite length. The finite line + source solution is superimposed in space to obtain a system of + equations that gives the relation between the heat injection rate at + each of the segments and the borehole wall temperature at each of the + segments. The system is solved to obtain the uniform borehole wall + temperature required at any time to maintain a constant total heat + injection rate (Qtot = + 2πksHtot) into the bore field. The uniform + borehole wall temperature is then equal to the finite line source + based g-function.

    - where R is the gas constant, X is the mass fraction, - M is the molar mass, and Y is the mole fraction. + Since this g-function is based on line sources of heat, rather + than cylinders, the g-function is corrected to consider the + cylindrical geometry. The correction factor is then the difference + between the cylindrical heat source solution and the infinite line + source solution, as proposed by Li et al. (2014) as

    -

    - To obtain the state for a given pressure, entropy and mass fraction, - use AixLib.Media.Air.setState_psX. +

    + g(t) = gFLS + (gCHS - gILS)

    - Limitations + Implementation

    - This function is only valid for a relative humidity below 100%. -

    - -

    - This function returns the partial derivative of density with respect - to pressure at constant temperature. -

    - -

    - This function computes the derivative of density with respect to - temperature at constant pressure. + The calculation of the g-function is separated into two + regions: the short-time region and the long-time region. In the + short-time region, corresponding to times t < 1 hour, heat + interaction between boreholes and axial variations of heat injection + rate are not considered. The g-function is calculated using + only one borehole and one segment. In the long-time region, + corresponding to times t > 1 hour, all boreholes are + represented as series of nSeg line segments and the + g-function is evaluated as described above.

    - +

    + References +

    - This function returns the partial derivative of density with respect - to mass fraction. This value is zero because in this medium, density - is proportional to pressure, but independent of the species - concentration. + Cimmino, M. and Bernier, M. 2014. A semi-analytical method to + generate g-functions for geothermal bore fields. International + Journal of Heat and Mass Transfer 70: 641-650.

    -

    - The - thermodynamic state record is computed from density - d, temperature T and composition - X. + Cimmino, M. 2018. Fast calculation of the g-functions of + geothermal borehole fields using similarities in the evaluation of + the finite line source solution. Journal of Building Performance + Simulation. DOI: 10.1080/19401493.2017.1423390.

    -The -thermodynamic state record is computed from pressure p, specific -enthalpy h and composition X. -The -thermodynamic state record is computed from pressure p, temperature -T and composition X.

    - This function returns the thermodynamic state based on pressure, - specific entropy and mass fraction. + Eskilson, P. 1987. Thermal analysis of heat extraction + boreholes. Ph.D. Thesis. Department of Mathematical Physics. + University of Lund. Sweden.

    - The state is computed by symbolically solving AixLib.Media.Air.specificEntropy - for temperature. + Li, M., Li, P., Chan, V. and Lai, A.C.K. 2014. Full-scale + temperature response function (G-function) for heat transfer by + borehole heat exchangers (GHEs) from sub-hour to decades. Applied + Energy 136: 197-205.

    -Specific enthalpy as a function of temperature and species -concentration. The pressure is input for compatibility with the medium -models, but the specific enthalpy is independent of the pressure. - + +-------- Errors -------- +line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 49 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Media/Antifreeze/EthyleneGlycolWater.mo ---- +-------- HTML Code -------- + +

    + This base properties model is identical to + + Modelica.Media.Water.ConstantPropertyLiquidWater, + except that the equation + u = cv_const*(T - reference_T) + has been replaced by u=h because + cp_const=cv_const. + Also, the model checks if the mass fraction of the mixture is within the + allowed limits. +

    + +

    + Density of propylene antifreeze-water mixture at specified mass fraction + and temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Dynamic viscosity of antifreeze-water mixture at specified mass fraction and + temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Fusion temperature of antifreeze-water mixture at specified mass fraction and + temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Evaluates a thermophysical property of a mixture, based on correlations proposed + by Melinder (2010). +

    +

    + The polynomial has the form +

    +

    + f = a1 (x-xm)0(y-ym)0 + + a2 (x-xm)0(y-ym)1 + + ... + + any[1] (x-xm)0(y-ym)ny[1]-1 + + ... + + any[1])+1 (x-xm)1(y-ym)0 + + ... + + any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 + + ... +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Specific heat capacity of antifreeze-water mixture at specified mass fraction + and temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Thermal conductivity of antifreeze-water mixture at specified mass fraction and + temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + This medium package models ethylene glycol - water mixtures. +

    +

    + The mass density, specific heat capacity, thermal conductivity and viscosity + are assumed constant and evaluated at a set temperature and mass fraction of + ethylene glycol within the mixture. The dependence of the four properties + are shown on the figure below. +

    +

    + \"Relative +

    +

    + The accuracy of the thermophysical properties is dependent on the temperature + variations encountered during simulations. + The figure below shows the relative error of the the four properties over a + 10 °C range around the temperature used to evaluate the constant + properties. The maximum errors are 0.8 % for mass density, 2.7 % + for specific heat capacity, 3.2 % for thermal conductivity and 160 + % for dynamic viscosity. +

    +

    + \"Relative +

    +

    + The figure below shows the relative error of the the four properties over a + 20 °C range around the temperature used to evaluate the constant + proepties. The maximum errors are 1.5 % for mass density, 5.3 % + for specific heat capacity, 5.9 % for thermal conductivity and 500 + % for dynamic viscosity. +

    +

    + \"Relative +

    +

    + The enthalpy is computed using the convention that h=0 + if T=0 °C. +

    +

    Limitations

    +

    + Density, specific heat capacity, thermal conductivity and viscosity are constant. + The ethylene glycol/water mixture is modeled as an incompressible liquid. + There are no phase changes. The medium is limited to temperatures below + 100 °C and mass fractions below 0.60. + As is the case for AixLib.Media.Water, + this medium package should not be used if + the simulation relies on the dynamic viscosity. +

    +

    Typical use and important parameters

    +

    + The temperature and mass fraction must be specified for the evaluation of the + constant thermophysical properties. A typical use of the package is (e.g. for + a temperature of 20 °C and a mass fraction of 0.40): +

    +

    + Medium = AixLib.Media.Antifreeze.EthyleneGlycolWater(property_T=293.15, X_a=0.40) +

    + + + +-------- Corrected Code -------- +

    + This base properties model is identical to Modelica.Media.Water.ConstantPropertyLiquidWater, + except that the equation u = cv_const*(T - reference_T) + has been replaced by u=h because + cp_const=cv_const. Also, the model checks if the mass + fraction of the mixture is within the allowed limits. +

    +

    + Density of propylene antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010). +

    +

    + References +

    - This function computes the specific enthalpy for an isentropic state - change from the temperature that corresponds to the state - refState to reference_T. + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    -Temperature is returned from the thermodynamic state record input as a -simple assignment.

    - This function returns the molar mass. + Dynamic viscosity of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010).

    - -Temperature as a function of specific enthalpy and species -concentration. The pressure is input for compatibility with the medium -models, but the temperature is independent of the pressure. - +

    + References +

    - This data record contains the coefficients for perfect gases. + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    - This medium package models moist air using a gas law in which - pressure and temperature are independent, which often leads to - significantly faster and more robust computations. The specific heat - capacities at constant pressure and at constant volume are constant. - The air is assumed to be not saturated. -

    -

    - This medium uses the gas law -

    -

    - ρ/ρstp = p/pstp, -

    -

    - where pstd and ρstp are constant - reference temperature and density, rathern than the ideal gas law -

    -

    - ρ = p ⁄(R T), -

    -

    - where R is the gas constant and T is the temperature. + Fusion temperature of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010).

    +

    + References +

    - This formulation often leads to smaller systems of nonlinear - equations because equations for pressure and temperature are - decoupled. Therefore, if air inside a control volume such as room air - is heated, it does not increase its specific volume. Consequently, - merely heating or cooling a control volume does not affect the air - flow calculations in a duct network that may be connected to that - volume. Note that multizone air exchange simulation in which buoyancy - drives the air flow is still possible as the models in AixLib.Airflow.Multizone - compute the mass density using the function AixLib.Utilities.Psychrometrics.Functions.density_pTX - in which density is a function of temperature. + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    +

    - Note that models in this package implement the equation for the - internal energy as -

    -

    - u = h - pstp ⁄ ρstp, + Evaluates a thermophysical property of a mixture, based on + correlations proposed by Melinder (2010).

    - where u is the internal energy per unit mass, h is the - enthalpy per unit mass, pstp is the static pressure - and ρstp is the mass density at standard pressure - and temperature. The reason for this implementation is that in - general, + The polynomial has the form

    - h = u + p v, + f = a1 (x-xm)0(y-ym)0 + + a2 (x-xm)0(y-ym)1 + ... + + any[1] (x-xm)0(y-ym)ny[1]-1 + ... + + any[1])+1 (x-xm)1(y-ym)0 + ... + + any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 + + ...

    +

    + References +

    - from which follows that -

    -

    - u = h - p v = h - p ⁄ ρ = h - pstp ⁄ ρstd, + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    +

    - because p ⁄ ρ = pstp ⁄ ρstp in this - medium model. + Specific heat capacity of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010).

    +

    + References +

    - The enthalpy is computed using the convention that h=0 if - T=0 °C and no water vapor is present. + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    +

    + Thermal conductivity of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010). +

    +

    + References +

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF. +

    + +

    + This medium package models ethylene glycol - water mixtures. +

    +

    + The mass density, specific heat capacity, thermal conductivity and + viscosity are assumed constant and evaluated at a set temperature and + mass fraction of ethylene glycol within the mixture. The dependence + of the four properties are shown on the figure below. +

    +

    + + +

    +

    + The accuracy of the thermophysical properties is dependent on the + temperature variations encountered during simulations. The figure + below shows the relative error of the the four properties over a + 10 °C range around the temperature used to evaluate the + constant properties. The maximum errors are 0.8 % for mass + density, 2.7 % for specific heat capacity, 3.2 % for + thermal conductivity and 160 % for dynamic viscosity. +

    +

    + + +

    +

    + The figure below shows the relative error of the the four properties + over a 20 °C range around the temperature used to evaluate the + constant proepties. The maximum errors are 1.5 % for mass + density, 5.3 % for specific heat capacity, 5.9 % for + thermal conductivity and 500 % for dynamic viscosity. +

    +

    + + +

    +

    + The enthalpy is computed using the convention that h=0 if + T=0 °C. +

    +

    + Limitations +

    +

    + Density, specific heat capacity, thermal conductivity and viscosity + are constant. The ethylene glycol/water mixture is modeled as an + incompressible liquid. There are no phase changes. The medium is + limited to temperatures below 100 °C and mass fractions below + 0.60. As is the case for AixLib.Media.Water, this medium + package should not be used if the simulation relies on the dynamic + viscosity. +

    +

    + Typical use and important parameters +

    +

    + The temperature and mass fraction must be specified for the + evaluation of the constant thermophysical properties. A typical use + of the package is (e.g. for a temperature of 20 °C and a mass + fraction of 0.40): +

    +

    + Medium = + AixLib.Media.Antifreeze.EthyleneGlycolWater(property_T=293.15, + X_a=0.40) +

    + -------- Errors -------- -line 8 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - - -line 7 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - -line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 21 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 37 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 19 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 43 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 54 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 60 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 35 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/ThermalZones/ReducedOrder/RC/BaseClasses/InteriorWall.mo ---- +---- AixLib/Media/Antifreeze/PropyleneGlycolWater.mo ---- -------- HTML Code -------- -

    InteriorWall represents heat storage within walls. It links a - variable number n of thermal resistances and capacities to a - series connection. n thus defines the spatial discretization of - thermal effects within the wall. All effects are considered as one-dimensional - normal to the wall's surface. This model is thought for interior wall - elements that only serve as heat storage elements. The RC-chain is defined via - a vector of capacities CInt[n] and a vector of resistances - RInt[n]. - Resistances and capacities are connected alternately, starting with the first - resistance RInt[1], from heat port_a into the wall. +

    + This base properties model is identical to + + Modelica.Media.Water.ConstantPropertyLiquidWater, + except that the equation + u = cv_const*(T - reference_T) + has been replaced by u=h because + cp_const=cv_const. + Also, the model checks if the mass fraction of the mixture is within the + allowed limits. +

    + +

    + Density of propylene antifreeze-water mixture at specified mass fraction + and temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF.

    -

    \"image\"/

    --------- Corrected Code -------- -

    - InteriorWall represents heat storage within walls. It - links a variable number n of thermal resistances and - capacities to a series connection. n thus defines the - spatial discretization of thermal effects within the wall. All - effects are considered as one-dimensional normal to the wall's - surface. This model is thought for interior wall elements that only - serve as heat storage elements. The RC-chain is defined via a vector - of capacities CInt[n] and a vector of resistances - RInt[n]. Resistances and capacities are connected - alternately, starting with the first resistance RInt[1], - from heat port_a into the wall. -

    -

    - \"image\" -

    - - --------- Errors -------- -line 13 column 4 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/SensibleCooler_T.mo ---- --------- HTML Code -------- -

    - Model for an ideal sensible-only cooler that controls its outlet temperature to - a prescribed outlet temperature. + Dynamic viscosity of antifreeze-water mixture at specified mass fraction and + temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Fusion temperature of antifreeze-water mixture at specified mass fraction and + temperature, based on Melinder (2010). +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF. +

    + + + +

    + Evaluates a thermophysical property of a mixture, based on correlations proposed + by Melinder (2010). +

    +

    + The polynomial has the form +

    +

    + f = a1 (x-xm)0(y-ym)0 + + a2 (x-xm)0(y-ym)1 + + ... + + any[1] (x-xm)0(y-ym)ny[1]-1 + + ... + + any[1])+1 (x-xm)1(y-ym)0 + + ... + + any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 + + ... +

    +

    References

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF.

    + + +

    - This model forces the outlet temperature at port_b to be - no higher than the temperature of the input signal - TSet, subject to optional limits on the - capacity. - By default, the model has unlimited cooling capacity. + Specific heat capacity of antifreeze-water mixture at specified mass fraction + and temperature, based on Melinder (2010).

    +

    References

    - The output signal Q_flow ≤ 0 is the heat added - to the medium if the mass flow rate is from port_a to port_b. - If the flow is reversed, then Q_flow=0. + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF.

    + + +

    - The outlet conditions at port_a are not affected by this model, - other than for a possible pressure difference due to flow friction. + Thermal conductivity of antifreeze-water mixture at specified mass fraction and + temperature, based on Melinder (2010).

    +

    References

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, - the component models the dynamic response using a first order differential equation. - The time constant of the component is equal to the parameter tau. - This time constant is adjusted based on the mass flow rate using + Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary + Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: + IIR/IIF.

    -

    - τeff = τ |ṁ| ⁄ ṁnom + +

    + +

    + This medium package models propylene glycol - water mixtures.

    - where - τeff is the effective time constant for the given mass flow rate - and - τ is the time constant at the nominal mass flow rate - nom. - This type of dynamics is equal to the dynamics that a completely mixed - control volume would have. + The mass density, specific heat capacity, thermal conductivity and viscosity + are assumed constant and evaluated at a set temperature and mass fraction of + propylene glycol within the mixture. The dependence of the four properties + are shown on the figure below. +

    +

    + \"Relative

    - Optionally, this model can have a flow resistance. - Set dp_nominal = 0 to disable the flow friction calculation. + The accuracy of the thermophysical properties is dependent on the temperature + variations encountered during simulations. + The figure below shows the relative error of the the four properties over a + 10 °C range around the temperature used to evaluate the constant + properties. The maximum errors are 0.8 % for mass density, 1.5 % + for specific heat capacity, 3.2 % for thermal conductivity and 250 + % for dynamic viscosity. +

    +

    + \"Relative

    - For a similar model that is a heater, use - - AixLib.Fluid.HeatExchangers.Heater_T. - For a model that uses a control signal u ∈ [0, 1] and multiplies - this with the nominal heating or cooling power, use - - AixLib.Fluid.HeatExchangers.HeaterCooler_u. + The figure below shows the relative error of the the four properties over a + 20 °C range around the temperature used to evaluate the constant + proepties. The maximum errors are 1.6 % for mass density, 3.0 % + for specific heat capacity, 6.2 % for thermal conductivity and 950 + % for dynamic viscosity. +

    +

    + \"Relative +

    +

    + The enthalpy is computed using the convention that h=0 + if T=0 °C.

    Limitations

    - If the flow is from port_b to port_a, - then the enthalpy of the medium is not affected by this model. + Density, specific heat capacity, thermal conductivity and viscosity are constant. + The propylene glycol/water mixture is modeled as an incompressible liquid. + There are no phase changes. The medium is limited to temperatures below + 100 °C and mass fractions below 0.60. + As is the case for AixLib.Media.Water, + this medium package should not be used if + the simulation relies on the dynamic viscosity.

    +

    Typical use and important parameters

    - This model does not affect the humidity of the air. Therefore, - if used to cool air below the dew point temperature, the water mass fraction - will not change. + The temperature and mass fraction must be specified for the evaluation of the + constant thermophysical properties. A typical use of the package is (e.g. for + a temperature of 20 °C and a mass fraction of 0.40):

    -

    Validation

    - The model has been validated against the analytical solution in - the examples - - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet - and - - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. + Medium = AixLib.Media.Antifreeze.PropyleneGlycolWater(property_T=293.15, X_a=0.40)

    -------- Corrected Code --------

    - Model for an ideal sensible-only cooler that controls its outlet - temperature to a prescribed outlet temperature. + This base properties model is identical to Modelica.Media.Water.ConstantPropertyLiquidWater, + except that the equation u = cv_const*(T - reference_T) + has been replaced by u=h because + cp_const=cv_const. Also, the model checks if the mass + fraction of the mixture is within the allowed limits. +

    +

    + Density of propylene antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010). +

    +

    + References +

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF. +

    + +

    + Dynamic viscosity of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010). +

    +

    + References +

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF. +

    + +

    + Fusion temperature of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010). +

    +

    + References +

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF. +

    + +

    + Evaluates a thermophysical property of a mixture, based on + correlations proposed by Melinder (2010). +

    +

    + The polynomial has the form +

    +

    + f = a1 (x-xm)0(y-ym)0 + + a2 (x-xm)0(y-ym)1 + ... + + any[1] (x-xm)0(y-ym)ny[1]-1 + ... + + any[1])+1 (x-xm)1(y-ym)0 + ... + + any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 + + ... +

    +

    + References +

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF. +

    + +

    + Specific heat capacity of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010). +

    +

    + References +

    +

    + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    +

    - This model forces the outlet temperature at port_b to be - no higher than the temperature of the input signal TSet, - subject to optional limits on the capacity. By default, the model has - unlimited cooling capacity. + Thermal conductivity of antifreeze-water mixture at specified mass + fraction and temperature, based on Melinder (2010).

    +

    + References +

    - The output signal Q_flow ≤ 0 is the heat added to the - medium if the mass flow rate is from port_a to - port_b. If the flow is reversed, then - Q_flow=0. + Melinder, Åke. 2010. Properties of Secondary Working Fluids + (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for + Indirect Systems. Paris: IIR/IIF.

    +

    - The outlet conditions at port_a are not affected by this - model, other than for a possible pressure difference due to flow - friction. + This medium package models propylene glycol - water mixtures.

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, the component - models the dynamic response using a first order differential - equation. The time constant of the component is equal to the - parameter tau. This time constant is adjusted based on - the mass flow rate using + The mass density, specific heat capacity, thermal conductivity and + viscosity are assumed constant and evaluated at a set temperature and + mass fraction of propylene glycol within the mixture. The dependence + of the four properties are shown on the figure below.

    -

    - τeff = τ |ṁ| ⁄ ṁnom +

    + +

    - where τeff is the effective time constant for the - given mass flow rate and τ is the time constant at - the nominal mass flow rate nom. This type of - dynamics is equal to the dynamics that a completely mixed control - volume would have. + The accuracy of the thermophysical properties is dependent on the + temperature variations encountered during simulations. The figure + below shows the relative error of the the four properties over a + 10 °C range around the temperature used to evaluate the + constant properties. The maximum errors are 0.8 % for mass + density, 1.5 % for specific heat capacity, 3.2 % for + thermal conductivity and 250 % for dynamic viscosity. +

    +

    + +

    - Optionally, this model can have a flow resistance. Set - dp_nominal = 0 to disable the flow friction calculation. + The figure below shows the relative error of the the four properties + over a 20 °C range around the temperature used to evaluate the + constant proepties. The maximum errors are 1.6 % for mass + density, 3.0 % for specific heat capacity, 6.2 % for + thermal conductivity and 950 % for dynamic viscosity. +

    +

    + +

    - For a similar model that is a heater, use AixLib.Fluid.HeatExchangers.Heater_T. - For a model that uses a control signal u ∈ [0, 1] and - multiplies this with the nominal heating or cooling power, use - AixLib.Fluid.HeatExchangers.HeaterCooler_u. + The enthalpy is computed using the convention that h=0 if + T=0 °C.

    Limitations

    - If the flow is from port_b to port_a, then - the enthalpy of the medium is not affected by this model. -

    -

    - This model does not affect the humidity of the air. Therefore, if - used to cool air below the dew point temperature, the water mass - fraction will not change. + Density, specific heat capacity, thermal conductivity and viscosity + are constant. The propylene glycol/water mixture is modeled as an + incompressible liquid. There are no phase changes. The medium is + limited to temperatures below 100 °C and mass fractions below + 0.60. As is the case for AixLib.Media.Water, this medium + package should not be used if the simulation relies on the dynamic + viscosity.

    - Validation + Typical use and important parameters

    - The model has been validated against the analytical solution in the - examples AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet - and - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. + The temperature and mass fraction must be specified for the + evaluation of the constant thermophysical properties. A typical use + of the package is (e.g. for a temperature of 20 °C and a mass + fraction of 0.40): +

    +

    + Medium = + AixLib.Media.Antifreeze.PropyleneGlycolWater(property_T=293.15, + X_a=0.40)

    + +-------- Errors -------- +line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 35 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/ThermalZones/ReducedOrder/RC/ThreeElements.mo ---- +-------- HTML Code -------- + +

    + +

    This model adds one further element for + the floor plate. Long-term effects dominate the excitation of the floor plate + and thus the excitation fundamentally differs from excitation of outer walls. + Adding an extra element for the floor plate leads to a finer resolution of the + dynamic behaviour but increases calculation times. The floor plate is + parameterized via the length of the RC-chain nFloor, + the vector of the capacities + CFloor[nFloor], the vector of the resistances + RFloor[nFloor] + and the remaining resistance RFloorRem. +

    +

    + The image below shows the RC-network of this model. +

    +

    + \"image\"/ +

    + +-------- Corrected Code -------- + +

    + This model adds one further element for the floor plate. Long-term + effects dominate the excitation of the floor plate and thus the + excitation fundamentally differs from excitation of outer walls. + Adding an extra element for the floor plate leads to a finer + resolution of the dynamic behaviour but increases calculation times. + The floor plate is parameterized via the length of the RC-chain + nFloor, the vector of the capacities + CFloor[nFloor], the vector of the resistances + RFloor[nFloor] and the remaining resistance + RFloorRem. +

    +

    + The image below shows the RC-network of this model. +

    +

    + \"image\" +

    -------- Errors -------- -line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 16 column 4 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Utilities/IO/SignalExchange/SignalTypes/SignalsForKPIs.mo ---- +---- AixLib/Fluid/Sources/Outside_CpLowRise.mo ---- -------- HTML Code --------

    - This enumeration defines the signal types that are used by BOPTEST - to compute the key performance indices (KPI). + This model describes boundary conditions for + pressure, enthalpy, and species concentration that can be obtained + from weather data. The model is identical to + + AixLib.Fluid.Sources.Outside, + except that it adds the wind pressure to the + pressure at the fluid port ports. + The correlation that is used to compute the wind pressure is based + on Swami and Chandra (1987) and valid for low-rise buildings + with rectangular shape. + The same correlation is also implemented in CONTAM (Persily and Ivy, 2001). + +

    +

    + The wind pressure coefficient is computed based on the + side ratio of the walls, which is defined as +

    +

    + s = x ⁄ y

    - The following signal types are supported. + where x is the length of the wall that will be connected to + this model, and y is the length of the adjacent wall. + The wind direction is computed relative to the azimuth of this surface, + which is equal to the parameter azi. + The surface azimuth is defined in + + AixLib.Types.Azimuth. + For example, if an exterior wall is South oriented, i.e., its outside-facing + surface is towards South, use + AixLib.Types.Azimuth.S. +

    +

    + Based on the surface azimuth, the wind direction and the side ratio + of the walls, the model computes how much the wind pressure + is attenuated compared to the reference wind pressure Cp0. + The reference wind pressure Cp0 is a user-defined parameter, + and must be equal to the wind pressure at zero wind incidence angle. + Swami and Chandra (1987) recommend Cp0 = 0.6 for + all low-rise buildings as this represents the average of + various values reported in the literature. + The computation of the actual wind pressure coefficient Cp + is explained in the function + + Buildings.Airflow.Multizone.BaseClasses.windPressureLowRise + that is called by this model. +

    +

    + The pressure p at the port ports is computed as +

    +

    + p = pw + Cp 1 ⁄ 2 v2 ρ, +

    +

    + where + pw is the atmospheric pressure from the weather bus, + v is the wind speed from the weather bus, and + ρ is the fluid density. +

    + +

    + This model differs from + AixLib.Fluid.Sources.Outside_CpData by the calculation of the wind pressure coefficient Cp,act. + The wind pressure coefficient is defined by an equation in stead of a user-defined table. + This model is only suited for low-rise rectangular buildings.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ValueDescription
    NoneNot used for KPI
    AirZoneTemperatureAir zone temperature
    RadiativeZoneTemperatureRadiative zone temperature
    OperativeZoneTemperatureOperative zone temperature
    RelativeHumidityRelative humidity
    CO2ConcentrationCO2 concentration
    ElectricPowerElectric power from grid
    DistrictHeatingPowerThermal power from district heating
    GasPowerThermal power from natural gas
    BiomassPowerThermal power from biomass
    SolarThermalPowerThermal power from solar thermal
    FreshWaterFlowRateFreshWaterFlowRate
    +

    References

    --------- Corrected Code -------- -

    - This enumeration defines the signal types that are used by BOPTEST to - compute the key performance indices (KPI). -

    -

    - The following signal types are supported. -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Value - - Description -
    - None - - Not used for KPI -
    - AirZoneTemperature - - Air zone temperature -
    - RadiativeZoneTemperature - - Radiative zone temperature -
    - OperativeZoneTemperature - - Operative zone temperature -
    - RelativeHumidity - - Relative humidity -
    - CO2Concentration - - CO2 concentration -
    - ElectricPower - - Electric power from grid -
    - DistrictHeatingPower - - Thermal power from district heating -
    - GasPower - - Thermal power from natural gas -
    - BiomassPower - - Thermal power from biomass -
    - SolarThermalPower - - Thermal power from solar thermal -
    - FreshWaterFlowRate - - FreshWaterFlowRate -
    + + +-------- Corrected Code -------- +

    + This model describes boundary conditions for pressure, enthalpy, and + species concentration that can be obtained from weather data. The + model is identical to AixLib.Fluid.Sources.Outside, + except that it adds the wind pressure to the pressure at the fluid + port ports. The correlation that is used to compute the + wind pressure is based on Swami and Chandra (1987) and valid for + low-rise buildings with rectangular shape. The same correlation is + also implemented in CONTAM (Persily and Ivy, 2001). + +

    +

    + The wind pressure coefficient is computed based on the side ratio of + the walls, which is defined as +

    +

    + s = x ⁄ y +

    +

    + where x is the length of the wall that will be connected to + this model, and y is the length of the adjacent wall. The wind + direction is computed relative to the azimuth of this surface, which + is equal to the parameter azi. The surface azimuth is + defined in AixLib.Types.Azimuth. For + example, if an exterior wall is South oriented, i.e., its + outside-facing surface is towards South, use + AixLib.Types.Azimuth.S. +

    +

    + Based on the surface azimuth, the wind direction and the side ratio + of the walls, the model computes how much the wind pressure is + attenuated compared to the reference wind pressure Cp0. + The reference wind pressure Cp0 is a user-defined + parameter, and must be equal to the wind pressure at zero wind + incidence angle. Swami and Chandra (1987) recommend Cp0 + = 0.6 for all low-rise buildings as this represents the average + of various values reported in the literature. The computation of the + actual wind pressure coefficient Cp is explained in + the function + Buildings.Airflow.Multizone.BaseClasses.windPressureLowRise that + is called by this model. +

    +

    + The pressure p at the port ports is computed as +

    +

    + p = pw + Cp 1 ⁄ 2 v2 ρ, +

    +

    + where pw is the atmospheric pressure from the + weather bus, v is the wind speed from the weather bus, and + ρ is the fluid density. +

    +

    + This model differs from AixLib.Fluid.Sources.Outside_CpData + by the calculation of the wind pressure coefficient + Cp,act. The wind pressure coefficient is defined by an + equation in stead of a user-defined table. This model is only suited + for low-rise rectangular buildings. +

    +

    + References +

    + -------- Errors -------- -line 9 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 28 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 61 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatExchangers/BaseClasses/WetCoilDryWetRegime.mo ---- +---- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/infiniteLineSource.mo ---- -------- HTML Code -------- -

    - -

    - This model implements the switching algorithm for the dry and wet regime. -

    -

    - The switching criteria for (counter-flow) cooling coil modes are as follows.

    -

    - R1: If the coil surface temperature at the air inlet is lower than the dew-point - temperature at the inlet to the coil, then the cooling coil surface is fully-wet.

    -

    - R2: If the surface temperature at the air outlet section is higher than - the dew-point temperature of the air at the inlet, then the cooling coil surface is fully-dry.

    -

    - At each point of a simulation time step, the fuzzy-modeling approach determines - the weights for R1 and R2 respectively (namely μFW and μFD) - from the dew-point and coil surface temperatures.

    - It calculates total and sensible heat transfer rates according to the weights as follows. + This function evaluates the infinite line source solution. This solution gives + the relation between the constant heat transfer rate (per unit length) injected + by a line heat source of infinite length and the temperature raise in the + medium. The infinite line source solution is defined by

    -

    - Q̇totFDtot,FDFW Qtot,FW +

    + \"image\"

    -

    - Q̇senFDsen,FDFW Qsen,FW +

    + where ΔT(t,r) is the temperature raise after a time t of + constant heat injection and at a distance r from the line source, + Q' is the heat injection rate per unit length, ks is + the soil thermal conductivity and hILS is the infinite line + source solution.

    - The fuzzy-modeling ensures μFW + μFD = 1, - μFW >=0 and μFD >=0, which means the fuzzy - model outcomes of sen and tot are always convex combinations of heat transfer - rates for fully-dry and fully-wet modes and therefore are always bounded by them. + The infinite line source solution is given by the exponential integral +

    +

    + \"image\"

    - The modeling approach also results in n-th order differentiable model - depending on the selection of the underlying membership functions. This cooling - coil model is once continuously differentiable at the mode switches. + where αs is the ground thermal diffusivity. The + exponential integral is implemented in + AixLib.Utilities.Math.Functions.exponentialIntegralE1.

    + + -------- Corrected Code -------- - -

    - This model implements the switching algorithm for the dry and wet - regime. -

    -

    - The switching criteria for (counter-flow) cooling coil modes are as - follows. -

    - R1: If the coil surface temperature at the air inlet is lower than - the dew-point temperature at the inlet to the coil, then the cooling - coil surface is fully-wet. + This function evaluates the infinite line source solution. This + solution gives the relation between the constant heat transfer rate + (per unit length) injected by a line heat source of infinite length + and the temperature raise in the medium. The infinite line source + solution is defined by

    -

    - R2: If the surface temperature at the air outlet section is higher - than the dew-point temperature of the air at the inlet, then the - cooling coil surface is fully-dry. +

    + \"image\"

    - At each point of a simulation time step, the fuzzy-modeling approach - determines the weights for R1 and R2 respectively (namely - μFW and μFD) from the dew-point - and coil surface temperatures. + where ΔT(t,r) is the temperature raise after a time t + of constant heat injection and at a distance r from the line + source, Q' is the heat injection rate per unit length, + ks is the soil thermal conductivity and + hILS is the infinite line source solution.

    - It calculates total and sensible heat transfer rates according to the - weights as follows. -

    -

    - Q̇totFDtot,FDFW - Qtot,FW -

    -

    - Q̇senFDsen,FDFW - Qsen,FW + The infinite line source solution is given by the exponential + integral

    -

    - The fuzzy-modeling ensures μFW + μFD = - 1, μFW >=0 and μFD >=0, - which means the fuzzy model outcomes of sen and - tot are always convex combinations of heat - transfer rates for fully-dry and fully-wet modes and therefore are - always bounded by them. +

    + \"image\"

    - The modeling approach also results in n-th order - differentiable model depending on the selection of the underlying - membership functions. This cooling coil model is once continuously - differentiable at the mode switches. + where αs is the ground thermal diffusivity. The + exponential integral is implemented in AixLib.Utilities.Math.Functions.exponentialIntegralE1.

    + --------- Errors -------- -line 20 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 23 column 2 - Warning:

    attribute "align" not allowed for HTML5 +-------- Errors -------- +line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 21 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/ThermalZones/ReducedOrder/RC/OneElement.mo ---- +---- AixLib/Utilities/Math/Polynomial.mo ---- -------- HTML Code -------- -

    - This model merges all thermal masses into one - element, parameterized by the length of the RC-chain - nExt, the vector of the capacities CExt[nExt] that is - connected via the vector of resistances RExt[nExt] and - RExtRem to the ambient and indoor air. - By default, the model neglects all - internal thermal masses that are not directly connected to the ambient. - However, the thermal capacity of the room air can be increased by - using the parameter mSenFac. -

    -

    - The image below shows the RC-network of this model. -

    -

    - \"image\"/ -

    - +

    This block computes a polynomial of arbitrary order. The polynomial has the form

    +

    y = a1 + a2 x + a3 x2 + ...

    + -------- Corrected Code --------

    - This model merges all thermal masses into one element, parameterized - by the length of the RC-chain nExt, the vector of the - capacities CExt[nExt] that is connected via the vector - of resistances RExt[nExt] and RExtRem to - the ambient and indoor air. By default, the model neglects all - internal thermal masses that are not directly connected to the - ambient. However, the thermal capacity of the room air can be - increased by using the parameter mSenFac. -

    -

    - The image below shows the RC-network of this model. + This block computes a polynomial of arbitrary order. The polynomial + has the form

    - \"image\" + y = a1 + a2 x + a3 x2 + ...

    -------- Errors -------- -line 16 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatPumps/Carnot_TCon.mo ---- +---- AixLib/Fluid/Humidifiers/Humidifier_u.mo ---- -------- HTML Code --------

    - This is a model of a heat pump whose coefficient of performance COP changes - with temperatures in the same way as the Carnot efficiency changes. - The control input is the setpoint of the condenser leaving temperature, which - is met exactly at steady state if the heat pump has sufficient capacity. -

    -

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or - a COP0 - at the nominal conditions, together with - the evaporator temperature Teva,0 and - the condenser temperature Tcon,0, in which - case the model computes the Carnot effectivness as -

    -

    - ηCarnot,0 = - COP0 - ⁄ (Tcon,0 ⁄ (Tcon,0-Teva,0)). -

    -

    - The heat pump COP is computed as the product -

    -

    - COP = ηCarnot,0 COPCarnot ηPL, + Model for an air humidifier or dehumidifier.

    - where COPCarnot is the Carnot efficiency and - ηPL is a polynomial in heating part load ratio yPL - that can be used to take into account a change in COP at part load - conditions. - This polynomial has the form + This model adds (or removes) moisture from the air stream. + The amount of exchanged moisture is equal to

    - ηPL = a1 + a2 yPL + a3 yPL2 + ... -

    -

    - where the coefficients ai - are declared by the parameter a. -

    -

    - On the Dynamics tag, the model can be parametrized to compute a transient - or steady-state response. - The transient response of the model is computed using a first - order differential equation for the evaporator and condenser fluid volumes. - The heat pump outlet temperatures are equal to the temperatures of these lumped volumes. -

    -

    Typical use and important parameters

    -

    - When using this component, make sure that the condenser has sufficient mass flow rate. - Based on the evaporator mass flow rate, temperature difference and the efficiencies, - the model computes how much heat will be removed by to the evaporator. - If the mass flow rate is too small, very low outlet temperatures can result, possibly below freezing. -

    -

    - The condenser heat flow rate QCon_flow_nominal is used to assign - the default value for the mass flow rates, which are used for the pressure drop - calculations. - It is also used to compute the part load efficiency. - Hence, make sure that QCon_flow_nominal is set to a reasonable value. -

    -

    - The maximum heating capacity is set by the parameter QCon_flow_max, - which is by default set to infinity. + ṁwat = u ṁwat,nom,

    - The coefficient of performance depends on the - evaporator and condenser leaving temperature - since otherwise the second law of thermodynamics may be violated. + where u is the control input signal and + wat,nom is equal to the parameter mWat_flow_nominal. + The parameter mWat_flow_nominal can be positive or negative. + If wat is positive, then moisture is added + to the air stream, otherwise it is removed.

    -

    Notes

    - For a similar model that can be used as a chiller, see - - AixLib.Fluid.Chillers.Examples.Carnot_TEva. + If the heat port heatPort is unconnected, then the enthalpy of the + air that flows through the device remains unchanged, e.g., the humidification + is adiabatic. To change the enthalpy of the air, add heat flow to the connector + heatPort.

    -------- Corrected Code --------

    - This is a model of a heat pump whose coefficient of performance COP - changes with temperatures in the same way as the Carnot efficiency - changes. The control input is the setpoint of the condenser leaving - temperature, which is met exactly at steady state if the heat pump - has sufficient capacity. -

    -

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or a COP0 at the - nominal conditions, together with the evaporator temperature - Teva,0 and the condenser temperature - Tcon,0, in which case the model computes the Carnot - effectivness as -

    -

    - ηCarnot,0 = COP0 ⁄ (Tcon,0 ⁄ - (Tcon,0-Teva,0)). -

    -

    - The heat pump COP is computed as the product -

    -

    - COP = ηCarnot,0 COPCarnot ηPL, + Model for an air humidifier or dehumidifier.

    - where COPCarnot is the Carnot efficiency and - ηPL is a polynomial in heating part load ratio - yPL that can be used to take into account a change - in COP at part load conditions. This polynomial has the form + This model adds (or removes) moisture from the air stream. The amount + of exchanged moisture is equal to

    - ηPL = a1 + a2 yPL + - a3 yPL2 + ... -

    -

    - where the coefficients ai are declared by the - parameter a. -

    -

    - On the Dynamics tag, the model can be parametrized to - compute a transient or steady-state response. The transient response - of the model is computed using a first order differential equation - for the evaporator and condenser fluid volumes. The heat pump outlet - temperatures are equal to the temperatures of these lumped volumes. -

    -

    - Typical use and important parameters -

    -

    - When using this component, make sure that the condenser has - sufficient mass flow rate. Based on the evaporator mass flow rate, - temperature difference and the efficiencies, the model computes how - much heat will be removed by to the evaporator. If the mass flow rate - is too small, very low outlet temperatures can result, possibly below - freezing. -

    -

    - The condenser heat flow rate QCon_flow_nominal is used - to assign the default value for the mass flow rates, which are used - for the pressure drop calculations. It is also used to compute the - part load efficiency. Hence, make sure that - QCon_flow_nominal is set to a reasonable value. -

    -

    - The maximum heating capacity is set by the parameter - QCon_flow_max, which is by default set to infinity. + ṁwat = u ṁwat,nom,

    - The coefficient of performance depends on the evaporator and - condenser leaving temperature since otherwise the second law of - thermodynamics may be violated. + where u is the control input signal and + wat,nom is equal to the parameter + mWat_flow_nominal. The parameter + mWat_flow_nominal can be positive or negative. If + wat is positive, then moisture is added to the + air stream, otherwise it is removed.

    -

    - Notes -

    - For a similar model that can be used as a chiller, see AixLib.Fluid.Chillers.Examples.Carnot_TEva. + If the heat port heatPort is unconnected, then the + enthalpy of the air that flows through the device remains unchanged, + e.g., the humidification is adiabatic. To change the enthalpy of the + air, add heat flow to the connector heatPort.

    -------- Errors -------- -line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 25 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 35 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Movers/BaseClasses/Characteristics/pressure.mo ---- +---- AixLib/Fluid/Actuators/BaseClasses/exponentialDamper.mo ---- -------- HTML Code --------

    - This function computes the fan static - pressure raise as a function of volume flow rate and revolution in the form + This function computes the opening characteristics of an exponential damper. +

    + The function is used by the model + + AixLib.Fluid.Actuators.Dampers.Exponential. +

    + For yL < y < yU, the damper characteristics is

    - Δp = rN2   s(V̇/rN, d), -

    -

    - where - Δp is the pressure rise, - rN is the normalized fan speed, - is the volume flow rate and - d are performance data for fan or pump power consumption at rN=1. + kd(y) = exp(a+b (1-y)).

    -

    Implementation

    - The function s(·, ·) is a cubic hermite spline. - If the data d define a monotone decreasing sequence, then - s(·, d) is a monotone decreasing function. + Outside this range, the damper characteristic is defined by a quadratic polynomial.

    - The function allows rN to be zero. + Note that this implementation returns sqrt(kd(y)) instead of kd(y). + This is done for numerical reason since otherwise kd(y) may be an iteration + variable, which may cause a lot of warnings and slower convergence if the solver + attempts kd(y) < 0 during the iterative solution procedure.

    -------- Corrected Code --------

    - This function computes the fan static pressure raise as a function of - volume flow rate and revolution in the form + This function computes the opening characteristics of an exponential + damper.

    -

    - Δp = rN2   s(V̇/rN, d), +

    + The function is used by the model AixLib.Fluid.Actuators.Dampers.Exponential.

    - where Δp is the pressure rise, rN is the - normalized fan speed, is the volume flow rate and d - are performance data for fan or pump power consumption at - rN=1. + For yL < y < yU, the damper characteristics is +

    +

    + kd(y) = exp(a+b (1-y)).

    -

    - Implementation -

    - The function s(·, ·) is a cubic hermite spline. If the data - d define a monotone decreasing sequence, then s(·, d) - is a monotone decreasing function. + Outside this range, the damper characteristic is defined by a + quadratic polynomial.

    - The function allows rN to be zero. + Note that this implementation returns sqrt(kd(y)) + instead of kd(y). This is done for numerical reason + since otherwise kd(y) may be an iteration variable, + which may cause a lot of warnings and slower convergence if the + solver attempts kd(y) < 0 during the iterative + solution procedure.

    -------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/LoadAggregation/Validation/ShiftAggregationCells.mo ---- +---- AixLib/BoundaryConditions/Validation/BESTEST/WD100.mo ---- -------- HTML Code -------- -

    - This validation case replicates the load-shifting procedure illustred in the figure below by Cimmino (2014). -

    -

    - \"image\" -

    -

    References

    -

    - Cimmino, M. 2014. Développement et validation expérimentale de facteurs de réponse - thermique pour champs de puits géothermiques, - Ph.D. Thesis, École Polytechnique de Montréal. -

    +

    WD100: Base Case

    +

    Weather data file : WD100.epw

    +

    Table 1: Site Data for Weather file WD100.epw

    +
    + + + + + + + + + + + + + + + +

    Latitude

    39.833° north

    Longitude

    104.65° west

    Altitude

    1650 m

    Time Zone

    -7

    +

    This model is a template for all the other test cases. + It allows to extrapolate all the weather data from the Reader TMY3 for a specific location, incliation and azimuth. + The model + AixLib.BoundaryConditions.Validation.IsotropicAndPerezDiffuseRadiation + outputs radiation data using the available Isotropic and Perez methodlogies. + The sky temperature is calculated using both the Horizontal radiation model, + from data reader weaBusHorRad and the dew point temperature plus sky cover model from the datareader weaBusSkyCovDewTem.

    -------- Corrected Code -------- +

    + WD100: Base Case +

    - This validation case replicates the load-shifting procedure illustred - in the figure below by Cimmino (2014). + Weather data file : WD100.epw

    -

    - \"image\" +

    + Table 1: Site Data for Weather file WD100.epw

    -

    - References -

    + + + + + + + + + + + + + + + + + +
    +

    + Latitude +

    +
    +

    + 39.833° north +

    +
    +

    + Longitude +

    +
    +

    + 104.65° west +

    +
    +

    + Altitude +

    +
    +

    + 1650 m +

    +
    +

    + Time Zone +

    +
    +

    + -7 +

    +

    - Cimmino, M. 2014. Développement et validation expérimentale de - facteurs de réponse thermique pour champs de puits géothermiques, - Ph.D. Thesis, École Polytechnique de Montréal. + This model is a template for all the other test cases. It allows to + extrapolate all the weather data from the Reader TMY3 for a specific + location, incliation and azimuth. The model + AixLib.BoundaryConditions.Validation.IsotropicAndPerezDiffuseRadiation + outputs radiation data using the available Isotropic and Perez + methodlogies. The sky temperature is calculated using both the + Horizontal radiation model, from data reader weaBusHorRad and the dew + point temperature plus sky cover model from the datareader + weaBusSkyCovDewTem.

    -------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FMI/ExportContainers/HVACZones.mo ---- --------- HTML Code -------- +line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 + + +---- AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowHeatLoss.mo ---- +-------- HTML Code --------

    - Model that is used as a container for an HVAC system that is - to be exported as an FMU and that serves multiple zones. -

    -

    Typical use and important parameters

    -

    - To use this model as a container for an FMU, simply extend - from this model, rather than instantiate it, - and add your HVAC system. By extending from this model, the top-level - signal connectors on the right stay at the top-level, and hence - will be visible at the FMI interface. - The example - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones - shows how a simple HVAC system that serves two rooms can be implemented and exported as - an FMU. - -

    -

    - The following two parameters need to be assigned by the user: - Set nZon to the number of thermal zones to which the - FMU will be connected. - Set nPorts to the largest number of fluid ports - that the thermal zones has. For example, - if nZon=2 and zone 1 has one inlet and one outlet - (hence it has 2 ports), - and zone 2 has one inlets and two outlets - (hence it has 3 ports), then - set nPorts=3. This will add more fluid ports than are needed - for zone 1, but this causes no overhead if they are not connected. -

    -

    - The conversion between the fluid ports and signal ports is done - in the HVAC adapter hvacAda. - This adapter has a vector of fluid ports called ports. - The supply and return air ducts, including any resistance model for the inlet - diffusor or exhaust grill, need to be connected to these ports. - Also, if a thermal zone has interzonal air exchange or air infiltration, - these flows need to be connected to ports. - This model outputs at the port fluPor the mass flow rate for - each flow that is connected to ports, together with its - temperature, water vapor mass fraction per total mass of the air (not per kg dry - air), and trace substances. These quantities are always as if the flow - enters the room, even if the flow is zero or negative. - If a medium has no moisture, e.g., if Medium.nXi=0, or - if it has no trace substances, e.g., if Medium.nC=0, then - the output signal for these properties are removed. - These quantities are always as if the flow - enters the room, even if the flow is zero or negative. - Thus, a thermal zone model that uses these signals to compute the - heat added by the HVAC system need to implement an equation such as -

    -

    - Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon), -

    -

    - where - Qsen is the sensible heat flow rate added to the thermal zone, - sup is the supply air mass flow rate from - the port fluPor (which is negative if it is an exhaust), - cp is the specific heat capacity at constant pressure, - Tsup is the supply air temperature and - Tair,zon is the zone air temperature. - Note that without the max(·, ·), the energy - balance would be wrong. -

    - -

    - The input signals of this model are the radiative temperature of each zone. - The the zone air temperatures, - the water vapor mass fractions per total mass of the air (unless Medium.nXi=0) - and trace substances (unless Medium.nC=0) are obtained from the connector - fluPor.backward. - The outflowing fluid stream(s) at the port ports will be at the - states obtained from fluPor.backward. - For any given izon ∈ {1, ..., nzon}, - for each iports ∈ {1, ..., nports} - all fluid streams at port ports[izon, iports] are at the same - pressure. - For convenience, the instance hvacAda also outputs the - properties obtained from fluPor.backward. These can be used - to connect a controller. The properties are available for each flow path in - fluPor.backward. For a thermal zone with mixed air, these are - all equal, while for a stratified room model, they can be different. + Component that calculates the heat losses at the end of a plug flow pipe + when the flow goes in the design direction.

    +

    Main equations

    - See - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones - for a model that uses this model. + The governing equations are

    -

    - For models that only have one thermal zone connected to the HVAC system, - use the simpler model - - AixLib.Fluid.FMI.ExportContainers.HVACZone. +

    + Tout = Tb + (Tin - Tb) + exp((tout - tin)/tauchar)

    -

    Assumption and limitations

    - The mass flow rates at ports sum to zero, hence this - model conserves mass for each thermal zone. + with

    +

    + tauchar = R C +

    +

    Assumptions and limitations

    - This model does not impose any pressure, other than, - for any given izon ∈ {1, ..., nzon} and - for each j,k ∈ {1, ..., nports}, - setting the pressure of ports[izon, j].p = ports[izon, k].p - to be the same. - The reason is that setting a pressure can lead to non-physical system models, - for example if a mass flow rate is imposed and the HVAC system is connected - to a model that sets a pressure boundary condition such as - - AixLib.Fluid.Sources.Outside. - Also, setting a pressure would make it impossible to use multiple instances - of this model (one for each thermal zone) and build in Modelica an airflow network - model with pressure driven mass flow rates. + This model is based on the following assumptions:

    + +

    Implementation

    - The model has no pressure drop. Hence, the pressure drop - of an air diffuser or of an exhaust grill needs to be modelled - in models that are connected to ports. + Heat losses are only considered in design flow direction. + For heat loss consideration in both directions, use one of these models at + both ends of a + + AixLib.Fluid.FixedResistances.BaseClasses.PlugFlow model. + The outlet temperature is calculated as in the equation above, + using the inlet temperature at port_a and the instantaneous + time delay and boundary temperature. + The boundary temperature can be either the air temperature + or the undisturbed ground temperature, depending on the definition of the + thermal resistance R.

    +

    + This component requires the delay time and the instantaneous ambient temperature + as an input. + This component is to be used in single pipes or in more advanced configurations + where no influence from other pipes is considered.

    -------- Corrected Code --------

    - Model that is used as a container for an HVAC system that is to be - exported as an FMU and that serves multiple zones. + Component that calculates the heat losses at the end of a plug flow + pipe when the flow goes in the design direction.

    - Typical use and important parameters + Main equations

    - To use this model as a container for an FMU, simply extend from this - model, rather than instantiate it, and add your HVAC system. By - extending from this model, the top-level signal connectors on the - right stay at the top-level, and hence will be visible at the FMI - interface. The example - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones shows - how a simple HVAC system that serves two rooms can be implemented and - exported as an FMU. -

    -

    - The following two parameters need to be assigned by the user: Set - nZon to the number of thermal zones to which the FMU - will be connected. Set nPorts to the largest number of - fluid ports that the thermal zones has. For example, if - nZon=2 and zone 1 has one inlet and one outlet - (hence it has 2 ports), and zone 2 has one inlets and two - outlets (hence it has 3 ports), then set nPorts=3. This - will add more fluid ports than are needed for zone 1, but this - causes no overhead if they are not connected. -

    -

    - The conversion between the fluid ports and signal ports is done in - the HVAC adapter hvacAda. This adapter has a vector of - fluid ports called ports. The supply and return air - ducts, including any resistance model for the inlet diffusor or - exhaust grill, need to be connected to these ports. Also, if a - thermal zone has interzonal air exchange or air infiltration, these - flows need to be connected to ports. This model outputs - at the port fluPor the mass flow rate for each flow that - is connected to ports, together with its temperature, - water vapor mass fraction per total mass of the air (not per kg dry - air), and trace substances. These quantities are always as if the - flow enters the room, even if the flow is zero or negative. If a - medium has no moisture, e.g., if Medium.nXi=0, or if it - has no trace substances, e.g., if Medium.nC=0, then the - output signal for these properties are removed. These quantities are - always as if the flow enters the room, even if the flow is zero or - negative. Thus, a thermal zone model that uses these signals to - compute the heat added by the HVAC system need to implement an - equation such as + The governing equations are

    - Qsen = max(0, ṁsup)   cp   - (Tsup - Tair,zon), -

    -

    - where Qsen is the sensible heat flow rate added to - the thermal zone, sup is the supply air mass flow - rate from the port fluPor (which is negative if it is an - exhaust), cp is the specific heat capacity at - constant pressure, Tsup is the supply air - temperature and Tair,zon is the zone air - temperature. Note that without the max(·, ·), the energy - balance would be wrong. -

    -

    - The input signals of this model are the radiative temperature of each - zone. The the zone air temperatures, the water vapor mass fractions - per total mass of the air (unless Medium.nXi=0) and - trace substances (unless Medium.nC=0) are obtained from - the connector fluPor.backward. The outflowing fluid - stream(s) at the port ports will be at the states - obtained from fluPor.backward. For any given - izon ∈ {1, ..., nzon}, for each - iports ∈ {1, ..., nports} all fluid - streams at port ports[izon, - iports] are at the same pressure. For convenience, - the instance hvacAda also outputs the properties - obtained from fluPor.backward. These can be used to - connect a controller. The properties are available for each flow path - in fluPor.backward. For a thermal zone with mixed air, - these are all equal, while for a stratified room model, they can be - different. + Tout = Tb + (Tin - Tb) + exp((tout - tin)/tauchar)

    - See - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones for a - model that uses this model. + with

    -

    - For models that only have one thermal zone connected to the HVAC - system, use the simpler model AixLib.Fluid.FMI.ExportContainers.HVACZone. +

    + tauchar = R C

    - Assumption and limitations + Assumptions and limitations

    - The mass flow rates at ports sum to zero, hence this - model conserves mass for each thermal zone. + This model is based on the following assumptions:

    + +

    + Implementation +

    - This model does not impose any pressure, other than, for any given - izon ∈ {1, ..., nzon} and for each - j,k ∈ {1, ..., nports}, setting the pressure of - ports[izon, j].p = ports[izon, - k].p to be the same. The reason is that setting a pressure can - lead to non-physical system models, for example if a mass flow rate - is imposed and the HVAC system is connected to a model that sets a - pressure boundary condition such as AixLib.Fluid.Sources.Outside. - Also, setting a pressure would make it impossible to use multiple - instances of this model (one for each thermal zone) and build in - Modelica an airflow network model with pressure driven mass flow - rates. + Heat losses are only considered in design flow direction. For heat + loss consideration in both directions, use one of these models at + both ends of a AixLib.Fluid.FixedResistances.BaseClasses.PlugFlow + model. The outlet temperature is calculated as in the equation above, + using the inlet temperature at port_a and the + instantaneous time delay and boundary temperature. The boundary + temperature can be either the air temperature or the undisturbed + ground temperature, depending on the definition of the thermal + resistance R.

    - The model has no pressure drop. Hence, the pressure drop of an air - diffuser or of an exhaust grill needs to be modelled in models that - are connected to ports. + This component requires the delay time and the instantaneous ambient + temperature as an input. This component is to be used in single pipes + or in more advanced configurations where no influence from other + pipes is considered.

    -------- Errors -------- -line 60 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Media/Antifreeze/EthyleneGlycolWater.mo ---- +---- AixLib/ThermalZones/ReducedOrder/RC/TwoElements.mo ---- -------- HTML Code -------- -

    - This base properties model is identical to - - Modelica.Media.Water.ConstantPropertyLiquidWater, - except that the equation - u = cv_const*(T - reference_T) - has been replaced by u=h because - cp_const=cv_const. - Also, the model checks if the mass fraction of the mixture is within the - allowed limits. -

    + -

    - Density of propylene antifreeze-water mixture at specified mass fraction - and temperature, based on Melinder (2010). +

    This model distinguishes between internal + thermal masses and exterior walls. While exterior walls contribute to heat + transfer to the ambient, adiabatic conditions apply to internal masses. + Parameters for the internal wall element are the length of the RC-chain + nInt, the vector of the capacities + CInt[nInt] and the vector of the resistances RInt[nInt]. + This approach allows considering the dynamic behaviour induced by internal + heat storage.

    -

    References

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. + The image below shows the RC-network of this model. +

    +

    + \"image\"/

    - - -

    - Dynamic viscosity of antifreeze-water mixture at specified mass fraction and - temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    +-------- Corrected Code -------- + +

    + This model distinguishes between internal thermal masses and exterior + walls. While exterior walls contribute to heat transfer to the + ambient, adiabatic conditions apply to internal masses. Parameters + for the internal wall element are the length of the RC-chain + nInt, the vector of the capacities + CInt[nInt] and the vector of the resistances + RInt[nInt]. This approach allows considering the dynamic + behaviour induced by internal heat storage. +

    +

    + The image below shows the RC-network of this model. +

    +

    + \"image\" +

    + +-------- Errors -------- +line 14 column 4 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Media/Specialized/Air/PerfectGas.mo ---- +-------- HTML Code -------- + + Function to set the state for given pressure, enthalpy and species concentration. -

    + The thermodynamic state record + is computed from density d, temperature T and composition X. -

    - Fusion temperature of antifreeze-water mixture at specified mass fraction and - temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    + Saturation pressure of water above the triple point temperature is computed from temperature. It's range of validity is between + 273.16 and 373.16 K. Outside these limits a less accurate result is returned. - + Derivative function of + + AixLib.Media.Specialized.Air.PerfectGas.saturationPressureLiquid -

    - Evaluates a thermophysical property of a mixture, based on correlations proposed - by Melinder (2010). -

    -

    - The polynomial has the form -

    -

    - f = a1 (x-xm)0(y-ym)0 - + a2 (x-xm)0(y-ym)1 - + ... + - any[1] (x-xm)0(y-ym)ny[1]-1 - + ... + - any[1])+1 (x-xm)1(y-ym)0 - + ... + - any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 - + ... -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    + Pressure is returned from the thermodynamic state record input as a simple assignment. - + Temperature is returned from the thermodynamic state record input as a simple assignment. -

    - Specific heat capacity of antifreeze-water mixture at specified mass fraction - and temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    + Density is computed from pressure, temperature and composition in the thermodynamic state record applying the ideal gas law. - + Specific entropy is calculated from the thermodynamic state record, assuming ideal gas behavior and including entropy of mixing. Liquid or solid water is not taken into account, the entire water content X[1] is assumed to be in the vapor state (relative humidity below 1.0). + + Temperature as a function of specific enthalpy and species concentration. + The pressure is input for compatibility with the medium models, but the temperature + is independent of the pressure.

    - Thermal conductivity of antifreeze-water mixture at specified mass fraction and - temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. + This data record contains the coefficients for perfect gases.

    - This medium package models ethylene glycol - water mixtures. + This package contains a thermally perfect model of moist air.

    - The mass density, specific heat capacity, thermal conductivity and viscosity - are assumed constant and evaluated at a set temperature and mass fraction of - ethylene glycol within the mixture. The dependence of the four properties - are shown on the figure below. -

    -

    - \"Relative + A medium is called thermally perfect if

    +

    - The accuracy of the thermophysical properties is dependent on the temperature - variations encountered during simulations. - The figure below shows the relative error of the the four properties over a - 10 °C range around the temperature used to evaluate the constant - properties. The maximum errors are 0.8 % for mass density, 2.7 % - for specific heat capacity, 3.2 % for thermal conductivity and 160 - % for dynamic viscosity. -

    -

    - \"Relative + In addition, this medium model is calorically perfect, i.e., the + specific heat capacities at constant pressure cp + and constant volume cv are both constant (Bower 1998).

    - The figure below shows the relative error of the the four properties over a - 20 °C range around the temperature used to evaluate the constant - proepties. The maximum errors are 1.5 % for mass density, 5.3 % - for specific heat capacity, 5.9 % for thermal conductivity and 500 - % for dynamic viscosity. + This medium uses the ideal gas law

    -

    - \"Relative +

    + ρ = p ⁄(R T),

    - The enthalpy is computed using the convention that h=0 - if T=0 °C. + where + ρ is the density, + p is the pressure, + R is the gas constant and + T is the temperature.

    -

    Limitations

    - Density, specific heat capacity, thermal conductivity and viscosity are constant. - The ethylene glycol/water mixture is modeled as an incompressible liquid. - There are no phase changes. The medium is limited to temperatures below - 100 °C and mass fractions below 0.60. - As is the case for AixLib.Media.Water, - this medium package should not be used if - the simulation relies on the dynamic viscosity. + The enthalpy is computed using the convention that h=0 + if T=0 °C and no water vapor is present.

    -

    Typical use and important parameters

    - The temperature and mass fraction must be specified for the evaluation of the - constant thermophysical properties. A typical use of the package is (e.g. for - a temperature of 20 °C and a mass fraction of 0.40): + Note that for typical building simulations, the media + AixLib.Media.Air + should be used as it leads generally to faster simulation.

    +

    References

    - Medium = AixLib.Media.Antifreeze.EthyleneGlycolWater(property_T=293.15, X_a=0.40) + Bower, William B. A primer in fluid mechanics: Dynamics of flows in one + space dimension. CRC Press. 1998.

    -------- Corrected Code -------- +Function to set the state for given pressure, enthalpy and species +concentration. +The thermodynamic state record is computed from density d, temperature +T and composition X. +Saturation pressure of water above the triple point temperature is +computed from temperature. It's range of validity is between 273.16 and +373.16 K. Outside these limits a less accurate result is returned. +Derivative function of +AixLib.Media.Specialized.Air.PerfectGas.saturationPressureLiquid +Pressure is returned from the thermodynamic state record input as a +simple assignment. +Temperature is returned from the thermodynamic state record input as a +simple assignment. +Density is computed from pressure, temperature and composition in the +thermodynamic state record applying the ideal gas law. +Specific entropy is calculated from the thermodynamic state record, +assuming ideal gas behavior and including entropy of mixing. Liquid or +solid water is not taken into account, the entire water content X[1] is +assumed to be in the vapor state (relative humidity below 1.0). +Temperature as a function of specific enthalpy and species +concentration. The pressure is input for compatibility with the medium +models, but the temperature is independent of the pressure.

    - This base properties model is identical to Modelica.Media.Water.ConstantPropertyLiquidWater, - except that the equation u = cv_const*(T - reference_T) - has been replaced by u=h because - cp_const=cv_const. Also, the model checks if the mass - fraction of the mixture is within the allowed limits. -

    -

    - Density of propylene antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    - -

    - Dynamic viscosity of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    - -

    - Fusion temperature of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    - -

    - Evaluates a thermophysical property of a mixture, based on - correlations proposed by Melinder (2010). -

    -

    - The polynomial has the form -

    -

    - f = a1 (x-xm)0(y-ym)0 + - a2 (x-xm)0(y-ym)1 + ... + - any[1] (x-xm)0(y-ym)ny[1]-1 + ... + - any[1])+1 (x-xm)1(y-ym)0 + ... + - any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 + - ... -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. + This data record contains the coefficients for perfect gases.

    -

    - Specific heat capacity of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    -

    - Thermal conductivity of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). + This package contains a thermally perfect model of moist air.

    -

    - References -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. + A medium is called thermally perfect if

    - This medium package models ethylene glycol - water mixtures. -

    -

    - The mass density, specific heat capacity, thermal conductivity and - viscosity are assumed constant and evaluated at a set temperature and - mass fraction of ethylene glycol within the mixture. The dependence - of the four properties are shown on the figure below. -

    -

    - - + In addition, this medium model is calorically perfect, i.e., + the specific heat capacities at constant pressure + cp and constant volume cv are + both constant (Bower 1998).

    - The accuracy of the thermophysical properties is dependent on the - temperature variations encountered during simulations. The figure - below shows the relative error of the the four properties over a - 10 °C range around the temperature used to evaluate the - constant properties. The maximum errors are 0.8 % for mass - density, 2.7 % for specific heat capacity, 3.2 % for - thermal conductivity and 160 % for dynamic viscosity. + This medium uses the ideal gas law

    -

    - - +

    + ρ = p ⁄(R T),

    - The figure below shows the relative error of the the four properties - over a 20 °C range around the temperature used to evaluate the - constant proepties. The maximum errors are 1.5 % for mass - density, 5.3 % for specific heat capacity, 5.9 % for - thermal conductivity and 500 % for dynamic viscosity. -

    -

    - - + where ρ is the density, p is the pressure, R is + the gas constant and T is the temperature.

    The enthalpy is computed using the convention that h=0 if - T=0 °C. + T=0 °C and no water vapor is present.

    -

    - Limitations -

    - Density, specific heat capacity, thermal conductivity and viscosity - are constant. The ethylene glycol/water mixture is modeled as an - incompressible liquid. There are no phase changes. The medium is - limited to temperatures below 100 °C and mass fractions below - 0.60. As is the case for AixLib.Media.Water, this medium - package should not be used if the simulation relies on the dynamic - viscosity. + Note that for typical building simulations, the media AixLib.Media.Air should be used as + it leads generally to faster simulation.

    - Typical use and important parameters + References

    - The temperature and mass fraction must be specified for the - evaluation of the constant thermophysical properties. A typical use - of the package is (e.g. for a temperature of 20 °C and a mass - fraction of 0.40): -

    -

    - Medium = - AixLib.Media.Antifreeze.EthyleneGlycolWater(property_T=293.15, - X_a=0.40) + Bower, William B. A primer in fluid mechanics: Dynamics of flows + in one space dimension. CRC Press. 1998.

    -------- Errors -------- -line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 25 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 35 column 2 - Warning:

    attribute "align" not allowed for HTML5 +---- AixLib/Utilities/Math/Functions/quadraticLinear.mo ---- +-------- HTML Code -------- + + This function computes +

    + y = a1 + a2 x1 + + a3 x12 + + (a4 + a5 x1 + + a6 x12) x2 +

    + + + +-------- Corrected Code -------- +This function computes +

    + y = a1 + a2 x1 + a3 + x12 + (a4 + a5 + x1 + a6 x12) + x2 +

    + +-------- Errors -------- +line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Sensors/LatentEnthalpyFlowRate.mo ---- + +---- AixLib/BoundaryConditions/WeatherData/ReaderTMY3.mo ---- -------- HTML Code --------

    - This model outputs the latent enthalphy flow rate of the medium in the flow - between its fluid ports. In particular, if the total enthalpy flow rate is + Block to output the latitude of the location. + This block is added so that the latitude is displayed + with a comment in the GUI of the weather bus connector.

    -

    - Ḣtot = Ḣsen + Ḣlat, +

    Implementation

    +

    + If + + Modelica.Blocks.Sources.Constant where used, then + the comment for the latitude would be \"Connector of Real output signal\". + As this documentation string cannot be overwritten, a new block + was implemented.

    + + +

    - where - sen = ṁ (1-Xw) cp,air, - then this sensor outputs Ḣ = Ḣlat. + Block to output the longitude of the location. + This block is added so that the longitude is displayed + with a comment in the GUI of the weather bus connector.

    +

    Implementation

    - If the parameter tau is non-zero, then the measured - specific latent enthalpy hout that is used to - compute the latent enthalpy flow rate - lat = ṁ hout - is computed using a first order differential equation. - See - AixLib.Fluid.Sensors.UsersGuide for an explanation. + If + + Modelica.Blocks.Sources.Constant where used, then + the comment for the longitude would be \"Connector of Real output signal\". + As this documentation string cannot be overwritten, a new block + was implemented. +

    + + + +

    + Block to output the altitude of the location. + This block is added so that the altitude is displayed + with a comment in the GUI of the weather bus connector. +

    +

    Implementation

    +

    + If + + Modelica.Blocks.Sources.Constant where used, then + the comment for the Altitude would be \"Connector of Real output signal\". + As this documentation string cannot be overwritten, a new block + was implemented. +

    + + + +

    + This component reads TMY3 weather data (Wilcox and Marion, 2008) or user specified weather data. + The Modelica built-in variable time determines what row + of the weather file is read. + The value of time is the number of seconds + that have passed since January 1st at midnight (00:00) in the local time zone. + The local time zone value, longitude and latitute are also read from the weather data, + such that the solar position computations are consistent with the weather data.

    - For a sensor that measures - tot, use - - AixLib.Fluid.Sensors.EnthalpyFlowRate.
    - For a sensor that measures - sen, use - - AixLib.Fluid.Sensors.SensibleEnthalpyFlowRate. + The weather data format is the Typical Meteorological Year (TMY3) + as obtained from the EnergyPlus web site at + + http://energyplus.net/weather. These + data, which are in the EnergyPlus format, need to be converted as described + below. +

    + +

    Output to weaBus

    +

    + The following variables serve as output and are accessible via weaBus:

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name + Unit + Description +
    + HDifHor + + W/m2 + + Horizontal diffuse solar radiation. +
    + HDifNor + + W/m2 + + Direct normal radiation. +
    + HGloHor + + W/m2 + + Horizontal global radiation. +
    + HHorIR + + W/m2 + + Horizontal infrared irradiation. +
    + TBlaSky + + K + + Output temperature. +
    + TDewPoi + + K + + Dew point temperature. +
    + TDryBul + + K + + Dry bulb temperature at ground level. +
    + TWetBul + + K + + Wet bulb temperature. +
    + celHei + + m + + Ceiling height. +
    + cloTim + + s + + One-based day number in seconds. +
    + lat + + rad + + Latitude of the location. +
    + lon + + rad + + Longitude of the location. +
    + nOpa + + 1 + + Opaque sky cover [0, 1]. +
    + nTot + + 1 + + Total sky Cover [0, 1]. +
    + pAtm + + Pa + + Atmospheric pressure. +
    + relHum + + 1 + + Relative humidity. +
    + solAlt + + rad + + Altitude angle. +
    + solDec + + rad + + Declination angle. +
    + solHouAng + + rad + + Solar hour angle. +
    + solTim + + s + + Solar time. +
    + solZen + + rad + + Zenith angle. +
    + winDir + + rad + + Wind direction. +
    + winSpe + + m/s + + Wind speed. +
    + +

    Adding new weather data

    - The sensor is ideal, i.e., it does not influence the fluid. - The sensor can only be used with medium models that implement the function - enthalpyOfNonCondensingGas(T). + To add new weather data, proceed as follows:

    - - - --------- Corrected Code -------- -

    - This model outputs the latent enthalphy flow rate of the - medium in the flow between its fluid ports. In particular, if the - total enthalpy flow rate is -

    -

    - Ḣtot = Ḣsen + Ḣlat, -

    -

    - where sen = ṁ (1-Xw) - cp,air, then this sensor outputs Ḣ = - Ḣlat. -

    -

    - If the parameter tau is non-zero, then the measured - specific latent enthalpy hout that is used to - compute the latent enthalpy flow rate lat = ṁ - hout is computed using a first order differential - equation. See AixLib.Fluid.Sensors.UsersGuide - for an explanation. -

    -

    - For a sensor that measures tot, use AixLib.Fluid.Sensors.EnthalpyFlowRate.
    - - For a sensor that measures sen, use AixLib.Fluid.Sensors.SensibleEnthalpyFlowRate. -

    -

    - The sensor is ideal, i.e., it does not influence the fluid. The - sensor can only be used with medium models that implement the - function enthalpyOfNonCondensingGas(T). -

    - - --------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/ActiveBeams/Data/BaseClasses/TemperatureDifference.mo ---- --------- HTML Code -------- - -

    - Data record for performance data that describe the normalized - temperature difference - versus the change in the rate of heating or cooling. - The normalized temperature difference is defined as -

    -

    - rΔTi= - ΔTi ⁄ ΔTnominal - = - (Twi-Tz) - ⁄ - (Tw,nominal-Tz), -

    -

    - where - Twi is the water inlet temperature, - Tz is the zone air temperature and - Tw,nominal is the nominal water inlet temperature. -

    + Add the file to AixLib/Resources/weatherdata (or to any directory + for which you have write permission). + +
  • + On a console window, type
    +   cd AixLib/Resources/weatherdata
    +   java -jar ../bin/ConvertWeatherData.jar inputFile.epw
    + 
    + if inputFile contains space in the name: +
    +   java -jar ../bin/ConvertWeatherData.jar \"inputFile .epw\"
    + 
    + This will generate the weather data file inputFile.mos, which can be read + by the model + + AixLib.BoundaryConditions.WeatherData.ReaderTMY3. +
  • + + +

    Location data that are read automatically from the weather data file

    - The normalized temperature difference rΔT must be strictly increasing, i.e., - rΔTi < rΔTi+1. - Both vectors, rΔT and f - must have the same size. + The following location data are automatically read from the weather file:

    - - --------- Corrected Code -------- -

    - Data record for performance data that describe the normalized - temperature difference versus the change in the rate of heating or - cooling. The normalized temperature difference is defined as -

    -

    - rΔTi= ΔTi ⁄ ΔTnominal = - (Twi-Tz) ⁄ - (Tw,nominal-Tz), -

    -

    - where Twi is the water inlet - temperature, Tz is the zone air temperature and - Tw,nominal is the nominal water inlet temperature. -

    -

    - The normalized temperature difference rΔT must be - strictly increasing, i.e., rΔTi < - rΔTi+1. Both vectors, rΔT - and f must have the same size. -

    - - --------- Errors -------- -line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/HeatExchangers/Heater_T.mo ---- --------- HTML Code -------- - -

    - Model for an ideal heater that controls its outlet temperature to - a prescribed outlet temperature. -

    -

    - This model forces the outlet temperature at port_b to be - no lower than the temperature of the input signal - TSet, subject to optional limits on the - capacity. - By default, the model has unlimited heating capacity. -

    -

    - The output signal Q_flow is the heat added - to the medium if the mass flow rate is from port_a to port_b. - If the flow is reversed, then Q_flow=0. -

    -

    - The outlet conditions at port_a are not affected by this model, - other than for a possible pressure difference due to flow friction. -

    -

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, - the component models the dynamic response using a first order differential equation. - The time constant of the component is equal to the parameter tau. - This time constant is adjusted based on the mass flow rate using -

    -

    - τeff = τ |ṁ| ⁄ ṁnom -

    -

    - where - τeff is the effective time constant for the given mass flow rate - and - τ is the time constant at the nominal mass flow rate - nom. - This type of dynamics is equal to the dynamics that a completely mixed - control volume would have. -

    -

    - Optionally, this model can have a flow resistance. - Set dp_nominal = 0 to disable the flow friction calculation. -

    -

    - For a similar model that is a sensible cooling device, use - - AixLib.Fluid.HeatExchangers.SensibleCooler_T. - For a model that uses a control signal u ∈ [0, 1] and multiplies - this with the nominal heating or cooling power, use - - AixLib.Fluid.HeatExchangers.HeaterCooler_u - -

    -

    Limitations

    + +

    Wet bulb temperature

    - If the flow is from port_b to port_a, - then the enthalpy of the medium is not affected by this model. + By default, the data bus contains the wet bulb temperature. + This introduces a nonlinear equation. + However, we have not observed an increase in computing time because + of this equation. + To disable the computation of the wet bulb temperature, set + computeWetBulbTemperature=false.

    -

    Validation

    + +

    Using constant or user-defined input signals for weather data

    - The model has been validated against the analytical solution in - the examples - - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet - and - - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. + This model has the option of using a constant value, using the data from the weather file, + or using data from an input connector for the following variables:

    - - --------- Corrected Code -------- -

    - Model for an ideal heater that controls its outlet temperature to a - prescribed outlet temperature. -

    -

    - This model forces the outlet temperature at port_b to be - no lower than the temperature of the input signal TSet, - subject to optional limits on the capacity. By default, the model has - unlimited heating capacity. -

    -

    - The output signal Q_flow is the heat added to the medium - if the mass flow rate is from port_a to - port_b. If the flow is reversed, then - Q_flow=0. -

    -

    - The outlet conditions at port_a are not affected by this - model, other than for a possible pressure difference due to flow - friction. -

    -

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, the component - models the dynamic response using a first order differential - equation. The time constant of the component is equal to the - parameter tau. This time constant is adjusted based on - the mass flow rate using -

    -

    - τeff = τ |ṁ| ⁄ ṁnom -

    -

    - where τeff is the effective time constant for the - given mass flow rate and τ is the time constant at - the nominal mass flow rate nom. This type of - dynamics is equal to the dynamics that a completely mixed control - volume would have. -

    -

    - Optionally, this model can have a flow resistance. Set - dp_nominal = 0 to disable the flow friction calculation. -

    -

    - For a similar model that is a sensible cooling device, use AixLib.Fluid.HeatExchangers.SensibleCooler_T. - For a model that uses a control signal u ∈ [0, 1] and - multiplies this with the nominal heating or cooling power, use - AixLib.Fluid.HeatExchangers.HeaterCooler_u -

    -

    - Limitations -

    -

    - If the flow is from port_b to port_a, then - the enthalpy of the medium is not affected by this model. -

    -

    - Validation -

    -

    - The model has been validated against the analytical solution in the - examples AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet - and - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. -

    - - --------- Errors -------- -line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Controls/Continuous/NumberOfRequests.mo ---- --------- HTML Code -------- - +

  • + the total sky cover, +
  • +
  • + the opaque sky cover, +
  • +
  • + the dry bulb temperature, +
  • +
  • + the dew point temperature, +
  • +
  • + the sky black body temperature, +
  • +
  • + the relative humidity, +
  • +
  • + the wind direction, +
  • +
  • + the wind speed, +
  • +
  • + the global horizontal radiation, direct normal and diffuse horizontal radiation, + and +
  • +
  • + the infrared horizontal radiation. +
  • +

    - Block that outputs the number of inputs that exceed a threshold. - The parameter kind is used to determine the kind of the - inequality. The table below shows the allowed settings. + By default, all data are obtained from the weather data file, + except for the atmospheric pressure, which is set to the + parameter pAtm=101325 Pascals.

    - +

    + The parameter *Sou configures the source of the data. + For the atmospheric pressure, temperatures, relative humidity, wind speed and wind direction, + the enumeration + + AixLib.BoundaryConditions.Types.DataSource + is used as follows: +

    +
    + - - + + + - - + + + + + + + + - - + + +
    Value of parameter kindOutput signal incremented by 1 for each i ∈ {1, ..., nin} ifParameter *Sou + Data used to compute weather data. +
    0u[i] > threShold + File + + Use data from file. +
    + Parameter + + Use value specified by the parameter. +
    1u[i] ≥ threShold + Input + + Use value from the input connector. +
    +

    + Because global, diffuse and direct radiation are related to each other, the parameter + HSou is treated differently. + It is set to a value of the enumeration + + AixLib.BoundaryConditions.Types.RadiationDataSource, + and allows the following configurations: +

    + + - - + + + - - + + + + + + + + + + + + + + +
    2u[i] ≤ threSholdParameter HSou + Data used to compute weather data. +
    3u[i] < threShold + File + + Use data from file. +
    + Input_HGloHor_HDifHor + + Use global horizontal and diffuse horizontal radiation from input connector. +
    + Input_HDirNor_HDifHor + + Use direct normal and diffuse horizontal radiation from input connector. +
    + Input_HDirNor_HGloHor + + Use direct normal and global horizontal radiation from input connector. +
    + +

    Length of weather data and simulation period

    - This model may be used to check how many rooms - exceed a temperature threshold. + If weather data span a year, which is the default for TMY3 data, or multiple years, + then this model can be used for simulations that span multiple years. The simulation + start time needs to be set to the clock time of the respective start time. For example, + to start at January 2 at 10am, set start time to t=(24+10)*3600 seconds. + For this computation, the used date and time (here January 2, 10 am) must be expressed in the same time zone + as the one that is used to define the TMY3 file. This is usually the local (winter) time zone. + The parameter `timZon` represents the TMY3 file time zone, expressed in seconds compared to UTC.

    - - - --------- Corrected Code -------- -

    - Block that outputs the number of inputs that exceed a threshold. The - parameter kind is used to determine the kind of the - inequality. The table below shows the allowed settings. -

    - - - - - - - - - - - - - - - - - - - - - -
    - Value of parameter kind - - Output signal incremented by 1 for each i ∈ {1, ..., nin} - if -
    - 0 - - u[i] > threShold -
    - 1 - - u[i] ≥ threShold -
    - 2 - - u[i] ≤ threShold -
    - 3 - - u[i] < threShold -
    -

    - This model may be used to check how many rooms exceed a temperature - threshold. -

    - - --------- Errors -------- -line 7 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - - ----- AixLib/Fluid/Actuators/Valves/Examples/TwoWayValveTable.mo ---- --------- HTML Code -------- -

    - Test model for a two way valve in which a table is used to specify the - opening characteristics. - The valve has the following opening characteristics, which is taken from a test case - of the IEA EBC Annex 60 project. + Hourly and subhourly timestamp are handled in a different way in .epw files. + From the EnergyPlus Auxiliary Programs Document (v9.3.0, p. 63): + In hourly data the minute field can be 00 or 60. In this case as mentioned in the previous section, the weather data + is reported at the hourly value and the minute field has to be ignored, writing 1, 60 or 1, 00 is equivalent. + If the minute field is between 00 and 60, the file becomes subhourly, in this case the timestamp corresponds to the + minute field in the considered hour. For example: 1, 30 is equivalent to 00:30 and 3, 45 is equivalent to 02:45.
    + (Note the offset in the hour digit.)

    -
    - - - - - -
    y0 0.1667 0.3333 0.5 0.6667 1
    Kv0 0.19 0.35 0.45 0.5 0.65
    + +
  • + The ReaderTMY3 should only be used with TMY3 data. It contains a time shift for solar radiation data + that is explained below. This time shift needs to be removed if the user may want to + use the ReaderTMY3 for other weather data types. +
  • + +

    Implementation

    +
    Start and end data for annual weather data files

    - The Kv value is the volume flow rate in m3/h at a pressure difference - of 1 bar. - Hence, the Kv value of the fully open valve is Kv=0.65. + The TMY3 weather data, as well as the EnergyPlus weather data, start at 1:00 AM + on January 1, and provide hourly data until midnight on December 31. + Thus, the first entry for temperatures, humidity, wind speed etc. are values + at 1:00 AM and not at midnight. Furthermore, the TMY3 weather data files can have + values at midnight of December 31 that may be significantly different from the values + at 1:00 AM on January 1. + Since annual simulations require weather data that start at 0:00 on January 1, + data need to be provided for this hour. Due to the possibly large change in + weatherdata between 1:00 AM on January 1 and midnight at December 31, + the weather data files in the AixLib library do not use the data entry from + midnight at December 31 as the value for t=0. Rather, the + value from 1:00 AM on January 1 is duplicated and used for 0:00 on January 1. + To maintain a data record with 8760 hours, the weather data record from + midnight at December 31 is deleted. + These changes in the weather data file are done in the Java program + AixLib/Resources/bin/ConvertWeatherData.jar that converts + EnergyPlus weather data file to Modelica weather data files, and which is described + above. + The length of the weather data is calculated as the + end time stamp minus start time stamp plus average increment, where the + average increment is equal to the end time stamp minus start time stamp divided + by the number of rows minus 1. + This only works correctly for weather files with equidistant time stamps.

    +
    Time shift for solar radiation data

    - Plotting the variables kv.y versus y.y shows that the valve - reproduces the Kv values shown in the above table. + To read weather data from the TMY3 weather data file, there are + two data readers in this model. One data reader obtains all data + except solar radiation, and the other data reader reads only the + solar radiation data, shifted by 30 minutes. + The reason for this time shift is as follows: + The TMY3 weather data file contains for solar radiation the + \"...radiation received + on a horizontal surface during + the 60-minute period ending at + the timestamp.\" + + Thus, as the figure below shows, a more accurate interpolation is obtained if + time is shifted by 30 minutes prior to reading the weather data.

    - \"image\" -

    -

    - The parameter filterOpening is set to false, - as this model is used to plot the flow at different opening signals - without taking into account the travel time of the actuator. + \"image\"

    - +

    References

    --------- Corrected Code -------- -

    - Test model for a two way valve in which a table is used to specify - the opening characteristics. The valve has the following opening - characteristics, which is taken from a test case of the IEA EBC Annex - 60 project. -

    - - - - - - - - - - - - - - - - - - - -
    - y - - 0 - - 0.1667 - - 0.3333 - - 0.5 - - 0.6667 - - 1 -
    - Kv - - 0 - - 0.19 - - 0.35 - - 0.45 - - 0.5 - - 0.65 -
    -

    - The Kv value is the volume flow rate in - m3/h at a pressure difference of 1 bar. Hence, the - Kv value of the fully open valve is - Kv=0.65. -

    -

    - Plotting the variables kv.y versus y.y - shows that the valve reproduces the Kv values shown - in the above table. -

    -

    - \"image\" -

    -

    - The parameter filterOpening is set to - false, as this model is used to plot the flow at - different opening signals without taking into account the travel time - of the actuator. -

    - - --------- Errors -------- -line 8 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 -line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Utilities/Math/QuadraticLinear.mo ---- --------- HTML Code -------- - -

    Block for function quadraticLinear, which computes

    -

    y = a1 + a2 x1 + a3 x12 + (a4 + a5 x1 + a6 x12) x2

    - - --------- Corrected Code -------- -

    - Block for function quadraticLinear, which computes -

    -

    - y = a1 + a2 x1 + a3 x12 + (a4 + a5 x1 + a6 x12) x2 -

    - - --------- Errors -------- -line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/BaseClasses/FlowModels/basicFlowFunction_m_flow.mo ---- --------- HTML Code -------- - -

    - Function that computes the pressure drop of flow elements as -

    -

    - Δp = sign(m) (m ⁄ k)2 -

    -

    - with regularization near the origin. - Therefore, the flow coefficient is -

    -

    - k = m ⁄ √ Δp   -

    -

    - The input m_flow_turbulent determines the location of the regularization. -

    - - - --------- Corrected Code -------- -

    - Function that computes the pressure drop of flow elements as -

    -

    - Δp = sign(m) (m ⁄ k)2 -

    -

    - with regularization near the origin. Therefore, the flow coefficient - is -

    -

    - k = m ⁄ √ Δp -   -

    -

    - The input m_flow_turbulent determines the location of - the regularization. -

    - - --------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Utilities/Math/Biquadratic.mo ---- --------- HTML Code -------- - -

    - This block computes -

    -

    - y = a1 + a2 x1 - + a3 x12 - + a4 x2 + a5 x22 - + a6 x1 x2 -

    - - - --------- Corrected Code -------- -

    - This block computes -

    -

    - y = a1 + a2 x1 + a3 - x12 + a4 x2 + - a5 x22 + a6 x1 - x2 -

    - - --------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/BoundaryConditions/Validation/BESTEST/WD400.mo ---- --------- HTML Code -------- - -

    -

    WD400: High Latitude Case

    -

    Weather data file : WD400.epw

    -

    Table 1: Site Data for Weather file WD400.epw

    -
    - - - - - - - - - - - - - - - -

    Latitude

    71.286° north

    Longitude

    156.767° west

    Altitude

    10 m

    Time Zone

    -9

    - -------- Corrected Code -------- +

    + Block to output the latitude of the location. This block is added so + that the latitude is displayed with a comment in the GUI of the + weather bus connector. +

    +

    + Implementation +

    +

    + If Modelica.Blocks.Sources.Constant + where used, then the comment for the latitude would be \"Connector of + Real output signal\". As this documentation string cannot be + overwritten, a new block was implemented. +

    +

    + Block to output the longitude of the location. This block is added so + that the longitude is displayed with a comment in the GUI of the + weather bus connector. +

    +

    + Implementation +

    +

    + If Modelica.Blocks.Sources.Constant + where used, then the comment for the longitude would be \"Connector of + Real output signal\". As this documentation string cannot be + overwritten, a new block was implemented. +

    + +

    + Block to output the altitude of the location. This block is added so + that the altitude is displayed with a comment in the GUI of the + weather bus connector. +

    - WD400: High Latitude Case + Implementation

    - Weather data file : WD400.epw + If Modelica.Blocks.Sources.Constant + where used, then the comment for the Altitude would be \"Connector of + Real output signal\". As this documentation string cannot be + overwritten, a new block was implemented.

    +

    - Table 1: Site Data for Weather file WD400.epw + This component reads TMY3 weather data (Wilcox and Marion, 2008) or + user specified weather data. The Modelica built-in variable + time determines what row of the weather file is read. + The value of time is the number of seconds that have + passed since January 1st at midnight (00:00) in the local time zone. + The local time zone value, longitude and latitute are also read from + the weather data, such that the solar position computations are + consistent with the weather data.

    - +

    + The weather data format is the Typical Meteorological Year (TMY3) as + obtained from the EnergyPlus web site at http://energyplus.net/weather. + These data, which are in the EnergyPlus format, need to be converted + as described below. +

    +

    + Output to weaBus +

    +

    + The following variables serve as output and are accessible via + weaBus: +

    +
    + + + + + + + + + + + + + + + + - + + - + + - + + - -
    + Name + + Unit + + Description +
    + HDifHor + + W/m2 + + Horizontal diffuse solar radiation. +
    + HDifNor + + W/m2 + + Direct normal radiation. +
    -

    - Latitude -

    + HGloHor
    -

    - 71.286° north -

    + W/m2
    + Horizontal global radiation. +
    -

    - Longitude -

    + HHorIR
    -

    - 156.767° west -

    + W/m2
    + Horizontal infrared irradiation. +
    -

    - Altitude -

    + TBlaSky
    -

    - 10 m -

    + K
    + Output temperature. +
    -

    - Time Zone -

    + TDewPoi
    -

    - -9 -

    + K
    - --------- Errors -------- -line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - - ----- AixLib/BoundaryConditions/Validation/BESTEST/WD500.mo ---- --------- HTML Code -------- - - - -

    WD500: Time Zone Case

    -

    Weather data file : WD500.epw

    -

    Table 1: Site Data for Weather file WD500epw

    -
    - - - - - - - - - - - - - - - -

    Latitude

    28.567° north

    Longitude

    77.103° east

    Altitude

    236.9 m

    Time Zone

    5.5

    - --------- Corrected Code -------- - -

    - WD500: Time Zone Case -

    -

    - Weather data file : WD500.epw -

    -

    - Table 1: Site Data for Weather file WD500epw -

    - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + - + + - -
    + Dew point temperature. +
    + TDryBul + + K + + Dry bulb temperature at ground level. +
    + TWetBul + + K + + Wet bulb temperature. +
    + celHei + + m + + Ceiling height. +
    + cloTim + + s + + One-based day number in seconds. +
    + lat + + rad + + Latitude of the location. +
    + lon + + rad + + Longitude of the location. +
    + nOpa + + 1 + + Opaque sky cover [0, 1]. +
    + nTot + + 1 + + Total sky Cover [0, 1]. +
    + pAtm + + Pa + + Atmospheric pressure. +
    + relHum + + 1 + + Relative humidity. +
    + solAlt + + rad + + Altitude angle. +
    -

    - Latitude -

    + solDec
    -

    - 28.567° north -

    + rad
    + Declination angle. +
    -

    - Longitude -

    + solHouAng
    -

    - 77.103° east -

    + rad
    + Solar hour angle. +
    -

    - Altitude -

    + solTim
    -

    - 236.9 m -

    + s
    + Solar time. +
    -

    - Time Zone -

    + solZen
    -

    - 5.5 -

    + rad
    - --------- Errors -------- -line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - - ----- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/PlugFlowAIT.mo ---- --------- HTML Code -------- - -

    - The example contains - experimental data from a real district heating network. -

    -

    The pipes' temperatures are not initialized. Therefore, results of - outflow temperature before approximately the first 10000 seconds should not be - considered. -

    -

    - Note that these three models are identical, except for the pipe model that is used: -

    - -

    - This comparison between different discretization levels and pipe models is made - to check the influence of the discretization and pipe model on computation time - and simulation accuracy. -

    -

    Test bench schematic

    -

    \"Schematic -

    -

    Calibration

    -

    To calculate the length specific thermal resistance R of the pipe, - the thermal resistance of the surrounding ground is added, which yields

    -

    - R=1/(0.208)+1/(2   lambda_g   Modelica.Constants.pi)   log(1/0.18),

    -

    where the thermal conductivity of the ground lambda_g = 2.4 W/(m K). -

    - - - --------- Corrected Code -------- -

    - The example contains experimental data from a real district heating - network. -

    -

    - The pipes' temperatures are not initialized. Therefore, results of - outflow temperature before approximately the first 10000 seconds - should not be considered. -

    -

    - Note that these three models are identical, except for the pipe model - that is used: -

    - -

    - This comparison between different discretization levels and pipe - models is made to check the influence of the discretization and pipe - model on computation time and simulation accuracy. -

    -

    - Test bench schematic -

    -

    - \"Schematic -

    -

    - Calibration -

    -

    - To calculate the length specific thermal resistance R of - the pipe, the thermal resistance of the surrounding ground is added, - which yields -

    -

    - R=1/(0.208)+1/(2   lambda_g   Modelica.Constants.pi)   - log(1/0.18), -

    -

    - where the thermal conductivity of the ground lambda_g = - 2.4 W/(m K). -

    - - --------- Errors -------- -line 48 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Controls/SetPoints/Examples/OccupancySchedule.mo ---- --------- HTML Code -------- - -

    - Example that demonstrates the use of the occupancy schedule. - The figure below shows how the time until the next occupancy starts or ends - is decreased. The red line hits zero when the schedule indicates an occupied time, - and the blue line hits zero when the schedule indicates a non-occupied time. -

    -

    - \"Time -

    - - - --------- Corrected Code -------- + + + + + + + + + + + + +
    + Zenith angle. +
    + winDir + + rad + + Wind direction. +
    + winSpe + + m/s + + Wind speed. +
    +

    + Adding new weather data +

    - Example that demonstrates the use of the occupancy schedule. The - figure below shows how the time until the next occupancy starts or - ends is decreased. The red line hits zero when the schedule indicates - an occupied time, and the blue line hits zero when the schedule - indicates a non-occupied time. + To add new weather data, proceed as follows:

    -

    - \"Time +

      +
    1. Download the weather data file with the epw + extension from http://energyplus.net/weather. +
    2. +
    3. Add the file to AixLib/Resources/weatherdata (or to + any directory for which you have write permission). +
    4. +
    5. On a console window, type +
      +   cd AixLib/Resources/weatherdata
      +   java -jar ../bin/ConvertWeatherData.jar inputFile.epw
      + 
      if inputFile contains space in the name: +
      +   java -jar ../bin/ConvertWeatherData.jar \"inputFile .epw\"
      + 
      This will generate the weather data file +inputFile.mos, which can be read by the model AixLib.BoundaryConditions.WeatherData.ReaderTMY3. +
    6. +
    +

    + Location data that are read automatically from the weather data file +

    +

    + The following location data are automatically read from the weather + file:

    - --------- Errors -------- -line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FMI/ExportContainers/ThermalZones.mo ---- --------- HTML Code -------- - -

    - Model that is used as a container for a multiple thermal zones - that are to be exported as an FMU. -

    -

    Typical use and important parameters

    -

    - To use this model as a container for an FMU, extend - from this model, rather than instantiate it, - add your thermal zones. For each thermal zone, - add a vector of mass flow rate sensors. - By extending from this model, the top-level - signal connectors on the left stay at the top-level, and hence - will be visible at the FMI interface. -

    - - Note that - - -

    - The example - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones - shows how multiple simple thermal zones can be implemented and exported as - an FMU. - -

    - -

    - The conversion between the fluid ports and signal ports is done - in the thermal zone adapter theZonAda[nZon]. - This adapter has a vector of fluid ports called ports[nPorts] - which needs to be connected to the air volume of the thermal zones. - At this port, air exchanged between the thermal zones, the HVAC system - and any infiltration flow paths. -

    -

    - This model has input signals fluPor[nZon, nPorts] which carry - the mass flow rate for each flow that is connected to ports[1:nPorts] - for the respective zone, together with its - temperature, water vapor mass fraction per total mass of the air (not per kg dry - air), and trace substances. These quantities are always as if the flow - enters the respective room, even if the flow is zero or negative. - If a medium has no moisture, e.g., if Medium.nXi=0, or - if it has no trace substances, e.g., if Medium.nC=0, then - the output signal for these properties are removed. - Thus, a thermal zone model that uses these signals to compute the - heat added by the HVAC system need to implement an equation such as -

    -

    - Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon), -

    -

    - where - Qsen is the sensible heat flow rate added to the thermal zone, - sup is the supply air mass flow rate from - the port fluPor (which is negative if it is an exhaust), - cp is the specific heat capacity at constant pressure, - Tsup is the supply air temperature and - Tair,zon is the zone air temperature. - Note that without the max(·, ·), the energy - balance would be wrong. - For example, - - the control volumes in - - AixLib.Fluid.MixingVolumes - implement such a max(·, ·) function. -

    -

    - For each zone, its air temperature, - water vapor mass fraction per total mass of the air (unless Medium.nXi=0) - and trace substances (unless Medium.nC=0) - can be obtained from the outupt connector - fluPor[1:nZon].backward. - These signals are the same as the inflowing fluid stream(s) - at the port theAdaZon[1:nZon].ports[1:nPorts]. - The fluid connector ports[nPorts] has a prescribed mass flow rate, but - it does not set any pressure. -

    -

    - This model has a user-defined parameter nPorts - which sets the number of fluid ports, which in turn is used - for the ports fluPor and ports. - All zones must have the same number of fluid ports nPorts. - All nPorts - ports[1:nPorts] need to be connected as demonstrated in the example - - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. -

    -

    - -

    - - - --------- Corrected Code -------- +
  • the longitude of the weather station, lon, and +
  • +
  • the time zone relative to Greenwich Mean Time, + timZone. +
  • + +

    + Wet bulb temperature +

    - Model that is used as a container for a multiple thermal zones that - are to be exported as an FMU. -

    + By default, the data bus contains the wet bulb temperature. This + introduces a nonlinear equation. However, we have not observed an + increase in computing time because of this equation. To disable the + computation of the wet bulb temperature, set + computeWetBulbTemperature=false. +

    - Typical use and important parameters + Using constant or user-defined input signals for weather data

    - To use this model as a container for an FMU, extend from this model, - rather than instantiate it, add your thermal zones. For each thermal - zone, add a vector of mass flow rate sensors. By extending from this - model, the top-level signal connectors on the left stay at the - top-level, and hence will be visible at the FMI interface. -

    Note that + This model has the option of using a constant value, using the data + from the weather file, or using data from an input connector for the + following variables: +

    - The example - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones - shows how multiple simple thermal zones can be implemented and - exported as an FMU. + By default, all data are obtained from the weather data file, except + for the atmospheric pressure, which is set to the parameter + pAtm=101325 Pascals.

    - The conversion between the fluid ports and signal ports is done in - the thermal zone adapter theZonAda[nZon]. This adapter - has a vector of fluid ports called ports[nPorts] which - needs to be connected to the air volume of the thermal zones. At this - port, air exchanged between the thermal zones, the HVAC system and - any infiltration flow paths. + The parameter *Sou configures the source of the data. + For the atmospheric pressure, temperatures, relative humidity, wind + speed and wind direction, the enumeration AixLib.BoundaryConditions.Types.DataSource + is used as follows:

    + + + + + + + + + + + + + + + + + + +
    + Parameter *Sou + + Data used to compute weather data. +
    + File + + Use data from file. +
    + Parameter + + Use value specified by the parameter. +
    + Input + + Use value from the input connector. +

    - This model has input signals fluPor[nZon, nPorts] which - carry the mass flow rate for each flow that is connected to - ports[1:nPorts] for the respective zone, together with - its temperature, water vapor mass fraction per total mass of the air - (not per kg dry air), and trace substances. These quantities are - always as if the flow enters the respective room, even if the flow is - zero or negative. If a medium has no moisture, e.g., if - Medium.nXi=0, or if it has no trace substances, e.g., if - Medium.nC=0, then the output signal for these properties - are removed. Thus, a thermal zone model that uses these signals to - compute the heat added by the HVAC system need to implement an - equation such as + Because global, diffuse and direct radiation are related to each + other, the parameter HSou is treated differently. It is + set to a value of the enumeration AixLib.BoundaryConditions.Types.RadiationDataSource, + and allows the following configurations:

    -

    - Qsen = max(0, ṁsup)   cp   - (Tsup - Tair,zon), + + + + + + + + + + + + + + + + + + + + + + +
    + Parameter HSou + + Data used to compute weather data. +
    + File + + Use data from file. +
    + Input_HGloHor_HDifHor + + Use global horizontal and diffuse horizontal radiation from input + connector. +
    + Input_HDirNor_HDifHor + + Use direct normal and diffuse horizontal radiation from input + connector. +
    + Input_HDirNor_HGloHor + + Use direct normal and global horizontal radiation from input + connector. +
    +

    + Length of weather data and simulation period +

    +

    + If weather data span a year, which is the default for TMY3 data, or + multiple years, then this model can be used for simulations that span + multiple years. The simulation start time needs to be set to the + clock time of the respective start time. For example, to start at + January 2 at 10am, set start time to t=(24+10)*3600 + seconds. For this computation, the used date and time (here January + 2, 10 am) must be expressed in the same time zone as the one that is + used to define the TMY3 file. This is usually the local (winter) time + zone. The parameter `timZon` represents the TMY3 file time zone, + expressed in seconds compared to UTC.

    - where Qsen is the sensible heat flow rate added to - the thermal zone, sup is the supply air mass flow - rate from the port fluPor (which is negative if it is an - exhaust), cp is the specific heat capacity at - constant pressure, Tsup is the supply air - temperature and Tair,zon is the zone air - temperature. Note that without the max(·, ·), the energy - balance would be wrong. For example, - the control volumes in AixLib.Fluid.MixingVolumes - implement such a max(·, ·) function. + Moreover, weather data need not span a whole year, or it can span + across New Year. In this case, the simulation cannot exceed the time + of the weather data file. Otherwise, the simulation stops with an + error.

    - For each zone, its air temperature, water vapor mass fraction per - total mass of the air (unless Medium.nXi=0) and trace - substances (unless Medium.nC=0) can be obtained from the - outupt connector fluPor[1:nZon].backward. These signals - are the same as the inflowing fluid stream(s) at the port - theAdaZon[1:nZon].ports[1:nPorts]. The fluid connector - ports[nPorts] has a prescribed mass flow rate, but it - does not set any pressure. + As weather data have one entry at the start of the time interval, the + end time of the weather data file is computed as the last time entry + plus the average time increment of the file. For example, an hourly + weather data file has 8760 entries, starting on January 1 at 0:00. + The last entry in the file will be for December 31 at 23:00. As the + time increment is 1 hour, the model assumes the weather file to end + at December 31 at 23:00 plus 1 hour, e.g., at January 1 at 0:00. +

    +

    + Notes +

    +
      +
    1. +

      + In HVAC systems, when the fan is off, changes in atmospheric + pressure can cause small air flow rates in the duct system due to + change in pressure and hence in the mass of air that is stored in + air volumes (such as in fluid junctions or in the room model). + This may increase computing time. Therefore, the default value + for the atmospheric pressure is set to a constant. Furthermore, + if the initial pressure of air volumes are different from the + atmospheric pressure, then fast pressure transients can happen in + the first few seconds of the simulation. This can cause numerical + problems for the solver. To avoid this problem, set the + atmospheric pressure to the same value as the medium default + pressure, which is typically set to the parameter + Medium.p_default. For medium models for moist air + and dry air, the default is Medium.p_default=101325 + Pascals. +

      +
    2. +
    3. +

      + Different units apply depending on whether data are obtained from + a file, or from a parameter or an input connector: +

      + +
    4. +
    5. +

      + Hourly and subhourly timestamp are handled in a different way in + .epw files. From the EnergyPlus Auxiliary Programs + Document (v9.3.0, p. 63): In hourly data the minute field can be + 00 or 60. In this case as mentioned in + the previous section, the weather data is reported at the hourly + value and the minute field has to be ignored, writing 1, + 60 or 1, 00 is equivalent. If the minute + field is between 00 and 60, the file + becomes subhourly, in this case the timestamp corresponds to the + minute field in the considered hour. For example: 1, + 30 is equivalent to 00:30 and 3, 45 is + equivalent to 02:45.
      + (Note the offset in the hour digit.) +

      +
    6. +
    7. The ReaderTMY3 should only be used with TMY3 data. It contains a + time shift for solar radiation data that is explained below. This + time shift needs to be removed if the user may want to use the + ReaderTMY3 for other weather data types. +
    8. +
    +

    + Implementation +

    +
    + Start and end data for annual weather data files +
    +

    + The TMY3 weather data, as well as the EnergyPlus weather data, start + at 1:00 AM on January 1, and provide hourly data until midnight on + December 31. Thus, the first entry for temperatures, humidity, wind + speed etc. are values at 1:00 AM and not at midnight. Furthermore, + the TMY3 weather data files can have values at midnight of December + 31 that may be significantly different from the values at 1:00 AM on + January 1. Since annual simulations require weather data that start + at 0:00 on January 1, data need to be provided for this hour. Due to + the possibly large change in weatherdata between 1:00 AM on January 1 + and midnight at December 31, the weather data files in the AixLib + library do not use the data entry from midnight at December 31 as the + value for t=0. Rather, the value from 1:00 AM on January 1 is + duplicated and used for 0:00 on January 1. To maintain a data record + with 8760 hours, the weather data record from midnight at + December 31 is deleted. These changes in the weather data file are + done in the Java program + AixLib/Resources/bin/ConvertWeatherData.jar that + converts EnergyPlus weather data file to Modelica weather data files, + and which is described above. The length of the weather data is + calculated as the end time stamp minus start time stamp plus average + increment, where the average increment is equal to the end time stamp + minus start time stamp divided by the number of rows minus 1. This + only works correctly for weather files with equidistant time stamps.

    +
    + Time shift for solar radiation data +

    - This model has a user-defined parameter nPorts which - sets the number of fluid ports, which in turn is used for the ports - fluPor and ports. All zones must have the - same number of fluid ports nPorts. All - nPorts ports[1:nPorts] need to be connected - as demonstrated in the example - AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. + To read weather data from the TMY3 weather data file, there are two + data readers in this model. One data reader obtains all data except + solar radiation, and the other data reader reads only the solar + radiation data, shifted by 30 minutes. The reason for this + time shift is as follows: The TMY3 weather data file contains for + solar radiation the \"...radiation received on a horizontal surface + during the 60-minute period ending at the timestamp.\" Thus, as the + figure below shows, a more accurate interpolation is obtained if time + is shifted by 30 minutes prior to reading the weather data.

    -

    - +

    + \"image\"

    +

    + References +

    + -------- Errors -------- -line 78 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 24 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 425 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 469 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 640 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowTransportDelay.mo ---- +---- AixLib/Fluid/BaseClasses/FlowModels/basicFlowFunction_m_flow.mo ---- -------- HTML Code --------

    - Calculates time delay at both sides of the pipe as the difference between the - current simulation time and the inlet time of the fluid at both ends of the pipe. -

    -

    Main equation

    -

    - ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0, + Function that computes the pressure drop of flow elements as

    -

    - where z(x,t) is the spatial distribution as a function of time of any - property z of the fluid. For the inlet time propagation, z will - be replaced by the inlet time of the fluid tin. +

    + Δp = sign(m) (m ⁄ k)2

    -

    Implementation

    - The inlet time is approached as a fluid property and its propagation follows - the one-dimensional wave equation, implemented using the spatialDistribution - function. This components requires the mass flow through the pipe and the pipe - dimensions in order to derive information about the fluid propagation. + with regularization near the origin. + Therefore, the flow coefficient is

    -

    - The component calculates the delay time at the inlet and the outlet port of the pipe. - For the forward flow, the time delay is exposed at the output tau, - and for the backward flow, the time delay is exposed at the output tauRev. +

    + k = m ⁄ √ Δp  

    -

    Assumption

    - No axial mixing takes place in the pipe. + The input m_flow_turbulent determines the location of the regularization.

    -------- Corrected Code --------

    - Calculates time delay at both sides of the pipe as the difference - between the current simulation time and the inlet time of the fluid - at both ends of the pipe. -

    -

    - Main equation -

    -

    - ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0, + Function that computes the pressure drop of flow elements as

    -

    - where z(x,t) is the spatial distribution as a function of time - of any property z of the fluid. For the inlet time - propagation, z will be replaced by the inlet time of the fluid - tin. +

    + Δp = sign(m) (m ⁄ k)2

    -

    - Implementation -

    - The inlet time is approached as a fluid property and its propagation - follows the one-dimensional wave equation, implemented using the - spatialDistribution function. This components requires the mass flow - through the pipe and the pipe dimensions in order to derive - information about the fluid propagation. + with regularization near the origin. Therefore, the flow coefficient + is

    -

    - The component calculates the delay time at the inlet and the outlet - port of the pipe. For the forward flow, the time delay is exposed at - the output tau, and for the backward flow, the time - delay is exposed at the output tauRev. +

    + k = m ⁄ √ Δp +  

    -

    - Assumption -

    - No axial mixing takes place in the pipe. + The input m_flow_turbulent determines the location of + the regularization.

    + +-------- Errors -------- +line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/BoundaryConditions/Validation/BESTEST/WD300.mo ---- +-------- HTML Code -------- + +

    + +

    WD300: Southern Hemisphere Case

    +

    Weather data file : WD300.epw

    +

    Table 1: Site Data for Weather file WD300.epw

    +
    + + + + + + + + + + + + + + + +

    Latitude

    33.393° south

    Longitude

    70.786° west

    Altitude

    474 m

    Time Zone

    -4

    + +-------- Corrected Code -------- +

    +

    + WD300: Southern Hemisphere Case +

    +

    + Weather data file : WD300.epw +

    +

    + Table 1: Site Data for Weather file WD300.epw +

    + + + + + + + + + + + + + + + + + +
    +

    + Latitude +

    +
    +

    + 33.393° south +

    +
    +

    + Longitude +

    +
    +

    + 70.786° west +

    +
    +

    + Altitude +

    +
    +

    + 474 m +

    +
    +

    + Time Zone +

    +
    +

    + -4 +

    +
    -------- Errors -------- -line 7 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 ----- AixLib/BoundaryConditions/Validation/BESTEST/WD600.mo ---- +---- AixLib/BoundaryConditions/Validation/BESTEST/WD500.mo ---- -------- HTML Code -------- -

    WD600: Ground Reflactance

    -

    Weather data file : WD600.epw

    -

    Table 1: Site Data for Weather file WD600.epw

    -
    +

    WD500: Time Zone Case

    +

    Weather data file : WD500.epw

    +

    Table 1: Site Data for Weather file WD500epw

    +
    - + - + - + - +

    Latitude

    39.833° north

    28.567° north

    Longitude

    104.65° west

    77.103° east

    Altitude

    1650 m

    236.9 m

    Time Zone

    -7

    5.5

    @@ -14045,17 +12501,21 @@ line 7 column 2 - Warning:

    attribute "align" not allowed for HTML5 Rework after comments from pull request #1339. +

  • May 2, 2021, by Ettore Zanetti:
    + Updated weather file as explained in #1478. +
  • - WD600: Ground Reflactance + WD500: Time Zone Case

    - Weather data file : WD600.epw + Weather data file : WD500.epw

    - Table 1: Site Data for Weather file WD600.epw + Table 1: Site Data for Weather file WD500epw

    - @@ -14077,7 +12537,7 @@ cellpadding=\"0\" border=\"1\"> @@ -14089,7 +12549,7 @@ cellpadding=\"0\" border=\"1\"> @@ -14101,7 +12561,7 @@ cellpadding=\"0\" border=\"1\"> @@ -14111,91 +12571,17 @@ cellpadding=\"0\" border=\"1\"> line 5 column 2 - Warning: The summary attribute on the
    @@ -14065,7 +12525,7 @@ cellpadding=\"0\" border=\"1\">

    - 39.833° north + 28.567° north

    - 104.65° west + 77.103° east

    - 1650 m + 236.9 m

    - -7 + 5.5

    element is obsolete in HTML5 ----- AixLib/Fluid/HeatExchangers/PrescribedOutlet.mo ---- +---- AixLib/Fluid/HeatExchangers/ActiveBeams/BaseClasses/Convector.mo ---- -------- HTML Code --------

    - Model that allows specifying the temperature and mass fraction of the fluid - that leaves the model from port_b. -

    -

    - This model forces the outlet temperature at port_b to be equal to the temperature - of the input signal TSet, subject to optional limits on the - heating or cooling capacity QMax_flow ≥ 0 and QMin_flow ≤ 0. - Similarly than for the temperature, - this model also forces the outlet water mass fraction at port_b to be - no lower than the - input signal X_wSet, subject to optional limits on the - maximum water vapor mass flow rate that is added, as - described by the parameter mWatMax_flow. - By default, the model has unlimited capacity, but control of temperature - and humidity can be subject to capacity limits, or be disabled. -

    -

    - The output signal Q_flow is the heat added (for heating) or subtracted (for cooling) - to the medium if the flow rate is from port_a to port_b. - If the flow is reversed, then Q_flow=0. -

    -

    - The outlet conditions at port_a are not affected by this model. -

    -

    - If the parameter energyDynamics is not equal to - Modelica.Fluid.Types.Dynamics.SteadyState, - the component models the dynamic response using a first order differential equation. - The time constant of the component is equal to the parameter tau. - This time constant is adjusted based on the mass flow rate using + In cooling mode, this model adds heat to the water stream. The heat added is equal to:

    - τeff = τ |ṁ| ⁄ ṁnom -

    -

    - where - τeff is the effective time constant for the given mass flow rate - and - τ is the time constant at the nominal mass flow rate - nom. - This type of dynamics is equal to the dynamics that a completely mixed - control volume would have. -

    -

    - Optionally, this model can have a flow resistance. - If no flow resistance is requested, set dp_nominal=0. -

    -

    - For a model that uses a control signal u ∈ [0, 1] and multiplies - this with the nominal heating or cooling power, use - - AixLib.Fluid.HeatExchangers.HeaterCooler_u - -

    -

    Limitations

    -

    - This model only adds or removes heat or water vapor for the flow from - port_a to port_b. - The enthalpy of the reverse flow is not affected by this model. -

    -

    - If this model is used to cool air below the dew point temperature, the water mass fraction - will not change. -

    -

    - Note that for use_TSet = false, the enthalpy of the leaving fluid - will not be changed, even if moisture is added. The enthalpy added (or removed) - by the change in humidity is neglected. To properly account for change in enthalpy - due to humidification, use instead - - AixLib.Fluid.Humidifiers.SprayAirWasher_X. -

    -

    Validation

    -

    - The model has been validated against the analytical solution in - the examples - - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet - and - - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. + QBeam = Qrated fΔT fSA fW +

    +

    + In heating mode, the heat is removed from the water stream.

    element is obsol issue 1542.
  • - May 3, 2017, by Michael Wetter:
    - Updated protected model for - #763. + April 14, 2020, by Michael Wetter:
    + Changed homotopyInitialization to a constant.
    + This is for + IBPSA, #1341.
  • - December 1, 2016, by Michael Wetter:
    - Updated model as use_dh is no longer a parameter in the pressure drop model.
    - This is for - #480. + November 2, 2016, by Michael Wetter:
    + Made assignment of senTem.y final.
  • - November 11, 2014, by Michael Wetter:
    + June 13, 2016, by Michael Wetter:
    Revised implementation.
  • - March 19, 2014, by Christoph Nytsch-Geusen:
    + May 20, 2016, by Alessandro Maccarini:
    First implementation.
  • -------- Corrected Code --------

    - Model that allows specifying the temperature and mass fraction of the - fluid that leaves the model from port_b. -

    -

    - This model forces the outlet temperature at port_b to be - equal to the temperature of the input signal TSet, - subject to optional limits on the heating or cooling capacity - QMax_flow ≥ 0 and QMin_flow ≤ 0. Similarly - than for the temperature, this model also forces the outlet water - mass fraction at port_b to be no lower than the input - signal X_wSet, subject to optional limits on the maximum - water vapor mass flow rate that is added, as described by the - parameter mWatMax_flow. By default, the model has - unlimited capacity, but control of temperature and humidity can be - subject to capacity limits, or be disabled. -

    -

    - The output signal Q_flow is the heat added (for heating) - or subtracted (for cooling) to the medium if the flow rate is from - port_a to port_b. If the flow is reversed, - then Q_flow=0. -

    -

    - The outlet conditions at port_a are not affected by this - model. -

    -

    - If the parameter energyDynamics is not equal to - Modelica.Fluid.Types.Dynamics.SteadyState, the component - models the dynamic response using a first order differential - equation. The time constant of the component is equal to the - parameter tau. This time constant is adjusted based on - the mass flow rate using + In cooling mode, this model adds heat to the water stream. The heat + added is equal to:

    - τeff = τ |ṁ| ⁄ ṁnom -

    -

    - where τeff is the effective time constant for the - given mass flow rate and τ is the time constant at - the nominal mass flow rate nom. This type of - dynamics is equal to the dynamics that a completely mixed control - volume would have. -

    -

    - Optionally, this model can have a flow resistance. If no flow - resistance is requested, set dp_nominal=0. -

    -

    - For a model that uses a control signal u ∈ [0, 1] and - multiplies this with the nominal heating or cooling power, use - AixLib.Fluid.HeatExchangers.HeaterCooler_u -

    -

    - Limitations -

    -

    - This model only adds or removes heat or water vapor for the flow from - port_a to port_b. The enthalpy of the - reverse flow is not affected by this model. -

    -

    - If this model is used to cool air below the dew point temperature, - the water mass fraction will not change. -

    -

    - Note that for use_TSet = false, the enthalpy of the - leaving fluid will not be changed, even if moisture is added. The - enthalpy added (or removed) by the change in humidity is neglected. - To properly account for change in enthalpy due to humidification, use - instead AixLib.Fluid.Humidifiers.SprayAirWasher_X. + QBeam = Qrated fΔT + fSA fW

    -

    - Validation -

    - The model has been validated against the analytical solution in the - examples AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet - and - AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. + In heating mode, the heat is removed from the water stream.

    element is obsol \"https://github.com/ibpsa/modelica-ibpsa/issues/1542\">issue 1542. -
  • May 3, 2017, by Michael Wetter:
    - Updated protected model for #763. -
  • -
  • December 1, 2016, by Michael Wetter:
    - Updated model as use_dh is no longer a parameter in - the pressure drop model.
    +
  • April 14, 2020, by Michael Wetter:
    + Changed homotopyInitialization to a constant.
    This is for #480. + \"https://github.com/ibpsa/modelica-ibpsa/issues/1341\">IBPSA, + #1341.
  • -
  • November 11, 2014, by Michael Wetter:
    - Revised implementation. +
  • November 2, 2016, by Michael Wetter:
    + Made assignment of senTem.y final.
  • -
  • March 19, 2014, by Christoph Nytsch-Geusen:
    - First implementation. +
  • June 13, 2016, by Michael Wetter:
    + Revised implementation.
  • - - --------- Errors -------- -line 34 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/GroundTemperatureResponse.mo ---- --------- HTML Code -------- - -

    - This model calculates the ground temperature response to obtain the temperature - at the borehole wall in a geothermal system where heat is being injected into or - extracted from the ground. -

    -

    - A load-aggregation scheme based on that developed by Claesson and Javed (2012) is - used to calculate the borehole wall temperature response with the temporal superposition - of ground thermal loads. In its base form, the - load-aggregation scheme uses fixed-length aggregation cells to agglomerate - thermal load history together, with more distant cells (denoted with a higher cell and vector index) - representing more distant thermal history. The more distant the thermal load, the - less impactful it is on the borehole wall temperature change at the current time step. - Each cell has an aggregation time associated to it denoted by nu, - which corresponds to the simulation time (since the beginning of heat injection or - extraction) at which the cell will begin shifting its thermal load to more distant - cells. To determine nu, cells have a temporal size rcel - (rcel in this model) - which follows the exponential growth -

    -

    - \"image\" -

    -

    - where nCel is the number of consecutive cells which can have the same size. - Decreasing rcel will generally decrease calculation times, at the cost of - precision in the temporal superposition. rcel is expressed in multiples - of the aggregation time resolution (via the parameter tLoaAgg). - Then, nu may be expressed as the sum of all rcel values - (multiplied by the aggregation time resolution) up to and including that cell in question. -

    -

    - To determine the weighting factors, the borefield's temperature - step response at the borefield wall is determined as -

    -

    - \"image\" -

    -

    - where g(·) is the borefield's thermal response factor known as the g-function, - H is the total length of all boreholes and ks is the thermal - conductivity of the soil. The weighting factors kappa (κ in the equation below) - for a given cell i are then expressed as follows. -

    -

    - \"image\" -

    -

    - where ν refers to the vector nu in this model and - Tstep0)=0. -

    -

    - At every aggregation time step, a time event is generated to perform the load aggregation steps. - First, the thermal load is shifted. When shifting between cells of different size, total - energy is conserved. This operation is illustred in the figure below by Cimmino (2014). -

    -

    - \"image\" -

    -

    - After the cell-shifting operation is performed, the first aggregation cell has its - value set to the average thermal load since the last aggregation step. - Temporal superposition is then applied by means - of a scalar product between the aggregated thermal loads QAgg_flow and the - weighting factors κ. -

    -

    - Due to Modelica's variable time steps, the load aggregation scheme is modified by separating - the thermal response between the current aggregation time step and everything preceding it. - This is done according to -

    -

    - \"image\" -
    - \"image\" -

    -

    - where Tb is the borehole wall temperature, - Tg - is the undisturbed ground temperature, - Q is the ground thermal load per borehole length and h = g/(2 π ks) - is a temperature response factor based on the g-function. tk - is the last discrete aggregation time step, meaning that the current time t - satisfies tk≤t≤tk+1. - Δtagg(=tk+1-tk) is the - parameter tLoaAgg in the present model. -

    -

    - Thus, - ΔTb*(t) - is the borehole wall temperature change due to the thermal history prior to the current - aggregation step. At every aggregation time step, load aggregation and temporal superposition - are used to calculate its discrete value. Assuming no heat injection or extraction until - tk+1, this term is assumed to have a linear - time derivative, which is given by the difference between ΔTb*(tk+1) - (the temperature change from load history at the next discrete aggregation time step, which - is constant over the duration of the ongoing aggregation time step) and the total - temperature change at the last aggregation time step, ΔTb(t). -

    -

    - \"image\" -

    -

    - The second term ΔTb,q(t) concerns the ongoing aggregation time step. - To obtain the time derivative of this term, the thermal response factor h is assumed - to vary linearly over the course of an aggregation time step. Therefore, because - the ongoing aggregation time step always concerns the first aggregation cell, its derivative (denoted - by the parameter dTStepdt in this model) can be calculated as - kappa[1], the first value in the kappa vector, - divided by the aggregation time step Δt. - The derivative of the temperature change at the borehole wall is then expressed - as the multiplication of dTStepdt (which only needs to be - calculated once at the start of the simulation) and the heat flow Q at - the borehole wall. -

    -

    - \"image\" -

    -

    - \"image\" +

  • May 20, 2016, by Alessandro Maccarini:
    + First implementation. +
  • + + +-------- Errors -------- +line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/timeGeometric.mo ---- +-------- HTML Code -------- + +

    + This function attemps to build a vector of length nTim with a geometric + expansion of the time variable between dt and t_max.

    - With the two terms in the expression of ΔTb(t) expressed - as time derivatives, ΔTb(t) can itself also be - expressed as its time derivative and implemented as such directly in the Modelica - equations block with the der() operator. + If t_max > nTim*dt, then a geometrically expanding vector is built as

    - \"image\" -
    - \"image\" + t = [dt, dt*(1-r2)/(1-r), ... , dt*(1-rn)/(1-r), ... , tmax],

    - This load aggregation scheme is validated in - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.Validation.Analytic_20Years. + where r is the geometric expansion factor.

    -

    References

    - Cimmino, M. 2014. Développement et validation expérimentale de facteurs de réponse - thermique pour champs de puits géothermiques, - Ph.D. Thesis, École Polytechnique de Montréal. + If t_max < nTim*dt, then a linearly expanding vector is built as

    -

    - Claesson, J. and Javed, S. 2012. A load-aggregation method to calculate extraction temperatures of borehole heat exchangers. ASHRAE Transactions 118(1): 530-539. +

    + t = [dt, 2*dt, ... , n*dt, ... , nTim*dt]

    -------- Corrected Code --------

    - This model calculates the ground temperature response to obtain the - temperature at the borehole wall in a geothermal system where heat is - being injected into or extracted from the ground. -

    -

    - A load-aggregation scheme based on that developed by Claesson and - Javed (2012) is used to calculate the borehole wall temperature - response with the temporal superposition of ground thermal loads. In - its base form, the load-aggregation scheme uses fixed-length - aggregation cells to agglomerate thermal load history together, with - more distant cells (denoted with a higher cell and vector index) - representing more distant thermal history. The more distant the - thermal load, the less impactful it is on the borehole wall - temperature change at the current time step. Each cell has an - aggregation time associated to it denoted by - nu, which corresponds to the simulation time (since the - beginning of heat injection or extraction) at which the cell will - begin shifting its thermal load to more distant cells. To determine - nu, cells have a temporal size rcel - (rcel in this model) which follows the exponential - growth -

    -

    - \"image\" -

    -

    - where nCel is the number of consecutive cells which - can have the same size. Decreasing rcel will - generally decrease calculation times, at the cost of precision in the - temporal superposition. rcel is expressed in multiples - of the aggregation time resolution (via the parameter - tLoaAgg). Then, nu may be expressed as the - sum of all rcel values (multiplied by the aggregation - time resolution) up to and including that cell in question. -

    -

    - To determine the weighting factors, the borefield's temperature step - response at the borefield wall is determined as -

    -

    - \"image\" + This function attemps to build a vector of length nTim + with a geometric expansion of the time variable between + dt and t_max.

    - where g(·) is the borefield's thermal response factor known as - the g-function, H is the total length of all - boreholes and ks is the thermal conductivity of the - soil. The weighting factors kappa (κ in the - equation below) for a given cell i are then expressed as - follows. + If t_max > nTim*dt, then a geometrically expanding + vector is built as

    - \"image\" + t = [dt, dt*(1-r2)/(1-r), ... , + dt*(1-rn)/(1-r), ... , tmax],

    - where ν refers to the vector nu in this model and - Tstep0)=0. + where r is the geometric expansion factor.

    - At every aggregation time step, a time event is generated to perform - the load aggregation steps. First, the thermal load is shifted. When - shifting between cells of different size, total energy is conserved. - This operation is illustred in the figure below by Cimmino (2014). + If t_max < nTim*dt, then a linearly expanding vector + is built as

    - \"image\" -

    -

    - After the cell-shifting operation is performed, the first aggregation - cell has its value set to the average thermal load since the last - aggregation step. Temporal superposition is then applied by means of - a scalar product between the aggregated thermal loads - QAgg_flow and the weighting factors κ. -

    -

    - Due to Modelica's variable time steps, the load aggregation scheme is - modified by separating the thermal response between the current - aggregation time step and everything preceding it. This is done - according to + t = [dt, 2*dt, ... , n*dt, ... , nTim*dt]

    -

    - \"image\"
    +

    - \"image\" -

    -

    - where Tb is the borehole wall temperature, - Tg is the undisturbed ground temperature, Q - is the ground thermal load per borehole length and h = g/(2 π - ks) is a temperature response factor based on the - g-function. tk is the last discrete aggregation - time step, meaning that the current time t satisfies - tk≤t≤tk+1. - Δtagg(=tk+1-tk) is the - parameter tLoaAgg in the present model. -

    -

    - Thus, ΔTb*(t) is the borehole wall temperature - change due to the thermal history prior to the current aggregation - step. At every aggregation time step, load aggregation and temporal - superposition are used to calculate its discrete value. Assuming no - heat injection or extraction until tk+1, this term - is assumed to have a linear time derivative, which is given by the - difference between ΔTb*(tk+1) (the - temperature change from load history at the next discrete aggregation - time step, which is constant over the duration of the ongoing - aggregation time step) and the total temperature change at the last - aggregation time step, ΔTb(t). -

    -

    - \"image\" -

    -

    - The second term ΔTb,q(t) concerns the ongoing - aggregation time step. To obtain the time derivative of this term, - the thermal response factor h is assumed to vary linearly over - the course of an aggregation time step. Therefore, because the - ongoing aggregation time step always concerns the first aggregation - cell, its derivative (denoted by the parameter dTStepdt - in this model) can be calculated as kappa[1], the first - value in the kappa vector, divided by the aggregation - time step Δt. The derivative of the temperature change at the - borehole wall is then expressed as the multiplication of - dTStepdt (which only needs to be calculated once at the - start of the simulation) and the heat flow Q at the borehole - wall. -

    -

    - \"image\" -

    -

    - \"image\" -

    -

    - With the two terms in the expression of ΔTb(t) - expressed as time derivatives, ΔTb(t) can itself - also be expressed as its time derivative and implemented as such - directly in the Modelica equations block with the der() - operator. +-------- Errors -------- +line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/Movers/BaseClasses/Characteristics/efficiency.mo ---- +-------- HTML Code -------- + +

    + This function computes the fan or pump efficiency for given normalized volume flow rate + and performance data. The efficiency is +

    +

    + η = s(V̇/rN, d), +

    +

    + where + η is the efficiency, + rN is the normalized fan speed, + is the volume flow rate, and + d are performance data for fan or pump efficiency. +

    +

    Implementation

    +

    + The function s(·, ·) is a cubic hermite spline. + If the data d define a monotone decreasing sequence, then + s(·, d) is a monotone decreasing function. +

    + + + +-------- Corrected Code -------- +

    + This function computes the fan or pump efficiency for given + normalized volume flow rate and performance data. The efficiency is

    -

    - \"image\"
    - - \"image\" +

    + η = s(V̇/rN, d),

    - This load aggregation scheme is validated in - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.Validation.Analytic_20Years. + where η is the efficiency, rN is the + normalized fan speed, is the volume flow rate, and d + are performance data for fan or pump efficiency.

    - References + Implementation

    - Cimmino, M. 2014. Développement et validation expérimentale de - facteurs de réponse thermique pour champs de puits géothermiques, - Ph.D. Thesis, École Polytechnique de Montréal. -

    -

    - Claesson, J. and Javed, S. 2012. A load-aggregation method to - calculate extraction temperatures of borehole heat exchangers. - ASHRAE Transactions 118(1): 530-539. + The function s(·, ·) is a cubic hermite spline. If the data + d define a monotone decreasing sequence, then s(·, d) + is a monotone decreasing function.

    -------- Errors -------- -line 22 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 37 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 46 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 58 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 73 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 101 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 117 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 120 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 129 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Chillers/Carnot_TEva.mo ---- +---- AixLib/Fluid/FMI/ExportContainers/HVACZones.mo ---- -------- HTML Code --------

    - This is a model of a chiller whose coefficient of performance COP changes - with temperatures in the same way as the Carnot efficiency changes. - The control input is the setpoint of the evaporator leaving temperature, which - is met exactly at steady state if the chiller has sufficient capacity. -

    -

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or - a COP0 - at the nominal conditions, together with - the evaporator temperature Teva,0 and - the condenser temperature Tcon,0, in which - case the model computes the Carnot effectivness as -

    -

    - ηCarnot,0 = - COP0 - ⁄ (Teva,0 ⁄ (Tcon,0-Teva,0)). + Model that is used as a container for an HVAC system that is + to be exported as an FMU and that serves multiple zones.

    +

    Typical use and important parameters

    - On the Advanced tab, a user can specify the temperatures that - will be used as the evaporator and condenser temperature. + To use this model as a container for an FMU, simply extend + from this model, rather than instantiate it, + and add your HVAC system. By extending from this model, the top-level + signal connectors on the right stay at the top-level, and hence + will be visible at the FMI interface. + The example + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones + shows how a simple HVAC system that serves two rooms can be implemented and exported as + an FMU. +

    - During the simulation, the chiller COP is computed as the product -

    -

    - COP = ηCarnot,0 COPCarnot ηPL, + The following two parameters need to be assigned by the user: + Set nZon to the number of thermal zones to which the + FMU will be connected. + Set nPorts to the largest number of fluid ports + that the thermal zones has. For example, + if nZon=2 and zone 1 has one inlet and one outlet + (hence it has 2 ports), + and zone 2 has one inlets and two outlets + (hence it has 3 ports), then + set nPorts=3. This will add more fluid ports than are needed + for zone 1, but this causes no overhead if they are not connected.

    - where COPCarnot is the Carnot efficiency and - ηPL is a polynomial in the cooling part load ratio yPL - that can be used to take into account a change in COP at part load - conditions. - This polynomial has the form + The conversion between the fluid ports and signal ports is done + in the HVAC adapter hvacAda. + This adapter has a vector of fluid ports called ports. + The supply and return air ducts, including any resistance model for the inlet + diffusor or exhaust grill, need to be connected to these ports. + Also, if a thermal zone has interzonal air exchange or air infiltration, + these flows need to be connected to ports. + This model outputs at the port fluPor the mass flow rate for + each flow that is connected to ports, together with its + temperature, water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + If a medium has no moisture, e.g., if Medium.nXi=0, or + if it has no trace substances, e.g., if Medium.nC=0, then + the output signal for these properties are removed. + These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + Thus, a thermal zone model that uses these signals to compute the + heat added by the HVAC system need to implement an equation such as

    - ηPL = a1 + a2 yPL + a3 yPL2 + ... + Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon),

    - where the coefficients ai - are declared by the parameter a. + where + Qsen is the sensible heat flow rate added to the thermal zone, + sup is the supply air mass flow rate from + the port fluPor (which is negative if it is an exhaust), + cp is the specific heat capacity at constant pressure, + Tsup is the supply air temperature and + Tair,zon is the zone air temperature. + Note that without the max(·, ·), the energy + balance would be wrong.

    +

    - On the Dynamics tag, the model can be parametrized to compute a transient - or steady-state response. - The transient response of the model is computed using a first - order differential equation for the evaporator and condenser fluid volumes. - The chiller outlet temperatures are equal to the temperatures of these lumped volumes. + The input signals of this model are the radiative temperature of each zone. + The the zone air temperatures, + the water vapor mass fractions per total mass of the air (unless Medium.nXi=0) + and trace substances (unless Medium.nC=0) are obtained from the connector + fluPor.backward. + The outflowing fluid stream(s) at the port ports will be at the + states obtained from fluPor.backward. + For any given izon ∈ {1, ..., nzon}, + for each iports ∈ {1, ..., nports} + all fluid streams at port ports[izon, iports] are at the same + pressure. + For convenience, the instance hvacAda also outputs the + properties obtained from fluPor.backward. These can be used + to connect a controller. The properties are available for each flow path in + fluPor.backward. For a thermal zone with mixed air, these are + all equal, while for a stratified room model, they can be different.

    -

    Typical use and important parameters

    - When using this component, make sure that the condenser has sufficient mass flow rate. - Based on the evaporator mass flow rate, temperature difference and the efficiencies, - the model computes how much heat will be added to the condenser. - If the mass flow rate is too small, very high outlet temperatures can result. + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones + for a model that uses this model.

    - The evaporator heat flow rate QEva_flow_nominal is used to assign - the default value for the mass flow rates, which are used for the pressure drop - calculations. - It is also used to compute the part load efficiency. - Hence, make sure that QEva_flow_nominal is set to a reasonable value. + For models that only have one thermal zone connected to the HVAC system, + use the simpler model + + AixLib.Fluid.FMI.ExportContainers.HVACZone.

    +

    Assumption and limitations

    - The maximum cooling capacity is set by the parameter QEva_flow_min, - which is by default set to negative infinity. + The mass flow rates at ports sum to zero, hence this + model conserves mass for each thermal zone.

    - The coefficient of performance depends on the - evaporator and condenser leaving temperature - since otherwise the second law of thermodynamics may be violated. + This model does not impose any pressure, other than, + for any given izon ∈ {1, ..., nzon} and + for each j,k ∈ {1, ..., nports}, + setting the pressure of ports[izon, j].p = ports[izon, k].p + to be the same. + The reason is that setting a pressure can lead to non-physical system models, + for example if a mass flow rate is imposed and the HVAC system is connected + to a model that sets a pressure boundary condition such as + + AixLib.Fluid.Sources.Outside. + Also, setting a pressure would make it impossible to use multiple instances + of this model (one for each thermal zone) and build in Modelica an airflow network + model with pressure driven mass flow rates.

    -

    Notes

    - For a similar model that can be used as a heat pump, see - - AixLib.Fluid.HeatPumps.Examples.Carnot_TCon. + The model has no pressure drop. Hence, the pressure drop + of an air diffuser or of an exhaust grill needs to be modelled + in models that are connected to ports.

    -------- Corrected Code --------

    - This is a model of a chiller whose coefficient of performance COP - changes with temperatures in the same way as the Carnot efficiency - changes. The control input is the setpoint of the evaporator leaving - temperature, which is met exactly at steady state if the chiller has - sufficient capacity. + Model that is used as a container for an HVAC system that is to be + exported as an FMU and that serves multiple zones.

    +

    + Typical use and important parameters +

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or a COP0 at the - nominal conditions, together with the evaporator temperature - Teva,0 and the condenser temperature - Tcon,0, in which case the model computes the Carnot - effectivness as -

    -

    - ηCarnot,0 = COP0 ⁄ (Teva,0 ⁄ - (Tcon,0-Teva,0)). + To use this model as a container for an FMU, simply extend from this + model, rather than instantiate it, and add your HVAC system. By + extending from this model, the top-level signal connectors on the + right stay at the top-level, and hence will be visible at the FMI + interface. The example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones shows + how a simple HVAC system that serves two rooms can be implemented and + exported as an FMU.

    - On the Advanced tab, a user can specify the temperatures - that will be used as the evaporator and condenser temperature. + The following two parameters need to be assigned by the user: Set + nZon to the number of thermal zones to which the FMU + will be connected. Set nPorts to the largest number of + fluid ports that the thermal zones has. For example, if + nZon=2 and zone 1 has one inlet and one outlet + (hence it has 2 ports), and zone 2 has one inlets and two + outlets (hence it has 3 ports), then set nPorts=3. This + will add more fluid ports than are needed for zone 1, but this + causes no overhead if they are not connected.

    - During the simulation, the chiller COP is computed as the product + The conversion between the fluid ports and signal ports is done in + the HVAC adapter hvacAda. This adapter has a vector of + fluid ports called ports. The supply and return air + ducts, including any resistance model for the inlet diffusor or + exhaust grill, need to be connected to these ports. Also, if a + thermal zone has interzonal air exchange or air infiltration, these + flows need to be connected to ports. This model outputs + at the port fluPor the mass flow rate for each flow that + is connected to ports, together with its temperature, + water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the + flow enters the room, even if the flow is zero or negative. If a + medium has no moisture, e.g., if Medium.nXi=0, or if it + has no trace substances, e.g., if Medium.nC=0, then the + output signal for these properties are removed. These quantities are + always as if the flow enters the room, even if the flow is zero or + negative. Thus, a thermal zone model that uses these signals to + compute the heat added by the HVAC system need to implement an + equation such as

    - COP = ηCarnot,0 COPCarnot ηPL, + Qsen = max(0, ṁsup)   cp   + (Tsup - Tair,zon),

    - where COPCarnot is the Carnot efficiency and - ηPL is a polynomial in the cooling part load ratio - yPL that can be used to take into account a change - in COP at part load conditions. This polynomial has the form + where Qsen is the sensible heat flow rate added to + the thermal zone, sup is the supply air mass flow + rate from the port fluPor (which is negative if it is an + exhaust), cp is the specific heat capacity at + constant pressure, Tsup is the supply air + temperature and Tair,zon is the zone air + temperature. Note that without the max(·, ·), the energy + balance would be wrong.

    -

    - ηPL = a1 + a2 yPL + - a3 yPL2 + ... +

    + The input signals of this model are the radiative temperature of each + zone. The the zone air temperatures, the water vapor mass fractions + per total mass of the air (unless Medium.nXi=0) and + trace substances (unless Medium.nC=0) are obtained from + the connector fluPor.backward. The outflowing fluid + stream(s) at the port ports will be at the states + obtained from fluPor.backward. For any given + izon ∈ {1, ..., nzon}, for each + iports ∈ {1, ..., nports} all fluid + streams at port ports[izon, + iports] are at the same pressure. For convenience, + the instance hvacAda also outputs the properties + obtained from fluPor.backward. These can be used to + connect a controller. The properties are available for each flow path + in fluPor.backward. For a thermal zone with mixed air, + these are all equal, while for a stratified room model, they can be + different.

    - where the coefficients ai are declared by the - parameter a. + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones for a + model that uses this model.

    - On the Dynamics tag, the model can be parametrized to - compute a transient or steady-state response. The transient response - of the model is computed using a first order differential equation - for the evaporator and condenser fluid volumes. The chiller outlet - temperatures are equal to the temperatures of these lumped volumes. + For models that only have one thermal zone connected to the HVAC + system, use the simpler model AixLib.Fluid.FMI.ExportContainers.HVACZone.

    - Typical use and important parameters + Assumption and limitations

    - When using this component, make sure that the condenser has - sufficient mass flow rate. Based on the evaporator mass flow rate, - temperature difference and the efficiencies, the model computes how - much heat will be added to the condenser. If the mass flow rate is - too small, very high outlet temperatures can result. -

    -

    - The evaporator heat flow rate QEva_flow_nominal is used - to assign the default value for the mass flow rates, which are used - for the pressure drop calculations. It is also used to compute the - part load efficiency. Hence, make sure that - QEva_flow_nominal is set to a reasonable value. -

    -

    - The maximum cooling capacity is set by the parameter - QEva_flow_min, which is by default set to negative - infinity. + The mass flow rates at ports sum to zero, hence this + model conserves mass for each thermal zone.

    - The coefficient of performance depends on the evaporator and - condenser leaving temperature since otherwise the second law of - thermodynamics may be violated. + This model does not impose any pressure, other than, for any given + izon ∈ {1, ..., nzon} and for each + j,k ∈ {1, ..., nports}, setting the pressure of + ports[izon, j].p = ports[izon, + k].p to be the same. The reason is that setting a pressure can + lead to non-physical system models, for example if a mass flow rate + is imposed and the HVAC system is connected to a model that sets a + pressure boundary condition such as AixLib.Fluid.Sources.Outside. + Also, setting a pressure would make it impossible to use multiple + instances of this model (one for each thermal zone) and build in + Modelica an airflow network model with pressure driven mass flow + rates.

    -

    - Notes -

    - For a similar model that can be used as a heat pump, see AixLib.Fluid.HeatPumps.Examples.Carnot_TCon. + The model has no pressure drop. Hence, the pressure drop of an air + diffuser or of an exhaust grill needs to be modelled in models that + are connected to ports.

    -------- Errors -------- -line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 39 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 60 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Utilities/Math/Polynomial.mo ---- +---- AixLib/Fluid/HeatExchangers/BaseClasses/WetCoilWetRegime.mo ---- -------- HTML Code -------- -

    This block computes a polynomial of arbitrary order. The polynomial has the form

    -

    y = a1 + a2 x + a3 x2 + ...

    - --------- Corrected Code -------- -

    - This block computes a polynomial of arbitrary order. The polynomial - has the form -

    -

    - y = a1 + a2 x + a3 x2 + ... -

    - - --------- Errors -------- -line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Movers/Data/Pumps/Wilo/Stratos25slash1to6.mo ---- --------- HTML Code -------- - -

    Data from - - http://productfinder.wilo.com/en/COM/product/00000018000028040002003a/fc_product_datasheet +

    + This model implements the calculation for a 100% wet coil. +

    +

    + The equations from Braun (1988) and Mitchell and Braun (2012a and b), + which are essentially the extension of the ε-NTU approach to + simultaneous sensible and latent heat transfer, are utilized. +

    +

    + The mathematical equations are analogous to that of the sensible heat exchanger. + However, the key distinction is that the heat transfer is driven by an enthalpy difference + not by an temperature difference. This change in the driving potential results in re-defining + capacitances and heat transfer coefficients accordingly. +

    + +

    + The total heat transfer rate is expressed as +

    +

    + Qtot=ε* C*min + (hair,in-hsat(Twat,in)), +

    +

    + where ε*=f(Cr*,NTU*) and f is the same ε-NTU relationships + (depending on the heat exchanger configuration) for the sensible heat exchanger.

    - The nominal rpm is arbitrarily chosen as the rpm of the pump curve - in the data sheet that has the highest rpm, - without being limited by the maximum power limitation - (see dotted curve on figure below). - Pump curves (H(m_flow) and P(m_flow)) from the data sheets - are digitized using - web plot digitizer. + hair,in and hsat(Twat,in) are + the specific enthalpies of the incoming moist air and saturated moist air + at the water inlet temperature.

    -

    Limitations:

    -

    - The figure below illustrates a digitized pump curve. + The capacitances of water and air streams are defined as +

    +

    C*air=mair and + C*wat=mwatcp,wat/csat, +

    +

    + where csat is an specific heat capacity, which indicates the sensitivity + of the enthalpy of the staturated moist air w.r.t. the temperature, and is defined + here as csat=(hsat(Twat,out)-hsat(Twat,in)) + /(Twat,out-Twat,in). +

    +

    + The capacitance ratio and minimum capacitance are naturally defined as +

    +

    Cr*=min(C*air,C*wat)/max(C*air,C*wat) + and C*min=min(C*air,C*wat). +

    +


    + The number of transfer unit for the wet-coil is defined as NTU*=UA*/C*min, where

    - \"Pump

    + UA*=1/(1/(UAair/cp,air)+1/(UAwat/csat). +

    - +

    References

    +

    + Braun, James E. 1988. + "Methodologies for the Design and Control of Central Cooling Plants". + PhD Thesis. University of Wisconsin - Madison. + Available + + online. +

    +

    + Mitchell, John W., and James E. Braun. 2012a. + Principles of heating, ventilation, and air conditioning in buildings. + Hoboken, N.J.: Wiley. +

    +

    + Mitchell, John W., and James E. Braun. 2012b. + "Supplementary Material Chapter 2: Heat Exchangers for Cooling Applications". + Excerpt from Principles of heating, ventilation, and air conditioning in buildings. + Hoboken, N.J.: Wiley. + Available + + online. +

    -------- Corrected Code -------- +

    - Data from - http://productfinder.wilo.com/en/COM/product/00000018000028040002003a/fc_product_datasheet + This model implements the calculation for a 100% wet coil.

    - The nominal rpm is arbitrarily chosen as the rpm of the pump curve in - the data sheet that has the highest rpm, without being limited by the - maximum power limitation (see dotted curve on figure below). Pump - curves (H(m_flow) and P(m_flow)) from the data sheets are digitized - using web plot - digitizer. + The equations from Braun (1988) and Mitchell and Braun (2012a and b), + which are essentially the extension of the ε-NTU approach to + simultaneous sensible and latent heat transfer, are utilized. +

    +

    + The mathematical equations are analogous to that of the sensible heat + exchanger. However, the key distinction is that the heat transfer is + driven by an enthalpy difference not by an temperature difference. + This change in the driving potential results in re-defining + capacitances and heat transfer coefficients accordingly. +

    +

    + The total heat transfer rate is expressed as +

    +

    + Qtot=ε* C*min + (hair,in-hsat(Twat,in)), +

    +

    + where ε*=f(Cr*,NTU*) and f is the same ε-NTU + relationships (depending on the heat exchanger configuration) for the + sensible heat exchanger. +

    +

    + hair,in and + hsat(Twat,in) are the specific + enthalpies of the incoming moist air and saturated moist air at the + water inlet temperature. +

    +

    + The capacitances of water and air streams are defined as +

    +

    + C*air=mair and + C*wat=mwatcp,wat/csat, +

    +

    + where csat is an specific heat capacity, which indicates the + sensitivity of the enthalpy of the staturated moist air w.r.t. the + temperature, and is defined here as + csat=(hsat(Twat,out)-hsat(Twat,in)) + /(Twat,out-Twat,in). +

    +

    + The capacitance ratio and minimum capacitance are naturally defined + as +

    +

    + Cr*=min(C*air,C*wat)/max(C*air,C*wat) + and C*min=min(C*air,C*wat). +

    +

    +
    + The number of transfer unit for the wet-coil is defined as + NTU*=UA*/C*min, where +

    +

    + UA*=1/(1/(UAair/cp,air)+1/(UAwat/csat).

    - Limitations: + References

    -

    - The figure below illustrates a digitized pump curve. + Braun, James E. 1988. \"Methodologies for the Design and Control of + Central Cooling Plants\". PhD Thesis. University of Wisconsin - + Madison. Available online.

    -

    - \"Pump +

    + Mitchell, John W., and James E. Braun. 2012a. Principles of heating, + ventilation, and air conditioning in buildings. Hoboken, N.J.: Wiley. +

    +

    + Mitchell, John W., and James E. Braun. 2012b. \"Supplementary Material + Chapter 2: Heat Exchangers for Cooling Applications\". Excerpt from + Principles of heating, ventilation, and air conditioning in + buildings. Hoboken, N.J.: Wiley. Available + online.

    - -------- Errors -------- -line 27 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 20 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 36 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 48 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 54 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatPumps/Compressors/ScrollCompressor.mo ---- +---- AixLib/Fluid/Geothermal/Borefields/Types.mo ---- -------- HTML Code --------

    - Model for a scroll processor, as detailed in Jin (2002). The rate of heat transferred to the evaporator is given by: -

    -

    - Q̇Eva = ṁref ( hVap(TEva) - hLiq(TCon) ). -

    -

    - The power consumed by the compressor is given by a linear efficiency relation: -

    -

    - P = PTheoretical / η + PLoss,constant. -

    -

    - Variable speed is achieved by multiplying the full load suction volume flow rate - by the normalized compressor speed. The power and heat transfer rates are forced - to zero if the resulting heat pump state has higher evaporating pressure than - condensing pressure. -

    -

    Assumptions and limitations

    -

    - The compression process is assumed isentropic. The thermal energy - of superheating is ignored in the evaluation of the heat transferred to the refrigerant - in the evaporator. There is no supercooling. + Enumeration that defines the pipe configuration in the borehole.

    -

    References

    - H. Jin. - - Parameter estimation based models of water source heat pumps. - - PhD Thesis. Oklahoma State University. Stillwater, Oklahoma, USA. 2002. + The following pipe configurations are available in this enumeration:

    +
    + + + + + +
    EnumerationDescription
    SingleUTubeSingle U-tube configuration
    DoubleUTubeParallelDouble U-tube configuration with pipes connected in parallel
    DoubleUTubeSeriesDouble U-tube configuration with pipes connected in series
    +

    + This package contains type definitions. +

    + -------- Corrected Code --------

    - Model for a scroll processor, as detailed in Jin (2002). The rate of - heat transferred to the evaporator is given by: -

    -

    - Q̇Eva = ṁref ( - hVap(TEva) - hLiq(TCon) - ). -

    -

    - The power consumed by the compressor is given by a linear efficiency - relation: -

    -

    - P = PTheoretical / η + PLoss,constant. -

    -

    - Variable speed is achieved by multiplying the full load suction - volume flow rate by the normalized compressor speed. The power and - heat transfer rates are forced to zero if the resulting heat pump - state has higher evaporating pressure than condensing pressure. -

    -

    - Assumptions and limitations -

    -

    - The compression process is assumed isentropic. The thermal energy of - superheating is ignored in the evaluation of the heat transferred to - the refrigerant in the evaporator. There is no supercooling. + Enumeration that defines the pipe configuration in the borehole.

    -

    - References -

    - H. Jin. Parameter estimation based models of water source heat - pumps. PhD Thesis. Oklahoma State University. Stillwater, - Oklahoma, USA. 2002. + The following pipe configurations are available in this enumeration:

    + + + + + + + + + + + + + + + + + +
    + Enumeration + + Description +
    + SingleUTube + + Single U-tube configuration +
    + DoubleUTubeParallel + + Double U-tube configuration with pipes connected in parallel +
    + DoubleUTubeSeries + + Double U-tube configuration with pipes connected in series +
    +

    + This package contains type definitions. +

    -------- Errors -------- -line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 8 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 ----- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/MSLAIT.mo ---- +---- AixLib/ThermalZones/ReducedOrder/RC/FourElements.mo ---- -------- HTML Code -------- -

    - The example contains - - experimental data from a real district heating network. - This data is used to validate this library's - - AixLib.Fluid.FixedResistances.PlugFlowPipe in - - AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT. - This model compares its performance with the original Modelica Standard Library - pipes, using one discretization element per unit length of pipe. - For a coarser discretization, please refer to - - MSLAIT2Nodes. -

    -

    - Note that these three models are identical, except for the pipe model that is used: -

    -

    - This comparison between different discretization levels and pipe models is made - to check the influence of the discretization and pipe model on computation time - and simulation accuracy. -

    -

    The pipes' temperatures are not initialized, thus results of outflow - temperature before approximately the first 10000 seconds should not be considered. -

    -

    Test bench schematic

    -

    \"Schematic

    -

    Calibration

    -

    To calculate the length specific thermal resistance R of the - pipe, the thermal resistance of the surrounding ground is added.

    -

    - R=1/(0.208)+1/(2   lambda_g   Modelica.Constants.pi)   log(1/0.18)

    -

    - Where the thermal conductivity of the ground lambda_g = 2.4 W/(m K). -

    - - - --------- Corrected Code -------- -

    - The example contains - experimental data from a real district heating network. This data - is used to validate this library's AixLib.Fluid.FixedResistances.PlugFlowPipe - in - AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT. - This model compares its performance with the original Modelica - Standard Library pipes, using one discretization element per unit - length of pipe. For a coarser discretization, please refer to - - MSLAIT2Nodes. -

    -

    - Note that these three models are identical, except for the pipe model - that is used: -

    - -

    - This comparison between different discretization levels and pipe - models is made to check the influence of the discretization and pipe - model on computation time and simulation accuracy. -

    -

    - The pipes' temperatures are not initialized, thus results of outflow - temperature before approximately the first 10000 seconds should not - be considered. -

    -

    - Test bench schematic -

    -

    - \"Schematic -

    -

    - Calibration -

    -

    - To calculate the length specific thermal resistance R of - the pipe, the thermal resistance of the surrounding ground is added. -

    -

    - R=1/(0.208)+1/(2   lambda_g   Modelica.Constants.pi)   - log(1/0.18) -

    -

    - Where the thermal conductivity of the ground lambda_g = - 2.4 W/(m K). -

    + September 11, 2015 by Moritz Lauster:
    + First Implementation. + + + +

    + This model adds another element for the roof. Roofs commonly + exhibit the same excitations as exterior walls but have different coefficients + of heat transfer due to their orientation. Adding an extra element for the roof + might lead to a finer resolution of the dynamic behaviour but increases + calculation times. The roof is parameterized via the length of the RC-chain + nRoof, + the vector of capacities CRoof[nRoof], the vector of resistances + RRoof[nRoof] and remaining resistances RRoofRem. +

    +

    + The image below shows the RC-network of this model. +

    +

    + \"image\"/ +

    + +-------- Corrected Code -------- - --------- Errors -------- -line 56 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Storage/UsersGuide.mo ---- --------- HTML Code -------- -

    -This user's guide describes the storage tank models. -There are three storage tank models in the this package. + This model adds another element for the roof. Roofs commonly exhibit + the same excitations as exterior walls but have different + coefficients of heat transfer due to their orientation. Adding an + extra element for the roof might lead to a finer resolution of the + dynamic behaviour but increases calculation times. The roof is + parameterized via the length of the RC-chain nRoof, the + vector of capacities CRoof[nRoof], the vector of + resistances RRoof[nRoof] and remaining resistances + RRoofRem.

    -
    - - - - - - - - - - - - - -
    Model name Description
    - -AixLib.Fluid.Storage.Stratified -

    -This is a model of a stratified storage tank as shown in the figure below. + The image below shows the RC-network of this model.

    -\"Image -

    -

    -The tank uses several volumes to model the stratification. -Heat conduction is modeled between the volumes through the fluid, -and between the volumes and the ambient. -

    -

    -The heat port heaPorVol may be used to connect a temperature sensor -that measures the fluid temperature of an individual volume. It may also -be used to add heat to individual volumes, for example if the tank contains -an electrical resistance heater. -

    -

    -Similarly, the fluid port fluPorVol may be used to connect a fluid pipe -to an individual volume. This allows for example to draw water from that volume whose temperature -is close to the temperature required by the consumer. -Conversely, water could be added to that tank volume whose temperature is close to the -inlet water temperature. -If you don't use such a pipe, simply leave the ports unconnected. -

    -

    -The tank has nSeg fluid volumes. The top segment has the index 1. -Thus, to add a heating element to the bottom element, connect a heat input to -heaPorVol[nSeg]. -

    -

    -The heat ports outside the tank insulation can be -used to specify an ambient temperature. -Leave these ports unconnected to force adiabatic boundary conditions. -Note, however, that all heat conduction elements through the tank wall (but not the top and bottom) are connected to the -heat port heaPorSid. Thus, not connecting -heaPorSid means an adiabatic boundary condition in the sense -that heaPorSid.Q_flow = 0. This, however, still allows heat to flow -through the tank walls, modeled by conWal, from one fluid volume -to another one. -

    -
    - -AixLib.Fluid.Storage.StratifiedEnhanced - -

    -The model is identical to - -AixLib.Fluid.Storage.Stratified, -except for the following: -

    -
      -
    • -It adds a correction that reduces the numerical dissipation. -
    • -
    • -It does not contain the fluid ports fluPorVol that -connect from the outside to the individual volumes. -
    • -
    -

    -The correction uses a third order upwind scheme to compute the -outlet temperatures of the segments in the tank. This model -is implemented in - -AixLib.Fluid.Storage.BaseClasses.ThirdOrderStratifier. -

    -
    - -AixLib.Fluid.Storage.StratifiedEnhancedInternalHex - -

    -This model is identical to - -AixLib.Fluid.Storage.StratifiedEnhanced -except that it adds a heat exchanger to the tank. -

    -

    -The modifications consist of adding a heat exchanger -and fluid ports to connect to the heat exchanger. -The modifications allow to run a fluid through the tank causing heat transfer to the stored fluid. -A typical example is a storage tank in a solar hot water system. -

    -

    -The heat exchanger model assumes flow through the inside of a helical coil heat exchanger, -and stagnant fluid on the outside. Parameters are used to describe the -heat transfer on the inside of the heat exchanger at nominal conditions, and -geometry of the outside of the heat exchanger. This information is used to compute -an hA-value for each side of the coil. -Convection calculations are then performed to identify heat transfer -between the heat transfer fluid and the fluid in the tank. + \"image\"

    -

    -The location of the heat exchanger can be parameterized as follows: -The parameters hHex_a and hHex_b are the heights -of the heat exchanger ports portHex_a and portHex_b, -measured from the bottom of the tank. -For example, to place the port portHex_b at the bottom of the tank, -set hHexB_b=0. -The parameters hHex_a and hHex_b are then used to provide -a default value for the parameters -segHex_a and segHex_b, which are the numbers of the tank -segments to which the heat exchanger ports portHex_a and portHex_b -are connected. + +-------- Errors -------- +line 15 column 4 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/HeatPumps/Compressors/ScrollCompressor.mo ---- +-------- HTML Code -------- + +

    + Model for a scroll processor, as detailed in Jin (2002). The rate of heat transferred to the evaporator is given by: +

    +

    + Q̇Eva = ṁref ( hVap(TEva) - hLiq(TCon) ). +

    +

    + The power consumed by the compressor is given by a linear efficiency relation: +

    +

    + P = PTheoretical / η + PLoss,constant. +

    +

    + Variable speed is achieved by multiplying the full load suction volume flow rate + by the normalized compressor speed. The power and heat transfer rates are forced + to zero if the resulting heat pump state has higher evaporating pressure than + condensing pressure. +

    +

    Assumptions and limitations

    +

    + The compression process is assumed isentropic. The thermal energy + of superheating is ignored in the evaluation of the heat transferred to the refrigerant + in the evaporator. There is no supercooling. +

    +

    References

    +

    + H. Jin. + + Parameter estimation based models of water source heat pumps. + + PhD Thesis. Oklahoma State University. Stillwater, Oklahoma, USA. 2002. +

    + + + +-------- Corrected Code -------- +

    + Model for a scroll processor, as detailed in Jin (2002). The rate of + heat transferred to the evaporator is given by:

    -

    -\"Image +

    + Q̇Eva = ṁref ( + hVap(TEva) - hLiq(TCon) + ).

    -Optionally, this model computes a dynamic response of the heat exchanger. -This can be configured using the parameters -energyDynamicsHexSolid, -energyDynamicsHex and -massDynamicsHex. -For this computation, the fluid volume inside the heat exchanger -and the heat capacity of the heat -exchanger wall CHex are approximated. -Both depend on the length lHex -of the heat exchanger. -The model provides default values for these -parameters, as well as for the heat exchanger material which is -assumed to be steel. These default values can be overwritten by the user. -The default values for the heat exchanger geometry are computed assuming -that there is a cylindrical heat exchanger -made of steel whose diameter is half the diameter of the tank, e.g., -rHex=rTan/2. -Hence, the length of the heat exchanger is approximated as -lHex = 2 rHex π h = 2 rTan/2 π h, -where h is the distance between the heat exchanger inlet and outlet. -The wall thickness is assumed to be 10% of the heat exchanger -outer diameter. -For typical applications, users do not need to change these values. + The power consumed by the compressor is given by a linear efficiency + relation:

    -

    -Setting energyDynamicsHexSolid to a dynamic balance and -energyDynamicsHex to a steady-state balance may be of interest -to remove very fast dynamics of the fluid, while still modeling slower -dynamics that arises from the metal of the heat exchanger. -By default, energyDynamicsHexSolid is set -to the same value as energyDynamicsHex -as this seems to be the typical configuration. +

    + P = PTheoretical / η + PLoss,constant.

    -The heat exchanger is implemented in - -AixLib.Fluid.Storage.BaseClasses.IndirectTankHeatExchanger. + Variable speed is achieved by multiplying the full load suction + volume flow rate by the normalized compressor speed. The power and + heat transfer rates are forced to zero if the resulting heat pump + state has higher evaporating pressure than condensing pressure.

    -
    - --------- Corrected Code -------- +

    + Assumptions and limitations +

    - This user's guide describes the storage tank models. There are three - storage tank models in the this package. + The compression process is assumed isentropic. The thermal energy of + superheating is ignored in the evaluation of the heat transferred to + the refrigerant in the evaporator. There is no supercooling.

    - - - - - - - - - - - - - - - - - -
    - Model name - - Description -
    - AixLib.Fluid.Storage.Stratified - -

    - This is a model of a stratified storage tank as shown in the - figure below. -

    -

    - \"Image -

    -

    - The tank uses several volumes to model the stratification. Heat - conduction is modeled between the volumes through the fluid, - and between the volumes and the ambient. -

    -

    - The heat port heaPorVol may be used to connect a - temperature sensor that measures the fluid temperature of an - individual volume. It may also be used to add heat to - individual volumes, for example if the tank contains an - electrical resistance heater. -

    -

    - Similarly, the fluid port fluPorVol may be used to - connect a fluid pipe to an individual volume. This allows for - example to draw water from that volume whose temperature is - close to the temperature required by the consumer. Conversely, - water could be added to that tank volume whose temperature is - close to the inlet water temperature. If you don't use such a - pipe, simply leave the ports unconnected. -

    -

    - The tank has nSeg fluid volumes. The top segment - has the index 1. Thus, to add a heating element to - the bottom element, connect a heat input to - heaPorVol[nSeg]. -

    -

    - The heat ports outside the tank insulation can be used to - specify an ambient temperature. Leave these ports unconnected - to force adiabatic boundary conditions. Note, however, that all - heat conduction elements through the tank wall (but not the top - and bottom) are connected to the heat port - heaPorSid. Thus, not connecting - heaPorSid means an adiabatic boundary condition in - the sense that heaPorSid.Q_flow = 0. This, - however, still allows heat to flow through the tank walls, - modeled by conWal, from one fluid volume to - another one. -

    -
    - AixLib.Fluid.Storage.StratifiedEnhanced - -

    - The model is identical to AixLib.Fluid.Storage.Stratified, - except for the following: -

    -
      -
    • It adds a correction that reduces the numerical - dissipation. -
    • -
    • It does not contain the fluid ports fluPorVol - that connect from the outside to the individual volumes. -
    • -
    -

    - The correction uses a third order upwind scheme to compute the - outlet temperatures of the segments in the tank. This model is - implemented in - AixLib.Fluid.Storage.BaseClasses.ThirdOrderStratifier. -

    -
    - AixLib.Fluid.Storage.StratifiedEnhancedInternalHex - -

    - This model is identical to AixLib.Fluid.Storage.StratifiedEnhanced - except that it adds a heat exchanger to the tank. -

    -

    - The modifications consist of adding a heat exchanger and fluid - ports to connect to the heat exchanger. The modifications allow - to run a fluid through the tank causing heat transfer to the - stored fluid. A typical example is a storage tank in a solar - hot water system. -

    -

    - The heat exchanger model assumes flow through the inside of a - helical coil heat exchanger, and stagnant fluid on the outside. - Parameters are used to describe the heat transfer on the inside - of the heat exchanger at nominal conditions, and geometry of - the outside of the heat exchanger. This information is used to - compute an hA-value for each side of the coil. - Convection calculations are then performed to identify heat - transfer between the heat transfer fluid and the fluid in the - tank. -

    -

    - The location of the heat exchanger can be parameterized as - follows: The parameters hHex_a and - hHex_b are the heights of the heat exchanger ports - portHex_a and portHex_b, measured - from the bottom of the tank. For example, to place the port - portHex_b at the bottom of the tank, set - hHexB_b=0. The parameters hHex_a and - hHex_b are then used to provide a default value - for the parameters segHex_a and - segHex_b, which are the numbers of the tank - segments to which the heat exchanger ports - portHex_a and portHex_b are - connected. -

    -

    - \"Image -

    -

    - Optionally, this model computes a dynamic response of the heat - exchanger. This can be configured using the parameters - energyDynamicsHexSolid, - energyDynamicsHex and - massDynamicsHex. For this computation, the fluid - volume inside the heat exchanger and the heat capacity of the - heat exchanger wall CHex are approximated. Both - depend on the length lHex of the heat exchanger. - The model provides default values for these parameters, as well - as for the heat exchanger material which is assumed to be - steel. These default values can be overwritten by the user. The - default values for the heat exchanger geometry are computed - assuming that there is a cylindrical heat exchanger made of - steel whose diameter is half the diameter of the tank, e.g., - rHex=rTan/2. Hence, the length of - the heat exchanger is approximated as lHex = 2 - rHex π h = 2 rTan/2 π h, where - h is the distance between the heat exchanger inlet and - outlet. The wall thickness is assumed to be 10% of the - heat exchanger outer diameter. For typical applications, users - do not need to change these values. -

    -

    - Setting energyDynamicsHexSolid to a dynamic - balance and energyDynamicsHex to a steady-state - balance may be of interest to remove very fast dynamics of the - fluid, while still modeling slower dynamics that arises from - the metal of the heat exchanger. By default, - energyDynamicsHexSolid is set to the same value as - energyDynamicsHex as this seems to be the typical - configuration. -

    -

    - The heat exchanger is implemented in AixLib.Fluid.Storage.BaseClasses.IndirectTankHeatExchanger. -

    -
    +

    + References +

    +

    + H. Jin. Parameter estimation based models of water source heat + pumps. PhD Thesis. Oklahoma State University. Stillwater, + Oklahoma, USA. 2002. +

    + -------- Errors -------- -line 6 column 1 - Warning: The summary attribute on the element is obsolete in HTML5 -line 17 column 1 - Warning:

    attribute "align" not allowed for HTML5 -line 129 column 1 - Warning:

    attribute "align" not allowed for HTML5 +line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatExchangers/EvaporatorCondenser.mo ---- +---- AixLib/Fluid/HeatExchangers/ConstantEffectiveness.mo ---- -------- HTML Code --------

    - Model for a constant temperature evaporator or condenser based on a ε-NTU - heat exchanger model. + Model for a heat exchanger with constant effectiveness.

    - The heat exchanger effectiveness is calculated from the number of transfer units - (NTU): + This model transfers heat in the amount of

    - ε = 1 - exp(UA ⁄ (ṁ cp)) + Q = Qmax ε,

    - Optionally, this model can have a flow resistance. - If no flow resistance is requested, set dp_nominal=0. + where ε is a constant effectiveness and + Qmax is the maximum heat that can be transferred.

    -

    Limitations

    - This model does not consider any superheating or supercooling on the refrigerant - side. The refrigerant is considered to exchange heat at a constant temperature - throughout the heat exchanger. + For a heat and moisture exchanger, use + + AixLib.Fluid.MassExchangers.ConstantEffectiveness + instead of this model.

    -------- Corrected Code --------

    - Model for a constant temperature evaporator or condenser based on a - ε-NTU heat exchanger model. + Model for a heat exchanger with constant effectiveness.

    - The heat exchanger effectiveness is calculated from the number of - transfer units (NTU): + This model transfers heat in the amount of

    - ε = 1 - exp(UA ⁄ (ṁ cp)) + Q = Qmax ε,

    - Optionally, this model can have a flow resistance. If no flow - resistance is requested, set dp_nominal=0. + where ε is a constant effectiveness and Qmax + is the maximum heat that can be transferred.

    -

    - Limitations -

    - This model does not consider any superheating or supercooling on the - refrigerant side. The refrigerant is considered to exchange heat at a - constant temperature throughout the heat exchanger. + For a heat and moisture exchanger, use AixLib.Fluid.MassExchangers.ConstantEffectiveness + instead of this model.

    + +-------- Errors -------- +line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Controls/Continuous/NumberOfRequests.mo ---- +-------- HTML Code -------- + +

    + Block that outputs the number of inputs that exceed a threshold. + The parameter kind is used to determine the kind of the + inequality. The table below shows the allowed settings. +

    +
    + + + + + + + + + + + + + + + + + + + + +
    Value of parameter kindOutput signal incremented by 1 for each i ∈ {1, ..., nin} if
    0u[i] > threShold
    1u[i] ≥ threShold
    2u[i] ≤ threShold
    3u[i] < threShold
    +

    + This model may be used to check how many rooms + exceed a temperature threshold. +

    + + + +-------- Corrected Code -------- +

    + Block that outputs the number of inputs that exceed a threshold. The + parameter kind is used to determine the kind of the + inequality. The table below shows the allowed settings. +

    + + + + + + + + + + + + + + + + + + + + + +
    + Value of parameter kind + + Output signal incremented by 1 for each i ∈ {1, ..., nin} + if +
    + 0 + + u[i] > threShold +
    + 1 + + u[i] ≥ threShold +
    + 2 + + u[i] ≤ threShold +
    + 3 + + u[i] < threShold +
    +

    + This model may be used to check how many rooms exceed a temperature + threshold. +

    + -------- Errors -------- -line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 7 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 + + +---- AixLib/Utilities/Math/QuadraticLinear.mo ---- +-------- HTML Code -------- + +

    Block for function quadraticLinear, which computes

    +

    y = a1 + a2 x1 + a3 x12 + (a4 + a5 x1 + a6 x12) x2

    + + + +-------- Corrected Code -------- +

    + Block for function quadraticLinear, which computes +

    +

    + y = a1 + a2 x1 + a3 x12 + (a4 + a5 x1 + a6 x12) x2 +

    + + +-------- Errors -------- +line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/finiteLineSource.mo ---- +---- AixLib/BoundaryConditions/Validation/BESTEST/WD400.mo ---- -------- HTML Code -------- -

    - This function evaluates the finite line source solution. This solution - gives the relation between the constant heat transfer rate (per unit length) - injected by a line source of finite length H1 buried at a - distance D1 from a constant temperature surface - (T=0) and the average temperature raise over a line of finite length - H2 buried at a distance D2 from the constant - temperature surface. - The finite line source solution is defined by: -

    -

    - \"image\" -

    -

    - where ΔT1-2(t,r,H1,D1,H2,D2) - is the temperature raise after a time t of constant heat injection and at - a distance r from the line heat source, Q' is the heat injection - rate per unit length, ks is the soil thermal conductivity and - hFLS is the finite line source solution. -

    -

    - The finite line source solution is given by: -

    -

    - \"image\" -

    -

    - where αs is the ground thermal diffusivity and - erfint is the integral of the error function, defined in - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource_erfint. - The integral is solved numerically, with the integrand defined in - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource_Integrand. -

    - +

    WD400: High Latitude Case

    +

    Weather data file : WD400.epw

    +

    Table 1: Site Data for Weather file WD400.epw

    +
    + + + + + + + + + + + + + + + +

    Latitude

    71.286° north

    Longitude

    156.767° west

    Altitude

    10 m

    Time Zone

    -9

    + -------- Corrected Code -------- -

    - This function evaluates the finite line source solution. This - solution gives the relation between the constant heat transfer rate - (per unit length) injected by a line source of finite length - H1 buried at a distance D1 from a - constant temperature surface (T=0) and the average temperature - raise over a line of finite length H2 buried at a - distance D2 from the constant temperature surface. - The finite line source solution is defined by: -

    -

    - \"image\" -

    -

    - where - ΔT1-2(t,r,H1,D1,H2,D2) - is the temperature raise after a time t of constant heat - injection and at a distance r from the line heat source, - Q' is the heat injection rate per unit length, - ks is the soil thermal conductivity and - hFLS is the finite line source solution. -

    -

    - The finite line source solution is given by: -

    -

    - \"image\" -

    -

    - where αs is the ground thermal diffusivity and - erfint is the integral of the error function, defined in - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource_erfint. - The integral is solved numerically, with the integrand defined in - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource_Integrand. -

    +

    + WD400: High Latitude Case +

    +

    + Weather data file : WD400.epw +

    +

    + Table 1: Site Data for Weather file WD400.epw +

    + + + + + + + + + + + + + + + + + +
    +

    + Latitude +

    +
    +

    + 71.286° north +

    +
    +

    + Longitude +

    +
    +

    + 156.767° west +

    +
    +

    + Altitude +

    +
    +

    + 10 m +

    +
    +

    + Time Zone +

    +
    +

    + -9 +

    +
    -------- Errors -------- -line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 25 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 ----- AixLib/Fluid/Chillers/BaseClasses/Carnot.mo ---- +---- AixLib/Fluid/Sensors/LatentEnthalpyFlowRate.mo ---- -------- HTML Code --------

    - This is the base class for the Carnot chiller and the Carnot heat pump - whose coefficient of performance COP changes - with temperatures in the same way as the Carnot efficiency changes. -

    -

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or - a COP0 - at the nominal conditions, together with - the evaporator temperature Teva,0 and - the condenser temperature Tcon,0, in which - case the model computes the Carnot effectivness as + This model outputs the latent enthalphy flow rate of the medium in the flow + between its fluid ports. In particular, if the total enthalpy flow rate is

    - ηCarnot,0 = - COP0 - ⁄ (Tuse,0 ⁄ (Tcon,0-Teva,0)), + Ḣtot = Ḣsen + Ḣlat,

    where - Tuse is the temperature of the the useful heat, - e.g., the evaporator temperature for a chiller or the condenser temperature - for a heat pump. -

    -

    - The COP is computed as the product -

    -

    - COP = ηCarnot,0 COPCarnot ηPL, + sen = ṁ (1-Xw) cp,air, + then this sensor outputs Ḣ = Ḣlat.

    - where COPCarnot is the Carnot efficiency and - ηPL is the part load efficiency, expressed using - a polynomial. - This polynomial has the form -

    -

    - ηPL = a1 + a2 y + a3 y2 + ... + If the parameter tau is non-zero, then the measured + specific latent enthalpy hout that is used to + compute the latent enthalpy flow rate + lat = ṁ hout + is computed using a first order differential equation. + See + AixLib.Fluid.Sensors.UsersGuide for an explanation.

    - where y ∈ [0, 1] is - either the part load for cooling in case of a chiller, or the part load of heating in - case of a heat pump, and the coefficients ai - are declared by the parameter a. + For a sensor that measures + tot, use + + AixLib.Fluid.Sensors.EnthalpyFlowRate.
    + For a sensor that measures + sen, use + + AixLib.Fluid.Sensors.SensibleEnthalpyFlowRate.

    -

    Implementation

    - To make this base class applicable to chiller or heat pumps, it uses - the boolean constant COP_is_for_cooling. - Depending on its value, the equations for the coefficient of performance - and the part load ratio are set up. + The sensor is ideal, i.e., it does not influence the fluid. + The sensor can only be used with medium models that implement the function + enthalpyOfNonCondensingGas(T).

    -------- Corrected Code --------

    - This is the base class for the Carnot chiller and the Carnot heat - pump whose coefficient of performance COP changes with temperatures - in the same way as the Carnot efficiency changes. -

    -

    - The model allows to either specify the Carnot effectivness - ηCarnot,0, or a COP0 at the - nominal conditions, together with the evaporator temperature - Teva,0 and the condenser temperature - Tcon,0, in which case the model computes the Carnot - effectivness as + This model outputs the latent enthalphy flow rate of the + medium in the flow between its fluid ports. In particular, if the + total enthalpy flow rate is

    - ηCarnot,0 = COP0 ⁄ (Tuse,0 ⁄ - (Tcon,0-Teva,0)), -

    -

    - where Tuse is the temperature of the the useful - heat, e.g., the evaporator temperature for a chiller or the condenser - temperature for a heat pump. + Ḣtot = Ḣsen + Ḣlat,

    - The COP is computed as the product -

    -

    - COP = ηCarnot,0 COPCarnot ηPL, + where sen = ṁ (1-Xw) + cp,air, then this sensor outputs Ḣ = + Ḣlat.

    - where COPCarnot is the Carnot efficiency and - ηPL is the part load efficiency, expressed using a - polynomial. This polynomial has the form -

    -

    - ηPL = a1 + a2 y + a3 - y2 + ... + If the parameter tau is non-zero, then the measured + specific latent enthalpy hout that is used to + compute the latent enthalpy flow rate lat = ṁ + hout is computed using a first order differential + equation. See AixLib.Fluid.Sensors.UsersGuide + for an explanation.

    - where y ∈ [0, 1] is either the part load for cooling in case - of a chiller, or the part load of heating in case of a heat pump, and - the coefficients ai are declared by the parameter - a. + For a sensor that measures tot, use AixLib.Fluid.Sensors.EnthalpyFlowRate.
    + + For a sensor that measures sen, use AixLib.Fluid.Sensors.SensibleEnthalpyFlowRate.

    -

    - Implementation -

    - To make this base class applicable to chiller or heat pumps, it uses - the boolean constant COP_is_for_cooling. Depending on - its value, the equations for the coefficient of performance and the - part load ratio are set up. + The sensor is ideal, i.e., it does not influence the fluid. The + sensor can only be used with medium models that implement the + function enthalpyOfNonCondensingGas(T).

    -------- Errors -------- -line 16 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 30 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 39 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowHeatLoss.mo ---- +---- AixLib/Fluid/HeatExchangers/Heater_T.mo ---- -------- HTML Code --------

    - Component that calculates the heat losses at the end of a plug flow pipe - when the flow goes in the design direction. + Model for an ideal heater that controls its outlet temperature to + a prescribed outlet temperature. +

    +

    + This model forces the outlet temperature at port_b to be + no lower than the temperature of the input signal + TSet, subject to optional limits on the + capacity. + By default, the model has unlimited heating capacity. +

    +

    + The output signal Q_flow is the heat added + to the medium if the mass flow rate is from port_a to port_b. + If the flow is reversed, then Q_flow=0. +

    +

    + The outlet conditions at port_a are not affected by this model, + other than for a possible pressure difference due to flow friction.

    -

    Main equations

    - The governing equations are + If the parameter energyDynamics is different from + Modelica.Fluid.Types.Dynamics.SteadyState, + the component models the dynamic response using a first order differential equation. + The time constant of the component is equal to the parameter tau. + This time constant is adjusted based on the mass flow rate using

    - Tout = Tb + (Tin - Tb) - exp((tout - tin)/tauchar) + τeff = τ |ṁ| ⁄ ṁnom

    - with + where + τeff is the effective time constant for the given mass flow rate + and + τ is the time constant at the nominal mass flow rate + nom. + This type of dynamics is equal to the dynamics that a completely mixed + control volume would have.

    -

    - tauchar = R C +

    + Optionally, this model can have a flow resistance. + Set dp_nominal = 0 to disable the flow friction calculation.

    -

    Assumptions and limitations

    - This model is based on the following assumptions: + For a similar model that is a sensible cooling device, use + + AixLib.Fluid.HeatExchangers.SensibleCooler_T. + For a model that uses a control signal u ∈ [0, 1] and multiplies + this with the nominal heating or cooling power, use + + AixLib.Fluid.HeatExchangers.HeaterCooler_u +

    - -

    Implementation

    +

    Limitations

    - Heat losses are only considered in design flow direction. - For heat loss consideration in both directions, use one of these models at - both ends of a - - AixLib.Fluid.FixedResistances.BaseClasses.PlugFlow model. - The outlet temperature is calculated as in the equation above, - using the inlet temperature at port_a and the instantaneous - time delay and boundary temperature. - The boundary temperature can be either the air temperature - or the undisturbed ground temperature, depending on the definition of the - thermal resistance R. + If the flow is from port_b to port_a, + then the enthalpy of the medium is not affected by this model.

    +

    Validation

    - This component requires the delay time and the instantaneous ambient temperature - as an input. - This component is to be used in single pipes or in more advanced configurations - where no influence from other pipes is considered.

    + The model has been validated against the analytical solution in + the examples + + AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet + and + + AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic. +

    -------- Corrected Code --------

    - Component that calculates the heat losses at the end of a plug flow - pipe when the flow goes in the design direction. + Model for an ideal heater that controls its outlet temperature to a + prescribed outlet temperature.

    -

    - Main equations -

    - The governing equations are + This model forces the outlet temperature at port_b to be + no lower than the temperature of the input signal TSet, + subject to optional limits on the capacity. By default, the model has + unlimited heating capacity.

    -

    - Tout = Tb + (Tin - Tb) - exp((tout - tin)/tauchar) +

    + The output signal Q_flow is the heat added to the medium + if the mass flow rate is from port_a to + port_b. If the flow is reversed, then + Q_flow=0.

    - with + The outlet conditions at port_a are not affected by this + model, other than for a possible pressure difference due to flow + friction. +

    +

    + If the parameter energyDynamics is different from + Modelica.Fluid.Types.Dynamics.SteadyState, the component + models the dynamic response using a first order differential + equation. The time constant of the component is equal to the + parameter tau. This time constant is adjusted based on + the mass flow rate using

    - tauchar = R C + τeff = τ |ṁ| ⁄ ṁnom

    -

    - Assumptions and limitations -

    - This model is based on the following assumptions: + where τeff is the effective time constant for the + given mass flow rate and τ is the time constant at + the nominal mass flow rate nom. This type of + dynamics is equal to the dynamics that a completely mixed control + volume would have. +

    +

    + Optionally, this model can have a flow resistance. Set + dp_nominal = 0 to disable the flow friction calculation. +

    +

    + For a similar model that is a sensible cooling device, use AixLib.Fluid.HeatExchangers.SensibleCooler_T. + For a model that uses a control signal u ∈ [0, 1] and + multiplies this with the nominal heating or cooling power, use + AixLib.Fluid.HeatExchangers.HeaterCooler_u

    -

    - Implementation + Limitations

    - Heat losses are only considered in design flow direction. For heat - loss consideration in both directions, use one of these models at - both ends of a AixLib.Fluid.FixedResistances.BaseClasses.PlugFlow - model. The outlet temperature is calculated as in the equation above, - using the inlet temperature at port_a and the - instantaneous time delay and boundary temperature. The boundary - temperature can be either the air temperature or the undisturbed - ground temperature, depending on the definition of the thermal - resistance R. + If the flow is from port_b to port_a, then + the enthalpy of the medium is not affected by this model.

    +

    + Validation +

    - This component requires the delay time and the instantaneous ambient - temperature as an input. This component is to be used in single pipes - or in more advanced configurations where no influence from other - pipes is considered. + The model has been validated against the analytical solution in the + examples AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet + and + AixLib.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic.

    -------- Errors -------- -line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 17 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Actuators/Valves/TwoWayTable.mo ---- +---- AixLib/Fluid/FixedResistances/Junction.mo ---- -------- HTML Code --------

    - Two way valve with opening characteristic that is configured through - a table. + Model of a flow junction with an optional fixed resistance in each flow leg + and an optional mixing volume at the junction.

    - The mass flow rate for the fully open valve is determined based - on the value of the parameter CvData. - For the different valve positions y ∈ [0, 1], this nominal flow rate is - scaled by the values of the parameter - flowCharacteristics. - The parameter flowCharacteristics declares a table of the form + The pressure drop is implemented using the model + + AixLib.Fluid.FixedResistances.PressureDrop. + If its nominal pressure drop is set to zero, then the pressure drop + model will be removed. + For example, the pressure drop declaration

    -
    - - - - - - -
    y 0 ... 1
    φ l ... 1
    +

    +   m_flow_nominal={ 0.1, 0.1,  -0.2},
    +   dp_nominal =   {500,    0, -6000}
    + 

    - where l = Kv(y=0)/Kv(y=1) > 0 is the valve leakage. - The first row is the valve opening, and the second row is the - mass flow rate, relative to the mass flow rate of the fully open - valve, under the assumption of a constant pressure difference across the - valve. - A suggested value for the valve leakage is l=0.0001. - If l = 0, then this model will replace it with - l = 10-8 for numerical reasons. - For example, if a valve has Kv=0.5 [m3/h/bar1/2] and - a linear opening characteristics and - a valve leakage of l=0.0001, then one would set + would model a flow mixer that has the nominal flow rates and associated pressure drops + as shown in the figure below. Note that port_3 is set to negative values. + The negative values indicate that at the nominal conditions, fluid is leaving the component. +

    +

    + \"image\"

    -
    -  CvData=AixLib.Fluid.Types.CvTypes.Kv
    -  Kv = 0.5
    -  flowCharacteristics(y={0,1}, phi={0.0001,1})
    -  

    - Note, however, that - - AixLib.Fluid.Actuators.Valves.TwoWayLinear provides a more - efficient implementation for this simple case. + If + energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState, + then at the flow junction, a fluid volume is modeled. + The fluid volume is implemented using the model + + AixLib.Fluid.Delays.DelayFirstOrder. + The fluid volume has the size

    +
    +   V = sum(abs(m_flow_nominal[:])/3)*tau/rho_nominal
    + 

    - The parameter flowCharacteristics must meet the following - requirements, otherwise the model stops with an error: + where tau is a parameter and rho_nominal is the density + of the medium in the volume at nominal condition. + Setting energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial + can help reducing the size of the nonlinear + system of equations.

    + -

    - This model is based on the partial valve model - - AixLib.Fluid.Actuators.BaseClasses.PartialTwoWayValve. - Check this model for more information, such - as the regularization near the origin. -

    -

    - For an example that specifies an opening characteristics, see - - AixLib.Fluid.Actuators.Valves.Examples.TwoWayValveTable. -

    - - -------- Corrected Code --------

    - Two way valve with opening characteristic that is configured through - a table. + Model of a flow junction with an optional fixed resistance in each + flow leg and an optional mixing volume at the junction.

    - The mass flow rate for the fully open valve is determined based on - the value of the parameter CvData. For the different - valve positions y ∈ [0, 1], this nominal flow rate is scaled - by the values of the parameter flowCharacteristics. The - parameter flowCharacteristics declares a table of the - form + The pressure drop is implemented using the model AixLib.Fluid.FixedResistances.PressureDrop. + If its nominal pressure drop is set to zero, then the pressure drop + model will be removed. For example, the pressure drop declaration

    - - - - - - - - - - - - - -
    - y - - 0 - - ... - - 1 -
    - φ - - l - - ... - - 1 -
    +
    +   m_flow_nominal={ 0.1, 0.1,  -0.2},
    +   dp_nominal =   {500,    0, -6000}
    + 

    - where l = Kv(y=0)/Kv(y=1) > 0 is the - valve leakage. The first row is the valve opening, and the second row - is the mass flow rate, relative to the mass flow rate of the fully - open valve, under the assumption of a constant pressure difference - across the valve. A suggested value for the valve leakage is - l=0.0001. If l = 0, then this model will replace it - with l = 10-8 for numerical reasons. For example, - if a valve has Kv=0.5 - [m3/h/bar1/2] and a linear opening - characteristics and a valve leakage of l=0.0001, then one - would set + would model a flow mixer that has the nominal flow rates and + associated pressure drops as shown in the figure below. Note that + port_3 is set to negative values. The negative values + indicate that at the nominal conditions, fluid is leaving the + component. +

    +

    + \"image\"

    -
    -  CvData=AixLib.Fluid.Types.CvTypes.Kv
    -  Kv = 0.5
    -  flowCharacteristics(y={0,1}, phi={0.0001,1})
    -  

    - Note, however, that AixLib.Fluid.Actuators.Valves.TwoWayLinear - provides a more efficient implementation for this simple case. + If energyDynamics <> + Modelica.Fluid.Types.Dynamics.SteadyState, then at the flow + junction, a fluid volume is modeled. The fluid volume is implemented + using the model AixLib.Fluid.Delays.DelayFirstOrder. + The fluid volume has the size

    +
    +   V = sum(abs(m_flow_nominal[:])/3)*tau/rho_nominal
    + 

    - The parameter flowCharacteristics must meet the - following requirements, otherwise the model stops with an error: + where tau is a parameter and rho_nominal is + the density of the medium in the volume at nominal condition. Setting + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial + can help reducing the size of the nonlinear system of equations.

    -

    - This model is based on the partial valve model AixLib.Fluid.Actuators.BaseClasses.PartialTwoWayValve. - Check this model for more information, such as the regularization - near the origin. -

    -

    - For an example that specifies an opening characteristics, see - - AixLib.Fluid.Actuators.Valves.Examples.TwoWayValveTable. -

    - -------- Errors -------- -line 14 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 23 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Movers/Validation/PowerExact.mo ---- +---- AixLib/Media/Water.mo ---- -------- HTML Code --------

    - This example is identical to - - AixLib.Fluid.Movers.Validation.PowerSimplified, except that the - performance data for the flow controlled pumps - pump_dp and pump_m_flow contain - the pressure curves and efficiency curves. - The plot below shows that this leads to a computation of the power consumption - that is identical to the one from the speed controlled pump pump_Nrpm. + Model with basic thermodynamic properties.

    -

    - \"image\" +

    + This base properties model is identical to + + Modelica.Media.Water.ConstantPropertyLiquidWater, + except that the equation + u = cv_const*(T - reference_T) + has been replaced by u=h because + cp_const=cv_const. +

    +

    + This model provides equation for the following thermodynamic properties: +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    VariableUnitDescription
    TKtemperature
    pPaabsolute pressure
    dkg/m3density
    hJ/kgspecific enthalpy
    uJ/kgspecific internal energy
    Xi[nXi]kg/kgindependent mass fractions m_i/m
    RJ/kg.Kgas constant
    Mkg/molmolar mass
    + +

    + Enthalpy of the water.

    --------- Corrected Code -------- -

    - This example is identical to AixLib.Fluid.Movers.Validation.PowerSimplified, - except that the performance data for the flow controlled pumps - pump_dp and pump_m_flow contain the - pressure curves and efficiency curves. The plot below shows that this - leads to a computation of the power consumption that is identical to - the one from the speed controlled pump pump_Nrpm. -

    -

    - \"image\" -

    - - --------- Errors -------- -line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/Cylindrical.mo ---- --------- HTML Code -------- -

    - Model for radial heat transfer in a hollow cylinder. -

    -

    - If the heat capacity of the material is non-zero, then this model computes transient heat conduction, i.e., it - computes a numerical approximation to the solution of the heat equation -

    -

    - ρ c ( ∂ T(r,t) ⁄ ∂t ) = - k ( ∂² T(r,t) ⁄ ∂r² + 1 ⁄ r   ∂ T(r,t) ⁄ ∂r ), + This medium package models liquid water.

    - where - ρ - is the mass density, - c - is the specific heat capacity per unit mass, - T - is the temperature at location r and time t and - k is the heat conductivity. - At the locations r=ra and r=rb, - the temperature and heat flow rate are equal to the - temperature and heat flow rate of the heat ports. + The mass density is computed using a constant value of 995.586 kg/s. + For a medium model in which the density is a function of temperature, use + + AixLib.Media.Specialized.Water.TemperatureDependentDensity which may have considerably higher computing time.

    - If the heat capacity of the material is set to zero, then steady-state heat flow is computed using + For the specific heat capacities at constant pressure and at constant volume, + a constant value of 4184 J/(kg K), which corresponds to 20°C + is used. + The figure below shows the relative error of the specific heat capacity that + is introduced by this simplification.

    -

    - Q = 2 π k (Ta-Tb)⁄ ln(ra ⁄ rb), +

    + \"Relative

    - where - ra is the internal radius, - rb is the external radius, - Ta is the temperature at port a and - Tb is the temperature at port b. + The enthalpy is computed using the convention that h=0 + if T=0 °C.

    -

    Implementation

    +

    Limitations

    - To spatially discretize the heat equation, the construction is - divided into compartments with nSta ≥ 1 state variables. - The state variables are connected to each other through thermal conductors. - There is also a thermal conductor - between the surfaces and the outermost state variables. Thus, to obtain - the surface temperature, use port_a.T (or port_b.T) - and not the variable T[1]. + Density, specific heat capacity, thermal conductivity and viscosity are constant. + Water is modeled as an incompressible liquid. + There are no phase changes.

    -------- Corrected Code --------

    - Model for radial heat transfer in a hollow cylinder. -

    -

    - If the heat capacity of the material is non-zero, then this model - computes transient heat conduction, i.e., it computes a numerical - approximation to the solution of the heat equation -

    -

    - ρ c ( ∂ T(r,t) ⁄ ∂t ) = k ( ∂² T(r,t) ⁄ ∂r² + 1 ⁄ r   ∂ T(r,t) ⁄ - ∂r ), -

    -

    - where ρ is the mass density, c is the specific heat - capacity per unit mass, T is the temperature at location - r and time t and k is the heat conductivity. At - the locations r=ra and r=rb, the - temperature and heat flow rate are equal to the temperature and heat - flow rate of the heat ports. -

    -

    - If the heat capacity of the material is set to zero, then - steady-state heat flow is computed using -

    -

    - Q = 2 π k (Ta-Tb)⁄ ln(ra ⁄ - rb), + Model with basic thermodynamic properties.

    - where ra is the internal radius, - rb is the external radius, Ta is - the temperature at port a and Tb is the temperature - at port b. + This base properties model is identical to Modelica.Media.Water.ConstantPropertyLiquidWater, + except that the equation u = cv_const*(T - reference_T) + has been replaced by u=h because + cp_const=cv_const.

    -

    - Implementation -

    - To spatially discretize the heat equation, the construction is - divided into compartments with nSta ≥ 1 state variables. - The state variables are connected to each other through thermal - conductors. There is also a thermal conductor between the surfaces - and the outermost state variables. Thus, to obtain the surface - temperature, use port_a.T (or port_b.T) and - not the variable T[1]. + This model provides equation for the following thermodynamic + properties:

    - - --------- Errors -------- -line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 29 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Controls/SetPoints/Examples/SupplyReturnTemperatureReset.mo ---- --------- HTML Code -------- - -

    - Example that demonstrates the use of the hot water temperature reset - for a heating system. - The parameters of the block heaCur - are for a heating system with - 60°C supply water temperature and - 40°C return water temperature at - an outside temperature of - -10°C and a room temperature of - 20°C. The offset for the temperature reset is - 8 Kelvin, i.e., above - 12°C outside temperature, there is no heating load. - The figure below shows the computed supply and return water temperatures. -

    -

    - \"Supply -

    - - - --------- Corrected Code -------- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Variable + + Unit + + Description +
    + T + + K + + temperature +
    + p + + Pa + + absolute pressure +
    + d + + kg/m3 + + density +
    + h + + J/kg + + specific enthalpy +
    + u + + J/kg + + specific internal energy +
    + Xi[nXi] + + kg/kg + + independent mass fractions m_i/m +
    + R + + J/kg.K + + gas constant +
    + M + + kg/mol + + molar mass +

    - Example that demonstrates the use of the hot water temperature reset - for a heating system. The parameters of the block heaCur - are for a heating system with 60°C supply water temperature - and 40°C return water temperature at an outside temperature of - -10°C and a room temperature of 20°C. The offset for - the temperature reset is 8 Kelvin, i.e., above 12°C - outside temperature, there is no heating load. The figure below shows - the computed supply and return water temperatures. -

    -

    - \"Supply + Enthalpy of the water.

    - --------- Errors -------- -line 16 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/gFunction.mo ---- --------- HTML Code -------- - -

    - This function implements the g-function evaluation method introduced by - Cimmino and Bernier (see: Cimmino and Bernier (2014), and Cimmino (2018)) based - on the g-function function concept first introduced by Eskilson (1987). - The g-function gives the relation between the variation of the borehole - wall temperature at a time t and the heat extraction and injection rates - at all times preceding time t as -

    -

    - \"image\" -

    -

    - where Tb is the borehole wall temperature, - Tg is the undisturbed ground temperature, Q is the - heat injection rate into the ground through the borehole wall per unit borehole - length, ks is the soil thermal conductivity and g is - the g-function. -

    -

    - The g-function is constructed from the combination of the combination of - the finite line source (FLS) solution (see - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource), - the cylindrical heat source (CHS) solution (see - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource), - and the infinite line source (ILS) solution (see - - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.infiniteLineSource). - To obtain the g-function of a bore field, each borehole is divided into a - series of nSeg segments of equal length, each modeled as a line - source of finite length. The finite line source solution is superimposed in - space to obtain a system of equations that gives the relation between the heat - injection rate at each of the segments and the borehole wall temperature at each - of the segments. The system is solved to obtain the uniform borehole wall - temperature required at any time to maintain a constant total heat injection - rate (Qtot = 2πksHtot) into the bore - field. The uniform borehole wall temperature is then equal to the finite line - source based g-function. -

    -

    - Since this g-function is based on line sources of heat, rather than - cylinders, the g-function is corrected to consider the cylindrical - geometry. The correction factor is then the difference between the cylindrical - heat source solution and the infinite line source solution, as proposed by - Li et al. (2014) as -

    -

    - g(t) = gFLS + (gCHS - gILS) -

    -

    Implementation

    -

    - The calculation of the g-function is separated into two regions: the - short-time region and the long-time region. In the short-time region, - corresponding to times t < 1 hour, heat interaction between boreholes - and axial variations of heat injection rate are not considered. The - g-function is calculated using only one borehole and one segment. In the - long-time region, corresponding to times t > 1 hour, all boreholes - are represented as series of nSeg line segments and the - g-function is evaluated as described above. -

    -

    References

    -

    - Cimmino, M. and Bernier, M. 2014. A semi-analytical method to generate - g-functions for geothermal bore fields. International Journal of Heat and - Mass Transfer 70: 641-650. -

    -

    - Cimmino, M. 2018. Fast calculation of the g-functions of geothermal borehole - fields using similarities in the evaluation of the finite line source - solution. Journal of Building Performance Simulation. DOI: - 10.1080/19401493.2017.1423390. -

    -

    - Eskilson, P. 1987. Thermal analysis of heat extraction boreholes. Ph.D. - Thesis. Department of Mathematical Physics. University of Lund. Sweden. -

    -

    - Li, M., Li, P., Chan, V. and Lai, A.C.K. 2014. Full-scale temperature - response function (G-function) for heat transfer by borehole heat exchangers - (GHEs) from sub-hour to decades. Applied Energy 136: 197-205. -

    - - - --------- Corrected Code -------- -

    - This function implements the g-function evaluation method - introduced by Cimmino and Bernier (see: Cimmino and Bernier (2014), - and Cimmino (2018)) based on the g-function function concept - first introduced by Eskilson (1987). The g-function gives the - relation between the variation of the borehole wall temperature at a - time t and the heat extraction and injection rates at all - times preceding time t as -

    -

    - \"image\" -

    - where Tb is the borehole wall temperature, - Tg is the undisturbed ground temperature, Q - is the heat injection rate into the ground through the borehole wall - per unit borehole length, ks is the soil thermal - conductivity and g is the g-function. + This medium package models liquid water.

    - The g-function is constructed from the combination of the - combination of the finite line source (FLS) solution (see - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource), - the cylindrical heat source (CHS) solution (see - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource), - and the infinite line source (ILS) solution (see - AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.infiniteLineSource). - To obtain the g-function of a bore field, each borehole is - divided into a series of nSeg segments of equal length, - each modeled as a line source of finite length. The finite line - source solution is superimposed in space to obtain a system of - equations that gives the relation between the heat injection rate at - each of the segments and the borehole wall temperature at each of the - segments. The system is solved to obtain the uniform borehole wall - temperature required at any time to maintain a constant total heat - injection rate (Qtot = - 2πksHtot) into the bore field. The uniform - borehole wall temperature is then equal to the finite line source - based g-function. + The mass density is computed using a constant value of 995.586 + kg/s. For a medium model in which the density is a function of + temperature, use + AixLib.Media.Specialized.Water.TemperatureDependentDensity which + may have considerably higher computing time.

    - Since this g-function is based on line sources of heat, rather - than cylinders, the g-function is corrected to consider the - cylindrical geometry. The correction factor is then the difference - between the cylindrical heat source solution and the infinite line - source solution, as proposed by Li et al. (2014) as + For the specific heat capacities at constant pressure and at constant + volume, a constant value of 4184 J/(kg K), which corresponds + to 20°C is used. The figure below shows the relative error of + the specific heat capacity that is introduced by this simplification.

    - g(t) = gFLS + (gCHS - gILS) + +

    -

    - Implementation -

    - The calculation of the g-function is separated into two - regions: the short-time region and the long-time region. In the - short-time region, corresponding to times t < 1 hour, heat - interaction between boreholes and axial variations of heat injection - rate are not considered. The g-function is calculated using - only one borehole and one segment. In the long-time region, - corresponding to times t > 1 hour, all boreholes are - represented as series of nSeg line segments and the - g-function is evaluated as described above. + The enthalpy is computed using the convention that h=0 if + T=0 °C.

    - References + Limitations

    - Cimmino, M. and Bernier, M. 2014. A semi-analytical method to - generate g-functions for geothermal bore fields. International - Journal of Heat and Mass Transfer 70: 641-650. -

    -

    - Cimmino, M. 2018. Fast calculation of the g-functions of - geothermal borehole fields using similarities in the evaluation of - the finite line source solution. Journal of Building Performance - Simulation. DOI: 10.1080/19401493.2017.1423390. -

    -

    - Eskilson, P. 1987. Thermal analysis of heat extraction - boreholes. Ph.D. Thesis. Department of Mathematical Physics. - University of Lund. Sweden. -

    -

    - Li, M., Li, P., Chan, V. and Lai, A.C.K. 2014. Full-scale - temperature response function (G-function) for heat transfer by - borehole heat exchangers (GHEs) from sub-hour to decades. Applied - Energy 136: 197-205. + Density, specific heat capacity, thermal conductivity and viscosity + are constant. Water is modeled as an incompressible liquid. There are + no phase changes.

    -------- Errors -------- -line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 49 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 17 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 ----- AixLib/Media/Antifreeze/PropyleneGlycolWater.mo ---- +line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Utilities/Math/Functions/Examples/CubicHermite.mo ---- -------- HTML Code -------- -

    - This base properties model is identical to - - Modelica.Media.Water.ConstantPropertyLiquidWater, - except that the equation - u = cv_const*(T - reference_T) - has been replaced by u=h because - cp_const=cv_const. - Also, the model checks if the mass fraction of the mixture is within the - allowed limits. -

    - -

    - Density of propylene antifreeze-water mixture at specified mass fraction - and temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    - - - -

    - Dynamic viscosity of antifreeze-water mixture at specified mass fraction and - temperature, based on Melinder (2010). -

    -

    References

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    - - - -

    - Fusion temperature of antifreeze-water mixture at specified mass fraction and - temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. + This example demonstrates the use of the function for cubic hermite interpolation + and linear extrapolation. + The example use interpolation with two different settings: One settings + produces a monotone cubic hermite, whereas the other setting + does not enforce monotonicity. + The resulting plot should look as shown below, where for better visibility, the support points have been marked with black dots. + Notice that the red curve is monotone increasing.

    +

    \"image\"

    +-------- Corrected Code -------- +

    + This example demonstrates the use of the function for cubic hermite + interpolation and linear extrapolation. The example use interpolation + with two different settings: One settings produces a monotone cubic + hermite, whereas the other setting does not enforce monotonicity. The + resulting plot should look as shown below, where for better + visibility, the support points have been marked with black dots. + Notice that the red curve is monotone increasing. +

    +

    + \"image\" +

    + + +-------- Errors -------- +line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/PlugFlowAIT.mo ---- +-------- HTML Code -------- +

    - Evaluates a thermophysical property of a mixture, based on correlations proposed - by Melinder (2010). -

    -

    - The polynomial has the form + The example contains + experimental data from a real district heating network.

    -

    - f = a1 (x-xm)0(y-ym)0 - + a2 (x-xm)0(y-ym)1 - + ... + - any[1] (x-xm)0(y-ym)ny[1]-1 - + ... + - any[1])+1 (x-xm)1(y-ym)0 - + ... + - any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 - + ... +

    The pipes' temperatures are not initialized. Therefore, results of + outflow temperature before approximately the first 10000 seconds should not be + considered.

    -

    References

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. + Note that these three models are identical, except for the pipe model that is used:

    - - -

    - Specific heat capacity of antifreeze-water mixture at specified mass fraction - and temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    - - - -

    - Thermal conductivity of antifreeze-water mixture at specified mass fraction and - temperature, based on Melinder (2010). -

    -

    References

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids (Secondary - Refrigerants or Coolants, Heat Transfer Fluids) for Indirect Systems. Paris: - IIR/IIF. -

    - - - -

    - This medium package models propylene glycol - water mixtures. -

    -

    - The mass density, specific heat capacity, thermal conductivity and viscosity - are assumed constant and evaluated at a set temperature and mass fraction of - propylene glycol within the mixture. The dependence of the four properties - are shown on the figure below. -

    -

    - \"Relative -

    -

    - The accuracy of the thermophysical properties is dependent on the temperature - variations encountered during simulations. - The figure below shows the relative error of the the four properties over a - 10 °C range around the temperature used to evaluate the constant - properties. The maximum errors are 0.8 % for mass density, 1.5 % - for specific heat capacity, 3.2 % for thermal conductivity and 250 - % for dynamic viscosity. -

    -

    - \"Relative -

    -

    - The figure below shows the relative error of the the four properties over a - 20 °C range around the temperature used to evaluate the constant - proepties. The maximum errors are 1.6 % for mass density, 3.0 % - for specific heat capacity, 6.2 % for thermal conductivity and 950 - % for dynamic viscosity. -

    -

    - \"Relative -

    -

    - The enthalpy is computed using the convention that h=0 - if T=0 °C. -

    -

    Limitations

    +

    - Density, specific heat capacity, thermal conductivity and viscosity are constant. - The propylene glycol/water mixture is modeled as an incompressible liquid. - There are no phase changes. The medium is limited to temperatures below - 100 °C and mass fractions below 0.60. - As is the case for AixLib.Media.Water, - this medium package should not be used if - the simulation relies on the dynamic viscosity. + This comparison between different discretization levels and pipe models is made + to check the influence of the discretization and pipe model on computation time + and simulation accuracy.

    -

    Typical use and important parameters

    -

    - The temperature and mass fraction must be specified for the evaluation of the - constant thermophysical properties. A typical use of the package is (e.g. for - a temperature of 20 °C and a mass fraction of 0.40): +

    Test bench schematic

    +

    \"Schematic

    -

    - Medium = AixLib.Media.Antifreeze.PropyleneGlycolWater(property_T=293.15, X_a=0.40) +

    Calibration

    +

    To calculate the length specific thermal resistance R of the pipe, + the thermal resistance of the surrounding ground is added, which yields

    +

    + R=1/(0.208)+1/(2   lambda_g   Modelica.Constants.pi)   log(1/0.18),

    +

    where the thermal conductivity of the ground lambda_g = 2.4 W/(m K).

    -------- Corrected Code --------

    - This base properties model is identical to Modelica.Media.Water.ConstantPropertyLiquidWater, - except that the equation u = cv_const*(T - reference_T) - has been replaced by u=h because - cp_const=cv_const. Also, the model checks if the mass - fraction of the mixture is within the allowed limits. -

    -

    - Density of propylene antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    - -

    - Dynamic viscosity of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. + The example contains experimental data from a real district heating + network.

    -

    - Fusion temperature of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). + The pipes' temperatures are not initialized. Therefore, results of + outflow temperature before approximately the first 10000 seconds + should not be considered.

    -

    - References -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. + Note that these three models are identical, except for the pipe model + that is used:

    -

    - Evaluates a thermophysical property of a mixture, based on - correlations proposed by Melinder (2010). -

    -

    - The polynomial has the form -

    -

    - f = a1 (x-xm)0(y-ym)0 + - a2 (x-xm)0(y-ym)1 + ... + - any[1] (x-xm)0(y-ym)ny[1]-1 + ... + - any[1])+1 (x-xm)1(y-ym)0 + ... + - any[1]+ny[2] (x-xm)1(y-ym)ny[2]-1 + - ... -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    - -

    - Specific heat capacity of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). -

    -

    - References -

    -

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    -

    - Thermal conductivity of antifreeze-water mixture at specified mass - fraction and temperature, based on Melinder (2010). + This comparison between different discretization levels and pipe + models is made to check the influence of the discretization and pipe + model on computation time and simulation accuracy.

    - References + Test bench schematic

    - Melinder, Åke. 2010. Properties of Secondary Working Fluids - (Secondary Refrigerants or Coolants, Heat Transfer Fluids) for - Indirect Systems. Paris: IIR/IIF. -

    - -

    - This medium package models propylene glycol - water mixtures. -

    -

    - The mass density, specific heat capacity, thermal conductivity and - viscosity are assumed constant and evaluated at a set temperature and - mass fraction of propylene glycol within the mixture. The dependence - of the four properties are shown on the figure below. -

    -

    - - -

    -

    - The accuracy of the thermophysical properties is dependent on the - temperature variations encountered during simulations. The figure - below shows the relative error of the the four properties over a - 10 °C range around the temperature used to evaluate the - constant properties. The maximum errors are 0.8 % for mass - density, 1.5 % for specific heat capacity, 3.2 % for - thermal conductivity and 250 % for dynamic viscosity. -

    -

    - - -

    -

    - The figure below shows the relative error of the the four properties - over a 20 °C range around the temperature used to evaluate the - constant proepties. The maximum errors are 1.6 % for mass - density, 3.0 % for specific heat capacity, 6.2 % for - thermal conductivity and 950 % for dynamic viscosity. -

    -

    - - -

    -

    - The enthalpy is computed using the convention that h=0 if - T=0 °C. + \"Schematic

    - Limitations + Calibration

    - Density, specific heat capacity, thermal conductivity and viscosity - are constant. The propylene glycol/water mixture is modeled as an - incompressible liquid. There are no phase changes. The medium is - limited to temperatures below 100 °C and mass fractions below - 0.60. As is the case for AixLib.Media.Water, this medium - package should not be used if the simulation relies on the dynamic - viscosity. + To calculate the length specific thermal resistance R of + the pipe, the thermal resistance of the surrounding ground is added, + which yields

    -

    - Typical use and important parameters -

    -

    - The temperature and mass fraction must be specified for the - evaluation of the constant thermophysical properties. A typical use - of the package is (e.g. for a temperature of 20 °C and a mass - fraction of 0.40): +

    + R=1/(0.208)+1/(2   lambda_g   Modelica.Constants.pi)   + log(1/0.18),

    -

    - Medium = - AixLib.Media.Antifreeze.PropyleneGlycolWater(property_T=293.15, - X_a=0.40) +

    + where the thermal conductivity of the ground lambda_g = + 2.4 W/(m K).

    -------- Errors -------- -line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - -line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 35 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 48 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/FixedResistances/BaseClasses/PlugFlow.mo ---- +---- AixLib/BoundaryConditions/Validation/BESTEST/WD200.mo ---- -------- HTML Code --------

    +

    WD200: Low Elevation, Hot and Humid Case.

    +

    Weather data file : WD200.epw

    +

    Table 1: Site Data for Weather file WD200.epw

    +
    + + + + + + + + + + + + + + + +

    Latitude

    33.633° north

    Longitude

    84.433° west

    Altitude

    308 m

    Time Zone

    -5

    + +-------- Corrected Code -------- +

    +

    + WD200: Low Elevation, Hot and Humid Case. +

    +

    + Weather data file : WD200.epw +

    +

    + Table 1: Site Data for Weather file WD200.epw +

    + + + + + + + + + + + + + + + + + +
    +

    + Latitude +

    +
    +

    + 33.633° north +

    +
    +

    + Longitude +

    +
    +

    + 84.433° west +

    +
    +

    + Altitude +

    +
    +

    + 308 m +

    +
    +

    + Time Zone +

    +
    +

    + -5 +

    +
    + +-------- Errors -------- +line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 + + +---- AixLib/Fluid/FMI/Adaptors/HVAC.mo ---- +-------- HTML Code -------- + +

    + The (time varying) vector Real output signal of this block can be defined in its + parameter menu via variable y. The purpose is to support the + easy definition of vector-valued Real expressions in a block diagram. +

    +

    - Model that computes the temperature propagation of - a fluid flow through a pipe, idealized as a plug flow. + Adaptor that can be used to connect an HVAC system (with acausal ports) + to input/output signals, which then can be exposed in an FMI interface.

    -

    Main equation

    - The transport delay is computed using the one-dimensional wave equation - without source or sink terms, + The adaptor has a vector of fluid ports called ports. + The supply and return air ducts need to be connected to these ports. + Also, if a thermal zone has interzonal air exchange or air infiltration, + these flow paths also need be connected to ports. +

    +

    + This model outputs at the port fluPor the mass flow rate for + each flow that is connected to ports, together with its + temperature, water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + If a medium has no moisture, e.g., if Medium.nXi=0, or + if it has no trace substances, e.g., if Medium.nC=0, then + the output signal for these properties are removed. + These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + Thus, a thermal zone model that uses these signals to compute the + heat added by the HVAC system need to implement an equation such as +

    - ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0, + Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon),

    -

    where z(x,t) is the spatial distribution as a function of time of any - property z of the fluid. - For the temperature propagation, z will be replaced by T. +

    + where + Qsen is the sensible heat flow rate added to the thermal zone, + sup is the supply air mass flow rate from + the port fluPor (which is negative if it is an exhaust), + cp is the specific heat capacity at constant pressure, + Tsup is the supply air temperature and + Tair,zon is the zone air temperature. + Note that without the max(·, ·) function, the energy + balance would be wrong.

    -

    Assumptions

    - This model is based on the following assumptions: + The output signals of this model are the zone air temperature, + the water vapor mass fraction per total mass of the air (unless Medium.nXi=0) + and trace substances (unless Medium.nC=0). + These output connectors can be used to connect to a controller. + These values are obtained from the fluid stream(s) that flow into this component + at the port fluPor, e.g., from the connector + fluPor.backward. + Note that there are nPorts of these signals. + For a completely mixed room, they will all have the same value, but + for a room with non-uniform temperatures, they can have different values.

    +

    Assumption and limitations

    +

    + The mass flow rates at ports sum to zero, hence this + model conserves mass. +

    +

    + This model does not impose any pressure, other than setting the pressure + of all fluid connections to ports to be equal. + The reason is that setting a pressure can lead to non-physical system models, + for example if a mass flow rate is imposed and the HVAC system is connected + to a model that sets a pressure boundary condition such as + + AixLib.Fluid.Sources.Outside. + Also, setting a pressure would make it impossible to use multiple instances + of this model (one for each thermal zone) and build in Modelica an airflow network + model with pressure driven mass flow rates. +

    +

    + The model has no pressure drop. Hence, the pressure drop + of an air diffuser or of an exhaust grill need to be modelled + in models that are connected to ports. +

    +

    Typical use and important parameters

    +

    + See + + AixLib.Fluid.FMI.ExportContainers.HVACZone + for a model that uses this model. +

    + -------- Corrected Code -------- -

    - Model that computes the temperature propagation of a fluid flow - through a pipe, idealized as a plug flow. + The (time varying) vector Real output signal of this + block can be defined in its parameter menu via variable + y. The purpose is to support the easy definition of + vector-valued Real expressions in a block diagram. +

    +

    + Adaptor that can be used to connect an HVAC system (with acausal + ports) to input/output signals, which then can be exposed in an FMI + interface. +

    +

    + The adaptor has a vector of fluid ports called ports. + The supply and return air ducts need to be connected to these ports. + Also, if a thermal zone has interzonal air exchange or air + infiltration, these flow paths also need be connected to + ports. +

    +

    + This model outputs at the port fluPor the mass flow rate + for each flow that is connected to ports, together with + its temperature, water vapor mass fraction per total mass of the air + (not per kg dry air), and trace substances. These quantities are + always as if the flow enters the room, even if the flow is zero or + negative. If a medium has no moisture, e.g., if + Medium.nXi=0, or if it has no trace substances, e.g., if + Medium.nC=0, then the output signal for these properties + are removed. These quantities are always as if the flow enters the + room, even if the flow is zero or negative. Thus, a thermal zone + model that uses these signals to compute the heat added by the HVAC + system need to implement an equation such as +

    +

    + Qsen = max(0, ṁsup)   cp   + (Tsup - Tair,zon), +

    +

    + where Qsen is the sensible heat flow rate added to + the thermal zone, sup is the supply air mass flow + rate from the port fluPor (which is negative if it is an + exhaust), cp is the specific heat capacity at + constant pressure, Tsup is the supply air + temperature and Tair,zon is the zone air + temperature. Note that without the max(·, ·) function, the + energy balance would be wrong. +

    +

    + The output signals of this model are the zone air temperature, the + water vapor mass fraction per total mass of the air (unless + Medium.nXi=0) and trace substances (unless + Medium.nC=0). These output connectors can be used to + connect to a controller. These values are obtained from the fluid + stream(s) that flow into this component at the port + fluPor, e.g., from the connector + fluPor.backward. Note that there are nPorts + of these signals. For a completely mixed room, they will all have the + same value, but for a room with non-uniform temperatures, they can + have different values.

    - Main equation + Assumption and limitations

    - The transport delay is computed using the one-dimensional wave - equation without source or sink terms, + The mass flow rates at ports sum to zero, hence this + model conserves mass.

    -

    - ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0, +

    + This model does not impose any pressure, other than setting the + pressure of all fluid connections to ports to be equal. + The reason is that setting a pressure can lead to non-physical system + models, for example if a mass flow rate is imposed and the HVAC + system is connected to a model that sets a pressure boundary + condition such as AixLib.Fluid.Sources.Outside. + Also, setting a pressure would make it impossible to use multiple + instances of this model (one for each thermal zone) and build in + Modelica an airflow network model with pressure driven mass flow + rates.

    - where z(x,t) is the spatial distribution as a function of time - of any property z of the fluid. For the temperature - propagation, z will be replaced by T. + The model has no pressure drop. Hence, the pressure drop of an air + diffuser or of an exhaust grill need to be modelled in models that + are connected to ports.

    - Assumptions + Typical use and important parameters

    - This model is based on the following assumptions: + See AixLib.Fluid.FMI.ExportContainers.HVACZone + for a model that uses this model.

    -------- Errors -------- -line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 26 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Types.mo ---- +---- AixLib/Fluid/Actuators/Valves/ThreeWayTable.mo ---- -------- HTML Code -------- -

    - Enumeration to define the choice of valve flow coefficient - (to be selected via choices menu): + Three way valve with table-specified opening characteristics. + A separate characteristic for each flow path is used.

    - -
    - - - - - - - - - - - - - - - -
    EnumerationDescription
    OpPointflow coefficient defined by ratio m_flow_nominal/sqrt(dp_nominal)
    KvKv (metric) flow coefficient
    CvCv (US) flow coefficient
    AvAv (metric) flow coefficient
    -

    - The details of the coefficients are explained in the - - Users Guide. + Each flow path uses an instance of the model + + AixLib.Fluid.Actuators.Valves.TwoWayTable. + Therefore, this model needs to be parameterized the same way as + + AixLib.Fluid.Actuators.Valves.TwoWayTable. + Specifically, + the mass flow rate for the fully open valve is determined based + on the value of the parameter CvData. + For the different valve positions y ∈ [0, 1], this nominal flow rate is + scaled by the values of the parameter + flowCharacteristics1 and flowCharacteristics3, respectively. + These parameters declare a table of the form

    - - + + + + + + + +
    y 0 ... 1
    φ l ... 1

    - Enumeration that defines the heat exchanger construction. + where l = Kv(y=0)/Kv(y=1) > 0 is the valve leakage. + The first row is the valve opening, and the second row is the + mass flow rate, relative to the mass flow rate of the fully open + valve, under the assumption of a constant pressure difference across the + valve. + A suggested value for the valve leakage is l=0.0001. + If l = 0, then this model will replace it with + l = 10-8 for numerical reasons. + For example, if a valve has Kv=0.5 [m3/h/bar1/2] and + a linear opening characteristics and + a valve leakage of l=0.0001, then one would set

    +
    +  CvData=AixLib.Fluid.Types.CvTypes.Kv
    +  Kv = 0.5
    +  flowCharacteristics1(y={0,1}, phi={0.0001,1})
    +  flowCharacteristics3(y={0,1}, phi={0.0001,1})
    + 

    - The following heat exchanger configurations are available in this enumeration: + Note, however, that + + AixLib.Fluid.Actuators.Valves.ThreeWayLinear provides a more + efficient implementation for this simple case.

    - - - - - - - - -
    EnumerationDescription
    ParallelFlowParallel flow
    CounterFlowCounter flow
    CrossFlowUnmixedCross flow, both streams unmixed
    CrossFlowStream1MixedStream2UnmixedCross flow, stream 1 mixed, stream 2 unmixed
    CrossFlowStream1UnmixedStream2MixedCross flow, stream 1 unmixed, stream 2 mixed
    ConstantTemperaturePhaseChangeConstant temperature phase change in one stream

    - Note that for a given heat exchanger, the - HeatExchangerConfiguration is fixed. However, if the capacity - flow rates change, then the - - AixLib.Fluid.Types.HeatExchangerFlowRegime may change. For example, - a counter flow heat exchanger has HeatExchangerConfiguration=CounterFlow, - but the - AixLib.Fluid.Types.HeatExchangerFlowRegime can change to parallel flow if one of the two capacity flow rates reverts - its direction. -

    - + The parameters flowCharacteristics1 and flowCharacteristics3 must meet the following + requirements, otherwise the model stops with an error: +

    - -

    - Enumeration to define the heat exchanger flow regime. -

    - This enumeration defines for the current capacity flow rate the kind of - heat transfer relation that will be used to compute the relation between - effectiveness and Number of Transfer Units. + This model is based on the partial valve model + + AixLib.Fluid.Actuators.BaseClasses.PartialTwoWayValve. + Check this model for more information, such + as the regularization near the origin.

    - The following heat exchanger flow regimes are available in this enumeration: + For an example that specifies an opening characteristics, see + + AixLib.Fluid.Actuators.Valves.Examples.TwoWayValveTable.

    - - - - - - - - -
    EnumerationDescription
    ParallelFlowParallel flow
    CounterFlowCounter flow
    CrossFlowUnmixedCross flow, both streams unmixed
    CrossFlowCMinMixedCMaxUnmixedCross flow, CMin mixed, CMax unmixed
    CrossFlowCMinUnmixedCMaxMixedCross flow, CMin unmixed, CMax mixed
    ConstantTemperaturePhaseChangeConstant temperature phase change in one stream
    + - -

    - This type allows defining which type of input should be used for movers. - This can either be -

    -
      -
    1. - a constant set point declared by a parameter, + #1542.
    2. - a series of possible set points that can be switched using an integer input, or + June 10, 2021, by Michael Wetter:
      + Changed implementation of the filter and changed the parameter order to a constant + as most users need not change this value.
      + This is for + #1498.
    3. - a continuously variable set point. + November 28, 2019, by Michael Wetter:
      + Revised implementation.
    4. -
    - - -

    - This package contains type definitions. -

    - -------- Corrected Code --------

    - Enumeration to define the choice of valve flow coefficient (to be - selected via choices menu): + Three way valve with table-specified opening characteristics. A + separate characteristic for each flow path is used.

    - - - - - +

    + Each flow path uses an instance of the model AixLib.Fluid.Actuators.Valves.TwoWayTable. + Therefore, this model needs to be parameterized the same way as + AixLib.Fluid.Actuators.Valves.TwoWayTable. + Specifically, the mass flow rate for the fully open valve is + determined based on the value of the parameter CvData. + For the different valve positions y ∈ [0, 1], this nominal + flow rate is scaled by the values of the parameter + flowCharacteristics1 and + flowCharacteristics3, respectively. These parameters + declare a table of the form +

    +
    - Enumeration - - Description -
    - - - -
    - OpPoint + y - flow coefficient defined by ratio m_flow_nominal/sqrt(dp_nominal) + 0
    - Kv + ... - Kv (metric) flow coefficient + 1
    - Cv + φ - Cv (US) flow coefficient + l
    - Av + ... - Av (metric) flow coefficient + 1

    - The details of the coefficients are explained in the - Users Guide. + where l = Kv(y=0)/Kv(y=1) > 0 is the + valve leakage. The first row is the valve opening, and the second row + is the mass flow rate, relative to the mass flow rate of the fully + open valve, under the assumption of a constant pressure difference + across the valve. A suggested value for the valve leakage is + l=0.0001. If l = 0, then this model will replace it + with l = 10-8 for numerical reasons. For example, + if a valve has Kv=0.5 + [m3/h/bar1/2] and a linear opening + characteristics and a valve leakage of l=0.0001, then one + would set +

    +
    +  CvData=AixLib.Fluid.Types.CvTypes.Kv
    +  Kv = 0.5
    +  flowCharacteristics1(y={0,1}, phi={0.0001,1})
    +  flowCharacteristics3(y={0,1}, phi={0.0001,1})
    + 
    +

    + Note, however, that AixLib.Fluid.Actuators.Valves.ThreeWayLinear + provides a more efficient implementation for this simple case. +

    +

    + The parameters flowCharacteristics1 and + flowCharacteristics3 must meet the following + requirements, otherwise the model stops with an error: +

    + +

    + This model is based on the partial valve model AixLib.Fluid.Actuators.BaseClasses.PartialTwoWayValve. + Check this model for more information, such as the regularization + near the origin. +

    +

    + For an example that specifies an opening characteristics, see + + AixLib.Fluid.Actuators.Valves.Examples.TwoWayValveTable. +

    + + +-------- Errors -------- +line 21 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 + + +---- AixLib/Fluid/Sources/Outside_CpData.mo ---- +-------- HTML Code -------- + +

    + This model describes boundary conditions for + pressure, enthalpy, and species concentration that can be obtained + from weather data. The model is identical to + + AixLib.Fluid.Sources.Outside, + except that it adds the wind pressure to the + pressure at the fluid ports ports. +

    +

    + The pressure p at the fluid ports is computed as: +

    +

    + p = pw + Cp,act Cs v2 ρ ⁄ 2, +

    +

    + where pw is the atmospheric pressure from the weather bus, + v is the wind speed from the weather bus, and + ρ is the fluid density. +

    +

    + The wind pressure coefficient Cp,act is a function of the surface wind incidence + angle and is defined relative to the surface azimuth (normal to the surface is 0). + The wind incidence angle incAng is computed from the wind direction obtained from the weather file + with the surface azimuth azi as the base of the angle. + The relation between the wind pressure coefficient Cp,act and the incidence angle incAng + is defined by a cubic hermite interpolation of the users table input. + Typical table values can be obtained from the "AIVC guide to energy efficient ventilation", + appendix 2 (1996). The default table is appendix 2, table 2.2, face 1. +

    +

    + The wind speed modifier Cs can be used to incorporate the effect of the surroundings on the local wind speed. +

    +

    Definition of angles

    +

    + The angles incAngSurNor for the wind incidence angle relative to the surface normal + are measured counter-clock wise. + The figure below shows an example entry, which is also used in the model + + AixLib.Fluid.Sources.Examples.Outside_CpData_Specification. +

    +

    \"image\"

    + +

    + The wind incidence angle and surface azimuths are defined as follows: + The wind indicience angle is obtained directly from the weather data bus weaBus.winDir. + This variable contains the data from the weather data file that was read, such as a TMY3 file. + In accordance to TMY3, the data is as shown in the table below. +

    +
    + + + + +
    Value of winDir if the wind blows from different directions.
    Wind from North:
    0
    Wind from West:
    3π/2
    270°
    Wind from East:
    π/2
    90°
    Wind from South:
    π
    180°
    +

    + For the surface azimuth azi, the specification from + AixLib.Types.Azimuth is + used, which is as shown in the table below. +

    + + + + + + +
    Value of azi if the exterior wall faces in the different directions.
    Wall facing north:
    π
    180°
    Wall facing West:
    π/2
    90°
    Wall facing east:
    3π/2
    270°
    Wall facing South:
    0;
    + +

    Related model

    +

    + This model differs from + AixLib.Fluid.Sources.Outside_CpLowRise by the calculation of the wind pressure coefficient + Cp,act. + The wind pressure coefficient is defined by a user-defined table instead of a generalized equation + such that it can be used for all building sizes and situations, for shielded buildings, + and for buildings with non-rectangular shapes. +

    +

    + References +

    + + + + +-------- Corrected Code -------- +

    + This model describes boundary conditions for pressure, enthalpy, and + species concentration that can be obtained from weather data. The + model is identical to AixLib.Fluid.Sources.Outside, + except that it adds the wind pressure to the pressure at the fluid + ports ports.

    - Enumeration that defines the heat exchanger construction. + The pressure p at the fluid ports is computed as: +

    +

    + p = pw + Cp,act Cs v2 ρ ⁄ + 2,

    - The following heat exchanger configurations are available in this - enumeration: + where pw is the atmospheric pressure from the + weather bus, v is the wind speed from the weather bus, and + ρ is the fluid density.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Enumeration - - Description -
    - ParallelFlow - - Parallel flow -
    - CounterFlow - - Counter flow -
    - CrossFlowUnmixed - - Cross flow, both streams unmixed -
    - CrossFlowStream1MixedStream2Unmixed - - Cross flow, stream 1 mixed, stream 2 unmixed -
    - CrossFlowStream1UnmixedStream2Mixed - - Cross flow, stream 1 unmixed, stream 2 mixed -
    - ConstantTemperaturePhaseChange - - Constant temperature phase change in one stream -

    - Note that for a given heat exchanger, the - HeatExchangerConfiguration is fixed. However, if the - capacity flow rates change, then the AixLib.Fluid.Types.HeatExchangerFlowRegime - may change. For example, a counter flow heat exchanger has - HeatExchangerConfiguration=CounterFlow, but the AixLib.Fluid.Types.HeatExchangerFlowRegime - can change to parallel flow if one of the two capacity flow rates - reverts its direction. + The wind pressure coefficient Cp,act is a function + of the surface wind incidence angle and is defined relative to the + surface azimuth (normal to the surface is 0). The wind + incidence angle incAng is computed from the wind + direction obtained from the weather file with the surface azimuth + azi as the base of the angle. The relation between the + wind pressure coefficient Cp,act and the incidence + angle incAng is defined by a cubic hermite interpolation + of the users table input. Typical table values can be obtained from + the \"AIVC guide to energy efficient ventilation\", appendix 2 (1996). + The default table is appendix 2, table 2.2, face 1.

    -

    - Enumeration to define the heat exchanger flow regime. + The wind speed modifier Cs can be used to + incorporate the effect of the surroundings on the local wind speed.

    +

    + Definition of angles +

    - This enumeration defines for the current capacity flow rate the kind - of heat transfer relation that will be used to compute the relation - between effectiveness and Number of Transfer Units. + The angles incAngSurNor for the wind incidence angle + relative to the surface normal are measured counter-clock wise. The + figure below shows an example entry, which is also used in the model + + AixLib.Fluid.Sources.Examples.Outside_CpData_Specification. +

    +

    + \"image\"

    - The following heat exchanger flow regimes are available in this - enumeration: + The wind incidence angle and surface azimuths are defined as follows: + The wind indicience angle is obtained directly from the weather data + bus weaBus.winDir. This variable contains the data from + the weather data file that was read, such as a TMY3 file. In + accordance to TMY3, the data is as shown in the table below.

    - - - - - - - - - +
    - Enumeration - - Description -
    - ParallelFlow - - Parallel flow -
    + - - + + - - + - - + + +
    + Value of winDir if the wind blows from different + directions. +
    - CounterFlow - - Counter flow + + Wind from North:
    + 0
    + 0°
    - CrossFlowUnmixed + + Wind from West:
    + 3π/2
    + 270°
    - Cross flow, both streams unmixed + + Wind from East:
    + π/2
    + 90°
    - CrossFlowCMinMixedCMaxUnmixed - - Cross flow, CMin mixed, CMax unmixed + + Wind from South:
    + π
    + 180°
    +

    + For the surface azimuth azi, the specification from + AixLib.Types.Azimuth is + used, which is as shown in the table below. +

    + + - - + + - - + + + + + +
    + Value of azi if the exterior wall faces in the + different directions. +
    - CrossFlowCMinUnmixedCMaxMixed - - Cross flow, CMin unmixed, CMax mixed + + Wall facing north:
    + π
    + 180°
    - ConstantTemperaturePhaseChange + + Wall facing West:
    + π/2
    + 90°
    - Constant temperature phase change in one stream + + Wall facing east:
    + 3π/2
    + 270° +
    + Wall facing South:
    + 0;
    + 0°
    - +

    + Related model +

    - This type allows defining which type of input should be used for - movers. This can either be + This model differs from AixLib.Fluid.Sources.Outside_CpLowRise + by the calculation of the wind pressure coefficient + Cp,act. The wind pressure coefficient is defined by + a user-defined table instead of a generalized equation such that it + can be used for all building sizes and situations, for shielded + buildings, and for buildings with non-rectangular shapes.

    -
      -
    1. a constant set point declared by a parameter, -
    2. -
    3. a series of possible set points that can be switched using an - integer input, or -
    4. -
    5. a continuously variable set point. +

      + References +

      +
    + -

    - This package contains type definitions. -

    -------- Errors -------- -line 8 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - - -line 8 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 - - -line 13 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 51 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 63 column 2 - Warning: The summary attribute on the
    element is obsolete in HTML5 +line 14 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 43 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatExchangers/BaseClasses/HANaturalCylinder.mo ---- +---- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/PlugFlowULg.mo ---- -------- HTML Code -------- -

    - This model calculates the convection coefficient h for natural convection - from a cylinder submerged in fluid. h is calcualted using Eq 9.34 from - Incropera and DeWitt (1996). - Output of the block is the hA value. -

    -

    - The Nusselt number is computed as -

    -

    - NuD = (0.6 + (0.387 RaD(1/6))/(1+(0.559 Pr) - (9/16))(8/27))2); -

    -

    - where NuD is the Nusselt number, RaD is the - Rayleigh number and - Pr is the Prandtl number.
    - This correclation is accurate for RaD less than 1012. -

    -

    - h is then calculated from the Nusselt number. The equation is -

    -

    - h = NuD k/D -

    -

    - where k is the thermal conductivity of the fluid and D is the diameter - of the submerged cylinder. -

    -

    References

    -

    - Fundamentals of Heat and Mass Transfer (Fourth Edition), Frank Incropera and David - DeWitt, John Wiley and Sons, 1996 -

    - -
    - - - - - - - - - - - - - - - -

    Latitude

    39.833° north

    Longitude

    104.65° west

    Altitude

    1650 m

    Time Zone

    -7

    -

    This model is a template for all the other test cases. - It allows to extrapolate all the weather data from the Reader TMY3 for a specific location, incliation and azimuth. - The model - AixLib.BoundaryConditions.Validation.IsotropicAndPerezDiffuseRadiation - outputs radiation data using the available Isotropic and Perez methodlogies. - The sky temperature is calculated using both the Horizontal radiation model, - from data reader weaBusHorRad and the dew point temperature plus sky cover model from the datareader weaBusSkyCovDewTem.

    +

    + Example that demonstrates the use of the signal ranker model. + The figure below shows the input and output signals of the block. + Note that + sigRan.y[1] ≥ sigRan.y[2] ≥ sigRan.y[3]. +

    +

    + \"Input
    + \"Output +

    -------- Corrected Code -------- -

    - WD100: Base Case -

    -

    - Weather data file : WD100.epw -

    - Table 1: Site Data for Weather file WD100.epw + Example that demonstrates the use of the signal ranker model. The + figure below shows the input and output signals of the block. Note + that sigRan.y[1] ≥ sigRan.y[2] ≥ sigRan.y[3].

    - - - - - - - - - - - - - - - - - -
    -

    - Latitude -

    -
    -

    - 39.833° north -

    -
    -

    - Longitude -

    -
    -

    - 104.65° west -

    -
    -

    - Altitude -

    -
    -

    - 1650 m -

    -
    -

    - Time Zone -

    -
    -

    - -7 -

    -
    -

    - This model is a template for all the other test cases. It allows to - extrapolate all the weather data from the Reader TMY3 for a specific - location, incliation and azimuth. The model - AixLib.BoundaryConditions.Validation.IsotropicAndPerezDiffuseRadiation - outputs radiation data using the available Isotropic and Perez - methodlogies. The sky temperature is calculated using both the - Horizontal radiation model, from data reader weaBusHorRad and the dew - point temperature plus sky cover model from the datareader - weaBusSkyCovDewTem. +

    + \"Input
    + \"Output

    -------- Errors -------- -line 5 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/ThermalZones/ReducedOrder/RC/TwoElements.mo ---- +---- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/MSLAIT2Nodes.mo ---- -------- HTML Code -------- +

    The example contains + + experimental data from a real district heating network. + This data is used to validate this library's + plug flow pipe model + in + AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT. +

    +

    + Note that these three models are identical, except for the pipe model that is used: +

    +

    + This comparison between different discretization levels and pipe models is made + to check the influence of the discretization and pipe model on computation time + and simulation accuracy. +

    +

    The pipes' temperatures are not initialized, thus results of outflow temperature + before approximately the first 10000 seconds should not be considered. +

    +

    Test bench schematic

    +

    \"Schematic

    +

    Calibration

    +

    + To calculate the length specific thermal resistance R of the pipe, + the thermal resistance of the surrounding ground is added. +

    +

    + R=1/(0.208)+1/(2   lambdag Modelica.Constants.pi)   log(1/0.18) +

    +

    + Where the thermal conductivity of the ground lambda_g = 2.4 W/(m K). +

    + + -

    This model distinguishes between internal - thermal masses and exterior walls. While exterior walls contribute to heat - transfer to the ambient, adiabatic conditions apply to internal masses. - Parameters for the internal wall element are the length of the RC-chain - nInt, the vector of the capacities - CInt[nInt] and the vector of the resistances RInt[nInt]. - This approach allows considering the dynamic behaviour induced by internal - heat storage. -

    -

    - The image below shows the RC-network of this model. -

    -

    - \"image\"/ -

    - -------- Corrected Code -------- +

    + The example contains + experimental data from a real district heating network. This data + is used to validate this library's plug flow + pipe model in + AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT. +

    +

    + Note that these three models are identical, except for the pipe model + that is used: +

    + +

    + This comparison between different discretization levels and pipe + models is made to check the influence of the discretization and pipe + model on computation time and simulation accuracy. +

    +

    + The pipes' temperatures are not initialized, thus results of outflow + temperature before approximately the first 10000 seconds should not + be considered. +

    +

    + Test bench schematic +

    +

    + \"Schematic +

    +

    + Calibration +

    +

    + To calculate the length specific thermal resistance R of + the pipe, the thermal resistance of the surrounding ground is added. +

    +

    + R=1/(0.208)+1/(2   lambdag Modelica.Constants.pi) +   log(1/0.18) +

    +

    + Where the thermal conductivity of the ground lambda_g = + 2.4 W/(m K). +

    -

    - This model distinguishes between internal thermal masses and exterior - walls. While exterior walls contribute to heat transfer to the - ambient, adiabatic conditions apply to internal masses. Parameters - for the internal wall element are the length of the RC-chain - nInt, the vector of the capacities - CInt[nInt] and the vector of the resistances - RInt[nInt]. This approach allows considering the dynamic - behaviour induced by internal heat storage. -

    -

    - The image below shows the RC-network of this model. -

    -

    - \"image\" -

    -------- Errors -------- -line 14 column 4 - Warning:

    attribute "align" not allowed for HTML5 +line 51 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Humidifiers/SprayAirWasher_X.mo ---- +---- AixLib/Fluid/FixedResistances/BaseClasses/PlugFlowTransportDelay.mo ---- -------- HTML Code --------

    - Model for a spray air washer with a prescribed outlet water vapor mass fraction - in kg/kg total air. -

    -

    - This model forces the outlet water mass fraction at port_b to be - no lower than the - input signal X_wSet, subject to optional limits on the - maximum water vapor mass flow rate that is added, as - described by the parameter mWatMax_flow. - By default, the model has unlimited capacity. -

    -

    - The output signal mWat_flow ≥ 0 is the moisture added - to the medium if the flow rate is from port_a to port_b. - If the flow is reversed, then mWat_flow = 0. - The outlet specific enthalpy at port_b is increased by - the enthalpy of liquid water at 10°C times the mass of water that was added. - Therefore, the temperature of the leaving fluid is below the inlet temperature. -

    -

    - The outlet conditions at port_a are not affected by this model, - other than for a possible pressure difference due to flow friction. -

    -

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, - the component models the dynamic response using a first order differential equation. - The time constant of the component is equal to the parameter tau. - This time constant is adjusted based on the mass flow rate using -

    -

    - τeff = τ |ṁ| ⁄ ṁnom + Calculates time delay at both sides of the pipe as the difference between the + current simulation time and the inlet time of the fluid at both ends of the pipe.

    -

    - where - τeff is the effective time constant for the given mass flow rate - and - τ is the time constant at the nominal mass flow rate - nom. - This type of dynamics is equal to the dynamics that a completely mixed - control volume would have. +

    Main equation

    +

    + ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0,

    - Optionally, this model can have a flow resistance. - Set dp_nominal = 0 to disable the flow friction calculation. + where z(x,t) is the spatial distribution as a function of time of any + property z of the fluid. For the inlet time propagation, z will + be replaced by the inlet time of the fluid tin.

    +

    Implementation

    - For a model that uses a control signal u ∈ [0, 1] and multiplies - this with the nominal water mass flow rate, use - - AixLib.Fluid.Humidifiers.Humidifier_u - + The inlet time is approached as a fluid property and its propagation follows + the one-dimensional wave equation, implemented using the spatialDistribution + function. This components requires the mass flow through the pipe and the pipe + dimensions in order to derive information about the fluid propagation.

    -

    Limitations

    - This model only adds water vapor for the flow from - port_a to port_b. - The water vapor of the reverse flow is not affected by this model. + The component calculates the delay time at the inlet and the outlet port of the pipe. + For the forward flow, the time delay is exposed at the output tau, + and for the backward flow, the time delay is exposed at the output tauRev.

    +

    Assumption

    - This model does not affect the enthalpy of the air. Therefore, - if water is added, the temperature will decrease, e.g., the humidification - is adiabatic. + No axial mixing takes place in the pipe.

    -------- Corrected Code --------

    - Model for a spray air washer with a prescribed outlet water vapor - mass fraction in kg/kg total air. -

    -

    - This model forces the outlet water mass fraction at - port_b to be no lower than the input signal - X_wSet, subject to optional limits on the maximum water - vapor mass flow rate that is added, as described by the parameter - mWatMax_flow. By default, the model has unlimited - capacity. -

    -

    - The output signal mWat_flow ≥ 0 is the moisture added to - the medium if the flow rate is from port_a to - port_b. If the flow is reversed, then mWat_flow = - 0. The outlet specific enthalpy at port_b is - increased by the enthalpy of liquid water at 10°C times the - mass of water that was added. Therefore, the temperature of the - leaving fluid is below the inlet temperature. -

    -

    - The outlet conditions at port_a are not affected by this - model, other than for a possible pressure difference due to flow - friction. -

    -

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, the component - models the dynamic response using a first order differential - equation. The time constant of the component is equal to the - parameter tau. This time constant is adjusted based on - the mass flow rate using + Calculates time delay at both sides of the pipe as the difference + between the current simulation time and the inlet time of the fluid + at both ends of the pipe.

    -

    - τeff = τ |ṁ| ⁄ ṁnom +

    + Main equation +

    +

    + ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0,

    - where τeff is the effective time constant for the - given mass flow rate and τ is the time constant at - the nominal mass flow rate nom. This type of - dynamics is equal to the dynamics that a completely mixed control - volume would have. + where z(x,t) is the spatial distribution as a function of time + of any property z of the fluid. For the inlet time + propagation, z will be replaced by the inlet time of the fluid + tin.

    +

    + Implementation +

    - Optionally, this model can have a flow resistance. Set - dp_nominal = 0 to disable the flow friction calculation. + The inlet time is approached as a fluid property and its propagation + follows the one-dimensional wave equation, implemented using the + spatialDistribution function. This components requires the mass flow + through the pipe and the pipe dimensions in order to derive + information about the fluid propagation.

    - For a model that uses a control signal u ∈ [0, 1] and - multiplies this with the nominal water mass flow rate, use AixLib.Fluid.Humidifiers.Humidifier_u + The component calculates the delay time at the inlet and the outlet + port of the pipe. For the forward flow, the time delay is exposed at + the output tau, and for the backward flow, the time + delay is exposed at the output tauRev.

    - Limitations + Assumption

    - This model only adds water vapor for the flow from - port_a to port_b. The water vapor of the - reverse flow is not affected by this model. -

    -

    - This model does not affect the enthalpy of the air. Therefore, if - water is added, the temperature will decrease, e.g., the - humidification is adiabatic. + No axial mixing takes place in the pipe.

    -------- Errors -------- -line 33 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 7 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Humidifiers/Humidifier_u.mo ---- +---- AixLib/ThermalZones/ReducedOrder/RC/BaseClasses/InteriorWall.mo ---- +-------- HTML Code -------- + +

    InteriorWall represents heat storage within walls. It links a + variable number n of thermal resistances and capacities to a + series connection. n thus defines the spatial discretization of + thermal effects within the wall. All effects are considered as one-dimensional + normal to the wall's surface. This model is thought for interior wall + elements that only serve as heat storage elements. The RC-chain is defined via + a vector of capacities CInt[n] and a vector of resistances + RInt[n]. + Resistances and capacities are connected alternately, starting with the first + resistance RInt[1], from heat port_a into the wall. +

    +

    \"image\"/

    + + + +-------- Corrected Code -------- +

    + InteriorWall represents heat storage within walls. It + links a variable number n of thermal resistances and + capacities to a series connection. n thus defines the + spatial discretization of thermal effects within the wall. All + effects are considered as one-dimensional normal to the wall's + surface. This model is thought for interior wall elements that only + serve as heat storage elements. The RC-chain is defined via a vector + of capacities CInt[n] and a vector of resistances + RInt[n]. Resistances and capacities are connected + alternately, starting with the first resistance RInt[1], + from heat port_a into the wall. +

    +

    + \"image\" +

    + + +-------- Errors -------- +line 13 column 4 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/Movers/BaseClasses/Characteristics/pressure.mo ---- -------- HTML Code --------

    - Model for an air humidifier or dehumidifier. -

    -

    - This model adds (or removes) moisture from the air stream. - The amount of exchanged moisture is equal to + This function computes the fan static + pressure raise as a function of volume flow rate and revolution in the form

    - ṁwat = u ṁwat,nom, + Δp = rN2   s(V̇/rN, d),

    - where u is the control input signal and - wat,nom is equal to the parameter mWat_flow_nominal. - The parameter mWat_flow_nominal can be positive or negative. - If wat is positive, then moisture is added - to the air stream, otherwise it is removed. + where + Δp is the pressure rise, + rN is the normalized fan speed, + is the volume flow rate and + d are performance data for fan or pump power consumption at rN=1.

    +

    Implementation

    - If the heat port heatPort is unconnected, then the enthalpy of the - air that flows through the device remains unchanged, e.g., the humidification - is adiabatic. To change the enthalpy of the air, add heat flow to the connector - heatPort. + The function s(·, ·) is a cubic hermite spline. + If the data d define a monotone decreasing sequence, then + s(·, d) is a monotone decreasing function. +

    +

    + The function allows rN to be zero.

    -------- Corrected Code --------

    - Model for an air humidifier or dehumidifier. -

    -

    - This model adds (or removes) moisture from the air stream. The amount - of exchanged moisture is equal to + This function computes the fan static pressure raise as a function of + volume flow rate and revolution in the form

    - ṁwat = u ṁwat,nom, + Δp = rN2   s(V̇/rN, d),

    - where u is the control input signal and - wat,nom is equal to the parameter - mWat_flow_nominal. The parameter - mWat_flow_nominal can be positive or negative. If - wat is positive, then moisture is added to the - air stream, otherwise it is removed. + where Δp is the pressure rise, rN is the + normalized fan speed, is the volume flow rate and d + are performance data for fan or pump power consumption at + rN=1.

    +

    + Implementation +

    - If the heat port heatPort is unconnected, then the - enthalpy of the air that flows through the device remains unchanged, - e.g., the humidification is adiabatic. To change the enthalpy of the - air, add heat flow to the connector heatPort. + The function s(·, ·) is a cubic hermite spline. If the data + d define a monotone decreasing sequence, then s(·, d) + is a monotone decreasing function. +

    +

    + The function allows rN to be zero.

    -------- Errors -------- -line 9 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Actuators/BaseClasses/PartialDamperExponential.mo ---- +---- AixLib/Fluid/Geothermal/Borefields/BaseClasses/HeatTransfer/ThermalResponseFactors/cylindricalHeatSource.mo ---- -------- HTML Code --------

    - Partial model for air dampers with exponential opening characteristics. - This is the base model for air dampers. - The model implements the functions that relate the opening signal and the - flow coefficient. - The model also defines parameters that are used by different air damper - models. -

    -

    - The model is as in ASHRAE 825-RP except that a control signal of - y=0 means the damper is closed, and y=1 means - the damper is open. - This is opposite of the implementation of ASHRAE 825-RP, but used here - for consistency within this library. -

    -

    - For yL < y < yU, the damper characteristics is: -

    -

    - kd(y) = exp(a+b (1-y)) -

    -

    - where kd is the loss coefficient (total pressure drop divided - by dynamic pressure) and y is the fractional opening. -

    -

    - Outside this range, the damper characteristics is defined by a quadratic polynomial that - matches the damper resistance at y=0 and y=yL or - y=yU and y=1, respectively. - In addition, the polynomials are such that kd(y) is differentiable in - y and the derivative is continuous. -

    -

    - The damper characteristics is then used to compute the flow coefficient k(y) as: + This function evaluates the cylindrical heat source solution. This solution + gives the relation between the constant heat transfer rate (per unit length) + injected by a cylindrical heat source of infinite length and the temperature + raise in the medium. The cylindrical heat source solution is defined by

    -

    - k(y) = (2 ρ ⁄ kd(y))1/2 A +

    + \"image\"

    - where A is the face area, which is computed using the nominal - mass flow rate m_flow_nominal, the nominal velocity - v_nominal and the density of the medium. + where ΔT(t,r) is the temperature raise after a time t of + constant heat injection and at a distance r from the cylindrical source, + Q' is the heat injection rate per unit length, ks is + the soil thermal conductivity, Fo is the Fourier number, + aSois is the ground thermal diffusivity, + rb is the radius of the cylindrical source and G + is the cylindrical heat source solution.

    - ASHRAE 825-RP lists the following parameter values as typical (note that the - default values in the model correspond to opposed blades). -
    + The cylindrical heat source solution is given by:

    -
    - - - - - - - - - - - - - - - - - - -
    opposed bladessingle blades
    yL15/9015/90
    yU55/9065/90
    k10.2 to 0.50.2 to 0.5
    a-1.51-1.51
    b0.105*900.0842*90
    -

    - (The loss coefficient in fully closed position k0 is computed based on the leakage coefficient - and the coefficient in fully open position.) +

    + \"image\"

    -

    References

    - P. Haves, L. K. Norford, M. DeSimone and L. Mei, - A Standard Simulation Testbed for the Evaluation of Control Algorithms & Strategies, - ASHRAE Final Report 825-RP, Atlanta, GA. + The integral is solved numerically, with the integrand defined in + + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource_Integrand.

    + +-------- Corrected Code -------- +

    + This function evaluates the cylindrical heat source solution. This + solution gives the relation between the constant heat transfer rate + (per unit length) injected by a cylindrical heat source of infinite + length and the temperature raise in the medium. The cylindrical heat + source solution is defined by +

    +

    + \"image\" +

    +

    + where ΔT(t,r) is the temperature raise after a time t + of constant heat injection and at a distance r from the + cylindrical source, Q' is the heat injection rate per unit + length, ks is the soil thermal conductivity, + Fo is the Fourier number, aSois is the + ground thermal diffusivity, rb is the radius of the + cylindrical source and G is the cylindrical heat source + solution. +

    +

    + The cylindrical heat source solution is given by: +

    +

    + \"image\" +

    +

    + The integral is solved numerically, with the integrand defined in + + AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource_Integrand. +

    + + +-------- Errors -------- +line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 23 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/HeatExchangers/BaseClasses/HANaturalCylinder.mo ---- +-------- HTML Code -------- + +

    + This model calculates the convection coefficient h for natural convection + from a cylinder submerged in fluid. h is calcualted using Eq 9.34 from + Incropera and DeWitt (1996). + Output of the block is the hA value. +

    +

    + The Nusselt number is computed as +

    +

    + NuD = (0.6 + (0.387 RaD(1/6))/(1+(0.559 Pr) + (9/16))(8/27))2); +

    +

    + where NuD is the Nusselt number, RaD is the + Rayleigh number and + Pr is the Prandtl number.
    + This correclation is accurate for RaD less than 1012. +

    +

    + h is then calculated from the Nusselt number. The equation is +

    +

    + h = NuD k/D +

    +

    + where k is the thermal conductivity of the fluid and D is the diameter + of the submerged cylinder. +

    +

    References

    +

    + Fundamentals of Heat and Mass Transfer (Fourth Edition), Frank Incropera and David + DeWitt, John Wiley and Sons, 1996 +

    + + -------- Corrected Code --------

    - Partial model for air dampers with exponential opening - characteristics. This is the base model for air dampers. The model - implements the functions that relate the opening signal and the flow - coefficient. The model also defines parameters that are used by - different air damper models. + This model calculates the convection coefficient h for natural + convection from a cylinder submerged in fluid. h is calcualted + using Eq 9.34 from Incropera and DeWitt (1996). Output of the block + is the hA value. +

    +

    + The Nusselt number is computed as +

    +

    + NuD = (0.6 + (0.387 + RaD(1/6))/(1+(0.559 Pr) + (9/16))(8/27))2); +

    +

    + where NuD is the Nusselt number, + RaD is the Rayleigh number and Pr is the + Prandtl number.
    + This correclation is accurate for RaD less than + 1012. +

    +

    + h is then calculated from the Nusselt number. The equation is +

    +

    + h = NuD k/D +

    +

    + where k is the thermal conductivity of the fluid and D + is the diameter of the submerged cylinder. +

    +

    + References +

    +

    + Fundamentals of Heat and Mass Transfer (Fourth Edition), Frank + Incropera and David DeWitt, John Wiley and Sons, 1996 +

    + + +-------- Errors -------- +line 11 column 14 - Warning:

    attribute "align" not allowed for HTML5 +line 24 column 14 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/FMI/UsersGuide.mo ---- +-------- HTML Code -------- + +

    +This user's guide describes the FMI package (Wetter et al., 2015). +The FMI package has been implemented to facilitate the export +of thermofluid flow models such as HVAC components, HVAC systems +and thermal zones as Functional Mockup Units (FMUs). +This allows to export thermofluid flow models as FMUs so that they can be +imported in other simulators. +To export thermofluid flow components, a Modelica block is needed +in order for the model to only have input and output signals +rather than fluid connectors, as fluid connectors do not impose any causality +on the signal flow. +This package implements such blocks and its connectors. +

    +

    +The main packages are as follows: +

    + + + + + + + + + + + + + + + + + + + + +
    PackageDescription
    + + AixLib.Fluid.FMI.ExportContainers + +

    + Package with blocks to export thermofluid flow components and systems. +

    +

    + To export an HVAC component or system with a single inlet and outlet port, instantiate + + AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort + with a replaceable model, + or extend from + + AixLib.Fluid.FMI.ExportContainers.PartialTwoPort + and add components.
    + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.Fan + and + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ResistanceVolume. +

    +

    + To export an HVAC system that serves a single thermal zone, extend from + + AixLib.Fluid.FMI.ExportContainers.HVACZone + and add the HVAC system.
    + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone. +

    +

    + To export an HVAC system that serves multiple thermal zones, extend from + + AixLib.Fluid.FMI.ExportContainers.HVACZones + and add the HVAC system.
    + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones. +

    +

    + To export a single thermal zone, extend from + + AixLib.Fluid.FMI.ExportContainers.ThermalZone + and add the thermal zone.
    + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone. +

    +

    + To export multiple thermal zones, extend from + + AixLib.Fluid.FMI.ExportContainers.ThermalZones + and add the thermal zone models.
    + See + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. +

    +
    + + AixLib.Fluid.FMI.Adaptors + +

    + Package with adaptors to connect models with fluid ports to blocks that + have input and output signals. +

    +
    +

    + + AixLib.Fluid.FMI.Conversion +

    +
    +

    + Package with blocks that convert between the signal connectors of + + AixLib.Fluid.FMI.Interfaces + and the real input and output signal connectors of the Modelica Standard Library. +

    +
    + + AixLib.Fluid.FMI.Interfaces + +

    + Package with composite connectors that have different input and output + signals. These connectors are used to export FMUs, and they contain + quantities such as mass flow rate, temperature, optional pressure, etc. +

    +
    +

    +The package + +AixLib.Fluid.FMI.ExportContainers.Examples.FMUs +contains various examples in which HVAC components, HVAC systems +and thermal zones are exported as an FMU. +

    +

    Typical use

    +

    +Users who want to export a single thermofluid flow component, or a +subsystem of thermofluid flow components, can use the block + +AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort. +This block has a fluid inlet, a fluid outlet, and a replaceable +component that can be replaced with an HVAC component or system that +has an inlet and outlet fluid port. +

    +

    +Users who want to export a whole HVAC system that serves a single thermal zone +can do so by extending the partial block + +AixLib.Fluid.FMI.ExportContainers.HVACZone. +The example + +AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone +illustrates how this can be accomplished.
    +Similar export containers and examples are implemented for HVAC systems that serve multiple thermal zones. +

    +

    +Conversely, to export a thermal zone, users can extend the partial block + +AixLib.Fluid.FMI.ExportContainers.ThermalZone. +The example + +AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone +illustrates how this can be accomplished.
    +Similar export containers and examples are implemented for models of multiple thermal zones. +

    +

    +Each example and validation model has a Dymola script that +either simulates the model, or exports the model as an FMU. +The script can be invoked from the pull +down menu Commands -> Export FMU. +

    +

    Options

    +

    +In the +AixLib.Fluid package, +most models have a boolean parameter called allowFlowReversal. +If set to true, then the flow can be in either direction, +otherwise it needs to be from the inlet to the outlet port. +This parameter is also used in the +AixLib.Fluid.FMI package. +The package was designed in such a way that an FMU, +if exported with allowFlowReversal=false +has as input the mass flow rate, +pressure and fluid properties of the inflowing fluid. The outputs +are the outlet mass flow rate, outlet pressure and the fluid +properties of the outflowing medium. This allows simulators +such as Ptolemy II +to evaluate the FMUs in the direction of the mass flow by first +setting all inputs, then evaluating the model equations, +and finally retrieving the +outputs before proceeding the simulation with the next downstream +component. +If allowFlowReversal=true, then the connectors have additional +signals for the properties of the fluid if it flows backwards. +

    +

    +Most components have a boolean parameter use_p_in. +If use_p_in=true, then the pressure is used from the +connector, and based on the mass flow rate, the outlet pressure +is computed and assigned to the outlet connectors. +If use_p_in=false, then the pressure as declared +by the constant p_default of the medium model is +used, and the component computes no pressure drop. +Setting use_p_in=false therefore leads to fewer +equations, but it requires a component that specifies the mass +flow rate, such as + +AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.IdealSource_m_flow.

    +

    Notes

    - The model is as in ASHRAE 825-RP except that a control signal of - y=0 means the damper is closed, and y=1 - means the damper is open. This is opposite of the implementation of - ASHRAE 825-RP, but used here for consistency within this library. +Note the following when exporting HVAC component models as an FMU:

    +
      +
    1. - For yL < y < yU, the damper characteristics is: +For models with control volumes, +the mass balance must be configured using +massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState +when used with the media + +AixLib.Media.Air. +Otherwise, the translation stops with the error

      -

      - kd(y) = exp(a+b (1-y)) +

      +The model requires derivatives of some inputs as listed below:
      +1 inlet.p
      +
      +

      +The reason is that for + +AixLib.Media.Air, +mass is proportional to pressure and pressure is proportional +to density. Hence, dm/dt requires dp/dt, +but the time derivative of the pressure is not an input to the model.

      - where kd is the loss coefficient (total pressure drop divided - by dynamic pressure) and y is the fractional opening. +For +AixLib.Media.Water, this setting is not needed +as the mass is independent of pressure.

      +
    2. +
    3. - Outside this range, the damper characteristics is defined by a - quadratic polynomial that matches the damper resistance at - y=0 and y=yL or y=yU and - y=1, respectively. In addition, the polynomials are such - that kd(y) is differentiable in y and the - derivative is continuous. +The model + +AixLib.Fluid.Movers.FlowControlled_m_flow +cannot be exported as an FMU. +This is because it assignes the mass flow rate. +However, the input connector + +AixLib.Fluid.FMI.Interfaces.Inlet +already declares the mass flow rate as an input. +Therefore, the mass flow rate is overdetermined. +As a fall back, if a user needs to set the mass flow rate, he/she can +do so by using + +AixLib.Fluid.FMI.Source_T, +which takes as an input signal the mass flow rate.

      +
    4. +

    - The damper characteristics is then used to compute the flow - coefficient k(y) as: +When connecting fluid flow components in a loop, +be careful to avoid circular assignments for example for the temperature, +as these can of course not be simulated. +An example of such an ill-posed problem is to connect the outlet of + +AixLib.Fluid.FixedResistances.PressureDrop +to its inlet. In this situation, neither pressure, nor mass flow rate or temperature +can be computed. To model such loops, a control volume with a dynamic energy +balance must be presented, and the medium needs to be compressible.

    -

    - k(y) = (2 ρ ⁄ kd(y))1/2 A +

    References

    +

    +Michael Wetter, Marcus Fuchs and Thierry Stephane Nouidui.
    + +Design choices for thermofluid flow components and systems that are exported as Functional Mockup Units.
    +Proc. of the 11th International Modelica Conference, + p. 31-41, + Versailles, France, September 2015.

    + +-------- Corrected Code --------

    - where A is the face area, which is computed using the nominal - mass flow rate m_flow_nominal, the nominal velocity - v_nominal and the density of the medium. + This user's guide describes the FMI package (Wetter et al., 2015). + The FMI package has been implemented to facilitate the export of + thermofluid flow models such as HVAC components, HVAC systems and + thermal zones as Functional Mockup Units (FMUs). This allows to + export thermofluid flow models as FMUs so that they can be imported + in other simulators. To export thermofluid flow components, a + Modelica block is needed in order for the model to only have input + and output signals rather than fluid connectors, as fluid connectors + do not impose any causality on the signal flow. This package + implements such blocks and its connectors.

    - ASHRAE 825-RP lists the following parameter values as typical (note - that the default values in the model correspond to opposed - blades).
    + The main packages are as follows:

    - - - - - - - - - -
    - opposed blades + Package - single blades + Description
    - yL - - 15/90 - - 15/90 -
    - yU - - 55/90 + AixLib.Fluid.FMI.ExportContainers - 65/90 +

    + Package with blocks to export thermofluid flow components and + systems. +

    +

    + To export an HVAC component or system with a single inlet and + outlet port, instantiate + AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort with a + replaceable model, or extend from AixLib.Fluid.FMI.ExportContainers.PartialTwoPort + and add components.
    + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.Fan and + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ResistanceVolume. +

    +

    + To export an HVAC system that serves a single thermal zone, + extend from AixLib.Fluid.FMI.ExportContainers.HVACZone + and add the HVAC system.
    + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone. +

    +

    + To export an HVAC system that serves multiple thermal zones, + extend from AixLib.Fluid.FMI.ExportContainers.HVACZones + and add the HVAC system.
    + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZones. +

    +

    + To export a single thermal zone, extend from AixLib.Fluid.FMI.ExportContainers.ThermalZone + and add the thermal zone.
    + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone. +

    +

    + To export multiple thermal zones, extend from AixLib.Fluid.FMI.ExportContainers.ThermalZones + and add the thermal zone models.
    + See + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. +

    - k1 - - 0.2 to 0.5 + AixLib.Fluid.FMI.Adaptors - 0.2 to 0.5 +

    + Package with adaptors to connect models with fluid ports to + blocks that have input and output signals. +

    - a - - -1.51 +

    + AixLib.Fluid.FMI.Conversion +

    - -1.51 +

    + Package with blocks that convert between the signal connectors + of AixLib.Fluid.FMI.Interfaces + and the real input and output signal connectors of the Modelica + Standard Library. +

    - b - - 0.105*90 + AixLib.Fluid.FMI.Interfaces - 0.0842*90 +

    + Package with composite connectors that have different input and + output signals. These connectors are used to export FMUs, and + they contain quantities such as mass flow rate, temperature, + optional pressure, etc. +

    - (The loss coefficient in fully closed position k0 is - computed based on the leakage coefficient and the coefficient in - fully open position.) + The package AixLib.Fluid.FMI.ExportContainers.Examples.FMUs + contains various examples in which HVAC components, HVAC systems and + thermal zones are exported as an FMU. +

    +

    + Typical use +

    +

    + Users who want to export a single thermofluid flow component, or a + subsystem of thermofluid flow components, can use the block AixLib.Fluid.FMI.ExportContainers.ReplaceableTwoPort. + This block has a fluid inlet, a fluid outlet, and a replaceable + component that can be replaced with an HVAC component or system that + has an inlet and outlet fluid port. +

    +

    + Users who want to export a whole HVAC system that serves a single + thermal zone can do so by extending the partial block AixLib.Fluid.FMI.ExportContainers.HVACZone. + The example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.HVACZone + illustrates how this can be accomplished.
    + Similar export containers and examples are implemented for HVAC + systems that serve multiple thermal zones.

    -

    - References -

    - P. Haves, L. K. Norford, M. DeSimone and L. Mei, A Standard - Simulation Testbed for the Evaluation of Control Algorithms & - Strategies, ASHRAE Final Report 825-RP, Atlanta, GA. + Conversely, to export a thermal zone, users can extend the partial + block AixLib.Fluid.FMI.ExportContainers.ThermalZone. + The example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone + illustrates how this can be accomplished.
    + Similar export containers and examples are implemented for models of + multiple thermal zones.

    - - --------- Errors -------- -line 50 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/BaseClasses/Boreholes/BaseClasses/Functions/convectionResistanceCircularPipe.mo ---- --------- HTML Code -------- - -

    - This model computes the convection resistance in the pipes of a borehole segment - with heigth hSeg using correlations suggested by Bergman et al. (2011). -

    -

    - If the flow is laminar (Re ≤ 2300, with Re being the Reynolds number of the flow), - the Nusselt number of the flow is assumed to be constant at 3.66. If the flow is turbulent (Re > 2300), - the correlation of Dittus-Boelter is used to find the convection heat transfer coefficient as -

    -

    - Nu = 0.023   Re0.8   Prn, -

    -

    - where Nu is the Nusselt number and - Pr is the Prandlt number. - A value of n=0.35 is used, as the reference uses n=0.4 for heating and - n=0.3 for cooling. To ensure that the function is continuously differentiable, - a smooth transition between the laminar and turbulent values is created for the - range 2300 < Re < 2400. -

    -

    References

    -

    - Bergman, T. L., Incropera, F. P., DeWitt, D. P., & Lavine, A. S. (2011). Fundamentals of heat and mass - transfer (7th ed.). New York: John Wiley & Sons. -

    - - - --------- Corrected Code --------

    - This model computes the convection resistance in the pipes of a - borehole segment with heigth hSeg using - correlations suggested by Bergman et al. (2011). + Each example and validation model has a Dymola script that either + simulates the model, or exports the model as an FMU. The script can + be invoked from the pull down menu Commands -> Export + FMU.

    +

    + Options +

    - If the flow is laminar (Re ≤ 2300, with Re being the - Reynolds number of the flow), the Nusselt number of the flow is - assumed to be constant at 3.66. If the flow is turbulent (Re > - 2300), the correlation of Dittus-Boelter is used to find the - convection heat transfer coefficient as + In the AixLib.Fluid package, + most models have a boolean parameter called + allowFlowReversal. If set to true, then the + flow can be in either direction, otherwise it needs to be from the + inlet to the outlet port. This parameter is also used in the AixLib.Fluid.FMI package. The + package was designed in such a way that an FMU, if exported with + allowFlowReversal=false has as input the mass flow rate, + pressure and fluid properties of the inflowing fluid. The outputs are + the outlet mass flow rate, outlet pressure and the fluid properties + of the outflowing medium. This allows simulators such as Ptolemy II + to evaluate the FMUs in the direction of the mass flow by first + setting all inputs, then evaluating the model equations, and finally + retrieving the outputs before proceeding the simulation with the next + downstream component. If allowFlowReversal=true, then + the connectors have additional signals for the properties of the + fluid if it flows backwards.

    -

    - Nu = 0.023   Re0.8   Prn, +

    + Most components have a boolean parameter use_p_in. If + use_p_in=true, then the pressure is used from the + connector, and based on the mass flow rate, the outlet pressure is + computed and assigned to the outlet connectors. If + use_p_in=false, then the pressure as declared by the + constant p_default of the medium model is used, and the + component computes no pressure drop. Setting + use_p_in=false therefore leads to fewer equations, but + it requires a component that specifies the mass flow rate, such as + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.IdealSource_m_flow.

    +

    + Notes +

    - where Nu is the Nusselt number and Pr is the Prandlt - number. A value of n=0.35 is used, as the reference uses - n=0.4 for heating and n=0.3 for cooling. To ensure that - the function is continuously differentiable, a smooth transition - between the laminar and turbulent values is created for the range - 2300 < Re < 2400. + Note the following when exporting HVAC component models as an FMU: +

    +
      +
    1. +

      + For models with control volumes, the mass balance must be + configured using + massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState + when used with the media AixLib.Media.Air. Otherwise, + the translation stops with the error +

      +
      +The model requires derivatives of some inputs as listed below:
      +1 inlet.p
      +
      +

      + The reason is that for AixLib.Media.Air, mass is + proportional to pressure and pressure is proportional to density. + Hence, dm/dt requires dp/dt, but the time + derivative of the pressure is not an input to the model. +

      +

      + For AixLib.Media.Water, this + setting is not needed as the mass is independent of pressure. +

      +
    2. +
    3. +

      + The model AixLib.Fluid.Movers.FlowControlled_m_flow + cannot be exported as an FMU. This is because it assignes the + mass flow rate. However, the input connector AixLib.Fluid.FMI.Interfaces.Inlet + already declares the mass flow rate as an input. Therefore, the + mass flow rate is overdetermined. As a fall back, if a user needs + to set the mass flow rate, he/she can do so by using AixLib.Fluid.FMI.Source_T, + which takes as an input signal the mass flow rate. +

      +
    4. +
    +

    + When connecting fluid flow components in a loop, be careful to avoid + circular assignments for example for the temperature, as these can of + course not be simulated. An example of such an ill-posed problem is + to connect the outlet of AixLib.Fluid.FixedResistances.PressureDrop + to its inlet. In this situation, neither pressure, nor mass flow rate + or temperature can be computed. To model such loops, a control volume + with a dynamic energy balance must be presented, and the medium needs + to be compressible.

    References

    - Bergman, T. L., Incropera, F. P., DeWitt, D. P., & Lavine, A. S. - (2011). Fundamentals of heat and mass transfer (7th ed.). New - York: John Wiley & Sons. + Michael Wetter, Marcus Fuchs and Thierry Stephane Nouidui.
    + + Design choices for thermofluid flow components and systems that are + exported as Functional Mockup Units.
    + Proc. of the 11th International Modelica Conference, p. 31-41, + Versailles, France, September 2015.

    - -------- Errors -------- -line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 18 column 1 - Warning: The summary attribute on the

    element is obsolete in HTML5 ----- AixLib/Fluid/Humidifiers/SteamHumidifier_X.mo ---- +---- AixLib/Fluid/Humidifiers/SprayAirWasher_X.mo ---- -------- HTML Code --------

    - Model for a steam humidifier with a prescribed outlet water vapor mass fraction + Model for a spray air washer with a prescribed outlet water vapor mass fraction in kg/kg total air.

    @@ -19850,8 +18228,8 @@ line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 to the medium if the flow rate is from port_a to port_b. If the flow is reversed, then mWat_flow = 0. The outlet specific enthalpy at port_b is increased by - the enthalpy of steam at 100°C times the mass of steam that was added. - Therefore, the temperature of the leaving fluid is slightly above the inlet temperature. + the enthalpy of liquid water at 10°C times the mass of water that was added. + Therefore, the temperature of the leaving fluid is below the inlet temperature.

    The outlet conditions at port_a are not affected by this model, @@ -19893,5107 +18271,6661 @@ line 11 column 2 - Warning:

    attribute "align" not allowed for HTML5 port_a to port_b. The water vapor of the reverse flow is not affected by this model.

    +

    + This model does not affect the enthalpy of the air. Therefore, + if water is added, the temperature will decrease, e.g., the humidification + is adiabatic. +

    + + + +-------- Corrected Code -------- +

    + Model for a spray air washer with a prescribed outlet water vapor + mass fraction in kg/kg total air. +

    +

    + This model forces the outlet water mass fraction at + port_b to be no lower than the input signal + X_wSet, subject to optional limits on the maximum water + vapor mass flow rate that is added, as described by the parameter + mWatMax_flow. By default, the model has unlimited + capacity. +

    +

    + The output signal mWat_flow ≥ 0 is the moisture added to + the medium if the flow rate is from port_a to + port_b. If the flow is reversed, then mWat_flow = + 0. The outlet specific enthalpy at port_b is + increased by the enthalpy of liquid water at 10°C times the + mass of water that was added. Therefore, the temperature of the + leaving fluid is below the inlet temperature. +

    +

    + The outlet conditions at port_a are not affected by this + model, other than for a possible pressure difference due to flow + friction. +

    +

    + If the parameter energyDynamics is different from + Modelica.Fluid.Types.Dynamics.SteadyState, the component + models the dynamic response using a first order differential + equation. The time constant of the component is equal to the + parameter tau. This time constant is adjusted based on + the mass flow rate using +

    +

    + τeff = τ |ṁ| ⁄ ṁnom +

    +

    + where τeff is the effective time constant for the + given mass flow rate and τ is the time constant at + the nominal mass flow rate nom. This type of + dynamics is equal to the dynamics that a completely mixed control + volume would have. +

    +

    + Optionally, this model can have a flow resistance. Set + dp_nominal = 0 to disable the flow friction calculation. +

    +

    + For a model that uses a control signal u ∈ [0, 1] and + multiplies this with the nominal water mass flow rate, use AixLib.Fluid.Humidifiers.Humidifier_u +

    +

    + Limitations +

    +

    + This model only adds water vapor for the flow from + port_a to port_b. The water vapor of the + reverse flow is not affected by this model. +

    +

    + This model does not affect the enthalpy of the air. Therefore, if + water is added, the temperature will decrease, e.g., the + humidification is adiabatic. +

    + + +-------- Errors -------- +line 33 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Controls/Continuous/LimPID.mo ---- +-------- HTML Code -------- + +

    + PID controller in the standard form +

    +

    + y = k   ( e(t) + 1 ⁄ Ti   ∫ e(s) ds + Td de(t)⁄dt ), +

    +

    + where + y is the control signal, + e(t) = us - um is the control error, + with us being the set point and um being + the measured quantity, + k is the gain, + Ti is the time constant of the integral term and + Td is the time constant of the derivative term. +

    +

    + Note that the units of k are the inverse of the units of the control error, + while the units of Ti and Td are seconds. +

    +

    + For detailed treatment of integrator anti-windup, set-point weights and output limitation, see + Modelica.Blocks.Continuous.LimPID. +

    +

    Options

    + This controller can be configured as follows. +
    P, PI, PD, or PID action
    +

    + Through the parameter controllerType, the controller can be configured + as P, PI, PD or PID controller. The default configuration is PI. +

    +
    Direct or reverse acting
    +

    + Through the parameter reverseActing, the controller can be configured to + be reverse or direct acting. + The above standard form is reverse acting, which is the default configuration. + For a reverse acting controller, for a constant set point, + an increase in measurement signal u_m decreases the control output signal y + (Montgomery and McDowall, 2008). + Thus, +

    + +
    Reset of the controller output
    +

    + The controller can be configured to enable an input port that allows resetting the controller + output. The controller output can be reset as follows: +

    + +

    + Note that this controller implements an integrator anti-windup. Therefore, + for most applications, keeping the default setting of + reset = AixLib.Types.Reset.Disabled is sufficient. + However, if the controller is used in conjuction with equipment that is being + switched on, better control performance may be achieved by resetting the controller + output when the equipment is switched on. + This is in particular the case in situations + where the equipment control input should continuously increase as the equipment is + switched on, such as a light dimmer that may slowly increase the luminance, or + a variable speed drive of a motor that should continuously increase the speed. +

    +

    References

    +

    + R. Montgomery and R. McDowall (2008). + \"Fundamentals of HVAC Control Systems.\" + American Society of Heating Refrigerating and Air-Conditioning Engineers Inc. Atlanta, GA. +

    + -------- Corrected Code --------

    - Model for a steam humidifier with a prescribed outlet water vapor - mass fraction in kg/kg total air. -

    -

    - This model forces the outlet water mass fraction at - port_b to be no lower than the input signal - X_wSet, subject to optional limits on the maximum water - vapor mass flow rate that is added, as described by the parameter - mWatMax_flow. By default, the model has unlimited - capacity. + PID controller in the standard form

    -

    - The output signal mWat_flow ≥ 0 is the moisture added to - the medium if the flow rate is from port_a to - port_b. If the flow is reversed, then mWat_flow = - 0. The outlet specific enthalpy at port_b is - increased by the enthalpy of steam at 100°C times the mass of - steam that was added. Therefore, the temperature of the leaving fluid - is slightly above the inlet temperature. +

    + y = k   ( e(t) + 1 ⁄ Ti   ∫ e(s) ds + + Td de(t)⁄dt ),

    - The outlet conditions at port_a are not affected by this - model, other than for a possible pressure difference due to flow - friction. + where y is the control signal, e(t) = us - + um is the control error, with us + being the set point and um being the measured + quantity, k is the gain, Ti is the time + constant of the integral term and Td is the time + constant of the derivative term.

    - If the parameter energyDynamics is different from - Modelica.Fluid.Types.Dynamics.SteadyState, the component - models the dynamic response using a first order differential - equation. The time constant of the component is equal to the - parameter tau. This time constant is adjusted based on - the mass flow rate using -

    -

    - τeff = τ |ṁ| ⁄ ṁnom + Note that the units of k are the inverse of the units of the + control error, while the units of Ti and + Td are seconds.

    - where τeff is the effective time constant for the - given mass flow rate and τ is the time constant at - the nominal mass flow rate nom. This type of - dynamics is equal to the dynamics that a completely mixed control - volume would have. + For detailed treatment of integrator anti-windup, set-point weights + and output limitation, see Modelica.Blocks.Continuous.LimPID.

    +

    + Options +

    This controller can be configured as follows. +
    + P, PI, PD, or PID action +

    - Optionally, this model can have a flow resistance. Set - dp_nominal = 0 to disable the flow friction calculation. + Through the parameter controllerType, the controller can + be configured as P, PI, PD or PID controller. The default + configuration is PI.

    +
    + Direct or reverse acting +

    - For a model that uses a control signal u ∈ [0, 1] and - multiplies this with the nominal water mass flow rate, use AixLib.Fluid.Humidifiers.Humidifier_u + Through the parameter reverseActing, the controller can + be configured to be reverse or direct acting. The above standard form + is reverse acting, which is the default configuration. For a reverse + acting controller, for a constant set point, an increase in + measurement signal u_m decreases the control output + signal y (Montgomery and McDowall, 2008). Thus,

    -

    - Limitations -

    + +
    + Reset of the controller output +

    - This model only adds water vapor for the flow from - port_a to port_b. The water vapor of the - reverse flow is not affected by this model. + The controller can be configured to enable an input port that allows + resetting the controller output. The controller output can be reset + as follows:

    - --------- Errors -------- -line 33 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Controls/Continuous/Examples/SignalRanker.mo ---- --------- HTML Code -------- - -

    - Example that demonstrates the use of the signal ranker model. - The figure below shows the input and output signals of the block. - Note that - sigRan.y[1] ≥ sigRan.y[2] ≥ sigRan.y[3]. -

    -

    - \"Input
    - \"Output -

    - - - --------- Corrected Code --------

    - Example that demonstrates the use of the signal ranker model. The - figure below shows the input and output signals of the block. Note - that sigRan.y[1] ≥ sigRan.y[2] ≥ sigRan.y[3]. + Note that this controller implements an integrator anti-windup. + Therefore, for most applications, keeping the default setting of + reset = AixLib.Types.Reset.Disabled is sufficient. + However, if the controller is used in conjuction with equipment that + is being switched on, better control performance may be achieved by + resetting the controller output when the equipment is switched on. + This is in particular the case in situations where the equipment + control input should continuously increase as the equipment is + switched on, such as a light dimmer that may slowly increase the + luminance, or a variable speed drive of a motor that should + continuously increase the speed.

    -

    - \"Input
    - \"Output +

    + References +

    +

    + R. Montgomery and R. McDowall (2008). \"Fundamentals of HVAC Control + Systems.\" American Society of Heating Refrigerating and + Air-Conditioning Engineers Inc. Atlanta, GA.

    -------- Errors -------- -line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 5 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Movers/BaseClasses/Characteristics/efficiency.mo ---- +---- AixLib/Fluid/FMI/ExportContainers/ThermalZone.mo ---- -------- HTML Code --------

    - This function computes the fan or pump efficiency for given normalized volume flow rate - and performance data. The efficiency is + Model that is used as a container for a single thermal zone + that is to be exported as an FMU. +

    +

    Typical use and important parameters

    +

    + To use this model as a container for an FMU, extend + from this model, rather than instantiate it, + add your thermal zone and a vector of mass flow rate sensors. + By extending from this model, the top-level + signal connectors on the left stay at the top-level, and hence + will be visible at the FMI interface. +

    + + Note that + + +

    + The example + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone + shows how a simple thermal zone can be implemented and exported as + an FMU. + +

    + +

    + The conversion between the fluid ports and signal ports is done + in the thermal zone adapter theZonAda. + This adapter has a vector of fluid ports called ports[nPorts] + which needs to be connected to the air volume of the thermal zone. + At this port, air exchanged between the thermal zone, the HVAC system + and any infiltration flow paths. +

    +

    + This model has input signals fluPor[nPorts], which carry + the mass flow rate for each flow that is connected to ports, together with its + temperature, water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the flow + enters the room, even if the flow is zero or negative. + If a medium has no moisture, e.g., if Medium.nXi=0, or + if it has no trace substances, e.g., if Medium.nC=0, then + the output signal for these properties are removed. + Thus, a thermal zone model that uses these signals to compute the + heat added by the HVAC system need to implement an equation such as

    - η = s(V̇/rN, d), + Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon),

    where - η is the efficiency, - rN is the normalized fan speed, - is the volume flow rate, and - d are performance data for fan or pump efficiency. + Qsen is the sensible heat flow rate added to the thermal zone, + sup is the supply air mass flow rate from + the port fluPor (which is negative if it is an exhaust), + cp is the specific heat capacity at constant pressure, + Tsup is the supply air temperature and + Tair,zon is the zone air temperature. + Note that without the max(·, ·), the energy + balance would be wrong. + For example, + + the control volumes in + + AixLib.Fluid.MixingVolumes + implement such a max(·, ·) function.

    -

    Implementation

    - The function s(·, ·) is a cubic hermite spline. - If the data d define a monotone decreasing sequence, then - s(·, d) is a monotone decreasing function. + The zone air temperature, + the water vapor mass fraction per total mass of the air (unless Medium.nXi=0) + and trace substances (unless Medium.nC=0) + can be obtained from the outupt connector + fluPor.backward. + These signals are the same as the inflowing fluid stream(s) + at the port theAdaZon.ports[1:nPorts]. + The fluid connector ports[nPorts] has a prescribed mass flow rate, but + it does not set any pressure. +

    +

    + This model has a user-defined parameter nPorts + which sets the number of fluid ports, which in turn is used + for the ports fluPor and ports. + All nPorts + ports[1:nPorts] need to be connected as demonstrated in the example + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone. +

    +

    +

    -------- Corrected Code --------

    - This function computes the fan or pump efficiency for given - normalized volume flow rate and performance data. The efficiency is + Model that is used as a container for a single thermal zone that is + to be exported as an FMU. +

    +

    + Typical use and important parameters +

    +

    + To use this model as a container for an FMU, extend from this model, + rather than instantiate it, add your thermal zone and a vector of + mass flow rate sensors. By extending from this model, the top-level + signal connectors on the left stay at the top-level, and hence will + be visible at the FMI interface. +

    Note that + +

    + The example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone shows + how a simple thermal zone can be implemented and exported as an FMU. + +

    +

    + The conversion between the fluid ports and signal ports is done in + the thermal zone adapter theZonAda. This adapter has a + vector of fluid ports called ports[nPorts] which needs + to be connected to the air volume of the thermal zone. At this port, + air exchanged between the thermal zone, the HVAC system and any + infiltration flow paths. +

    +

    + This model has input signals fluPor[nPorts], which carry + the mass flow rate for each flow that is connected to + ports, together with its temperature, water vapor mass + fraction per total mass of the air (not per kg dry air), and trace + substances. These quantities are always as if the flow enters the + room, even if the flow is zero or negative. If a medium has no + moisture, e.g., if Medium.nXi=0, or if it has no trace + substances, e.g., if Medium.nC=0, then the output signal + for these properties are removed. Thus, a thermal zone model that + uses these signals to compute the heat added by the HVAC system need + to implement an equation such as

    - η = s(V̇/rN, d), + Qsen = max(0, ṁsup)   cp   + (Tsup - Tair,zon), +

    +

    + where Qsen is the sensible heat flow rate added to + the thermal zone, sup is the supply air mass flow + rate from the port fluPor (which is negative if it is an + exhaust), cp is the specific heat capacity at + constant pressure, Tsup is the supply air + temperature and Tair,zon is the zone air + temperature. Note that without the max(·, ·), the energy + balance would be wrong. For example, + the control volumes in AixLib.Fluid.MixingVolumes + implement such a max(·, ·) function. +

    +

    + The zone air temperature, the water vapor mass fraction per total + mass of the air (unless Medium.nXi=0) and trace + substances (unless Medium.nC=0) can be obtained from the + outupt connector fluPor.backward. These signals are the + same as the inflowing fluid stream(s) at the port + theAdaZon.ports[1:nPorts]. The fluid connector + ports[nPorts] has a prescribed mass flow rate, but it + does not set any pressure.

    - where η is the efficiency, rN is the - normalized fan speed, is the volume flow rate, and d - are performance data for fan or pump efficiency. + This model has a user-defined parameter nPorts which + sets the number of fluid ports, which in turn is used for the ports + fluPor and ports. All nPorts + ports[1:nPorts] need to be connected as demonstrated in + the example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZone.

    -

    - Implementation -

    - The function s(·, ·) is a cubic hermite spline. If the data - d define a monotone decreasing sequence, then s(·, d) - is a monotone decreasing function. +

    -------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 72 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Utilities/Math/Functions/quadraticLinear.mo ---- +---- AixLib/Fluid/FixedResistances/PressureDrop.mo ---- -------- HTML Code -------- - This function computes +

    + Model of a flow resistance with a fixed flow coefficient. + The mass flow rate is +

    - y = a1 + a2 x1 - + a3 x12 - + (a4 + a5 x1 - + a6 x12) x2 + ṁ = k + √ΔP,

    - - - --------- Corrected Code -------- -This function computes -

    - y = a1 + a2 x1 + a3 - x12 + (a4 + a5 - x1 + a6 x12) - x2 -

    - - --------- Errors -------- -line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/FMI/Adaptors/HVAC.mo ---- --------- HTML Code -------- -

    - The (time varying) vector Real output signal of this block can be defined in its - parameter menu via variable y. The purpose is to support the - easy definition of vector-valued Real expressions in a block diagram. + where + k is a constant and + ΔP is the pressure drop. + The constant k is equal to + k=m_flow_nominal/sqrt(dp_nominal), + where m_flow_nominal and dp_nominal + are parameters.

    - +

    Assumptions

    - Adaptor that can be used to connect an HVAC system (with acausal ports) - to input/output signals, which then can be exposed in an FMI interface. + In the region + abs(m_flow) < m_flow_turbulent, + the square root is replaced by a differentiable function + with finite slope. + The value of m_flow_turbulent is + computed as + m_flow_turbulent = deltaM * abs(m_flow_nominal), + where deltaM=0.3 and + m_flow_nominal are parameters that can be set by the user.

    - The adaptor has a vector of fluid ports called ports. - The supply and return air ducts need to be connected to these ports. - Also, if a thermal zone has interzonal air exchange or air infiltration, - these flow paths also need be connected to ports. + The figure below shows the pressure drop for the parameters + m_flow_nominal=5 kg/s, + dp_nominal=10 Pa and + deltaM=0.3. +

    +

    + \"image\"

    +

    Important parameters

    - This model outputs at the port fluPor the mass flow rate for - each flow that is connected to ports, together with its - temperature, water vapor mass fraction per total mass of the air (not per kg dry - air), and trace substances. These quantities are always as if the flow - enters the room, even if the flow is zero or negative. - If a medium has no moisture, e.g., if Medium.nXi=0, or - if it has no trace substances, e.g., if Medium.nC=0, then - the output signal for these properties are removed. - These quantities are always as if the flow - enters the room, even if the flow is zero or negative. - Thus, a thermal zone model that uses these signals to compute the - heat added by the HVAC system need to implement an equation such as + The parameter from_dp is used to determine + whether the mass flow rate is computed as a function of the + pressure drop (if from_dp=true), or vice versa. + This setting can affect the size of the nonlinear system of equations.

    -

    - Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon), +

    + If the parameter linearized is set to true, + then the pressure drop is computed as a linear function of the + mass flow rate.

    - where - Qsen is the sensible heat flow rate added to the thermal zone, - sup is the supply air mass flow rate from - the port fluPor (which is negative if it is an exhaust), - cp is the specific heat capacity at constant pressure, - Tsup is the supply air temperature and - Tair,zon is the zone air temperature. - Note that without the max(·, ·) function, the energy - balance would be wrong. + Setting allowFlowReversal=false can lead to simpler + equations. However, this should only be set to false + if one can guarantee that the flow never reverses its direction. + This can be difficult to guarantee, as pressure imbalance after + the initialization, or due to medium expansion and contraction, + can lead to reverse flow.

    - The output signals of this model are the zone air temperature, - the water vapor mass fraction per total mass of the air (unless Medium.nXi=0) - and trace substances (unless Medium.nC=0). - These output connectors can be used to connect to a controller. - These values are obtained from the fluid stream(s) that flow into this component - at the port fluPor, e.g., from the connector - fluPor.backward. - Note that there are nPorts of these signals. - For a completely mixed room, they will all have the same value, but - for a room with non-uniform temperatures, they can have different values. + If the parameter + show_T is set to true, + then the model will compute the + temperature at its ports. Note that this can lead to state events + when the mass flow rate approaches zero, + which can increase computing time.

    -

    Assumption and limitations

    +

    Notes

    - The mass flow rates at ports sum to zero, hence this - model conserves mass. + For more detailed models that compute the actual flow friction, + models from the package + + Modelica.Fluid + can be used and combined with models from the + AixLib library.

    - This model does not impose any pressure, other than setting the pressure - of all fluid connections to ports to be equal. - The reason is that setting a pressure can lead to non-physical system models, - for example if a mass flow rate is imposed and the HVAC system is connected - to a model that sets a pressure boundary condition such as - - AixLib.Fluid.Sources.Outside. - Also, setting a pressure would make it impossible to use multiple instances - of this model (one for each thermal zone) and build in Modelica an airflow network - model with pressure driven mass flow rates. + For a model that uses the hydraulic parameter and flow velocity at nominal conditions + as a parameter, use + + AixLib.Fluid.FixedResistances.HydraulicDiameter.

    +

    Implementation

    - The model has no pressure drop. Hence, the pressure drop - of an air diffuser or of an exhaust grill need to be modelled - in models that are connected to ports. + The pressure drop is computed by calling a function in the package + + AixLib.Fluid.BaseClasses.FlowModels, + This package contains regularized implementations of the equation +

    +

    + m = sign(Δp) k √ Δp  

    -

    Typical use and important parameters

    - See - - AixLib.Fluid.FMI.ExportContainers.HVACZone - for a model that uses this model. + and its inverse function. +

    +

    + To decouple the energy equation from the mass equations, + the pressure drop is a function of the mass flow rate, + and not the volume flow rate. + This leads to simpler equations.

    -------- Corrected Code --------

    - The (time varying) vector Real output signal of this - block can be defined in its parameter menu via variable - y. The purpose is to support the easy definition of - vector-valued Real expressions in a block diagram. + Model of a flow resistance with a fixed flow coefficient. The mass + flow rate is +

    +

    + ṁ = k √ΔP,

    - Adaptor that can be used to connect an HVAC system (with acausal - ports) to input/output signals, which then can be exposed in an FMI - interface. + where k is a constant and ΔP is the pressure drop. The + constant k is equal to + k=m_flow_nominal/sqrt(dp_nominal), where + m_flow_nominal and dp_nominal are + parameters.

    +

    + Assumptions +

    - The adaptor has a vector of fluid ports called ports. - The supply and return air ducts need to be connected to these ports. - Also, if a thermal zone has interzonal air exchange or air - infiltration, these flow paths also need be connected to - ports. + In the region abs(m_flow) < m_flow_turbulent, the + square root is replaced by a differentiable function with finite + slope. The value of m_flow_turbulent is computed as + m_flow_turbulent = deltaM * abs(m_flow_nominal), where + deltaM=0.3 and m_flow_nominal are + parameters that can be set by the user.

    - This model outputs at the port fluPor the mass flow rate - for each flow that is connected to ports, together with - its temperature, water vapor mass fraction per total mass of the air - (not per kg dry air), and trace substances. These quantities are - always as if the flow enters the room, even if the flow is zero or - negative. If a medium has no moisture, e.g., if - Medium.nXi=0, or if it has no trace substances, e.g., if - Medium.nC=0, then the output signal for these properties - are removed. These quantities are always as if the flow enters the - room, even if the flow is zero or negative. Thus, a thermal zone - model that uses these signals to compute the heat added by the HVAC - system need to implement an equation such as + The figure below shows the pressure drop for the parameters + m_flow_nominal=5 kg/s, dp_nominal=10 Pa and + deltaM=0.3.

    -

    - Qsen = max(0, ṁsup)   cp   - (Tsup - Tair,zon), +

    + \"image\"

    +

    + Important parameters +

    - where Qsen is the sensible heat flow rate added to - the thermal zone, sup is the supply air mass flow - rate from the port fluPor (which is negative if it is an - exhaust), cp is the specific heat capacity at - constant pressure, Tsup is the supply air - temperature and Tair,zon is the zone air - temperature. Note that without the max(·, ·) function, the - energy balance would be wrong. + The parameter from_dp is used to determine whether the + mass flow rate is computed as a function of the pressure drop (if + from_dp=true), or vice versa. This setting can affect + the size of the nonlinear system of equations.

    - The output signals of this model are the zone air temperature, the - water vapor mass fraction per total mass of the air (unless - Medium.nXi=0) and trace substances (unless - Medium.nC=0). These output connectors can be used to - connect to a controller. These values are obtained from the fluid - stream(s) that flow into this component at the port - fluPor, e.g., from the connector - fluPor.backward. Note that there are nPorts - of these signals. For a completely mixed room, they will all have the - same value, but for a room with non-uniform temperatures, they can - have different values. + If the parameter linearized is set to true, + then the pressure drop is computed as a linear function of the mass + flow rate.

    -

    - Assumption and limitations -

    - The mass flow rates at ports sum to zero, hence this - model conserves mass. + Setting allowFlowReversal=false can lead to simpler + equations. However, this should only be set to false if + one can guarantee that the flow never reverses its direction. This + can be difficult to guarantee, as pressure imbalance after the + initialization, or due to medium expansion and contraction, can lead + to reverse flow.

    - This model does not impose any pressure, other than setting the - pressure of all fluid connections to ports to be equal. - The reason is that setting a pressure can lead to non-physical system - models, for example if a mass flow rate is imposed and the HVAC - system is connected to a model that sets a pressure boundary - condition such as AixLib.Fluid.Sources.Outside. - Also, setting a pressure would make it impossible to use multiple - instances of this model (one for each thermal zone) and build in - Modelica an airflow network model with pressure driven mass flow - rates. + If the parameter show_T is set to true, + then the model will compute the temperature at its ports. Note that + this can lead to state events when the mass flow rate approaches + zero, which can increase computing time. +

    +

    + Notes +

    +

    + For more detailed models that compute the actual flow friction, + models from the package Modelica.Fluid can be used and + combined with models from the AixLib library.

    - The model has no pressure drop. Hence, the pressure drop of an air - diffuser or of an exhaust grill need to be modelled in models that - are connected to ports. + For a model that uses the hydraulic parameter and flow velocity at + nominal conditions as a parameter, use AixLib.Fluid.FixedResistances.HydraulicDiameter.

    - Typical use and important parameters + Implementation

    - See AixLib.Fluid.FMI.ExportContainers.HVACZone - for a model that uses this model. + The pressure drop is computed by calling a function in the package + AixLib.Fluid.BaseClasses.FlowModels, + This package contains regularized implementations of the equation +

    +

    + m = sign(Δp) k √ Δp +   +

    +

    + and its inverse function. +

    +

    + To decouple the energy equation from the mass equations, the pressure + drop is a function of the mass flow rate, and not the volume flow + rate. This leads to simpler equations.

    - --------- Errors -------- -line 26 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Controls/Continuous/Examples/OffTimer.mo ---- --------- HTML Code -------- - -

    - Example that demonstrates the use of the model - - AixLib.Controls.Continuous.OffTimer. - The input to the two timers are alternating boolean values. - Whenever the input becomes false(=0), the timer is reset. - The figures below show the input and output of the blocks. -

    -

    - \"Input
    - \"Input -

    - - - --------- Corrected Code -------- -

    - Example that demonstrates the use of the model AixLib.Controls.Continuous.OffTimer. - The input to the two timers are alternating boolean values. Whenever - the input becomes false(=0), the timer is reset. The - figures below show the input and output of the blocks. -

    -

    - \"Input
    - \"Input -

    - -------- Errors -------- -line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 37 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 90 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Media/Water.mo ---- +---- AixLib/BoundaryConditions/Validation/BESTEST/WD600.mo ---- -------- HTML Code -------- -

    - Model with basic thermodynamic properties. -

    -

    - This base properties model is identical to - - Modelica.Media.Water.ConstantPropertyLiquidWater, - except that the equation - u = cv_const*(T - reference_T) - has been replaced by u=h because - cp_const=cv_const. -

    -

    - This model provides equation for the following thermodynamic properties: -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VariableUnitDescription
    TKtemperature
    pPaabsolute pressure
    dkg/m3density
    hJ/kgspecific enthalpy
    uJ/kgspecific internal energy
    Xi[nXi]kg/kgindependent mass fractions m_i/m
    RJ/kg.Kgas constant
    Mkg/molmolar mass
    - -

    - Enthalpy of the water. -

    - - - -

    - This medium package models liquid water. -

    -

    - The mass density is computed using a constant value of 995.586 kg/s. - For a medium model in which the density is a function of temperature, use - - AixLib.Media.Specialized.Water.TemperatureDependentDensity which may have considerably higher computing time. -

    -

    - For the specific heat capacities at constant pressure and at constant volume, - a constant value of 4184 J/(kg K), which corresponds to 20°C - is used. - The figure below shows the relative error of the specific heat capacity that - is introduced by this simplification. -

    -

    - \"Relative -

    -

    - The enthalpy is computed using the convention that h=0 - if T=0 °C. -

    -

    Limitations

    -

    - Density, specific heat capacity, thermal conductivity and viscosity are constant. - Water is modeled as an incompressible liquid. - There are no phase changes. -

    - +

    WD600: Ground Reflactance

    +

    Weather data file : WD600.epw

    +

    Table 1: Site Data for Weather file WD600.epw

    + + + + + + + + + + + + + + + + +

    Latitude

    39.833° north

    Longitude

    104.65° west

    Altitude

    1650 m

    Time Zone

    -7

    + -------- Corrected Code -------- + +

    + WD600: Ground Reflactance +

    - Model with basic thermodynamic properties. -

    -

    - This base properties model is identical to Modelica.Media.Water.ConstantPropertyLiquidWater, - except that the equation u = cv_const*(T - reference_T) - has been replaced by u=h because - cp_const=cv_const. + Weather data file : WD600.epw

    - This model provides equation for the following thermodynamic - properties: + Table 1: Site Data for Weather file WD600.epw

    - - - - - - - - - - - - - - - - - - - - - - - - - - +
    - Variable - - Unit - - Description -
    - T - - K - - temperature -
    - p - - Pa - - absolute pressure -
    - d - - kg/m3 - - density -
    - h - - J/kg - - specific enthalpy -
    - - - -
    - u - - J/kg +

    + Latitude +

    - specific internal energy +

    + 39.833° north +

    - Xi[nXi] - - kg/kg +

    + Longitude +

    - independent mass fractions m_i/m +

    + 104.65° west +

    - R - - J/kg.K +

    + Altitude +

    - gas constant +

    + 1650 m +

    - M - - kg/mol +

    + Time Zone +

    - molar mass +

    + -7 +

    -

    - Enthalpy of the water. -

    - -

    - This medium package models liquid water. -

    -

    - The mass density is computed using a constant value of 995.586 - kg/s. For a medium model in which the density is a function of - temperature, use - AixLib.Media.Specialized.Water.TemperatureDependentDensity which - may have considerably higher computing time. -

    -

    - For the specific heat capacities at constant pressure and at constant - volume, a constant value of 4184 J/(kg K), which corresponds - to 20°C is used. The figure below shows the relative error of - the specific heat capacity that is introduced by this simplification. -

    -

    - - -

    -

    - The enthalpy is computed using the convention that h=0 if - T=0 °C. -

    -

    - Limitations -

    -

    - Density, specific heat capacity, thermal conductivity and viscosity - are constant. Water is modeled as an incompressible liquid. There are - no phase changes. -

    - - --------- Errors -------- -line 17 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 - -line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 +-------- Errors -------- +line 5 column 2 - Warning: The summary attribute on the

    element is obsolete in HTML5 ----- AixLib/Fluid/FixedResistances/Junction.mo ---- +---- AixLib/Fluid/Interfaces/PrescribedOutlet.mo ---- -------- HTML Code --------

    - Model of a flow junction with an optional fixed resistance in each flow leg - and an optional mixing volume at the junction. + This model sets the temperature or the water vapor mass fraction + of the medium that leaves port_a + to the value given by the input TSet or X_wSet, + subject to optional limitations on the capacity + for heating and cooling, or limitations on the humidification or dehumidification + moisture mass flow rate. + Also, optionally the model allows to take into account first order dynamics.

    - The pressure drop is implemented using the model - - AixLib.Fluid.FixedResistances.PressureDrop. - If its nominal pressure drop is set to zero, then the pressure drop - model will be removed. - For example, the pressure drop declaration + If the parameters energyDynamics is not equal to + Modelica.Fluid.Types.Dynamics.SteadyState, + the component models the dynamic response using a first order differential equation. + The time constant of the component is equal to the parameter tau. + This time constant is adjusted based on the mass flow rate using

    -
    -   m_flow_nominal={ 0.1, 0.1,  -0.2},
    -   dp_nominal =   {500,    0, -6000}
    - 
    -

    - would model a flow mixer that has the nominal flow rates and associated pressure drops - as shown in the figure below. Note that port_3 is set to negative values. - The negative values indicate that at the nominal conditions, fluid is leaving the component. +

    + τeff = τ |ṁ| ⁄ ṁnom

    -

    - \"image\" +

    + where + τeff is the effective time constant for the given mass flow rate + and + τ is the time constant at the nominal mass flow rate + nom. + This type of dynamics is equal to the dynamics that a completely mixed + control volume would have.

    - If - energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState, - then at the flow junction, a fluid volume is modeled. - The fluid volume is implemented using the model - - AixLib.Fluid.Delays.DelayFirstOrder. - The fluid volume has the size + This model has no pressure drop. + See + AixLib.Fluid.HeatExchangers.PrescribedOutlet + for a model that instantiates this model and that has a pressure drop.

    -
    -   V = sum(abs(m_flow_nominal[:])/3)*tau/rho_nominal
    - 

    - where tau is a parameter and rho_nominal is the density - of the medium in the volume at nominal condition. - Setting energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial - can help reducing the size of the nonlinear - system of equations. + In case of reverse flow, + the fluid that leaves port_a has the same + properties as the fluid that enters port_b.

    + +-------- Corrected Code -------- +

    + This model sets the temperature or the water vapor mass fraction of + the medium that leaves port_a to the value given by the + input TSet or X_wSet, subject to optional + limitations on the capacity for heating and cooling, or limitations + on the humidification or dehumidification moisture mass flow rate. + Also, optionally the model allows to take into account first order + dynamics. +

    +

    + If the parameters energyDynamics is not equal to + Modelica.Fluid.Types.Dynamics.SteadyState, the component + models the dynamic response using a first order differential + equation. The time constant of the component is equal to the + parameter tau. This time constant is adjusted based on + the mass flow rate using +

    +

    + τeff = τ |ṁ| ⁄ ṁnom +

    +

    + where τeff is the effective time constant for the + given mass flow rate and τ is the time constant at + the nominal mass flow rate nom. This type of + dynamics is equal to the dynamics that a completely mixed control + volume would have. +

    +

    + This model has no pressure drop. See AixLib.Fluid.HeatExchangers.PrescribedOutlet + for a model that instantiates this model and that has a pressure + drop. +

    +

    + In case of reverse flow, the fluid that leaves port_a + has the same properties as the fluid that enters port_b. +

    + + +-------- Errors -------- +line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Utilities/Math/Functions/bicubic.mo ---- +-------- HTML Code -------- + + This function computes +

    + y = a1 + + a2 x1 + a3 x12 + + a4 x2 + a5 x22 + + a6 x1 x2 + + a7 x1^3 + + a8 x2^3 + + a9 x12 x2 + + a10 x1 x22 +

    + + + +-------- Corrected Code -------- +This function computes +

    + y = a1 + a2 x1 + a3 + x12 + a4 x2 + + a5 x22 + a6 x1 + x2 + a7 x1^3 + a8 + x2^3 + a9 x12 + x2 + a10 x1 + x22 +

    + + +-------- Errors -------- +line 3 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/HeatExchangers/BaseClasses/WetCoilDryWetRegime.mo ---- +-------- HTML Code -------- + +

    +

    + This model implements the switching algorithm for the dry and wet regime. +

    +

    + The switching criteria for (counter-flow) cooling coil modes are as follows.

    +

    + R1: If the coil surface temperature at the air inlet is lower than the dew-point + temperature at the inlet to the coil, then the cooling coil surface is fully-wet.

    +

    + R2: If the surface temperature at the air outlet section is higher than + the dew-point temperature of the air at the inlet, then the cooling coil surface is fully-dry.

    +

    + At each point of a simulation time step, the fuzzy-modeling approach determines + the weights for R1 and R2 respectively (namely μFW and μFD) + from the dew-point and coil surface temperatures.

    +

    + It calculates total and sensible heat transfer rates according to the weights as follows. +

    +

    + Q̇totFDtot,FDFW Qtot,FW +

    +

    + Q̇senFDsen,FDFW Qsen,FW +

    +

    + The fuzzy-modeling ensures μFW + μFD = 1, + μFW >=0 and μFD >=0, which means the fuzzy + model outcomes of sen and tot are always convex combinations of heat transfer + rates for fully-dry and fully-wet modes and therefore are always bounded by them. +

    +

    + The modeling approach also results in n-th order differentiable model + depending on the selection of the underlying membership functions. This cooling + coil model is once continuously differentiable at the mode switches. +

    + -------- Corrected Code -------- +

    - Model of a flow junction with an optional fixed resistance in each - flow leg and an optional mixing volume at the junction. + This model implements the switching algorithm for the dry and wet + regime.

    - The pressure drop is implemented using the model AixLib.Fluid.FixedResistances.PressureDrop. - If its nominal pressure drop is set to zero, then the pressure drop - model will be removed. For example, the pressure drop declaration + The switching criteria for (counter-flow) cooling coil modes are as + follows.

    -
    -   m_flow_nominal={ 0.1, 0.1,  -0.2},
    -   dp_nominal =   {500,    0, -6000}
    - 

    - would model a flow mixer that has the nominal flow rates and - associated pressure drops as shown in the figure below. Note that - port_3 is set to negative values. The negative values - indicate that at the nominal conditions, fluid is leaving the - component. + R1: If the coil surface temperature at the air inlet is lower than + the dew-point temperature at the inlet to the coil, then the cooling + coil surface is fully-wet.

    -

    - \"image\" +

    + R2: If the surface temperature at the air outlet section is higher + than the dew-point temperature of the air at the inlet, then the + cooling coil surface is fully-dry.

    - If energyDynamics <> - Modelica.Fluid.Types.Dynamics.SteadyState, then at the flow - junction, a fluid volume is modeled. The fluid volume is implemented - using the model AixLib.Fluid.Delays.DelayFirstOrder. - The fluid volume has the size + At each point of a simulation time step, the fuzzy-modeling approach + determines the weights for R1 and R2 respectively (namely + μFW and μFD) from the dew-point + and coil surface temperatures.

    -
    -   V = sum(abs(m_flow_nominal[:])/3)*tau/rho_nominal
    - 

    - where tau is a parameter and rho_nominal is - the density of the medium in the volume at nominal condition. Setting - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial - can help reducing the size of the nonlinear system of equations. + It calculates total and sensible heat transfer rates according to the + weights as follows. +

    +

    + Q̇totFDtot,FDFW + Qtot,FW +

    +

    + Q̇senFDsen,FDFW + Qsen,FW +

    +

    + The fuzzy-modeling ensures μFW + μFD = + 1, μFW >=0 and μFD >=0, + which means the fuzzy model outcomes of sen and + tot are always convex combinations of heat + transfer rates for fully-dry and fully-wet modes and therefore are + always bounded by them. +

    +

    + The modeling approach also results in n-th order + differentiable model depending on the selection of the underlying + membership functions. This cooling coil model is once continuously + differentiable at the mode switches.

    - -------- Errors -------- +line 20 column 2 - Warning:

    attribute "align" not allowed for HTML5 line 23 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/HeatPumps/ScrollWaterToWater.mo ---- +---- AixLib/Fluid/Chillers/Carnot_y.mo ---- -------- HTML Code --------

    - Model for a water to water heat pump with a scroll compressor, as described - in Jin (2002). The thermodynamic heat pump cycle is represented below. + This is model of a chiller whose coefficient of performance COP changes + with temperatures in the same way as the Carnot efficiency changes. + The input signal y is the control signal for the compressor.

    -

    - \"image\" +

    + The model allows to either specify the Carnot effectivness + ηCarnot,0, or + a COP0 + at the nominal conditions, together with + the evaporator temperature Teva,0 and + the condenser temperature Tcon,0, in which + case the model computes the Carnot effectivness as +

    +

    + ηCarnot,0 = + COP0 + ⁄ (Teva,0 ⁄ (Tcon,0-Teva,0)).

    - The rate of heat transferred to the evaporator is given by: + The chiller COP is computed as the product

    - Q̇Eva = ṁref ( hVap(TEva) - hLiq(TCon) ). + COP = ηCarnot,0 COPCarnot ηPL,

    - The power consumed by the compressor is given by a linear efficiency relation: + where COPCarnot is the Carnot efficiency and + ηPL is a polynomial in the cooling part load ratio yPL + that can be used to take into account a change in COP at part load + conditions. + This polynomial has the form

    - P = PTheoretical / η + PLoss,constant. + ηPL = a1 + a2 yPL + a3 yPL2 + ...

    - Heat transfer in the evaporator and condenser is calculated using an - ε-NTU method, assuming constant refrigerant temperature and constant heat - transfer coefficient between fluid and refrigerant. + where the coefficients ai + are declared by the parameter a.

    - Variable speed is achieved by multiplying the full load suction volume flow rate - by the normalized compressor speed. The power and heat transfer rates are forced - to zero if the resulting heat pump state has higher evaporating pressure than - condensing pressure. + On the Dynamics tag, the model can be parametrized to compute a transient + or steady-state response. + The transient response of the model is computed using a first + order differential equation for the evaporator and condenser fluid volumes. + The chiller outlet temperatures are equal to the temperatures of these lumped volumes.

    +

    Typical use and important parameters

    - The model parameters are obtained by calibration of the heat pump model to - manufacturer performance data. Calibrated model parameters for various heat - pumps from different manufacturers are found in - - AixLib.Fluid.HeatPumps.Data.ScrollWaterToWater. The calibrated model is - located in - - AixLib.Fluid.HeatPumps.Calibration.ScrollWaterToWater. + When using this component, make sure that the evaporator and the condenser have sufficient mass flow rate. + Based on the mass flow rates, the compressor power, temperature difference and the efficiencies, + the model computes how much heat will be added to the condenser and removed at the evaporator. + If the mass flow rates are too small, very high temperature differences can result.

    -

    Options

    - Parameters TConMax and TEvaMin - may be used to set an upper or lower bound for the - condenser and evaporator. - The compressor is disabled when these conditions - are not satisfied, or when the - evaporator temperature is larger - than the condenser temperature. - This mimics the temperature protection - of heat pumps and moreover it avoids - non-converging algebraic loops of equations, - or freezing of evaporator medium. - This option can be disabled by setting - enable_temperature_protection = false. + The evaporator heat flow rate QEva_flow_nominal is used to assign + the default value for the mass flow rates, which are used for the pressure drop + calculations. + It is also used to compute the part load efficiency. + Hence, make sure that QEva_flow_nominal is set to a reasonable value.

    -

    Assumptions and limitations

    - The compression process is assumed isentropic. The thermal energy - of superheating is ignored in the evaluation of the heat transferred to the refrigerant - in the evaporator. There is no supercooling. + The maximum cooling capacity is set by the parameter QEva_flow_min, + which is by default set to negative infinity.

    -

    References

    - H. Jin. - - Parameter estimation based models of water source heat pumps. - - PhD Thesis. Oklahoma State University. Stillwater, Oklahoma, USA. 2002. + The coefficient of performance depends on the + evaporator and condenser leaving temperature + since otherwise the second law of thermodynamics may be violated. +

    +

    Notes

    +

    + For a similar model that can be used as a heat pump, see + AixLib.Fluid.HeatPumps.Carnot_y.

    -------- Corrected Code --------

    - Model for a water to water heat pump with a scroll compressor, as - described in Jin (2002). The thermodynamic heat pump cycle is - represented below. -

    -

    - \"image\" + This is model of a chiller whose coefficient of performance COP + changes with temperatures in the same way as the Carnot efficiency + changes. The input signal y is the control signal for the + compressor.

    - The rate of heat transferred to the evaporator is given by: + The model allows to either specify the Carnot effectivness + ηCarnot,0, or a COP0 at the + nominal conditions, together with the evaporator temperature + Teva,0 and the condenser temperature + Tcon,0, in which case the model computes the Carnot + effectivness as

    - Q̇Eva = ṁref ( - hVap(TEva) - hLiq(TCon) - ). + ηCarnot,0 = COP0 ⁄ (Teva,0 ⁄ + (Tcon,0-Teva,0)).

    - The power consumed by the compressor is given by a linear efficiency - relation: + The chiller COP is computed as the product

    - P = PTheoretical / η + PLoss,constant. + COP = ηCarnot,0 COPCarnot ηPL,

    - Heat transfer in the evaporator and condenser is calculated using an - ε-NTU method, assuming constant refrigerant temperature and constant - heat transfer coefficient between fluid and refrigerant. + where COPCarnot is the Carnot efficiency and + ηPL is a polynomial in the cooling part load ratio + yPL that can be used to take into account a change + in COP at part load conditions. This polynomial has the form +

    +

    + ηPL = a1 + a2 yPL + + a3 yPL2 + ...

    - Variable speed is achieved by multiplying the full load suction - volume flow rate by the normalized compressor speed. The power and - heat transfer rates are forced to zero if the resulting heat pump - state has higher evaporating pressure than condensing pressure. + where the coefficients ai are declared by the + parameter a.

    - The model parameters are obtained by calibration of the heat pump - model to manufacturer performance data. Calibrated model parameters - for various heat pumps from different manufacturers are found in - AixLib.Fluid.HeatPumps.Data.ScrollWaterToWater. - The calibrated model is located in AixLib.Fluid.HeatPumps.Calibration.ScrollWaterToWater. + On the Dynamics tag, the model can be parametrized to + compute a transient or steady-state response. The transient response + of the model is computed using a first order differential equation + for the evaporator and condenser fluid volumes. The chiller outlet + temperatures are equal to the temperatures of these lumped volumes.

    - Options + Typical use and important parameters

    - Parameters TConMax and TEvaMin may be used - to set an upper or lower bound for the condenser and evaporator. The - compressor is disabled when these conditions are not satisfied, or - when the evaporator temperature is larger than the condenser - temperature. This mimics the temperature protection of heat pumps and - moreover it avoids non-converging algebraic loops of equations, or - freezing of evaporator medium. This option can be disabled by setting - enable_temperature_protection = false. + When using this component, make sure that the evaporator and the + condenser have sufficient mass flow rate. Based on the mass flow + rates, the compressor power, temperature difference and the + efficiencies, the model computes how much heat will be added to the + condenser and removed at the evaporator. If the mass flow rates are + too small, very high temperature differences can result.

    -

    - Assumptions and limitations -

    - The compression process is assumed isentropic. The thermal energy of - superheating is ignored in the evaluation of the heat transferred to - the refrigerant in the evaporator. There is no supercooling. + The evaporator heat flow rate QEva_flow_nominal is used + to assign the default value for the mass flow rates, which are used + for the pressure drop calculations. It is also used to compute the + part load efficiency. Hence, make sure that + QEva_flow_nominal is set to a reasonable value. +

    +

    + The maximum cooling capacity is set by the parameter + QEva_flow_min, which is by default set to negative + infinity. +

    +

    + The coefficient of performance depends on the evaporator and + condenser leaving temperature since otherwise the second law of + thermodynamics may be violated.

    - References + Notes

    - H. Jin. Parameter estimation based models of water source heat - pumps. PhD Thesis. Oklahoma State University. Stillwater, - Oklahoma, USA. 2002. + For a similar model that can be used as a heat pump, see AixLib.Fluid.HeatPumps.Carnot_y.

    -------- Errors -------- -line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 -line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 16 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 24 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 34 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/Geothermal/Borefields/Types.mo ---- +---- AixLib/Controls/SetPoints/Examples/OccupancySchedule.mo ---- -------- HTML Code --------

    - Enumeration that defines the pipe configuration in the borehole. + Example that demonstrates the use of the occupancy schedule. + The figure below shows how the time until the next occupancy starts or ends + is decreased. The red line hits zero when the schedule indicates an occupied time, + and the blue line hits zero when the schedule indicates a non-occupied time.

    -

    - The following pipe configurations are available in this enumeration: +

    + \"Time

    -
    - - - - - -
    EnumerationDescription
    SingleUTubeSingle U-tube configuration
    DoubleUTubeParallelDouble U-tube configuration with pipes connected in parallel
    DoubleUTubeSeriesDouble U-tube configuration with pipes connected in series
    -

    - This package contains type definitions. -

    - -------- Corrected Code --------

    - Enumeration that defines the pipe configuration in the borehole. + Example that demonstrates the use of the occupancy schedule. The + figure below shows how the time until the next occupancy starts or + ends is decreased. The red line hits zero when the schedule indicates + an occupied time, and the blue line hits zero when the schedule + indicates a non-occupied time.

    -

    - The following pipe configurations are available in this enumeration: +

    + \"Time

    - - - - - - - - - - - - - - - - - -
    - Enumeration - - Description -
    - SingleUTube - - Single U-tube configuration -
    - DoubleUTubeParallel - - Double U-tube configuration with pipes connected in parallel -
    - DoubleUTubeSeries - - Double U-tube configuration with pipes connected in series -
    -

    - This package contains type definitions. -

    -------- Errors -------- -line 8 column 2 - Warning: The summary attribute on the element is obsolete in HTML5 +line 8 column 2 - Warning:

    attribute "align" not allowed for HTML5 ----- AixLib/Fluid/FixedResistances/Validation/PlugFlowPipes/MSLAIT2Nodes.mo ---- +---- AixLib/Fluid/FixedResistances/BaseClasses/PlugFlow.mo ---- -------- HTML Code -------- -

    The example contains - - experimental data from a real district heating network. - This data is used to validate this library's - plug flow pipe model - in - AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT. -

    -

    - Note that these three models are identical, except for the pipe model that is used: -

    +

    - This comparison between different discretization levels and pipe models is made - to check the influence of the discretization and pipe model on computation time - and simulation accuracy. -

    -

    The pipes' temperatures are not initialized, thus results of outflow temperature - before approximately the first 10000 seconds should not be considered. + Model that computes the temperature propagation of + a fluid flow through a pipe, idealized as a plug flow.

    -

    Test bench schematic

    -

    \"Schematic

    -

    Calibration

    +

    Main equation

    - To calculate the length specific thermal resistance R of the pipe, - the thermal resistance of the surrounding ground is added. + The transport delay is computed using the one-dimensional wave equation + without source or sink terms, +

    + ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0,

    -

    - R=1/(0.208)+1/(2   lambdag Modelica.Constants.pi)   log(1/0.18) +

    where z(x,t) is the spatial distribution as a function of time of any + property z of the fluid. + For the temperature propagation, z will be replaced by T.

    +

    Assumptions

    - Where the thermal conductivity of the ground lambda_g = 2.4 W/(m K). + This model is based on the following assumptions:

    - -------- Corrected Code -------- -

    - The example contains - experimental data from a real district heating network. This data - is used to validate this library's plug flow - pipe model in - AixLib.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT. -

    -

    - Note that these three models are identical, except for the pipe model - that is used: -

    - -

    - This comparison between different discretization levels and pipe - models is made to check the influence of the discretization and pipe - model on computation time and simulation accuracy. -

    -

    - The pipes' temperatures are not initialized, thus results of outflow - temperature before approximately the first 10000 seconds should not - be considered. -

    -

    - Test bench schematic -

    -

    - \"Schematic -

    -

    - Calibration -

    -

    - To calculate the length specific thermal resistance R of - the pipe, the thermal resistance of the surrounding ground is added. -

    -

    - R=1/(0.208)+1/(2   lambdag Modelica.Constants.pi) -   log(1/0.18) -

    -

    - Where the thermal conductivity of the ground lambda_g = - 2.4 W/(m K). -

    - --------- Errors -------- -line 51 column 2 - Warning:

    attribute "align" not allowed for HTML5 - - ----- AixLib/Fluid/Geothermal/Borefields/UsersGuide.mo ---- --------- HTML Code -------- - -

    -This package contains borefield models. These models can simulate any arbitrary -configuration of vertical boreholes with equal lengths with both short and -long-term accuracy with an aggregation method to speed up the calculations of the ground heat transfer. Examples -of how to use the borefield models and validation cases can be found in - -AixLib.Fluid.Geothermal.Borefields.Examples -and - -AixLib.Fluid.Geothermal.Borefields.Validation, -respectively. -

    -

    -The major features and configurations currently supported are: -

    - -

    -The model is limited to the simulation of borefields with boreholes connected in -parallel, as shown on the figure below for a single U-tube configuration. All -boreholes have the same length hBor, the same radius -rBor, and are buried at the same depth dBor below the -ground surface (also known as the inactive borehole length). -

    -

    -\"image\" -

    - -

    How to use the borefield models

    -
    Borefield data record
    -

    -Most of the parameter values of the model are contained in the record called borFieDat. -This record is composed of three subrecords: -filDat (containing the thermal characteristics of the borehole filling material), -soiDat (containing the thermal characteristics of the surrounding soil), -and conDat (containing all others parameters, namely parameters -defining the configuration of the borefield). -The structure and default values of the record are in the package: -AixLib.Fluid.Geothermal.Borefields.Data. -The borFieDat record -can be found in the -AixLib.Fluid.Geothermal.Borefields.Data.Borefield subpackage therein. -Examples of the subrecords conDat, filDat and soiDat -can be found in - -AixLib.Fluid.Geothermal.Borefields.Data.Configuration, - -AixLib.Fluid.Geothermal.Borefields.Data.Filling and - -AixLib.Fluid.Geothermal.Borefields.Data.Soil, respectively. -

    -It is important to make sure that the borCon parameter within -the conDat subrecord is compatible with the chosen borefield model. -For example, if a double U-tube -borefield model is chosen, the borCon parameter could be set -to both a parallel double U-tube configuration and a double U-tube configuration in series, -but could not be set to a single U-tube configuration. An incompatible borehole -configuration will stop the simulation. + Model that computes the temperature propagation of a fluid flow + through a pipe, idealized as a plug flow.

    -
    Ground heat transfer parameters
    +

    + Main equation +

    -Other than the parameters contained in the borFieDat record, -the borefield models have other parameters which can be modified by the user. -The tLoaAgg parameter is the time resolution of the load aggregation -for the calculation of the ground heat transfer. It represents the -frequency at which the load aggregation procedure is performed in the simulation. -Therefore, smaller values of tLoaAgg will improve -the accuracy of the model, at the cost of increased simulation times -due to a higher number of events occuring in the simulation. While a default value -is provided for this parameter, it is advisable to ensure that it is lower -than a fraction (e.g. half) of the time required for the fluid to completely circulate -through the borefield, -as increasing the value of tLoaAgg beyond this -will result in non-physical borehole wall temperatures. + The transport delay is computed using the one-dimensional wave + equation without source or sink terms,

    -

    -The nCel parameter also affects the accuracy and simulation time -of the ground heat transfer calculations. As this parameter sets the number -of consecutive equal-size aggregation cells before increasing the size of cells, -increasing its value will result in less load aggregation, which will increase -accuracy at the cost of computation time. On the other hand, -decreasing the value of nCel (down to a minimum of 1) -will decrease accuracy but improve -computation time. The default value is chosen as a compromise between the two. +

    + ∂z(x,t)/∂t + v(t) ∂z(x,t)/∂x = 0,

    -Further information on the tLoaAgg and nCel parameters can -be found in the documentation of - -AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.GroundTemperatureResponse. + where z(x,t) is the spatial distribution as a function of time + of any property z of the fluid. For the temperature + propagation, z will be replaced by T.

    -
    Other parameters
    +

    + Assumptions +

    -Other parameters which can be modified include the dynamics, initial conditions, -and further information regarding the fluid flow, for example whether the flow is reversible. -It is worth noting that regardless of the energyDynamics chosen, -the dynFil parameter can be set to false -to remove the effect of the thermal capacitance -of the filling material in the borehole(s). -The nSeg parameter specifies the number of segments for the vertical discretization of the borehole(s). -Further information on this discretization can be found in the "Model description" section below. + This model is based on the following assumptions:

    -
    Running simulations
    + + +-------- Errors -------- +line 10 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/FMI/ExportContainers/ThermalZones.mo ---- +-------- HTML Code -------- + +

    + Model that is used as a container for a multiple thermal zones + that are to be exported as an FMU. +

    +

    Typical use and important parameters

    +

    + To use this model as a container for an FMU, extend + from this model, rather than instantiate it, + add your thermal zones. For each thermal zone, + add a vector of mass flow rate sensors. + By extending from this model, the top-level + signal connectors on the left stay at the top-level, and hence + will be visible at the FMI interface. +

    + + Note that + + +

    + The example + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones + shows how multiple simple thermal zones can be implemented and exported as + an FMU. + +

    + +

    + The conversion between the fluid ports and signal ports is done + in the thermal zone adapter theZonAda[nZon]. + This adapter has a vector of fluid ports called ports[nPorts] + which needs to be connected to the air volume of the thermal zones. + At this port, air exchanged between the thermal zones, the HVAC system + and any infiltration flow paths. +

    +

    + This model has input signals fluPor[nZon, nPorts] which carry + the mass flow rate for each flow that is connected to ports[1:nPorts] + for the respective zone, together with its + temperature, water vapor mass fraction per total mass of the air (not per kg dry + air), and trace substances. These quantities are always as if the flow + enters the respective room, even if the flow is zero or negative. + If a medium has no moisture, e.g., if Medium.nXi=0, or + if it has no trace substances, e.g., if Medium.nC=0, then + the output signal for these properties are removed. + Thus, a thermal zone model that uses these signals to compute the + heat added by the HVAC system need to implement an equation such as +

    +

    + Qsen = max(0, ṁsup)   cp   (Tsup - Tair,zon), +

    +

    + where + Qsen is the sensible heat flow rate added to the thermal zone, + sup is the supply air mass flow rate from + the port fluPor (which is negative if it is an exhaust), + cp is the specific heat capacity at constant pressure, + Tsup is the supply air temperature and + Tair,zon is the zone air temperature. + Note that without the max(·, ·), the energy + balance would be wrong. + For example, + + the control volumes in + + AixLib.Fluid.MixingVolumes + implement such a max(·, ·) function. +

    +

    + For each zone, its air temperature, + water vapor mass fraction per total mass of the air (unless Medium.nXi=0) + and trace substances (unless Medium.nC=0) + can be obtained from the outupt connector + fluPor[1:nZon].backward. + These signals are the same as the inflowing fluid stream(s) + at the port theAdaZon[1:nZon].ports[1:nPorts]. + The fluid connector ports[nPorts] has a prescribed mass flow rate, but + it does not set any pressure. +

    +

    + This model has a user-defined parameter nPorts + which sets the number of fluid ports, which in turn is used + for the ports fluPor and ports. + All zones must have the same number of fluid ports nPorts. + All nPorts + ports[1:nPorts] need to be connected as demonstrated in the example + + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones. +

    +

    + +

    + + + +-------- Corrected Code --------

    -When running simulations using the borefield models, -the tmp/temperatureResponseMatrix directory within the current directory -will be checked to see if any of the -borefield configurations used in the simulation have already -had their ground temperature response calculated previously -If the data doesn't exist in the tmp/temperatureResponseMatrix folder, -it will be calculated during the initialization of the model -and will be saved there for future use. + Model that is used as a container for a multiple thermal zones that + are to be exported as an FMU.

    -

    Model description

    +

    + Typical use and important parameters +

    -The borefield models rely on the following key assumptions: + To use this model as a container for an FMU, extend from this model, + rather than instantiate it, add your thermal zones. For each thermal + zone, add a vector of mass flow rate sensors. By extending from this + model, the top-level signal connectors on the left stay at the + top-level, and hence will be visible at the FMI interface. +

    Note that

    -The borefield models are constructed in two main parts: the borehole(s) and the ground heat transfer. -The former is modeled as a vertical discretization of borehole segments, where a uniform temperature increase or decrease -(due to heat injection or extraction) is superimposed to the far-field ground temperature to obtain the borehole wall -temperature. The thermal effects of the circulating fluid (including the convection resistance), -of the pipes and of the filling material are all taken into consideration, which allows modeling -short-term thermal effects in the borehole. The borehole segments do not take into account axial effects, -thus only radial (horizontal) effects are considered within the borehole(s). The thermal -behavior between the pipes and borehole wall are modeled as a resistance-capacitance network, with -the grout capacitance being split in the number of pipes present in a borehole section. -The capacitance is only present if the dynFil parameter is set to true. -The figure below shows an example for a borehole section within a single U-tube configuration. -

    -

    -\"image\" + The example + AixLib.Fluid.FMI.ExportContainers.Examples.FMUs.ThermalZones + shows how multiple simple thermal zones can be implemented and + exported as an FMU.

    -The second main part of the borefield models is the ground heat transfer, which shares a thermal boundary -condition at the uniform borehole wall with all of the borehole segments. The heat transfer in the ground -is modeled analytically as a convolution integral between the heat flux at the borehole wall -and the borefield's thermal response factor. -

    -

    -\"image\" + The conversion between the fluid ports and signal ports is done in + the thermal zone adapter theZonAda[nZon]. This adapter + has a vector of fluid ports called ports[nPorts] which + needs to be connected to the air volume of the thermal zones. At this + port, air exchanged between the thermal zones, the HVAC system and + any infiltration flow paths.

    -The model uses a load aggregation technique to reduce the time required to calculate -the borehole wall temperature changes resulting from heat injection or extraction. + This model has input signals fluPor[nZon, nPorts] which + carry the mass flow rate for each flow that is connected to + ports[1:nPorts] for the respective zone, together with + its temperature, water vapor mass fraction per total mass of the air + (not per kg dry air), and trace substances. These quantities are + always as if the flow enters the respective room, even if the flow is + zero or negative. If a medium has no moisture, e.g., if + Medium.nXi=0, or if it has no trace substances, e.g., if + Medium.nC=0, then the output signal for these properties + are removed. Thus, a thermal zone model that uses these signals to + compute the heat added by the HVAC system need to implement an + equation such as

    -

    -The ground heat transfer takes into account both the borehole axial effects and -the borehole radial effects which are a result of its cylindrical geometry. The borefield's -thermal response to a constant load, also known as its g-function, is used -to calculate the thermal response in the simulation. This g-function -is stored in the tmp/temperatureResponseMatrix subdirectory, -as discussed previously in the -"How to use the borefield models" section. Further information on the -ground heat transfer model and the thermal temperature response calculations can -be found in - -AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.GroundTemperatureResponse -and - -AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.gFunction. +

    + Qsen = max(0, ṁsup)   cp   + (Tsup - Tair,zon),

    -

    References

    -D. Picard, L. Helsen. -Advanced Hybrid Model for Borefield Heat -Exchanger Performance Evaluation; an Implementation in Modelica -Proc. of the 10th Intertional ModelicaConference, p. 857-866. Lund, Sweden. March 2014. -https://lirias.kuleuven.be/retrieve/270880. + where Qsen is the sensible heat flow rate added to + the thermal zone, sup is the supply air mass flow + rate from the port fluPor (which is negative if it is an + exhaust), cp is the specific heat capacity at + constant pressure, Tsup is the supply air + temperature and Tair,zon is the zone air + temperature. Note that without the max(·, ·), the energy + balance would be wrong. For example, + the control volumes in AixLib.Fluid.MixingVolumes + implement such a max(·, ·) function.

    - --------- Corrected Code --------

    - This package contains borefield models. These models can simulate any - arbitrary configuration of vertical boreholes with equal lengths with - both short and long-term accuracy with an aggregation method to speed - up the calculations of the ground heat transfer. Examples of how to - use the borefield models and validation cases can be found in - AixLib.Fluid.Geothermal.Borefields.Examples - and AixLib.Fluid.Geothermal.Borefields.Validation, - respectively. + For each zone, its air temperature, water vapor mass fraction per + total mass of the air (unless Medium.nXi=0) and trace + substances (unless Medium.nC=0) can be obtained from the + outupt connector fluPor[1:nZon].backward. These signals + are the same as the inflowing fluid stream(s) at the port + theAdaZon[1:nZon].ports[1:nPorts]. The fluid connector + ports[nPorts] has a prescribed mass flow rate, but it + does not set any pressure.

    - The major features and configurations currently supported are: -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Independent variableDependent variableRecord for performance dataFunction
    Volume flow ratePressure -flowParameters -pressure
    Volume flow rateEfficiency -efficiencyParameters -efficiency
    Volume flow ratePower* -powerParameters -power
    -

    *Note: This record should not be used -(i.e. use_powerCharacteristic should be false) -for the movers that take as a control signal -the mass flow rate or the head, -unless also values for the record pressure are provided. -The reason is that for these movers the record pressure -is required to be able to compute the mover speed, -which is required to be able to compute the electrical power -correctly using similarity laws. -If a Pressure record is not provided, -the model will internally override use_powerCharacteristic=false. -In this case the efficiency records will be used. -Note that in this case an error is still introduced, -but it is smaller than when using the power records. -Compare - -AixLib.Fluid.Movers.Validation.PowerSimplified -with - -AixLib.Fluid.Movers.Validation.PowerExact -for an illustration of this error. + The power consumed by the compressor is given by a linear efficiency + relation:

    -

    -These performance curves are implemented in - -AixLib.Fluid.Movers.BaseClasses.Characteristics, -and are used in the performance records in the package - -AixLib.Fluid.Movers.Data. -The package - -AixLib.Fluid.Movers.Data -contains different data records. +

    + P = PTheoretical / η + PLoss,constant.

    -
    Models that use performance curves for pressure rise

    -The models - -AixLib.Fluid.Movers.SpeedControlled_y and - -AixLib.Fluid.Movers.SpeedControlled_Nrpm -take as an input either a control signal between 0 and 1, or the -rotational speed in units of [1/min]. From this input and the current flow rate, -they compute the pressure rise. -This pressure rise is computed using a user-provided list of operating points that -defines the fan or pump curve at full speed. -For other speeds, similarity laws are used to scale the performance curves, as -described in - -AixLib.Fluid.Movers.BaseClasses.Characteristics.pressure. + Heat transfer in the evaporator and condenser is calculated using an + ε-NTU method, assuming constant refrigerant temperature and constant + heat transfer coefficient between fluid and refrigerant.

    -

    -For example, suppose a pump needs to be modeled whose pressure versus flow relation crosses, at -full speed, the points shown in the table below. + Variable speed is achieved by multiplying the full load suction + volume flow rate by the normalized compressor speed. The power and + heat transfer rates are forced to zero if the resulting heat pump + state has higher evaporating pressure than condensing pressure.

    - - - - - - - - - - - - - - - - - -
    Volume flow rate [m3⁄s] Head [Pa]
    0.000345000
    0.000635000
    0.000815000

    -Then, a declaration would be + The model parameters are obtained by calibration of the heat pump + model to manufacturer performance data. Calibrated model parameters + for various heat pumps from different manufacturers are found in + AixLib.Fluid.HeatPumps.Data.ScrollWaterToWater. + The calibrated model is located in AixLib.Fluid.HeatPumps.Calibration.ScrollWaterToWater.

    -
    -  AixLib.Fluid.Movers.SpeedControlled_y pum(
    -    redeclare package Medium = Medium,
    -    per.pressure(V_flow={0.0003,0.0006,0.0008},
    -                 dp    ={45,35,15}*1000))
    -    \"Circulation pump\";
    -
    - +

    + Options +

    -This will model the following pump curve for the pump input signal y=1. -

    -

    -\"image\" + Parameters TConMax and TEvaMin may be used + to set an upper or lower bound for the condenser and evaporator. The + compressor is disabled when these conditions are not satisfied, or + when the evaporator temperature is larger than the condenser + temperature. This mimics the temperature protection of heat pumps and + moreover it avoids non-converging algebraic loops of equations, or + freezing of evaporator medium. This option can be disabled by setting + enable_temperature_protection = false.

    - -
    Models that directly control the head or the mass flow rate
    +

    + Assumptions and limitations +

    -The models -AixLib.Fluid.Movers.FlowControlled_dp and - -AixLib.Fluid.Movers.FlowControlled_m_flow -take as an input the pressure difference or the mass flow rate. -This pressure difference or mass flow rate will be provided by the fan or pump, -i.e., the fan or pump has idealized perfect control and infinite capacity. -Using these models that take as an input the head or the mass flow rate often leads -to smaller system of equations compared to using the models that take -as an input the speed. + The compression process is assumed isentropic. The thermal energy of + superheating is ignored in the evaluation of the heat transferred to + the refrigerant in the evaporator. There is no supercooling.

    +

    + References +

    -These models can be configured for three different control inputs. -For - -AixLib.Fluid.Movers.FlowControlled_dp, -the head is as follows: + H. Jin. Parameter estimation based models of water source heat + pumps. PhD Thesis. Oklahoma State University. Stillwater, + Oklahoma, USA. 2002.

    + +-------- Errors -------- +line 6 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 12 column 2 - Warning:

    attribute "align" not allowed for HTML5 +line 18 column 2 - Warning:

    attribute "align" not allowed for HTML5 + + +---- AixLib/Fluid/HeatExchangers/Radiators/RadiatorEN442_2.mo ---- +-------- HTML Code -------- + +

    + This is a model of a radiator that can be used as a dynamic or steady-state model. + The required parameters are data that are typically available from + manufacturers that follow the European Norm EN 442-2. +

    +

    + However, to allow for varying mass flow rates, the transferred heat is computed + using a discretization along the water flow path, and heat is exchanged between + each compartment and a uniform room air and radiation temperature. + This discretization is different from the computation in EN 442-2, which + may yield water outlet temperatures that are below + the room temperature at low mass flow rates. + Furthermore, rather than using only one room temperature, this model uses + a room air and room radiation temperature. +

    +

    + The transferred heat is modeled as follows: + Let N denote the number of elements used to discretize the radiator model. + For each element i ∈ {1, … , N}, + the convective and radiative heat transfer + Qic and + Qir + from the radiator to the room is +

    +

    + Qic = sign(Ti-Ta) + (1-fr) UA ⁄ N |Ti-Ta|n +

    + Qir = sign(Ti-Tr) + fr UA ⁄ N |Ti-Tr|n +

    +

    + where + Ti is the water temperature of the element, + Ta is the temperature of the room air, + Tr is the radiative temperature, + 0 < fr < 1 is the fraction of radiant to total heat transfer, + UA is the UA-value of the radiator, + and + n is an exponent for the heat transfer. + The model computes the UA-value by numerically solving the above equations + for given + nominal heating power, nominal temperatures, fraction radiant to total heat transfer + and exponent for heat transfer. +

    +

    + The parameter energyDynamics (in the Assumptions tab), + determines whether the model computes the dynamic or the steady-state response. + For the transient response, heat storage is computed using a + finite volume approach for the + water and the metal mass, which are both assumed to be at the same + temperature. +

    +

    + The default parameters for the heat capacities are valid for a flat plate radiator without fins, + with one plate of water carying fluid, and a height of 0.42 meters. +

    + + + +-------- Corrected Code --------

    -If the parameter inputType==AixLib.Fluid.Types.InputType.Continuous, -the head is dp=dp_in, where dp_in is an input connector. + This is a model of a radiator that can be used as a dynamic or + steady-state model. The required parameters are data that are + typically available from manufacturers that follow the European Norm + EN 442-2.

    - -
  • -If the parameter inputType==AixLib.Fluid.Types.InputType.Constant, -the head is dp=constantHead, where constantHead is a parameter. + However, to allow for varying mass flow rates, the transferred heat + is computed using a discretization along the water flow path, and + heat is exchanged between each compartment and a uniform room air and + radiation temperature. This discretization is different from the + computation in EN 442-2, which may yield water outlet temperatures + that are below the room temperature at low mass flow rates. + Furthermore, rather than using only one room temperature, this model + uses a room air and room radiation temperature.

    -
  • -
  • -If the parameter inputType==AixLib.Fluid.Types.InputType.Stages, -the head is dp=heads, where heads is a -vectorized parameter. For example, if a mover has -two stages and the head of the first stage should be 60% of the nominal head -and the second stage equal to dp_nominal, set -heads={0.6, 1}*dp_nominal. -Then, the mover will have the following heads: + The transferred heat is modeled as follows: Let N denote the + number of elements used to discretize the radiator model. For each + element i ∈ {1, … , N}, the convective and radiative heat + transfer Qic and + Qir from the radiator to the room is

    - - - - - - - - - - - - - - - - - -
    input signal stageHead [Pa]
    00
    10.6*dp_nominal
    2dp_nominal
    -
  • - -

    -Similarly, for - -AixLib.Fluid.Movers.FlowControlled_m_flow, -the mass flow rate is as follows: +

    + Qic = sign(Ti-Ta) + (1-fr) UA ⁄ N + |Ti-Ta|n
    +
    + Qir = sign(Ti-Tr) + fr UA ⁄ N |Ti-Tr|n

    -