Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1122 air exchange boolean #1190

Merged
merged 21 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions AixLib/Resources/Scripts/ConvertAixLib_from_1.0.3_to_1.0.4.mos
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clear

convertClear();

// replacing use_AirExchange by two booleans in order to set natural and mechenical ventilation seperatly
// use_MechanicalAirExchange replaces use_AirExchange
// use_NaturalAirExchange gets the same boolean value by default as use_MechanicalAirExchange within the thermal zone model to enable the use of conversion scripts

convertElement("AixLib.ThermalZones.ReducedOrder.ThermalZone.ThermalZone","use_AirExchange","use_MechanicalAirExchange");

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ model ThermalZoneAirExchange "Illustrates the use of ThermalZoneAirExchange"
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
T_start=293.15,
internalGainsMode=1,
use_AirExchange=true) "Thermal zone"
use_MechanicalAirExchange=true,
use_NaturalAirExchange=true) "Thermal zone"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=AixLib.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
Expand Down Expand Up @@ -148,12 +149,12 @@ equation
index=1,
extent={{6,3},{6,3}}));
connect(thermalZone.ventTemp, weaBus.TDryBul) annotation (Line(points={{-11.3,
-3.9},{-35.65,-3.9},{-35.65,-4},{-61,-4}}, color={0,0,127}), Text(
-3.9},{-35.65,-3.9},{-35.65,-4},{-61,-4}},color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
connect(const.y, thermalZone.ventRate) annotation (Line(points={{-71,-30},{-40,
-30},{-8,-30},{-7,-30},{-7,-20},{-7,-8.4}}, color={0,0,127}));
-30},{-8,-30},{-7,-30},{-7,-4.2},{-9.6,-4.2}},color={0,0,127}));
connect(internalGains.y, thermalZone.intGains)
annotation (Line(points={{0.7,-52},{8,-52},{8,-8.4}}, color={0,0,127}));
connect(prescribedHeatFlow.port, thermalZone.intGainsRad)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ model ThermalZoneMoistCO2AirExchange
internalGainsMode=3,
recOrSep=true,
use_C_flow=true,
use_AirExchange=true) "Thermal zone"
use_MechanicalAirExchange=true,
use_NaturalAirExchange=true) "Thermal zone"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=AixLib.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ partial model PartialMultizone "Partial model for multizone models"
"Number of fluid ports"
annotation(Evaluate=true,
Dialog(connectorSizing=true, tab="General",group="Ports"));
parameter Boolean use_AirExchange=true
"Consider infiltration and ventilation by setting true";
parameter Boolean use_MechanicalAirExchange=true
"Consider mechanical ventilation by setting true";
parameter Boolean use_NaturalAirExchange=use_MechanicalAirExchange
"Consider natural ventilation and infiltration by setting true";
parameter Boolean use_C_flow=false
"Set to true to enable input connector for trace substance"
annotation (Dialog(tab="CO2"));
Expand All @@ -37,7 +39,8 @@ partial model PartialMultizone "Partial model for multizone models"
annotation (Dialog(tab="Moisture"));

replaceable model corG = SolarGain.CorrectionGDoublePane
constrainedby AixLib.ThermalZones.ReducedOrder.SolarGain.BaseClasses.PartialCorrectionG
constrainedby
AixLib.ThermalZones.ReducedOrder.SolarGain.BaseClasses.PartialCorrectionG
"Model for correction of solar transmission"
annotation(choicesAllMatching=true);

Expand Down Expand Up @@ -80,6 +83,8 @@ partial model PartialMultizone "Partial model for multizone models"
annotation (Placement(transformation(extent={{-110,-30},{-90,-50}}),
iconTransformation(extent={{-90,-60},{-70,-40}})));
AixLib.ThermalZones.ReducedOrder.ThermalZone.ThermalZone zone[numZones](
each use_NaturalAirExchange=use_NaturalAirExchange,
each use_MechanicalAirExchange=use_MechanicalAirExchange,
each recOrSep=recOrSep,
each Heater_on=Heater_on,
each h_heater=h_heater,
Expand All @@ -93,7 +98,6 @@ partial model PartialMultizone "Partial model for multizone models"
each TN_cooler=TN_cooler,
each use_C_flow=use_C_flow,
each use_moisture_balance=use_moisture_balance,
each use_AirExchange=use_AirExchange,
each XCO2_amb=XCO2_amb,
each areaBod=areaBod,
each metOnePerSit=metOnePerSit,
Expand Down
Loading