diff --git a/design/FY2023/ImprovedErrorHandling.md b/design/FY2023/ImprovedErrorHandling.md new file mode 100644 index 00000000000..57418f14d44 --- /dev/null +++ b/design/FY2023/ImprovedErrorHandling.md @@ -0,0 +1,89 @@ +# Modern Error Reporting + +One feature request pretty much summarizes the issue and solution for our error reporting: + +> "The current solution of writing out the error file to a text file without establishing a standard procedure makes it difficult for third-party vendors to translate the content. + We would prefer to start establishing a standard template for warnings/error records with unique IDs being written to the JSON files. " + +OK, so the big picture is we want an error file in JSON format with some form of ID associated with the error messages. +A nice side benefit of this would be that we could generate a bit of documentation that cross references the ID. +The documentation could be built up over time with additions like typical causes, tips and tricks for fixing or working around, etc. + +## Detailed task list + +To meet this need, I think development would follow something like this: + +- Analyze existing structure, figuring out a feasible plan for refactoring error message calls +- Create a new error manager in EnergyPlus that tracks errors in a nice structure +- Refactor calls to error message routines to use a vector of strings rather than individual calls to *Continue* +- Refactor the error message routines to not just emit to the err file but also add them to the new error manager + - (at this point I should be able to get no diffs) +- Try to find "nearly" identical error messages and bring them together + - I would expect this to cause valid diffs in the err file as minor wording changes are collected together +- Create a set of ID categories, and modify the error emission to report the error ID +- Use the error manager to generate the JSON error file +- Create an auto-generated document for the different error message IDs + +## Error File Contents + +I would start creating the error file with something like this, but am totally open to feedback, and it also may naturally change as development commences: + +```json +{ + "summary": { + "outcome": "fatal", + "num_severe": 2, + "num_warnings": 1, + "runtime": 210.2, + "timestamp": "2023-04-24T13:05:30Z" + }, + "fatal": { + "id": "F1000", + "summary": "EnergyPlus failed because of a Meta-reason", + }, + "severe": [ + { + "id": "S1021", + "synopsis": "Flow controller did not converge", + "extra_info": "Air loop 'AirLoop' diverged with oscillating flow rate. Flow controller 'ControlStrategy' is set to 'InverseMobiusStrip', which only exists in hyper dimensional systems. Choose a more appropriate option." + }, + { + "id": "S3001", + "synopsis": "Encountered meta-building in the input file", + "extra_info": "Building 'MetaBuilding' was declared with meta-latitude '\\342\\200\\234' and meta-longitude '\\742\\234\\876', which are not supported in this version of EnergyPlus" + } + ], + "warnings": [ + { + "id": "W4040", + "synopsis": "Timestep is set to 3600 seconds, which is incompatible with some cool short time step model, suggest setting it to 3599 or less.", + "extra_info": "" + } + ], + "information": [ + "Testing Individual Branch Integrity", + "All Branches passed integrity testing", + "Testing Individual Supply Air Path Integrity", + "All Supply Air Paths passed integrity testing", + "Testing Individual Return Air Path Integrity", + "All Return Air Paths passed integrity testing", + "No node connection errors were found.", + "Beginning Simulation", + "EnergyPlus Completed Successfully" + ] +} +``` + +We'll need to keep in mind how new errors can be introduced into the category system to future proof it. +Many tools do something like: A001, A002, B001, B002, so I would probably start by doing something similar. + +Things I still need to solve: +- Should I include timestamp info for every single warning? +- Add structure for recurring +- Add extra flag for whether warmup, sizing, or kickoff were true + +## Current questions for dev team + +- What should we name this JSON based error file? +- Do we just keep a list of message string templates in a single dedicated file, and use these in calls to errors? +- Anyone have strong feelings on the ID or JSON form? diff --git a/design/FY2024/NFP-Space Sizing and HVAC-Part4.md b/design/FY2024/NFP-Space Sizing and HVAC-Part4.md new file mode 100644 index 00000000000..029ba7e734b --- /dev/null +++ b/design/FY2024/NFP-Space Sizing and HVAC-Part4.md @@ -0,0 +1,214 @@ +Extend Spaces to Sizing and HVAC - Part 4 +================ + +**Michael J. Witte, GARD Analytics, Inc.** + + - Original June 17, 2024 + - Revised, August 2, 2024 + +## Table of Contents ## + +[E-mail and Conference Call Conclusions](#e-mail-and-conference-call-conclusions) + +[Background and Overiew](#background-and-overview) + +[Approach](#approach) + +[Testing/Validation/Data Sources](#testingvalidationdata-sources) + +[Input Description](#input-description) + +[Outputs Description](#outputs-description) + +[Engineering Reference](#engineering-reference) + +[Example File and Transition Changes](#example-file-and-transition-changes) + +[Design](#design) + +## E-mail and Conference Call Conclusions ## +June 17-20, Q&A in the pull request with rraustad. Made some minor updates to the NFP to clarify the sizing methods and to mention that an spsz output file will be created, similar to the existing zsz output. + + +## Background and Overview ## + +Space was added as a new concept in v9.6. Each EnergyPlus Zone contains one or more Spaces which are used for: + + * assigning and allocating internal gains + * specifying enclosure boundaries, + * reporting inputs grouped by space types, and + * reporting select output grouped by space types. + +For the zone heat balance each thermal Zone is composed of one or more Spaces controlled by a single thermostat or HVAC system control point such as a VAV terminal unit. + +In version 23.1 options were added to perform the air heat balance for each Space or each Zone, and space-level heat balance output variables were added. + +In version 23.2, the following capabilities were added: + + * When ZoneAirHeatBalanceAlgorithm "Do Space Heat Balance for Sizing" = Yes, zone sizing is also done for all spaces. The HVAC Sizing Summary table report will include subtables for Space Sensible Cooling and Heating as well as for Zone Sensible Cooling and Heating. Space Sizing will also be reported to the eio output. The space sizing results are reported, but not used. + + * Three new objects, SpaceHVAC:EquipmentConnections, SpaceHVAC:ZoneEquipmentSplitter, and SpaceHVAC:ZoneEquipmentMixer allow one or more zones to be simulated at the space level for HVAC, leading to independent air temperature and humidity in each space. + + * For zone equipment serving multiple spaces, three thermostat control options (SingleSpace, Ideal, and Maximum). + +This NFP proposes additional optional capabilities: + + * Use the Space-level (room-by-room) sizing results to size Zone-level equipment to either the coincident or non-coincident peak across the Spaces (rooms). + + * Refine existing Space-level HVAC simulation. + + * Extend space HVAC to support more special objects (e.g. ZoneThermalChimney, if budget allows). + + + +## Approach ## +### Sizing +A new input will be added to Sizing:Zone to allow zone sizing using the non-coincident space peaks or the coincident peak. + +Space sizing is an actual heat balance on each space. Currently zone sizing is an actual heat balance on each zone (as a whole) although some of the components for the zone heat balance are sums across the spaces (even when space heat balance is off). e.g. internal gains. The current zone sizing calculations will be used to calculate the coincident zone sizing using the combined spaces. + +For the non-coincident zone sizing, the individual space peaks will be summed and other values (such as outdoor temperature) will be averaged. + +When space sizing is active, sizing results are reported in the table output for both spaces and zones. There will be no change here. + +When space sizing is active, a new spssz output file will be generated, similar to the existing zsz output. This will require a new field in the OutputControl:Files object. + + +### HVAC +* Calculate return flows at the Space level. Currently, space return nodes can be specified, but there is no flow assigned to them. All return flow is lumped at the zone level. + + +![SpaceHVACSchematic](SpaceHVACSchematic.png) + + + +## Testing/Validation/Data Sources ## + +Compare Space vs Zone-level results. + +## Input Description ## +Some new objects and some changes to existing objects are proposed. + +### Sizing:Zone +* *New field at the end:"* +``` + A15; \field Type of Space Sum to Use + \type choice + \key Coincident + \key NonCoincident + \default Coincident +``` + +### OutputControl:Files +* *New field in the middle:"* +``` + A9 , \field Output Space Sizing + \type choice + \key Yes + \key No + \default Yes +``` + +### ZoneRefrigerationDoorMixing +(If budget allows, otherwise limit these to single-space zones.) +* *Change field "Zone 1 Name" to "Zone or Space Name 1."* + +* *Change field "Zone 2 Name" to "Zone or Space Name 2."* + +### ZoneCoolTower:Shower +(If budget allows, otherwise limit these to single-space zones.) +* *Change field "Zone Name" to "Zone or Space Name."* + +### ZoneThermalChimney +(If budget allows, otherwise limit these to single-space zones.) +* *Change field "Zone N Name" to "Inlet Zone or Space Name N."* + +### idf Example + + +## Outputs Description ## +A new Spsz output file will be created when space sizing is active. + + +## Engineering Reference ## + + +## Example File and Transition Changes ## + +* Transition will be required for idf OutputControl:Files. + +* Field name changes may be required for epJSON inputs for ZoneRefrigerationDoorMixing, ZoneCoolTower:Shower, and/or ZoneThermalChimney. + +* The existing example file 5ZoneAirCooledWithSpaces will be copied to a new example file that uses the new Sizing:Zone Coincident Space sum option. + + +## Design ## + +### Sizing ### + +When Space sizing is requested, the following arrays are created for Spaces. + +``` + Array2D SpaceSizing; // Data for space sizing (all data, all design) + EPVector FinalSpaceSizing; // Final data for space sizing including effects + Array2D CalcSpaceSizing; // Data for space sizing (all data) + EPVector CalcFinalSpaceSizing; // Final data for space sizing (calculated only) +``` + +The main calculation flow for Zone sizing is: + +* `SizingManager::ManageSizing` + * Get sizing inputs (`GetOARequirements . . . GetPlantSizingInput`). + * Loop over sizing environments and days + ``` + UpdateZoneSizing(state, Constant::CallIndicator::BeginDay); + Loop over hours and timesteps + ManageWeather(state); + UpdateSysSizing(state, Constant::CallIndicator::DuringDay); + ManageHeatBalance(state); + UpdateZoneSizing(state, Constant::CallIndicator::EndDay); + UpdateZoneSizing(state, Constant::CallIndicator::EndZoneSizingCalc); + ``` + * Repeat (with a pulse) if zone component loads report is requested. + * `ZoneEquipmentManager::UpdateZoneSizing` (where all the work is done.) + * `case Constant::CallIndicator::BeginDay:` + * Do some initializations on `CalcZoneSizing` + * `case Constant::CallIndicator::DuringDay:` + * Called from `HVACManager` + * save the results of the ideal zone component calculation in the CalcZoneSizing sequence variables + * Works on `ZoneSizing` and `CalcZoneSizing` + * `case Constant::CallIndicator::EndDay:` + * Compute moving averages + * Save values at peak heating and cooling + * Works on `CalcZoneSizing` and `CalcFinalZoneSizing` + * *In this function add the zone sizing coincident/non-coincident option and calculations.* + + * `case Constant::CallIndicator::EndZoneSizingCalc:` + * Apply EMS overrides + * Output sizing results from `CalcFinalZoneSizing` + * Move sizing data into final sizing array according to sizing method + * Works on `CalcZoneSizing`, `CalcFinalZoneSizing`, `ZoneSizing`, and `FinalZoneSizing` + * Lots going on in here. + +### HVAC ### + +The main calculation flow for Zone and Space HVAC in `HVACManager:ManageHVAC` is as follows, with notes about changes required for Space-HVAC. + +* `ZoneTempPredictorCorrector::ManageZoneAirUpdates(... GetZoneSetPoints)` + * `CalcZoneAirTempSetPoints` +* `ZoneTempPredictorCorrector::ManageZoneAirUpdates(... PredictStep)` + * `PredictSystemLoads` +* `SimHVAC` + * `SetPointManager::ManageSetPoints(state);` + * `SimSelectedEquipment` + * `SimAirServingZones::ManageAirLoops` + * `ZoneEquipmentManager::ManageZoneEquipment` + * `CalcZoneReturnFlows`* + * *Add space return flow calculations here.* + * *Likely refactor this function to be callable for either zone or space.* + * `PlantManager::ManagePlantLoops` +* `ZoneTempPredictorCorrector::ManageZoneAirUpdates(... CorrectStep)` + * `correctZoneAirTemps` + + + diff --git a/design/FY2024/SpaceHVACSchematic.png b/design/FY2024/SpaceHVACSchematic.png new file mode 100644 index 00000000000..5a294f7b29d Binary files /dev/null and b/design/FY2024/SpaceHVACSchematic.png differ diff --git a/doc/input-output-reference/src/overview/group-airflow.tex b/doc/input-output-reference/src/overview/group-airflow.tex index 4d6aea4e36c..f70b854e548 100644 --- a/doc/input-output-reference/src/overview/group-airflow.tex +++ b/doc/input-output-reference/src/overview/group-airflow.tex @@ -1518,7 +1518,7 @@ \subsection{ZoneRefrigerationDoorMixing}\label{zonerefrigerationdoormixing} ZoneRefrigerationDoorMixing is ideally suited for two zones, at least one of which is refrigerated, that exchange an equal amount of dry air. As with \hyperref[zonemixing]{ZoneMixing}, this is a simplified interzone airflow in EnergyPlus. The ZoneRefrigerationDoorMixing approach shares some features of both \hyperref[zonemixing]{ZoneMixing} and \hyperref[zonecrossmixing]{ZoneCrossMixing}. Like \hyperref[zonecrossmixing]{ZoneCrossMixing}, ZoneRefrigerationDoorMixing has an energy effect on both the source and the receiving zone, thus maintaining both the air mass and energy balances in the two zones. Unlike the other two mixing objects, ZoneRefrigerationDoorMixing always calculates the air exchange rate based on the zone temperature and relative humidity. That is, the user does not specify the air flow rate. The user can moderate the flow through a door-opening schedule. -ZoneRefrigerationDoorMixing can only be entered once for any unique pair of zones. It doesn't matter which zone is listed first and the zones will automatically switch back and forth between source and receiving zones depending upon which zone is colder. +ZoneRefrigerationDoorMixing can only be entered once for any unique pair of zones. It doesn't matter which zone is listed first and the zones will automatically switch back and forth between source and receiving zones depending upon which zone is colder. If space heat balance is active and a space name is specified for Zone or Space Name 1 or 2, then the space conditions will be used and the exchange will be with that space only. If space heat balance is active and a zone name is specified, then the aveerage zone conditions will be used, and the exchange will be proportioned to all spaces in the zone by space volume. \subsubsection{Inputs}\label{inputs-7-003} @@ -1526,13 +1526,13 @@ \subsubsection{Inputs}\label{inputs-7-003} The name of the ZoneRefrigerationDoorMixing object. -\paragraph{Field: Zone 1~ Name}\label{field-zone-1-name} +\paragraph{Field: Zone or Space Name 1}\label{field-zone-1-name} -This field is the name of one of the two zones (ref: Zone) exchanging air and attaches a particular refrigeration door~ mixing statement to both thermal zones in the building. +This field is the name of one of the two zones (ref: Zone) or spaces exchanging air and attaches a particular refrigeration door~ mixing statement to both thermal zones or spaces in the building. If a space name is used, it must belong to a different zone than Zone or Space Name 2. -\paragraph{Field: Zone 2~ Name}\label{field-zone-2-name} +\paragraph{Field: Zone or Space Name 2}\label{field-zone-2-name} -This field is the name of the other zone (ref: Zone) exchanging air and attaches a particular refrigeration door~ mixing statement to both thermal zones in the building. +This field is the name of the other zone (ref: Zone) or space exchanging air and attaches a particular refrigeration door~ mixing statement to both thermal zones or spaces in the building. If a space name is used, it must belong to a different zone than Zone or Space Name 1. \paragraph{Field: Schedule Name}\label{field-schedule-name-5} @@ -1965,9 +1965,9 @@ \subsubsection{Inputs}\label{inputs-8-002} This field is the name of the schedule that denotes whether the cooltower can run during a given time period. A schedule value greater than 0 (usually 1 is used) indicates that the cooltower is available and can be on during the time period. A value less than or equal to 0 (usually 0 is used) denotes that the cooltower is not available and must be off for the time period. If this field is blank, the schedule has values of 1 for all time periods. -\paragraph{Field: Zone Name}\label{field-zone-name-6} +\paragraph{Field: Zone or Space Name}\label{field-zone-name-6} -This field is the name of the zone (ref: Zone) and attaches a particular cooltower statement to a thermal zone in the building. +This field is the name of the zone (ref: Zone) or space the cooltower is attached to. \paragraph{Field: Water Supply Storage Tank Name}\label{field-water-supply-storage-tank-name} @@ -2185,9 +2185,9 @@ \subsubsection{Inputs} This dimensionless number is the discharge coefficient of the thermal chimney. The ventilation rate enhanced by the thermal chimney is also dependent on the discharge coefficient. -\paragraph{Field: Zone \textless{}\#\textgreater{} Name}\label{field-zone-name-8} +\paragraph{Field: Zone or Space Name \textless{}\#\textgreater{}}\label{field-zone-name-8} -This field is the name of the zone (ref: Zone) to which the thermal chimney is attached. It is used in conjunction with the next three fields. Note that up to 20 sets of zone name, distance from the top of the thermal chimney to each inlet, relative ratios of air flow rates passing through each zone and cross sectional areas of each air channel inlet may be entered for a single thermal chimney if multiple zones share the common thermal chimney. +This field is the name of the zone (ref: Zone) or space to which the thermal chimney is attached. It is used in conjunction with the next three fields. Note that up to 20 sets of zone or space name, distance from the top of the thermal chimney to each inlet, relative ratios of air flow rates passing through each zone and cross sectional areas of each air channel inlet may be entered for a single thermal chimney if multiple zones or spaces share the common thermal chimney. If space heat balance is active and a space name is specified for Zone or Space Name, then the space conditions will be used and the exchange will be with that space only. If space heat balance is active and a zone name is specified, then the aveerage zone conditions will be used, and the exchange will be proportioned to all spaces in the zone by space volume. \paragraph{Field: Distance from Top of Thermal Chimney to Inlet \textless{}\#\textgreater{}}\label{field-distance-from-top-of-thermal-chimney-to-inlet} diff --git a/doc/input-output-reference/src/overview/group-daylighting.tex b/doc/input-output-reference/src/overview/group-daylighting.tex index 340e6df8e8d..769bf3ae999 100644 --- a/doc/input-output-reference/src/overview/group-daylighting.tex +++ b/doc/input-output-reference/src/overview/group-daylighting.tex @@ -505,7 +505,7 @@ \subsubsection{Outputs}\label{outputs-1-004} \subsection{Output:IlluminanceMap}\label{outputilluminancemap} -The Output:IlluminanceMap object expands on the reporting capabilities of the daylighting simulation. For any zone simulated with \hyperref[daylightingcontrols-000]{Daylighting:Controls}, the illuminance map can generate up to 2,500 points of additional daylighting illuminance values. The resulting map is output as a comma delimited text file that can be imported into a spreadsheet program for rapid visualization of the daylighting illuminance patterns in a zone. The values are produced on an hourly basis. The Z height of the map is constant (parallel to a flat floor). More than one illuminance map can be created for a zone. IlluminanceMap output is available only when SplitFlux daylighting method is selected in \hyperref[daylightingcontrols-000]{Daylighting:Controls} object. +The Output:IlluminanceMap object expands on the reporting capabilities of the daylighting simulation. For any space or zone simulated with \hyperref[daylightingcontrols-000]{Daylighting:Controls}, the illuminance map can generate up to 2,500 points of additional daylighting illuminance values. The resulting map is output as a comma delimited text file that can be imported into a spreadsheet program for rapid visualization of the daylighting illuminance patterns in a space or zone. The values are produced on an hourly basis. The Z height of the map is constant (parallel to a flat floor). More than one illuminance map can be created for a space or zone. IlluminanceMap output is available only when SplitFlux daylighting method is selected in \hyperref[daylightingcontrols-000]{Daylighting:Controls} object. \subsubsection{Inputs}\label{inputs-4-006} @@ -513,13 +513,13 @@ \subsubsection{Inputs}\label{inputs-4-006} The name of the map object. -\paragraph{Field: Zone Name}\label{field-zone-name-2-000} +\paragraph{Field: Zone or Space Name}\label{field-zone-name-2-000} -Reference to a zone with \hyperref[daylightingcontrols-000]{Daylighting:Controls}. The zone must lie completely within a single solar enclosure. +Reference to a zone or space with \hyperref[daylightingcontrols-000]{Daylighting:Controls}. If a zone name is specified, all spaces in the zone must be within the same solar enclosure. \paragraph{Field: Z Height}\label{field-z-height} -The height or elevation of the grid of daylighting points. +The height or elevation of the grid of daylighting points. Coordinates may be world or relative as specified in the \hyperref[globalgeometryrules]{GlobalGeometryRules} object Daylighting Reference Point CoordinateSystem field. If a space name is specifice for this map, relative coodinates are relative to the origin of the zone that contains the space (spaces do not have a separate origin). \paragraph{Field: X Minimum Coordinate}\label{field-x-minimum-coordinate} @@ -551,7 +551,7 @@ \subsubsection{Inputs}\label{inputs-4-006} Output:IlluminanceMap, Daylit Map, ! Map Name - Daylit Zone, ! Zone Name + Daylit Zone, ! Zone or Space Name 0, ! Z Height [m] 0.1, ! X Minimum Coordinate [m] 4.9, ! X Maximum Coordinate [m] diff --git a/doc/input-output-reference/src/overview/group-design-objects.tex b/doc/input-output-reference/src/overview/group-design-objects.tex index bb409c98116..83ad7b5d614 100644 --- a/doc/input-output-reference/src/overview/group-design-objects.tex +++ b/doc/input-output-reference/src/overview/group-design-objects.tex @@ -1295,11 +1295,15 @@ \subsubsection{Inputs}\label{inputs-4-008} Sizing Method = Sensible Load Only No Latent Load or a zone humidistat is present. A default of 50.0 will be used if no schedule is provided and no humidistat is associated with this zone. +\paragraph{Field: Type of Space Sum to Use}\label{field-type-of-space-sum-to-use} + +If the input is \emph{coincident} the zone equipment will be sized on the coincident zone load across all spaces in the zone. If the input is \emph{noncoincident} the zone equipment will be sized on the sum of the noncoincident space loads. The default is \emph{coincident}. This field is ignored unless \hyperref[zoneairheatbalancealgorithm]{ZoneAirHeatBalanceAlgorithm} ``Do Space Heat Balance for Sizing'' is Yes. + An IDF example: \begin{lstlisting} -Sizing:Zone, + Sizing:Zone, SPACE5-1, !- Name of a zone 14., !- Zone cooling design supply air temperature {C} 50., !- Zone heating design supply air temperature {C} @@ -1331,16 +1335,17 @@ \subsubsection{Inputs}\label{inputs-4-008} , !- Zone Humidification Design Supply Air Humidity Ratio 0.005, !- Zone Heating Design Supply Air Humidity Ratio Difference , !- Zone Humidistat Dehumidification Set Point Schedule Name - ; !- Zone Humidistat Humidification Set Point Schedule Name - + , !- Zone Humidistat Humidification Set Point Schedule Name + Coincident; !- Type of Space Sum to Use + DesignSpecification:OutdoorAir, - DSOA1, !- Name - SUM, !- Outdoor Air Method - 0.00236, !- Outdoor Air Flow per Person - 0.000305, !- Outdoor Air Flow per Zone Floor Area - 0.0, !- Outdoor Air Flow per Zone - 0.0, !- Outdoor Air Flow Air Changes per Hour - ; !- Outdoor Air Flow Rate Fraction Schedule Name + DSOA1, !- Name + SUM, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person + 0.000305, !- Outdoor Air Flow per Zone Floor Area + 0.0, !- Outdoor Air Flow per Zone + 0.0, !- Outdoor Air Flow Air Changes per Hour + ; !- Outdoor Air Flow Rate Fraction Schedule Name DesignSpecification:ZoneAirDistribution, DSZADO1, !- Name diff --git a/doc/input-output-reference/src/overview/group-simulation-parameters.tex b/doc/input-output-reference/src/overview/group-simulation-parameters.tex index f26cd185a3e..133543c557a 100644 --- a/doc/input-output-reference/src/overview/group-simulation-parameters.tex +++ b/doc/input-output-reference/src/overview/group-simulation-parameters.tex @@ -473,7 +473,7 @@ \subsubsection{Inputs}\label{inputs-8-023} If yes, space-level heat balance will be calculated and reported during sizing, and space sizing results will be reported along with zone sizing results. If no, then only zone-level heat balance will be calculated. This field defaults to No. For zones with more than one space, the zone sizing results are calculated for the whole zone and represent the coincident peak for the spaces in the zone. Note that space heat balance is not supported for \hyperref[inputs-hm]{HybridModel:Zone}, \hyperref[roomairmodeltype]{RoomAirModelType} other than Mixing, \hyperref[heatbalancealgorithm]{HeatBalanceAlgorithm} MoisturePenetrationDepthConductionTransferFunction and CombinedHeatAndMoistureFiniteElement. \paragraph{Field: Do Space Heat Balance for Simulation}\label{field-do-space-heat-balance-simulation} -If yes, space-level heat balance will be calculated and reported during the simulation. If no, then only zone-level heat balance will be calculated. This field defaults to No. When this field is Yes, optional SpaceHVAC objects may be used to distribute zone HVAC equipment output to the spaces in the zone. See \hyperref[spacehvacequipmentconnections]{SpaceHVAC:EquipmentConnections}, \hyperref[spacehvaczoneequipmentsplitter]{SpaceHVAC:ZoneEquipmentSplitter} and \hyperref[spacehvaczoneequipmentmixer]{SpaceHVAC:ZoneEquipmentMixer}. +If yes, space-level heat balance will be calculated and reported during the simulation. If no, then only zone-level heat balance will be calculated. This field defaults to No. When this field is Yes, optional SpaceHVAC objects may be used to distribute zone HVAC equipment output to the spaces in the zone. See \hyperref[spacehvacequipmentconnections]{SpaceHVAC:EquipmentConnections}, \hyperref[spacehvaczoneequipmentsplitter]{SpaceHVAC:ZoneEquipmentSplitter}, \hyperref[spacehvaczoneequipmentmixer]{SpaceHVAC:ZoneEquipmentMixer} and \hyperref[spacehvaczonereturnmixer]{SpaceHVAC:ZoneReturnMixer}. And, a default IDF example is shown below: diff --git a/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex b/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex index 586043ef97b..3582195a29f 100644 --- a/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex +++ b/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex @@ -2772,11 +2772,11 @@ \subsubsection{Inputs}\label{inputs-25-004} \paragraph{Field: Zone or ZoneList Name}\label{field-zone-or-zonelist-name-14} -This field is the name of the \hyperref[zone]{Zone} or \hyperref[zonelist]{ZoneList} in which the internal mass will be added. When the ZoneList option is used then this internal mass object is applied to each of zone in the list. The name of the actual internal mass object in each zone becomes and should be less than the standard length (100 characters) for a name field. If it is greater than this standard length, it may be difficult to specify in output reporting as it will be truncated. A warning will be shown if the generated name is greater than 100 characters. If it duplicates another such concatenated name, there will be a severe error and terminate the run. +This field is the name of the \hyperref[zone]{Zone} or \hyperref[zonelist]{ZoneList} in which the internal mass will be added. When the ZoneList option is used then this internal mass object is applied to each zone in the list. The name of the actual internal mass object in each zone becomes and should be less than the standard length (100 characters) for a name field. If it is greater than this standard length, it may be difficult to specify in output reporting as it will be truncated. A warning will be shown if the generated name is greater than 100 characters. If it duplicates another such concatenated name, there will be a severe error and terminate the run. This field is ignored when a Space or SpaceList Name is specified. \paragraph{Field: Space or SpaceList Name}\label{field-space-or-spacelist-name-14} -This field is the name of the \hyperref[space]{Space} or \hyperref[spacelist]{SpaceList} in which the internal mass will be added. When the SpaceList option is used then this internal mass object is applied to each space in the list. The name of the actual internal mass object in each space becomes and should be less than the standard length (100 characters) for a name field. If it is greater than this standard length, it may be difficult to specify in output reporting as it will be truncated. A warning will be shown if the generated name is greater than 100 characters. If it duplicates another such concatenated name, there will be a severe error and terminate the run. This field is ignored when a ZoneList Name is specified for Zone or ZoneList Name. If a Space Name is used, then the Space must be part of Zone Name. If a SpaceList Name is used, then the Zone Name is ignored (even though it is a required field), and the surface is assigned to the corresponding Zone(s) for each Space in the SpaceList. +This field is the name of the \hyperref[space]{Space} or \hyperref[spacelist]{SpaceList} in which the internal mass will be added. If this field is blank (or a ZoneList Name is specified), the internal mass will be added to the last space attached to the zone. When the SpaceList option is used then this internal mass object is applied to each space in the list. The name of the actual internal mass object in each space becomes and should be less than the standard length (100 characters) for a name field. If it is greater than this standard length, it may be difficult to specify in output reporting as it will be truncated. A warning will be shown if the generated name is greater than 100 characters. If it duplicates another such concatenated name, there will be a severe error and terminate the run. This field is ignored when a ZoneList Name is specified for Zone or ZoneList Name. If this field is entered, then the Zone or ZoneList Name is ignored, and the surface is assigned to the corresponding Zone(s) for the Space(s). \paragraph{Field: Surface Area}\label{field-surface-area} @@ -2789,13 +2789,15 @@ \subsubsection{Inputs}\label{inputs-25-004} Zn002:IntM001, !- Surface Name INTERIOR, !- Construction Name DORM ROOMS AND COMMON AREAS, !- Zone or ZoneList Name - 408.7734; !- Total area exposed to Zone {m2} + , !- Space or SpaceList Name + 408.7734; !- Surface Area {m2} InternalMass, Zn002:IntM002, !- Surface Name PARTITION02, !- Construction Name DORM ROOMS AND COMMON AREAS, !- Zone or ZoneList Name - 371.6122; !- Total area exposed to Zone {m2} + , !- Space or SpaceList Name + 371.6122; !- Surface Area {m2} \end{lstlisting} \subsection{Surface Output Variables/Reports}\label{surface-output-variablesreports} diff --git a/doc/input-output-reference/src/overview/group-zone-equipment.tex b/doc/input-output-reference/src/overview/group-zone-equipment.tex index 32ffff31da9..600d3c236ef 100644 --- a/doc/input-output-reference/src/overview/group-zone-equipment.tex +++ b/doc/input-output-reference/src/overview/group-zone-equipment.tex @@ -388,7 +388,7 @@ \subsubsection{Inputs}\label{inputs-2-048} \subsection{SpaceHVAC:EquipmentConnections}\label{spacehvacequipmentconnections} If HVAC equipment is modeled at the Space level for one or more zones, the SpaceHVAC:EquipmentConnections statement defines the node connections to a space. Any space modeled with SpaceHVAC:EquipmentConnections will have its own air temperature and humidity ratio, and surfaces and internal gains in the zone will interact with the space conditions. -Note that all nodes mentioned in the SpaceHVAC:EquipmentConnections input must be unique. That is, all nodes in all the SpaceHVAC:EquipmentConnections statements referenced by the ``Space Air Inlet Nodes'', ``Space Air Exhaust Nodes'', ``Space Air Node Name'' and ``Space Return Air Node Name'' cannot have any node name appearing more than once. Unlike ZoneHVAC:EquipmentConnections, there is no equipment list. Equipment is connected to spaces using \hyperref[spacehvaczoneequipmentsplitter]{SpaceHVAC:ZoneEquipmentSplitter} and \hyperref[spacehvaczoneequipmentmixer]{SpaceHVAC:ZoneEquipmentMixer} as shown in Figure \ref{fig:space-hvac-equipment-connections}. If any space in a zone has a SpaceHVAC:EquipmentConnections object, then all spaces in that zone must have one, even if they are not served by any HVAC equipment. SpaceHVAC is only used when \hyperref[zoneairheatbalancealgorithm]{ZoneAirHeatBalanceAlgorithm} ``Do Space Heat Balance for Simulation'' is Yes. +Note that all nodes mentioned in the SpaceHVAC:EquipmentConnections input must be unique. That is, all nodes in all the SpaceHVAC:EquipmentConnections statements referenced by the ``Space Air Inlet Nodes'', ``Space Air Exhaust Nodes'', ``Space Air Node Name'' and ``Space Return Air Node Name'' cannot have any node name appearing more than once. Unlike ZoneHVAC:EquipmentConnections, there is no equipment list. Equipment is connected to spaces using \hyperref[spacehvaczoneequipmentsplitter]{SpaceHVAC:ZoneEquipmentSplitter}, \hyperref[spacehvaczoneequipmentmixer]{SpaceHVAC:ZoneEquipmentMixer} and \hyperref[spacehvaczonereturnmixer]{SpaceHVAC:ZoneReturnMixer} as shown in Figure \ref{fig:space-hvac-equipment-connections}. If any space in a zone has a SpaceHVAC:EquipmentConnections object, then all spaces in that zone must have one, even if they are not served by any HVAC equipment. SpaceHVAC is only used when \hyperref[zoneairheatbalancealgorithm]{ZoneAirHeatBalanceAlgorithm} ``Do Space Heat Balance for Simulation'' is Yes. \begin{figure}[hbtp] \centering @@ -581,3 +581,45 @@ \subsubsection{Inputs}\label{inputs-1-052-seqmixer} Zone 5-Remainder In Node; !- Space 3 Node Name \end{lstlisting} +\subsection{SpaceHVAC:ZoneReturnMixer}\label{spacehvaczonereturnmixer} + +The SpaceHVAC:ZoneReturnMixer object mixes the airflow from one or more space return air nodes to a zone return air node. + +\subsubsection{Inputs}\label{inputs-1-052-sretmixer} + +\paragraph{Field: Name}\label{field-sretmixer-name-015} + +Name of the mixer object. + +\paragraph{Field: Zone Name}\label{field-sretmixer-zone-name} + +Name of the zone which contains the return air node. + +\paragraph{Field: Zone Return Air Node Name}\label{field-sretmixer-zone-return-air-node-name} + +Name of the zone return air node that is supplied by the Space Return Air Nodes. + +\paragraph{Field: Space \textless{}x\textgreater{} Name}\label{field-sretmixer-space-name} + +Name of a space to supply air to this zone return air node. + +\paragraph{Field: Space \textless{}x\textgreater{} Return Air Node Name}\label{field-sretmixer-space-node-name} + +The name of a \hyperref[spacehvacequipmentconnections]{SpaceHVAC:EquipmentConnections} Return Air Node Name that sends airflow to the Zone Return Air Node. + +An example of this statement in an IDF is: + +\begin{lstlisting} + + SpaceHVAC:ZoneReturnMixer, + Zone 5 Return Mixer, !- Name + Zone 5, !- Zone Name + Zone 5 Out Node, !- Zone Return Air Node Name + Space 5 Office, !- Space 1 Name + Space 5 Office Return Node, !- Space 1 Return Air Node Name + Space 5 Conference, !- Space 2 Name + Space 5 Conference Return Node, !- Space 2 Return Air Node Name + Zone 5-Remainder, !- Space 3 Name + Zone 5-Remainder Return Node; !- Space 3 Return Air Node Name +\end{lstlisting} + diff --git a/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex b/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex index 2daad751ecc..43f2e9f2f5e 100644 --- a/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex +++ b/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex @@ -4060,7 +4060,7 @@ \subsubsection{Inputs}\label{inputs-14-018} \paragraph{Field: Supply Air Fan Object Type}\label{field-supply-air-fan-object-type-8} -This choice field contains the identifying type of supply air fan specified for the furnace. Fan type must be \textit{\hyperref[fanonoff]{Fan:OnOff}}, \textit{\hyperref[fanconstantvolume]{Fan:ConstantVolume}}, \textit{\hyperref[fansystemmodel]{Fan:SystemModel}} or \textit{\hyperref[fanvariablevolume]{Fan:VariableVolume}}. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel}, \hyperref[fanonoff]{Fan:OnOff}, or \hyperref[fanconstantvolume]{Fan:ConstantVolume} if \hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow} is used to model the VRF outdoor unit. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel} or \hyperref[fanvariablevolume]{Fan:VariableVolume} if AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl or AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl:HR is used to model the VRF outdoor unit. +This choice field contains the identifying type of supply air fan specified for the furnace. Fan type must be \textit{\hyperref[fanonoff]{Fan:OnOff}}, \textit{\hyperref[fanconstantvolume]{Fan:ConstantVolume}}, \textit{\hyperref[fansystemmodel]{Fan:SystemModel}}. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel}, \hyperref[fanonoff]{Fan:OnOff}, or \hyperref[fanconstantvolume]{Fan:ConstantVolume} if \hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow} is used to model the VRF outdoor unit. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel} if AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl or AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl:HR is used to model the VRF outdoor unit. \hyperref[fanconstantvolume]{Fan:ConstantVolume} is used when the Supply Air Fan Operating Mode Schedule values are never 0 and the fan operates continuously. \hyperref[fanonoff]{Fan:OnOff} is used when the fan cycles on and off with the cooling or heating coil (i.e.~Supply Air Fan Operating Mode Schedule values are at times 0). The \hyperref[fansystemmodel]{Fan:SystemModel} may be used to model either of these fan operating characteristics. diff --git a/idd/Energy+.idd.in b/idd/Energy+.idd.in index c8c81ed5963..fa0cf2f26d9 100644 --- a/idd/Energy+.idd.in +++ b/idd/Energy+.idd.in @@ -13371,16 +13371,16 @@ InternalMass, \type object-list \object-list ConstructionNames A3 , \field Zone or ZoneList Name - \required-field \type object-list \object-list ZoneAndZoneListNames - \note Zone the surface is a part of. - \note used to be Interior Environment + \note Zone(s) the surface is a part of. + \note This field is ignored when a Space or SpaceList Name is specified. A4 , \field Space or SpaceList Name \type object-list \object-list SpaceAndSpaceListNames - \note Space the surface is a part of (optional, see description of Space object for more details). + \note Space(s) the surface is a part of. \note This field is ignored when a ZoneList Name is specified for Zone or ZoneList Name. + \note An internal mass surface will be added to every Space in every Zone in the ZoneList. N1 ; \field Surface Area \required-field \units m2 @@ -23840,10 +23840,11 @@ Output:IlluminanceMap, \memo Daylighting Reference Point CoordinateSystem field A1 , \field Name \required-field - A2 , \field Zone Name + A2 , \field Zone or Space Name \required-field \type object-list \object-list ZoneNames + \object-list SpaceNames N1 , \field Z height \units m \type real @@ -24572,7 +24573,7 @@ ZoneCrossMixing, ZoneRefrigerationDoorMixing, \min-fields 4 - \memo Refrigeration Door Mixing is used for an opening between two zones that are at the + \memo Refrigeration Door Mixing is used for an opening between two zones (or spaces) that are at the \memo same elevation but have different air temperatures. In this case, the mixing air flow \memo between the two zones is determined by the density difference between the two zones. \memo This would typically be used between two zones in a refrigerated warehouse that are @@ -24581,14 +24582,18 @@ ZoneRefrigerationDoorMixing, A1 , \field Name \required-field \type alpha - A2 , \field Zone 1 Name + A2 , \field Zone or Space Name 1 + \note If a space name is used, it must belong to a different zone than Zone or Space Name 2. \required-field \type object-list \object-list ZoneNames - A3 , \field Zone 2 Name + \object-list SpaceNames + A3 , \field Zone or Space Name 2 + \note If a space name is used, it must belong to a different zone than Zone or Space Name 1. \required-field \type object-list \object-list ZoneNames + \object-list SpaceNames A4 , \field Schedule Name \note This schedule defines the fraction of the time the refrigeration door is open \note For example, if the warehouse is closed at night and there are no door openings @@ -24791,7 +24796,7 @@ ZoneCoolTower:Shower, \memo A cooltower (sometimes referred to as a wind tower or a shower cooling tower) \memo models passive downdraught evaporative cooling (PDEC) that is designed to capture the \memo wind at the top of a tower and cool the outdoor air using water evaporation before - \memo delivering it to a space. + \memo delivering it to a zone (or space). A1, \field Name \required-field A2, \field Availability Schedule Name @@ -24799,10 +24804,11 @@ ZoneCoolTower:Shower, \note If this field is blank, the system is always available. \type object-list \object-list ScheduleNames - A3, \field Zone Name + A3, \field Zone or Space Name \required-field \type object-list \object-list ZoneNames + \object-list SpaceNames A4, \field Water Supply Storage Tank Name \note In case of stand alone tank or underground water, leave this input blank \type object-list @@ -24861,11 +24867,11 @@ ZoneThermalChimney, \memo A thermal chimney is a vertical shaft utilizing solar radiation to enhance natural \memo ventilation. It consists of an absorber wall, air gap and glass cover with high solar \memo transmissivity. - \min-fields 10 + \min-fields 10 A1, \field Name \required-field A2, \field Zone Name - \note Name of zone that is the thermal chimney + \note Name of zone that is the thermal chimney. \required-field \type object-list \object-list ZoneNames @@ -24889,16 +24895,17 @@ ZoneThermalChimney, \minimum 0 \maximum 1 \default 0.8 - A4, \field Zone 1 Name + A4, \field Zone or Space Name 1 \required-field \type object-list \object-list ZoneNames + \object-list SpaceNames N4, \field Distance from Top of Thermal Chimney to Inlet 1 \required-field \units m \type real \minimum 0 - N5, \field Relative Ratios of Air Flow Rates Passing through Zone 1 + N5, \field Relative Ratios of Air Flow Rates Passing through Inlet 1 \type real \minimum 0 \maximum 1 @@ -24908,14 +24915,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A5, \field Zone 2 Name + A5, \field Zone or Space Name 2 \type object-list \object-list ZoneNames + \object-list SpaceNames N7, \field Distance from Top of Thermal Chimney to Inlet 2 \units m \type real \minimum 0 - N8, \field Relative Ratios of Air Flow Rates Passing through Zone 2 + N8, \field Relative Ratios of Air Flow Rates Passing through Inlet 2 \type real \minimum 0 \maximum 1 @@ -24923,14 +24931,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A6, \field Zone 3 Name + A6, \field Zone or Space Name 3 \type object-list \object-list ZoneNames + \object-list SpaceNames N10, \field Distance from Top of Thermal Chimney to Inlet 3 \units m \type real \minimum 0 - N11, \field Relative Ratios of Air Flow Rates Passing through Zone 3 + N11, \field Relative Ratios of Air Flow Rates Passing through Inlet 3 \type real \minimum 0 \maximum 1 @@ -24938,14 +24947,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A7, \field Zone 4 Name + A7, \field Zone or Space Name 4 \type object-list \object-list ZoneNames + \object-list SpaceNames N13, \field Distance from Top of Thermal Chimney to Inlet 4 \units m \type real \minimum 0 - N14, \field Relative Ratios of Air Flow Rates Passing through Zone 4 + N14, \field Relative Ratios of Air Flow Rates Passing through Inlet 4 \type real \minimum 0 \maximum 1 @@ -24953,14 +24963,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A8, \field Zone 5 Name + A8, \field Zone or Space Name 5 \type object-list \object-list ZoneNames + \object-list SpaceNames N16, \field Distance from Top of Thermal Chimney to Inlet 5 \units m \type real \minimum 0 - N17, \field Relative Ratios of Air Flow Rates Passing through Zone 5 + N17, \field Relative Ratios of Air Flow Rates Passing through Inlet 5 \type real \minimum 0 \maximum 1 @@ -24968,14 +24979,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A9, \field Zone 6 Name + A9, \field Zone or Space Name 6 \type object-list \object-list ZoneNames + \object-list SpaceNames N19, \field Distance from Top of Thermal Chimney to Inlet 6 \units m \type real \minimum 0 - N20, \field Relative Ratios of Air Flow Rates Passing through Zone 6 + N20, \field Relative Ratios of Air Flow Rates Passing through Inlet 6 \type real \minimum 0 \maximum 1 @@ -24983,14 +24995,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A10, \field Zone 7 Name + A10, \field Zone or Space Name 7 \type object-list \object-list ZoneNames + \object-list SpaceNames N22, \field Distance from Top of Thermal Chimney to Inlet 7 \units m \type real \minimum 0 - N23, \field Relative Ratios of Air Flow Rates Passing through Zone 7 + N23, \field Relative Ratios of Air Flow Rates Passing through Inlet 7 \type real \minimum 0 \maximum 1 @@ -24998,14 +25011,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A11, \field Zone 8 Name + A11, \field Zone or Space Name 8 \type object-list \object-list ZoneNames + \object-list SpaceNames N25, \field Distance from Top of Thermal Chimney to Inlet 8 \units m \type real \minimum 0 - N26, \field Relative Ratios of Air Flow Rates Passing through Zone 8 + N26, \field Relative Ratios of Air Flow Rates Passing through Inlet 8 \type real \minimum 0 \maximum 1 @@ -25013,14 +25027,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A12, \field Zone 9 Name + A12, \field Zone or Space Name 9 \type object-list \object-list ZoneNames + \object-list SpaceNames N28, \field Distance from Top of Thermal Chimney to Inlet 9 \units m \type real \minimum 0 - N29, \field Relative Ratios of Air Flow Rates Passing through Zone 9 + N29, \field Relative Ratios of Air Flow Rates Passing through Inlet 9 \type real \minimum 0 \maximum 1 @@ -25028,14 +25043,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A13, \field Zone 10 Name + A13, \field Zone or Space Name 10 \type object-list \object-list ZoneNames + \object-list SpaceNames N31, \field Distance from Top of Thermal Chimney to Inlet 10 \units m \type real \minimum 0 - N32, \field Relative Ratios of Air Flow Rates Passing through Zone 10 + N32, \field Relative Ratios of Air Flow Rates Passing through Inlet 10 \type real \minimum 0 \maximum 1 @@ -25043,14 +25059,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A14, \field Zone 11 Name + A14, \field Zone or Space Name 11 \type object-list \object-list ZoneNames + \object-list SpaceNames N34, \field Distance from Top of Thermal Chimney to Inlet 11 \units m \type real \minimum 0 - N35, \field Relative Ratios of Air Flow Rates Passing through Zone 11 + N35, \field Relative Ratios of Air Flow Rates Passing through Inlet 11 \type real \minimum 0 \maximum 1 @@ -25058,14 +25075,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A15, \field Zone 12 Name + A15, \field Zone or Space Name 12 \type object-list \object-list ZoneNames + \object-list SpaceNames N37, \field Distance from Top of Thermal Chimney to Inlet 12 \units m \type real \minimum 0 - N38, \field Relative Ratios of Air Flow Rates Passing through Zone 12 + N38, \field Relative Ratios of Air Flow Rates Passing through Inlet 12 \type real \minimum 0 \maximum 1 @@ -25073,14 +25091,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A16, \field Zone 13 Name + A16, \field Zone or Space Name 13 \type object-list \object-list ZoneNames + \object-list SpaceNames N40, \field Distance from Top of Thermal Chimney to Inlet 13 \units m \type real \minimum 0 - N41, \field Relative Ratios of Air Flow Rates Passing through Zone 13 + N41, \field Relative Ratios of Air Flow Rates Passing through Inlet 13 \type real \minimum 0 \maximum 1 @@ -25088,14 +25107,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A17, \field Zone 14 Name + A17, \field Zone or Space Name 14 \type object-list \object-list ZoneNames + \object-list SpaceNames N43, \field Distance from Top of Thermal Chimney to Inlet 14 \units m \type real \minimum 0 - N44, \field Relative Ratios of Air Flow Rates Passing through Zone 14 + N44, \field Relative Ratios of Air Flow Rates Passing through Inlet 14 \type real \minimum 0 \maximum 1 @@ -25103,14 +25123,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A18, \field Zone 15 Name + A18, \field Zone or Space Name 15 \type object-list \object-list ZoneNames + \object-list SpaceNames N46, \field Distance from Top of Thermal Chimney to Inlet 15 \units m \type real \minimum 0 - N47, \field Relative Ratios of Air Flow Rates Passing through Zone 15 + N47, \field Relative Ratios of Air Flow Rates Passing through Inlet 15 \type real \minimum 0 \maximum 1 @@ -25118,14 +25139,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A19, \field Zone 16 Name + A19, \field Zone or Space Name 16 \type object-list \object-list ZoneNames + \object-list SpaceNames N49, \field Distance from Top of Thermal Chimney to Inlet 16 \units m \type real \minimum 0 - N50, \field Relative Ratios of Air Flow Rates Passing through Zone 16 + N50, \field Relative Ratios of Air Flow Rates Passing through Inlet 16 \type real \minimum 0 \maximum 1 @@ -25133,14 +25155,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A20, \field Zone 17 Name + A20, \field Zone or Space Name 17 \type object-list \object-list ZoneNames + \object-list SpaceNames N52, \field Distance from Top of Thermal Chimney to Inlet 17 \units m \type real \minimum 0 - N53, \field Relative Ratios of Air Flow Rates Passing through Zone 17 + N53, \field Relative Ratios of Air Flow Rates Passing through Inlet 17 \type real \minimum 0 \maximum 1 @@ -25148,14 +25171,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A21, \field Zone 18 Name + A21, \field Zone or Space Name 18 \type object-list \object-list ZoneNames + \object-list SpaceNames N55, \field Distance from Top of Thermal Chimney to Inlet 18 \units m \type real \minimum 0 - N56, \field Relative Ratios of Air Flow Rates Passing through Zone 18 + N56, \field Relative Ratios of Air Flow Rates Passing through Inlet 18 \type real \minimum 0 \maximum 1 @@ -25163,14 +25187,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A22, \field Zone 19 Name + A22, \field Zone or Space Name 19 \type object-list \object-list ZoneNames + \object-list SpaceNames N58, \field Distance from Top of Thermal Chimney to Inlet 19 \units m \type real \minimum 0 - N59, \field Relative Ratios of Air Flow Rates Passing through Zone 19 + N59, \field Relative Ratios of Air Flow Rates Passing through Inlet 19 \type real \minimum 0 \maximum 1 @@ -25178,14 +25203,15 @@ ZoneThermalChimney, \units m2 \type real \minimum 0 - A23, \field Zone 20 Name + A23, \field Zone or Space Name 20 \type object-list \object-list ZoneNames + \object-list SpaceNames N61, \field Distance from Top of Thermal Chimney to Inlet 20 \units m \type real \minimum 0 - N62, \field Relative Ratios of Air Flow Rates Passing through Zone 20 + N62, \field Relative Ratios of Air Flow Rates Passing through Inlet 20 \type real \minimum 0 \maximum 1 @@ -34513,7 +34539,7 @@ Sizing:Zone, \note no humidistat is associated with this zone. \type alpha \units percent - A14;\field Zone Humidistat Humidification Set Point Schedule Name + A14,\field Zone Humidistat Humidification Set Point Schedule Name \note Enter the zone relative humidity schedule used for zone latent \note heating calculations. \note A zone humidistat will take priority over this input. @@ -34523,6 +34549,12 @@ Sizing:Zone, \note no humidistat is associated with this zone. \type alpha \units percent + A15;\field Type of Space Sum to Use + \note NonCoincident is available only if Do Space Heat Balance for Sizing=Yes in ZoneAirHeatBalanceAlgorithm. + \type choice + \key Coincident + \key NonCoincident + \default Coincident DesignSpecification:ZoneHVAC:Sizing, \min-fields 1 @@ -42466,11 +42498,10 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, \key Fan:SystemModel \key Fan:OnOff \key Fan:ConstantVolume - \key Fan:VariableVolume \default Fan:ConstantVolume \note Supply Air Fan Object Type must be Fan:SystemModel, Fan:OnOff, or Fan:ConstantVolume \note if AirConditioner:VariableRefrigerantFlow is used to model VRF outdoor unit - \note Supply Air Fan Object Type must be Fan:SystemModel or Fan:VariableVolume if + \note Supply Air Fan Object Type must be Fan:SystemModel if \note AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl or \note AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:HR \note is used to model VRF outdoor unit @@ -50789,6 +50820,59 @@ SpaceHVAC:ZoneEquipmentMixer, \note Matches a SpaceHVAC:EquipmentConnections Exhaust Node Name \type node +SpaceHVAC:ZoneReturnMixer, + \extensible:2 + \memo Mixes the return airflow from one or more Spaces into a zone return node. + \memo All spaces in the zone must also have a SpaceHVAC:EquipmentConnections object. + \memo Used only when ZoneAirHeatBalanceAlgorithm "Do Space Heat Balance for Sizing" = Yes. + \min-fields 5 + A1, \field Name + \required-field + \reference SpaceMixerNames + A2, \field Zone Name + \note Must be a controlled zone which has a ZoneHVAC:EquipmentConfiguration object. + \required-field + \type object-list + \object-list ZoneNames + A3, \field Zone Return Air Node Name + \note The zone return air node will be mixed from the spaces. + \note Must match a Zone Return Air Node for this zone. + \required-field + \type node + A4, \field Space 1 Name + \begin-extensible + \required-field + \type object-list + \object-list SpaceNames + A5, \field Space 1 Return Air Node Name + \note Matches a SpaceHVAC:EquipmentConnections Return Air Node Name + \required-field + \type node + A6, \field Space 2 Name + \type object-list + \object-list SpaceNames + A7, \field Space 3 Return Air Node Name + \note Matches a SpaceHVAC:EquipmentConnections Return Air Node Name + \type node + A8, \field Space 3 Name + \type object-list + \object-list SpaceNames + A9, \field Space 3 Return Air Node Name + \note Matches a SpaceHVAC:EquipmentConnections Return Air Node Name + \type node + A10,\field Space 4 Name + \type object-list + \object-list SpaceNames + A11,\field Space 4 Return Air Node Name + \note Matches a SpaceHVAC:EquipmentConnections Return Air Node Name + \type node + A12,\field Space 5 Name + \type object-list + \object-list SpaceNames + A13;\field Space 5 Return Air Node Name + \note Matches a SpaceHVAC:EquipmentConnections Return Air Node Name + \type node + \group Fans !*****************AIR LOOP COMPONENTS********************* Fan:SystemModel, @@ -107314,117 +107398,122 @@ OutputControl:Files, \key Yes \key No \default Yes - A9 , \field Output Zone Sizing + A9 , \field Output Space Sizing + \type choice + \key Yes + \key No + \default Yes + A10, \field Output Zone Sizing \type choice \key Yes \key No \default Yes - A10, \field Output System Sizing + A11, \field Output System Sizing \type choice \key Yes \key No \default Yes - A11, \field Output DXF + A12, \field Output DXF \type choice \key Yes \key No \default Yes - A12, \field Output BND + A13, \field Output BND \type choice \key Yes \key No \default Yes - A13, \field Output RDD + A14, \field Output RDD \type choice \key Yes \key No \default Yes - A14, \field Output MDD + A15, \field Output MDD \type choice \key Yes \key No \default Yes - A15, \field Output MTD + A16, \field Output MTD \type choice \key Yes \key No \default Yes - A16, \field Output END + A17, \field Output END \type choice \key Yes \key No \default Yes - A17, \field Output SHD + A18, \field Output SHD \type choice \key Yes \key No \default Yes - A18, \field Output DFS + A19, \field Output DFS \type choice \key Yes \key No \default Yes - A19, \field Output GLHE + A20, \field Output GLHE \type choice \key Yes \key No \default Yes - A20, \field Output DelightIn + A21, \field Output DelightIn \type choice \key Yes \key No \default Yes - A21, \field Output DelightELdmp + A22, \field Output DelightELdmp \type choice \key Yes \key No \default Yes - A22, \field Output DelightDFdmp + A23, \field Output DelightDFdmp \type choice \key Yes \key No \default Yes - A23, \field Output EDD + A24, \field Output EDD \type choice \key Yes \key No \default Yes - A24, \field Output DBG + A25, \field Output DBG \type choice \key Yes \key No \default Yes - A25, \field Output PerfLog + A26, \field Output PerfLog \type choice \key Yes \key No \default Yes - A26, \field Output SLN + A27, \field Output SLN \type choice \key Yes \key No \default Yes - A27, \field Output SCI + A28, \field Output SCI \type choice \key Yes \key No \default Yes - A28, \field Output WRL + A29, \field Output WRL \type choice \key Yes \key No \default Yes - A29, \field Output Screen + A30, \field Output Screen \type choice \key Yes \key No \default Yes - A30, \field Output ExtShd + A31, \field Output ExtShd \type choice \key Yes \key No \default Yes - A31; \field Output Tarcog + A32; \field Output Tarcog \note Not Implemented Yet \type choice \key Yes diff --git a/idd/schema/modify_schema.py b/idd/schema/modify_schema.py index 3d9e631facf..04b59c37f6e 100644 --- a/idd/schema/modify_schema.py +++ b/idd/schema/modify_schema.py @@ -139,6 +139,7 @@ def isInt(s): 'ZoneHVAC:EquipmentList': 'equipment', 'SpaceHVAC:ZoneEquipmentSplitter': 'spaces', 'SpaceHVAC:ZoneEquipmentMixer': 'spaces', + 'SpaceHVAC:ZoneReturnMixer': 'spaces', 'AvailabilityManagerAssignmentList': 'managers', 'Table:IndependentVariable': 'values', 'Table:IndependentVariableList': 'independent_variables', diff --git a/scripts/RunEPlus.bat b/scripts/RunEPlus.bat index 142c045ea0b..8ec74d1a27a 100644 --- a/scripts/RunEPlus.bat +++ b/scripts/RunEPlus.bat @@ -86,6 +86,9 @@ IF EXIST eplusout.sln DEL eplusout.sln IF EXIST epluszsz.csv DEL epluszsz.csv IF EXIST epluszsz.tab DEL epluszsz.tab IF EXIST epluszsz.txt DEL epluszsz.txt +IF EXIST eplusspsz.csv DEL eplusspsz.csv +IF EXIST eplusspsz.tab DEL eplusspsz.tab +IF EXIST eplusspsz.txt DEL eplusspsz.txt IF EXIST eplusssz.csv DEL eplusssz.csv IF EXIST eplusssz.tab DEL eplusssz.tab IF EXIST eplusssz.txt DEL eplusssz.txt @@ -157,6 +160,10 @@ IF EXIST "%output_path%%~1.Zsz" DEL "%output_path%%~1.Zsz" IF EXIST "%output_path%%~1Zsz.csv" DEL "%output_path%%~1Zsz.csv" IF EXIST "%output_path%%~1Zsz.tab" DEL "%output_path%%~1Zsz.tab" IF EXIST "%output_path%%~1Zsz.txt" DEL "%output_path%%~1Zsz.txt" +IF EXIST "%output_path%%~1.Spsz" DEL "%output_path%%~1.Spsz" +IF EXIST "%output_path%%~1Spsz.csv" DEL "%output_path%%~1Spsz.csv" +IF EXIST "%output_path%%~1Spsz.tab" DEL "%output_path%%~1Spsz.tab" +IF EXIST "%output_path%%~1Spsz.txt" DEL "%output_path%%~1Spsz.txt" IF EXIST "%output_path%%~1.ssz" DEL "%output_path%%~1.ssz" IF EXIST "%output_path%%~1Ssz.csv" DEL "%output_path%%~1Ssz.csv" IF EXIST "%output_path%%~1Ssz.tab" DEL "%output_path%%~1Ssz.tab" @@ -339,6 +346,9 @@ IF EXIST eplusout.bnd %post_proc%HVAC-Diagram.exe IF EXIST epluszsz.csv MOVE epluszsz.csv "%output_path%%~1Zsz.csv" IF EXIST epluszsz.tab MOVE epluszsz.tab "%output_path%%~1Zsz.tab" IF EXIST epluszsz.txt MOVE epluszsz.txt "%output_path%%~1Zsz.txt" + IF EXIST eplusspsz.csv MOVE eplusspsz.csv "%output_path%%~1Spsz.csv" + IF EXIST eplusspsz.tab MOVE eplusspsz.tab "%output_path%%~1Spsz.tab" + IF EXIST eplusspsz.txt MOVE eplusspsz.txt "%output_path%%~1Spsz.txt" IF EXIST eplusssz.csv MOVE eplusssz.csv "%output_path%%~1Ssz.csv" IF EXIST eplusssz.tab MOVE eplusssz.tab "%output_path%%~1Ssz.tab" IF EXIST eplusssz.txt MOVE eplusssz.txt "%output_path%%~1Ssz.txt" diff --git a/scripts/dev/verify_idfs_in_cmake.py b/scripts/dev/verify_idfs_in_cmake.py index 2c48a107401..2adaa1b45ce 100755 --- a/scripts/dev/verify_idfs_in_cmake.py +++ b/scripts/dev/verify_idfs_in_cmake.py @@ -94,7 +94,7 @@ # there are a few files we purposely skip files_to_skip = {"_1a-Long0.0.idf", "_ExternalInterface-actuator.idf", "_ExternalInterface-schedule.idf", "_ExternalInterface-variable.idf", "HVAC3Zone-IntGains-Def.imf", "HVAC3ZoneChillerSpec.imf", - "HVAC3ZoneGeometry.imf", "HVAC3ZoneMat-Const.imf"} + "HVAC3ZoneGeometry.imf", "HVAC3ZoneMat-Const.imf", "_1ZoneUncontrolled_ForAPITesting.idf"} found_idf_files_trimmed = found_idf_files - files_to_skip # the CMakeLists file will always have "forward" slashes diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index d76186b5476..dd0e9e9d5a0 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -225,7 +225,7 @@ void GetBoilerInput(EnergyPlusData &state) ShowSevereError( state, fmt::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowSevereError(state, format("...{} must be greater than 0.0", state.dataIPShortCut->cNumericFieldNames(2))); + ShowContinueError(state, format("...{} must be greater than 0.0", state.dataIPShortCut->cNumericFieldNames(2))); ErrorsFound = true; } else if (state.dataIPShortCut->rNumericArgs(2) > 1.0) { ShowWarningError(state, @@ -288,7 +288,7 @@ void GetBoilerInput(EnergyPlusData &state) ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); - ShowSevereError(state, format("...{} not found.", state.dataIPShortCut->cAlphaFieldNames(4))); + ShowContinueError(state, format("...{} not found.", state.dataIPShortCut->cAlphaFieldNames(4))); ErrorsFound = true; } thisBoiler.VolFlowRate = state.dataIPShortCut->rNumericArgs(3); diff --git a/src/EnergyPlus/CMakeLists.txt b/src/EnergyPlus/CMakeLists.txt index cedad517460..56f664ba014 100644 --- a/src/EnergyPlus/CMakeLists.txt +++ b/src/EnergyPlus/CMakeLists.txt @@ -993,7 +993,7 @@ if(BUILD_TESTING) -DEPW_FILE=USA_CO_Golden-NREL.724666_TMY3.epw -P ${PROJECT_SOURCE_DIR}/cmake/RunCallbackTest.cmake) set(EPW_FILE "${PROJECT_SOURCE_DIR}/weather/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw") - set(IDF_FILE "${PROJECT_SOURCE_DIR}/testfiles/1ZoneUncontrolled.idf") + set(IDF_FILE "${PROJECT_SOURCE_DIR}/testfiles/_1ZoneUncontrolled_ForAPITesting.idf") add_executable(TestAPI_Functional_C ${PROJECT_SOURCE_DIR}/tst/EnergyPlus/api/TestFunctional.c) # project_warnings is essentially a C++ interface, and not included here because this is C, not C++ diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.cc b/src/EnergyPlus/ChillerExhaustAbsorption.cc index e29f2a10fbf..bdf19121c02 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -1362,7 +1362,7 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (this->CondVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); - ShowSevereError(state, "Autosizing of Exhaust Fired Absorption Chiller condenser flow rate requires a condenser"); + ShowContinueError(state, "Autosizing of Exhaust Fired Absorption Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object."); ErrorsFound = true; } diff --git a/src/EnergyPlus/CommandLineInterface.cc b/src/EnergyPlus/CommandLineInterface.cc index b3ff583fafc..87a0f00abd0 100644 --- a/src/EnergyPlus/CommandLineInterface.cc +++ b/src/EnergyPlus/CommandLineInterface.cc @@ -356,6 +356,7 @@ state.dataStrGlobals->inputFilePath='{:g}', std::string tableSuffix; std::string mapSuffix; std::string zszSuffix; + std::string spszSuffix; std::string sszSuffix; std::string meterSuffix; std::string sqliteSuffix; @@ -373,6 +374,7 @@ state.dataStrGlobals->inputFilePath='{:g}', tableSuffix = "tbl"; mapSuffix = "map"; zszSuffix = "zsz"; + spszSuffix = "spsz"; sszSuffix = "ssz"; meterSuffix = "mtr"; sqliteSuffix = "sqlite"; @@ -386,6 +388,7 @@ state.dataStrGlobals->inputFilePath='{:g}', tableSuffix = "-table"; mapSuffix = "-map"; zszSuffix = "-zsz"; + spszSuffix = "-spsz"; sszSuffix = "-ssz"; meterSuffix = "-meter"; sqliteSuffix = "-sqlite"; @@ -399,6 +402,7 @@ state.dataStrGlobals->inputFilePath='{:g}', tableSuffix = "Table"; mapSuffix = "Map"; zszSuffix = "Zsz"; + spszSuffix = "Spsz"; sszSuffix = "Ssz"; meterSuffix = "Meter"; sqliteSuffix = "Sqlite"; @@ -477,6 +481,9 @@ state.dataStrGlobals->inputFilePath='{:g}', state.files.outputZszCsvFilePath = composePath(zszSuffix + ".csv"); state.files.outputZszTabFilePath = composePath(zszSuffix + ".tab"); state.files.outputZszTxtFilePath = composePath(zszSuffix + ".txt"); + state.files.outputSpszCsvFilePath = composePath(spszSuffix + ".csv"); + state.files.outputSpszTabFilePath = composePath(spszSuffix + ".tab"); + state.files.outputSpszTxtFilePath = composePath(spszSuffix + ".txt"); state.files.outputSszCsvFilePath = composePath(sszSuffix + ".csv"); state.files.outputSszTabFilePath = composePath(sszSuffix + ".tab"); state.files.outputSszTxtFilePath = composePath(sszSuffix + ".txt"); diff --git a/src/EnergyPlus/CoolTower.cc b/src/EnergyPlus/CoolTower.cc index 4991348103a..b0d46af320f 100644 --- a/src/EnergyPlus/CoolTower.cc +++ b/src/EnergyPlus/CoolTower.cc @@ -198,9 +198,10 @@ namespace CoolTower { } } - state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZoneName = state.dataIPShortCut->cAlphaArgs(3); // Name of zone where cooltower is serving state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), Zone); - if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) { + state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr = + Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(3), state.dataHeatBal->space); + if ((state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) && (state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr == 0)) { if (lAlphaBlanks(3)) { ShowSevereError(state, format("{}=\"{}\" invalid {} is required but input is blank.", @@ -216,6 +217,9 @@ namespace CoolTower { state.dataIPShortCut->cAlphaArgs(3))); } ErrorsFound = true; + } else if (state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr == 0) { + state.dataCoolTower->CoolTowerSys(CoolTowerNum).ZonePtr = + state.dataHeatBal->space(state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr).zoneNum; } state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterSupplyName = state.dataIPShortCut->cAlphaArgs(4); // Name of water storage tank @@ -627,7 +631,12 @@ namespace CoolTower { thisZoneHB.MCPTC = 0.0; thisZoneHB.MCPC = 0.0; thisZoneHB.CTMFL = 0.0; - + if ((state.dataHeatBal->doSpaceHeatBalance) && (state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr > 0)) { + auto &thisSpaceHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr); + thisSpaceHB.MCPTC = 0.0; + thisSpaceHB.MCPC = 0.0; + thisSpaceHB.CTMFL = 0.0; + } if (ScheduleManager::GetCurrentScheduleValue(state, state.dataCoolTower->CoolTowerSys(CoolTowerNum).SchedPtr) > 0.0) { // check component operation if (state.dataEnvrn->WindSpeed < MinWindSpeed || state.dataEnvrn->WindSpeed > MaxWindSpeed) continue; @@ -707,22 +716,35 @@ namespace CoolTower { AirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, OutletTemp, OutletHumRat); // Outlet air density CVF_ZoneNum = state.dataCoolTower->CoolTowerSys(CoolTowerNum).ActualAirVolFlowRate * ScheduleManager::GetCurrentScheduleValue(state, state.dataCoolTower->CoolTowerSys(CoolTowerNum).SchedPtr); - thisZoneHB.MCPC = CVF_ZoneNum * AirDensity * AirSpecHeat; - thisZoneHB.MCPTC = thisZoneHB.MCPC * OutletTemp; - thisZoneHB.CTMFL = thisZoneHB.MCPC / AirSpecHeat; + Real64 thisMCPC = CVF_ZoneNum * AirDensity * AirSpecHeat; + Real64 thisMCPTC = thisMCPC * OutletTemp; + Real64 thisCTMFL = thisMCPC / AirSpecHeat; + Real64 thisZT = thisZoneHB.ZT; + Real64 thisAirHumRat = thisZoneHB.airHumRat; + thisZoneHB.MCPC = thisMCPC; + thisZoneHB.MCPTC = thisMCPTC; + thisZoneHB.CTMFL = thisCTMFL; + if ((state.dataHeatBal->doSpaceHeatBalance) && (state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr > 0)) { + auto &thisSpaceHB = + state.dataZoneTempPredictorCorrector->zoneHeatBalance(state.dataCoolTower->CoolTowerSys(CoolTowerNum).spacePtr); + thisSpaceHB.MCPC = thisMCPC; + thisSpaceHB.MCPTC = thisMCPTC; + thisSpaceHB.CTMFL = thisCTMFL; + thisZT = thisSpaceHB.ZT; + thisAirHumRat = thisSpaceHB.airHumRat; + } - state.dataCoolTower->CoolTowerSys(CoolTowerNum).SenHeatPower = thisZoneHB.MCPC * std::abs(thisZoneHB.ZT - OutletTemp); - state.dataCoolTower->CoolTowerSys(CoolTowerNum).LatHeatPower = CVF_ZoneNum * std::abs(thisZoneHB.airHumRat - OutletHumRat); + state.dataCoolTower->CoolTowerSys(CoolTowerNum).SenHeatPower = thisMCPC * std::abs(thisZT - OutletTemp); + state.dataCoolTower->CoolTowerSys(CoolTowerNum).LatHeatPower = CVF_ZoneNum * std::abs(thisAirHumRat - OutletHumRat); state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletTemp = OutletTemp; state.dataCoolTower->CoolTowerSys(CoolTowerNum).OutletHumRat = OutletHumRat; state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRate = CVF_ZoneNum; - state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirMassFlowRate = thisZoneHB.CTMFL; - state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRateStd = thisZoneHB.CTMFL / state.dataEnvrn->StdRhoAir; + state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirMassFlowRate = thisCTMFL; + state.dataCoolTower->CoolTowerSys(CoolTowerNum).AirVolFlowRateStd = thisCTMFL / state.dataEnvrn->StdRhoAir; state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletDBTemp = Zone(ZoneNum).OutDryBulbTemp; state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletWBTemp = Zone(ZoneNum).OutWetBulbTemp; state.dataCoolTower->CoolTowerSys(CoolTowerNum).InletHumRat = state.dataEnvrn->OutHumRat; - state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsumpRate = - (std::abs(InletHumRat - OutletHumRat) * thisZoneHB.CTMFL) / RhoWater; + state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterConsumpRate = (std::abs(InletHumRat - OutletHumRat) * thisCTMFL) / RhoWater; state.dataCoolTower->CoolTowerSys(CoolTowerNum).CoolTWaterStarvMakeupRate = 0.0; // initialize -- calc in update state.dataCoolTower->CoolTowerSys(CoolTowerNum).PumpElecPower = state.dataCoolTower->CoolTowerSys(CoolTowerNum).RatedPumpPower * PumpPartLoadRat; diff --git a/src/EnergyPlus/CoolTower.hh b/src/EnergyPlus/CoolTower.hh index 47cc18415a6..0353f82aa39 100644 --- a/src/EnergyPlus/CoolTower.hh +++ b/src/EnergyPlus/CoolTower.hh @@ -85,9 +85,9 @@ namespace CoolTower { std::string Name; // The component name std::string CompType; // Type of component std::string Schedule; // Available schedule - std::string ZoneName; // Name of zone the component is serving int SchedPtr = 0; // Index to schedule - int ZonePtr = 0; // Point to this zone + int ZonePtr = 0; // Index to zone + int spacePtr = 0; // Index to space (if applicable) int PumpSchedPtr = 0; // Index to schedule for water pump FlowCtrl FlowCtrlType = FlowCtrl::Invalid; // Type of cooltower operation WaterSupplyMode CoolTWaterSupplyMode = WaterSupplyMode::FromMains; // Type of water source diff --git a/src/EnergyPlus/DElightManagerF.cc b/src/EnergyPlus/DElightManagerF.cc index 2f44b1390c5..a7d4d7fcfd6 100644 --- a/src/EnergyPlus/DElightManagerF.cc +++ b/src/EnergyPlus/DElightManagerF.cc @@ -604,34 +604,34 @@ namespace DElightManagerF { // Validate that Reference Point coordinates are within the host Zone if (RefPt_WCS_Coord.x < thisZone.MinimumX || RefPt_WCS_Coord.x > thisZone.MaximumX) { - ShowWarningError( - state, format("DElightInputGenerator:Reference point X Value outside Zone Min/Max X, Zone={}", zn.Name)); ShowSevereError(state, - format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", - thisZone.MinimumX, - RefPt_WCS_Coord.x, - thisZone.MaximumX)); + format("DElightInputGenerator:Reference point X Value outside Zone Min/Max X, Zone={}", zn.Name)); + ShowContinueError(state, + format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", + thisZone.MinimumX, + RefPt_WCS_Coord.x, + thisZone.MaximumX)); ErrorsFound = true; } if (RefPt_WCS_Coord.y < thisZone.MinimumY || RefPt_WCS_Coord.y > thisZone.MaximumY) { - ShowWarningError( - state, format("DElightInputGenerator:Reference point Y Value outside Zone Min/Max Y, Zone={}", zn.Name)); ShowSevereError(state, - format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", - thisZone.MinimumY, - RefPt_WCS_Coord.y, - thisZone.MaximumY)); + format("DElightInputGenerator:Reference point Y Value outside Zone Min/Max Y, Zone={}", zn.Name)); + ShowContinueError(state, + format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", + thisZone.MinimumY, + RefPt_WCS_Coord.y, + thisZone.MaximumY)); ErrorsFound = true; } if (RefPt_WCS_Coord.z < state.dataHeatBal->Zone(izone).MinimumZ || RefPt_WCS_Coord.z > thisZone.MaximumZ) { - ShowWarningError( + ShowSevereError( state, format("DElightInputGenerator:Reference point Z Value outside Zone Min/Max Z, Zone={}", thisZone.Name)); - ShowSevereError(state, - format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", - thisZone.MinimumZ, - RefPt_WCS_Coord.z, - thisZone.MaximumZ)); + ShowContinueError(state, + format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", + thisZone.MinimumZ, + RefPt_WCS_Coord.z, + thisZone.MaximumZ)); ErrorsFound = true; } diff --git a/src/EnergyPlus/Data/EnergyPlusData.cc b/src/EnergyPlus/Data/EnergyPlusData.cc index 0d454f7a8a5..b09d3575914 100644 --- a/src/EnergyPlus/Data/EnergyPlusData.cc +++ b/src/EnergyPlus/Data/EnergyPlusData.cc @@ -567,6 +567,7 @@ void EnergyPlusData::clear_state() this->files.shade.close(); this->files.ssz.close(); this->files.zsz.close(); + this->files.spsz.close(); } void EnergyPlusData::init_state(EnergyPlusData &state) diff --git a/src/EnergyPlus/DataDaylighting.hh b/src/EnergyPlus/DataDaylighting.hh index 187e07670bb..9f61690fc42 100644 --- a/src/EnergyPlus/DataDaylighting.hh +++ b/src/EnergyPlus/DataDaylighting.hh @@ -245,6 +245,7 @@ namespace Dayltg { { // Members std::string Name; // Map name + int spaceIndex = 0; // Index to space being mapped int zoneIndex = 0; // Index to zone being mapped int enclIndex = 0; // Index to enclosure for this map Real64 Z = 0.0; // Elevation or height diff --git a/src/EnergyPlus/DataLoopNode.hh b/src/EnergyPlus/DataLoopNode.hh index 4b809c59911..6d409b27070 100644 --- a/src/EnergyPlus/DataLoopNode.hh +++ b/src/EnergyPlus/DataLoopNode.hh @@ -427,6 +427,7 @@ namespace DataLoopNode { SpaceHVACEquipmentConnections, SpaceHVACZoneEquipmentSplitter, SpaceHVACZoneEquipmentMixer, + SpaceHVACZoneReturnMixer, Num, }; diff --git a/src/EnergyPlus/DataRuntimeLanguage.hh b/src/EnergyPlus/DataRuntimeLanguage.hh index dbfb131cda2..85a0424dad6 100644 --- a/src/EnergyPlus/DataRuntimeLanguage.hh +++ b/src/EnergyPlus/DataRuntimeLanguage.hh @@ -737,6 +737,11 @@ namespace DataRuntimeLanguage { struct RuntimeLanguageData : BaseGlobalStruct { + // In the API, we allow the user to manipulate user-defined EMS globals, but we skip the built-in ones to avoid + // problems. The built-in ones will not always start at zero, so we keep a start/end to ignore that specific range. + int emsVarBuiltInStart = 0; + int emsVarBuiltInEnd = 0; + int NumProgramCallManagers = 0; // count of Erl program managers with calling points int NumSensors = 0; // count of EMS sensors used in model (data from output variables) int numActuatorsUsed = 0; // count of EMS actuators used in model diff --git a/src/EnergyPlus/DataSizing.hh b/src/EnergyPlus/DataSizing.hh index b69ea52a372..ef4f8e2e07f 100644 --- a/src/EnergyPlus/DataSizing.hh +++ b/src/EnergyPlus/DataSizing.hh @@ -117,10 +117,34 @@ namespace DataSizing { Num }; - // parameters for sizing + // parameters for sizing (keep this for now to avoid plant sizing output changes) constexpr int NonCoincident(1); constexpr int Coincident(2); - constexpr int Combination(3); + + // parameters for zone and system sizing concurrence method + enum class SizingConcurrence + { + Invalid = -1, + NonCoincident, + Coincident, + Num + }; + + constexpr std::array(SizingConcurrence::Num)> SizingConcurrenceNamesUC{"NONCOINCIDENT", "COINCIDENT"}; + + // parameters for coil sizing concurrence method + enum class CoilSizingConcurrence + { + Invalid = -1, + NonCoincident, + Coincident, + Combination, + NA, + Num + }; + + constexpr std::array(CoilSizingConcurrence::Num)> CoilSizingConcurrenceNames{ + "Non-Coincident", "Coincident", "Combination", "N/A"}; // parameters for Cooling Peak Load Type enum class PeakLoad @@ -327,6 +351,7 @@ namespace DataSizing { DOASControl DOASControlStrategy = DOASControl::Invalid; // 0=neutral ventilation air; 1=neutral dehumidified ventilation air, 2 = cooled air; Real64 DOASLowSetpoint = 0.0; // Dedicated Outside Air Low Setpoint for Design [C] Real64 DOASHighSetpoint = 0.0; // Dedicated Outside Air High Setpoint for Design [C] + DataSizing::SizingConcurrence spaceConcurrence = DataSizing::SizingConcurrence::Coincident; // coincident or noncoincident space loads // zone latent sizing inputs bool zoneLatentSizing = false; @@ -452,9 +477,10 @@ namespace DataSizing { bool AccountForDOAS = false; // False: do nothing; True: calculate the effect of a DOA system on the zone sizing arrays DOASControl DOASControlStrategy = DOASControl::Invalid; // 0=neutral ventilation air; 1=neutral dehumidified ventilation air, 2 = cooled air; // 3=supply cold ventilation air - Real64 DOASLowSetpoint = 0.0; // Dedicated Outside Air Low Setpoint for Design [C] - Real64 DOASHighSetpoint = 0.0; // Dedicated Outside Air High Setpoint for Design [C] - bool EMSOverrideDesHeatMassOn = false; // true if EMS is acting on this structure + Real64 DOASLowSetpoint = 0.0; // Dedicated Outside Air Low Setpoint for Design [C] + Real64 DOASHighSetpoint = 0.0; // Dedicated Outside Air High Setpoint for Design [C] + DataSizing::SizingConcurrence spaceConcurrence = DataSizing::SizingConcurrence::Coincident; // coincident or noncoincident space loads + bool EMSOverrideDesHeatMassOn = false; // true if EMS is acting on this structure Real64 EMSValueDesHeatMassFlow = 0.0; // Value EMS directing to use for Design Heating air mass flow [kg/s] bool EMSOverrideDesCoolMassOn = false; // true if EMS is acting on this structure Real64 EMSValueDesCoolMassFlow = 0.0; // Value EMS directing to use for Design Cooling air mass flow [kg/s] @@ -782,20 +808,20 @@ namespace DataSizing { std::string AirPriLoopName; // name of an AirLoopHVAC object int AirLoopNum = 0; // index number of air loop LoadSizing loadSizingType = LoadSizing::Invalid; // type of load to size on sensible, latent, total, ventilation - int SizingOption = 0; // 1 = noncoincident, 2 = coincident - OAControl CoolOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for cooling sizing - OAControl HeatOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for heating sizing - Real64 DesOutAirVolFlow = 0.0; // design (minimum) outside air flow rate [m3/s] - Real64 SysAirMinFlowRat = 0.0; // minimum system air flow ratio for heating, Central Heating Maximum System Air Flow Ratio - bool SysAirMinFlowRatWasAutoSized = false; // true if central heating maximum system air flow ratio was autosize on input - Real64 PreheatTemp = 0.0; // preheat design set temperature [C] - Real64 PrecoolTemp = 0.0; // precool design set temperature [C] - Real64 PreheatHumRat = 0.0; // preheat design humidity ratio [kg water/kg dry air] - Real64 PrecoolHumRat = 0.0; // precool design humidity ratio [kg water/kg dry air] - Real64 CoolSupTemp = 0.0; // cooling design supply air temperature [C] - Real64 HeatSupTemp = 0.0; // heating design supply air temperature [C] - Real64 CoolSupHumRat = 0.0; // cooling design supply air humidity ratio [kg water/kg dry air] - Real64 HeatSupHumRat = 0.0; // heating design supply air humidity ratio [kg water/kg dry air] + DataSizing::SizingConcurrence SizingOption = DataSizing::SizingConcurrence::NonCoincident; // noncoincident, coincident + OAControl CoolOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for cooling sizing + OAControl HeatOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for heating sizing + Real64 DesOutAirVolFlow = 0.0; // design (minimum) outside air flow rate [m3/s] + Real64 SysAirMinFlowRat = 0.0; // minimum system air flow ratio for heating, Central Heating Maximum System Air Flow Ratio + bool SysAirMinFlowRatWasAutoSized = false; // true if central heating maximum system air flow ratio was autosize on input + Real64 PreheatTemp = 0.0; // preheat design set temperature [C] + Real64 PrecoolTemp = 0.0; // precool design set temperature [C] + Real64 PreheatHumRat = 0.0; // preheat design humidity ratio [kg water/kg dry air] + Real64 PrecoolHumRat = 0.0; // precool design humidity ratio [kg water/kg dry air] + Real64 CoolSupTemp = 0.0; // cooling design supply air temperature [C] + Real64 HeatSupTemp = 0.0; // heating design supply air temperature [C] + Real64 CoolSupHumRat = 0.0; // cooling design supply air humidity ratio [kg water/kg dry air] + Real64 HeatSupHumRat = 0.0; // heating design supply air humidity ratio [kg water/kg dry air] AirflowSizingMethod CoolAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system cooling design air flow rates; // 1 = calc from des day simulation; 2=m3/s per system, user input Real64 DesCoolAirFlow = 0.0; // design system supply air flow rate for cooling[m3/s] @@ -835,20 +861,20 @@ namespace DataSizing { std::string CoolDesDay; // name of a cooling design day std::string HeatDesDay; // name of a heating design day LoadSizing loadSizingType = LoadSizing::Invalid; // type of load to size on Sensible, Latent, Total, Ventilation - int SizingOption = 0; // 1 = noncoincident, 2 = coincident. - OAControl CoolOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for cooling sizing - OAControl HeatOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for heating sizing - Real64 DesOutAirVolFlow = 0.0; // design (minimum) outside air flow rate [m3/s] - Real64 SysAirMinFlowRat = 0.0; // minimum system air flow ratio for heating, Central Heating Maximum System Air Flow Ratio - bool SysAirMinFlowRatWasAutoSized = false; // true if central heating maximum system air flow ratio was autosize on input - Real64 PreheatTemp = 0.0; // preheat design set temperature - Real64 PrecoolTemp = 0.0; // precool design set temperature [C] - Real64 PreheatHumRat = 0.0; // preheat design humidity ratio [kg water/kg dry air] - Real64 PrecoolHumRat = 0.0; // precool design humidity ratio [kg water/kg dry air] - Real64 CoolSupTemp = 0.0; // cooling design supply air temperature [C] - Real64 HeatSupTemp = 0.0; // heating design supply air temperature[C] - Real64 CoolSupHumRat = 0.0; // cooling design supply air humidity ratio [kg water/kg dry air] - Real64 HeatSupHumRat = 0.0; // heating design supply air humidity ratio [kg water/kg dry air] + DataSizing::SizingConcurrence SizingOption = DataSizing::SizingConcurrence::NonCoincident; // noncoincident, coincident. + OAControl CoolOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for cooling sizing + OAControl HeatOAOption = OAControl::Invalid; // 1 = use 100% outside air; 2 = use min OA; for heating sizing + Real64 DesOutAirVolFlow = 0.0; // design (minimum) outside air flow rate [m3/s] + Real64 SysAirMinFlowRat = 0.0; // minimum system air flow ratio for heating, Central Heating Maximum System Air Flow Ratio + bool SysAirMinFlowRatWasAutoSized = false; // true if central heating maximum system air flow ratio was autosize on input + Real64 PreheatTemp = 0.0; // preheat design set temperature + Real64 PrecoolTemp = 0.0; // precool design set temperature [C] + Real64 PreheatHumRat = 0.0; // preheat design humidity ratio [kg water/kg dry air] + Real64 PrecoolHumRat = 0.0; // precool design humidity ratio [kg water/kg dry air] + Real64 CoolSupTemp = 0.0; // cooling design supply air temperature [C] + Real64 HeatSupTemp = 0.0; // heating design supply air temperature[C] + Real64 CoolSupHumRat = 0.0; // cooling design supply air humidity ratio [kg water/kg dry air] + Real64 HeatSupHumRat = 0.0; // heating design supply air humidity ratio [kg water/kg dry air] AirflowSizingMethod CoolAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system design cooling air flow rates; // 1 = calc from des day simulation; 2=m3/s per system, user input AirflowSizingMethod HeatAirDesMethod = AirflowSizingMethod::Invalid; // choice of how to get system design heating air flow rates; diff --git a/src/EnergyPlus/DataSurfaceLists.cc b/src/EnergyPlus/DataSurfaceLists.cc index 124ca4dfeff..142d1ac06d4 100644 --- a/src/EnergyPlus/DataSurfaceLists.cc +++ b/src/EnergyPlus/DataSurfaceLists.cc @@ -224,7 +224,9 @@ void GetSurfaceListsInputs(EnergyPlusData &state) cNumericFields.deallocate(); lNumericBlanks.deallocate(); - if (ErrorsFound) ShowSevereError(state, format("{}{}", CurrentModuleObject1, " errors found getting input. Program will terminate.")); + if (ErrorsFound) { + ShowSevereError(state, format("{}{}", CurrentModuleObject1, " errors found getting input. Program will terminate.")); + } } if (NumOfSurfListVentSlab > 0) { @@ -329,10 +331,14 @@ void GetSurfaceListsInputs(EnergyPlusData &state) cNumericFields.deallocate(); lNumericBlanks.deallocate(); - if (ErrorsFound) ShowSevereError(state, format("{}{}", CurrentModuleObject2, " errors found getting input. Program will terminate.")); + if (ErrorsFound) { + ShowSevereError(state, format("{}{}", CurrentModuleObject2, " errors found getting input. Program will terminate.")); + } } - if (ErrorsFound) ShowFatalError(state, "GetSurfaceListsInputs: Program terminates due to preceding conditions."); + if (ErrorsFound) { + ShowFatalError(state, "GetSurfaceListsInputs: Program terminates due to preceding conditions."); + } } int GetNumberOfSurfaceLists(EnergyPlusData &state) diff --git a/src/EnergyPlus/DataZoneEquipment.cc b/src/EnergyPlus/DataZoneEquipment.cc index 45fbab68918..56e0952aac1 100644 --- a/src/EnergyPlus/DataZoneEquipment.cc +++ b/src/EnergyPlus/DataZoneEquipment.cc @@ -552,7 +552,44 @@ void GetZoneEquipmentData(EnergyPlusData &state) processZoneEquipMixerInput(state, CurrentModuleObject, zoneNum, objectSchemaProps, objectFields, thisZeqMixer); } - } // end loop over zone equipment splitters + } // end loop over zone equipment mixers + + CurrentModuleObject = "SpaceHVAC:ZoneReturnMixer"; + instances = ip->epJSON.find(CurrentModuleObject); + if (instances != ip->epJSON.end()) { + auto const &objectSchemaProps = ip->getObjectSchemaProps(state, CurrentModuleObject); + auto &instancesValue = instances.value(); + int numZoneRetMixers = instancesValue.size(); + state.dataZoneEquip->zoneReturnMixer.resize(numZoneRetMixers); + int zeqRetNum = -1; + for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) { + ++zeqRetNum; + auto const &objectFields = instance.value(); + auto &thisZretMixer = state.dataZoneEquip->zoneReturnMixer[zeqRetNum]; + thisZretMixer.Name = Util::makeUPPER(instance.key()); + thisZretMixer.spaceEquipType = DataLoopNode::ConnectionObjectType::SpaceHVACZoneReturnMixer; + ip->markObjectAsUsed(CurrentModuleObject, instance.key()); + + std::string zoneName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_name"); + int zoneNum = Util::FindItemInList(zoneName, state.dataHeatBal->Zone); + if (zoneNum == 0) { + ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); + ShowContinueError(state, format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; + continue; + } + if (!state.dataHeatBal->Zone(zoneNum).IsControlled) { + ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); + ShowContinueError( + state, + format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConfiguration object is required for this zone.", zoneName)); + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; + continue; + } + + processZoneReturnMixerInput(state, CurrentModuleObject, zoneNum, objectSchemaProps, objectFields, zeqRetNum); + } + } // end loop over zone return mixers CurrentModuleObject = "AirLoopHVAC:SupplyPath"; for (int PathNum = 1; PathNum <= state.dataZoneEquip->NumSupplyAirPaths; ++PathNum) { @@ -1099,6 +1136,10 @@ void processZoneEquipmentInput(EnergyPlusData &state, thisEquipConfig.NumReturnNodes = NumNodes; thisEquipConfig.ReturnNode.allocate(NumNodes); + thisEquipConfig.returnNodeSpaceMixerIndex.allocate(NumNodes); + for (int &mixIndex : thisEquipConfig.returnNodeSpaceMixerIndex) { + mixIndex = -1; + } thisEquipConfig.ReturnNodeAirLoopNum.allocate(NumNodes); thisEquipConfig.ReturnNodeRetPathNum.allocate(NumNodes); thisEquipConfig.ReturnNodeRetPathCompNum.allocate(NumNodes); @@ -1289,20 +1330,20 @@ void processZoneEquipMixerInput(EnergyPlusData &state, static constexpr std::string_view RoutineName("processZoneEquipMixerInput: "); // include trailing blank space auto &ip = state.dataInputProcessing->inputProcessor; bool objectIsParent = true; - thisZeqMixer.zoneEquipInletNodeNum = GetOnlySingleNode(state, - ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_equipment_inlet_node_name"), - state.dataZoneEquip->GetZoneEquipmentDataErrorsFound, - thisZeqMixer.spaceEquipType, - thisZeqMixer.Name, - DataLoopNode::NodeFluidType::Air, - DataLoopNode::ConnectionType::Outlet, - NodeInputManager::CompFluidStream::Primary, - objectIsParent); + thisZeqMixer.outletNodeNum = GetOnlySingleNode(state, + ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_equipment_inlet_node_name"), + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound, + thisZeqMixer.spaceEquipType, + thisZeqMixer.Name, + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Outlet, + NodeInputManager::CompFluidStream::Primary, + objectIsParent); // Check zone exhaust nodes bool found = false; auto &thisZoneEquipConfig = state.dataZoneEquip->ZoneEquipConfig(zoneNum); for (int exhNodeNum : thisZoneEquipConfig.ExhaustNode) { - if (thisZeqMixer.zoneEquipInletNodeNum == exhNodeNum) { + if (thisZeqMixer.outletNodeNum == exhNodeNum) { found = true; break; } @@ -1311,7 +1352,7 @@ void processZoneEquipMixerInput(EnergyPlusData &state, ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); ShowContinueError(state, format("Zone Equipment Inlet Node Name={} is not an exhaust node for ZoneHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqMixer.zoneEquipInletNodeNum), + state.dataLoopNodes->NodeID(thisZeqMixer.outletNodeNum), thisZoneEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1368,6 +1409,98 @@ void processZoneEquipMixerInput(EnergyPlusData &state, } } +void processZoneReturnMixerInput(EnergyPlusData &state, + std::string_view zeqMixerModuleObject, + int const zoneNum, + InputProcessor::json const objectSchemaProps, + InputProcessor::json const objectFields, + int mixerIndex) + +{ + static constexpr std::string_view RoutineName("processZoneReturnMixerInput: "); // include trailing blank space + auto &ip = state.dataInputProcessing->inputProcessor; + bool objectIsParent = true; + auto &thisZretMixer = state.dataZoneEquip->zoneReturnMixer[mixerIndex]; + thisZretMixer.outletNodeNum = GetOnlySingleNode(state, + ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_return_air_node_name"), + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound, + thisZretMixer.spaceEquipType, + thisZretMixer.Name, + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Outlet, + NodeInputManager::CompFluidStream::Primary, + objectIsParent); + // Check zone return nodes + bool found = false; + auto &thisZoneEquipConfig = state.dataZoneEquip->ZoneEquipConfig(zoneNum); + int nodeCounter = 0; + for (int retNodeNum : thisZoneEquipConfig.ReturnNode) { + ++nodeCounter; + if (thisZretMixer.outletNodeNum == retNodeNum) { + found = true; + // Zone return node is fed by a space return mixer + thisZoneEquipConfig.returnNodeSpaceMixerIndex(nodeCounter) = mixerIndex; + break; + } + } + if (!found) { + ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowContinueError(state, + format("Zone Equipment Return Air Node Name={} is not a return air node for ZoneHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZretMixer.outletNodeNum), + thisZoneEquipConfig.ZoneName)); + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; + } + + auto extensibles = objectFields.find("spaces"); + auto const &extensionSchemaProps = objectSchemaProps["spaces"]["items"]["properties"]; + if (extensibles != objectFields.end()) { + auto &extensiblesArray = extensibles.value(); + int const numSpaces = extensiblesArray.size(); + thisZretMixer.spaces.resize(numSpaces); + int spaceCount = -1; + for (auto &extensibleInstance : extensiblesArray) { + ++spaceCount; + auto &thisZeqSpace = thisZretMixer.spaces[spaceCount]; + std::string const spaceName = ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_name"); + thisZeqSpace.spaceIndex = Util::FindItemInList(spaceName, state.dataHeatBal->space); + if (thisZeqSpace.spaceIndex == 0) { + ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowContinueError(state, format("Space Name={} not found.", spaceName)); + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; + } else { + thisZeqSpace.spaceNodeNum = + GetOnlySingleNode(state, + ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_return_air_node_name"), + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound, + thisZretMixer.spaceEquipType, + thisZretMixer.Name, + DataLoopNode::NodeFluidType::Air, + DataLoopNode::ConnectionType::Inlet, + NodeInputManager::CompFluidStream::Primary, + objectIsParent); + // Check space return nodes + bool found = false; + auto &thisSpaceEquipConfig = state.dataZoneEquip->spaceEquipConfig(thisZeqSpace.spaceIndex); + for (int retNodeNum : thisSpaceEquipConfig.ReturnNode) { + if (thisZeqSpace.spaceNodeNum == retNodeNum) { + found = true; + break; + } + } + if (!found) { + ShowSevereError(state, format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowContinueError(state, + format("Space Return Air Node Name={} is not a return air node for SpaceHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), + thisSpaceEquipConfig.ZoneName)); + state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; + } + } + } + } +} + bool CheckZoneEquipmentList(EnergyPlusData &state, std::string_view const ComponentType, // Type of component std::string_view const ComponentName, // Name of component @@ -1743,6 +1876,8 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) this->Name)); break; default: + // If method is not set, then return + return; break; } @@ -1797,9 +1932,9 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) } } -void ZoneEquipmentMixer::setOutletConditions(EnergyPlusData &state) +void ZoneMixer::setOutletConditions(EnergyPlusData &state) { - if (this->zoneEquipInletNodeNum == 0) return; + if (this->outletNodeNum == 0) return; Real64 sumEnthalpy = 0.0; Real64 sumHumRat = 0.0; @@ -1807,7 +1942,7 @@ void ZoneEquipmentMixer::setOutletConditions(EnergyPlusData &state) Real64 sumGenContam = 0.0; Real64 sumPressure = 0.0; Real64 sumFractions = 0.0; - auto &equipInletNode = state.dataLoopNodes->Node(this->zoneEquipInletNodeNum); + auto &outletNode = state.dataLoopNodes->Node(this->outletNodeNum); for (auto &mixerSpace : this->spaces) { auto &spaceOutletNode = state.dataLoopNodes->Node(mixerSpace.spaceNodeNum); sumEnthalpy += spaceOutletNode.Enthalpy * mixerSpace.fraction; @@ -1821,25 +1956,47 @@ void ZoneEquipmentMixer::setOutletConditions(EnergyPlusData &state) sumPressure += spaceOutletNode.Press * mixerSpace.fraction; sumFractions += mixerSpace.fraction; } - equipInletNode.Enthalpy = sumEnthalpy / sumFractions; - equipInletNode.HumRat = sumHumRat / sumFractions; - if (state.dataContaminantBalance->Contaminant.CO2Simulation) { - equipInletNode.CO2 = sumCO2 / sumFractions; - } - if (state.dataContaminantBalance->Contaminant.GenericContamSimulation) { - equipInletNode.GenContam = sumGenContam / sumFractions; - } - equipInletNode.Press = sumPressure / sumFractions; - // Use Enthalpy and humidity ratio to get outlet temperature from psych chart - equipInletNode.Temp = Psychrometrics::PsyTdbFnHW(equipInletNode.Enthalpy, equipInletNode.HumRat); + // For SpaceHVAC:ZoneReturnMixer, the fractions are dynamic and could be zero if there is no flow + if (sumFractions > 0) { + outletNode.Enthalpy = sumEnthalpy / sumFractions; + outletNode.HumRat = sumHumRat / sumFractions; + if (state.dataContaminantBalance->Contaminant.CO2Simulation) { + outletNode.CO2 = sumCO2 / sumFractions; + } + if (state.dataContaminantBalance->Contaminant.GenericContamSimulation) { + outletNode.GenContam = sumGenContam / sumFractions; + } + outletNode.Press = sumPressure / sumFractions; + + // Use Enthalpy and humidity ratio to get outlet temperature from psych chart + outletNode.Temp = Psychrometrics::PsyTdbFnHW(outletNode.Enthalpy, outletNode.HumRat); + } } +void ZoneReturnMixer::setInletConditions(EnergyPlusData &state) +{ + for (auto &mixerSpace : this->spaces) { + auto &spaceOutletNode = state.dataLoopNodes->Node(mixerSpace.spaceNodeNum); + int spaceZoneNodeNum = state.dataZoneEquip->spaceEquipConfig(mixerSpace.spaceIndex).ZoneNode; + auto &spaceNode = state.dataLoopNodes->Node(spaceZoneNodeNum); + spaceOutletNode.Temp = spaceNode.Temp; + spaceOutletNode.HumRat = spaceNode.HumRat; + spaceOutletNode.Enthalpy = spaceNode.Enthalpy; + spaceOutletNode.Press = spaceNode.Press; + if (state.dataContaminantBalance->Contaminant.CO2Simulation) { + spaceOutletNode.CO2 = spaceNode.CO2; + } + if (state.dataContaminantBalance->Contaminant.GenericContamSimulation) { + spaceOutletNode.GenContam = spaceNode.GenContam; + } + } +} void ZoneEquipmentMixer::setInletFlows(EnergyPlusData &state) { - if (this->zoneEquipInletNodeNum == 0) return; + if (this->outletNodeNum == 0) return; - auto &equipInletNode = state.dataLoopNodes->Node(this->zoneEquipInletNodeNum); + auto &equipInletNode = state.dataLoopNodes->Node(this->outletNodeNum); for (auto &mixerSpace : this->spaces) { auto &spaceOutletNode = state.dataLoopNodes->Node(mixerSpace.spaceNodeNum); spaceOutletNode.MassFlowRate = equipInletNode.MassFlowRate * mixerSpace.fraction; @@ -1848,6 +2005,35 @@ void ZoneEquipmentMixer::setInletFlows(EnergyPlusData &state) } } +void ZoneReturnMixer::setInletFlows(EnergyPlusData &state) +{ + if (this->outletNodeNum == 0) return; + auto &outletNode = state.dataLoopNodes->Node(this->outletNodeNum); + + Real64 sumMixerInletMassFlow = 0; + for (auto const &mixerSpace : this->spaces) { + // calc return flows for spaces feeding this mixer + auto &spaceEquipConfig = state.dataZoneEquip->spaceEquipConfig(mixerSpace.spaceIndex); + Real64 outletMassFlowRate = outletNode.MassFlowRate; // calcReturnFlows might adjust this parameter value, so make a copy here + Real64 spaceReturnFlow = 0.0; + spaceEquipConfig.calcReturnFlows(state, outletMassFlowRate, spaceReturnFlow); + sumMixerInletMassFlow += spaceReturnFlow; + } + + for (auto &mixerSpace : this->spaces) { + auto &spaceOutletNode = state.dataLoopNodes->Node(mixerSpace.spaceNodeNum); + // For return mixer, fraction is calculated every time step, not a user input + if (sumMixerInletMassFlow > 0.0) { + mixerSpace.fraction = spaceOutletNode.MassFlowRate / sumMixerInletMassFlow; + } else { + mixerSpace.fraction = 0.0; + } + spaceOutletNode.MassFlowRate = outletNode.MassFlowRate * mixerSpace.fraction; + spaceOutletNode.MassFlowRateMaxAvail = outletNode.MassFlowRateMaxAvail * mixerSpace.fraction; + spaceOutletNode.MassFlowRateMinAvail = outletNode.MassFlowRateMinAvail * mixerSpace.fraction; + } +} + void ZoneEquipmentSplitter::adjustLoads(EnergyPlusData &state, int zoneNum, int equipTypeNum) { auto &thisZoneEnergyDemand = state.dataZoneEnergyDemand->ZoneSysEnergyDemand(zoneNum); @@ -2057,4 +2243,178 @@ void EquipConfiguration::hvacTimeStepInit(EnergyPlusData &state, bool FirstHVACI } } +void EquipConfiguration::calcReturnFlows(EnergyPlusData &state, + Real64 &ExpTotalReturnMassFlow, // Expected total return air mass flow rate + Real64 &FinalTotalReturnMassFlow // Final total return air mass flow rate +) +{ + int numRetNodes = this->NumReturnNodes; + Real64 totReturnFlow = 0.0; // Total flow to all return nodes in the zone (kg/s) + Real64 totVarReturnFlow = + 0.0; // Total variable return flow, for return nodes connected to an airloop with an OA system or not with specified flow (kg/s) + Real64 returnSchedFrac = ScheduleManager::GetCurrentScheduleValue(state, this->ReturnFlowSchedPtrNum); + this->FixedReturnFlow = false; + FinalTotalReturnMassFlow = 0.0; + this->TotAvailAirLoopOA = 0.0; + + // Set initial flow rate for each return node + for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { + int retNode = this->ReturnNode(returnNum); + + if (retNode > 0) { + Real64 returnNodeMassFlow = 0.0; + auto &retNodeData(state.dataLoopNodes->Node(retNode)); + + int inletNum = this->ReturnNodeInletNum(returnNum); // which inlet node matches this return node (same airloop) + int ADUNum = 0; + if (inletNum > 0) ADUNum = this->InletNodeADUNum(inletNum); + int airLoop = this->ReturnNodeAirLoopNum(returnNum); + Real64 airLoopReturnFrac = 1.0; + if (airLoop > 0) { + // Establish corresponding airloop inlet(s) mass flow rate and set return node max/min/maxavail + Real64 inletMassFlow = 0.0; + int maxMinNodeNum = 0; + auto &thisAirLoopFlow(state.dataAirLoop->AirLoopFlow(airLoop)); + if (ADUNum > 0) { + // Zone return node could carry supply flow to zone without leaks plus any induced flow from plenum (but don't include other + // secondary flows from exhaust nodes) + inletMassFlow = state.dataDefineEquipment->AirDistUnit(ADUNum).MassFlowRateZSup + + state.dataDefineEquipment->AirDistUnit(ADUNum).MassFlowRatePlenInd; + maxMinNodeNum = state.dataDefineEquipment->AirDistUnit(ADUNum).OutletNodeNum; + } else if (inletNum > 0) { + // If not connected to an ADU, then use the inlet node flow + inletMassFlow = state.dataLoopNodes->Node(this->InletNode(inletNum)).MassFlowRate; + maxMinNodeNum = this->InletNode(inletNum); + } + if (maxMinNodeNum > 0) { + auto const &maxMinNodeData(state.dataLoopNodes->Node(maxMinNodeNum)); + retNodeData.MassFlowRateMax = maxMinNodeData.MassFlowRateMax; + retNodeData.MassFlowRateMin = maxMinNodeData.MassFlowRateMin; + retNodeData.MassFlowRateMaxAvail = maxMinNodeData.MassFlowRateMaxAvail; + } else { + auto const &zoneNodeData(state.dataLoopNodes->Node(this->ZoneNode)); + retNodeData.MassFlowRateMax = zoneNodeData.MassFlowRateMax; + retNodeData.MassFlowRateMin = zoneNodeData.MassFlowRateMin; + retNodeData.MassFlowRateMaxAvail = zoneNodeData.MassFlowRateMaxAvail; + } + + airLoopReturnFrac = thisAirLoopFlow.DesReturnFrac; + if (state.dataAirSystemsData->PrimaryAirSystems(airLoop).OASysExists && (thisAirLoopFlow.MaxOutAir > 0.0)) { + // Set return flow as fraction of matching inlet node flow if there is an OA system and available OA flow > 0.0 + returnNodeMassFlow = airLoopReturnFrac * inletMassFlow; + this->TotAvailAirLoopOA += thisAirLoopFlow.MaxOutAir; + } else { + // Set return flow to matching inlet node flow + returnNodeMassFlow = inletMassFlow; + this->FixedReturnFlow(returnNum) = true; + } + } else { + returnNodeMassFlow = 0.0; + } + + // Return node 1 is special + if (returnNum == 1) { + // Make no return air flow adjustments during sizing + if ((state.dataGlobal->DoingSizing) && numRetNodes == 1) { + returnNodeMassFlow = ExpTotalReturnMassFlow; + if (airLoop > 0) { + if (!state.dataAirSystemsData->PrimaryAirSystems(airLoop).OASysExists || + (state.dataAirLoop->AirLoopFlow(airLoop).MaxOutAir == 0.0)) { + ExpTotalReturnMassFlow = max(0.0, ExpTotalReturnMassFlow - this->ZoneExhBalanced + this->ZoneExh); + returnNodeMassFlow = ExpTotalReturnMassFlow; + } + } + } else if (!state.dataGlobal->DoingSizing) { + if (this->NumReturnFlowBasisNodes > 0) { + // Set base return air flow rate for node 1 using basis node flow rates + Real64 basisNodesMassFlow = 0.0; + for (int nodeNum = 1; nodeNum <= this->NumReturnFlowBasisNodes; ++nodeNum) { + basisNodesMassFlow += state.dataLoopNodes->Node(this->ReturnFlowBasisNode(nodeNum)).MassFlowRate; + } + returnNodeMassFlow = max(0.0, (basisNodesMassFlow * returnSchedFrac)); + this->FixedReturnFlow(returnNum) = true; + } else { + // If only 1 return node, use the standard return mass flow + if ((numRetNodes == 1) && !this->FixedReturnFlow(returnNum)) { + returnNodeMassFlow = max(0.0, (ExpTotalReturnMassFlow * returnSchedFrac * airLoopReturnFrac)); + } + } + } + } + totReturnFlow += returnNodeMassFlow; + retNodeData.MassFlowRate = returnNodeMassFlow; + retNodeData.MassFlowRateMinAvail = 0.0; + if (!this->FixedReturnFlow(returnNum)) totVarReturnFlow += returnNodeMassFlow; + } + } + + // if zone mass balance true, set to expected return flow + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { + // applies zone return flow schedule multiplier + ExpTotalReturnMassFlow = returnSchedFrac * ExpTotalReturnMassFlow; + // set air flow rate for each return node + Real64 zoneTotReturnFlow = 0.0; + Real64 returnNodeMassFlow = 0.0; + for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { + int retNode = this->ReturnNode(returnNum); + if (retNode > 0) { + if (numRetNodes == 1) { + returnNodeMassFlow = ExpTotalReturnMassFlow; + } else { // multiple return nodes + if (ExpTotalReturnMassFlow > 0.0) { + Real64 returnAdjFactor = state.dataLoopNodes->Node(retNode).MassFlowRate / ExpTotalReturnMassFlow; + returnNodeMassFlow = returnAdjFactor * ExpTotalReturnMassFlow; + } else { + returnNodeMassFlow = 0.0; + } + } + } + zoneTotReturnFlow += returnNodeMassFlow; + } + // Adjust return node flows if zone total return flow is > 0 + if (zoneTotReturnFlow > 0.0) { + for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { + int retNode = this->ReturnNode(returnNum); + if (retNode > 0) { + if (numRetNodes == 1) { + // set it to expected return flows + state.dataLoopNodes->Node(retNode).MassFlowRate = ExpTotalReturnMassFlow; + FinalTotalReturnMassFlow = ExpTotalReturnMassFlow; + } else { // multiple return nodes, adjust nodes flow + Real64 newReturnFlow = 0.0; + Real64 returnAdjFactor = ExpTotalReturnMassFlow / zoneTotReturnFlow; + Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; + newReturnFlow = curReturnFlow * returnAdjFactor; + state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; + FinalTotalReturnMassFlow += newReturnFlow; + } + } + } + } else { + FinalTotalReturnMassFlow = ExpTotalReturnMassFlow; + } + } else { + // Adjust return flows if greater than expected (i.e. there is exhaust or mixing flow reducing the total available for return) + if ((totReturnFlow > ExpTotalReturnMassFlow) && (totVarReturnFlow > 0.0)) { + Real64 newReturnFlow = 0.0; + Real64 returnAdjFactor = (1 - ((totReturnFlow - ExpTotalReturnMassFlow) / totVarReturnFlow)); // Return flow adjustment factor + for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { + int retNode = this->ReturnNode(returnNum); + Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; + if (retNode > 0) { + if (!this->FixedReturnFlow(returnNum)) { + newReturnFlow = curReturnFlow * returnAdjFactor; + FinalTotalReturnMassFlow += newReturnFlow; + state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; + } else { + FinalTotalReturnMassFlow += curReturnFlow; + } + } + } + } else { + FinalTotalReturnMassFlow = totReturnFlow; + } + } +} + } // namespace EnergyPlus::DataZoneEquipment diff --git a/src/EnergyPlus/DataZoneEquipment.hh b/src/EnergyPlus/DataZoneEquipment.hh index 4491f7cb451..008be07c127 100644 --- a/src/EnergyPlus/DataZoneEquipment.hh +++ b/src/EnergyPlus/DataZoneEquipment.hh @@ -326,10 +326,9 @@ namespace DataZoneEquipment { Array1D_int ReturnNodePlenumNum; // number of the return plenum attached to this return node (zero if none) Array1D_int ReturnFlowBasisNode; // return air flow basis nodes Array1D_int ReturnNodeExhaustNodeNum; // Exhaust node number flow to a corrsponding return node due to light heat gain - // Array1D_int SharedExhaustNode; // Exhaust node number shared by return nodes 0 No exhaust; 1 No share; > 1 shared; -1 use the - // exhaust node value Array1D SharedExhaustNode; // Exhaust node number shared by return nodes 0 No exhaust; 1 No share; > 1 shared; -1 use the exhaust node value + Array1D_int returnNodeSpaceMixerIndex; // index to SpaceHVAC:ZoneReturnMixer that feeds this return node (-1 if there is none) bool ZonalSystemOnly; // TRUE if served by a zonal system (only) bool IsControlled; // True when this is a controlled zone. @@ -372,6 +371,11 @@ namespace DataZoneEquipment { void beginEnvirnInit(EnergyPlusData &state); void hvacTimeStepInit(EnergyPlusData &state, bool FirstHVACIteration); + + void calcReturnFlows(EnergyPlusData &state, + Real64 &ExpTotalReturnMassFlow, // Expected total return air mass flow rate + Real64 &FinalTotalReturnMassFlow // Final total return air mass flow rate + ); }; struct EquipmentData // data for an individual component @@ -477,15 +481,24 @@ namespace DataZoneEquipment { void adjustLoads(EnergyPlusData &state, int zoneNum, int equipTypeNum); }; - struct ZoneEquipmentMixer : ZoneEquipmentSplitterMixer + struct ZoneMixer : ZoneEquipmentSplitterMixer { - int zoneEquipInletNodeNum = 0; + int outletNodeNum = 0; void setOutletConditions(EnergyPlusData &state); + }; + struct ZoneEquipmentMixer : ZoneMixer + { void setInletFlows(EnergyPlusData &state); }; + struct ZoneReturnMixer : ZoneMixer + { + void setInletConditions(EnergyPlusData &state); + + void setInletFlows(EnergyPlusData &state); + }; struct ControlList { // Members @@ -567,6 +580,13 @@ namespace DataZoneEquipment { InputProcessor::json const objectFields, DataZoneEquipment::ZoneEquipmentMixer &thisZeqMixer); + void processZoneReturnMixerInput(EnergyPlusData &state, + std::string_view zeqMixerModuleObject, + int const zoneNum, + InputProcessor::json const objectSchemaProps, + InputProcessor::json const objectFields, + int mixerIndex); + bool CheckZoneEquipmentList(EnergyPlusData &state, std::string_view ComponentType, // Type of component std::string_view ComponentName, // Name of component @@ -614,7 +634,7 @@ struct DataZoneEquipmentData : BaseGlobalStruct int NumOfZoneEquipLists = 0; Array1D ZoneEquipAvail; Array1D ZoneEquipConfig; - EPVector spaceEquipConfig; + Array1D spaceEquipConfig; std::unordered_set UniqueZoneEquipListNames; Array1D ZoneEquipList; Array1D SupplyAirPath; @@ -623,6 +643,7 @@ struct DataZoneEquipmentData : BaseGlobalStruct Array1D ZoneExhaustControlSystem; // 2022-01: maybe a better name? std::vector zoneEquipSplitter; std::vector zoneEquipMixer; + std::vector zoneReturnMixer; void init_state([[maybe_unused]] EnergyPlusData &state) override { diff --git a/src/EnergyPlus/DaylightingManager.cc b/src/EnergyPlus/DaylightingManager.cc index c06f9dee700..003445caa9e 100644 --- a/src/EnergyPlus/DaylightingManager.cc +++ b/src/EnergyPlus/DaylightingManager.cc @@ -700,10 +700,15 @@ void CalcDayltgCoeffsRefMapPoints(EnergyPlusData &state) if ((int)dl->illumMaps.size() > 0) { for (int MapNum = 1; MapNum <= (int)dl->illumMaps.size(); ++MapNum) { int mapZoneNum = dl->illumMaps(MapNum).zoneIndex; + std::string name = format("Zone={}", state.dataHeatBal->Zone(mapZoneNum).Name); + int mapSpaceNum = dl->illumMaps(MapNum).spaceIndex; + if (mapSpaceNum > 0) { + name = format("Space={}", state.dataHeatBal->space(mapSpaceNum).Name); + } if (state.dataGlobal->WarmupFlag) { - DisplayString(state, "Calculating Daylighting Coefficients (Map Points), Zone=" + state.dataHeatBal->Zone(mapZoneNum).Name); + DisplayString(state, format("Calculating Daylighting Coefficients (Map Points), {}", name)); } else { - DisplayString(state, "Updating Daylighting Coefficients (Map Points), Zone=" + state.dataHeatBal->Zone(mapZoneNum).Name); + DisplayString(state, format("Updating Daylighting Coefficients (Map Points), {}", name)); } CalcDayltgCoeffsMapPoints(state, MapNum); } @@ -4033,19 +4038,10 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) auto &illumMap = dl->illumMaps(MapNum); illumMap.Name = ipsc->cAlphaArgs(1); - illumMap.zoneIndex = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataHeatBal->Zone); - - if (illumMap.zoneIndex == 0) { - ShowSevereError(state, - format("{}=\"{}\", invalid {}=\"{}\".", - ipsc->cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(2), - ipsc->cAlphaArgs(2))); - ErrorsFound = true; - } else { + int const zoneNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataHeatBal->Zone); + if (zoneNum > 0) { + illumMap.zoneIndex = zoneNum; // set enclosure index for first space in zone - int zoneNum = illumMap.zoneIndex; int enclNum = state.dataHeatBal->space(state.dataHeatBal->Zone(zoneNum).spaceIndexes(1)).solarEnclosureNum; illumMap.enclIndex = enclNum; // check that all spaces in the zone are in the same enclosure @@ -4056,14 +4052,31 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) format("{}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting illuminance maps.", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError( + state, format("Zone=\"{}\" spans multiple enclosures. Use a Space Name instead.", state.dataHeatBal->Zone(zoneNum).Name)); ErrorsFound = true; break; } } + } else { + int const spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->space); + if (spaceNum == 0) { + ShowSevereError(state, + format("{}=\"{}\", invalid {}=\"{}\".", + ipsc->cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaArgs(2))); + ErrorsFound = true; + } else { + illumMap.spaceIndex = spaceNum; + illumMap.zoneIndex = state.dataHeatBal->space(spaceNum).zoneNum; + illumMap.enclIndex = state.dataHeatBal->space(spaceNum).solarEnclosureNum; + assert(illumMap.enclIndex > 0); + } } illumMap.Z = ipsc->rNumericArgs(1); - illumMap.Xmin = ipsc->rNumericArgs(2); illumMap.Xmax = ipsc->rNumericArgs(3); if (ipsc->rNumericArgs(2) > ipsc->rNumericArgs(3)) { @@ -4308,6 +4321,7 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } } ZoneMsgDone.deallocate(); + if (ErrorsFound) return; if (TotIllumMaps > 0) { print(state.files.eio, @@ -4330,7 +4344,6 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) illumMap.Z); } - if (ErrorsFound) return; } // GetInputIlluminanceMap() void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) @@ -4381,59 +4394,60 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) auto &daylightControl = dl->daylightControl(controlNum); daylightControl.Name = ipsc->cAlphaArgs(1); - // Is it a space or zone name? - int const spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->space); - if (spaceNum > 0) { - daylightControl.spaceIndex = spaceNum; - daylightControl.zoneIndex = state.dataHeatBal->space(spaceNum).zoneNum; - daylightControl.enclIndex = state.dataHeatBal->space(spaceNum).solarEnclosureNum; - // Check if this is a duplicate - if (spaceHasDaylightingControl(spaceNum)) { - ShowSevereError(state, - format("{}=\"{}\" Space==\"{}\" already has a {} object assigned to it. Only one per Space is allowed.", - ipsc->cCurrentModuleObject, - daylightControl.Name, - state.dataHeatBal->space(spaceNum).Name, - ipsc->cCurrentModuleObject)); - ErrorsFound = true; - continue; + // Is it a zone or space name? + int const zoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); + if (zoneNum > 0) { + daylightControl.zoneIndex = zoneNum; + // set enclosure index for first space in zone + int enclNum = state.dataHeatBal->space(state.dataHeatBal->Zone(zoneNum).spaceIndexes(1)).solarEnclosureNum; + daylightControl.enclIndex = enclNum; + // check that all spaces in the zone are in the same enclosure + for (int spaceCounter = 2; spaceCounter <= state.dataHeatBal->Zone(zoneNum).numSpaces; ++spaceCounter) { + int zoneSpaceNum = state.dataHeatBal->Zone(zoneNum).spaceIndexes(spaceCounter); + if (daylightControl.enclIndex != state.dataHeatBal->space(zoneSpaceNum).solarEnclosureNum) { + ShowSevereError(state, + format("{}: invalid {}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting.", + ipsc->cCurrentModuleObject, + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaArgs(2))); + ErrorsFound = true; + break; + } + } + for (int zoneSpaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) { + // Check if this is a duplicate + if (spaceHasDaylightingControl(zoneSpaceNum)) { + ShowWarningError(state, + format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", + ipsc->cCurrentModuleObject, + daylightControl.Name, + state.dataHeatBal->space(zoneSpaceNum).Name, + ipsc->cCurrentModuleObject)); + ShowContinueError(state, "This control will override the lighting power factor for this space."); + } + spaceHasDaylightingControl(zoneSpaceNum) = true; } } else { - int const zoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); - if (zoneNum == 0) { + int const spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->space); + if (spaceNum == 0) { ShowSevereError(state, format("{}: invalid {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(2), ipsc->cAlphaArgs(2))); ErrorsFound = true; continue; } else { - daylightControl.zoneIndex = zoneNum; - - // set enclosure index for first space in zone - int enclNum = state.dataHeatBal->space(state.dataHeatBal->Zone(zoneNum).spaceIndexes(1)).solarEnclosureNum; - daylightControl.enclIndex = enclNum; - // check that all spaces in the zone are in the same enclosure - for (int spaceCounter = 2; spaceCounter <= state.dataHeatBal->Zone(zoneNum).numSpaces; ++spaceCounter) { - int zoneSpaceNum = state.dataHeatBal->Zone(zoneNum).spaceIndexes(spaceCounter); - if (daylightControl.enclIndex != state.dataHeatBal->space(zoneSpaceNum).solarEnclosureNum) { - ShowSevereError(state, - format("{}: invalid {}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting.", - ipsc->cCurrentModuleObject, - ipsc->cAlphaFieldNames(2), - ipsc->cAlphaArgs(2))); - ErrorsFound = true; - break; - } - // Check if this is a duplicate - if (spaceHasDaylightingControl(zoneSpaceNum)) { - ShowSevereError(state, - format("{}=\"{}\" Space==\"{}\" already has a {} object assigned to it. Only one per Space is allowed.", - ipsc->cCurrentModuleObject, - daylightControl.Name, - state.dataHeatBal->space(zoneSpaceNum).Name, - ipsc->cCurrentModuleObject)); - ErrorsFound = true; - continue; - } + daylightControl.spaceIndex = spaceNum; + daylightControl.zoneIndex = state.dataHeatBal->space(spaceNum).zoneNum; + daylightControl.enclIndex = state.dataHeatBal->space(spaceNum).solarEnclosureNum; + // Check if this is a duplicate + if (spaceHasDaylightingControl(spaceNum)) { + ShowWarningError(state, + format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", + ipsc->cCurrentModuleObject, + daylightControl.Name, + state.dataHeatBal->space(spaceNum).Name, + ipsc->cCurrentModuleObject)); + ShowContinueError(state, "This control will override the lighting power factor for this space."); } + spaceHasDaylightingControl(spaceNum) = true; } } diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index a9a3aafc4e0..6825198c6a7 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -774,8 +774,8 @@ namespace DesiccantDehumidifiers { DataLoopNode::ObjectIsNotParent); if (desicDehum.ControlNodeNum == 0) { - ShowContinueError(state, format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowSevereError(state, format("{} must be specified.", cAlphaFields(5))); + ShowSevereError(state, format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, format("{} must be specified.", cAlphaFields(5))); ErrorsFoundGeneric = true; } diff --git a/src/EnergyPlus/FluidProperties.cc b/src/EnergyPlus/FluidProperties.cc index 2fb88c72643..f42be6b6a47 100644 --- a/src/EnergyPlus/FluidProperties.cc +++ b/src/EnergyPlus/FluidProperties.cc @@ -1035,7 +1035,7 @@ namespace FluidProperties { continue; } - auto &supTempArray = FluidTemps(supTempArrayNum); + auto const &supTempArray = FluidTemps(supTempArrayNum); refrig->NumSupTempPoints = supTempArray.NumOfTemps; refrig->SupTemps.allocate(refrig->NumSupTempPoints); refrig->SupTemps = supTempArray.Temps; @@ -1441,7 +1441,7 @@ namespace FluidProperties { if (!glycolRaw->CpTempArrayName.empty()) { int cpTempArrayNum = Util::FindItemInList(glycolRaw->CpTempArrayName, FluidTemps); - auto &cpTempArray = FluidTemps(cpTempArrayNum); + auto const &cpTempArray = FluidTemps(cpTempArrayNum); glycolRaw->NumCpTempPoints = cpTempArray.NumOfTemps; glycolRaw->CpTemps.allocate(glycolRaw->NumCpTempPoints); glycolRaw->CpTemps = cpTempArray.Temps; @@ -1452,7 +1452,7 @@ namespace FluidProperties { if (!glycolRaw->RhoTempArrayName.empty()) { int rhoTempArrayNum = Util::FindItemInList(glycolRaw->RhoTempArrayName, FluidTemps); - auto &rhoTempArray = FluidTemps(rhoTempArrayNum); + auto const &rhoTempArray = FluidTemps(rhoTempArrayNum); glycolRaw->NumRhoTempPoints = rhoTempArray.NumOfTemps; glycolRaw->RhoTemps.allocate(glycolRaw->NumRhoTempPoints); glycolRaw->RhoTemps = rhoTempArray.Temps; @@ -1463,7 +1463,7 @@ namespace FluidProperties { if (!glycolRaw->CondTempArrayName.empty()) { int condTempArrayNum = Util::FindItemInList(glycolRaw->CondTempArrayName, FluidTemps); - auto &condTempArray = FluidTemps(condTempArrayNum); + auto const &condTempArray = FluidTemps(condTempArrayNum); glycolRaw->NumCondTempPoints = condTempArray.NumOfTemps; glycolRaw->CondTemps.allocate(glycolRaw->NumCondTempPoints); glycolRaw->CondTemps = condTempArray.Temps; @@ -1474,7 +1474,7 @@ namespace FluidProperties { if (!glycolRaw->ViscTempArrayName.empty()) { int viscTempArrayNum = Util::FindItemInList(glycolRaw->ViscTempArrayName, FluidTemps); - auto &viscTempArray = FluidTemps(viscTempArrayNum); + auto const &viscTempArray = FluidTemps(viscTempArrayNum); glycolRaw->NumViscTempPoints = viscTempArray.NumOfTemps; glycolRaw->ViscTemps.allocate(glycolRaw->NumViscTempPoints); glycolRaw->ViscTemps = viscTempArray.Temps; @@ -1936,7 +1936,7 @@ namespace FluidProperties { // Most properties requested (e.g., Specific Heat) must be > 0 but the tables may // be set up for symmetry and not be limited to just valid values. - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; for (auto *glycol : df->glycols) { if (glycol->CpDataPresent) { @@ -2039,7 +2039,7 @@ namespace FluidProperties { // for the refrigerant properties. // Most properties requested (e.g., Specific Heat) must be > 0 but the tables may // be set up for symmetry and not be limited to just valid values. - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; for (auto *refrig : df->refrigs) { for (int IndexNum = 1; IndexNum <= refrig->NumPsPoints; ++IndexNum) { @@ -2181,7 +2181,7 @@ namespace FluidProperties { Real64 Temperature; // Temperature to drive values Real64 ReturnValue; // Values returned from glycol functions - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; for (auto *glycol : df->glycols) { @@ -2423,7 +2423,7 @@ namespace FluidProperties { Real64 Temperature; // Temperature to drive values Real64 ReturnValue; // Values returned from refrigerant functions - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; for (auto *refrig : df->refrigs) { // Lay out the basic values: @@ -2759,8 +2759,6 @@ namespace FluidProperties { int LoTempIndex = FindArrayIndex(Temperature, this->PsTemps, this->PsLowTempIndex, this->PsHighTempIndex); - auto &df = state.dataFluidProps; - // check for out of data bounds problems if (LoTempIndex == 0) { ReturnValue = this->PsValues(this->PsLowTempIndex); @@ -2778,6 +2776,8 @@ namespace FluidProperties { if (!state.dataGlobal->WarmupFlag && ErrorFlag) { ++this->errors[(int)RefrigError::SatTemp].count; + auto &df = state.dataFluidProps; + // send warning if (this->errors[(int)RefrigError::SatTemp].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( @@ -2851,8 +2851,6 @@ namespace FluidProperties { // FUNCTION LOCAL VARIABLE DECLARATIONS: bool ErrorFlag = false; // error flag for current call - auto &df = state.dataFluidProps; - // get the array indices int LoPresIndex = FindArrayIndex(Pressure, this->PsValues, this->PsLowPresIndex, this->PsHighPresIndex); @@ -2873,6 +2871,8 @@ namespace FluidProperties { if (!state.dataGlobal->WarmupFlag && ErrorFlag) { ++this->errors[(int)RefrigError::SatPress].count; + auto &df = state.dataFluidProps; + // send warning if (this->errors[(int)RefrigError::SatPress].count <= df->RefrigErrorLimitTest) { ShowSevereMessage(state, @@ -2995,8 +2995,6 @@ namespace FluidProperties { // FUNCTION PARAMETER DEFINITIONS: static constexpr std::string_view routineName = "RefrigProps::getSatDensity"; - auto &df = state.dataFluidProps; - if ((Quality < 0.0) || (Quality > 1.0)) { ShowSevereError(state, fmt::format("{}Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); ShowContinueError(state, format("Saturated density quality must be between 0 and 1, entered value=[{:.4R}].", Quality)); @@ -3045,6 +3043,8 @@ namespace FluidProperties { if (!state.dataGlobal->WarmupFlag && ErrorFlag) { ++this->errors[(int)RefrigError::SatTempDensity].count; + auto &df = state.dataFluidProps; + // send warning if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( @@ -3403,8 +3403,6 @@ namespace FluidProperties { // the enthalpy calculated from the pressure found static constexpr std::string_view routineName = "RefrigProps::getSupHeatPressure"; - auto &df = state.dataFluidProps; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 EnthalpyCheck; // recalculates enthalpy based on calculated pressure Real64 EnthalpyHigh; // Enthalpy value at interpolated pressure and high temperature @@ -3542,6 +3540,8 @@ namespace FluidProperties { } if (ErrCount > 0 && !state.dataGlobal->WarmupFlag) { + auto &df = state.dataFluidProps; + // send near saturation warning if flagged this->errors[(int)RefrigError::SatSupPress].count += CurSatErrCount; // send warning @@ -4593,7 +4593,7 @@ namespace FluidProperties { int GetGlycolRawNum(EnergyPlusData &state, std::string_view const glycolRawName) // carries in substance name { - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; auto found = std::find_if(df->glycolsRaw.begin(), df->glycolsRaw.end(), [glycolRawName](GlycolRawProps const *glycolRaw) { return glycolRaw->Name == glycolRawName; @@ -4779,8 +4779,6 @@ namespace FluidProperties { // Return value Real64 ReturnValue; - auto &df = state.dataFluidProps; - // error counters and dummy string bool ErrorFlag(false); // error flag for current call @@ -4811,6 +4809,8 @@ namespace FluidProperties { } if (ErrorFlag && (CalledFrom != "ReportAndTestRefrigerants")) { + auto &df = state.dataFluidProps; + ++df->TempRangeErrCountGetInterpolatedSatProp; // send warning if (df->TempRangeErrCountGetInterpolatedSatProp <= df->RefrigErrorLimitTest) { @@ -4832,7 +4832,7 @@ namespace FluidProperties { //***************************************************************************** - bool CheckFluidPropertyName(EnergyPlusData &state, + bool CheckFluidPropertyName(EnergyPlusData const &state, std::string const &name) // Name from input(?) to be checked against valid FluidPropertyNames { @@ -4842,7 +4842,7 @@ namespace FluidProperties { // PURPOSE OF THIS FUNCTION: // This function checks on an input fluid property to make sure it is valid. - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; auto foundRefrig = std::find_if(df->refrigs.begin(), df->refrigs.end(), [name](RefrigProps const *refrig) { return refrig->Name == name; }); if (foundRefrig != df->refrigs.end()) return true; @@ -4867,7 +4867,7 @@ namespace FluidProperties { bool NeedOrphanMessage = true; int NumUnusedRefrig = 0; - auto &df = state.dataFluidProps; + auto const &df = state.dataFluidProps; for (auto const *refrig : df->refrigs) { if (refrig->used) continue; @@ -4913,18 +4913,18 @@ namespace FluidProperties { void GetFluidDensityTemperatureLimits(EnergyPlusData &state, int const FluidIndex, Real64 &MinTempLimit, Real64 &MaxTempLimit) { if (FluidIndex > 0) { - auto &df = state.dataFluidProps; - MinTempLimit = df->glycols(FluidIndex)->RhoLowTempValue; - MaxTempLimit = df->glycols(FluidIndex)->RhoHighTempValue; + auto const &df = state.dataFluidProps->glycols(FluidIndex); + MinTempLimit = df->RhoLowTempValue; + MaxTempLimit = df->RhoHighTempValue; } } void GetFluidSpecificHeatTemperatureLimits(EnergyPlusData &state, int const FluidIndex, Real64 &MinTempLimit, Real64 &MaxTempLimit) { if (FluidIndex > 0) { - auto &df = state.dataFluidProps; - MinTempLimit = df->glycols(FluidIndex)->CpLowTempValue; - MaxTempLimit = df->glycols(FluidIndex)->CpHighTempValue; + auto const &df = state.dataFluidProps->glycols(FluidIndex); + MinTempLimit = df->CpLowTempValue; + MaxTempLimit = df->CpHighTempValue; } } diff --git a/src/EnergyPlus/FluidProperties.hh b/src/EnergyPlus/FluidProperties.hh index 8beb5eb006f..2fd4cf1aeb8 100644 --- a/src/EnergyPlus/FluidProperties.hh +++ b/src/EnergyPlus/FluidProperties.hh @@ -564,7 +564,7 @@ namespace FluidProperties { int UpperBound // Valid values upper bound (set by calling program) ); - bool CheckFluidPropertyName(EnergyPlusData &state, + bool CheckFluidPropertyName(EnergyPlusData const &state, std::string const &NameToCheck); // Name from input(?) to be checked against valid FluidPropertyNames void ReportOrphanFluids(EnergyPlusData &state); diff --git a/src/EnergyPlus/FuelCellElectricGenerator.cc b/src/EnergyPlus/FuelCellElectricGenerator.cc index 47a55dcc2b1..c2a50442c7f 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.cc +++ b/src/EnergyPlus/FuelCellElectricGenerator.cc @@ -448,7 +448,7 @@ namespace FuelCellElectricGenerator { DataGenerators::AirSupRateMode::QuadraticFuncofPel)) { ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowSevereError(state, "Curve name was not found"); + ShowContinueError(state, "Curve name was not found"); ErrorsFound = true; } @@ -460,7 +460,7 @@ namespace FuelCellElectricGenerator { DataGenerators::AirSupRateMode::QuadraticFuncofNdot)) { ShowSevereError(state, format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); ShowContinueError(state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowSevereError(state, "Curve name was not found"); + ShowContinueError(state, "Curve name was not found"); ErrorsFound = true; } diff --git a/src/EnergyPlus/Furnaces.cc b/src/EnergyPlus/Furnaces.cc index 1f456af1569..1d590e325e1 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -937,7 +937,7 @@ namespace Furnaces { } if (!AirNodeFound) { ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowSevereError(state, "Did not find Air Node (Zone with Thermostat)."); + ShowContinueError(state, "Did not find Air Node (Zone with Thermostat)."); ShowContinueError(state, format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ShowContinueError( state, "Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Thermostat object must be specified for this zone."); @@ -945,7 +945,7 @@ namespace Furnaces { } if (!AirLoopFound) { ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowSevereError(state, "Did not find correct Primary Air Loop."); + ShowContinueError(state, "Did not find correct Primary Air Loop."); ShowContinueError(state, format("Specified {} = {} is not served by this AirLoopHVAC equipment.", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } @@ -1478,7 +1478,7 @@ namespace Furnaces { } if (!AirLoopFound) { ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowSevereError(state, "Did not find correct AirLoopHVAC."); + ShowContinueError(state, "Did not find correct AirLoopHVAC."); ShowContinueError(state, format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } @@ -2759,7 +2759,7 @@ namespace Furnaces { } if (!AirLoopFound) { ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowSevereError(state, "Did not find correct AirLoopHVAC."); + ShowContinueError(state, "Did not find correct AirLoopHVAC."); ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } @@ -2768,8 +2768,6 @@ namespace Furnaces { // Get fan data FanName = Alphas(7); - errFlag = false; - thisFurnace.fanType = static_cast(getEnumValue(HVAC::fanTypeNamesUC, Alphas(6))); if (thisFurnace.fanType == HVAC::FanType::OnOff || thisFurnace.fanType == HVAC::FanType::Constant) { @@ -3680,7 +3678,7 @@ namespace Furnaces { } if (!AirLoopFound) { ShowSevereError(state, format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowSevereError(state, "Did not find correct AirLoopHVAC."); + ShowContinueError(state, "Did not find correct AirLoopHVAC."); ShowContinueError(state, format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } @@ -4739,11 +4737,7 @@ namespace Furnaces { if (!state.dataGlobal->DoingSizing && state.dataFurnaces->MySecondOneTimeFlag(FurnaceNum)) { // sizing all done. check fan air flow rates - errFlag = false; thisFurnace.ActualFanVolFlowRate = state.dataFans->fans(thisFurnace.FanIndex)->maxAirFlowRate; - if (errFlag) { - ShowContinueError(state, format("...occurs in {} ={}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); - } if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { ShowWarningError(state, @@ -5001,11 +4995,11 @@ namespace Furnaces { thisFurnace.CoolingSpeedRatio = thisFurnace.MaxCoolAirVolFlow / thisFurnace.ActualFanVolFlowRate; thisFurnace.NoHeatCoolSpeedRatio = thisFurnace.MaxNoCoolHeatAirVolFlow / thisFurnace.ActualFanVolFlowRate; } - std::string FanName; // used in warning messages if (dynamic_cast(state.dataFans->fans(thisFurnace.FanIndex))->powerRatioAtSpeedRatioCurveNum > 0) { if (thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxHeatAirVolFlow && thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxCoolAirVolFlow && thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxNoCoolHeatAirVolFlow) { + std::string FanName = state.dataFans->fans(thisFurnace.FanIndex)->Name; ShowWarningError(state, format("{} \"{}\"", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); ShowContinueError(state, format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)thisFurnace.fanType], FanName)); diff --git a/src/EnergyPlus/HVACControllers.cc b/src/EnergyPlus/HVACControllers.cc index a0a1ba563e2..18614ac6d3a 100644 --- a/src/EnergyPlus/HVACControllers.cc +++ b/src/EnergyPlus/HVACControllers.cc @@ -481,17 +481,18 @@ void GetControllerInput(EnergyPlusData &state) controllerProps.ControlVar = static_cast(getEnumValue(ctrlVarNamesUC, AlphArray(2))); if (controllerProps.ControlVar == HVACControllers::CtrlVarType::Invalid) { ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); - ShowSevereError(state, - format("...Invalid {}=\"{}\", must be Temperature, HumidityRatio, or TemperatureAndHumidityRatio.", - cAlphaFields(2), - AlphArray(2))); + ShowContinueError(state, + format("...Invalid {}=\"{}\", must be Temperature, HumidityRatio, or TemperatureAndHumidityRatio.", + cAlphaFields(2), + AlphArray(2))); ErrorsFound = true; } controllerProps.Action = static_cast(getEnumValue(actionNamesUC, AlphArray(3))); if (controllerProps.Action == ControllerAction::Invalid) { ShowSevereError(state, format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, AlphArray(1))); - ShowSevereError(state, format("...Invalid {}=\"{}{}", cAlphaFields(3), AlphArray(3), R"(", must be "Normal", "Reverse" or blank.)")); + ShowContinueError(state, + format("...Invalid {}=\"{}{}", cAlphaFields(3), AlphArray(3), R"(", must be "Normal", "Reverse" or blank.)")); ErrorsFound = true; } diff --git a/src/EnergyPlus/HVACInterfaceManager.cc b/src/EnergyPlus/HVACInterfaceManager.cc index d292194eacc..bc69d709fb9 100644 --- a/src/EnergyPlus/HVACInterfaceManager.cc +++ b/src/EnergyPlus/HVACInterfaceManager.cc @@ -123,7 +123,7 @@ void UpdateHVACInterface(EnergyPlusData &state, Real64 totDemandSideMaxAvail = 0.0; for (int demIn = 1; demIn <= state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).NumSupplyNodes; ++demIn) { int demInNode = state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).ZoneEquipSupplyNodeNum(demIn); - auto &node = state.dataLoopNodes->Node(demInNode); + auto const &node = state.dataLoopNodes->Node(demInNode); totDemandSideMassFlow += node.MassFlowRate; totDemandSideMinAvail += node.MassFlowRateMinAvail; totDemandSideMaxAvail += node.MassFlowRateMaxAvail; diff --git a/src/EnergyPlus/HVACManager.cc b/src/EnergyPlus/HVACManager.cc index bcf586817a3..8bc8708c0ed 100644 --- a/src/EnergyPlus/HVACManager.cc +++ b/src/EnergyPlus/HVACManager.cc @@ -2051,7 +2051,7 @@ void ResolveLockoutFlags(EnergyPlusData &state, bool &SimAir) // TRUE means air } } -void ResetHVACControl(EnergyPlusData &state) +void ResetHVACControl(EnergyPlusData const &state) { // SUBROUTINE INFORMATION: diff --git a/src/EnergyPlus/HVACManager.hh b/src/EnergyPlus/HVACManager.hh index d7fe431d612..89d35831ceb 100644 --- a/src/EnergyPlus/HVACManager.hh +++ b/src/EnergyPlus/HVACManager.hh @@ -97,7 +97,7 @@ namespace HVACManager { void ResolveLockoutFlags(EnergyPlusData &state, bool &SimAir); // TRUE means air loops must be (re)simulated - void ResetHVACControl(EnergyPlusData &state); + void ResetHVACControl(EnergyPlusData const &state); void ResetNodeData(EnergyPlusData &state); diff --git a/src/EnergyPlus/HVACStandAloneERV.cc b/src/EnergyPlus/HVACStandAloneERV.cc index 15438f65487..a606bccb8c8 100644 --- a/src/EnergyPlus/HVACStandAloneERV.cc +++ b/src/EnergyPlus/HVACStandAloneERV.cc @@ -281,8 +281,6 @@ void GetStandAloneERV(EnergyPlusData &state) GlobalNames::IntraObjUniquenessCheck( state, Alphas(4), CurrentModuleObject, cAlphaFields(4), state.dataHVACStandAloneERV->SupplyAirFanUniqueNames, ErrorsFound); - errFlag = false; - if ((standAloneERV.SupplyAirFanIndex = Fans::GetFanIndex(state, standAloneERV.SupplyAirFanName)) == 0) { ShowSevereItemNotFound(state, eoh, cAlphaFields(4), standAloneERV.SupplyAirFanName); ErrorsFound = true; @@ -297,7 +295,6 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.ExhaustAirFanName = Alphas(5); GlobalNames::IntraObjUniquenessCheck( state, Alphas(5), CurrentModuleObject, cAlphaFields(5), state.dataHVACStandAloneERV->ExhaustAirFanUniqueNames, ErrorsFound); - errFlag = false; if ((standAloneERV.ExhaustAirFanIndex = Fans::GetFanIndex(state, standAloneERV.ExhaustAirFanName)) == 0) { ShowSevereItemNotFound(state, eoh, cAlphaFields(5), standAloneERV.ExhaustAirFanName); @@ -1695,7 +1692,6 @@ int getEqIndex(EnergyPlusData &state, std::string_view CompName) for (int StandAloneERVNum = 1; StandAloneERVNum <= state.dataHVACStandAloneERV->NumStandAloneERVs; StandAloneERVNum++) { if (Util::SameString(CompName, state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)) { return StandAloneERVNum; - break; } } return 0; diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.cc b/src/EnergyPlus/HVACUnitaryBypassVAV.cc index b12b3213faf..29014cd42a6 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.cc +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.cc @@ -330,7 +330,6 @@ namespace HVACUnitaryBypassVAV { bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine bool DXErrorsFound(false); // Set to true if errors in get coil input Array1D_int OANodeNums(4); // Node numbers of OA mixer (OA, EA, RA, MA) - std::string HXDXCoolCoilName; // Name of DX cooling coil used with Heat Exchanger Assisted Cooling Coil bool DXCoilErrFlag; // used in warning messages Array1D_string Alphas(20, ""); @@ -754,7 +753,7 @@ namespace HVACUnitaryBypassVAV { ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name)); ErrorsFound = true; } else { - auto &newCoil = state.dataCoilCooingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum]; + auto const &newCoil = state.dataCoilCooingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum]; thisCBVAV.DXCoilInletNode = newCoil.evapInletNodeIndex; thisCBVAV.DXCoilOutletNode = newCoil.evapOutletNodeIndex; thisCBVAV.CondenserNodeNum = newCoil.condInletNodeIndex; @@ -2444,7 +2443,7 @@ namespace HVACUnitaryBypassVAV { } // now find the speed ratio for the found speednum auto f = [&state, CBVAVNum, SpeedNum, DesOutTemp](Real64 const SpeedRatio) { - auto &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum); + auto const &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum); // FUNCTION LOCAL VARIABLE DECLARATIONS: Real64 OutletAirTemp; // outlet air temperature [C] Real64 QZnReqCycling = 0.001; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index f0efdbf193c..6bb48f857f3 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -174,13 +174,6 @@ void SimulateVRF(EnergyPlusData &state, } CompIndex = VRFTUNum; - // suppress unused warnings temporarily until VRF inherits HVACSystemData - if (OAUnitNum > 0) { - bool tmpFlag = false; - if (OAUCoilOutTemp > 0.0) tmpFlag = true; - if (ZoneEquipment) tmpFlag = true; - } - } else { VRFTUNum = CompIndex; if (VRFTUNum > state.dataHVACVarRefFlow->NumVRFTU || VRFTUNum < 1) { @@ -363,10 +356,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) static constexpr std::string_view RoutineName("VRFCondenser"); - int NumTU; // loop counter - int TUIndex; // Index to terminal unit - int CoolCoilIndex; // index to cooling coil in terminal unit - int HeatCoilIndex; // index to heating coil in terminal unit + int NumTU; // loop counter Real64 TotCoolCapTempModFac; // cooling CAPFT curve output Real64 TotHeatCapTempModFac; // heating CAPFT curve output @@ -383,7 +373,6 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) Real64 CoolOABoundary; // output of cooling boundary curve (outdoor temperature, C) Real64 HeatOABoundary; // output of heating boundary curve (outdoor temperature, C) Real64 EIRFPLRModFac; // EIRFPLR curve output - int Stage; // used for crankcase heater power calculation Real64 UpperStageCompressorRatio; // used for crankcase heater power calculation Real64 RhoAir; // Density of air [kg/m3] Real64 RhoWater; // Density of water [kg/m3] @@ -399,11 +388,9 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) Real64 InputPowerMultiplier; // Multiplier for power when system is in defrost Real64 LoadDueToDefrost; // Additional load due to defrost Real64 DefrostEIRTempModFac; // EIR modifier for defrost (function of entering drybulb, outside wetbulb) - int HRCAPFT; // index to heat recovery CAPFTCool curve Real64 HRCAPFTConst; // stead-state capacity fraction Real64 HRInitialCapFrac; // Fractional cooling degradation at the start of heat recovery from cooling mode Real64 HRCapTC; // Time constant used to recover from initial degradation in cooling heat recovery - int HREIRFT; // Index to cool EIR as a function of temperature curve for heat recovery Real64 HREIRFTConst; // stead-state EIR fraction Real64 HRInitialEIRFrac; // Fractional cooling degradation at the start of heat recovery from cooling mode Real64 HREIRTC; // Time constant used to recover from initial degradation in cooling heat recovery @@ -556,9 +543,9 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) // loop through TU's and calculate average inlet conditions for active coils for (NumTU = 1; NumTU <= NumTUInList; ++NumTU) { - TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); - CoolCoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).CoolCoilIndex; - HeatCoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).HeatCoilIndex; + int TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); + int CoolCoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).CoolCoilIndex; + int HeatCoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).HeatCoilIndex; TUParasiticPower += state.dataHVACVarRefFlow->VRFTU(TUIndex).ParasiticCoolElecPower + state.dataHVACVarRefFlow->VRFTU(TUIndex).ParasiticHeatElecPower; TUFanPower += state.dataHVACVarRefFlow->VRFTU(TUIndex).FanPower; @@ -955,7 +942,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) } vrf.HRCoolingActive = true; vrf.HRHeatingActive = false; - HRCAPFT = vrf.HRCAPFTCool; // Index to cool capacity as a function of temperature\PLR curve for heat recovery + int HRCAPFT = vrf.HRCAPFTCool; // Index to cool capacity as a function of temperature\PLR curve for heat recovery if (HRCAPFT > 0) { // VRF(VRFCond)%HRCAPFTCoolConst = 0.9d0 ! initialized to 0.9 if (state.dataCurveManager->PerfCurve(vrf.HRCAPFTCool)->numDims == 2) { // Curve type for HRCAPFTCool @@ -968,7 +955,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) HRInitialCapFrac = vrf.HRInitialCoolCapFrac; // Fractional cooling degradation at the start of heat recovery from cooling mode HRCapTC = vrf.HRCoolCapTC; // Time constant used to recover from initial degradation in cooling heat recovery - HREIRFT = vrf.HREIRFTCool; // Index to cool EIR as a function of temperature curve for heat recovery + int HREIRFT = vrf.HREIRFTCool; // Index to cool EIR as a function of temperature curve for heat recovery if (HREIRFT > 0) { // VRF(VRFCond)%HREIRFTCoolConst = 1.1d0 ! initialized to 1.1 if (state.dataCurveManager->PerfCurve(vrf.HREIRFTCool)->numDims == 2) { // Curve type for HREIRFTCool @@ -986,7 +973,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) } vrf.HRCoolingActive = false; vrf.HRHeatingActive = true; - HRCAPFT = vrf.HRCAPFTHeat; // Index to heat capacity as a function of temperature\PLR curve for heat recovery + int HRCAPFT = vrf.HRCAPFTHeat; // Index to heat capacity as a function of temperature\PLR curve for heat recovery if (HRCAPFT > 0) { // VRF(VRFCond)%HRCAPFTHeatConst = 1.1d0 ! initialized to 1.1 if (state.dataCurveManager->PerfCurve(vrf.HRCAPFTHeat)->numDims == 2) { // Curve type for HRCAPFTCool @@ -1009,7 +996,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) HRInitialCapFrac = vrf.HRInitialHeatCapFrac; // Fractional heating degradation at the start of heat recovery from cooling mode HRCapTC = vrf.HRHeatCapTC; // Time constant used to recover from initial degradation in heating heat recovery - HREIRFT = vrf.HREIRFTHeat; // Index to cool EIR as a function of temperature curve for heat recovery + int HREIRFT = vrf.HREIRFTHeat; // Index to cool EIR as a function of temperature curve for heat recovery if (HREIRFT > 0) { // VRF(VRFCond)%HREIRFTCoolConst = 1.1d0 ! initialized to 1.1 if (state.dataCurveManager->PerfCurve(vrf.HREIRFTHeat)->numDims == 2) { // Curve type for HREIRFTHeat @@ -1217,7 +1204,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) vrf.CrankCaseHeaterPower = vrf.CCHeaterPower * (1.0 - VRFRTF); if (vrf.NumCompressors > 1) { UpperStageCompressorRatio = (1.0 - vrf.CompressorSizeRatio) / (vrf.NumCompressors - 1); - for (Stage = 1; Stage <= vrf.NumCompressors - 2; ++Stage) { + for (int Stage = 1; Stage <= vrf.NumCompressors - 2; ++Stage) { if (vrf.VRFCondPLR < (vrf.CompressorSizeRatio + Stage * UpperStageCompressorRatio)) { vrf.CrankCaseHeaterPower += vrf.CCHeaterPower; } @@ -3271,8 +3258,6 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) for (int VRFTUNum = 1; VRFTUNum <= state.dataHVACVarRefFlow->NumVRFTU; ++VRFTUNum) { // initialize local node number variables - int FanInletNodeNum = 0; - int FanOutletNodeNum = 0; int CCoilInletNodeNum = 0; int CCoilOutletNodeNum = 0; int HCoilInletNodeNum = 0; @@ -3435,8 +3420,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) Real64 FanVolFlowRate = fan->maxAirFlowRate; thisVrfTU.ActualFanVolFlowRate = FanVolFlowRate; - FanInletNodeNum = fan->inletNodeNum; - FanOutletNodeNum = fan->outletNodeNum; + int FanInletNodeNum = fan->inletNodeNum; + int FanOutletNodeNum = fan->outletNodeNum; thisVrfTU.FanAvailSchedPtr = fan->availSchedNum; // Check fan's schedule for cycling fan operation if constant volume fan is used @@ -4346,7 +4331,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) vrfTU.DesignSpecMultispeedHPType = cAlphaArgs(20); vrfTU.DesignSpecMultispeedHPName = cAlphaArgs(21); vrfTU.DesignSpecMSHPIndex = UnitarySystems::getDesignSpecMSHPIndex(state, cAlphaArgs(21)); - auto &designSpecFan = state.dataUnitarySystems->designSpecMSHP[vrfTU.DesignSpecMSHPIndex]; + auto const &designSpecFan = state.dataUnitarySystems->designSpecMSHP[vrfTU.DesignSpecMSHPIndex]; if (vrfTU.DXCoolCoilType_Num == HVAC::CoilVRF_Cooling) { int NumSpeeds = designSpecFan.numOfSpeedCooling; vrfTU.NumOfSpeedCooling = NumSpeeds; @@ -5256,7 +5241,7 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & { constexpr static std::string_view cTerminalUnitType("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow"); - auto &nodeID = state.dataLoopNodes->NodeID; + auto const &nodeID = state.dataLoopNodes->NodeID; auto &vrfTU = state.dataHVACVarRefFlow->VRFTU(VRFTUNum); std::string const cTUName(vrfTU.Name); bool const CoolingCoilPresent = vrfTU.CoolingCoilPresent; @@ -5494,7 +5479,7 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & if (fanOutletNode != VRFTUOutletNodeNum) { ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, - "... For blow through fan and no supplemental heating coil the fan outlet node name must " + "... For draw through fan and no supplemental heating coil the fan outlet node name must " "match the terminal unit outlet node name."); if (fanOutletNode > 0 && VRFTUOutletNodeNum > 0) { ShowContinueError(state, format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); @@ -7510,14 +7495,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) static constexpr std::string_view RoutineName("SizeVRF: "); // include trailing blank space auto &CheckVRFCombinationRatio = state.dataHVACVarRefFlow->CheckVRFCombinationRatio; - bool FoundAll; // temporary variable used to check all terminal units - bool errFlag; // temporary variable used for error checking Real64 TUCoolingCapacity; // total terminal unit cooling capacity Real64 TUHeatingCapacity; // total terminal unit heating capacity int VRFCond; // index to VRF condenser - int TUListNum; // index to terminal unit list - int TUIndex; // index to terminal unit - int NumTU; // DO Loop index counter Real64 OnOffAirFlowRat; // temporary variable used when sizing coils Real64 DXCoilCap; // capacity of DX cooling coil (W) bool IsAutoSize; // Indicator to autosize @@ -7551,14 +7531,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) std::string SizingString; // input field sizing description (e.g., Nominal Capacity) Real64 TempSize; // autosized value of coil input field int FieldNum = 2; // IDD numeric field number where input field description is found - int SizingMethod; // Integer representation of sizing method name (e.g., CoolingAirflowSizing, HeatingAirflowSizing, CoolingCapacitySizing, - // HeatingCapacitySizing, etc.) - bool PrintFlag = true; // TRUE when sizing information is reported in the eio file - int zoneHVACIndex; // index of zoneHVAC equipment sizing specification - int SAFMethod(0); // supply air flow rate sizing method (SupplyAirFlowRate, FlowPerFloorArea, FractionOfAutosizedCoolingAirflow, - // FractionOfAutosizedHeatingAirflow ...) - int CapSizingMethod(0); // capacity sizing methods (HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, and - // FractionOfAutosizedHeatingCapacity ) + bool PrintFlag = true; // TRUE when sizing information is reported in the eio file auto &ZoneEqSizing = state.dataSize->ZoneEqSizing; @@ -7593,7 +7566,6 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) EqSizing.OAVolFlow = 0.0; VRFCond = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFSysNum; - IsAutoSize = false; MaxCoolAirVolFlowDes = 0.0; MaxCoolAirVolFlowUser = 0.0; MaxHeatAirVolFlowDes = 0.0; @@ -7671,12 +7643,16 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) state.dataSize->CurZoneEqNum); } - zoneHVACIndex = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HVACSizingIndex; + int zoneHVACIndex = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HVACSizingIndex; - SizingMethod = CoolingAirflowSizing; + // Integer representation of sizing method name (e.g., CoolingAirflowSizing, HeatingAirflowSizing, CoolingCapacitySizing, + // HeatingCapacitySizing, etc.) + int SizingMethod = CoolingAirflowSizing; PrintFlag = true; bool errorsFound = false; - SAFMethod = state.dataSize->ZoneHVACSizing(zoneHVACIndex).CoolingSAFMethod; + // supply air flow rate sizing method (SupplyAirFlowRate, FlowPerFloorArea, FractionOfAutosizedCoolingAirflow, + // FractionOfAutosizedHeatingAirflow ...) + int SAFMethod = state.dataSize->ZoneHVACSizing(zoneHVACIndex).CoolingSAFMethod; EqSizing.SizingMethod(SizingMethod) = SAFMethod; if (SAFMethod == SupplyAirFlowRate || SAFMethod == FlowPerFloorArea || SAFMethod == FractionOfAutosizedCoolingAirflow) { if (SAFMethod == SupplyAirFlowRate) { @@ -7708,7 +7684,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow = sizingCoolingAirFlow.size(state, TempSize, errorsFound); } else if (SAFMethod == FlowPerCoolingCapacity) { - SizingMethod = CoolingCapacitySizing; + SizingMethod = CoolingCapacitySizing; // either this isn't needed or needs to be assigned to EqSizing TempSize = AutoSize; PrintFlag = false; state.dataSize->DataScalableSizingON = true; @@ -7786,14 +7762,14 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) } else { TempSize = state.dataSize->ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; } - bool errorsFound = false; + errorsFound = false; HeatingAirFlowSizer sizingHeatingAirFlow; sizingHeatingAirFlow.overrideSizingString(SizingString); // sizingHeatingAirFlow.setHVACSizingIndexData(FanCoil(FanCoilNum).HVACSizingIndex); sizingHeatingAirFlow.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow = sizingHeatingAirFlow.size(state, TempSize, errorsFound); } else if (SAFMethod == FlowPerHeatingCapacity) { - SizingMethod = HeatingCapacitySizing; + SizingMethod = HeatingCapacitySizing; // either this isn't needed or needs to be assigned to EqSizing TempSize = AutoSize; PrintFlag = false; state.dataSize->DataScalableSizingON = true; @@ -7801,13 +7777,13 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataSize->ZoneHVACSizing(zoneHVACIndex).HeatingCapMethod == FractionOfAutosizedHeatingCapacity) { state.dataSize->DataFracOfAutosizedHeatingCapacity = state.dataSize->ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; } - bool errorsFound = false; + errorsFound = false; HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); sizerHeatingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName); state.dataSize->DataAutosizedHeatingCapacity = sizerHeatingCapacity.size(state, TempSize, errorsFound); state.dataSize->DataFlowPerHeatingCapacity = state.dataSize->ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; - SizingMethod = HeatingAirflowSizing; + SizingMethod = HeatingAirflowSizing; // either this isn't needed or needs to be assigned to EqSizing PrintFlag = true; TempSize = AutoSize; errorsFound = false; @@ -7927,7 +7903,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) } else { TempSize = state.dataSize->ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; } - bool errorsFound = false; + errorsFound = false; HeatingAirFlowSizer sizingNoHeatingAirFlow; sizingNoHeatingAirFlow.overrideSizingString(SizingString); // sizingNoHeatingAirFlow.setHVACSizingIndexData(FanCoil(FanCoilNum).HVACSizingIndex); @@ -7946,7 +7922,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) // initialize capacity sizing variables: cooling SizingMethod = CoolingCapacitySizing; - CapSizingMethod = state.dataSize->ZoneHVACSizing(zoneHVACIndex).CoolingCapMethod; + // capacity sizing methods (HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, and + // FractionOfAutosizedHeatingCapacity ) + int CapSizingMethod = state.dataSize->ZoneHVACSizing(zoneHVACIndex).CoolingCapMethod; EqSizing.SizingMethod(SizingMethod) = CapSizingMethod; if (CapSizingMethod == CoolingDesignCapacity || CapSizingMethod == CapacityPerFloorArea || CapSizingMethod == FractionOfAutosizedCoolingCapacity) { @@ -8033,7 +8011,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) FieldNum = 3; // N3, \field Supply Air Flow Rate During Heating Operation SizingString = state.dataHVACVarRefFlow->VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SizingMethod = HeatingAirflowSizing; + int SizingMethod = HeatingAirflowSizing; // either this isn't needed or needs to be assigned to EqSizing TempSize = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow; errorsFound = false; HeatingAirFlowSizer sizingHeatingAirFlow; @@ -8386,10 +8364,8 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) state.dataHVACVarRefFlow->VRFTU(VRFTUNum).DesignSuppHeatingCapacity = sizerWaterHeatingCapacity.size(state, TempSize, ErrorsFound); } } else { - SizingMethod = HVAC::HeatingCapacitySizing; SizingString = "Supplemental Heating Coil Nominal Capacity [W]"; if (TempSize == DataSizing::AutoSize) { - IsAutoSize = true; bool errorsFound = false; HeatingCapacitySizer sizerHeatingCapacity; sizerHeatingCapacity.overrideSizingString(SizingString); @@ -8434,10 +8410,11 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) // ZoneEqDXCoil = .FALSE. TUCoolingCapacity = 0.0; TUHeatingCapacity = 0.0; - FoundAll = true; - TUListNum = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).TUListIndex; - for (NumTU = 1; NumTU <= state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).NumTUInList; ++NumTU) { - TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); + bool FoundAll = true; + bool errFlag; // temporary variable used for error checking + int TUListNum = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).TUListIndex; + for (int NumTU = 1; NumTU <= state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).NumTUInList; ++NumTU) { + int TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); if (state.dataHVACVarRefFlow->VRFTU(TUIndex).CoolCoilIndex > 0) { DXCoilCap = DXCoils::GetCoilCapacityByIndexType(state, state.dataHVACVarRefFlow->VRFTU(TUIndex).CoolCoilIndex, @@ -8896,19 +8873,16 @@ void VRFCondenserEquipment::SizeVRFCondenser(EnergyPlusData &state) static constexpr std::string_view RoutineName("SizeVRFCondenser"); - int PltSizCondNum; // Plant Sizing index for condenser loop Real64 rho; // local fluid density [kg/m3] Real64 Cp; // local fluid specific heat [J/kg-k] Real64 tmpCondVolFlowRate; // local condenser design volume flow rate [m3/s] - bool ErrorsFound; // indicates problem with sizing // save the design water flow rate for use by the water loop sizing algorithms if (this->CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ErrorsFound = false; - PltSizCondNum = 0; - + bool ErrorsFound = false; if (this->WaterCondVolFlowRate == DataSizing::AutoSize) { + int PltSizCondNum = 0; if (this->SourcePlantLoc.loopNum > 0) PltSizCondNum = state.dataPlnt->PlantLoop(this->SourcePlantLoc.loopNum).PlantSizNum; if (PltSizCondNum > 0) { rho = FluidProperties::GetDensityGlycol(state, @@ -9076,10 +9050,8 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, int VRFCond = this->VRFSysNum; Real64 FullOutput = 0.0; // unit full output when compressor is operating [W] Real64 TempOutput = 0.0; // unit output when iteration limit exceeded [W] - int SolFla = 0; // Flag of RegulaFalsi solver Real64 TempMinPLR = 0.0; // min PLR used in Regula Falsi call Real64 TempMaxPLR = 0.0; // max PLR used in Regula Falsi call - bool ContinueIter; // used when convergence is an issue Real64 NoCompOutput = 0.0; // output when no active compressor [W] bool VRFCoolingMode = state.dataHVACVarRefFlow->CoolingLoad(VRFCond); bool VRFHeatingMode = state.dataHVACVarRefFlow->HeatingLoad(VRFCond); @@ -9153,7 +9125,7 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, // set supplemental heating coil calculation if the condition requires if (this->SuppHeatingCoilPresent) { if (this->isSetPointControlled) { - auto &thisSuppHeatCoilAirInletNode = state.dataLoopNodes->Node(this->SuppHeatCoilAirInletNode); + auto const &thisSuppHeatCoilAirInletNode = state.dataLoopNodes->Node(this->SuppHeatCoilAirInletNode); if (this->suppTempSetPoint > thisSuppHeatCoilAirInletNode.Temp) { Real64 mDot = thisSuppHeatCoilAirInletNode.MassFlowRate; Real64 Tin = thisSuppHeatCoilAirInletNode.Temp; @@ -9267,6 +9239,7 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, if (SpeedNum == 1) { this->SpeedRatio = 0.0; } + int SolFla = 0; // Flag of RegulaFalsi solver auto f = [&state, VRFTUNum, FirstHVACIteration, QZnReq, OnOffAirFlowRatio](Real64 const PartLoadRatio) { Real64 QZnReqTemp = QZnReq; // denominator representing zone load (W) Real64 ActualOutput; // delivered capacity of VRF terminal unit @@ -9309,7 +9282,7 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, if (SolFla == -1) { // Very low loads may not converge quickly. Tighten PLR boundary and try again. TempMaxPLR = -0.1; - ContinueIter = true; + bool ContinueIter = true; while (ContinueIter && TempMaxPLR < 1.0) { TempMaxPLR += 0.1; @@ -9638,8 +9611,6 @@ void ReportVRFTerminalUnit(EnergyPlusData &state, int const VRFTUNum) // index t using namespace DataSizing; - int DXCoolingCoilIndex; // - index to DX cooling coil - int DXHeatingCoilIndex; // - index to DX heating coil Real64 TotalConditioning; // - sum of sensible and latent rates Real64 SensibleConditioning; // - sensible rate Real64 LatentConditioning; // - latent rate @@ -9650,8 +9621,6 @@ void ReportVRFTerminalUnit(EnergyPlusData &state, int const VRFTUNum) // index t bool HRHeatRequestFlag; // - indicates TU could be in heat mode bool HRCoolRequestFlag; // - indicates TU could be in cool mode - DXCoolingCoilIndex = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolCoilIndex; - DXHeatingCoilIndex = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatCoilIndex; VRFCond = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFSysNum; TUListIndex = state.dataHVACVarRefFlow->VRF(VRFCond).ZoneTUListPtr; IndexToTUInTUList = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).IndexToTUInTUList; @@ -10035,8 +10004,6 @@ void InitializeOperatingMode(EnergyPlusData &state, Real64 SPTempHi; // thermostat setpoint high Real64 SPTempLo; // thermostat setpoint low int NumTU; // loop counter, number of TU's in list - int TUIndex; // index to TU - int ThisZoneNum; // index to zone number where TU is located Real64 ZoneLoad; // current zone load (W) Real64 LoadToCoolingSP; // thermostat load to cooling setpoint (W) Real64 LoadToHeatingSP; // thermostat load to heating setpoint (W) @@ -10066,8 +10033,7 @@ void InitializeOperatingMode(EnergyPlusData &state, for (NumTU = 1; NumTU <= state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).NumTUInList; ++NumTU) { // make sure TU's have been sized before looping through each one of them to determine operating mode if (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).TerminalUnitNotSizedYet)) break; - TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); - ThisZoneNum = state.dataHVACVarRefFlow->VRFTU(TUIndex).ZoneNum; + int TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); // check to see if coil is present if (state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).CoolingCoilPresent(NumTU)) { @@ -10182,12 +10148,13 @@ void InitializeOperatingMode(EnergyPlusData &state, // Constant fan systems are tested for ventilation load to determine if load to be met changes. // more logic may be needed here, what is the OA flow rate, was last mode heating or cooling, what control is used, etc... + int ThisZoneNum = state.dataHVACVarRefFlow->VRFTU(TUIndex).ZoneNum; getVRFTUZoneLoad(state, TUIndex, ZoneLoad, LoadToHeatingSP, LoadToCoolingSP, true); if (state.dataHVACVarRefFlow->VRF(VRFCond).ThermostatPriority == ThermostatCtrlType::ThermostatOffsetPriority) { // for TSTATPriority, just check difference between zone temp and thermostat setpoint if (ThisZoneNum > 0) { - auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ThisZoneNum); + auto const &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ThisZoneNum); SPTempHi = state.dataHeatBalFanSys->ZoneThermostatSetPointHi(ThisZoneNum); SPTempLo = state.dataHeatBalFanSys->ZoneThermostatSetPointLo(ThisZoneNum); @@ -10844,7 +10811,7 @@ void getVRFTUZoneLoad( bool getVRFTUNodeNumber(EnergyPlusData &state, int const nodeNumber) { for (int vrfTUIndex = 1; vrfTUIndex <= state.dataHVACVarRefFlow->NumVRFTU; ++vrfTUIndex) { - auto &vrfTU = state.dataHVACVarRefFlow->VRFTU(vrfTUIndex); + auto const &vrfTU = state.dataHVACVarRefFlow->VRFTU(vrfTUIndex); bool noVrfTUOutdoorAir = false; if (vrfTU.CoolOutAirVolFlow == 0 && vrfTU.HeatOutAirVolFlow == 0 && vrfTU.NoCoolHeatOutAirVolFlow == 0) { @@ -10944,7 +10911,6 @@ void VRFTerminalUnitEquipment::CalcVRFIUVariableTeTc(EnergyPlusData &state, int TUListIndex; // index to TU list for this VRF system int VRFNum; // index to VRF that the VRF Terminal Unit serves int VRFInletNode; // VRF inlet node number - int ZoneIndex; // index to zone where the VRF Terminal Unit resides Real64 BFC; // Bypass factor at the cooling mode (-) Real64 BFH; // Bypass factor at the heating mode (-) Real64 C1Tevap; // Coefficient for indoor unit coil evaporating temperature curve (-) @@ -10975,7 +10941,6 @@ void VRFTerminalUnitEquipment::CalcVRFIUVariableTeTc(EnergyPlusData &state, // Get the equipment/zone index corresponding to the VRFTU CoolCoilNum = this->CoolCoilIndex; HeatCoilNum = this->HeatCoilIndex; - ZoneIndex = this->ZoneNum; VRFNum = this->VRFSysNum; TUListIndex = state.dataHVACVarRefFlow->VRF(VRFNum).ZoneTUListPtr; IndexToTUInTUList = this->IndexToTUInTUList; @@ -11351,8 +11316,6 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) // Evaporator (IU side) operational parameters Pevap = this->refrig->getSatPressure(state, this->IUEvaporatingTemp, RoutineName); Psuction = Pevap; - Tsuction = this->IUEvaporatingTemp; // GetSatTemperatureRefrig(state, this->RefrigerantName, max( min( Psuction, RefPHigh ), RefPLow ), - // RefrigerantIndex, RoutineName ); this->EvaporatingTemp = this->IUEvaporatingTemp; // GetSatTemperatureRefrig(state, this->RefrigerantName, max( min( Pevap, RefPHigh ), RefPLow // ), RefrigerantIndex, RoutineName ); @@ -11793,7 +11756,6 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) // Evaporator (IU side) operational parameters Pevap = this->refrig->getSatPressure(state, this->IUEvaporatingTemp, RoutineName); Psuction = Pevap; - Tsuction = this->IUEvaporatingTemp; this->EvaporatingTemp = this->IUEvaporatingTemp; // Condenser (OU side) operation ranges @@ -12421,10 +12383,8 @@ void VRFTerminalUnitEquipment::ControlVRF_FluidTCtrl(EnergyPlusData &state, Real64 FullOutput; // unit full output when compressor is operating [W] Real64 TempOutput; // unit output when iteration limit exceeded [W] Real64 NoCompOutput; // output when no active compressor [W] - int SolFla; // Flag of RegulaFalsi solver Real64 TempMinPLR; // min PLR used in Regula Falsi call Real64 TempMaxPLR; // max PLR used in Regula Falsi call - bool ContinueIter; // used when convergence is an issue int VRFCond; // index to VRF condenser int IndexToTUInTUList; // index to TU in specific list for the VRF system int TUListIndex; // index to TU list for this VRF system @@ -12493,18 +12453,18 @@ void VRFTerminalUnitEquipment::ControlVRF_FluidTCtrl(EnergyPlusData &state, if (!DXCoolingCoilOprCtrl) PartLoadRatio = 0.0; this->CalcVRF_FluidTCtrl(state, VRFTUNum, FirstHVACIteration, PartLoadRatio, FullOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); if (this->CoolingCoilPresent) { - auto &thisAirInNode = state.dataLoopNodes->Node(state.dataDXCoils->DXCoil(this->CoolCoilIndex).AirInNode); + auto const &thisAirInNode = state.dataLoopNodes->Node(state.dataDXCoils->DXCoil(this->CoolCoilIndex).AirInNode); this->coilInNodeT = thisAirInNode.Temp; this->coilInNodeW = thisAirInNode.HumRat; } else { - auto &thisAirInNode = state.dataLoopNodes->Node(state.dataDXCoils->DXCoil(this->HeatCoilIndex).AirInNode); + auto const &thisAirInNode = state.dataLoopNodes->Node(state.dataDXCoils->DXCoil(this->HeatCoilIndex).AirInNode); this->coilInNodeT = thisAirInNode.Temp; this->coilInNodeW = thisAirInNode.HumRat; } // set supplemental heating coil calculation if the condition requires if (this->SuppHeatingCoilPresent) { - auto &thisSuppHeatCoilAirInletNode = state.dataLoopNodes->Node(this->SuppHeatCoilAirInletNode); + auto const &thisSuppHeatCoilAirInletNode = state.dataLoopNodes->Node(this->SuppHeatCoilAirInletNode); if (((QZnReq > HVAC::SmallLoad && QZnReq > FullOutput) || (((QZnReq - NoCompOutput) > HVAC::SmallLoad) && QZnReq <= 0.0)) || (this->isSetPointControlled && this->suppTempSetPoint > thisSuppHeatCoilAirInletNode.Temp)) { Real64 ZoneLoad = 0.0; @@ -12607,6 +12567,7 @@ void VRFTerminalUnitEquipment::ControlVRF_FluidTCtrl(EnergyPlusData &state, // The coil will not operate at PLR=0 or PLR=1, calculate the operating part-load ratio if ((VRFHeatingMode || HRHeatingMode) || ((VRFCoolingMode && DXCoolingCoilOprCtrl) || HRCoolingMode)) { + int SolFla; // Flag of RegulaFalsi solver auto f = [&state, VRFTUNum, FirstHVACIteration, QZnReq, OnOffAirFlowRatio](Real64 const PartLoadRatio) { Real64 QZnReqTemp = QZnReq; // denominator representing zone load (W) Real64 ActualOutput; // delivered capacity of VRF terminal unit @@ -12636,7 +12597,7 @@ void VRFTerminalUnitEquipment::ControlVRF_FluidTCtrl(EnergyPlusData &state, if (SolFla == -1) { // Very low loads may not converge quickly. Tighten PLR boundary and try again. TempMaxPLR = -0.1; - ContinueIter = true; + bool ContinueIter = true; while (ContinueIter && TempMaxPLR < 1.0) { TempMaxPLR += 0.1; @@ -12841,12 +12802,16 @@ void VRFTerminalUnitEquipment::CalcVRF_FluidTCtrl(EnergyPlusData &state, state.dataHVACVarRefFlow->LoopDXHeatCoilRTF = 0.0; } + Real64 OnOffFanPartLoadFraction = 1.0; + if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).fanOp == HVAC::FanOp::Cycling) { + OnOffFanPartLoadFraction = state.dataHVACGlobal->OnOffFanPartLoadFraction; + } // if draw through, simulate coils then fan if (this->fanPlace == HVAC::FanPlace::DrawThru) { auto *fan = state.dataFans->fans(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).FanIndex); if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).fanType == HVAC::FanType::SystemModel) { if (OnOffAirFlowRatio > 0.0) { - fan->simulate(state, FirstHVACIteration, _, _); + fan->simulate(state, FirstHVACIteration, _, _, _, fan->inletAirMassFlowRate, OnOffFanPartLoadFraction, 0, 0, _); } else { fan->simulate(state, FirstHVACIteration, _, _, PartLoadRatio); } @@ -13000,7 +12965,6 @@ Real64 VRFTerminalUnitEquipment::CalVRFTUAirFlowRate_FluidTCtrl(EnergyPlusData & using SingleDuct::SimATMixer; int constexpr Mode(1); // Performance mode for MultiMode DX coil. Always 1 for other coil types - int OAMixNode; // index to the mix node of OA mixer int VRFCond; // index to VRF condenser int VRFInletNode; // VRF inlet node number Real64 FanSpdRatioBase; // baseline FanSpdRatio for VRFTUAirFlowResidual @@ -13034,7 +12998,7 @@ Real64 VRFTerminalUnitEquipment::CalVRFTUAirFlowRate_FluidTCtrl(EnergyPlusData & if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerUsed) { MixedAir::SimOAMixer( state, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerName, state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerIndex); - OAMixNode = state.dataMixedAir->OAMixer(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerIndex).MixNode; + int OAMixNode = state.dataMixedAir->OAMixer(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).OAMixerIndex).MixNode; Tin = state.dataLoopNodes->Node(OAMixNode).Temp; Win = state.dataLoopNodes->Node(OAMixNode).HumRat; } @@ -13664,8 +13628,6 @@ void VRFCondenserEquipment::VRFOU_CompSpd( int CompSpdLB; // index for Compressor speed low bound [-] int CompSpdUB; // index for Compressor speed up bound [-] int NumOfCompSpdInput; // Number of compressor speed input by the user [-] - int NumTUInList; // number of terminal units is list - int TUListNum; // index to TU List Real64 C_cap_operation; // Compressor capacity modification algorithm_modified Cap [-] Real64 P_suction; // Compressor suction pressure Pe' [Pa] Real64 Q_evap_req; // Required evaporative capacity [W] @@ -13680,8 +13642,6 @@ void VRFCondenserEquipment::VRFOU_CompSpd( static constexpr std::string_view RoutineName("VRFOU_CompSpd"); // variable initializations: component index - TUListNum = this->ZoneTUListPtr; - NumTUInList = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).NumTUInList; RefPLow = this->refrig->PsLowPresValue; RefPHigh = this->refrig->PsHighPresValue; @@ -13806,8 +13766,6 @@ void VRFCondenserEquipment::VRFOU_CompCap( int CompSpdLB; // index for Compressor speed low bound [-] int CompSpdUB; // index for Compressor speed up bound [-] int NumOfCompSpdInput; // Number of compressor speed input by the user [-] - int NumTUInList; // number of terminal units is list - int TUListNum; // index to TU List Real64 C_cap_operation; // Compressor capacity modification algorithm_modified Cap [-] Real64 P_suction; // Compressor suction pressure Pe' [Pa] Real64 Q_evap_sys; // evaporative capacity [W] @@ -13821,8 +13779,6 @@ void VRFCondenserEquipment::VRFOU_CompCap( static constexpr std::string_view RoutineName("VRFOU_CompCap"); // variable initializations: component index - TUListNum = this->ZoneTUListPtr; - NumTUInList = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).NumTUInList; RefPLow = this->refrig->PsLowPresValue; RefPHigh = this->refrig->PsHighPresValue; @@ -14027,10 +13983,7 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, Real64 CondHeat = Q_evap_req * C_cap_operation0 / this->RatedEvapCapacity; // 150130 To be confirmed int CAPFT = this->OUCoolingCAPFT(CounterCompSpdTemp); - // Update Te' (SmallLoadTe) to meet the required evaporator capacity - MinOutdoorUnitTe = 6; P_discharge = this->refrig->getSatPressure(state, T_discharge, RoutineName); - MinRefriPe = this->refrig->getSatPressure(state, -15, RoutineName); MinOutdoorUnitPe = max(P_discharge - this->CompMaxDeltaP, MinRefriPe); MinOutdoorUnitTe = this->refrig->getSatTemperature(state, max(min(MinOutdoorUnitPe, RefPHigh), RefPLow), RoutineName); @@ -14651,7 +14604,6 @@ void VRFCondenserEquipment::VRFHR_OU_HR_Mode(EnergyPlusData &state, Real64 Ncomp_new; Real64 Q_c_tot_temp; Real64 Q_c_OU_temp; - Real64 Tsuction_new; Real64 Tsuction_LB = state.dataEnvrn->OutDryBulbTemp - this->DiffOUTeTo; Real64 Tsuction_HB = Tsuction; @@ -14861,8 +14813,6 @@ void VRFCondenserEquipment::VRFOU_PipeLossC( using General::SolveRoot; int TUListNum; // index to TU List - int TUIndex; // Index to terminal unit - int CoilIndex; // index to coil in terminal unit int NumTUInList; // number of terminal units is list int NumIUActivated; // number of the used indoor units [-] @@ -14900,8 +14850,8 @@ void VRFCondenserEquipment::VRFOU_PipeLossC( Pipe_T_room = 0; NumIUActivated = 0; for (int NumTU = 1; NumTU <= NumTUInList; ++NumTU) { - TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); - CoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).CoolCoilIndex; + int TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); + int CoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).CoolCoilIndex; if (state.dataDXCoils->DXCoil(CoilIndex).TotalCoolingEnergyRate > 0.0) { Pipe_T_room = Pipe_T_room + state.dataDXCoils->DXCoil(CoilIndex).InletAirTemp; @@ -14990,8 +14940,6 @@ void VRFCondenserEquipment::VRFOU_PipeLossH( using General::SolveRoot; int TUListNum; // index to TU List - int TUIndex; // Index to terminal unit - int CoilIndex; // index to coil in terminal unit int NumTUInList; // number of terminal units is list int NumIUActivated; // number of the used indoor units [-] @@ -15041,8 +14989,8 @@ void VRFCondenserEquipment::VRFOU_PipeLossH( Pipe_T_room = 0; NumIUActivated = 0; for (int NumTU = 1; NumTU <= NumTUInList; ++NumTU) { - TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); - CoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).HeatCoilIndex; + int TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); + int CoilIndex = state.dataHVACVarRefFlow->VRFTU(TUIndex).HeatCoilIndex; if (state.dataDXCoils->DXCoil(CoilIndex).TotalHeatingEnergyRate > 0.0) { Pipe_T_room = Pipe_T_room + state.dataDXCoils->DXCoil(CoilIndex).InletAirTemp; @@ -15116,7 +15064,6 @@ void VRFTerminalUnitEquipment::CalcVRFSuppHeatingCoil(EnergyPlusData &state, Real64 constexpr Acc(1.e-3); // Accuracy of solver result // local variable declaration: - int SolFla; // Flag of solver, num iterations if >0, else error index Real64 SuppHeatCoilLoad; // load passed to supplemental heating coil (W) Real64 QActual; // actual coil output (W) Real64 PartLoadFrac; // temporary PLR variable @@ -15148,6 +15095,7 @@ void VRFTerminalUnitEquipment::CalcVRFSuppHeatingCoil(EnergyPlusData &state, WaterCoils::SimulateWaterCoilComponents( state, this->SuppHeatCoilName, FirstHVACIteration, this->SuppHeatCoilIndex, QActual, this->fanOp, PartLoadRatio); if (QActual > SuppHeatCoilLoad) { + int SolFla; // Flag of solver, num iterations if >0, else error index auto f = [&state, VRFTUNum, FirstHVACIteration, SuppHeatCoilLoad](Real64 const PartLoadFrac) { Real64 QActual = 0.0; // actual heating load delivered [W] Real64 mdot = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).SuppHeatCoilFluidMaxFlow * PartLoadFrac; diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index e9745fcad4f..8467d62d731 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -3802,7 +3802,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err int AlphaNum = 2; int Zone1Num = Util::FindItemInList(cAlphaArgs(AlphaNum), state.dataHeatBal->Zone); - if (Zone1Num == 0) { + int space1Num = Util::FindItemInList(cAlphaArgs(AlphaNum), state.dataHeatBal->space); + if ((Zone1Num == 0) && (space1Num == 0)) { ShowSevereError(state, format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", RoutineName, @@ -3811,11 +3812,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); ErrorsFound = true; + } else if (Zone1Num == 0) { + Zone1Num = state.dataHeatBal->space(space1Num).zoneNum; } ++AlphaNum; // 3 int Zone2Num = Util::FindItemInList(cAlphaArgs(AlphaNum), state.dataHeatBal->Zone); - if (Zone2Num == 0) { + int space2Num = Util::FindItemInList(cAlphaArgs(AlphaNum), state.dataHeatBal->space); + if ((Zone2Num == 0) && (space2Num == 0)) { ShowSevereError(state, format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", RoutineName, @@ -3824,7 +3828,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err cAlphaFieldNames(AlphaNum), cAlphaArgs(AlphaNum))); ErrorsFound = true; + } else if (Zone2Num == 0) { + Zone2Num = state.dataHeatBal->space(space2Num).zoneNum; } + + int spaceNumA = 0; + int spaceNumB = 0; if (Zone1Num == Zone2Num) { ShowSevereError(state, format("{}{}=\"{}\", The same zone name has been entered for both sides of a refrigerated door {}=\"{}\".", @@ -3837,9 +3846,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } else if (Zone1Num < Zone2Num) { // zone 1 will come first in soln loop, id zone 2 as mate zone ZoneNumA = Zone1Num; ZoneNumB = Zone2Num; + spaceNumA = space1Num; + spaceNumB = space2Num; } else { // zone 2 will come first in soln loop, id zone 1 as mate zone ZoneNumA = Zone2Num; ZoneNumB = Zone1Num; + spaceNumA = space2Num; + spaceNumB = space1Num; } if (!allocated(state.dataHeatBal->RefDoorMixing(ZoneNumA).OpenSchedPtr)) { @@ -3891,6 +3904,8 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ConnectionNumber = state.dataHeatBal->RefDoorMixing(ZoneNumA).NumRefDoorConnections + 1; state.dataHeatBal->RefDoorMixing(ZoneNumA).NumRefDoorConnections = ConnectionNumber; state.dataHeatBal->RefDoorMixing(ZoneNumA).ZonePtr = ZoneNumA; + state.dataHeatBal->RefDoorMixing(ZoneNumA).spaceIndex = spaceNumA; + state.dataHeatBal->RefDoorMixing(ZoneNumA).fromSpaceIndex = spaceNumB; state.dataHeatBal->RefDoorMixing(ZoneNumA).MateZonePtr(ConnectionNumber) = ZoneNumB; state.dataHeatBal->RefDoorMixing(ZoneNumA).DoorMixingObjectName(ConnectionNumber) = NameThisObject; // need to make sure same pair of zones is only entered once. diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index f86c36ef5cf..ae7cb43067d 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -1622,7 +1622,7 @@ namespace HeatBalanceManager { ShowSevereError( state, format("Invalid material layer type in window {} = {}", state.dataHeatBalMgr->CurrentModuleObject, thisConstruct.Name)); - ShowSevereError( + ShowContinueError( state, format("Equivalent Layer material type = {} is allowed only in Construction:WindowEquivalentLayer window object.", ConstructAlphas(Layer))); diff --git a/src/EnergyPlus/Humidifiers.cc b/src/EnergyPlus/Humidifiers.cc index 4331a105300..a6a788bac32 100644 --- a/src/EnergyPlus/Humidifiers.cc +++ b/src/EnergyPlus/Humidifiers.cc @@ -417,7 +417,7 @@ namespace Humidifiers { } else if (!lAlphaBlanks(3)) { ShowSevereError(state, format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, format("Invalid {}={}", cAlphaFields(3), Alphas(3))); - ShowSevereError(state, format("...{} not found.", cAlphaFields(3))); + ShowContinueError(state, format("...{} not found.", cAlphaFields(3))); ErrorsFound = true; } diff --git a/src/EnergyPlus/IOFiles.cc b/src/EnergyPlus/IOFiles.cc index 66f0c09f3cc..3c811670530 100644 --- a/src/EnergyPlus/IOFiles.cc +++ b/src/EnergyPlus/IOFiles.cc @@ -376,6 +376,9 @@ void IOFiles::OutputControl::getInput(EnergyPlusData &state) { // "output_audit" audit = boolean_choice(find_input(fields, "output_audit")); } + { // "output_space_sizing" + spsz = boolean_choice(find_input(fields, "output_space_sizing")); + } { // "output_zone_sizing" zsz = boolean_choice(find_input(fields, "output_zone_sizing")); } @@ -484,6 +487,7 @@ void IOFiles::flushAll() eio.flush(); eso.flush(); zsz.flush(); + spsz.flush(); ssz.flush(); map.flush(); mtr.flush(); diff --git a/src/EnergyPlus/IOFiles.hh b/src/EnergyPlus/IOFiles.hh index d93b8b67978..c2ea2bc6dec 100644 --- a/src/EnergyPlus/IOFiles.hh +++ b/src/EnergyPlus/IOFiles.hh @@ -680,6 +680,7 @@ public: bool eso = true; bool eio = true; bool audit = true; + bool spsz = true; bool zsz = true; bool ssz = true; bool dxf = true; @@ -719,6 +720,11 @@ public: fs::path outputZszTabFilePath{"epluszsz.tab"}; fs::path outputZszTxtFilePath{"epluszsz.txt"}; + InputOutputFile spsz{""}; + fs::path outputSpszCsvFilePath{"eplusspsz.csv"}; + fs::path outputSpszTabFilePath{"eplusspsz.tab"}; + fs::path outputSpszTxtFilePath{"eplusspsz.txt"}; + InputOutputFile ssz{""}; fs::path outputSszCsvFilePath{"eplusssz.csv"}; fs::path outputSszTabFilePath{"eplusssz.tab"}; diff --git a/src/EnergyPlus/Material.cc b/src/EnergyPlus/Material.cc index 1fe530d141c..3ef174f1191 100644 --- a/src/EnergyPlus/Material.cc +++ b/src/EnergyPlus/Material.cc @@ -1802,7 +1802,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matScreen->TransThermal + matScreen->AbsorpThermal >= 1.0) { ErrorsFound = true; ShowSevereError(state, state.dataHeatBalMgr->CurrentModuleObject + "=\"" + MaterialNames(1) + "\", Illegal value combination."); - ShowSevereError(state, "Thermal hemispherical emissivity plus open area fraction (1-diameter/spacing)**2 not < 1.0"); + ShowContinueError(state, "Thermal hemispherical emissivity plus open area fraction (1-diameter/spacing)**2 not < 1.0"); } } @@ -1933,7 +1933,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matScreen->TransThermal + matScreen->AbsorpThermal >= 1.0) { ErrorsFound = true; ShowSevereError(state, state.dataHeatBalMgr->CurrentModuleObject + "=\"" + MaterialNames(1) + "\", Illegal value combination."); - ShowSevereError(state, "Thermal hemispherical emissivity plus open area fraction (1-diameter/spacing)**2 not < 1.0"); + ShowContinueError(state, "Thermal hemispherical emissivity plus open area fraction (1-diameter/spacing)**2 not < 1.0"); } } // TotScreensEQL loop diff --git a/src/EnergyPlus/Material.hh b/src/EnergyPlus/Material.hh index 74be89e784a..54db2988aef 100644 --- a/src/EnergyPlus/Material.hh +++ b/src/EnergyPlus/Material.hh @@ -61,7 +61,7 @@ namespace EnergyPlus { namespace Material { - constexpr int MaxSlatAngs(19); + constexpr int MaxSlatAngs(181); // 1 degree increments for slat angles (We'll see what the performance implications are) constexpr int MaxProfAngs(37); // Parameters to indicate material group type for use with the Material diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.cc b/src/EnergyPlus/MicroturbineElectricGenerator.cc index 7fec013cf98..22791b28da1 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.cc +++ b/src/EnergyPlus/MicroturbineElectricGenerator.cc @@ -289,7 +289,7 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFTempCurveNum == 0) { ShowSevereError( state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowSevereError(state, format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); + ShowContinueError(state, format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); ErrorsFound = true; } else { // Verify curve object, only legal types are Quadratic and Cubic @@ -319,7 +319,7 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFPLRCurveNum == 0) { ShowSevereError( state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowSevereError(state, format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); + ShowContinueError(state, format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); ErrorsFound = true; } else { // Verify curve object, only legal types are Quadratic and Cubic @@ -352,7 +352,7 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelType == Constant::eFuel::Invalid) { ShowSevereError( state, format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowSevereError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); + ShowContinueError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); ErrorsFound = true; } diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index 79d6c26c6df..143579da4b2 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -2545,7 +2545,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (state.dataLoopNodes->Node(MixedAirNode).TempSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); - ShowSevereError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); + ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); ShowContinueError( state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the mixed air node."); state.dataHVACGlobal->SetPointErrorFlag = true; @@ -2556,7 +2556,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); - ShowSevereError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); + ShowContinueError(state, format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "mixed air node."); diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.cc b/src/EnergyPlus/MoistureBalanceEMPDManager.cc index c3957c87ec6..2930c76a51c 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.cc +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.cc @@ -218,8 +218,8 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) if (material->ROnly) { // CALL ShowSevereError('EMPD base material = "'//TRIM(dataMaterial.Material(MaterNum)%Name)// & // '" was Material:NoMass. It cannot be used for EMPD calculations.') - ShowContinueError(state, "..Only Material base materials are allowed to have EMPD properties."); - ShowSevereError( + ShowSevereError(state, "..Only Material base materials are allowed to have EMPD properties."); + ShowContinueError( state, format("{}: Reference Material is not appropriate type for EMPD properties, material={}, must have regular properties (L,Cp,K,D)", cCurrentModuleObject, diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 80f48e6b049..da1bc6c090a 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -1572,7 +1572,7 @@ namespace OutputProcessor { // write(outputfiledebug,*) 'resourcetype=',TRIM(resourcetype) // write(outputfiledebug,*) 'ipunits type=',CodeForIPUnits if (units != Constant::Units::kg && units != Constant::Units::J && units != Constant::Units::m3 && units != Constant::Units::L) { - ShowWarningError( + ShowWarningMessage( state, format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", Constant::unitNames[(int)units])); ErrorsFound = true; } @@ -3647,13 +3647,13 @@ void GenOutputVariablesAuditReport(EnergyPlusData &state) if (reqVar->key.empty()) reqVar->key = "*"; if (has(reqVar->name, "OPAQUE SURFACE INSIDE FACE CONDUCTION") && !state.dataGlobal->DisplayAdvancedReportVariables && !state.dataOutputProcessor->OpaqSurfWarned) { - ShowWarningError(state, R"(Variables containing "Opaque Surface Inside Face Conduction" are now "advanced" variables.)"); + ShowWarningMessage(state, R"(Variables containing "Opaque Surface Inside Face Conduction" are now "advanced" variables.)"); ShowContinueError(state, "You must enter the \"Output:Diagnostics,DisplayAdvancedReportVariables;\" statement to view."); ShowContinueError(state, "First, though, read cautionary statements in the \"InputOutputReference\" document."); state.dataOutputProcessor->OpaqSurfWarned = true; } if (!state.dataOutputProcessor->Rept) { - ShowWarningError(state, "The following Report Variables were requested but not generated -- check.rdd file"); + ShowWarningMessage(state, "The following Report Variables were requested but not generated -- check.rdd file"); ShowContinueError(state, "Either the IDF did not contain these elements, the variable name is misspelled,"); ShowContinueError(state, "or the requested variable is an advanced output which requires Output : Diagnostics, DisplayAdvancedReportVariables;"); diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 4d7a6aa62f5..bbf5530f5bc 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -15354,7 +15354,7 @@ void WriteLoadComponentSummaryTables(EnergyPlusData &state) } for (int SysSizIndex = 1; SysSizIndex <= state.dataSize->NumSysSizInput; ++SysSizIndex) { if (state.dataSize->SysSizInput(SysSizIndex).AirLoopNum != iAirLoop) continue; - if (state.dataSize->SysSizInput(SysSizIndex).SizingOption == DataSizing::Coincident) { + if (state.dataSize->SysSizInput(SysSizIndex).SizingOption == DataSizing::SizingConcurrence::Coincident) { airLoopCoolTable.peakDesSensLoad = finalSysSizing.SysCoolCoinSpaceSens; airLoopCoolTable.designPeakLoad = finalSysSizing.SysDesCoolLoad; @@ -15970,7 +15970,7 @@ void CollectPeakZoneConditions( if (isCooling) { // Time of Peak Load - if ((size_t)desDaySelected <= state.dataWeather->DesDayInput.size()) { + if ((desDaySelected > 0) && ((size_t)desDaySelected <= state.dataWeather->DesDayInput.size())) { compLoad.peakDateHrMin = format("{}/{} {}", state.dataWeather->DesDayInput(desDaySelected).Month, state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index a884166bc0e..b5ebfc224c5 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -496,7 +496,7 @@ namespace PlantChillers { if (thisChiller.CondVolFlowRate <= 0.0) { ShowSevereError( state, format("Invalid {}={:.6R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); - ShowSevereError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); + ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; @@ -2591,7 +2591,7 @@ namespace PlantChillers { if (thisChiller.CondVolFlowRate <= 0.0) { ShowSevereError( state, format("Invalid {}={:.6R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); - ShowSevereError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); + ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; @@ -4603,7 +4603,7 @@ namespace PlantChillers { if (thisChiller.CondVolFlowRate <= 0.0) { ShowSevereError( state, format("Invalid {}={:.6R}", state.dataIPShortCut->cNumericFieldNames(10), state.dataIPShortCut->rNumericArgs(10))); - ShowSevereError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); + ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( state, format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index ca742de3dce..ba34e2740f5 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -59,41 +59,39 @@ #if LINK_WITH_PYTHON #include -namespace fmt { -template <> struct formatter +template <> struct fmt::formatter { // parse is inherited from formatter. - constexpr auto parse(format_parse_context &ctx) -> format_parse_context::iterator + static constexpr auto parse(const format_parse_context &ctx) -> format_parse_context::iterator { return ctx.begin(); } - auto format(const PyStatus &status, format_context &ctx) const -> format_context::iterator + static auto format(const PyStatus &status, format_context &ctx) -> format_context::iterator { if (!PyStatus_Exception(status)) { return ctx.out(); } if (PyStatus_IsExit(status)) { - return fmt::format_to(ctx.out(), "Exited with code {}", status.exitcode); + return format_to(ctx.out(), "Exited with code {}", status.exitcode); } if (PyStatus_IsError(status)) { auto it = ctx.out(); - it = fmt::format_to(it, "Fatal Python error: "); + it = format_to(it, "Fatal Python error: "); if (status.func) { - it = fmt::format_to(it, "{}: ", status.func); + it = format_to(it, "{}: ", status.func); } - it = fmt::format_to(it, "{}", status.err_msg); + it = format_to(it, "{}", status.err_msg); return it; } return ctx.out(); } -}; -} // namespace fmt +}; // namespace fmt #endif namespace EnergyPlus::PluginManagement { -PluginTrendVariable::PluginTrendVariable(EnergyPlusData &state, std::string _name, int _numValues, int _indexOfPluginVariable) +PluginTrendVariable::PluginTrendVariable(const EnergyPlusData &state, std::string _name, int const _numValues, int const _indexOfPluginVariable) : name(std::move(_name)), numValues(_numValues), indexOfPluginVariable(_indexOfPluginVariable) { // initialize the deque, so it can be queried immediately, even with just zeroes @@ -103,19 +101,19 @@ PluginTrendVariable::PluginTrendVariable(EnergyPlusData &state, std::string _nam } } -void registerNewCallback(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, const std::function &f) +void registerNewCallback(const EnergyPlusData &state, EMSManager::EMSCallFrom const iCalledFrom, const std::function &f) { state.dataPluginManager->callbacks[iCalledFrom].push_back(f); } -void registerUserDefinedCallback(EnergyPlusData &state, const std::function &f, const std::string &programNameInInputFile) +void registerUserDefinedCallback(const EnergyPlusData &state, const std::function &f, const std::string &programNameInInputFile) { // internally, E+ will UPPER the program name; we should upper the passed in registration name so it matches state.dataPluginManager->userDefinedCallbackNames.push_back(Util::makeUPPER(programNameInInputFile)); state.dataPluginManager->userDefinedCallbacks.push_back(f); } -void onBeginEnvironment(EnergyPlusData &state) +void onBeginEnvironment(const EnergyPlusData &state) { // reset vars and trends -- sensors and actuators are reset by EMS for (auto &v : state.dataPluginManager->globalVariableValues) { @@ -127,33 +125,32 @@ void onBeginEnvironment(EnergyPlusData &state) } } -int PluginManager::numActiveCallbacks(EnergyPlusData &state) +int PluginManager::numActiveCallbacks(const EnergyPlusData &state) { - return (int)state.dataPluginManager->callbacks.size() + (int)state.dataPluginManager->userDefinedCallbacks.size(); + return static_cast(state.dataPluginManager->callbacks.size() + state.dataPluginManager->userDefinedCallbacks.size()); } -void runAnyRegisteredCallbacks(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, bool &anyRan) +void runAnyRegisteredCallbacks(EnergyPlusData &state, EMSManager::EMSCallFrom const iCalledFrom, bool &anyRan) { if (state.dataGlobal->KickOffSimulation) return; for (auto const &cb : state.dataPluginManager->callbacks[iCalledFrom]) { if (iCalledFrom == EMSManager::EMSCallFrom::UserDefinedComponentModel) { continue; // these are called -intentionally- using the runSingleUserDefinedCallback method } - cb((void *)&state); + cb(&state); anyRan = true; } #if LINK_WITH_PYTHON for (auto &plugin : state.dataPluginManager->plugins) { if (plugin.runDuringWarmup || !state.dataGlobal->WarmupFlag) { - bool const didOneRun = plugin.run(state, iCalledFrom); - if (didOneRun) anyRan = true; + if (plugin.run(state, iCalledFrom)) anyRan = true; } } #endif } #if LINK_WITH_PYTHON -std::string pythonStringForUsage(EnergyPlusData &state) +std::string pythonStringForUsage(const EnergyPlusData &state) { if (state.dataGlobal->errorCallback) { return "Python Version not accessible during API calls"; @@ -165,18 +162,18 @@ std::string pythonStringForUsage(EnergyPlusData &state) return "Linked to Python Version: \"" + sVersion + "\""; } #else -std::string pythonStringForUsage([[maybe_unused]] EnergyPlusData &state) +std::string pythonStringForUsage([[maybe_unused]] const EnergyPlusData &state) { return "This version of EnergyPlus not linked to Python library."; } #endif -void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) +void PluginManager::setupOutputVariables(EnergyPlusData &state) { #if LINK_WITH_PYTHON // with the PythonPlugin:Variables all set in memory, we can now set them up as outputs as needed std::string const sOutputVariable = "PythonPlugin:OutputVariable"; - int outputVarInstances = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, sOutputVariable); + int const outputVarInstances = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, sOutputVariable); if (outputVarInstances > 0) { auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(sOutputVariable); if (instances == state.dataInputProcessing->inputProcessor->epJSON.end()) { @@ -201,10 +198,10 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) // call setup output variable - variable TYPE is "PythonPlugin:OutputVariable" int variableHandle = EnergyPlus::PluginManagement::PluginManager::getGlobalVariableHandle(state, varName); if (variableHandle == -1) { - EnergyPlus::ShowSevereError(state, "Failed to match Python Plugin Output Variable"); - EnergyPlus::ShowContinueError(state, format("Trying to create output instance for variable name \"{}\"", varName)); - EnergyPlus::ShowContinueError(state, "No match found, make sure variable is listed in PythonPlugin:Variables object"); - EnergyPlus::ShowFatalError(state, "Python Plugin Output Variable problem causes program termination"); + ShowSevereError(state, "Failed to match Python Plugin Output Variable"); + ShowContinueError(state, format("Trying to create output instance for variable name \"{}\"", varName)); + ShowContinueError(state, "No match found, make sure variable is listed in PythonPlugin:Variables object"); + ShowFatalError(state, "Python Plugin Output Variable problem causes program termination"); } bool isMetered = false; OutputProcessor::StoreType sAvgOrSum = OutputProcessor::StoreType::Average; @@ -258,14 +255,13 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) // We are doing a metered type, we need to get the extra stuff // Resource Type if (fields.find("resource_type") == fields.end()) { - EnergyPlus::ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); - EnergyPlus::ShowContinueError(state, "The variable was marked as metered, but did not define a resource type"); - EnergyPlus::ShowContinueError(state, - "For metered variables, the resource type, group type, and end use category must be defined"); - EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); + ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowContinueError(state, "The variable was marked as metered, but did not define a resource type"); + ShowContinueError(state, "For metered variables, the resource type, group type, and end use category must be defined"); + ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const resourceType = EnergyPlus::Util::makeUPPER(fields.at("resource_type").get()); - Constant::eResource resource = static_cast(getEnumValue(Constant::eResourceNamesUC, resourceType)); + Constant::eResource resource; if (resourceType == "WATERUSE") { resource = Constant::eResource::Water; } else if (resourceType == "ONSITEWATERPRODUCED") { @@ -292,14 +288,13 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) // Group Type if (fields.find("group_type") == fields.end()) { - EnergyPlus::ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); - EnergyPlus::ShowContinueError(state, "The variable was marked as metered, but did not define a group type"); - EnergyPlus::ShowContinueError(state, - "For metered variables, the resource type, group type, and end use category must be defined"); - EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); + ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowContinueError(state, "The variable was marked as metered, but did not define a group type"); + ShowContinueError(state, "For metered variables, the resource type, group type, and end use category must be defined"); + ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const groupType = EnergyPlus::Util::makeUPPER(fields.at("group_type").get()); - OutputProcessor::Group group = static_cast(getEnumValue(OutputProcessor::groupNamesUC, groupType)); + auto group = static_cast(getEnumValue(OutputProcessor::groupNamesUC, groupType)); if (group == OutputProcessor::Group::Invalid) { ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected Group Type = {}", groupType)); ShowFatalError(state, "Python plugin output variable input problem causes program termination"); @@ -307,15 +302,13 @@ void PluginManager::setupOutputVariables([[maybe_unused]] EnergyPlusData &state) // End Use Type if (fields.find("end_use_category") == fields.end()) { - EnergyPlus::ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); - EnergyPlus::ShowContinueError(state, "The variable was marked as metered, but did not define an end-use category"); - EnergyPlus::ShowContinueError(state, - "For metered variables, the resource type, group type, and end use category must be defined"); - EnergyPlus::ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); + ShowSevereError(state, format("Input error on PythonPlugin:OutputVariable = {}", thisObjectName)); + ShowContinueError(state, "The variable was marked as metered, but did not define an end-use category"); + ShowContinueError(state, "For metered variables, the resource type, group type, and end use category must be defined"); + ShowFatalError(state, "Input error on PythonPlugin:OutputVariable causes program termination"); } std::string const endUse = EnergyPlus::Util::makeUPPER(fields.at("end_use_category").get()); - OutputProcessor::EndUseCat endUseCat = - static_cast(getEnumValue(OutputProcessor::endUseCatNamesUC, endUse)); + auto endUseCat = static_cast(getEnumValue(OutputProcessor::endUseCatNamesUC, endUse)); if (endUseCat == OutputProcessor::EndUseCat::Invalid) { ShowSevereError(state, format("Invalid input for PythonPlugin:OutputVariable, unexpected End-use Subcategory = {}", endUse)); @@ -400,8 +393,10 @@ void initPython(EnergyPlusData &state, fs::path const &pathToPythonPackages) ShowFatalError(state, fmt::format("Could not read back the PyConfig... {}", status)); } + // ReSharper disable once CppRedundantTypenameKeyword if constexpr (std::is_same_v) { // PyConfig_SetString copies the wide character string str into *config_str. + // ReSharper disable once CppDFAUnreachableCode std::wstring const ws = pathToPythonPackages.generic_wstring(); const wchar_t *wcharPath = ws.c_str(); @@ -460,8 +455,7 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s // Now read all the actual plugins and interpret them // IMPORTANT -- DO NOT CALL setup() UNTIL ALL INSTANCES ARE DONE std::string const sPlugins = "PythonPlugin:Instance"; - int pluginInstances = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, sPlugins); - if (pluginInstances == 0) { + if (state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, sPlugins) == 0) { return; } @@ -484,7 +478,7 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s PyRun_SimpleString("import sys"); // allows us to report sys.path later // we also need to set an extra import path to find some dynamic library loading stuff, again make it relative to the binary - PluginManager::addToPythonPath(state, programDir / "python_standard_lib/lib-dynload", false); + addToPythonPath(state, programDir / "python_standard_lib/lib-dynload", false); // now for additional paths: // we'll always want to add the program executable directory to PATH so that Python can find the installed pyenergyplus package @@ -493,7 +487,7 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s // we will then optionally add any additional paths the user specifies on the search paths object // so add the executable directory here - PluginManager::addToPythonPath(state, programDir, false); + addToPythonPath(state, programDir, false); // Read all the additional search paths next std::string const sPaths = "PythonPlugin:SearchPaths"; @@ -513,26 +507,26 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s std::string workingDirFlagUC = "YES"; try { workingDirFlagUC = EnergyPlus::Util::makeUPPER(fields.at("add_current_working_directory_to_search_path").get()); - } catch (nlohmann::json::out_of_range &e) { + } catch ([[maybe_unused]] nlohmann::json::out_of_range &e) { // defaulted to YES } if (workingDirFlagUC == "YES") { - PluginManager::addToPythonPath(state, ".", false); + addToPythonPath(state, ".", false); } std::string inputFileDirFlagUC = "YES"; try { inputFileDirFlagUC = EnergyPlus::Util::makeUPPER(fields.at("add_input_file_directory_to_search_path").get()); - } catch (nlohmann::json::out_of_range &e) { + } catch ([[maybe_unused]] nlohmann::json::out_of_range &e) { // defaulted to YES } if (inputFileDirFlagUC == "YES") { - PluginManager::addToPythonPath(state, state.dataStrGlobals->inputDirPath, false); + addToPythonPath(state, state.dataStrGlobals->inputDirPath, false); } std::string epInDirFlagUC = "YES"; try { epInDirFlagUC = EnergyPlus::Util::makeUPPER(fields.at("add_epin_environment_variable_to_search_path").get()); - } catch (nlohmann::json::out_of_range &e) { + } catch ([[maybe_unused]] nlohmann::json::out_of_range &e) { // defaulted to YES } if (epInDirFlagUC == "YES") { @@ -540,17 +534,17 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s get_environment_variable("epin", epin_path); fs::path const epinPathObject = fs::path(epin_path); if (epinPathObject.empty()) { - EnergyPlus::ShowWarningMessage( + ShowWarningMessage( state, "PluginManager: Search path inputs requested adding epin variable to Python path, but epin variable was empty, skipping."); } else { fs::path const epinRootDir = FileSystem::getParentDirectoryPath(fs::path(epinPathObject)); if (FileSystem::pathExists(epinRootDir)) { - PluginManager::addToPythonPath(state, epinRootDir, true); + addToPythonPath(state, epinRootDir, true); } else { - EnergyPlus::ShowWarningMessage(state, - "PluginManager: Search path inputs requested adding epin variable to Python path, but epin " - "variable value is not a valid existent path, skipping."); + ShowWarningMessage(state, + "PluginManager: Search path inputs requested adding epin variable to Python path, but epin " + "variable value is not a valid existent path, skipping."); } } } @@ -559,20 +553,20 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s auto const &vars = fields.at("py_search_paths"); for (const auto &var : vars) { try { - PluginManager::addToPythonPath(state, fs::path(var.at("search_path").get()), true); - } catch (nlohmann::json::out_of_range &e) { + addToPythonPath(state, fs::path(var.at("search_path").get()), true); + } catch ([[maybe_unused]] nlohmann::json::out_of_range &e) { // empty entry } } - } catch (nlohmann::json::out_of_range &e) { + } catch ([[maybe_unused]] nlohmann::json::out_of_range &e) { // catch when no paths are passed // nothing to do here } } } else { // no search path objects in the IDF, just do the default behavior: add the current working dir and the input file dir, + epin env var - PluginManager::addToPythonPath(state, ".", false); - PluginManager::addToPythonPath(state, state.dataStrGlobals->inputDirPath, false); + addToPythonPath(state, ".", false); + addToPythonPath(state, state.dataStrGlobals->inputDirPath, false); std::string epin_path; // NOLINT(misc-const-correctness) get_environment_variable("epin", epin_path); @@ -580,7 +574,7 @@ PluginManager::PluginManager(EnergyPlusData &state) : eplusRunningViaPythonAPI(s if (!epinPathObject.empty()) { fs::path const epinRootDir = FileSystem::getParentDirectoryPath(fs::path(epinPathObject)); if (FileSystem::pathExists(epinRootDir)) { - PluginManager::addToPythonPath(state, epinRootDir, true); + addToPythonPath(state, epinRootDir, true); } } } @@ -685,8 +679,7 @@ PluginManager::~PluginManager() { #if LINK_WITH_PYTHON if (!this->eplusRunningViaPythonAPI) { - bool alreadyInitialized = (Py_IsInitialized() != 0); - if (alreadyInitialized) { + if (Py_IsInitialized() != 0) { if (Py_FinalizeEx() < 0) { exit(120); } @@ -716,8 +709,8 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) Py_DECREF(str_exc_value); char *strExcValue = PyBytes_AsString(pyStr2); // NOLINT(hicpp-signed-bitwise) Py_DECREF(pyStr2); - EnergyPlus::ShowContinueError(state, "Python error description follows: "); - EnergyPlus::ShowContinueError(state, strExcValue); + ShowContinueError(state, "Python error description follows: "); + ShowContinueError(state, strExcValue); // See if we can get a full traceback. // Calls into python, and does the same as capturing the exception in `e` @@ -727,7 +720,7 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) Py_DECREF(pModuleName); if (pyth_module == nullptr) { - EnergyPlus::ShowContinueError(state, "Cannot find 'traceback' module in reportPythonError(), this is weird"); + ShowContinueError(state, "Cannot find 'traceback' module in reportPythonError(), this is weird"); return; } @@ -740,19 +733,18 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) // traceback.format_exception returns a list, so iterate on that if (!pyth_val || !PyList_Check(pyth_val)) { // NOLINT(hicpp-signed-bitwise) - EnergyPlus::ShowContinueError(state, "In reportPythonError(), traceback.format_exception did not return a list."); + ShowContinueError(state, "In reportPythonError(), traceback.format_exception did not return a list."); return; } Py_ssize_t numVals = PyList_Size(pyth_val); if (numVals == 0) { - EnergyPlus::ShowContinueError(state, "No traceback available"); + ShowContinueError(state, "No traceback available"); return; } - EnergyPlus::ShowContinueError(state, "Python traceback follows: "); - - EnergyPlus::ShowContinueError(state, "```"); + ShowContinueError(state, "Python traceback follows: "); + ShowContinueError(state, "```"); for (Py_ssize_t itemNum = 0; itemNum < numVals; itemNum++) { PyObject *item = PyList_GetItem(pyth_val, itemNum); @@ -761,12 +753,12 @@ void PluginInstance::reportPythonError([[maybe_unused]] EnergyPlusData &state) if (!traceback_line.empty() && traceback_line[traceback_line.length() - 1] == '\n') { traceback_line.erase(traceback_line.length() - 1); } - EnergyPlus::ShowContinueError(state, format(" >>> {}", traceback_line)); + ShowContinueError(state, format(" >>> {}", traceback_line)); } // PyList_GetItem returns a borrowed reference, do not decrement } - EnergyPlus::ShowContinueError(state, "```"); + ShowContinueError(state, "```"); // PyList_Size returns a borrowed reference, do not decrement Py_DECREF(pyth_val); // PyObject_CallFunction returns new reference, decrement @@ -781,8 +773,10 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) // this first section is really all about just ultimately getting a full Python class instance // this answer helped with a few things: https://ru.stackoverflow.com/a/785927 - PyObject *pModuleName = nullptr; + PyObject *pModuleName; + // ReSharper disable once CppRedundantTypenameKeyword if constexpr (std::is_same_v) { + // ReSharper disable once CppDFAUnreachableCode const std::wstring ws = this->modulePath.generic_wstring(); pModuleName = PyUnicode_FromWideChar(ws.c_str(), static_cast(ws.size())); // New reference } else { @@ -790,31 +784,31 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) pModuleName = PyUnicode_FromString(s.c_str()); // New reference } if (pModuleName == nullptr) { - EnergyPlus::ShowFatalError(state, format("Failed to convert the Module Path \"{:g}\" for import", this->modulePath)); + ShowFatalError(state, format("Failed to convert the Module Path \"{:g}\" for import", this->modulePath)); } this->pModule = PyImport_Import(pModuleName); Py_DECREF(pModuleName); if (!this->pModule) { - EnergyPlus::ShowSevereError(state, format("Failed to import module \"{:g}\"", this->modulePath)); - EnergyPlus::ShowContinueError(state, format("Current sys.path={}", PluginManager::currentPythonPath())); + ShowSevereError(state, format("Failed to import module \"{:g}\"", this->modulePath)); + ShowContinueError(state, format("Current sys.path={}", PluginManager::currentPythonPath())); // ONLY call PyErr_Print if PyErr has occurred, otherwise it will cause other problems if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "It could be that the module could not be found, or that there was an error in importing"); + ShowContinueError(state, "It could be that the module could not be found, or that there was an error in importing"); } - EnergyPlus::ShowFatalError(state, "Python import error causes program termination"); + ShowFatalError(state, "Python import error causes program termination"); } PyObject *pModuleDict = PyModule_GetDict(this->pModule); if (!pModuleDict) { - EnergyPlus::ShowSevereError(state, format("Failed to read module dictionary from module \"{:g}\"", this->modulePath)); + ShowSevereError(state, format("Failed to read module dictionary from module \"{:g}\"", this->modulePath)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "It could be that the module was empty"); + ShowContinueError(state, "It could be that the module was empty"); } - EnergyPlus::ShowFatalError(state, "Python module error causes program termination"); + ShowFatalError(state, "Python module error causes program termination"); } std::string fileVarName = "__file__"; PyObject *pFullPath = PyDict_GetItemString(pModuleDict, fileVarName.c_str()); @@ -830,33 +824,33 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) PyObject *pClass = PyDict_GetItemString(pModuleDict, className.c_str()); // Py_DECREF(pModuleDict); // PyModule_GetDict returns a borrowed reference, DO NOT decrement if (!pClass) { - EnergyPlus::ShowSevereError(state, format(R"(Failed to get class type "{}" from module "{:g}")", className, modulePath)); + ShowSevereError(state, format(R"(Failed to get class type "{}" from module "{:g}")", className, modulePath)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "It could be the class name is misspelled or missing."); + ShowContinueError(state, "It could be the class name is misspelled or missing."); } - EnergyPlus::ShowFatalError(state, "Python class import error causes program termination"); + ShowFatalError(state, "Python class import error causes program termination"); } if (!PyCallable_Check(pClass)) { - EnergyPlus::ShowSevereError(state, format("Got class type \"{}\", but it cannot be called/instantiated", className)); + ShowSevereError(state, format("Got class type \"{}\", but it cannot be called/instantiated", className)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "Is it possible the class name is actually just a variable?"); + ShowContinueError(state, "Is it possible the class name is actually just a variable?"); } - EnergyPlus::ShowFatalError(state, "Python class check error causes program termination"); + ShowFatalError(state, "Python class check error causes program termination"); } this->pClassInstance = PyObject_CallObject(pClass, nullptr); // Py_DECREF(pClass); // PyDict_GetItemString returns a borrowed reference, DO NOT decrement if (!this->pClassInstance) { - EnergyPlus::ShowSevereError(state, format("Something went awry calling class constructor for class \"{}\"", className)); + ShowSevereError(state, format("Something went awry calling class constructor for class \"{}\"", className)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "It is possible the plugin class constructor takes extra arguments - it shouldn't."); + ShowContinueError(state, "It is possible the plugin class constructor takes extra arguments - it shouldn't."); } - EnergyPlus::ShowFatalError(state, "Python class constructor error causes program termination"); + ShowFatalError(state, "Python class constructor error causes program termination"); } // PyObject_CallObject returns a new reference, that we need to manage // I think we need to keep it around in memory though so the class methods can be called later on, @@ -867,36 +861,36 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) std::string const detectOverriddenFunctionName = "_detect_overridden"; PyObject *detectFunction = PyObject_GetAttrString(this->pClassInstance, detectOverriddenFunctionName.c_str()); if (!detectFunction || !PyCallable_Check(detectFunction)) { - EnergyPlus::ShowSevereError( + ShowSevereError( state, format(R"(Could not find or call function "{}" on class "{:g}.{}")", detectOverriddenFunctionName, this->modulePath, this->className)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "This function should be available on the base class, so this is strange."); + ShowContinueError(state, "This function should be available on the base class, so this is strange."); } - EnergyPlus::ShowFatalError(state, "Python _detect_overridden() function error causes program termination"); + ShowFatalError(state, "Python _detect_overridden() function error causes program termination"); } PyObject *pFunctionResponse = PyObject_CallFunction(detectFunction, nullptr); Py_DECREF(detectFunction); // PyObject_GetAttrString returns a new reference, decrement it if (!pFunctionResponse) { - EnergyPlus::ShowSevereError(state, format("Call to _detect_overridden() on {} failed!", this->stringIdentifier)); + ShowSevereError(state, format("Call to _detect_overridden() on {} failed!", this->stringIdentifier)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "This is available on the base class and should not be overridden...strange."); + ShowContinueError(state, "This is available on the base class and should not be overridden...strange."); } - EnergyPlus::ShowFatalError(state, format("Program terminates after call to _detect_overridden() on {} failed!", this->stringIdentifier)); + ShowFatalError(state, format("Program terminates after call to _detect_overridden() on {} failed!", this->stringIdentifier)); } if (!PyList_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) - EnergyPlus::ShowFatalError(state, format("Invalid return from _detect_overridden() on class \"{}\", this is weird", this->stringIdentifier)); + ShowFatalError(state, format("Invalid return from _detect_overridden() on class \"{}\", this is weird", this->stringIdentifier)); } Py_ssize_t numVals = PyList_Size(pFunctionResponse); // at this point we know which base class methods are being overridden by the derived class // we can loop over them and based on the name check the appropriate flag and assign the function pointer if (numVals == 0) { - EnergyPlus::ShowFatalError( - state, format("Python plugin \"{}\" did not override any base class methods; must override at least one", this->stringIdentifier)); + ShowFatalError(state, + format("Python plugin \"{}\" did not override any base class methods; must override at least one", this->stringIdentifier)); } for (Py_ssize_t itemNum = 0; itemNum < numVals; itemNum++) { PyObject *item = PyList_GetItem(pFunctionResponse, itemNum); @@ -1101,20 +1095,19 @@ bool PluginInstance::run(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledF // then call the main function // static const PyObject oneArgObjFormat = Py_BuildValue)("O"); - PyObject *pStateInstance = PyLong_FromVoidPtr((void *)&state); + PyObject *pStateInstance = PyLong_FromVoidPtr(&state); PyObject *pFunctionResponse = PyObject_CallMethodObjArgs(this->pClassInstance, pFunctionName, pStateInstance, nullptr); Py_DECREF(pStateInstance); if (!pFunctionResponse) { std::string const functionNameAsString(functionName); // only convert to string if an error occurs - EnergyPlus::ShowSevereError(state, format("Call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); + ShowSevereError(state, format("Call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); if (PyErr_Occurred()) { - PluginInstance::reportPythonError(state); + reportPythonError(state); } else { - EnergyPlus::ShowContinueError(state, "This could happen for any number of reasons, check the plugin code."); + ShowContinueError(state, "This could happen for any number of reasons, check the plugin code."); } PyGILState_Release(gil); - EnergyPlus::ShowFatalError(state, - format("Program terminates after call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); + ShowFatalError(state, format("Program terminates after call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); } if (PyLong_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) long exitCode = PyLong_AsLong(pFunctionResponse); @@ -1122,12 +1115,12 @@ bool PluginInstance::run(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledF // success } else if (exitCode == 1) { PyGILState_Release(gil); - EnergyPlus::ShowFatalError(state, format("Python Plugin \"{}\" returned 1 to indicate EnergyPlus should abort", this->stringIdentifier)); + ShowFatalError(state, format("Python Plugin \"{}\" returned 1 to indicate EnergyPlus should abort", this->stringIdentifier)); } } else { std::string const functionNameAsString(functionName); // only convert to string if an error occurs PyGILState_Release(gil); - EnergyPlus::ShowFatalError( + ShowFatalError( state, format("Invalid return from {}() on class \"{}, make sure it returns an integer exit code, either zero (success) or one (failure)", functionNameAsString, @@ -1136,7 +1129,7 @@ bool PluginInstance::run(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledF Py_DECREF(pFunctionResponse); // PyObject_CallFunction returns new reference, decrement if (state.dataPluginManager->apiErrorFlag) { PyGILState_Release(gil); - EnergyPlus::ShowFatalError(state, "API problems encountered while running plugin cause program termination."); + ShowFatalError(state, "API problems encountered while running plugin cause program termination."); } PyGILState_Release(gil); return true; @@ -1170,8 +1163,10 @@ void PluginManager::addToPythonPath(EnergyPlusData &state, const fs::path &inclu // We use generic_string / generic_wstring here, which will always use a forward slash as directory separator even on windows // This doesn't handle the (very strange, IMHO) case were on unix you have backlashes (which are VALID filenames on Unix!) // Could use FileSystem::makeNativePath first to convert the backslashes to forward slashes on Unix - PyObject *unicodeIncludePath = nullptr; + PyObject *unicodeIncludePath; + // ReSharper disable once CppRedundantTypenameKeyword if constexpr (std::is_same_v) { + // ReSharper disable once CppDFAUnreachableCode const std::wstring ws = includePath.generic_wstring(); unicodeIncludePath = PyUnicode_FromWideChar(ws.c_str(), static_cast(ws.size())); // New reference } else { @@ -1179,7 +1174,7 @@ void PluginManager::addToPythonPath(EnergyPlusData &state, const fs::path &inclu unicodeIncludePath = PyUnicode_FromString(s.c_str()); // New reference } if (unicodeIncludePath == nullptr) { - EnergyPlus::ShowFatalError(state, format("ERROR converting the path \"{:g}\" for addition to the sys.path in Python", includePath)); + ShowFatalError(state, format("ERROR converting the path \"{:g}\" for addition to the sys.path in Python", includePath)); } PyObject *sysPath = PySys_GetObject("path"); // Borrowed reference @@ -1190,11 +1185,11 @@ void PluginManager::addToPythonPath(EnergyPlusData &state, const fs::path &inclu if (PyErr_Occurred()) { PluginInstance::reportPythonError(state); } - EnergyPlus::ShowFatalError(state, format("ERROR adding \"{:g}\" to the sys.path in Python", includePath)); + ShowFatalError(state, format("ERROR adding \"{:g}\" to the sys.path in Python", includePath)); } if (userDefinedPath) { - EnergyPlus::ShowMessage(state, format("Successfully added path \"{:g}\" to the sys.path in Python", includePath)); + ShowMessage(state, format("Successfully added path \"{:g}\" to the sys.path in Python", includePath)); } // PyRun_SimpleString)("print(' EPS : ' + str(sys.path))"); @@ -1212,7 +1207,7 @@ void PluginManager::addToPythonPath([[maybe_unused]] EnergyPlusData &state, #endif #if LINK_WITH_PYTHON -void PluginManager::addGlobalVariable(EnergyPlusData &state, const std::string &name) +void PluginManager::addGlobalVariable(const EnergyPlusData &state, const std::string &name) { std::string const varNameUC = EnergyPlus::Util::makeUPPER(name); state.dataPluginManager->globalVariableNames.push_back(varNameUC); @@ -1220,7 +1215,7 @@ void PluginManager::addGlobalVariable(EnergyPlusData &state, const std::string & this->maxGlobalVariableIndex++; } #else -void PluginManager::addGlobalVariable([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] const std::string &name) +void PluginManager::addGlobalVariable([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] const std::string &name) { } #endif @@ -1233,19 +1228,17 @@ int PluginManager::getGlobalVariableHandle(EnergyPlusData &state, const std::str auto const it = std::find(gVarNames.begin(), gVarNames.end(), varNameUC); if (it != gVarNames.end()) { return static_cast(std::distance(gVarNames.begin(), it)); - } else { - if (suppress_warning) { - return -1; - } else { - EnergyPlus::ShowSevereError(state, "Tried to retrieve handle for a nonexistent plugin global variable"); - EnergyPlus::ShowContinueError(state, format("Name looked up: \"{}\", available names: ", varNameUC)); - for (auto const &gvName : gVarNames) { - EnergyPlus::ShowContinueError(state, format(" \"{}\"", gvName)); - } - EnergyPlus::ShowFatalError(state, "Plugin global variable problem causes program termination"); - return -1; // hush the compiler warning - } } + if (suppress_warning) { + return -1; + } + ShowSevereError(state, "Tried to retrieve handle for a nonexistent plugin global variable"); + ShowContinueError(state, format("Name looked up: \"{}\", available names: ", varNameUC)); + for (auto const &gvName : gVarNames) { + ShowContinueError(state, format(" \"{}\"", gvName)); + } + ShowFatalError(state, "Plugin global variable problem causes program termination"); + return -1; // hush the compiler warning } #else int PluginManager::getGlobalVariableHandle([[maybe_unused]] EnergyPlusData &state, @@ -1257,9 +1250,9 @@ int PluginManager::getGlobalVariableHandle([[maybe_unused]] EnergyPlusData &stat #endif #if LINK_WITH_PYTHON -int PluginManager::getTrendVariableHandle(EnergyPlusData &state, const std::string &name) +int PluginManager::getTrendVariableHandle(const EnergyPlusData &state, const std::string &name) { - std::string const varNameUC = EnergyPlus::Util::makeUPPER(name); + std::string const varNameUC = Util::makeUPPER(name); for (size_t i = 0; i < state.dataPluginManager->trends.size(); i++) { auto &thisTrend = state.dataPluginManager->trends[i]; if (thisTrend.name == varNameUC) { @@ -1269,26 +1262,26 @@ int PluginManager::getTrendVariableHandle(EnergyPlusData &state, const std::stri return -1; } #else -int PluginManager::getTrendVariableHandle([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] const std::string &name) +int PluginManager::getTrendVariableHandle([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] const std::string &name) { return -1; } #endif #if LINK_WITH_PYTHON -Real64 PluginManager::getTrendVariableValue(EnergyPlusData &state, int handle, int timeIndex) +Real64 PluginManager::getTrendVariableValue(const EnergyPlusData &state, int handle, int timeIndex) { return state.dataPluginManager->trends[handle].values[timeIndex]; } #else -Real64 PluginManager::getTrendVariableValue([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int timeIndex) +Real64 PluginManager::getTrendVariableValue([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int timeIndex) { return 0.0; } #endif #if LINK_WITH_PYTHON -Real64 PluginManager::getTrendVariableAverage(EnergyPlusData &state, int handle, int count) +Real64 PluginManager::getTrendVariableAverage(const EnergyPlusData &state, int handle, int count) { Real64 sum = 0; for (int i = 0; i < count; i++) { @@ -1297,14 +1290,14 @@ Real64 PluginManager::getTrendVariableAverage(EnergyPlusData &state, int handle, return sum / count; } #else -Real64 PluginManager::getTrendVariableAverage([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) +Real64 PluginManager::getTrendVariableAverage([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) { return 0.0; } #endif #if LINK_WITH_PYTHON -Real64 PluginManager::getTrendVariableMin(EnergyPlusData &state, int handle, int count) +Real64 PluginManager::getTrendVariableMin(const EnergyPlusData &state, int handle, int count) { Real64 minimumValue = 9999999999999; for (int i = 0; i < count; i++) { @@ -1315,14 +1308,14 @@ Real64 PluginManager::getTrendVariableMin(EnergyPlusData &state, int handle, int return minimumValue; } #else -Real64 PluginManager::getTrendVariableMin([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) +Real64 PluginManager::getTrendVariableMin([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) { return 0.0; } #endif #if LINK_WITH_PYTHON -Real64 PluginManager::getTrendVariableMax(EnergyPlusData &state, int handle, int count) +Real64 PluginManager::getTrendVariableMax(const EnergyPlusData &state, int handle, int count) { Real64 maximumValue = -9999999999999; for (int i = 0; i < count; i++) { @@ -1333,14 +1326,14 @@ Real64 PluginManager::getTrendVariableMax(EnergyPlusData &state, int handle, int return maximumValue; } #else -Real64 PluginManager::getTrendVariableMax([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) +Real64 PluginManager::getTrendVariableMax([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) { return 0.0; } #endif #if LINK_WITH_PYTHON -Real64 PluginManager::getTrendVariableSum(EnergyPlusData &state, int handle, int count) +Real64 PluginManager::getTrendVariableSum(const EnergyPlusData &state, int handle, int count) { Real64 sum = 0.0; for (int i = 0; i < count; i++) { @@ -1349,14 +1342,14 @@ Real64 PluginManager::getTrendVariableSum(EnergyPlusData &state, int handle, int return sum; } #else -Real64 PluginManager::getTrendVariableSum([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) +Real64 PluginManager::getTrendVariableSum([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) { return 0.0; } #endif #if LINK_WITH_PYTHON -Real64 PluginManager::getTrendVariableDirection(EnergyPlusData &state, int handle, int count) +Real64 PluginManager::getTrendVariableDirection(const EnergyPlusData &state, int handle, int count) { auto &trend = state.dataPluginManager->trends[handle]; Real64 timeSum = 0.0; @@ -1374,19 +1367,19 @@ Real64 PluginManager::getTrendVariableDirection(EnergyPlusData &state, int handl return numerator / denominator; } #else -Real64 PluginManager::getTrendVariableDirection([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) +Real64 PluginManager::getTrendVariableDirection([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] int count) { return 0.0; } #endif #if LINK_WITH_PYTHON -size_t PluginManager::getTrendVariableHistorySize(EnergyPlusData &state, int handle) +size_t PluginManager::getTrendVariableHistorySize(const EnergyPlusData &state, int handle) { return state.dataPluginManager->trends[handle].values.size(); } #else -size_t PluginManager::getTrendVariableHistorySize([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle) +size_t PluginManager::getTrendVariableHistorySize([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] int handle) { return 0; } @@ -1396,7 +1389,7 @@ void PluginManager::updatePluginValues([[maybe_unused]] EnergyPlusData &state) { #if LINK_WITH_PYTHON for (auto &trend : state.dataPluginManager->trends) { - Real64 newVarValue = PluginManager::getGlobalVariableValue(state, trend.indexOfPluginVariable); + Real64 newVarValue = getGlobalVariableValue(state, trend.indexOfPluginVariable); trend.values.push_front(newVarValue); trend.values.pop_back(); } @@ -1407,17 +1400,16 @@ void PluginManager::updatePluginValues([[maybe_unused]] EnergyPlusData &state) Real64 PluginManager::getGlobalVariableValue(EnergyPlusData &state, int handle) { if (state.dataPluginManager->globalVariableValues.empty()) { - EnergyPlus::ShowFatalError( + ShowFatalError( state, "Tried to access plugin global variable but it looks like there aren't any; use the PythonPlugin:Variables object to declare them."); } try { return state.dataPluginManager->globalVariableValues[handle]; // TODO: This won't be caught as an exception I think } catch (...) { - EnergyPlus::ShowSevereError(state, format("Tried to access plugin global variable value at index {}", handle)); - EnergyPlus::ShowContinueError(state, - format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); - EnergyPlus::ShowFatalError(state, "Plugin global variable problem causes program termination"); + ShowSevereError(state, format("Tried to access plugin global variable value at index {}", handle)); + ShowContinueError(state, format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); + ShowFatalError(state, "Plugin global variable problem causes program termination"); } return 0.0; } @@ -1432,17 +1424,16 @@ Real64 PluginManager::getGlobalVariableValue([[maybe_unused]] EnergyPlusData &st void PluginManager::setGlobalVariableValue(EnergyPlusData &state, int handle, Real64 value) { if (state.dataPluginManager->globalVariableValues.empty()) { - EnergyPlus::ShowFatalError(state, - "Tried to set plugin global variable but it looks like there aren't any; use the PythonPlugin:GlobalVariables " - "object to declare them."); + ShowFatalError(state, + "Tried to set plugin global variable but it looks like there aren't any; use the PythonPlugin:GlobalVariables " + "object to declare them."); } try { state.dataPluginManager->globalVariableValues[handle] = value; // TODO: This won't be caught as an exception I think } catch (...) { - EnergyPlus::ShowSevereError(state, format("Tried to set plugin global variable value at index {}", handle)); - EnergyPlus::ShowContinueError(state, - format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); - EnergyPlus::ShowFatalError(state, "Plugin global variable problem causes program termination"); + ShowSevereError(state, format("Tried to set plugin global variable value at index {}", handle)); + ShowContinueError(state, format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); + ShowFatalError(state, "Plugin global variable problem causes program termination"); } } #else @@ -1452,7 +1443,7 @@ void PluginManager::setGlobalVariableValue([[maybe_unused]] EnergyPlusData &stat #endif #if LINK_WITH_PYTHON -int PluginManager::getLocationOfUserDefinedPlugin(EnergyPlusData &state, std::string const &_programName) +int PluginManager::getLocationOfUserDefinedPlugin(const EnergyPlusData &state, std::string const &_programName) { for (size_t handle = 0; handle < state.dataPluginManager->plugins.size(); handle++) { auto const &thisPlugin = state.dataPluginManager->plugins[handle]; @@ -1463,7 +1454,7 @@ int PluginManager::getLocationOfUserDefinedPlugin(EnergyPlusData &state, std::st return -1; } #else -int PluginManager::getLocationOfUserDefinedPlugin([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] std::string const &_programName) +int PluginManager::getLocationOfUserDefinedPlugin([[maybe_unused]] const EnergyPlusData &state, [[maybe_unused]] std::string const &_programName) { return -1; } @@ -1480,9 +1471,9 @@ void PluginManager::runSingleUserDefinedPlugin([[maybe_unused]] EnergyPlusData & } #endif -int PluginManager::getUserDefinedCallbackIndex(EnergyPlusData &state, const std::string &callbackProgramName) +int PluginManager::getUserDefinedCallbackIndex(const EnergyPlusData &state, const std::string &callbackProgramName) { - for (int i = 0; i < (int)state.dataPluginManager->userDefinedCallbackNames.size(); i++) { + for (int i = 0; i < static_cast(state.dataPluginManager->userDefinedCallbackNames.size()); i++) { if (state.dataPluginManager->userDefinedCallbackNames[i] == callbackProgramName) { return i; } @@ -1492,8 +1483,8 @@ int PluginManager::getUserDefinedCallbackIndex(EnergyPlusData &state, const std: void PluginManager::runSingleUserDefinedCallback(EnergyPlusData &state, int index) { - if (state.dataGlobal->KickOffSimulation) return; // Maybe? - state.dataPluginManager->userDefinedCallbacks[index]((void *)&state); // Check Index first + if (state.dataGlobal->KickOffSimulation) return; // Maybe? + state.dataPluginManager->userDefinedCallbacks[index](&state); // Check Index first } #if LINK_WITH_PYTHON diff --git a/src/EnergyPlus/PluginManager.hh b/src/EnergyPlus/PluginManager.hh index f9122a1afce..4f20bf54afc 100644 --- a/src/EnergyPlus/PluginManager.hh +++ b/src/EnergyPlus/PluginManager.hh @@ -82,12 +82,12 @@ namespace PluginManagement { constexpr const char *programName = "python"; - void registerNewCallback(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, const std::function &f); - void registerUserDefinedCallback(EnergyPlusData &state, const std::function &f, const std::string &programNameInInputFile); + void registerNewCallback(const EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, const std::function &f); + void registerUserDefinedCallback(const EnergyPlusData &state, const std::function &f, const std::string &programNameInInputFile); void runAnyRegisteredCallbacks(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledFrom, bool &anyRan); - void onBeginEnvironment(EnergyPlusData &state); - std::string pythonStringForUsage(EnergyPlusData &state); + void onBeginEnvironment(const EnergyPlusData &state); + std::string pythonStringForUsage(const EnergyPlusData &state); void clear_state(); @@ -181,30 +181,30 @@ namespace PluginManagement { explicit PluginManager(EnergyPlusData &state); ~PluginManager(); - static int numActiveCallbacks(EnergyPlusData &state); + static int numActiveCallbacks(const EnergyPlusData &state); static void addToPythonPath(EnergyPlusData &state, const fs::path &includePath, bool userDefinedPath); static void setupOutputVariables(EnergyPlusData &state); int maxGlobalVariableIndex = -1; - void addGlobalVariable(EnergyPlusData &state, const std::string &name); + void addGlobalVariable(const EnergyPlusData &state, const std::string &name); static int getGlobalVariableHandle(EnergyPlusData &state, const std::string &name, bool suppress_warning = false); static Real64 getGlobalVariableValue(EnergyPlusData &state, int handle); static void setGlobalVariableValue(EnergyPlusData &state, int handle, Real64 value); int maxTrendVariableIndex = -1; - static int getTrendVariableHandle(EnergyPlusData &state, const std::string &name); - static Real64 getTrendVariableValue(EnergyPlusData &state, int handle, int timeIndex); - static size_t getTrendVariableHistorySize(EnergyPlusData &state, int handle); - static Real64 getTrendVariableAverage(EnergyPlusData &state, int handle, int count); - static Real64 getTrendVariableMin(EnergyPlusData &state, int handle, int count); - static Real64 getTrendVariableMax(EnergyPlusData &state, int handle, int count); - static Real64 getTrendVariableSum(EnergyPlusData &state, int handle, int count); - static Real64 getTrendVariableDirection(EnergyPlusData &state, int handle, int count); + static int getTrendVariableHandle(const EnergyPlusData &state, const std::string &name); + static Real64 getTrendVariableValue(const EnergyPlusData &state, int handle, int timeIndex); + static size_t getTrendVariableHistorySize(const EnergyPlusData &state, int handle); + static Real64 getTrendVariableAverage(const EnergyPlusData &state, int handle, int count); + static Real64 getTrendVariableMin(const EnergyPlusData &state, int handle, int count); + static Real64 getTrendVariableMax(const EnergyPlusData &state, int handle, int count); + static Real64 getTrendVariableSum(const EnergyPlusData &state, int handle, int count); + static Real64 getTrendVariableDirection(const EnergyPlusData &state, int handle, int count); static void updatePluginValues(EnergyPlusData &state); - static int getLocationOfUserDefinedPlugin(EnergyPlusData &state, std::string const &_programName); - static int getUserDefinedCallbackIndex(EnergyPlusData &state, const std::string &callbackProgramName); + static int getLocationOfUserDefinedPlugin(const EnergyPlusData &state, std::string const &_programName); + static int getUserDefinedCallbackIndex(const EnergyPlusData &state, const std::string &callbackProgramName); static void runSingleUserDefinedPlugin(EnergyPlusData &state, int index); static void runSingleUserDefinedCallback(EnergyPlusData &state, int index); static bool anyUnexpectedPluginObjects(EnergyPlusData &state); @@ -222,7 +222,7 @@ namespace PluginManagement { std::deque values; std::deque times; int indexOfPluginVariable; - PluginTrendVariable(EnergyPlusData &state, std::string _name, int _numValues, int _indexOfPluginVariable); + PluginTrendVariable(const EnergyPlusData &state, std::string _name, int _numValues, int _indexOfPluginVariable); void reset() { this->values.clear(); diff --git a/src/EnergyPlus/ReportCoilSelection.cc b/src/EnergyPlus/ReportCoilSelection.cc index b4733432d1f..6e4939172b0 100644 --- a/src/EnergyPlus/ReportCoilSelection.cc +++ b/src/EnergyPlus/ReportCoilSelection.cc @@ -81,20 +81,20 @@ void createCoilSelectionReportObj(EnergyPlusData &state) CoilSelectionData::CoilSelectionData( // constructor std::string const &coilName) : isCooling(false), isHeating(false), coilNum(-999), airloopNum(-999), oaControllerNum(-999), zoneEqNum(-999), oASysNum(-999), zoneHVACTypeNum(0), - zoneHVACIndex(0), typeof_Coil(-999), coilSizingMethodConcurrence(-999), coilSizingMethodCapacity(-999), coilSizingMethodAirFlow(-999), - isCoilSizingForTotalLoad(false), capIsAutosized(false), volFlowIsAutosized(false), coilWaterFlowUser(-999.0), oaPretreated(false), - isSupplementalHeater(false), coilTotCapFinal(-999.0), coilSensCapFinal(-999.0), coilRefAirVolFlowFinal(-999.0), - coilRefWaterVolFlowFinal(-999.0), coilTotCapAtPeak(-999.0), coilSensCapAtPeak(-999.0), coilDesMassFlow(-999.0), coilDesVolFlow(-999.0), - coilDesEntTemp(-999.0), coilDesEntWetBulb(-999.0), coilDesEntHumRat(-999.0), coilDesEntEnth(-999.0), coilDesLvgTemp(-999.0), - coilDesLvgWetBulb(-999.0), coilDesLvgHumRat(-999.0), coilDesLvgEnth(-999.0), coilDesWaterMassFlow(-999.0), coilDesWaterEntTemp(-999.0), - coilDesWaterLvgTemp(-999.0), coilDesWaterTempDiff(-999.0), pltSizNum(-999), waterLoopNum(-999), oaPeakTemp(-999.00), oaPeakHumRat(-999.0), - oaPeakWetBulb(-999.0), oaPeakVolFlow(-999.0), oaPeakVolFrac(-999.0), oaDoaTemp(-999.0), oaDoaHumRat(-999.0), raPeakTemp(-999.0), - raPeakHumRat(-999.0), rmPeakTemp(-999.0), rmPeakHumRat(-999.0), rmPeakRelHum(-999.0), rmSensibleAtPeak(-999.0), rmLatentAtPeak(0.0), - coilIdealSizCapOverSimPeakCap(-999.0), coilIdealSizCapUnderSimPeakCap(-999.0), reheatLoadMult(-999.0), minRatio(-999.0), maxRatio(-999.0), - cpMoistAir(-999.0), cpDryAir(-999.0), rhoStandAir(-999.0), rhoFluid(-999.0), cpFluid(-999.0), coilCapFTIdealPeak(1.0), coilRatedTotCap(-999.0), - coilRatedSensCap(-999.0), ratedAirMassFlow(-999.0), ratedCoilInDb(-999.0), ratedCoilInWb(-999.0), ratedCoilInHumRat(-999.0), - ratedCoilInEnth(-999.0), ratedCoilOutDb(-999.0), ratedCoilOutWb(-999.0), ratedCoilOutHumRat(-999.0), ratedCoilOutEnth(-999.0), - ratedCoilEff(-999.0), ratedCoilBpFactor(-999.0), ratedCoilAppDewPt(-999.0), ratedCoilOadbRef(-999.0), ratedCoilOawbRef(-999.0), + zoneHVACIndex(0), typeof_Coil(-999), coilSizingMethodCapacity(-999), coilSizingMethodAirFlow(-999), isCoilSizingForTotalLoad(false), + capIsAutosized(false), volFlowIsAutosized(false), coilWaterFlowUser(-999.0), oaPretreated(false), isSupplementalHeater(false), + coilTotCapFinal(-999.0), coilSensCapFinal(-999.0), coilRefAirVolFlowFinal(-999.0), coilRefWaterVolFlowFinal(-999.0), coilTotCapAtPeak(-999.0), + coilSensCapAtPeak(-999.0), coilDesMassFlow(-999.0), coilDesVolFlow(-999.0), coilDesEntTemp(-999.0), coilDesEntWetBulb(-999.0), + coilDesEntHumRat(-999.0), coilDesEntEnth(-999.0), coilDesLvgTemp(-999.0), coilDesLvgWetBulb(-999.0), coilDesLvgHumRat(-999.0), + coilDesLvgEnth(-999.0), coilDesWaterMassFlow(-999.0), coilDesWaterEntTemp(-999.0), coilDesWaterLvgTemp(-999.0), coilDesWaterTempDiff(-999.0), + pltSizNum(-999), waterLoopNum(-999), oaPeakTemp(-999.00), oaPeakHumRat(-999.0), oaPeakWetBulb(-999.0), oaPeakVolFlow(-999.0), + oaPeakVolFrac(-999.0), oaDoaTemp(-999.0), oaDoaHumRat(-999.0), raPeakTemp(-999.0), raPeakHumRat(-999.0), rmPeakTemp(-999.0), + rmPeakHumRat(-999.0), rmPeakRelHum(-999.0), rmSensibleAtPeak(-999.0), rmLatentAtPeak(0.0), coilIdealSizCapOverSimPeakCap(-999.0), + coilIdealSizCapUnderSimPeakCap(-999.0), reheatLoadMult(-999.0), minRatio(-999.0), maxRatio(-999.0), cpMoistAir(-999.0), cpDryAir(-999.0), + rhoStandAir(-999.0), rhoFluid(-999.0), cpFluid(-999.0), coilCapFTIdealPeak(1.0), coilRatedTotCap(-999.0), coilRatedSensCap(-999.0), + ratedAirMassFlow(-999.0), ratedCoilInDb(-999.0), ratedCoilInWb(-999.0), ratedCoilInHumRat(-999.0), ratedCoilInEnth(-999.0), + ratedCoilOutDb(-999.0), ratedCoilOutWb(-999.0), ratedCoilOutHumRat(-999.0), ratedCoilOutEnth(-999.0), ratedCoilEff(-999.0), + ratedCoilBpFactor(-999.0), ratedCoilAppDewPt(-999.0), ratedCoilOadbRef(-999.0), ratedCoilOawbRef(-999.0), supFanType(HVAC::FanType::Invalid), supFanNum(0), fanSizeMaxAirVolumeFlow(-999.0), fanSizeMaxAirMassFlow(-999.0), fanHeatGainIdealPeak(-999.0), coilAndFanNetTotalCapacityIdealPeak(-999.0), plantDesMaxMassFlowRate(-999.0), plantDesRetTemp(-999.0), plantDesSupTemp(-999.0), @@ -660,15 +660,7 @@ void ReportCoilSelection::doFinalProcessingOfCoilData(EnergyPlusData &state) c->oaPeakVolFrac = -999.0; } - if (c->coilSizingMethodConcurrence == DataSizing::NonCoincident) { - c->coilSizingMethodConcurrenceName = "Non-Coincident"; - } else if (c->coilSizingMethodConcurrence == DataSizing::Coincident) { - c->coilSizingMethodConcurrenceName = "Coincident"; - } else if (c->coilSizingMethodConcurrence == DataSizing::Combination) { - c->coilSizingMethodConcurrenceName = "Combination"; - } else { - c->coilSizingMethodConcurrenceName = "N/A"; - } + c->coilSizingMethodConcurrenceName = DataSizing::CoilSizingConcurrenceNames[(int)c->coilSizingMethodConcurrence]; if (c->coilSizingMethodCapacity == DataSizing::CoolingDesignCapacity) { c->coilSizingMethodCapacityName = "CoolingDesignCapacity"; @@ -1286,7 +1278,7 @@ void ReportCoilSelection::setCoilCoolingCapacity( c->oaPeakHumRat = finalSysSizing.OutHumRatAtCoolPeak; c->raPeakTemp = finalSysSizing.RetTempAtCoolPeak; c->raPeakHumRat = finalSysSizing.RetHumRatAtCoolPeak; - c->coilSizingMethodConcurrence = finalSysSizing.SizingOption; + c->coilSizingMethodConcurrence = static_cast(finalSysSizing.SizingOption); c->coilSizingMethodCapacity = finalSysSizing.CoolingCapMethod; c->coilSizingMethodAirFlow = finalSysSizing.ScaleCoolSAFMethod; // DesOutAirVolFlow @@ -1345,9 +1337,9 @@ void ReportCoilSelection::setCoilCoolingCapacity( c->rmPeakRelHum = -999.0; } - if (c->coilSizingMethodConcurrence == DataSizing::Coincident) { + if (c->coilSizingMethodConcurrence == DataSizing::CoilSizingConcurrence::Coincident) { c->rmSensibleAtPeak = finalSysSizing.SysCoolCoinSpaceSens; - } else if (c->coilSizingMethodConcurrence == DataSizing::NonCoincident) { + } else if (c->coilSizingMethodConcurrence == DataSizing::CoilSizingConcurrence::NonCoincident) { c->rmSensibleAtPeak = sumSensLoad; } else { // DataSizing::Combination or other c->rmSensibleAtPeak = sumSensLoad; @@ -1492,7 +1484,7 @@ void ReportCoilSelection::setCoilCoolingCapacity( state, c->coilDesLvgTemp, c->coilDesLvgHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilCoolingCapacity"); c->coilDesLvgEnth = Psychrometrics::PsyHFnTdbW(c->coilDesLvgTemp, c->coilDesLvgHumRat); } - int sizMethod = 0; + DataSizing::SizingConcurrence sizMethod = DataSizing::SizingConcurrence::Invalid; bool sizMethodsAreTheSame = true; for (int airLoopNum = 0; airLoopNum < state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].NumOfAirLoops; ++airLoopNum) { int actualAirLoopNum = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].m_AirLoopNum[airLoopNum]; @@ -1505,9 +1497,9 @@ void ReportCoilSelection::setCoilCoolingCapacity( } } if (sizMethodsAreTheSame) { - c->coilSizingMethodConcurrence = sizMethod; + c->coilSizingMethodConcurrence = static_cast(sizMethod); } else { - c->coilSizingMethodConcurrence = DataSizing::Combination; + c->coilSizingMethodConcurrence = DataSizing::CoilSizingConcurrence::Combination; } } } else { @@ -1555,7 +1547,7 @@ void ReportCoilSelection::setCoilHeatingCapacity( c->oaPeakVolFlow = finalSysSizing.DesOutAirVolFlow; c->raPeakTemp = finalSysSizing.HeatRetTemp; c->raPeakHumRat = finalSysSizing.HeatRetHumRat; - c->coilSizingMethodConcurrence = finalSysSizing.SizingOption; + c->coilSizingMethodConcurrence = static_cast(finalSysSizing.SizingOption); c->coilSizingMethodCapacity = finalSysSizing.HeatingCapMethod; c->coilSizingMethodAirFlow = finalSysSizing.ScaleHeatSAFMethod; @@ -1610,9 +1602,9 @@ void ReportCoilSelection::setCoilHeatingCapacity( c->rmPeakRelHum = -999.0; } - if (c->coilSizingMethodConcurrence == DataSizing::Coincident) { + if (c->coilSizingMethodConcurrence == DataSizing::CoilSizingConcurrence::Coincident) { c->rmSensibleAtPeak = finalSysSizing.SysHeatCoinSpaceSens; - } else if (c->coilSizingMethodConcurrence == DataSizing::NonCoincident) { + } else if (c->coilSizingMethodConcurrence == DataSizing::CoilSizingConcurrence::NonCoincident) { c->rmSensibleAtPeak = sumLoad; } @@ -1789,7 +1781,7 @@ void ReportCoilSelection::setCoilHeatingCapacity( state, c->coilDesLvgTemp, c->coilDesLvgHumRat, state.dataEnvrn->StdBaroPress, "ReportCoilSelection::setCoilHeatingCapacity"); c->coilDesLvgEnth = Psychrometrics::PsyHFnTdbW(c->coilDesLvgTemp, c->coilDesLvgHumRat); } - int sizMethod = 0; + DataSizing::SizingConcurrence sizMethod = DataSizing::SizingConcurrence::Invalid; bool sizMethodsAreTheSame = true; for (int airLoopNum = 0; airLoopNum < state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].NumOfAirLoops; ++airLoopNum) { int actualAirLoopNum = state.dataAirLoopHVACDOAS->airloopDOAS[DOASSysNum].m_AirLoopNum[airLoopNum]; @@ -1802,9 +1794,9 @@ void ReportCoilSelection::setCoilHeatingCapacity( } } if (sizMethodsAreTheSame) { - c->coilSizingMethodConcurrence = sizMethod; + c->coilSizingMethodConcurrence = static_cast(sizMethod); } else { - c->coilSizingMethodConcurrence = DataSizing::Combination; + c->coilSizingMethodConcurrence = DataSizing::CoilSizingConcurrence::Combination; } } } else { diff --git a/src/EnergyPlus/ReportCoilSelection.hh b/src/EnergyPlus/ReportCoilSelection.hh index 37567137783..5c15590f019 100644 --- a/src/EnergyPlus/ReportCoilSelection.hh +++ b/src/EnergyPlus/ReportCoilSelection.hh @@ -56,6 +56,7 @@ // EnergyPlus Headers #include #include +#include #include namespace EnergyPlus { @@ -98,7 +99,8 @@ public: // data int typeof_Coil; // type of coil, e.g., PlantEquipmentType::CoilWaterSimpleHeating, PlantEquipmentType::CoilWaterDetailedFlatCooling, // PlantEquipmentType::CoilWaterCooling - int coilSizingMethodConcurrence; // 1 = noncoincident, 2 = coincident + DataSizing::CoilSizingConcurrence coilSizingMethodConcurrence = + DataSizing::CoilSizingConcurrence::NA; // non-coincident, coincident, combination, n/a std::string coilSizingMethodConcurrenceName; // string name of sizing method for concurrence int coilSizingMethodCapacity; // 8=CoolingDesignCapacity, 9=HeatingDesignCapacity, 10=CapacityPerFloorArea, 11=FractionOfAutosizedCoolingCapacity, diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index 71214b90f17..55dc9cd6380 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -122,6 +122,8 @@ void InitializeRuntimeLanguage(EnergyPlusData &state) if (state.dataRuntimeLangProcessor->InitializeOnce) { + state.dataRuntimeLang->emsVarBuiltInStart = state.dataRuntimeLang->NumErlVariables + 1; + state.dataRuntimeLang->False = SetErlValueNumber(0.0); state.dataRuntimeLang->True = SetErlValueNumber(1.0); @@ -160,6 +162,9 @@ void InitializeRuntimeLanguage(EnergyPlusData &state) state.dataRuntimeLangProcessor->ActualTimeNum = NewEMSVariable(state, "ACTUALTIME", 0); state.dataRuntimeLangProcessor->WarmUpFlagNum = NewEMSVariable(state, "WARMUPFLAG", 0); + // update the end of the built-in range so we can ignore those on API calls + state.dataRuntimeLang->emsVarBuiltInEnd = state.dataRuntimeLang->NumErlVariables; + GetRuntimeLanguageUserInput(state); // Load and parse all runtime language objects date_and_time(datestring, _, _, datevalues); diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index 732a97c8a33..5a8ccc20e53 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -5534,7 +5534,7 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn auto &sysSizing = state.dataSize->SysSizing(state.dataSize->CurOverallSimDay, AirLoopNum); switch (sysSizing.SizingOption) { - case Coincident: { + case DataSizing::SizingConcurrence::Coincident: { if (finalSysSizing.SystemOAMethod == SysOAMethod::ZoneSum) { sysSizing.DesCoolVolFlow = sysSizing.CoinCoolMassFlow / state.dataEnvrn->StdRhoAir; sysSizing.DesHeatVolFlow = sysSizing.CoinHeatMassFlow / state.dataEnvrn->StdRhoAir; @@ -5865,7 +5865,7 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn sysSizing.DesMainVolFlow = max(sysSizing.DesCoolVolFlow, sysSizing.DesHeatVolFlow); // this should also be as least as big as is needed for Vot } break; - case NonCoincident: { + case DataSizing::SizingConcurrence::NonCoincident: { if (finalSysSizing.SystemOAMethod == SysOAMethod::ZoneSum) { sysSizing.DesCoolVolFlow = sysSizing.NonCoinCoolMassFlow / state.dataEnvrn->StdRhoAir; sysSizing.DesHeatVolFlow = sysSizing.NonCoinHeatMassFlow / state.dataEnvrn->StdRhoAir; @@ -6426,8 +6426,14 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn (1.0 + termUnitSizing.InducRat); CoolDDNum = state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).CoolDDNum; CoolTimeStepNum = state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).TimeStepNumAtCoolMax; - OutAirTemp += state.dataSize->DesDayWeath(CoolDDNum).Temp(CoolTimeStepNum) * coolMassFlow / (1.0 + termUnitSizing.InducRat); - OutAirHumRat += state.dataSize->DesDayWeath(CoolDDNum).HumRat(CoolTimeStepNum) * coolMassFlow / (1.0 + termUnitSizing.InducRat); + if (CoolDDNum == 0) { + auto &zoneCFS = state.dataSize->CalcFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).ZoneNum); + OutAirTemp += zoneCFS.CoolOutTemp * coolMassFlow / (1.0 + termUnitSizing.InducRat); + OutAirHumRat += zoneCFS.CoolOutHumRat * coolMassFlow / (1.0 + termUnitSizing.InducRat); + } else { + OutAirTemp += state.dataSize->DesDayWeath(CoolDDNum).Temp(CoolTimeStepNum) * coolMassFlow / (1.0 + termUnitSizing.InducRat); + OutAirHumRat += state.dataSize->DesDayWeath(CoolDDNum).HumRat(CoolTimeStepNum) * coolMassFlow / (1.0 + termUnitSizing.InducRat); + } } if (state.dataSize->CalcSysSizing(AirLoopNum).NonCoinCoolMassFlow > 0.0) { SysCoolRetTemp /= state.dataSize->CalcSysSizing(AirLoopNum).NonCoinCoolMassFlow; @@ -6490,8 +6496,15 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn (1.0 + termUnitSizing.InducRat); HeatDDNum = state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).HeatDDNum; HeatTimeStepNum = state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).TimeStepNumAtHeatMax; - OutAirTemp += state.dataSize->DesDayWeath(HeatDDNum).Temp(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); - OutAirHumRat += state.dataSize->DesDayWeath(HeatDDNum).HumRat(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); + if (HeatDDNum == 0) { + auto &zoneCFS = state.dataSize->CalcFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).ZoneNum); + OutAirTemp += zoneCFS.HeatOutTemp * heatMassFlow / (1.0 + termUnitSizing.InducRat); + OutAirHumRat += zoneCFS.HeatOutHumRat * heatMassFlow / (1.0 + termUnitSizing.InducRat); + } else { + OutAirTemp += state.dataSize->DesDayWeath(HeatDDNum).Temp(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); + OutAirHumRat += + state.dataSize->DesDayWeath(HeatDDNum).HumRat(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); + } } if (state.dataSize->CalcSysSizing(AirLoopNum).NonCoinHeatMassFlow > 0.0) { SysHeatRetTemp /= state.dataSize->CalcSysSizing(AirLoopNum).NonCoinHeatMassFlow; @@ -6537,8 +6550,15 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn (1.0 + termUnitSizing.InducRat); HeatDDNum = state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).HeatDDNum; HeatTimeStepNum = state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).TimeStepNumAtHeatMax; - OutAirTemp += state.dataSize->DesDayWeath(HeatDDNum).Temp(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); - OutAirHumRat += state.dataSize->DesDayWeath(HeatDDNum).HumRat(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); + if (HeatDDNum == 0) { + auto &zoneCFS = state.dataSize->CalcFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).ZoneNum); + OutAirTemp += zoneCFS.HeatOutTemp * heatMassFlow / (1.0 + termUnitSizing.InducRat); + OutAirHumRat += zoneCFS.HeatOutHumRat * heatMassFlow / (1.0 + termUnitSizing.InducRat); + } else { + OutAirTemp += state.dataSize->DesDayWeath(HeatDDNum).Temp(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); + OutAirHumRat += + state.dataSize->DesDayWeath(HeatDDNum).HumRat(HeatTimeStepNum) * heatMassFlow / (1.0 + termUnitSizing.InducRat); + } } if (state.dataSize->CalcSysSizing(AirLoopNum).NonCoinHeatMassFlow > 0.0) { SysHeatRetTemp /= state.dataSize->CalcSysSizing(AirLoopNum).NonCoinHeatMassFlow; @@ -6564,7 +6584,7 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn } // move the noncoincident results into the system sizing array - if (state.dataSize->CalcSysSizing(AirLoopNum).SizingOption == NonCoincident) { + if (state.dataSize->CalcSysSizing(AirLoopNum).SizingOption == DataSizing::SizingConcurrence::NonCoincident) { // But first check to see if the noncoincident result is actually bigger than the coincident (for 100% outside air) if (!(state.dataSize->FinalSysSizing(AirLoopNum).CoolOAOption == OAControl::AllOA && SysSensCoolCap <= 0.0)) { // CoolOAOption = Yes 100% OA @@ -6785,7 +6805,8 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn ZoneOARatio = 0.0; } state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).scaleZoneCooling(ZoneOARatio); - } else if ((SysCoolSizingRat > 1.0) || (SysCoolSizingRat < 1.0 && finalSysSizing.SizingOption == NonCoincident)) { + } else if ((SysCoolSizingRat > 1.0) || + (SysCoolSizingRat < 1.0 && finalSysSizing.SizingOption == DataSizing::SizingConcurrence::NonCoincident)) { // size on user input system design flows state.dataSize->TermUnitFinalZoneSizing(TermUnitSizingIndex).scaleZoneCooling(SysCoolSizingRat); } @@ -6845,7 +6866,8 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn ZoneOARatio = termUnitFinalZoneSizing.MinOA / max(termUnitFinalZoneSizing.DesHeatVolFlow, termUnitFinalZoneSizing.MinOA); ZoneOARatio *= (1.0 + state.dataSize->TermUnitSizing(TermUnitSizingIndex).InducRat); termUnitFinalZoneSizing.scaleZoneHeating(ZoneOARatio); - } else if ((SysHeatSizingRat > 1.0) || (SysHeatSizingRat < 1.0 && finalSysSizing.SizingOption == NonCoincident)) { + } else if ((SysHeatSizingRat > 1.0) || + (SysHeatSizingRat < 1.0 && finalSysSizing.SizingOption == DataSizing::SizingConcurrence::NonCoincident)) { // size on user input system design flows termUnitFinalZoneSizing.scaleZoneHeating(SysHeatSizingRat); } diff --git a/src/EnergyPlus/SizingManager.cc b/src/EnergyPlus/SizingManager.cc index 31be55cb933..0b76cbd122e 100644 --- a/src/EnergyPlus/SizingManager.cc +++ b/src/EnergyPlus/SizingManager.cc @@ -240,7 +240,16 @@ void ManageSizing(EnergyPlusData &state) state.files.zsz.filePath = state.files.outputZszTxtFilePath; } + if (state.dataSize->SizingFileColSep == CharComma) { + state.files.spsz.filePath = state.files.outputSpszCsvFilePath; + } else if (state.dataSize->SizingFileColSep == CharTab) { + state.files.spsz.filePath = state.files.outputSpszTabFilePath; + } else { + state.files.spsz.filePath = state.files.outputSpszTxtFilePath; + } + state.files.zsz.ensure_open(state, "ManageSizing", state.files.outputControl.zsz); + state.files.spsz.ensure_open(state, "ManageSizing", state.files.outputControl.spsz); ShowMessage(state, "Beginning Zone Sizing Calculations"); @@ -1116,7 +1125,9 @@ void ManageSystemSizingAdjustments(EnergyPlusData &state) // correct sizing design heating volume flow rate based on finalized air terminal unit operation if (FinalSysSizing(AirLoopNum).SizingOption == - NonCoincident) { // If non-coincident sizing method for this air loop, the we can use these sum's from air terminals directly + DataSizing::SizingConcurrence::NonCoincident) { // If non-coincident sizing method for this air loop, the we can use these sum's + // from + // air terminals directly FinalSysSizing(AirLoopNum).DesHeatVolFlow = max(airLoopHeatingMaximumFlowRateSum, FinalSysSizing(AirLoopNum).DesHeatVolFlow); FinalSysSizing(AirLoopNum).DesMainVolFlow = max(airLoopMaxFlowRateSum, FinalSysSizing(AirLoopNum).DesMainVolFlow); if (FinalSysSizing(AirLoopNum).sysSizeCoolingDominant) { @@ -1126,7 +1137,7 @@ void ManageSystemSizingAdjustments(EnergyPlusData &state) FinalSysSizing(AirLoopNum).DesCoolVolFlow = max(airLoopHeatingMinimumFlowRateSum, FinalSysSizing(AirLoopNum).DesCoolVolFlow); FinalSysSizing(AirLoopNum).MassFlowAtCoolPeak = FinalSysSizing(AirLoopNum).DesCoolVolFlow * state.dataEnvrn->StdRhoAir; } - } else if (FinalSysSizing(AirLoopNum).SizingOption == Coincident) { + } else if (FinalSysSizing(AirLoopNum).SizingOption == DataSizing::SizingConcurrence::Coincident) { if (FinalSysSizing(AirLoopNum).sysSizeCoolingDominant) { // use minimum heating flow sum from air terminals // know that minimum heating flow is a hard minimum regardless of concurrence situation, so make sure that design is at @@ -3279,6 +3290,8 @@ void GetZoneSizingInput(EnergyPlusData &state) ErrorsFound = true; } } + zoneSizingIndex.spaceConcurrence = static_cast( + getEnumValue(DataSizing::SizingConcurrenceNamesUC, state.dataIPShortCut->cAlphaArgs(15))); zoneSizingIndex.zoneSizingMethod = static_cast(getEnumValue(DataSizing::ZoneSizingMethodNamesUC, state.dataIPShortCut->cAlphaArgs(10))); if (zoneSizingIndex.zoneSizingMethod != ZoneSizing::SensibleOnly) { @@ -3578,9 +3591,9 @@ void GetSystemSizingInput(EnergyPlusData &state) { std::string const &sizingOption = state.dataIPShortCut->cAlphaArgs(iSizingOptionAlphaNum); if (sizingOption == "COINCIDENT") { - SysSizInput(SysSizIndex).SizingOption = Coincident; + SysSizInput(SysSizIndex).SizingOption = DataSizing::SizingConcurrence::Coincident; } else if (sizingOption == "NONCOINCIDENT") { - SysSizInput(SysSizIndex).SizingOption = NonCoincident; + SysSizInput(SysSizIndex).SizingOption = DataSizing::SizingConcurrence::NonCoincident; } else { ShowSevereError(state, format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, @@ -4270,6 +4283,11 @@ void reportZoneSizing(EnergyPlusData &state, HumRatAtPeak = state.dataSize->DesDayWeath(DDNum).HumRat(TimeStepAtPeak); DOASHeatGainRateAtClPk = zsCalcSizing(DDNum, thisNum).DOASHeatAddSeq(TimeStepAtPeak); TStatSetPtAtPk = zSizing(DDNum, thisNum).CoolTstatTempSeq(TimeStepAtPeak); + } else { + TempAtPeak = zsCalcFinalSizing.OutTempAtCoolPeak; + HumRatAtPeak = zsCalcFinalSizing.OutHumRatAtCoolPeak; + DOASHeatGainRateAtClPk = zsCalcFinalSizing.DOASCoolLoad; + TStatSetPtAtPk = zsCalcFinalSizing.ZoneTempAtCoolPeak; } reportZoneSizingEio(state, zsFinalSizing.ZoneName, @@ -4338,6 +4356,11 @@ void reportZoneSizing(EnergyPlusData &state, HumRatAtPeak = state.dataSize->DesDayWeath(DDNum).HumRat(TimeStepAtPeak); DOASHeatGainRateAtHtPk = zsCalcSizing(DDNum, thisNum).DOASHeatAddSeq(TimeStepAtPeak); TStatSetPtAtPk = zSizing(DDNum, thisNum).HeatTstatTempSeq(TimeStepAtPeak); + } else { + TempAtPeak = zsCalcFinalSizing.OutTempAtHeatPeak; + HumRatAtPeak = zsCalcFinalSizing.OutHumRatAtHeatPeak; + DOASHeatGainRateAtHtPk = zsCalcFinalSizing.DOASHeatLoad; + TStatSetPtAtPk = zsCalcFinalSizing.ZoneTempAtHeatPeak; } reportZoneSizingEio(state, zsFinalSizing.ZoneName, diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index 09b60d6a98f..07be3cb2695 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -2846,7 +2846,8 @@ namespace SurfaceGeometry { for (int surfNum = 1; surfNum <= state.dataSurface->TotSurfaces; ++surfNum) { auto &thisSurf = Surfaces(surfNum); - if (!thisSurf.HeatTransSurf) continue; // ignore shading surfaces + if (!thisSurf.HeatTransSurf) continue; // ignore shading surfaces + if (thisSurf.Class == DataSurfaces::SurfaceClass::IntMass) continue; // skip internal mass surfaces for this check if (thisSurf.BaseSurf != surfNum) { // Set space for subsurfaces thisSurf.spaceNum = Surfaces(thisSurf.BaseSurf).spaceNum; @@ -7192,7 +7193,8 @@ namespace SurfaceGeometry { state.dataSurface->IntMassObjects(Item).NumOfZones = state.dataHeatBal->ZoneList(ZLItem).NumOfZones; state.dataSurface->IntMassObjects(Item).ZoneListActive = true; state.dataSurface->IntMassObjects(Item).ZoneOrZoneListPtr = ZLItem; - } else { + } else if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { + // If Space or SpaceList Name is blank, then throw error. ShowSevereError(state, format("{}=\"{}\" invalid {}=\"{}\" not found.", cCurrentModuleObject, @@ -7217,19 +7219,9 @@ namespace SurfaceGeometry { state.dataSurface->IntMassObjects(Item).numOfSpaces = 1; state.dataSurface->IntMassObjects(Item).spaceListActive = false; state.dataSurface->IntMassObjects(Item).spaceOrSpaceListPtr = Item1; - if (!state.dataSurface->IntMassObjects(Item).ZoneListActive) { - if (state.dataHeatBal->space(Item1).zoneNum != state.dataSurface->IntMassObjects(Item).ZoneOrZoneListPtr) { - ShowSevereError(state, - format("{}=\"{}\" invalid {}=\"{}\" is not part of Zone =\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(4), - state.dataIPShortCut->cAlphaArgs(4), - state.dataIPShortCut->cAlphaArgs(3))); - ErrorsFound = true; - errFlag = true; - } - } + state.dataSurface->IntMassObjects(Item).NumOfZones = 1; + state.dataSurface->IntMassObjects(Item).ZoneListActive = false; + state.dataSurface->IntMassObjects(Item).ZoneOrZoneListPtr = state.dataHeatBal->space(Item1).zoneNum; } else if (SLItem > 0) { int numOfSpaces = int(state.dataHeatBal->spaceList(SLItem).numListSpaces); NumIntMassSurfaces += numOfSpaces; @@ -10645,7 +10637,7 @@ namespace SurfaceGeometry { auto const &surf = state.dataSurface->Surface(SurfNum); if (surf.Class != SurfaceClass::Window || surf.ExtBoundCond != 0) { ShowSevereError(state, format("{}=\"{}\"", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowSevereError(state, format("cannot be used with surface={}", surf.Name)); + ShowContinueError(state, format("cannot be used with surface={}", surf.Name)); ShowContinueError(state, "because that surface is not an exterior window."); ErrorsFound = true; } @@ -12173,10 +12165,10 @@ namespace SurfaceGeometry { (MaterialLayerGroup == Material::Group::ScreenEquivalentLayer) || (MaterialLayerGroup == Material::Group::GapEquivalentLayer)) { ShowSevereError(state, format("Invalid movable insulation material for {}:", cCurrentModuleObject)); - ShowSevereError( + ShowContinueError( state, format("...Movable insulation material type specified = {}", cMaterialGroupType(static_cast(MaterialLayerGroup)))); - ShowSevereError(state, format("...Movable insulation material name specified = {}", state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError(state, format("...Movable insulation material name specified = {}", state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; } if (SchNum == 0) { diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index ba0329917ed..58b236f75c5 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -264,6 +264,7 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib = NumAlpha - 3; state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr.allocate(state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); + state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr.allocate(state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName.allocate(state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet.allocate( state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib); @@ -277,6 +278,15 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneySys(Loop).ZoneName(TCZoneNum) = state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3); state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3), state.dataHeatBal->Zone); + if (state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) == 0) { + int spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(TCZoneNum + 3), state.dataHeatBal->space); + if (spaceNum > 0) { + state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum) = spaceNum; + int zoneNum = state.dataHeatBal->space(spaceNum).zoneNum; + state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum) = zoneNum; + } + } + state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) = state.dataIPShortCut->rNumericArgs(3 * TCZoneNum + 1); state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) = @@ -676,8 +686,6 @@ namespace ThermalChimney { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: // Real local vaiables - int TCZoneNumCounter; - int TCZoneNum; Real64 minorW; // width of enclosure (narrow dimension) Real64 majorW; // width of major surface Real64 TempmajorW; @@ -771,28 +779,41 @@ namespace ThermalChimney { DischargeCoeffTC = state.dataThermalChimneys->ThermalChimneySys(Loop).DischargeCoeff; AirInletCrossArea = 0.0; - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { AirInletCrossArea += state.dataThermalChimneys->ThermalChimneySys(Loop).EachAirInletCrossArea(TCZoneNum); } RoomAirTemp = 0.0; - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - RoomAirTemp += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * - state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter).MAT; + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + RoomAirTemp += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * + state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr).MAT; + } else { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + RoomAirTemp += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * + state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr).MAT; + } } RoomAirTemp += Constant::Kelvin; Process1 = 0.0; Process2 = 0.0; - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter); - Process1 += PsyHFnTdbW(thisTCZoneHB.MAT, thisTCZoneHB.airHumRat) * - state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) * + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr); + Real64 tcZoneMAT = thisTCZoneHB.MAT; + Real64 tcZoneHumRat = thisTCZoneHB.airHumRat; + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCspaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + tcZoneMAT = thisTCspaceHB.MAT; + tcZoneHumRat = thisTCspaceHB.airHumRat; + } + Real64 tcZoneEnth = PsyHFnTdbW(tcZoneMAT, tcZoneHumRat); + Process1 += tcZoneEnth * state.dataThermalChimneys->ThermalChimneySys(Loop).DistanceThermChimInlet(TCZoneNum) * state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum); - Process2 += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * - PsyHFnTdbW(state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter).MAT, thisTCZoneHB.airHumRat); + Process2 += state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum) * tcZoneEnth; } OverallThermalChimLength = Process1 / Process2; @@ -888,23 +909,39 @@ namespace ThermalChimney { } // Now assignment of the overall mass flow rate into each zone - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter); - AirDensity = PsyRhoAirFnPbTdbW(state, - state.dataEnvrn->OutBaroPress, - state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter).MAT, - thisTCZoneHB.airHumRat); - CpAir = PsyCpAirFnW(thisTCZoneHB.airHumRat); - thisTCZoneHB.MCPThermChim = + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr); + Real64 tcZoneMAT = thisTCZoneHB.MAT; + Real64 tcZoneHumRat = thisTCZoneHB.airHumRat; + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + tcZoneMAT = thisTCSpaceHB.MAT; + tcZoneHumRat = thisTCSpaceHB.airHumRat; + } + // ToDo - Let this persist to avoid diffs, but should be local + AirDensity = PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, tcZoneMAT, tcZoneHumRat); + CpAir = PsyCpAirFnW(tcZoneHumRat); + Real64 thisMCPThermChim = TCVolumeAirFlowRate * AirDensity * CpAir * state.dataThermalChimneys->ThermalChimneySys(Loop).RatioThermChimAirFlow(TCZoneNum); - if (thisTCZoneHB.MCPThermChim <= 0.0) { - thisTCZoneHB.MCPThermChim = 0.0; + if (thisMCPThermChim <= 0.0) { + thisMCPThermChim = 0.0; + } + Real64 thisThermChimAMFL = thisMCPThermChim / CpAir; + Real64 thisMCPTThermChim = thisMCPThermChim * state.dataHeatBal->Zone(tcZonePtr).OutDryBulbTemp; // Only zones have an ODB temp value + thisTCZoneHB.MCPThermChim = thisMCPThermChim; + thisTCZoneHB.ThermChimAMFL = thisThermChimAMFL; + thisTCZoneHB.MCPTThermChim = thisMCPTThermChim; + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + thisTCSpaceHB.MCPThermChim = thisMCPThermChim; + thisTCSpaceHB.ThermChimAMFL = thisThermChimAMFL; + thisTCSpaceHB.MCPTThermChim = thisMCPTThermChim; } - thisTCZoneHB.ThermChimAMFL = thisTCZoneHB.MCPThermChim / CpAir; - thisTCZoneHB.MCPTThermChim = thisTCZoneHB.MCPThermChim * state.dataHeatBal->Zone(TCZoneNumCounter).OutDryBulbTemp; } + // ToDo - This should probably be using AirDensityThermalChim here instead of AirDensity which is leftover from the last inlet zone thisZoneHB.MCPThermChim = TCVolumeAirFlowRate * AirDensity * CpAir; if (thisZoneHB.MCPThermChim <= 0.0) { thisZoneHB.MCPThermChim = 0.0; @@ -922,12 +959,19 @@ namespace ThermalChimney { state.dataThermalChimneys->ThermalChimneyReport(Loop).OutletAirTempThermalChim = ThermChimSubTemp(NTC) - Constant::Kelvin; if (GetCurrentScheduleValue(state, state.dataThermalChimneys->ThermalChimneySys(Loop).SchedPtr) <= 0.0) { - for (TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { - TCZoneNumCounter = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); - auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(TCZoneNumCounter); + for (int TCZoneNum = 1; TCZoneNum <= state.dataThermalChimneys->ThermalChimneySys(Loop).TotZoneToDistrib; ++TCZoneNum) { + int tcZonePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).ZonePtr(TCZoneNum); + auto &thisTCZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(tcZonePtr); thisTCZoneHB.MCPThermChim = 0.0; thisTCZoneHB.ThermChimAMFL = 0.0; thisTCZoneHB.MCPTThermChim = 0.0; + int tcSpacePtr = state.dataThermalChimneys->ThermalChimneySys(Loop).spacePtr(TCZoneNum); + if ((state.dataHeatBal->doSpaceHeatBalance) && (tcSpacePtr > 0)) { + auto &thisTCSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(tcSpacePtr); + thisTCSpaceHB.MCPThermChim = 0.0; + thisTCSpaceHB.ThermChimAMFL = 0.0; + thisTCSpaceHB.MCPTThermChim = 0.0; + } } thisZoneHB.MCPThermChim = 0.0; thisZoneHB.ThermChimAMFL = 0.0; diff --git a/src/EnergyPlus/ThermalChimney.hh b/src/EnergyPlus/ThermalChimney.hh index 4731ca007e5..797594f6756 100644 --- a/src/EnergyPlus/ThermalChimney.hh +++ b/src/EnergyPlus/ThermalChimney.hh @@ -79,6 +79,7 @@ namespace ThermalChimney { bool EMSOverrideOn; // if true then EMS is requesting to override Real64 EMSAirFlowRateValue; // value EMS is setting for air flow rate Array1D_int ZonePtr; + Array1D_int spacePtr; Array1D_string ZoneName; Array1D DistanceThermChimInlet; Array1D RatioThermChimAirFlow; diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index e876addcda6..c46a47475ec 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -2013,7 +2013,7 @@ namespace ThermalComfort { int WhichAFList = thisPeople.AngleFactorListPtr; if (WhichAFList == 0 && (thisPeople.Fanger || thisPeople.Pierce || thisPeople.KSU)) { ShowSevereError(state, format("{}{}=\"{}\", invalid", routineName, cCurrentModuleObject, thisPeople.AngleFactorListName)); - ShowSevereError(state, format("... Angle Factor List Name not found for PEOPLE=\"{}\"", thisPeople.Name)); + ShowContinueError(state, format("... Angle Factor List Name not found for PEOPLE=\"{}\"", thisPeople.Name)); ErrorsFound = true; } else { auto &thisAngFacList = state.dataThermalComforts->AngleFactorList(WhichAFList); diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index 5070ef8c4bc..9da1b5a1573 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -5368,7 +5368,7 @@ namespace UnitarySystems { this->m_SuppHeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", this->m_SuppHeatCoilName, errFlag); if (errFlag) { ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowSevereError(state, format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); + ShowContinueError(state, format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); errorsFound = true; errFlag = false; } else { @@ -5403,7 +5403,7 @@ namespace UnitarySystems { state, this->m_SuppHeatCoilName, this->m_SuppHeatCoilIndex, errFlag, cCurrentModuleObject); if (errFlag) { ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowSevereError(state, format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); + ShowContinueError(state, format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); errorsFound = true; errFlag = false; } else { @@ -5417,7 +5417,7 @@ namespace UnitarySystems { } else { // Illegal reheating coil type ShowSevereError(state, format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowSevereError(state, format("Illegal Supplemental Heating Coil Type = {}", this->m_SuppHeatCoilTypeName)); + ShowContinueError(state, format("Illegal Supplemental Heating Coil Type = {}", this->m_SuppHeatCoilTypeName)); errorsFound = true; } // IF (this->SuppHeatCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. diff --git a/src/EnergyPlus/UtilityRoutines.cc b/src/EnergyPlus/UtilityRoutines.cc index 3f0ecaef058..85fc42c5674 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -866,6 +866,60 @@ bool env_var_on(std::string const &env_var_str) return ((!env_var_str.empty()) && is_any_of(env_var_str[0], "YyTt")); } +void emitErrorMessage(EnergyPlusData &state, [[maybe_unused]] ErrorMessageCategory category, std::string const &msg, bool shouldFatal) +{ + if (!shouldFatal) { + ShowSevereError(state, msg); + } else { // should fatal + ShowFatalError(state, msg); + } +} +void emitErrorMessages(EnergyPlusData &state, + [[maybe_unused]] ErrorMessageCategory category, + std::initializer_list const &msgs, + bool const shouldFatal, + int const zeroBasedTimeStampIndex) +{ + for (auto msg = msgs.begin(); msg != msgs.end(); ++msg) { + if (msg - msgs.begin() == zeroBasedTimeStampIndex) { + ShowContinueErrorTimeStamp(state, *msg); + continue; + } + if (msg == msgs.begin()) { + ShowSevereError(state, *msg); + } else if (std::next(msg) == msgs.end() && shouldFatal) { + ShowFatalError(state, *msg); + } else { // should be an intermediate message, or a final one where there is no fatal + ShowContinueError(state, *msg); + } + } +} +void emitWarningMessage(EnergyPlusData &state, [[maybe_unused]] ErrorMessageCategory category, std::string const &msg, bool const countAsError) +{ + if (countAsError) { // ideally this path goes away and we just have distinct warnings and errors + ShowWarningError(state, msg); + } else { + ShowWarningMessage(state, msg); + } +} +void emitWarningMessages(EnergyPlusData &state, + [[maybe_unused]] ErrorMessageCategory category, + std::initializer_list const &msgs, + bool const countAsError) +{ + for (auto msg = msgs.begin(); msg != msgs.end(); ++msg) { + if (msg == msgs.begin()) { + if (countAsError) { // ideally this path goes away and we just have distinct warnings and errors + ShowWarningError(state, *msg); + } else { + ShowWarningMessage(state, *msg); + } + } else { + ShowContinueError(state, *msg); + } + } +} + void ShowFatalError(EnergyPlusData &state, std::string const &ErrorMessage, OptionalOutputFileRef OutUnit1, OptionalOutputFileRef OutUnit2) { diff --git a/src/EnergyPlus/UtilityRoutines.hh b/src/EnergyPlus/UtilityRoutines.hh index b8b360bc323..e6bd1877768 100644 --- a/src/EnergyPlus/UtilityRoutines.hh +++ b/src/EnergyPlus/UtilityRoutines.hh @@ -132,6 +132,39 @@ bool env_var_on(std::string const &env_var_str); using OptionalOutputFileRef = std::optional>; +enum class ErrorMessageCategory +{ + Invalid = -1, + Unclassified, + Input_invalid, + Input_field_not_found, + Input_field_blank, + Input_object_not_found, + Input_cannot_find_object, + Input_topology_problem, + Input_unused, + Input_fatal, + Runtime_general, + Runtime_flow_out_of_range, + Runtime_temp_out_of_range, + Runtime_airflow_network, + Fatal_general, + Developer_general, + Developer_invalid_index, + Num +}; +void emitErrorMessage(EnergyPlusData &state, ErrorMessageCategory category, std::string const &msg, bool shouldFatal); +void emitErrorMessages(EnergyPlusData &state, + ErrorMessageCategory category, + std::initializer_list const &msgs, + bool shouldFatal, + int zeroBasedTimeStampIndex = -1); +void emitWarningMessage(EnergyPlusData &state, ErrorMessageCategory category, std::string const &msg, bool countAsError = false); +void emitWarningMessages(EnergyPlusData &state, + ErrorMessageCategory category, + std::initializer_list const &msgs, + bool countAsError = false); + void ShowFatalError(EnergyPlusData &state, std::string const &ErrorMessage, OptionalOutputFileRef OutUnit1 = {}, OptionalOutputFileRef OutUnit2 = {}); void ShowSevereError(EnergyPlusData &state, diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index 15daa081ab9..3738697f0c8 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -6002,7 +6002,7 @@ namespace Weather { if (!ScheduleManager::CheckDayScheduleValueMinMax(state, desDayInput.TempRangeSchPtr, 0.0, false)) { ShowSevereError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, format("..invalid field: {}=\"{}\".", ipsc->cAlphaFieldNames(4), ipsc->cAlphaArgs(4))); - ShowSevereError(state, "Some [Schedule] Dry-bulb Range Difference Values are < 0.0 [would make max larger]."); + ShowContinueError(state, "Some [Schedule] Dry-bulb Range Difference Values are < 0.0 [would make max larger]."); ErrorsFound = true; } } @@ -6211,7 +6211,7 @@ namespace Weather { if (!ScheduleManager::CheckDayScheduleValueMinMax(state, desDayInput.HumIndSchPtr, 0.0, false)) { ShowSevereError(state, format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, format("..invalid field: {}=\"{}\".", ipsc->cAlphaFieldNames(6), ipsc->cAlphaArgs(6))); - ShowSevereError(state, "Some [Schedule] Wet-bulb Profile Difference Values are < 0.0 [would make max larger]."); + ShowContinueError(state, "Some [Schedule] Wet-bulb Profile Difference Values are < 0.0 [would make max larger]."); ErrorsFound = true; } } break; diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index 1c7d5b5a6a1..ba62fe8f54e 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -5833,7 +5833,7 @@ namespace Window { DPhi = 5.0 * Constant::DegToRadians; // Integrate from -90 to 0 deg - for (int IPhi = 1; IPhi <= 18; ++IPhi) { + for (int IPhi = 1; IPhi <= (Material::MaxProfAngs / 2); ++IPhi) { Phi = -Constant::PiOvr2 + (IPhi - 0.5) * DPhi; Sum += std::cos(Phi) * DPhi * InterpProfAng(Phi, Property); SumDenom += std::cos(Phi) * DPhi; @@ -5876,7 +5876,7 @@ namespace Window { DPhi = 5.0 * Constant::DegToRadians; // Integrate from 0 to 90 deg - for (int IPhi = 19; IPhi <= 36; ++IPhi) { + for (int IPhi = (Material::MaxProfAngs / 2) + 1; IPhi <= Material::MaxProfAngs - 1; ++IPhi) { Phi = -Constant::PiOvr2 + (IPhi - 0.5) * DPhi; Sum += std::cos(Phi) * DPhi * InterpProfAng(Phi, Property); SumDenom += std::cos(Phi) * DPhi; @@ -7458,11 +7458,11 @@ namespace Window { // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Array1D bld_pr(15); // Slat properties - Array1D st_lay(16); // Solar-optical blind/glazing system properties - Real64 sun_el; // Solar profile angle (radians) - Array1D sun_el_deg(37); // Solar profile angle (deg) corresponding to sun_el values - Real64 bld_el; // Slat angle (elevation of slat normal vector in plane + Array1D bld_pr(15); // Slat properties + Array1D st_lay(16); // Solar-optical blind/glazing system properties + Real64 sun_el; // Solar profile angle (radians) + Array1D sun_el_deg(Material::MaxProfAngs); // Solar profile angle (deg) corresponding to sun_el values + Real64 bld_el; // Slat angle (elevation of slat normal vector in plane // perpendicular to window and containing the slat normal vector) (radians) int IProfAng; // Profile angle index @@ -7538,7 +7538,7 @@ namespace Window { // If blind has variable slat angle, vary slat angle from 0 to 180 deg in 10-deg steps // (for Material::MaxSlatAngs = 19). If blind has fixed slat angle, calculate properties at that angle only. - for (int IProfAng = 1; IProfAng <= 37; ++IProfAng) { + for (int IProfAng = 1; IProfAng <= Material::MaxProfAngs; ++IProfAng) { sun_el = -Constant::Pi / 2.0 + (Constant::Pi / 36.0) * (IProfAng - 1); sun_el_deg(IProfAng) = 57.2958 * sun_el; @@ -7583,14 +7583,18 @@ namespace Window { if (ISolVis == 1) { for (int ISlatAng = 1; ISlatAng <= Material::MaxSlatAngs; ++ISlatAng) { - blind.SolFrontDiffDiffTransGnd(ISlatAng) = DiffuseAverageProfAngGnd(blind.SolFrontBeamBeamTrans(ISlatAng, {1, 37})) + - DiffuseAverageProfAngGnd(blind.SolFrontBeamDiffTrans(ISlatAng, {1, 37})); - blind.SolFrontDiffDiffTransSky(ISlatAng) = DiffuseAverageProfAngSky(blind.SolFrontBeamBeamTrans(ISlatAng, {1, 37})) + - DiffuseAverageProfAngSky(blind.SolFrontBeamDiffTrans(ISlatAng, {1, 37})); - blind.SolFrontDiffAbsGnd(ISlatAng) = DiffuseAverageProfAngGnd(blind.SolFrontBeamAbs(ISlatAng, {1, 37})); - blind.SolFrontDiffAbsSky(ISlatAng) = DiffuseAverageProfAngSky(blind.SolFrontBeamAbs(ISlatAng, {1, 37})); - blind.SolFrontDiffDiffReflGnd(ISlatAng) = DiffuseAverageProfAngGnd(blind.SolFrontBeamDiffRefl(ISlatAng, {1, 37})); - blind.SolFrontDiffDiffReflSky(ISlatAng) = DiffuseAverageProfAngSky(blind.SolFrontBeamDiffRefl(ISlatAng, {1, 37})); + blind.SolFrontDiffDiffTransGnd(ISlatAng) = + DiffuseAverageProfAngGnd(blind.SolFrontBeamBeamTrans(ISlatAng, {1, Material::MaxProfAngs})) + + DiffuseAverageProfAngGnd(blind.SolFrontBeamDiffTrans(ISlatAng, {1, Material::MaxProfAngs})); + blind.SolFrontDiffDiffTransSky(ISlatAng) = + DiffuseAverageProfAngSky(blind.SolFrontBeamBeamTrans(ISlatAng, {1, Material::MaxProfAngs})) + + DiffuseAverageProfAngSky(blind.SolFrontBeamDiffTrans(ISlatAng, {1, Material::MaxProfAngs})); + blind.SolFrontDiffAbsGnd(ISlatAng) = DiffuseAverageProfAngGnd(blind.SolFrontBeamAbs(ISlatAng, {1, Material::MaxProfAngs})); + blind.SolFrontDiffAbsSky(ISlatAng) = DiffuseAverageProfAngSky(blind.SolFrontBeamAbs(ISlatAng, {1, Material::MaxProfAngs})); + blind.SolFrontDiffDiffReflGnd(ISlatAng) = + DiffuseAverageProfAngGnd(blind.SolFrontBeamDiffRefl(ISlatAng, {1, Material::MaxProfAngs})); + blind.SolFrontDiffDiffReflSky(ISlatAng) = + DiffuseAverageProfAngSky(blind.SolFrontBeamDiffRefl(ISlatAng, {1, Material::MaxProfAngs})); // TH 2/17/2010. Added. Loop only for movable slat blinds if (blind.SlatAngleType == DataWindowEquivalentLayer::AngleType::Fixed) break; @@ -8485,7 +8489,7 @@ namespace Window { // Linear interpolation. // Argument array dimensioning - PropArray.dim(Material::MaxSlatAngs, 37); + PropArray.dim(Material::MaxSlatAngs, Material::MaxProfAngs); Real64 SlatAng1 = std::clamp(SlatAng, 0.0, Constant::Pi); @@ -8505,14 +8509,14 @@ namespace Window { Real64 SlatAngRatio = (SlatAng1 - (IBeta - 1) * DeltaSlatAng) / DeltaSlatAng; // Slat angle interpolation factor Val1 = PropArray(IBeta, IAlpha); // Property values at points enclosing the given ProfAngle and SlatAngle Val2 = PropArray(min(Material::MaxSlatAngs, IBeta + 1), IAlpha); - Real64 Val3 = PropArray(IBeta, min(37, IAlpha + 1)); - Real64 Val4 = PropArray(min(Material::MaxSlatAngs, IBeta + 1), min(37, IAlpha + 1)); + Real64 Val3 = PropArray(IBeta, min(Material::MaxProfAngs, IAlpha + 1)); + Real64 Val4 = PropArray(min(Material::MaxSlatAngs, IBeta + 1), min(Material::MaxProfAngs, IAlpha + 1)); Real64 ValA = Val1 + SlatAngRatio * (Val2 - Val1); // Property values at given SlatAngle to be interpolated in profile angle Real64 ValB = Val3 + SlatAngRatio * (Val4 - Val3); return ValA + ProfAngRatio * (ValB - ValA); } else { // Fixed-angle slats: interpolate only in profile angle Val1 = PropArray(1, IAlpha); - Val2 = PropArray(1, min(37, IAlpha + 1)); + Val2 = PropArray(1, min(Material::MaxProfAngs, IAlpha + 1)); return Val1 + ProfAngRatio * (Val2 - Val1); } } // InterpProfSlatAng() diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index cb1ea30e0f9..d321e8965c4 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -1178,6 +1178,7 @@ void fillZoneSizingFromInput(EnergyPlusData &state, zoneSizing.DOASControlStrategy = zoneSizingInput.DOASControlStrategy; zoneSizing.DOASLowSetpoint = zoneSizingInput.DOASLowSetpoint; zoneSizing.DOASHighSetpoint = zoneSizingInput.DOASHighSetpoint; + zoneSizing.spaceConcurrence = zoneSizingInput.spaceConcurrence; zoneSizing.zoneSizingMethod = zoneSizingInput.zoneSizingMethod; zoneSizing.zoneLatentSizing = zoneSizingInput.zoneLatentSizing; zoneSizing.zoneRHDehumidifySetPoint = zoneSizingInput.zoneRHDehumidifySetPoint; @@ -1210,6 +1211,7 @@ void fillZoneSizingFromInput(EnergyPlusData &state, calcZoneSizing.DOASControlStrategy = zoneSizingInput.DOASControlStrategy; calcZoneSizing.DOASLowSetpoint = zoneSizingInput.DOASLowSetpoint; calcZoneSizing.DOASHighSetpoint = zoneSizingInput.DOASHighSetpoint; + calcZoneSizing.spaceConcurrence = zoneSizingInput.spaceConcurrence; calcZoneSizing.zoneSizingMethod = zoneSizingInput.zoneSizingMethod; calcZoneSizing.zoneLatentSizing = zoneSizingInput.zoneLatentSizing; calcZoneSizing.zoneRHDehumidifySetPoint = zoneSizingInput.zoneRHDehumidifySetPoint; @@ -1262,6 +1264,7 @@ void fillZoneSizingFromInput(EnergyPlusData &state, zsFinalSizing.ZoneADEffHeating = zoneSizingInput.ZoneADEffHeating; zsFinalSizing.ZoneSecondaryRecirculation = zoneSizingInput.ZoneSecondaryRecirculation; zsFinalSizing.ZoneVentilationEff = zoneSizingInput.ZoneVentilationEff; + zsFinalSizing.spaceConcurrence = zoneSizingInput.spaceConcurrence; zsFinalSizing.zoneSizingMethod = zoneSizingInput.zoneSizingMethod; zsFinalSizing.zoneLatentSizing = zoneSizingInput.zoneLatentSizing; zsFinalSizing.zoneRHDehumidifySetPoint = zoneSizingInput.zoneRHDehumidifySetPoint; @@ -1302,6 +1305,7 @@ void fillZoneSizingFromInput(EnergyPlusData &state, zsCalcFinalSizing.DOASHighSetpoint = zoneSizingInput.DOASHighSetpoint; zsCalcFinalSizing.ZoneADEffCooling = zoneSizingInput.ZoneADEffCooling; zsCalcFinalSizing.ZoneADEffHeating = zoneSizingInput.ZoneADEffHeating; + zsCalcFinalSizing.spaceConcurrence = zoneSizingInput.spaceConcurrence; zsCalcFinalSizing.zoneSizingMethod = zoneSizingInput.zoneSizingMethod; zsCalcFinalSizing.zoneLatentSizing = zoneSizingInput.zoneLatentSizing; zsCalcFinalSizing.zoneRHDehumidifySetPoint = zoneSizingInput.zoneRHDehumidifySetPoint; @@ -1860,7 +1864,351 @@ void updateZoneSizingEndDay(DataSizing::ZoneSizingData &zsCalcSizing, } } -void updateZoneSizingEndZoneSizingCalc1(EnergyPlusData &state, DataSizing::ZoneSizingData const &zsCalcSizing) +void updateZoneSizingEndZoneSizingCalc1(EnergyPlusData &state, int const zoneNum) +{ + // Set or override finalzonesizing data for non-coincident sizing + auto &zoneCFS = state.dataSize->CalcFinalZoneSizing(zoneNum); + if (zoneCFS.spaceConcurrence == DataSizing::SizingConcurrence::Coincident) return; + // Zero out simple sums + zoneCFS.DesHeatVolFlow = 0.0; + zoneCFS.DesHeatLoad = 0.0; + zoneCFS.DesHeatMassFlow = 0.0; + zoneCFS.DesHeatLoadNoDOAS = 0.0; + zoneCFS.DesCoolVolFlow = 0.0; + zoneCFS.DesCoolLoad = 0.0; + zoneCFS.DesCoolMassFlow = 0.0; + zoneCFS.DesCoolLoadNoDOAS = 0.0; + + // Zero out weighted averages + zoneCFS.DesHeatDens = 0.0; + zoneCFS.ZoneTempAtHeatPeak = 0.0; + zoneCFS.OutTempAtHeatPeak = 0.0; + zoneCFS.ZoneRetTempAtHeatPeak = 0.0; + zoneCFS.ZoneHumRatAtHeatPeak = 0.0; + zoneCFS.OutHumRatAtHeatPeak = 0.0; + zoneCFS.DesHeatCoilInTemp = 0.0; + zoneCFS.DesHeatCoilInHumRat = 0.0; + zoneCFS.DesCoolDens = 0.0; + zoneCFS.ZoneTempAtCoolPeak = 0.0; + zoneCFS.OutTempAtCoolPeak = 0.0; + zoneCFS.ZoneRetTempAtCoolPeak = 0.0; + zoneCFS.ZoneHumRatAtCoolPeak = 0.0; + zoneCFS.OutHumRatAtCoolPeak = 0.0; + zoneCFS.DesCoolCoilInTemp = 0.0; + zoneCFS.DesCoolCoilInHumRat = 0.0; + + // Zero out time-series sums and averages + for (int ts = 1; ts <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++ts) { + zoneCFS.HeatFlowSeq(ts) = 0.0; + zoneCFS.HeatLoadSeq(ts) = 0.0; + zoneCFS.HeatZoneTempSeq(ts) = 0.0; + zoneCFS.HeatOutTempSeq(ts) = 0.0; + zoneCFS.HeatZoneRetTempSeq(ts) = 0.0; + zoneCFS.HeatZoneHumRatSeq(ts) = 0.0; + zoneCFS.HeatOutHumRatSeq(ts) = 0.0; + zoneCFS.HeatLoadNoDOASSeq(ts) = 0.0; + zoneCFS.CoolFlowSeq(ts) = 0.0; + zoneCFS.CoolLoadSeq(ts) = 0.0; + zoneCFS.CoolZoneTempSeq(ts) = 0.0; + zoneCFS.CoolOutTempSeq(ts) = 0.0; + zoneCFS.CoolZoneRetTempSeq(ts) = 0.0; + zoneCFS.CoolZoneHumRatSeq(ts) = 0.0; + zoneCFS.CoolOutHumRatSeq(ts) = 0.0; + zoneCFS.CoolLoadNoDOASSeq(ts) = 0.0; + } + + if (zoneCFS.zoneLatentSizing) { + // Zero out latent simple sums + zoneCFS.DesLatentHeatVolFlow = 0.0; + zoneCFS.DesLatentHeatMassFlow = 0.0; + zoneCFS.DesLatentHeatLoad = 0.0; + zoneCFS.DesLatentHeatLoadNoDOAS = 0.0; + zoneCFS.DesLatentCoolVolFlow = 0.0; + zoneCFS.DesLatentCoolMassFlow = 0.0; + zoneCFS.DesLatentCoolLoad = 0.0; + zoneCFS.DesLatentCoolLoadNoDOAS = 0.0; + + // Zero out latent weighted averages + zoneCFS.ZoneTempAtLatentHeatPeak = 0.0; + zoneCFS.ZoneHumRatAtLatentHeatPeak = 0.0; + zoneCFS.ZoneRetTempAtLatentHeatPeak = 0.0; + zoneCFS.DesLatentHeatCoilInTemp = 0.0; + zoneCFS.DesLatentHeatCoilInHumRat = 0.0; + zoneCFS.ZoneTempAtLatentCoolPeak = 0.0; + zoneCFS.ZoneHumRatAtLatentCoolPeak = 0.0; + zoneCFS.ZoneRetTempAtLatentCoolPeak = 0.0; + zoneCFS.DesLatentCoolCoilInTemp = 0.0; + zoneCFS.DesLatentCoolCoilInHumRat = 0.0; + + // Zero out latent time-series sums + for (int ts = 1; ts <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++ts) { + zoneCFS.LatentHeatLoadSeq(ts) = 0.0; + zoneCFS.LatentHeatFlowSeq(ts) = 0.0; + zoneCFS.HeatLatentLoadNoDOASSeq(ts) = 0.0; + zoneCFS.LatentCoolLoadSeq(ts) = 0.0; + zoneCFS.LatentCoolFlowSeq(ts) = 0.0; + zoneCFS.CoolLatentLoadNoDOASSeq(ts) = 0.0; + } + } + + // Other - Initialize to first space values (clear later if not all the same) + int firstSpace = state.dataHeatBal->Zone(zoneNum).spaceIndexes[0]; + auto &firstSpaceCFS = state.dataSize->CalcFinalSpaceSizing(firstSpace); + zoneCFS.HeatDesDay = firstSpaceCFS.HeatDesDay; + zoneCFS.HeatDDNum = firstSpaceCFS.HeatDDNum; + zoneCFS.cHeatDDDate = firstSpaceCFS.cHeatDDDate; + zoneCFS.TimeStepNumAtHeatMax = firstSpaceCFS.TimeStepNumAtHeatMax; + zoneCFS.HeatNoDOASDDNum = firstSpaceCFS.HeatNoDOASDDNum; + zoneCFS.HeatNoDOASDesDay = firstSpaceCFS.HeatNoDOASDesDay; + zoneCFS.TimeStepNumAtHeatNoDOASMax = firstSpaceCFS.TimeStepNumAtHeatNoDOASMax; + zoneCFS.CoolDesDay = firstSpaceCFS.CoolDesDay; + zoneCFS.CoolDDNum = firstSpaceCFS.CoolDDNum; + zoneCFS.cCoolDDDate = firstSpaceCFS.cCoolDDDate; + zoneCFS.TimeStepNumAtCoolMax = firstSpaceCFS.TimeStepNumAtCoolMax; + if (zoneCFS.zoneLatentSizing) { + zoneCFS.LatHeatDesDay = firstSpaceCFS.LatHeatDesDay; + zoneCFS.cLatentHeatDDDate = firstSpaceCFS.cLatentHeatDDDate; + zoneCFS.LatentHeatDDNum = firstSpaceCFS.LatentHeatDDNum; + zoneCFS.TimeStepNumAtLatentHeatMax = firstSpaceCFS.TimeStepNumAtLatentHeatMax; + zoneCFS.LatentHeatNoDOASDDNum = firstSpaceCFS.LatentHeatNoDOASDDNum; + zoneCFS.LatHeatNoDOASDesDay = firstSpaceCFS.LatHeatNoDOASDesDay; + zoneCFS.TimeStepNumAtLatentHeatNoDOASMax = firstSpaceCFS.TimeStepNumAtLatentHeatNoDOASMax; + zoneCFS.LatCoolDesDay = firstSpaceCFS.LatCoolDesDay; + zoneCFS.cLatentCoolDDDate = firstSpaceCFS.cLatentCoolDDDate; + zoneCFS.LatentCoolDDNum = firstSpaceCFS.LatentCoolDDNum; + zoneCFS.TimeStepNumAtLatentCoolMax = firstSpaceCFS.TimeStepNumAtLatentCoolMax; + zoneCFS.CoolNoDOASDDNum = firstSpaceCFS.CoolNoDOASDDNum; + zoneCFS.CoolNoDOASDesDay = firstSpaceCFS.CoolNoDOASDesDay; + zoneCFS.TimeStepNumAtCoolNoDOASMax = firstSpaceCFS.TimeStepNumAtCoolNoDOASMax; + zoneCFS.LatentCoolNoDOASDDNum = firstSpaceCFS.LatentCoolNoDOASDDNum; + zoneCFS.LatCoolNoDOASDesDay = firstSpaceCFS.LatCoolNoDOASDesDay; + zoneCFS.TimeStepNumAtLatentCoolNoDOASMax = firstSpaceCFS.TimeStepNumAtLatentCoolNoDOASMax; + } + + int numSpaces = 0; // Track this for averages later + bool heatDDNumAllSame = true; + bool coolDDNumAllSame = true; + int priorHeatDDNum = 0; + int priorCoolDDNum = 0; + for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) { + auto &spaceCFS = state.dataSize->CalcFinalSpaceSizing(spaceNum); + ++numSpaces; + + // Simple sums + zoneCFS.DesHeatVolFlow += spaceCFS.DesHeatVolFlow; + zoneCFS.DesHeatLoad += spaceCFS.DesHeatLoad; + zoneCFS.DesHeatMassFlow += spaceCFS.DesHeatMassFlow; + zoneCFS.DesHeatLoadNoDOAS += spaceCFS.DesHeatLoadNoDOAS; + zoneCFS.DesCoolVolFlow += spaceCFS.DesCoolVolFlow; + zoneCFS.DesCoolLoad += spaceCFS.DesCoolLoad; + zoneCFS.DesCoolMassFlow += spaceCFS.DesCoolMassFlow; + zoneCFS.DesCoolLoadNoDOAS += spaceCFS.DesCoolLoadNoDOAS; + + // Weighted averages + zoneCFS.DesHeatDens += spaceCFS.DesHeatDens * spaceCFS.DesHeatMassFlow; + zoneCFS.ZoneTempAtHeatPeak += spaceCFS.ZoneTempAtHeatPeak * spaceCFS.DesHeatMassFlow; + zoneCFS.OutTempAtHeatPeak += spaceCFS.OutTempAtHeatPeak * spaceCFS.DesHeatMassFlow; + zoneCFS.ZoneRetTempAtHeatPeak += spaceCFS.ZoneRetTempAtHeatPeak * spaceCFS.DesHeatMassFlow; + zoneCFS.ZoneHumRatAtHeatPeak += spaceCFS.ZoneHumRatAtHeatPeak * spaceCFS.DesHeatMassFlow; + zoneCFS.OutHumRatAtHeatPeak += spaceCFS.OutHumRatAtHeatPeak * spaceCFS.DesHeatMassFlow; + zoneCFS.DesHeatCoilInTemp += spaceCFS.DesHeatCoilInTemp * spaceCFS.DesHeatMassFlow; + zoneCFS.DesHeatCoilInHumRat += spaceCFS.DesHeatCoilInHumRat * spaceCFS.DesHeatMassFlow; + zoneCFS.DesCoolDens += spaceCFS.DesCoolDens * spaceCFS.DesCoolMassFlow; + zoneCFS.ZoneTempAtCoolPeak += spaceCFS.ZoneTempAtCoolPeak * spaceCFS.DesCoolMassFlow; + zoneCFS.OutTempAtCoolPeak += spaceCFS.OutTempAtCoolPeak * spaceCFS.DesCoolMassFlow; + zoneCFS.ZoneRetTempAtCoolPeak += spaceCFS.ZoneRetTempAtCoolPeak * spaceCFS.DesCoolMassFlow; + zoneCFS.ZoneHumRatAtCoolPeak += spaceCFS.ZoneHumRatAtCoolPeak * spaceCFS.DesCoolMassFlow; + zoneCFS.OutHumRatAtCoolPeak += spaceCFS.OutHumRatAtCoolPeak * spaceCFS.DesCoolMassFlow; + zoneCFS.DesCoolCoilInTemp += spaceCFS.DesCoolCoilInTemp * spaceCFS.DesCoolMassFlow; + zoneCFS.DesCoolCoilInHumRat += spaceCFS.DesCoolCoilInHumRat * spaceCFS.DesCoolMassFlow; + + for (int ts = 1; ts <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++ts) { + // Time-series sums + zoneCFS.HeatFlowSeq(ts) += spaceCFS.HeatFlowSeq(ts); + zoneCFS.HeatLoadSeq(ts) += spaceCFS.HeatLoadSeq(ts); + zoneCFS.HeatLoadNoDOASSeq(ts) += spaceCFS.HeatLoadNoDOASSeq(ts); + zoneCFS.CoolFlowSeq(ts) += spaceCFS.CoolFlowSeq(ts); + zoneCFS.CoolLoadSeq(ts) += spaceCFS.CoolLoadSeq(ts); + zoneCFS.CoolLoadNoDOASSeq(ts) += spaceCFS.CoolLoadNoDOASSeq(ts); + + // Time-series weighted averages + zoneCFS.HeatZoneTempSeq(ts) += spaceCFS.HeatZoneTempSeq(ts) * spaceCFS.HeatFlowSeq(ts); + zoneCFS.HeatOutTempSeq(ts) += spaceCFS.HeatOutTempSeq(ts) * spaceCFS.HeatFlowSeq(ts); + zoneCFS.HeatZoneRetTempSeq(ts) += spaceCFS.HeatZoneRetTempSeq(ts) * spaceCFS.HeatFlowSeq(ts); + zoneCFS.HeatZoneHumRatSeq(ts) += spaceCFS.HeatZoneHumRatSeq(ts) * spaceCFS.HeatFlowSeq(ts); + zoneCFS.HeatOutHumRatSeq(ts) += spaceCFS.HeatOutHumRatSeq(ts) * spaceCFS.HeatFlowSeq(ts); + zoneCFS.CoolZoneTempSeq(ts) += spaceCFS.CoolZoneTempSeq(ts) * spaceCFS.CoolFlowSeq(ts); + zoneCFS.CoolOutTempSeq(ts) += spaceCFS.CoolOutTempSeq(ts) * spaceCFS.CoolFlowSeq(ts); + zoneCFS.CoolZoneRetTempSeq(ts) += spaceCFS.CoolZoneRetTempSeq(ts) * spaceCFS.CoolFlowSeq(ts); + zoneCFS.CoolZoneHumRatSeq(ts) += spaceCFS.CoolZoneHumRatSeq(ts) * spaceCFS.CoolFlowSeq(ts); + zoneCFS.CoolOutHumRatSeq(ts) += spaceCFS.CoolOutHumRatSeq(ts) * spaceCFS.CoolFlowSeq(ts); + } + + // Other + if ((zoneCFS.HeatDDNum != 0) && (zoneCFS.HeatDDNum != spaceCFS.HeatDDNum)) { + zoneCFS.HeatDesDay = "n/a"; + zoneCFS.HeatDDNum = 0; + zoneCFS.cHeatDDDate = ""; + } + if ((zoneCFS.HeatNoDOASDDNum != 0) && (zoneCFS.HeatNoDOASDDNum != spaceCFS.HeatNoDOASDDNum)) { + zoneCFS.HeatNoDOASDDNum = 0; + zoneCFS.HeatNoDOASDesDay = "n/a"; + } + if ((zoneCFS.CoolDDNum != 0) && (zoneCFS.CoolDDNum != spaceCFS.CoolDDNum)) { + zoneCFS.CoolDesDay = "n/a"; + zoneCFS.CoolDDNum = 0; + zoneCFS.cCoolDDDate = ""; + } + if ((zoneCFS.CoolNoDOASDDNum != 0) && (zoneCFS.CoolNoDOASDDNum != spaceCFS.CoolNoDOASDDNum)) { + zoneCFS.CoolNoDOASDDNum = 0; + zoneCFS.CoolNoDOASDesDay = "n/a"; + } + + if (zoneCFS.zoneLatentSizing) { + // Simple sums + zoneCFS.DesLatentHeatVolFlow += spaceCFS.DesLatentHeatVolFlow; + zoneCFS.DesLatentHeatMassFlow += spaceCFS.ZoneHeatLatentMassFlow; + zoneCFS.DesLatentHeatLoad += spaceCFS.DesLatentHeatLoad; + zoneCFS.DesLatentHeatLoadNoDOAS += spaceCFS.DesLatentHeatLoadNoDOAS; + zoneCFS.DesLatentCoolVolFlow += spaceCFS.DesLatentCoolVolFlow; + zoneCFS.DesLatentCoolMassFlow += spaceCFS.DesLatentCoolMassFlow; + zoneCFS.DesLatentCoolLoad += spaceCFS.DesLatentCoolLoad; + zoneCFS.DesLatentCoolLoadNoDOAS += spaceCFS.DesLatentCoolLoadNoDOAS; + + // Weighted averages + zoneCFS.ZoneTempAtLatentHeatPeak += spaceCFS.ZoneTempAtLatentHeatPeak * spaceCFS.ZoneHeatLatentMassFlow; + zoneCFS.ZoneHumRatAtLatentHeatPeak += spaceCFS.ZoneHumRatAtLatentHeatPeak * spaceCFS.ZoneHeatLatentMassFlow; + zoneCFS.ZoneRetTempAtLatentHeatPeak += spaceCFS.ZoneRetTempAtLatentHeatPeak * spaceCFS.ZoneHeatLatentMassFlow; + zoneCFS.DesLatentHeatCoilInTemp += spaceCFS.DesLatentHeatCoilInTemp * spaceCFS.ZoneHeatLatentMassFlow; + zoneCFS.DesLatentHeatCoilInHumRat += spaceCFS.DesLatentHeatCoilInHumRat * spaceCFS.ZoneHeatLatentMassFlow; + zoneCFS.ZoneTempAtLatentCoolPeak += spaceCFS.ZoneTempAtLatentCoolPeak * spaceCFS.DesLatentCoolVolFlow; + zoneCFS.ZoneHumRatAtLatentCoolPeak += spaceCFS.ZoneHumRatAtLatentCoolPeak * spaceCFS.DesLatentCoolVolFlow; + zoneCFS.ZoneRetTempAtLatentCoolPeak += spaceCFS.ZoneRetTempAtLatentCoolPeak * spaceCFS.DesLatentCoolVolFlow; + zoneCFS.DesLatentCoolCoilInTemp += spaceCFS.DesLatentCoolCoilInTemp * spaceCFS.DesLatentCoolVolFlow; + zoneCFS.DesLatentCoolCoilInHumRat += spaceCFS.DesLatentCoolCoilInHumRat * spaceCFS.DesLatentCoolVolFlow; + + // Other + if ((zoneCFS.LatentHeatDDNum != 0) && (zoneCFS.LatentHeatDDNum != spaceCFS.LatentHeatDDNum)) { + zoneCFS.LatHeatDesDay = "n/a"; + zoneCFS.cLatentHeatDDDate = ""; + zoneCFS.LatentHeatDDNum = 0; + } + if ((zoneCFS.LatentHeatNoDOASDDNum != 0) && (zoneCFS.LatentHeatNoDOASDDNum != spaceCFS.LatentHeatNoDOASDDNum)) { + zoneCFS.LatentHeatNoDOASDDNum = 0; + zoneCFS.LatHeatNoDOASDesDay = "n/a"; + } + if ((zoneCFS.LatentCoolDDNum != 0) && (zoneCFS.LatentCoolDDNum != spaceCFS.LatentCoolDDNum)) { + zoneCFS.LatCoolDesDay = "n/a"; + zoneCFS.cLatentCoolDDDate = ""; + zoneCFS.LatentCoolDDNum = 0; + } + if ((zoneCFS.LatentCoolNoDOASDDNum != 0) && (zoneCFS.LatentCoolNoDOASDDNum != spaceCFS.LatentCoolNoDOASDDNum)) { + zoneCFS.LatentCoolNoDOASDDNum = 0; + zoneCFS.LatCoolNoDOASDesDay = "n/a"; + } + + // Time-series sums + for (int ts = 1; ts <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++ts) { + zoneCFS.LatentHeatLoadSeq(ts) += spaceCFS.LatentHeatLoadSeq(ts); + zoneCFS.LatentHeatFlowSeq(ts) += spaceCFS.LatentHeatFlowSeq(ts); + zoneCFS.HeatLatentLoadNoDOASSeq(ts) += spaceCFS.HeatLatentLoadNoDOASSeq(ts); + zoneCFS.LatentCoolLoadSeq(ts) += spaceCFS.LatentCoolLoadSeq(ts); + zoneCFS.LatentCoolFlowSeq(ts) += spaceCFS.LatentCoolFlowSeq(ts); + zoneCFS.CoolLatentLoadNoDOASSeq(ts) += spaceCFS.CoolLatentLoadNoDOASSeq(ts); + } + } + } + + // Compute weighted averages + if (zoneCFS.DesHeatMassFlow > 0) { + zoneCFS.DesHeatDens /= zoneCFS.DesHeatMassFlow; + zoneCFS.ZoneTempAtHeatPeak /= zoneCFS.DesHeatMassFlow; + zoneCFS.OutTempAtHeatPeak /= zoneCFS.DesHeatMassFlow; + zoneCFS.ZoneRetTempAtHeatPeak /= zoneCFS.DesHeatMassFlow; + zoneCFS.ZoneHumRatAtHeatPeak /= zoneCFS.DesHeatMassFlow; + zoneCFS.OutHumRatAtHeatPeak /= zoneCFS.DesHeatMassFlow; + zoneCFS.DesHeatCoilInTemp /= zoneCFS.DesHeatMassFlow; + zoneCFS.DesHeatCoilInHumRat /= zoneCFS.DesHeatMassFlow; + } + if (zoneCFS.DesCoolMassFlow > 0) { + zoneCFS.DesCoolDens /= zoneCFS.DesCoolMassFlow; + zoneCFS.ZoneTempAtCoolPeak /= zoneCFS.DesCoolMassFlow; + zoneCFS.OutTempAtCoolPeak /= zoneCFS.DesCoolMassFlow; + zoneCFS.ZoneRetTempAtCoolPeak /= zoneCFS.DesCoolMassFlow; + zoneCFS.ZoneHumRatAtCoolPeak /= zoneCFS.DesCoolMassFlow; + zoneCFS.OutHumRatAtCoolPeak /= zoneCFS.DesCoolMassFlow; + zoneCFS.DesCoolCoilInTemp /= zoneCFS.DesCoolMassFlow; + zoneCFS.DesCoolCoilInHumRat /= zoneCFS.DesCoolMassFlow; + } + // Timestep at max + zoneCFS.TimeStepNumAtHeatMax = 0; + zoneCFS.TimeStepNumAtHeatNoDOASMax = 0; + zoneCFS.TimeStepNumAtCoolMax = 0; + zoneCFS.TimeStepNumAtHeatNoDOASMax = 0; + Real64 maxHeatLoad = 0.0; + Real64 maxHeatLoadNoDOAS = 0.0; + Real64 maxCoolLoad = 0.0; + Real64 maxCoolLoadNoDOAS = 0.0; + for (int ts = 1; ts <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++ts) { + Real64 tsHeatFlow = zoneCFS.HeatFlowSeq(ts); + if (tsHeatFlow > 0) { + zoneCFS.HeatZoneTempSeq(ts) /= tsHeatFlow; + zoneCFS.HeatOutTempSeq(ts) /= tsHeatFlow; + zoneCFS.HeatZoneRetTempSeq(ts) /= tsHeatFlow; + zoneCFS.HeatZoneHumRatSeq(ts) /= tsHeatFlow; + zoneCFS.HeatOutHumRatSeq(ts) /= tsHeatFlow; + } + if (zoneCFS.HeatLoadSeq(ts) > maxHeatLoad) zoneCFS.TimeStepNumAtHeatMax = ts; + if (zoneCFS.HeatLoadNoDOASSeq(ts) > maxHeatLoadNoDOAS) zoneCFS.TimeStepNumAtHeatNoDOASMax = ts; + + Real64 tsCoolFlow = zoneCFS.CoolFlowSeq(ts); + if (tsCoolFlow > 0) { + zoneCFS.CoolZoneTempSeq(ts) /= tsCoolFlow; + zoneCFS.CoolOutTempSeq(ts) /= tsCoolFlow; + zoneCFS.CoolZoneRetTempSeq(ts) /= tsCoolFlow; + zoneCFS.CoolZoneHumRatSeq(ts) /= tsCoolFlow; + zoneCFS.CoolOutHumRatSeq(ts) /= tsCoolFlow; + } + if (zoneCFS.CoolLoadSeq(ts) > maxCoolLoad) zoneCFS.TimeStepNumAtCoolMax = ts; + if (zoneCFS.CoolLoadNoDOASSeq(ts) > maxCoolLoadNoDOAS) zoneCFS.TimeStepNumAtCoolNoDOASMax = ts; + } + + if (zoneCFS.zoneLatentSizing) { + if (zoneCFS.DesLatentHeatMassFlow > 0) { + zoneCFS.ZoneTempAtLatentHeatPeak /= zoneCFS.DesLatentHeatMassFlow; + zoneCFS.ZoneHumRatAtLatentHeatPeak /= zoneCFS.DesLatentHeatMassFlow; + zoneCFS.ZoneRetTempAtLatentHeatPeak /= zoneCFS.DesLatentHeatMassFlow; + zoneCFS.DesLatentHeatCoilInTemp /= zoneCFS.DesLatentHeatMassFlow; + zoneCFS.DesLatentHeatCoilInHumRat /= zoneCFS.DesLatentHeatMassFlow; + } + if (zoneCFS.DesLatentCoolMassFlow > 0) { + zoneCFS.ZoneTempAtLatentCoolPeak /= zoneCFS.DesLatentCoolMassFlow; + zoneCFS.ZoneHumRatAtLatentCoolPeak /= zoneCFS.DesLatentCoolMassFlow; + zoneCFS.ZoneRetTempAtLatentCoolPeak /= zoneCFS.DesLatentCoolMassFlow; + zoneCFS.DesLatentCoolCoilInTemp /= zoneCFS.DesLatentCoolMassFlow; + zoneCFS.DesLatentCoolCoilInHumRat /= zoneCFS.DesLatentCoolMassFlow; + } + // Timestep at max + zoneCFS.TimeStepNumAtLatentHeatMax = 0; + zoneCFS.TimeStepNumAtLatentHeatNoDOASMax = 0; + zoneCFS.TimeStepNumAtLatentCoolMax = 0; + zoneCFS.TimeStepNumAtLatentCoolNoDOASMax = 0; + Real64 maxLatHeatLoad = 0.0; + Real64 maxLatHeatLoadNoDOAS = 0.0; + Real64 maxLatCoolLoad = 0.0; + Real64 maxLatCoolLoadNoDOAS = 0.0; + for (int ts = 1; ts <= state.dataZoneEquipmentManager->NumOfTimeStepInDay; ++ts) { + if (zoneCFS.LatentHeatFlowSeq(ts) > maxLatHeatLoad) zoneCFS.TimeStepNumAtLatentHeatMax = ts; + if (zoneCFS.HeatLatentLoadNoDOASSeq(ts) > maxLatHeatLoadNoDOAS) zoneCFS.TimeStepNumAtLatentHeatNoDOASMax = ts; + if (zoneCFS.LatentCoolLoadSeq(ts) > maxLatCoolLoad) zoneCFS.TimeStepNumAtLatentCoolMax = ts; + if (zoneCFS.CoolLatentLoadNoDOASSeq(ts) > maxLatCoolLoadNoDOAS) zoneCFS.TimeStepNumAtLatentCoolNoDOASMax = ts; + } + } + + return; +} + +void updateZoneSizingEndZoneSizingCalc2(EnergyPlusData &state, DataSizing::ZoneSizingData &zsCalcSizing) { if (std::abs(zsCalcSizing.DesCoolLoad) <= 1.e-8) { ShowWarningError(state, format("Calculated design cooling load for zone={} is zero.", zsCalcSizing.ZoneName)); @@ -1956,23 +2304,258 @@ void updateZoneSizingEndZoneSizingCalc1(EnergyPlusData &state, DataSizing::ZoneS "flow calculations"); } } + zsCalcSizing.HeatPeakDateHrMin = zsCalcSizing.cHeatDDDate + ' ' + sizingPeakTimeStamp(state, zsCalcSizing.TimeStepNumAtHeatMax); + + zsCalcSizing.CoolPeakDateHrMin = zsCalcSizing.cCoolDDDate + ' ' + sizingPeakTimeStamp(state, zsCalcSizing.TimeStepNumAtCoolMax); + + zsCalcSizing.LatHeatPeakDateHrMin = zsCalcSizing.cLatentHeatDDDate + ' ' + sizingPeakTimeStamp(state, zsCalcSizing.TimeStepNumAtLatentHeatMax); + + zsCalcSizing.LatCoolPeakDateHrMin = zsCalcSizing.cLatentCoolDDDate + ' ' + sizingPeakTimeStamp(state, zsCalcSizing.TimeStepNumAtLatentCoolMax); } -void updateZoneSizingEndZoneSizingCalc2(DataSizing::ZoneSizingData &zsCalcSizing, int const timeStepIndex, int const hourPrint, int const minutes) +std::string sizingPeakTimeStamp(EnergyPlusData &state, int timeStepIndex) { - // SpaceSizing TODO: There's gotta be a better place to set these timestamps - if (timeStepIndex == zsCalcSizing.TimeStepNumAtHeatMax) { - zsCalcSizing.HeatPeakDateHrMin = zsCalcSizing.cHeatDDDate + ' ' + format(PeakHrMinFmt, hourPrint, minutes); - } - if (timeStepIndex == zsCalcSizing.TimeStepNumAtCoolMax) { - zsCalcSizing.CoolPeakDateHrMin = zsCalcSizing.cCoolDDDate + ' ' + format(PeakHrMinFmt, hourPrint, minutes); - } - if (timeStepIndex == zsCalcSizing.TimeStepNumAtLatentHeatMax) { - zsCalcSizing.LatHeatPeakDateHrMin = zsCalcSizing.cLatentHeatDDDate + ' ' + format(PeakHrMinFmt, hourPrint, minutes); - } - if (timeStepIndex == zsCalcSizing.TimeStepNumAtLatentCoolMax) { - zsCalcSizing.LatCoolPeakDateHrMin = zsCalcSizing.cLatentCoolDDDate + ' ' + format(PeakHrMinFmt, hourPrint, minutes); - } + int constexpr minToSec = 60; + int hour = 0; + int minute = 0; + Real64 second = 0; + + Real64 timeInSeconds = timeStepIndex * state.dataGlobal->MinutesPerTimeStep * minToSec; + General::ParseTime(timeInSeconds, hour, minute, second); + return format(PeakHrMinFmt, hour, minute); +} + +void writeZszSpsz(EnergyPlusData &state, + EnergyPlus::InputOutputFile &outputFile, + int const numSpacesOrZones, + Array1D const zsEquipConfig, + EPVector const &zsCalcFinalSizing, + Array2D const &zsCalcSizing) +{ + char const colSep = state.dataSize->SizingFileColSep; + print(outputFile, "Time"); + for (int i = 1; i <= numSpacesOrZones; ++i) { + if (!zsEquipConfig(i).IsControlled) continue; + auto &thisCalcFS = zsCalcFinalSizing(i); + + static constexpr std::string_view ZSizeFmt11("{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{" + "}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}"); + print(outputFile, + ZSizeFmt11, + colSep, + thisCalcFS.ZoneName, + thisCalcFS.HeatDesDay, + ":Des Heat Load [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.CoolDesDay, + ":Des Sens Cool Load [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.HeatDesDay, + ":Des Heat Mass Flow [kg/s]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.CoolDesDay, + ":Des Cool Mass Flow [kg/s]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.LatHeatDesDay, + ":Des Latent Heat Load [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.LatCoolDesDay, + ":Des Latent Cool Load [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.LatHeatDesDay, + ":Des Latent Heat Mass Flow [kg/s]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.LatCoolDesDay, + ":Des Latent Cool Mass Flow [kg/s]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.HeatNoDOASDesDay, + ":Des Heat Load No DOAS [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.CoolNoDOASDesDay, + ":Des Sens Cool Load No DOAS [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.LatHeatNoDOASDesDay, + ":Des Latent Heat Load No DOAS [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.LatCoolNoDOASDesDay, + ":Des Latent Cool Load No DOAS [W]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.HeatDesDay, + ":Heating Zone Temperature [C]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.HeatDesDay, + ":Heating Zone Relative Humidity [%]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.CoolDesDay, + ":Cooling Zone Temperature [C]", + colSep, + thisCalcFS.ZoneName, + thisCalcFS.CoolDesDay, + ":Cooling Zone Relative Humidity [%]"); + } + print(outputFile, "\n"); + // HourFrac = 0.0 + int Minutes = 0; + int TimeStepIndex = 0; + for (int HourCounter = 1; HourCounter <= 24; ++HourCounter) { + for (int TimeStepCounter = 1; TimeStepCounter <= state.dataGlobal->NumOfTimeStepInHour; ++TimeStepCounter) { + ++TimeStepIndex; + Minutes += state.dataGlobal->MinutesPerTimeStep; + int HourPrint = HourCounter - 1; + if (Minutes == 60) { + Minutes = 0; + HourPrint = HourCounter; + } + static constexpr std::string_view ZSizeFmt20("{:02}:{:02}:00"); + print(outputFile, ZSizeFmt20, HourPrint, Minutes); + for (int i = 1; i <= numSpacesOrZones; ++i) { + if (!zsEquipConfig(i).IsControlled) continue; + auto &thisCalcFS = zsCalcFinalSizing(i); + static constexpr std::string_view ZSizeFmt21("{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12." + "6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}"); + Real64 ZoneRHHeat = 0.0; + Real64 ZoneRHCool = 0.0; + Real64 ZoneTHeat = 0.0; + Real64 ZoneTCool = 0.0; + if (thisCalcFS.HeatDDNum > 0) { + ZoneTHeat = zsCalcSizing(thisCalcFS.HeatDDNum, i).HeatZoneTempSeq(TimeStepIndex); + ZoneRHHeat = Psychrometrics::PsyRhFnTdbWPb(state, + zsCalcSizing(thisCalcFS.HeatDDNum, i).HeatZoneTempSeq(TimeStepIndex), + zsCalcSizing(thisCalcFS.HeatDDNum, i).HeatZoneHumRatSeq(TimeStepIndex), + state.dataEnvrn->OutBaroPress) * + 100.0; + } + if (thisCalcFS.CoolDDNum > 0) { + ZoneTCool = zsCalcSizing(thisCalcFS.CoolDDNum, i).CoolZoneTempSeq(TimeStepIndex); + ZoneRHCool = Psychrometrics::PsyRhFnTdbWPb(state, + zsCalcSizing(thisCalcFS.CoolDDNum, i).CoolZoneTempSeq(TimeStepIndex), + zsCalcSizing(thisCalcFS.CoolDDNum, i).CoolZoneHumRatSeq(TimeStepIndex), + state.dataEnvrn->OutBaroPress) * + 100.0; + } + print(outputFile, + ZSizeFmt21, + colSep, + thisCalcFS.HeatLoadSeq(TimeStepIndex), + colSep, + thisCalcFS.CoolLoadSeq(TimeStepIndex), + colSep, + thisCalcFS.HeatFlowSeq(TimeStepIndex), + colSep, + thisCalcFS.CoolFlowSeq(TimeStepIndex), + colSep, + thisCalcFS.LatentHeatLoadSeq(TimeStepIndex), + colSep, + thisCalcFS.LatentCoolLoadSeq(TimeStepIndex), + colSep, + thisCalcFS.LatentHeatFlowSeq(TimeStepIndex), + colSep, + thisCalcFS.LatentCoolFlowSeq(TimeStepIndex), + colSep, + thisCalcFS.HeatLoadNoDOASSeq(TimeStepIndex), + colSep, + thisCalcFS.CoolLoadNoDOASSeq(TimeStepIndex), + colSep, + thisCalcFS.HeatLatentLoadNoDOASSeq(TimeStepIndex), + colSep, + thisCalcFS.CoolLatentLoadNoDOASSeq(TimeStepIndex), + colSep, + ZoneTHeat, + colSep, + ZoneRHHeat, + colSep, + ZoneTCool, + colSep, + ZoneRHCool); + } + print(outputFile, "\n"); + } + } + print(outputFile, "Peak"); + + for (int i = 1; i <= numSpacesOrZones; ++i) { + if (!zsEquipConfig(i).IsControlled) continue; + auto &thisCalcFS = zsCalcFinalSizing(i); + + static constexpr std::string_view ZSizeFmt31("{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12." + "6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{}{}{}"); + print(outputFile, + ZSizeFmt31, + colSep, + thisCalcFS.DesHeatLoad, + colSep, + thisCalcFS.DesCoolLoad, + colSep, + thisCalcFS.DesHeatMassFlow, + colSep, + thisCalcFS.DesCoolMassFlow, + colSep, + thisCalcFS.DesLatentHeatLoad, + colSep, + thisCalcFS.DesLatentCoolLoad, + colSep, + thisCalcFS.DesLatentHeatMassFlow, + colSep, + thisCalcFS.DesLatentCoolMassFlow, + colSep, + thisCalcFS.DesHeatLoadNoDOAS, + colSep, + thisCalcFS.DesCoolLoadNoDOAS, + colSep, + thisCalcFS.DesLatentHeatLoadNoDOAS, + colSep, + thisCalcFS.DesLatentCoolLoadNoDOAS, + colSep, + colSep, + colSep, + colSep); + } + print(outputFile, "\n"); + + print(outputFile, "\nPeak Vol Flow (m3/s)"); + for (int i = 1; i <= numSpacesOrZones; ++i) { + if (!zsEquipConfig(i).IsControlled) continue; + auto &thisCalcFS = zsCalcFinalSizing(i); + static constexpr std::string_view ZSizeFmt41("{}{}{}{:12.6E}{}{:12.6E}{}{}{}{:12.6E}{}{:12.6E}{}{}{}{}{}{}{}{}"); + print(outputFile, + ZSizeFmt41, + colSep, + colSep, + colSep, + thisCalcFS.DesHeatVolFlow, + colSep, + thisCalcFS.DesCoolVolFlow, + colSep, + colSep, + colSep, + thisCalcFS.DesLatentHeatVolFlow, + colSep, + thisCalcFS.DesLatentCoolVolFlow, + colSep, + colSep, + colSep, + colSep, + colSep, + colSep, + colSep, + colSep); + } + print(outputFile, "\n"); + outputFile.close(); } void updateZoneSizingEndZoneSizingCalc3(DataSizing::ZoneSizingData &zsCalcFinalSizing, @@ -2096,6 +2679,7 @@ void updateZoneSizingEndZoneSizingCalc3(DataSizing::ZoneSizingData &zsCalcFinalS } void updateZoneSizingEndZoneSizingCalc4(DataSizing::ZoneSizingData &zsSizing, DataSizing::ZoneSizingData const &zsCalcSizing) { + // Move data from Calc arrays to user modified arrays zsSizing.CoolDesDay = zsCalcSizing.CoolDesDay; zsSizing.HeatDesDay = zsCalcSizing.HeatDesDay; zsSizing.DesHeatDens = zsCalcSizing.DesHeatDens; @@ -2131,6 +2715,7 @@ void updateZoneSizingEndZoneSizingCalc4(DataSizing::ZoneSizingData &zsSizing, Da void updateZoneSizingEndZoneSizingCalc5(DataSizing::ZoneSizingData &zsFinalSizing, DataSizing::ZoneSizingData const &zsCalcFinalSizing) { + // Move data from CalcFinal arrays to user modified final arrays // SpaceSizing TODO: This is essentially the same as updateZoneSizingEndZoneSizingCalc4, except there are two extra fields copied here zsFinalSizing.CoolDesDay = zsCalcFinalSizing.CoolDesDay; zsFinalSizing.HeatDesDay = zsCalcFinalSizing.HeatDesDay; @@ -2679,257 +3264,40 @@ void UpdateZoneSizing(EnergyPlusData &state, Constant::CallIndicator const CallI if (!state.dataGlobal->isPulseZoneSizing) { + // Apply non-coincident zone sizing - only if space sizing is active, and only if there is more than one space in the zone + if (state.dataHeatBal->doSpaceHeatBalanceSizing) { + for (int ctrlZoneNum = 1; ctrlZoneNum <= state.dataGlobal->NumOfZones; ++ctrlZoneNum) { + if (!state.dataZoneEquip->ZoneEquipConfig(ctrlZoneNum).IsControlled) continue; + if (state.dataHeatBal->Zone(ctrlZoneNum).numSpaces == 1) continue; + updateZoneSizingEndZoneSizingCalc1(state, ctrlZoneNum); + } + } + for (int CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) { if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue; - updateZoneSizingEndZoneSizingCalc1(state, state.dataSize->CalcFinalZoneSizing(CtrlZoneNum)); + updateZoneSizingEndZoneSizingCalc2(state, state.dataSize->CalcFinalZoneSizing(CtrlZoneNum)); if (state.dataHeatBal->doSpaceHeatBalanceSizing) { for (int spaceNum : state.dataHeatBal->Zone(CtrlZoneNum).spaceIndexes) { - updateZoneSizingEndZoneSizingCalc1(state, state.dataSize->CalcFinalSpaceSizing(spaceNum)); + updateZoneSizingEndZoneSizingCalc2(state, state.dataSize->CalcFinalSpaceSizing(spaceNum)); } } } - // SpaceSizing TODO: For now only write zone-level zsz - print(state.files.zsz, "Time"); - for (int I = 1; I <= state.dataGlobal->NumOfZones; ++I) { - if (!state.dataZoneEquip->ZoneEquipConfig(I).IsControlled) continue; - auto &calcFinalZoneSizing = state.dataSize->CalcFinalZoneSizing(I); - - static constexpr std::string_view ZSizeFmt11("{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{" - "}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}{}{}:{}{}"); - print(state.files.zsz, - ZSizeFmt11, - state.dataSize->SizingFileColSep, - state.dataSize->CalcFinalZoneSizing(I).ZoneName, - state.dataSize->CalcFinalZoneSizing(I).HeatDesDay, - ":Des Heat Load [W]", - state.dataSize->SizingFileColSep, - state.dataSize->CalcFinalZoneSizing(I).ZoneName, - state.dataSize->CalcFinalZoneSizing(I).CoolDesDay, - ":Des Sens Cool Load [W]", - state.dataSize->SizingFileColSep, - state.dataSize->CalcFinalZoneSizing(I).ZoneName, - state.dataSize->CalcFinalZoneSizing(I).HeatDesDay, - ":Des Heat Mass Flow [kg/s]", - state.dataSize->SizingFileColSep, - state.dataSize->CalcFinalZoneSizing(I).ZoneName, - state.dataSize->CalcFinalZoneSizing(I).CoolDesDay, - ":Des Cool Mass Flow [kg/s]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.LatHeatDesDay, - ":Des Latent Heat Load [W]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.LatCoolDesDay, - ":Des Latent Cool Load [W]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.LatHeatDesDay, - ":Des Latent Heat Mass Flow [kg/s]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.LatCoolDesDay, - ":Des Latent Cool Mass Flow [kg/s]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.HeatNoDOASDesDay, - ":Des Heat Load No DOAS [W]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.CoolNoDOASDesDay, - ":Des Sens Cool Load No DOAS [W]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.LatHeatNoDOASDesDay, - ":Des Latent Heat Load No DOAS [W]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.LatCoolNoDOASDesDay, - ":Des Latent Cool Load No DOAS [W]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.HeatDesDay, - ":Heating Zone Temperature [C]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.HeatDesDay, - ":Heating Zone Relative Humidity [%]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.CoolDesDay, - ":Cooling Zone Temperature [C]", - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.ZoneName, - calcFinalZoneSizing.CoolDesDay, - ":Cooling Zone Relative Humidity [%]"); - } - - print(state.files.zsz, "\n"); - // HourFrac = 0.0 - int Minutes = 0; - int TimeStepIndex = 0; - for (int HourCounter = 1; HourCounter <= 24; ++HourCounter) { - for (int TimeStepCounter = 1; TimeStepCounter <= state.dataGlobal->NumOfTimeStepInHour; ++TimeStepCounter) { - ++TimeStepIndex; - Minutes += state.dataGlobal->MinutesPerTimeStep; - int HourPrint = HourCounter - 1; - if (Minutes == 60) { - Minutes = 0; - HourPrint = HourCounter; - } - for (int CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) { - if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue; - updateZoneSizingEndZoneSizingCalc2(state.dataSize->CalcFinalZoneSizing(CtrlZoneNum), TimeStepIndex, HourPrint, Minutes); - if (state.dataHeatBal->doSpaceHeatBalanceSizing) { - for (int spaceNum : state.dataHeatBal->Zone(CtrlZoneNum).spaceIndexes) { - updateZoneSizingEndZoneSizingCalc2(state.dataSize->CalcFinalSpaceSizing(spaceNum), TimeStepIndex, HourPrint, Minutes); - } - } - } - - static constexpr std::string_view ZSizeFmt20("{:02}:{:02}:00"); - print(state.files.zsz, ZSizeFmt20, HourPrint, Minutes); - for (int I = 1; I <= state.dataGlobal->NumOfZones; ++I) { - if (!state.dataZoneEquip->ZoneEquipConfig(I).IsControlled) continue; - auto &calcFinalZoneSizing = state.dataSize->CalcFinalZoneSizing(I); - static constexpr std::string_view ZSizeFmt21( - "{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12." - "6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}"); - Real64 ZoneRHHeat = 0.0; - Real64 ZoneRHCool = 0.0; - Real64 ZoneTHeat = 0.0; - Real64 ZoneTCool = 0.0; - if (calcFinalZoneSizing.HeatDDNum > 0) { - ZoneTHeat = state.dataSize->CalcZoneSizing(calcFinalZoneSizing.HeatDDNum, I).HeatZoneTempSeq(TimeStepIndex); - ZoneRHHeat = Psychrometrics::PsyRhFnTdbWPb( - state, - state.dataSize->CalcZoneSizing(calcFinalZoneSizing.HeatDDNum, I).HeatZoneTempSeq(TimeStepIndex), - state.dataSize->CalcZoneSizing(calcFinalZoneSizing.HeatDDNum, I).HeatZoneHumRatSeq(TimeStepIndex), - state.dataEnvrn->OutBaroPress) * - 100.0; - } - if (calcFinalZoneSizing.CoolDDNum > 0) { - ZoneTCool = state.dataSize->CalcZoneSizing(calcFinalZoneSizing.CoolDDNum, I).CoolZoneTempSeq(TimeStepIndex); - ZoneRHCool = Psychrometrics::PsyRhFnTdbWPb( - state, - state.dataSize->CalcZoneSizing(calcFinalZoneSizing.CoolDDNum, I).CoolZoneTempSeq(TimeStepIndex), - state.dataSize->CalcZoneSizing(calcFinalZoneSizing.CoolDDNum, I).CoolZoneHumRatSeq(TimeStepIndex), - state.dataEnvrn->OutBaroPress) * - 100.0; - } - print(state.files.zsz, - ZSizeFmt21, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.HeatLoadSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.CoolLoadSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.HeatFlowSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.CoolFlowSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.LatentHeatLoadSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.LatentCoolLoadSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.LatentHeatFlowSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.LatentCoolFlowSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.HeatLoadNoDOASSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.CoolLoadNoDOASSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.HeatLatentLoadNoDOASSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.CoolLatentLoadNoDOASSeq(TimeStepIndex), - state.dataSize->SizingFileColSep, - ZoneTHeat, - state.dataSize->SizingFileColSep, - ZoneRHHeat, - state.dataSize->SizingFileColSep, - ZoneTCool, - state.dataSize->SizingFileColSep, - ZoneRHCool); - } - print(state.files.zsz, "\n"); - } + writeZszSpsz(state, + state.files.zsz, + state.dataGlobal->NumOfZones, + state.dataZoneEquip->ZoneEquipConfig, + state.dataSize->CalcFinalZoneSizing, + state.dataSize->CalcZoneSizing); + if (state.dataHeatBal->doSpaceHeatBalanceSizing) { + writeZszSpsz(state, + state.files.spsz, + state.dataGlobal->numSpaces, + state.dataZoneEquip->spaceEquipConfig, + state.dataSize->CalcFinalSpaceSizing, + state.dataSize->CalcSpaceSizing); } - print(state.files.zsz, "Peak"); - - for (int I = 1; I <= state.dataGlobal->NumOfZones; ++I) { - if (!state.dataZoneEquip->ZoneEquipConfig(I).IsControlled) continue; - auto &calcFinalZoneSizing = state.dataSize->CalcFinalZoneSizing(I); - - static constexpr std::string_view ZSizeFmt31("{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{:12." - "6E}{}{:12.6E}{}{:12.6E}{}{:12.6E}{}{}{}{}"); - print(state.files.zsz, - ZSizeFmt31, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesHeatLoad, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesCoolLoad, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesHeatMassFlow, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesCoolMassFlow, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentHeatLoad, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentCoolLoad, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentHeatMassFlow, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentCoolMassFlow, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesHeatLoadNoDOAS, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesCoolLoadNoDOAS, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentHeatLoadNoDOAS, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentCoolLoadNoDOAS, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep); - } - print(state.files.zsz, "\n"); - - print(state.files.zsz, "\nPeak Vol Flow (m3/s)"); - for (int I = 1; I <= state.dataGlobal->NumOfZones; ++I) { - if (!state.dataZoneEquip->ZoneEquipConfig(I).IsControlled) continue; - auto &calcFinalZoneSizing = state.dataSize->CalcFinalZoneSizing(I); - static constexpr std::string_view ZSizeFmt41("{}{}{}{:12.6E}{}{:12.6E}{}{}{}{:12.6E}{}{:12.6E}{}{}{}{}{}{}{}{}"); - print(state.files.zsz, - ZSizeFmt41, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesHeatVolFlow, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesCoolVolFlow, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentHeatVolFlow, - state.dataSize->SizingFileColSep, - calcFinalZoneSizing.DesLatentCoolVolFlow, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep, - state.dataSize->SizingFileColSep); - } - print(state.files.zsz, "\n"); - state.files.zsz.close(); - } - if (!state.dataGlobal->isPulseZoneSizing) { // Move sizing data into final sizing array according to sizing method for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) { if (!state.dataZoneEquip->ZoneEquipConfig(zoneNum).IsControlled) continue; @@ -2986,7 +3354,7 @@ void UpdateZoneSizing(EnergyPlusData &state, Constant::CallIndicator const CallI for (int CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) { if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue; - // Yes, call updateZoneSizingEndZoneSizingCalc6 again here to copyd the same fields + // Yes, call updateZoneSizingEndZoneSizingCalc6 again here to copy the same fields updateZoneSizingEndZoneSizingCalc6(state.dataSize->FinalZoneSizing(CtrlZoneNum), state.dataSize->CalcFinalZoneSizing(CtrlZoneNum), state.dataZoneEquipmentManager->NumOfTimeStepInDay); @@ -4540,7 +4908,7 @@ void CalcZoneMassBalance(EnergyPlusData &state, bool const FirstHVACIteration) } Real64 FinalTotalReturnMassFlow = 0; - CalcZoneReturnFlows(state, ZoneNum, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); + zoneEquipConfig.calcReturnFlows(state, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance) { // set mass conservation variables massConservation.InMassFlowRate = TotInletAirMassFlowRate; @@ -4559,7 +4927,7 @@ void CalcZoneMassBalance(EnergyPlusData &state, bool const FirstHVACIteration) AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, zoneEquipConfig.AirLoopDesSupply); } // add adjust zone return node air flow calc - CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); + zoneEquipConfig.calcReturnFlows(state, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); massConservation.RetMassFlowRate = FinalTotalReturnMassFlow; ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow; } @@ -4576,7 +4944,7 @@ void CalcZoneMassBalance(EnergyPlusData &state, bool const FirstHVACIteration) } // add adjust zone return node air flow calculation - CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); + zoneEquipConfig.calcReturnFlows(state, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); massConservation.RetMassFlowRate = FinalTotalReturnMassFlow; ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow; @@ -4594,7 +4962,7 @@ void CalcZoneMassBalance(EnergyPlusData &state, bool const FirstHVACIteration) } // add adjust zone return node air flow calc - CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); + zoneEquipConfig.calcReturnFlows(state, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); massConservation.RetMassFlowRate = FinalTotalReturnMassFlow; ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow; } @@ -4726,182 +5094,6 @@ void CalcZoneMassBalance(EnergyPlusData &state, bool const FirstHVACIteration) } } -void CalcZoneReturnFlows(EnergyPlusData &state, - int const ZoneNum, - Real64 &ExpTotalReturnMassFlow, // Expected total return air mass flow rate - Real64 &FinalTotalReturnMassFlow // Final total return air mass flow rate -) -{ - auto &thisZoneEquip(state.dataZoneEquip->ZoneEquipConfig(ZoneNum)); - int numRetNodes = thisZoneEquip.NumReturnNodes; - Real64 totReturnFlow = 0.0; // Total flow to all return nodes in the zone (kg/s) - Real64 totVarReturnFlow = - 0.0; // Total variable return flow, for return nodes connected to an airloop with an OA system or not with specified flow (kg/s) - Real64 returnSchedFrac = ScheduleManager::GetCurrentScheduleValue(state, thisZoneEquip.ReturnFlowSchedPtrNum); - thisZoneEquip.FixedReturnFlow = false; - FinalTotalReturnMassFlow = 0.0; - thisZoneEquip.TotAvailAirLoopOA = 0.0; - - // Set initial flow rate for each return node - for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { - int retNode = thisZoneEquip.ReturnNode(returnNum); - - if (retNode > 0) { - Real64 returnNodeMassFlow = 0.0; - auto &retNodeData(state.dataLoopNodes->Node(retNode)); - - int inletNum = thisZoneEquip.ReturnNodeInletNum(returnNum); // which inlet node matches this return node (same airloop) - int ADUNum = 0; - if (inletNum > 0) ADUNum = thisZoneEquip.InletNodeADUNum(inletNum); - int airLoop = thisZoneEquip.ReturnNodeAirLoopNum(returnNum); - Real64 airLoopReturnFrac = 1.0; - if (airLoop > 0) { - // Establish corresponding airloop inlet(s) mass flow rate and set return node max/min/maxavail - Real64 inletMassFlow = 0.0; - int maxMinNodeNum = 0; - auto &thisAirLoopFlow(state.dataAirLoop->AirLoopFlow(airLoop)); - if (ADUNum > 0) { - // Zone return node could carry supply flow to zone without leaks plus any induced flow from plenum (but don't include other - // secondary flows from exhaust nodes) - inletMassFlow = state.dataDefineEquipment->AirDistUnit(ADUNum).MassFlowRateZSup + - state.dataDefineEquipment->AirDistUnit(ADUNum).MassFlowRatePlenInd; - maxMinNodeNum = state.dataDefineEquipment->AirDistUnit(ADUNum).OutletNodeNum; - } else if (inletNum > 0) { - // If not connected to an ADU, then use the inlet node flow - inletMassFlow = state.dataLoopNodes->Node(thisZoneEquip.InletNode(inletNum)).MassFlowRate; - maxMinNodeNum = thisZoneEquip.InletNode(inletNum); - } - if (maxMinNodeNum > 0) { - auto const &maxMinNodeData(state.dataLoopNodes->Node(maxMinNodeNum)); - retNodeData.MassFlowRateMax = maxMinNodeData.MassFlowRateMax; - retNodeData.MassFlowRateMin = maxMinNodeData.MassFlowRateMin; - retNodeData.MassFlowRateMaxAvail = maxMinNodeData.MassFlowRateMaxAvail; - } else { - auto const &zoneNodeData(state.dataLoopNodes->Node(thisZoneEquip.ZoneNode)); - retNodeData.MassFlowRateMax = zoneNodeData.MassFlowRateMax; - retNodeData.MassFlowRateMin = zoneNodeData.MassFlowRateMin; - retNodeData.MassFlowRateMaxAvail = zoneNodeData.MassFlowRateMaxAvail; - } - - airLoopReturnFrac = thisAirLoopFlow.DesReturnFrac; - if (state.dataAirSystemsData->PrimaryAirSystems(airLoop).OASysExists && (thisAirLoopFlow.MaxOutAir > 0.0)) { - // Set return flow as fraction of matching inlet node flow if there is an OA system and available OA flow > 0.0 - returnNodeMassFlow = airLoopReturnFrac * inletMassFlow; - thisZoneEquip.TotAvailAirLoopOA += thisAirLoopFlow.MaxOutAir; - } else { - // Set return flow to matching inlet node flow - returnNodeMassFlow = inletMassFlow; - thisZoneEquip.FixedReturnFlow(returnNum) = true; - } - } else { - returnNodeMassFlow = 0.0; - } - - // Return node 1 is special - if (returnNum == 1) { - // Make no return air flow adjustments during sizing - if ((state.dataGlobal->DoingSizing) && numRetNodes == 1) { - returnNodeMassFlow = ExpTotalReturnMassFlow; - if (airLoop > 0) { - if (!state.dataAirSystemsData->PrimaryAirSystems(airLoop).OASysExists || - (state.dataAirLoop->AirLoopFlow(airLoop).MaxOutAir == 0.0)) { - ExpTotalReturnMassFlow = max(0.0, ExpTotalReturnMassFlow - thisZoneEquip.ZoneExhBalanced + thisZoneEquip.ZoneExh); - returnNodeMassFlow = ExpTotalReturnMassFlow; - } - } - } else if (!state.dataGlobal->DoingSizing) { - if (thisZoneEquip.NumReturnFlowBasisNodes > 0) { - // Set base return air flow rate for node 1 using basis node flow rates - Real64 basisNodesMassFlow = 0.0; - for (int nodeNum = 1; nodeNum <= thisZoneEquip.NumReturnFlowBasisNodes; ++nodeNum) { - basisNodesMassFlow += state.dataLoopNodes->Node(thisZoneEquip.ReturnFlowBasisNode(nodeNum)).MassFlowRate; - } - returnNodeMassFlow = max(0.0, (basisNodesMassFlow * returnSchedFrac)); - thisZoneEquip.FixedReturnFlow(returnNum) = true; - } else { - // If only 1 return node, use the standard return mass flow - if ((numRetNodes == 1) && !thisZoneEquip.FixedReturnFlow(returnNum)) { - returnNodeMassFlow = max(0.0, (ExpTotalReturnMassFlow * returnSchedFrac * airLoopReturnFrac)); - } - } - } - } - totReturnFlow += returnNodeMassFlow; - retNodeData.MassFlowRate = returnNodeMassFlow; - retNodeData.MassFlowRateMinAvail = 0.0; - if (!thisZoneEquip.FixedReturnFlow(returnNum)) totVarReturnFlow += returnNodeMassFlow; - } - } - - // if zone mass balance true, set to expected return flow - if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { - // applies zone return flow schedule multiplier - ExpTotalReturnMassFlow = returnSchedFrac * ExpTotalReturnMassFlow; - // set air flow rate for each return node - Real64 zoneTotReturnFlow = 0.0; - Real64 returnNodeMassFlow = 0.0; - for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { - int retNode = thisZoneEquip.ReturnNode(returnNum); - if (retNode > 0) { - if (numRetNodes == 1) { - returnNodeMassFlow = ExpTotalReturnMassFlow; - } else { // multiple return nodes - if (ExpTotalReturnMassFlow > 0.0) { - Real64 returnAdjFactor = state.dataLoopNodes->Node(retNode).MassFlowRate / ExpTotalReturnMassFlow; - returnNodeMassFlow = returnAdjFactor * ExpTotalReturnMassFlow; - } else { - returnNodeMassFlow = 0.0; - } - } - } - zoneTotReturnFlow += returnNodeMassFlow; - } - // Adjust return node flows if zone total return flow is > 0 - if (zoneTotReturnFlow > 0.0) { - for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { - int retNode = thisZoneEquip.ReturnNode(returnNum); - if (retNode > 0) { - if (numRetNodes == 1) { - // set it to expected return flows - state.dataLoopNodes->Node(retNode).MassFlowRate = ExpTotalReturnMassFlow; - FinalTotalReturnMassFlow = ExpTotalReturnMassFlow; - } else { // multiple return nodes, adjust nodes flow - Real64 newReturnFlow = 0.0; - Real64 returnAdjFactor = ExpTotalReturnMassFlow / zoneTotReturnFlow; - Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; - newReturnFlow = curReturnFlow * returnAdjFactor; - state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; - FinalTotalReturnMassFlow += newReturnFlow; - } - } - } - } else { - FinalTotalReturnMassFlow = ExpTotalReturnMassFlow; - } - } else { - // Adjust return flows if greater than expected (i.e. there is exhaust or mixing flow reducing the total available for return) - if ((totReturnFlow > ExpTotalReturnMassFlow) && (totVarReturnFlow > 0.0)) { - Real64 newReturnFlow = 0.0; - Real64 returnAdjFactor = (1 - ((totReturnFlow - ExpTotalReturnMassFlow) / totVarReturnFlow)); // Return flow adjustment factor - for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { - int retNode = thisZoneEquip.ReturnNode(returnNum); - Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; - if (retNode > 0) { - if (!thisZoneEquip.FixedReturnFlow(returnNum)) { - newReturnFlow = curReturnFlow * returnAdjFactor; - FinalTotalReturnMassFlow += newReturnFlow; - state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; - } else { - FinalTotalReturnMassFlow += curReturnFlow; - } - } - } - } else { - FinalTotalReturnMassFlow = totReturnFlow; - } - } -} - void CalcZoneInfiltrationFlows(EnergyPlusData &state, int const ZoneNum, // current zone index Real64 &ZoneReturnAirMassFlowRate // zone total zone return air mass flow rate @@ -4978,6 +5170,15 @@ void CalcZoneLeavingConditions(EnergyPlusData &state, bool const FirstHVACIterat Real64 TempZoneAir; // Zone air temperature [C] Real64 SumRetAirLatentGainRate; + // If SpaceHVAC is active calculate SpaceHVAC:ReturnMixer inlet and outlet conditions before setting zone return conditions + if (state.dataHeatBal->doSpaceHeatBalanceSimulation && !state.dataGlobal->DoingSizing) { + for (auto &thisSpaceHVACMixer : state.dataZoneEquip->zoneReturnMixer) { + thisSpaceHVACMixer.setInletFlows(state); + thisSpaceHVACMixer.setInletConditions(state); + thisSpaceHVACMixer.setOutletConditions(state); + } + } + for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { if (!state.dataZoneEquip->ZoneEquipConfig(ZoneNum).IsControlled) continue; // A return air system may not exist for certain systems; Therefore when no return node exists @@ -5006,7 +5207,14 @@ void CalcZoneLeavingConditions(EnergyPlusData &state, bool const FirstHVACIterat } // user defined room air model may feed temp that differs from zone node - if (allocated(state.dataRoomAir->AirPatternZoneInfo)) { + + if (state.dataHeatBal->doSpaceHeatBalanceSimulation && !state.dataGlobal->DoingSizing && + (state.dataZoneEquip->ZoneEquipConfig(ZoneNum).returnNodeSpaceMixerIndex(nodeCount) > -1)) { + // If a SpaceHVAC:ZoneReturnMixer feeds this node, use the node conditions which was set above in + // thisSpaceHVACMixer.setOutletConditions + TempZoneAir = state.dataLoopNodes->Node(ReturnNode).Temp; + TempRetAir = TempZoneAir; + } else if (allocated(state.dataRoomAir->AirPatternZoneInfo)) { if ((state.dataRoomAir->AirPatternZoneInfo(ZoneNum).IsUsed) && (!state.dataGlobal->BeginEnvrnFlag)) { TempZoneAir = state.dataRoomAir->AirPatternZoneInfo(ZoneNum).Tleaving; TempRetAir = TempZoneAir; @@ -6035,9 +6243,15 @@ void CalcAirFlowSimple(EnergyPlusData &state, // Zone loops structured in getinput so only do each pair of zones bounding door once, even if multiple doors in one zone for (int ZoneA = 1; ZoneA <= (state.dataGlobal->NumOfZones - 1); ++ZoneA) { if (!state.dataHeatBal->RefDoorMixing(ZoneA).RefDoorMixFlag) continue; + auto &thisRefDoorMixing = state.dataHeatBal->RefDoorMixing(ZoneA); auto &zoneAHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ZoneA); Real64 TZoneA = zoneAHB.MixingMAT; Real64 HumRatZoneA = zoneAHB.MixingHumRat; + if ((state.dataHeatBal->doSpaceHeatBalance) && (thisRefDoorMixing.spaceIndex > 0)) { + auto &spaceAHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(thisRefDoorMixing.spaceIndex); + TZoneA = spaceAHB.MixingMAT; + HumRatZoneA = spaceAHB.MixingHumRat; + } Real64 AirDensityZoneA = PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, TZoneA, HumRatZoneA, RoutineNameRefrigerationDoorMixing); Real64 CpAirZoneA = PsyCpAirFnW(HumRatZoneA); for (int j = 1; j <= state.dataHeatBal->RefDoorMixing(ZoneA).NumRefDoorConnections; ++j) { @@ -6046,6 +6260,11 @@ void CalcAirFlowSimple(EnergyPlusData &state, Real64 TZoneB = zoneBHB.MixingMAT; Real64 HumRatZoneB = zoneBHB.MixingHumRat; Real64 CpAirZoneB = PsyCpAirFnW(HumRatZoneB); + if ((state.dataHeatBal->doSpaceHeatBalance) && (thisRefDoorMixing.fromSpaceIndex > 0)) { + auto &spaceBHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(thisRefDoorMixing.fromSpaceIndex); + TZoneB = spaceBHB.MixingMAT; + HumRatZoneB = spaceBHB.MixingHumRat; + } Real64 Tavg = (TZoneA + TZoneB) / 2.0; Real64 Wavg = (HumRatZoneA + HumRatZoneB) / 2.0; Real64 AirDensityAvg = PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, Tavg, Wavg, RoutineNameRefrigerationDoorMixing); @@ -6103,23 +6322,39 @@ void CalcAirFlowSimple(EnergyPlusData &state, zoneAHB.MixingMassFlowXHumRat += MassFlowXHumRatToA; zoneBHB.MixingMassFlowXHumRat += MassFlowXHumRatToB; if (state.dataHeatBal->doSpaceHeatBalance) { - // ZoneRefrigerationDoorMixing has no space information, just zones - // Allocate mixing flows by space volume fraction of zone volume - for (int spaceNum : state.dataHeatBal->Zone(ZoneA).spaceIndexes) { - Real64 spaceFrac = state.dataHeatBal->space(spaceNum).fracZoneVolume; - auto &spaceAHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum); - spaceAHB.MCPM += MassFlowXCpToA * spaceFrac; - spaceAHB.MCPTM += MassFlowXCpXTempToA * spaceFrac; - spaceAHB.MixingMassFlowZone += MassFlowToA * spaceFrac; - spaceAHB.MixingMassFlowXHumRat += MassFlowXHumRatToA * spaceFrac; + if (thisRefDoorMixing.spaceIndex > 0) { + auto &spaceAHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(thisRefDoorMixing.spaceIndex); + spaceAHB.MCPM += MassFlowXCpToA; + spaceAHB.MCPTM += MassFlowXCpXTempToA; + spaceAHB.MixingMassFlowZone += MassFlowToA; + spaceAHB.MixingMassFlowXHumRat += MassFlowXHumRatToA; + } else { + // Allocate mixing flows by space volume fraction of zone volume + for (int spaceNum : state.dataHeatBal->Zone(ZoneA).spaceIndexes) { + Real64 spaceFrac = state.dataHeatBal->space(spaceNum).fracZoneVolume; + auto &spaceAHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum); + spaceAHB.MCPM += MassFlowXCpToA * spaceFrac; + spaceAHB.MCPTM += MassFlowXCpXTempToA * spaceFrac; + spaceAHB.MixingMassFlowZone += MassFlowToA * spaceFrac; + spaceAHB.MixingMassFlowXHumRat += MassFlowXHumRatToA * spaceFrac; + } } - for (int spaceNum : state.dataHeatBal->Zone(ZoneB).spaceIndexes) { - Real64 spaceFrac = state.dataHeatBal->space(spaceNum).fracZoneVolume; - auto &spaceBHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum); - spaceBHB.MCPM += MassFlowXCpToB * spaceFrac; - spaceBHB.MCPTM += MassFlowXCpXTempToB * spaceFrac; - spaceBHB.MixingMassFlowZone += MassFlowToB * spaceFrac; - spaceBHB.MixingMassFlowXHumRat += MassFlowXHumRatToB * spaceFrac; + if (thisRefDoorMixing.spaceIndex > 0) { + auto &spaceBHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(thisRefDoorMixing.fromSpaceIndex); + spaceBHB.MCPM += MassFlowXCpToB; + spaceBHB.MCPTM += MassFlowXCpXTempToB; + spaceBHB.MixingMassFlowZone += MassFlowToB; + spaceBHB.MixingMassFlowXHumRat += MassFlowXHumRatToB; + } else { + // Allocate mixing flows by space volume fraction of zone volume + for (int spaceNum : state.dataHeatBal->Zone(ZoneB).spaceIndexes) { + Real64 spaceFrac = state.dataHeatBal->space(spaceNum).fracZoneVolume; + auto &spaceBHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum); + spaceBHB.MCPM += MassFlowXCpToB * spaceFrac; + spaceBHB.MCPTM += MassFlowXCpXTempToB * spaceFrac; + spaceBHB.MixingMassFlowZone += MassFlowToB * spaceFrac; + spaceBHB.MixingMassFlowXHumRat += MassFlowXHumRatToB * spaceFrac; + } } } diff --git a/src/EnergyPlus/ZoneEquipmentManager.hh b/src/EnergyPlus/ZoneEquipmentManager.hh index a58db51063a..b1114a23688 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.hh +++ b/src/EnergyPlus/ZoneEquipmentManager.hh @@ -140,10 +140,18 @@ namespace ZoneEquipmentManager { DataSizing::DesDayWeathData const &desDayWeath, Real64 const stdRhoAir); - void updateZoneSizingEndZoneSizingCalc1(EnergyPlusData &state, DataSizing::ZoneSizingData const &zsCalcSizing); + void updateZoneSizingEndZoneSizingCalc1(EnergyPlusData &state, int const zoneNum); - void - updateZoneSizingEndZoneSizingCalc2(DataSizing::ZoneSizingData &zsCalcSizing, int const timeStepIndex, int const hourPrint, int const minutes); + void updateZoneSizingEndZoneSizingCalc2(EnergyPlusData &state, DataSizing::ZoneSizingData &zsCalcSizing); + + void writeZszSpsz(EnergyPlusData &state, + EnergyPlus::InputOutputFile &outputFile, + int const numSpacesOrZones, + Array1D const zsEquipConfig, + EPVector const &zsCalcFinalSizing, + Array2D const &zsCalcSizing); + + std::string sizingPeakTimeStamp(EnergyPlusData &state, int timeStepIndex); void updateZoneSizingEndZoneSizingCalc3(DataSizing::ZoneSizingData &zsCalcFinalSizing, Array2D &zsCalcSizing, @@ -204,12 +212,6 @@ namespace ZoneEquipmentManager { void CalcZoneMassBalance(EnergyPlusData &state, bool FirstHVACIteration); - void CalcZoneReturnFlows(EnergyPlusData &state, - int ZoneNum, - Real64 &ExpTotalReturnMassFlow, // Expected total return air mass flow rate - Real64 &FinalTotalReturnMassFlow // Final total return air mass flow rate - ); - void CalcZoneInfiltrationFlows(EnergyPlusData &state, int ZoneNum, // current zone index Real64 &ZoneReturnAirMassFlowRate // zone total zone return air mass flow rate diff --git a/src/EnergyPlus/api/EnergyPlusPgm.cc b/src/EnergyPlus/api/EnergyPlusPgm.cc index 6c7a375f371..88dae209906 100644 --- a/src/EnergyPlus/api/EnergyPlusPgm.cc +++ b/src/EnergyPlus/api/EnergyPlusPgm.cc @@ -412,7 +412,7 @@ int RunEnergyPlus(EnergyPlus::EnergyPlusData &state, std::string const &filepath // METHODOLOGY EMPLOYED: // The method used in EnergyPlus is to simplify the main program as much // as possible and contain all "simulation" code in other modules and files. - + using namespace EnergyPlus; int status = initializeEnergyPlus(state, filepath); if (status || state.dataGlobal->outputEpJSONConversionOnly) return status; try { @@ -420,7 +420,7 @@ int RunEnergyPlus(EnergyPlus::EnergyPlusData &state, std::string const &filepath } catch (const EnergyPlus::FatalError &e) { return EnergyPlus::AbortEnergyPlus(state); } catch (const std::exception &e) { - EnergyPlus::ShowSevereError(state, e.what()); + ShowSevereError(state, e.what()); return EnergyPlus::AbortEnergyPlus(state); } return wrapUpEnergyPlus(state); @@ -441,7 +441,7 @@ int runEnergyPlusAsLibrary(EnergyPlus::EnergyPlusData &state, const std::vector< // METHODOLOGY EMPLOYED: // The method used in EnergyPlus is to simplify the main program as much // as possible and contain all "simulation" code in other modules and files. - + using namespace EnergyPlus; state.dataGlobal->eplusRunningViaAPI = true; // clean out any stdin, stderr, stdout flags from a prior call @@ -466,7 +466,7 @@ int runEnergyPlusAsLibrary(EnergyPlus::EnergyPlusData &state, const std::vector< } catch (const EnergyPlus::FatalError &e) { return EnergyPlus::AbortEnergyPlus(state); } catch (const std::exception &e) { - EnergyPlus::ShowSevereError(state, e.what()); + ShowSevereError(state, e.what()); return EnergyPlus::AbortEnergyPlus(state); } return wrapUpEnergyPlus(state); diff --git a/src/EnergyPlus/api/datatransfer.cc b/src/EnergyPlus/api/datatransfer.cc index 196f1e2b406..05dc9f8eac9 100644 --- a/src/EnergyPlus/api/datatransfer.cc +++ b/src/EnergyPlus/api/datatransfer.cc @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -65,6 +66,8 @@ #include #include +using namespace EnergyPlus; + APIDataEntry *getAPIData(EnergyPlusState state, unsigned int *resultingSize) { struct LocalAPIDataEntry @@ -239,6 +242,24 @@ void resetErrorFlag(EnergyPlusState state) thisState->dataPluginManager->apiErrorFlag = false; } +char *inputFilePath(EnergyPlusState state) +{ + const auto *thisState = static_cast(state); + std::string const path_utf8 = EnergyPlus::FileSystem::toGenericString(thisState->dataStrGlobals->inputFilePath); + char *p = new char[std::strlen(path_utf8.c_str()) + 1]; + std::strcpy(p, path_utf8.c_str()); + return p; +} + +char *epwFilePath(EnergyPlusState state) +{ + const auto *thisState = static_cast(state); + std::string const path_utf8 = EnergyPlus::FileSystem::toGenericString(thisState->files.inputWeatherFilePath.filePath); + char *p = new char[std::strlen(path_utf8.c_str()) + 1]; + std::strcpy(p, path_utf8.c_str()); + return p; +} + char **getObjectNames(EnergyPlusState state, const char *objectType, unsigned int *resultingSize) { const auto *thisState = static_cast(state); @@ -336,9 +357,9 @@ Real64 getVariableValue(EnergyPlusState state, const int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return zero - EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: Error in getVariableValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: Error in getVariableValue; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; return 0; @@ -349,9 +370,9 @@ Real64 getVariableValue(EnergyPlusState state, const int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return zero - EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: Index error in getVariableValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: Index error in getVariableValue; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; return 0; @@ -380,9 +401,8 @@ Real64 getMeterValue(EnergyPlusState state, int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return zero - EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: Index error in getMeterValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError(*thisState, - "The getMeterValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: Index error in getMeterValue; received handle: {}", handle)); + ShowContinueError(*thisState, "The getMeterValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; return 0; @@ -407,29 +427,28 @@ int getActuatorHandle(EnergyPlusState state, const char *componentType, const ch bool foundActuator = false; for (auto const &usedActuator : thisState->dataRuntimeLang->EMSActuatorUsed) { if (usedActuator.ActuatorVariableNum == handle) { - EnergyPlus::ShowWarningError( + ShowWarningError( *thisState, "Data Exchange API: An EnergyManagementSystem:Actuator seems to be already defined in the EnergyPlus File and named '" + usedActuator.Name + "'."); - EnergyPlus::ShowContinueError( + ShowContinueError( *thisState, fmt::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); - EnergyPlus::ShowContinueError(*thisState, - fmt::format("The getActuatorHandle function will still return the handle (= {}) but caller " - "should take note that there is a risk of overwritting.", - handle)); + ShowContinueError(*thisState, + fmt::format("The getActuatorHandle function will still return the handle (= {}) but caller " + "should take note that there is a risk of overwritting.", + handle)); foundActuator = true; break; } } if (!foundActuator) { - EnergyPlus::ShowWarningError(*thisState, - "Data Exchange API: You seem to already have tried to get an Actuator Handle on this one."); - EnergyPlus::ShowContinueError( - *thisState, fmt::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); - EnergyPlus::ShowContinueError(*thisState, - fmt::format("The getActuatorHandle function will still return the handle (= {}) but caller should " - "take note that there is a risk of overwritting.", - handle)); + ShowWarningError(*thisState, "Data Exchange API: You seem to already have tried to get an Actuator Handle on this one."); + ShowContinueError(*thisState, + fmt::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); + ShowContinueError(*thisState, + fmt::format("The getActuatorHandle function will still return the handle (= {}) but caller should " + "take note that there is a risk of overwritting.", + handle)); } } ++availActuator.handleCount; @@ -453,9 +472,8 @@ void resetActuator(EnergyPlusState state, int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in resetActuator; received handle: {}", handle)); - EnergyPlus::ShowContinueError(*thisState, - "The resetActuator function will return to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in resetActuator; received handle: {}", handle)); + ShowContinueError(*thisState, "The resetActuator function will return to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; } @@ -483,9 +501,8 @@ void setActuatorValue(EnergyPlusState state, const int handle, const Real64 valu } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in setActuatorValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError(*thisState, - "The setActuatorValue function will return to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in setActuatorValue; received handle: {}", handle)); + ShowContinueError(*thisState, "The setActuatorValue function will return to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; } @@ -514,9 +531,9 @@ Real64 getActuatorValue(EnergyPlusState state, const int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return 0 - EnergyPlus::ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in getActuatorValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getActuatorValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in getActuatorValue; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getActuatorValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; return 0; @@ -564,15 +581,65 @@ Real64 getInternalVariableValue(EnergyPlusState state, int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return 0 - EnergyPlus::ShowSevereError(*thisState, - fmt::format("Data Exchange API: index error in getInternalVariableValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getInternalVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in getInternalVariableValue; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getInternalVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; return 0; } +int getEMSGlobalVariableHandle(EnergyPlusState state, const char *name) +{ + auto *thisState = static_cast(state); + int index = 0; + for (auto const &erlVar : thisState->dataRuntimeLang->ErlVariable) { + index++; + // only respond if we are outside of the built-in EMS var range + if (index < thisState->dataRuntimeLang->emsVarBuiltInStart || index > thisState->dataRuntimeLang->emsVarBuiltInEnd) { + if (EnergyPlus::Util::SameString(name, erlVar.Name)) { + return index; + } + } + } + return 0; +} + +Real64 getEMSGlobalVariableValue(EnergyPlusState state, int handle) +{ + auto *thisState = static_cast(state); + auto const &erl = thisState->dataRuntimeLang; + bool const insideBuiltInRange = handle >= erl->emsVarBuiltInStart && handle <= erl->emsVarBuiltInEnd; + if (insideBuiltInRange || handle > thisState->dataRuntimeLang->NumErlVariables) { + // need to fatal out once the process is done + // throw an error, set the fatal flag, and then return 0 + EnergyPlus::ShowSevereError( + *thisState, fmt::format("Data Exchange API: Problem -- index error in getEMSGlobalVariableValue; received handle: {}", handle)); + EnergyPlus::ShowContinueError( + *thisState, "The getEMSGlobalVariableValue function will return 0 for now to allow the process to finish, then EnergyPlus will abort"); + thisState->dataPluginManager->apiErrorFlag = true; + return 0; + } + return erl->ErlVariable(handle).Value.Number; +} + +void setEMSGlobalVariableValue(EnergyPlusState state, int handle, Real64 value) +{ + auto *thisState = static_cast(state); + auto const &erl = thisState->dataRuntimeLang; + bool const insideBuiltInRange = handle >= erl->emsVarBuiltInStart && handle <= erl->emsVarBuiltInEnd; + if (insideBuiltInRange || handle > erl->NumErlVariables) { + // need to fatal out once the plugin is done + // throw an error, set the fatal flag, and then return + EnergyPlus::ShowSevereError( + *thisState, fmt::format("Data Exchange API: Problem -- index error in setEMSGlobalVariableValue; received handle: {}", handle)); + EnergyPlus::ShowContinueError(*thisState, + "The setEMSGlobalVariableValue function will return to allow the plugin to finish, then EnergyPlus will abort"); + thisState->dataPluginManager->apiErrorFlag = true; + } + erl->ErlVariable(handle).Value.Number = value; +} + int getPluginGlobalVariableHandle(EnergyPlusState state, const char *name) { auto *thisState = static_cast(state); @@ -585,9 +652,9 @@ Real64 getPluginGlobalVariableValue(EnergyPlusState state, int handle) if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxGlobalVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return 0 - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginGlobalVariableValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginGlobalVariableValue; received handle: {}", handle)); + ShowContinueError( *thisState, "The getPluginGlobalVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; @@ -601,10 +668,10 @@ void setPluginGlobalVariableValue(EnergyPlusState state, int handle, Real64 valu if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxGlobalVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in setPluginGlobalVariableValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginGlobalVariableValue function will return to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in setPluginGlobalVariableValue; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginGlobalVariableValue function will return to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; } thisState->dataPluginManager->pluginManager->setGlobalVariableValue(*thisState, handle, value); @@ -622,22 +689,22 @@ Real64 getPluginTrendVariableValue(EnergyPlusState state, int handle, int timeIn if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxTrendVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableValue; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableValue function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableValue; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginTrendVariableValue function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } if (timeIndex < 1 || timeIndex > EnergyPlus::PluginManagement::PluginManager::getTrendVariableHistorySize(*thisState, handle)) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( + ShowSevereError( *thisState, fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableValue; received value: {}", timeIndex)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableValue function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowContinueError(*thisState, + "The getPluginTrendVariableValue function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -650,23 +717,23 @@ Real64 getPluginTrendVariableAverage(EnergyPlusState state, int handle, int coun if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxTrendVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableAverage; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableAverage function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableAverage; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginTrendVariableAverage function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } if (count < 2 || count > EnergyPlus::PluginManagement::PluginManager::getTrendVariableHistorySize(*thisState, handle)) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( + ShowSevereError( *thisState, fmt::format( "Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableAverage; received value: {}", count)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableAverage function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowContinueError(*thisState, + "The getPluginTrendVariableAverage function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -679,22 +746,22 @@ Real64 getPluginTrendVariableMin(EnergyPlusState state, int handle, int count) if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxTrendVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMin; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableMin function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMin; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginTrendVariableMin function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } if (count < 2 || count > EnergyPlus::PluginManagement::PluginManager::getTrendVariableHistorySize(*thisState, handle)) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( + ShowSevereError( *thisState, fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableMin; received value: {}", count)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableMin function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowContinueError(*thisState, + "The getPluginTrendVariableMin function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -707,22 +774,22 @@ Real64 getPluginTrendVariableMax(EnergyPlusState state, int handle, int count) if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxTrendVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMax; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableMax function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMax; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginTrendVariableMax function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } if (count < 2 || count > EnergyPlus::PluginManagement::PluginManager::getTrendVariableHistorySize(*thisState, handle)) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( + ShowSevereError( *thisState, fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableMax; received value: {}", count)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableMax function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowContinueError(*thisState, + "The getPluginTrendVariableMax function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -735,22 +802,22 @@ Real64 getPluginTrendVariableSum(EnergyPlusState state, int handle, int count) if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxTrendVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableSum; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableSum function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableSum; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginTrendVariableSum function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } if (count < 2 || count > EnergyPlus::PluginManagement::PluginManager::getTrendVariableHistorySize(*thisState, handle)) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( + ShowSevereError( *thisState, fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableSum; received value: {}", count)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableSum function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowContinueError(*thisState, + "The getPluginTrendVariableSum function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -763,23 +830,23 @@ Real64 getPluginTrendVariableDirection(EnergyPlusState state, int handle, int co if (handle < 0 || handle > thisState->dataPluginManager->pluginManager->maxTrendVariableIndex) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableDirection; received handle: {}", handle)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableDirection function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowSevereError(*thisState, + fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableDirection; received handle: {}", handle)); + ShowContinueError(*thisState, + "The getPluginTrendVariableDirection function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } if (count < 2 || count > EnergyPlus::PluginManagement::PluginManager::getTrendVariableHistorySize(*thisState, handle)) { // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - EnergyPlus::ShowSevereError( + ShowSevereError( *thisState, fmt::format( "Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableDirection; received value: {}", count)); - EnergyPlus::ShowContinueError( - *thisState, "The getPluginTrendVariableDirection function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); + ShowContinueError(*thisState, + "The getPluginTrendVariableDirection function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -958,7 +1025,7 @@ int todayWeatherIsRainAtTime(EnergyPlusState state, int hour, int timeStepNum) (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return (int)thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).IsRain; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -972,7 +1039,7 @@ int todayWeatherIsSnowAtTime(EnergyPlusState state, int hour, int timeStepNum) (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return (int)thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).IsSnow; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -986,7 +1053,7 @@ Real64 todayWeatherOutDryBulbAtTime(EnergyPlusState state, int hour, int timeSte (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).OutDryBulbTemp; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -999,7 +1066,7 @@ Real64 todayWeatherOutDewPointAtTime(EnergyPlusState state, int hour, int timeSt (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).OutDewPointTemp; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1012,7 +1079,7 @@ Real64 todayWeatherOutBarometricPressureAtTime(EnergyPlusState state, int hour, (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).OutBaroPress; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1025,7 +1092,7 @@ Real64 todayWeatherOutRelativeHumidityAtTime(EnergyPlusState state, int hour, in (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).OutRelHum; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1038,7 +1105,7 @@ Real64 todayWeatherWindSpeedAtTime(EnergyPlusState state, int hour, int timeStep (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).WindSpeed; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1051,7 +1118,7 @@ Real64 todayWeatherWindDirectionAtTime(EnergyPlusState state, int hour, int time (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).WindDir; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1064,7 +1131,7 @@ Real64 todayWeatherSkyTemperatureAtTime(EnergyPlusState state, int hour, int tim (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).SkyTemp; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1077,7 +1144,7 @@ Real64 todayWeatherHorizontalIRSkyAtTime(EnergyPlusState state, int hour, int ti (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).HorizIRSky; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1090,7 +1157,7 @@ Real64 todayWeatherBeamSolarRadiationAtTime(EnergyPlusState state, int hour, int (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).BeamSolarRad; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1103,7 +1170,7 @@ Real64 todayWeatherDiffuseSolarRadiationAtTime(EnergyPlusState state, int hour, (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).DifSolarRad; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1116,7 +1183,7 @@ Real64 todayWeatherAlbedoAtTime(EnergyPlusState state, int hour, int timeStepNum (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).Albedo; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1129,7 +1196,7 @@ Real64 todayWeatherLiquidPrecipitationAtTime(EnergyPlusState state, int hour, in (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsToday(timeStepNum, iHour).LiquidPrecip; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1142,7 +1209,7 @@ int tomorrowWeatherIsRainAtTime(EnergyPlusState state, int hour, int timeStepNum (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return (int)thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).IsRain; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -1155,7 +1222,7 @@ int tomorrowWeatherIsSnowAtTime(EnergyPlusState state, int hour, int timeStepNum (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return (int)thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).IsSnow; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0; } @@ -1168,7 +1235,7 @@ Real64 tomorrowWeatherOutDryBulbAtTime(EnergyPlusState state, int hour, int time (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).OutDryBulbTemp; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1181,7 +1248,7 @@ Real64 tomorrowWeatherOutDewPointAtTime(EnergyPlusState state, int hour, int tim (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).OutDewPointTemp; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1194,7 +1261,7 @@ Real64 tomorrowWeatherOutBarometricPressureAtTime(EnergyPlusState state, int hou (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).OutBaroPress; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1207,7 +1274,7 @@ Real64 tomorrowWeatherOutRelativeHumidityAtTime(EnergyPlusState state, int hour, (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).OutRelHum; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1220,7 +1287,7 @@ Real64 tomorrowWeatherWindSpeedAtTime(EnergyPlusState state, int hour, int timeS (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).WindSpeed; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1233,7 +1300,7 @@ Real64 tomorrowWeatherWindDirectionAtTime(EnergyPlusState state, int hour, int t (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).WindDir; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1246,7 +1313,7 @@ Real64 tomorrowWeatherSkyTemperatureAtTime(EnergyPlusState state, int hour, int (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).SkyTemp; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1259,7 +1326,7 @@ Real64 tomorrowWeatherHorizontalIRSkyAtTime(EnergyPlusState state, int hour, int (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).HorizIRSky; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1272,7 +1339,7 @@ Real64 tomorrowWeatherBeamSolarRadiationAtTime(EnergyPlusState state, int hour, (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).BeamSolarRad; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1285,7 +1352,7 @@ Real64 tomorrowWeatherDiffuseSolarRadiationAtTime(EnergyPlusState state, int hou (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).DifSolarRad; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1298,7 +1365,7 @@ Real64 tomorrowWeatherAlbedoAtTime(EnergyPlusState state, int hour, int timeStep (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).Albedo; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } @@ -1311,7 +1378,7 @@ Real64 tomorrowWeatherLiquidPrecipitationAtTime(EnergyPlusState state, const int (timeStepNum <= thisState->dataGlobal->NumOfTimeStepInHour)) { return thisState->dataWeather->wvarsHrTsTomorrow(timeStepNum, iHour).LiquidPrecip; } - EnergyPlus::ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); + ShowSevereError(*thisState, "Invalid return from weather lookup, check hour and time step argument values are in range."); thisState->dataPluginManager->apiErrorFlag = true; return 0.0; } diff --git a/src/EnergyPlus/api/datatransfer.h b/src/EnergyPlus/api/datatransfer.h index ae45b8fc5c8..7b31ba56970 100644 --- a/src/EnergyPlus/api/datatransfer.h +++ b/src/EnergyPlus/api/datatransfer.h @@ -121,6 +121,18 @@ ENERGYPLUSLIB_API int apiErrorFlag(EnergyPlusState state); /// a calculation to continue, this function can reset the flag. /// \param[in] state An active EnergyPlusState instance created with `stateNew`. ENERGYPLUSLIB_API void resetErrorFlag(EnergyPlusState state); +/// \brief Provides the input file path back to the user +/// \details In most circumstances the client will know the path to the input file, but there are some cases where code +/// is generalized in unexpected workflows. Users have requested a way to get the input file path back from the running instance. +/// \param[in] state An active EnergyPlusState instance created with `stateNew`. +/// \return A char * of the input file path. This allocates a new char *, and calling clients must free this when done with it! +ENERGYPLUSLIB_API char *inputFilePath(EnergyPlusState state); +/// \brief Provides the weather file path back to the user +/// \details In most circumstances the client will know the path to the weather file, but there are some cases where code +/// is generalized in unexpected workflows. Users have requested a way to get the weather file path back from the running instance. +/// \param[in] state An active EnergyPlusState instance created with `stateNew`. +/// \return A char * of the weather file path. This allocates a new char *, and calling clients must free this when done with it! +ENERGYPLUSLIB_API char *epwFilePath(EnergyPlusState state); // ----- DATA TRANSFER HELPER FUNCTIONS @@ -149,7 +161,7 @@ ENERGYPLUSLIB_API void freeAPIData(const struct APIDataEntry *data, unsigned int ENERGYPLUSLIB_API char **getObjectNames(EnergyPlusState state, const char *objectType, unsigned int *resultingSize); /// \brief Clears an object names array allocation /// \details This function frees an instance of the object names array, which is returned from getObjectNames -/// \param[in] data An array (pointer) of const char * as returned from the getObjectNames function +/// \param[in] objectNames An array (pointer) of char * as returned from the getObjectNames function /// \param[in] arraySize The size of the object name array, which is known after the call to getObjectNames. /// \return Nothing, this simply frees the memory ENERGYPLUSLIB_API void freeObjectNames(char **objectNames, unsigned int arraySize); @@ -297,6 +309,40 @@ ENERGYPLUSLIB_API int getInternalVariableHandle(EnergyPlusState state, const cha /// \see getInternalVariableHandle ENERGYPLUSLIB_API Real64 getInternalVariableValue(EnergyPlusState state, int handle); +// ----- FUNCTIONS RELATED TO EMS GLOBAL VARIABLES (FOR CORNER CASES WHERE PLUGIN/API BLENDS WITH EMS PROGRAMS) +/// \brief Gets a handle to an EMS "Global" variable +/// \details When using EMS, it is sometimes necessary to share data between programs. +/// EMS global variables are declared in the input file and used in EMS programs. +/// EMS global variables are identified by name only. This function returns -1 if a match is not found. +/// \param[in] state An active EnergyPlusState instance created with `stateNew`. +/// \param[in] name The name of the EMS global variable, which is declared in the EnergyPlus input file +/// \return The integer handle to an EMS global variable, or -1 if a match is not found. +/// \remark The behavior of this function is not well-defined until the `apiDataFullyReady` function returns true. +/// \see apiDataFullyReady +ENERGYPLUSLIB_API int getEMSGlobalVariableHandle(EnergyPlusState state, const char *name); +/// \brief Gets the current value of an EMS "Global" variable +/// \details When using EMS, the value of the shared "global" variables can change at any time. +/// This function returns the current value of the variable. +/// \param[in] state An active EnergyPlusState instance created with `stateNew`. +/// \param[in] handle The handle id to an EMS "Global" variable, which can be retrieved using the `getEMSGlobalVariableHandle` function. +/// \remark The behavior of this function is not well-defined until the `apiDataFullyReady` function returns true. +/// \return The current value of the variable, in floating point form, or zero if a handle problem is encountered. If a zero +/// is returned, use the `apiErrorFlag` function to disambiguate the return value. +/// \see apiDataFullyReady +/// \see getEMSGlobalVariableHandle +ENERGYPLUSLIB_API Real64 getEMSGlobalVariableValue(EnergyPlusState state, int handle); +/// \brief Sets the value of an EMS "Global" variable +/// \details When using EMS, the value of the shared "global" variables can change at any time. +/// This function sets the variable to a new value. +/// \param[in] state An active EnergyPlusState instance created with `stateNew`. +/// \param[in] handle The handle id to an EMS "Global" variable, which can be retrieved using the `getEMSGlobalVariableHandle` function. +/// \param[in] value The floating point value to be assigned to the global variable +/// \remark The behavior of this function is not well-defined until the `apiDataFullyReady` function returns true. +/// \remark A handle index or other problem will return 0 and set a flag to cause EnergyPlus to terminate once Python completes. +/// \see apiDataFullyReady +/// \see getEMSGlobalVariableHandle +ENERGYPLUSLIB_API void setEMSGlobalVariableValue(EnergyPlusState state, int handle, Real64 value); + // ----- FUNCTIONS RELATED TO PYTHON PLUGIN GLOBAL VARIABLES (ONLY USED FOR PYTHON PLUGIN SYSTEM) /// \brief Gets a handle to a Python Plugin "Global" variable diff --git a/src/EnergyPlus/api/datatransfer.py b/src/EnergyPlus/api/datatransfer.py index 3b154108d38..0a1c9112d28 100644 --- a/src/EnergyPlus/api/datatransfer.py +++ b/src/EnergyPlus/api/datatransfer.py @@ -56,7 +56,7 @@ from ctypes import cdll, c_int, c_char_p, c_void_p, POINTER, Structure, byref from pyenergyplus.common import RealEP, EnergyPlusException, is_number from typing import List, Union - +from pathlib import Path class DataExchange: """ @@ -139,6 +139,10 @@ def __init__(self, api: cdll, running_as_python_plugin: bool = False): self.api.apiErrorFlag.restype = c_int self.api.resetErrorFlag.argtypes = [c_void_p] self.api.resetErrorFlag.restype = c_void_p + self.api.inputFilePath.argtypes = [c_void_p] + self.api.inputFilePath.restype = c_char_p + self.api.epwFilePath.argtypes = [c_void_p] + self.api.epwFilePath.restype = c_char_p self.api.requestVariable.argtypes = [c_void_p, c_char_p, c_char_p] self.api.getNumNodesInCondFDSurfaceLayer.argtypes = [c_void_p, c_char_p, c_char_p] self.api.requestVariable.restype = c_void_p @@ -201,6 +205,12 @@ def __init__(self, api: cdll, running_as_python_plugin: bool = False): self.api.currentEnvironmentNum.restype = c_int self.api.warmupFlag.argtypes = [c_void_p] self.api.warmupFlag.restype = c_int + self.api.getEMSGlobalVariableHandle.argtypes = [c_void_p, c_char_p] + self.api.getEMSGlobalVariableHandle.restype = c_int + self.api.getEMSGlobalVariableValue.argtypes = [c_void_p, c_int] + self.api.getEMSGlobalVariableValue.restype = RealEP + self.api.setEMSGlobalVariableValue.argtypes = [c_void_p, c_int, RealEP] + self.api.setEMSGlobalVariableValue.restype = c_void_p self.api.getPluginGlobalVariableHandle.argtypes = [c_void_p, c_char_p] self.api.getPluginGlobalVariableHandle.restype = c_int self.api.getPluginGlobalVariableValue.argtypes = [c_void_p, c_int] @@ -353,6 +363,33 @@ def reset_api_error_flag(self, state: c_void_p) -> None: """ self.api.resetErrorFlag(state) + def get_input_file_path(self, state: c_void_p) -> Path: + """ + Provides the input file path back to the client. In most circumstances the client will know the path to the + input file, but there are some cases where code is generalized in unexpected workflows. Users have requested + a way to get the input file path back from the running instance. + + :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. + :return: A pathlib.Path of the input file path + """ + c_string = self.api.inputFilePath(state) + res = Path(c_string.decode('utf-8')) + return res + + def get_weather_file_path(self, state: c_void_p) -> Path: + """ + Provides the weather file path back to the client. In most circumstances the client will know the path to the + weather file, but there are some cases where code is generalized in unexpected workflows. Users have requested + a way to get the weather file path back from the running instance. + + :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. + :return: A pathlib.Path of the weather file + """ + c_string = self.api.epwFilePath(state) + res = Path(c_string.decode('utf-8')) + return res + + def get_object_names(self, state: c_void_p, object_type_name: Union[str, bytes]) -> List[str]: """ Gets the instance names for a given object type in the current input file @@ -698,6 +735,82 @@ def get_construction_handle(self, state: c_void_p, var_name: Union[str, bytes]) "'{}'".format(var_name)) return self.api.getConstructionHandle(state, var_name) + def get_ems_global_handle(self, state: c_void_p, var_name: Union[str, bytes]) -> int: + """ + Get a handle to an EMS global variable in a running simulation. + + EMS global variables are used as a way to share data between running EMS programs. First a global variable must + be declared in the input file using the EnergyManagementSystem:GlobalVariable object. Once a name has been + declared, it can be accessed by EMS programs by name, and through the Python API. For API usage, the client + should get a handle to the variable using this get_global_handle function, then + using the get_ems_global_value and set_ems_global_value functions as needed. Note all global variables are + floating point values. + + The arguments passed into this function do not need to be a particular case, as the EnergyPlus API + automatically converts values to upper-case when finding matches to internal variables in the simulation. + + Note also that the arguments passed in here can be either strings or bytes, as this wrapper handles conversion + as needed. + + :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. + :param var_name: The name of the EMS global variable to retrieve, this name must be listed in an IDF object: + `EnergyManagementSystem:GlobalVariable` + :return: An integer ID for this EMS global variable, or -1 if one could not be found. + """ + if isinstance(var_name, str): + var_name = var_name.encode('utf-8') + elif not isinstance(var_name, bytes): + raise EnergyPlusException( + "`get_ems_global_handle` expects `component_type` as a `str` or UTF-8 encoded `bytes`, not " + "'{}'".format(var_name)) + return self.api.getEMSGlobalVariableHandle(state, var_name) + + def get_ems_global_value(self, state: c_void_p, handle: int) -> float: + """ + Get the current value of an EMS global variable in a running simulation. + + EMS global variables are used as a way to share data between running EMS programs. First a global variable must + be declared in the input file using the EnergyManagementSystem:GlobalVariable object. Once a name has been + declared, it can be accessed by EMS programs by name, and through the Python API. For API usage, the client + should get a handle to the variable using this get_global_handle function, then + using the get_ems_global_value and set_ems_global_value functions as needed. Note all global variables are + floating point values. + + :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. + :param handle: An integer returned from the `get_ems_global_handle` function. + :return: Floating point representation of the EMS global variable value + """ + if not is_number(handle): + raise EnergyPlusException( + "`get_ems_global_value` expects `handle` as an `int`, not " + "'{}'".format(handle)) + return self.api.getEMSGlobalVariableValue(state, handle) + + def set_ems_global_value(self, state: c_void_p, handle: int, value: float) -> None: + """ + Set the current value of an EMS global variable in a running simulation. + + EMS global variables are used as a way to share data between running EMS programs. First a global variable must + be declared in the input file using the EnergyManagementSystem:GlobalVariable object. Once a name has been + declared, it can be accessed by EMS programs by name, and through the Python API. For API usage, the client + should get a handle to the variable using this get_global_handle function, then + using the get_ems_global_value and set_ems_global_value functions as needed. Note all global variables are + floating point values. + + :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. + :param handle: An integer returned from the `get_ems_global_handle` function. + :param value: Floating point value to assign to the EMS global variable + """ + if not is_number(handle): + raise EnergyPlusException( + "`set_ems_global_value` expects `variable_handle` as an `int`, not " + "'{}'".format(handle)) + if not is_number(value): + raise EnergyPlusException( + "`set_ems_global_value` expects `value` as a `float`, not " + "'{}'".format(value)) + self.api.setEMSGlobalVariableValue(state, handle, value) + def get_global_handle(self, state: c_void_p, var_name: Union[str, bytes]) -> int: """ Get a handle to a global variable in a running simulation. This is only used for Python Plugin applications! @@ -740,12 +853,6 @@ def get_global_value(self, state: c_void_p, handle: int) -> float: using this get_global_value and the set_global_value functions as needed. Note all global variables are floating point values. - The arguments passed into this function do not need to be a particular case, as the EnergyPlus API - automatically converts values to upper-case when finding matches to internal variables in the simulation. - - Note also that the arguments passed in here can be either strings or bytes, as this wrapper handles conversion - as needed. - :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. :param handle: An integer returned from the `get_global_handle` function. :return: Floating point representation of the global variable value diff --git a/src/EnergyPlus/api/runtime.cc b/src/EnergyPlus/api/runtime.cc index 8792f7ebc48..44009acb7c1 100644 --- a/src/EnergyPlus/api/runtime.cc +++ b/src/EnergyPlus/api/runtime.cc @@ -98,17 +98,17 @@ void setEnergyPlusRootDirectory(EnergyPlusState state, const char *path) void issueWarning(EnergyPlusState state, const char *message) { auto *thisState = reinterpret_cast(state); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) - EnergyPlus::ShowWarningError(*thisState, message); + ShowWarningError(*thisState, message); } void issueSevere(EnergyPlusState state, const char *message) { auto *thisState = reinterpret_cast(state); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) - EnergyPlus::ShowSevereError(*thisState, message); + ShowSevereError(*thisState, message); } void issueText(EnergyPlusState state, const char *message) { auto *thisState = reinterpret_cast(state); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) - EnergyPlus::ShowContinueError(*thisState, message); + ShowContinueError(*thisState, message); } void registerProgressCallback([[maybe_unused]] EnergyPlusState state, std::function f) diff --git a/src/Transition/CreateNewIDFUsingRulesV24_2_0.f90 b/src/Transition/CreateNewIDFUsingRulesV24_2_0.f90 index 78900861161..9c02c3db66d 100644 --- a/src/Transition/CreateNewIDFUsingRulesV24_2_0.f90 +++ b/src/Transition/CreateNewIDFUsingRulesV24_2_0.f90 @@ -124,6 +124,42 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ! I N S E R T L O C A L V A R I A B L E S H E R E ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! used in transition code for changing fan in ZoneHVAC:TerminalUnit:VariableRefrigerantFlow from VariableVolume to SystemModel + LOGICAL :: isVariableVolume + REAL :: fanTotalEff + REAL :: pressureRise + REAL :: maxAirFlow + REAL :: minAirFlowFrac + REAL :: fanPowerMinAirFlow + INTEGER :: NumFanVariableVolume + INTEGER :: NumOldFanVO = 1 + INTEGER :: NumVRFTU = 1 + INTEGER :: Num3 = 1 + INTEGER :: VRFTU_i = 1 + CHARACTER(len=MaxNameLength) :: sysFanName + CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: vavFanNameToDelete + + TYPE FanVOTransitionInfo + CHARACTER(len=MaxNameLength) :: oldFanName + CHARACTER(len=MaxNameLength) :: availSchedule + CHARACTER(len=MaxNameLength) :: fanTotalEff_str + CHARACTER(len=MaxNameLength) :: pressureRise_str + CHARACTER(len=MaxNameLength) :: maxAirFlow_str + CHARACTER(len=MaxNameLength) :: minFlowInputMethod + CHARACTER(len=MaxNameLength) :: minAirFlowFrac_str + CHARACTER(len=MaxNameLength) :: fanPowerMinAirFlow_str + CHARACTER(len=MaxNameLength) :: motorEfficiency + CHARACTER(len=MaxNameLength) :: motorInAirStreamFrac + CHARACTER(len=MaxNameLength) :: coeff1 !- Coefficient1 Constant + CHARACTER(len=MaxNameLength) :: coeff2 !- Coefficient2 x + CHARACTER(len=MaxNameLength) :: coeff3 !- Coefficient3 x**2 + CHARACTER(len=MaxNameLength) :: coeff4 !- Coefficient4 x**3 + CHARACTER(len=MaxNameLength) :: coeff5 !- Coefficient5 x**4 + CHARACTER(len=MaxNameLength) :: inletAirNodeName + CHARACTER(len=MaxNameLength) :: outletAirNodeName + CHARACTER(len=MaxNameLength) :: endUseSubCat + END TYPE FanVOTransitionInfo + TYPE(FanVOTransitionInfo), ALLOCATABLE, DIMENSION(:) :: OldFanVO INTEGER :: TotSPMs = 0 INTEGER :: spmNum = 0 @@ -317,6 +353,55 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ENDDO ENDDO + ! collect old VAV fans to be deleted + NumVRFTU = GetNumObjectsFound('ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW') + IF(ALLOCATED(vavFanNameToDelete)) DEALLOCATE(vavFanNameToDelete) + ALLOCATE(vavFanNameToDelete(NumVRFTU)) + DO Num = 1, NumIDFRecords + SELECT CASE (MakeUPPERCase(IDFRecords(Num)%Name)) + CASE('ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW') + IF (SameString(TRIM(IDFRecords(Num)%Alphas(7)), 'FAN:VARIABLEVOLUME')) THEN + vavFanNameToDelete(VRFTU_i) =TRIM(IDFRecords(Num)%Alphas(8)) + ELSE + vavFanNameToDelete(VRFTU_i) = '' + ENDIF + VRFTU_i = VRFTU_i + 1 + END SELECT + END DO + + ! accumulate info on VAV fans + NumFanVariableVolume = GetNumObjectsFound('FAN:VARIABLEVOLUME') + IF (ALLOCATED(OldFanVO)) DEALLOCATE(OldFanVO) + ALLOCATE(OldFanVO(NumFanVariableVolume)) + NumOldFanVO = 1 + DO Num = 1, NumIDFRecords + SELECT CASE (MakeUPPERCase(IDFRecords(Num)%Name)) + CASE ('FAN:VARIABLEVOLUME') + OldFanVO(NumOldFanVO)%oldFanName = TRIM(IDFRecords(Num)%Alphas(1)) + OldFanVO(NumOldFanVO)%availSchedule = TRIM(IDFRecords(Num)%Alphas(2)) + OldFanVO(NumOldFanVO)%fanTotalEff_str = TRIM(IDFRecords(Num)%Numbers(1)) + OldFanVO(NumOldFanVO)%pressureRise_str = TRIM(IDFRecords(Num)%Numbers(2)) + OldFanVO(NumOldFanVO)%maxAirFlow_str = TRIM(IDFRecords(Num)%Numbers(3)) + OldFanVO(NumOldFanVO)%minFlowInputMethod = TRIM(IDFRecords(Num)%Alphas(3)) + OldFanVO(NumOldFanVO)%minAirFlowFrac_str = TRIM(IDFRecords(Num)%Numbers(4)) + OldFanVO(NumOldFanVO)%fanPowerMinAirFlow_str = TRIM(IDFRecords(Num)%Numbers(5)) + OldFanVO(NumOldFanVO)%motorEfficiency = TRIM(IDFRecords(Num)%Numbers(6)) + OldFanVO(NumOldFanVO)%motorInAirStreamFrac = TRIM(IDFRecords(Num)%Numbers(7)) + OldFanVO(NumOldFanVO)%coeff1 = TRIM(IDFRecords(Num)%Numbers(8)) !- Coefficient1 Constant + OldFanVO(NumOldFanVO)%coeff2 = TRIM(IDFRecords(Num)%Numbers(9)) !- Coefficient2 x + OldFanVO(NumOldFanVO)%coeff3 = TRIM(IDFRecords(Num)%Numbers(10)) !- Coefficient3 x**2 + OldFanVO(NumOldFanVO)%coeff4 = TRIM(IDFRecords(Num)%Numbers(11)) !- Coefficient4 x**3 + OldFanVO(NumOldFanVO)%coeff5 = TRIM(IDFRecords(Num)%Numbers(12)) !- Coefficient5 x**4 + OldFanVO(NumOldFanVO)%inletAirNodeName = TRIM(IDFRecords(Num)%Alphas(4)) + OldFanVO(NumOldFanVO)%outletAirNodeName = TRIM(IDFRecords(Num)%Alphas(5)) + OldFanVO(NumOldFanVO)%endUseSubCat = TRIM(IDFRecords(Num)%Alphas(6)) + IF (FindItemInList(TRIM(IDFRecords(Num)%Alphas(1)), vavFanNameToDelete, NumVRFTU) /= 0) THEN + DeleteThisRecord(Num) = .TRUE. + ENDIF + NumOldFanVO = NumOldFanVO + 1 + END SELECT + END DO + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! P R O C E S S I N G ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -468,6 +553,13 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ! If your original object starts with N, insert the rules here ! If your original object starts with O, insert the rules here + CASE('OUTPUTCONTROL:FILES') + CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits) + nodiff=.false. + OutArgs(1:8)=InArgs(1:8) + OutArgs(9) = InArgs(9) ! Set new Output Space Sizing the same as old Output Zone Sizing + OutArgs(10:CurArgs+1)=InArgs(9:CurArgs) + CurArgs = CurArgs + 1 ! If your original object starts with P, insert the rules here @@ -485,6 +577,104 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile ! If your original object starts with Z, insert the rules here +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + CASE('ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW') + isVariableVolume = .FALSE. + CALL GetNewObjectDefInIDD(ObjectName, NwNumArgs, NwAorN, NwReqFld, NwObjMinFlds, NwFldNames, NwFldDefaults, NwFldUnits) + nodiff = .false. + OutArgs(1:13) = InArgs(1:13) + IF (SameString(InArgs(14), 'FAN:VARIABLEVOLUME')) THEN + isVariableVolume = .TRUE. + OutArgs(14) = 'Fan:SystemModel' + OutArgs(15) = TRIM(InArgs(15)) + sysFanName = TRIM(InArgs(15)) + ELSE + OutArgs(14:15) = InArgs(14:15) + ENDIF + OutArgs(16:CurArgs) = InArgs(16:CurArgs) + CALL WriteOutIDFLines(DifLfn, 'ZoneHVAC:TerminalUnit:VariableRefrigerantFlow', CurArgs, OutArgs, NwFldNames, NwFldUnits) + + IF (isVariableVolume) THEN + ! create fan system model object + ObjectName = 'Fan:SystemModel' + DO Num3 = 1, NumFanVariableVolume + IF (SameString(OldFanVO(Num3)%oldFanName, sysFanName)) THEN + CALL GetNewObjectDefInIDD(ObjectName, NwNumArgs, NwAorN, NwReqFld, NwObjMinFlds, NwFldNames, NwFldDefaults, NwFldUnits) + OutArgs(1) = TRIM(sysFanName) + OutArgs(2) = OldFanVO(Num3)%availSchedule + OutArgs(3) = OldFanVO(Num3)%inletAirNodeName + OutArgs(4) = OldFanVO(Num3)%outletAirNodeName + OutArgs(5) = OldFanVO(Num3)%maxAirFlow_str + OutArgs(6) = 'Continuous' !- Speed Control Method + IF (SameString(OldFanVO(Num3)%minFlowInputMethod, "FixedFlowRate")) THEN + IF (.NOT. SameString(OldFanVO(Num3)%maxAirFlow_str, "AUTOSIZE")) THEN + fanPowerMinAirFlow = ProcessNumber(OldFanVO(Num3)%fanPowerMinAirFlow_str, ErrFlag) + IF (ErrFlag) THEN + CALL ShowSevereError('Invalid Number, FAN:VARIABLEVOLUME field 8, Fan Power Minimum Air Flow Rate, Name=' // TRIM(OutArgs(1)), Auditf) + END IF + maxAirFlow = ProcessNumber(OldFanVO(Num3)%maxAirFlow_str, ErrFlag) + IF (ErrFlag) THEN + CALL ShowSevereError('Invalid Number, FAN:VARIABLEVOLUME field 5, Maximum Flow Rate, Name=' // TRIM(OutArgs(1)), Auditf) + END IF + WRITE(OutArgs(7), '(F15.5)') (fanPowerMinAirFlow / maxAirFlow) + ELSE ! maxAirFlow_stris autosize + fanPowerMinAirFlow = ProcessNumber(OldFanVO(Num3)%fanPowerMinAirFlow_str, ErrFlag) + IF (ErrFlag) THEN + CALL ShowSevereError('Invalid Number, FAN:VARIABLEVOLUME field 8, Fan Power Minimum Air Flow Rate, Name=' // TRIM(OutArgs(1)), Auditf) + END IF + IF (.NOT. fanPowerMinAirFlow == 0) THEN ! don't know how to do division with autosize + CALL writePreprocessorObject(DifLfn, PrognameConversion, 'Warning', & + 'Cannot calculate Electric Power Minimum Flow Rate Fraction for Fan:SystemModel=' // sysFanName // & + ' when old Fan:VariableVolume Maximum Flow Rate is autosize and Fan Power Minimum Air Flow Rate is non-zero. ' // & + 'Electric Power Minimum Flow Rate Fraction is set to zero. ' // & + 'Manually size the Maximum Flow Rate if Electric Power Minimum Flow Rate Fraction should not be zero.') + CALL ShowWarningError('Cannot calculate Electric Power Minimum Flow Rate Fraction for Fan:SystemModel=' // sysFanName // & + ' when old Fan:VariableVolume Maximum Flow Rate is autosize and Fan Power Minimum Air Flow Rate is non-zero. ' // & + 'Electric Power Minimum Flow Rate Fraction is set to zero. ' // & + 'Manually size the Maximum Flow Rate if Electric Power Minimum Flow Rate Fraction should not be zero.', Auditf) + END IF + OutArgs(7) = '0.0' + ENDIF + ELSE ! input method is "Fraction" + OutArgs(7) = OldFanVO(Num3)%minAirFlowFrac_str + ENDIF + OutArgs(8) = OldFanVO(Num3)%pressureRise_str !- Design Pressure Rise {Pa} + OutArgs(9) = OldFanVO(Num3)%motorEfficiency !- Motor Efficiency + OutArgs(10) = OldFanVO(Num3)%motorInAirStreamFrac !- Motor In Air Stream Fraction + OutArgs(11) = 'autosize' + OutArgs(12) = 'TotalEfficiencyAndPressure' ! chose this becuase power per flow or per pressure are unknown + OutArgs(13) = '' !- Electric Power Per Unit Flow Rate {W/(m3/s)} + OutArgs(14) = '' !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + OutArgs(15) = OldFanVO(Num3)%fanTotalEff_str !- Fan Total Efficiency + OutArgs(16) = TRIM(sysFanName) // '_curve' !- Electric Power Function of Flow Fraction Curve Name + OutArgs(17) = '' + OutArgs(18) = '' + OutArgs(19) = '' + OutArgs(20) = '' + OutArgs(21) = OldFanVO(Num3)%endUseSubCat !- End-Use Subcategory + CurArgs = 21 !- Design Electric Power Consumption {W} + CALL WriteOutIDFLines(DifLfn, ObjectName, CurArgs, OutArgs, NwFldNames, NwFldUnits) + + ! create curve object + ObjectName = 'Curve:Quartic' + CALL GetNewObjectDefInIDD(ObjectName, NwNumArgs, NwAorN, NwReqFld, NwObjMinFlds, NwFldNames, NwFldDefaults, NwFldUnits) + OutArgs(1) = TRIM(sysFanName) // '_curve' + OutArgs(2) = OldFanVO(Num3)%coeff1 !- Coefficient1 Constant + OutArgs(3) = OldFanVO(Num3)%coeff2 !- Coefficient2 x + OutArgs(4) = OldFanVO(Num3)%coeff3 !- Coefficient3 x**2 + OutArgs(5) = OldFanVO(Num3)%coeff4 !- Coefficient4 x**3 + OutArgs(6) = OldFanVO(Num3)%coeff5 !- Coefficient5 x**4 + OutArgs(7) = '0.0' !- Minimum Value of x + OutArgs(8) = '1.0' !- Maximum Value of x + OutArgs(9) = '0.0' !- Minimum Curve Output + OutArgs(10) = '5.0' !- Maximum Curve Output + OutArgs(11) = 'Dimensionless' !- Input Unit Type for X + OutArgs(12) = 'Dimensionless' !- Output Unit Type + CurArgs = 12 + ENDIF + ENDDO + ENDIF + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Changes for report variables, meters, tables -- update names ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/Transition/InputRulesFiles/Rules24-1-0-to-24-2-0.md b/src/Transition/InputRulesFiles/Rules24-1-0-to-24-2-0.md index dd4cf24cda0..e545df13553 100644 --- a/src/Transition/InputRulesFiles/Rules24-1-0-to-24-2-0.md +++ b/src/Transition/InputRulesFiles/Rules24-1-0-to-24-2-0.md @@ -50,7 +50,14 @@ There are three new optional heat recovery fields at the end which transition wi # Object Change: ObjectStartsWithN -# Object Change: ObjectStartsWithO +# Object Change: OutputControl:Files +Insert new field F9 "A9 , \field Output Space Sizing" +Set this to the same value as the old F9 "A9 , \field Output Zone Sizing". +Shift remaining fields down 1. +See pull request [#10566](https://github.com/NREL/EnergyPlus/pull/10566) for more details. + +# epJSON Field Name Change: Output:IlluminanceMap +`zone_name` --> `zone_or_space_name` # Object Change: ObjectStartsWithP @@ -72,4 +79,26 @@ There are three new optional heat recovery fields at the end which transition wi # Object Change: ObjectStartsWithY -# Object Change: ObjectStartsWithZ +# epJSON Field Name Changes: ZoneRefrigerationDoorMixing +`zone_1_name` --> `zone_or_space_name_1` +`zone_2_name` --> `zone_or_space_name_2` + +# epJSON Field Name Changes: ZoneCoolTower:Shower +`zone_name` --> `zone_or_space_name` + +# epJSON Field Name Changes: ZoneThermalChimney +`zone_1_name` --> `zone_or_space_name_1` +`relative_ratios_of_air_flow_rates_passing_through_zone_1` --> `relative_ratios_of_air_flow_rates_passing_through_inlet_1` +thru +`zone_20_name` --> `zone_or_space_name_20` +`relative_ratios_of_air_flow_rates_passing_through_zone_20` --> `relative_ratios_of_air_flow_rates_passing_through_inlet_20` + +## "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow" + +If field "Supply Air Fan Object Type" (A7, the 14th field) in +"ZoneHVAC:TerminalUnit:VariableRefrigerantFlow" is "Fan:VariableVolume", it +needs to be changed to "Fan:SystemModel". A "Fan:SystemModel" object need to be +created based on the former "Fan:VariableVolume" object. A fan power curve will +be created as well that holds the "Fan Power Coefficient i" in Fan:VariableVolume. + +See PR https://github.com/NREL/EnergyPlus/pull/10341 diff --git a/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md b/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md index ee0d911e964..06aa8ae379c 100644 --- a/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md +++ b/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md @@ -50,11 +50,12 @@ Temperature The EIO and html tabular output files now have a seprate heading and data stream for DX Heating Coils with the AHRI 2023 and prior versions. +``` ! , Component Type, Component Name, High Temperature Heating (net) Rating Capacity {W}, Low Temperature Heating (net) Rating Capacity {W}, HSPF {Btu/W-h}, Region Number ! , Component Type, Component Name, High Temperature Heating (net) Rating Capacity {W}, Low Temperature Heating (net) Rating Capacity {W}, HSPF2 {Btu/W-h}, Region Number +``` - -### Euipment Summary Report +### Equipment Summary Report Renamed a table name in the Equipment Summary report: @@ -115,8 +116,12 @@ In the Demand Controlled Ventilation table added the "type" Added an entirely new table called Thermostat Schedules -## New HVAC Topology report in Tabular Reports +### New HVAC Topology report in Tabular Reports The HVAC Topology report provides information about the arrangement of HVAC components in the supply and demand side of the airloop, zone equipment, and plant loop. Each row shows the additional component, sub-component, or sub-sub-component being added to the arrangement. +### New Space Sizing Output File (spsz) +When space sizing is active (ZoneAirHeatBalanceAlgorithm, "Do Space Heat Balance for Sizing=Yes") a new space sizing (spsz) output file is created, similar to the existing zone sizing (zsz) output. A new field "Output Space Sizing" has been added to OutputControl:Files to control this file. + +See pull request [#10566](https://github.com/NREL/EnergyPlus/pull/10566) for more details. diff --git a/testfiles/5ZoneAirCooledWithSpacesDaylightingIntMass.idf b/testfiles/5ZoneAirCooledWithSpacesDaylightingIntMass.idf new file mode 100644 index 00000000000..cd1d76f745e --- /dev/null +++ b/testfiles/5ZoneAirCooledWithSpacesDaylightingIntMass.idf @@ -0,0 +1,3981 @@ +!-Generator IDFEditor 1.51 +!-Option OriginalOrderTop UseSpecialFormat +!-NOTE: All comments with '!-' are ignored by the IDFEditor and are generated automatically. +!- Use '!' comments if they need to be retained when using the IDFEditor. +! 5ZoneAirCooledWithSpaces.idf +! Basic file description: 1 story building divided into 4 exterior and one interior conditioned zones and return plenum. +! Two of the zones are divided into spaces. Zone 5 is divided into 2 spaces using floor surfaces only +! which results in both spaces being in the same enclosure. Zone 3 is divided into 3 spaces, one +! fully enclosed space (this is one enclosure) and two spaces joined by an air boundary (this is another enclosure). +! +! Highlights: Illustrates various uses of Space. Electric chiller with air cooled condenser; autosized preheating and +! precooling water coils in the outside air stream controlled to preheat and precool setpoints. +! +! Simulation Location/Run: CHICAGO_IL_USA TMY2-94846, 2 design days, 2 run periods, +! Run Control executes the run periods using the weather file +! +! Location: Chicago, IL +! +! Design Days: CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, MaxDB= -17.3°C +! CHICAGO_IL_USA Annual Cooling 1% Design Conditions, MaxDB= 31.5°C MCWB= 23.0°C +! +! Run Period (Weather File): 1/1 through 12/31, CHICAGO_IL_USA TMY2-94846 +! +! Run Control: Zone and System sizing with weather file run control (no design days run) +! +! Building: Single floor rectangular building 100 ft x 50 ft. 5 zones - 4 exterior, 1 interior, zone height 8 feet. +! Exterior zone depth is 12 feet. There is a 2 foot high return plenum: the overall building height is +! 10 feet. There are windows on all 4 facades; the south and north facades have glass doors. +! The south facing glass is shaded by overhangs. The walls are woodshingle over plywood, R11 insulation, +! and gypboard. The roof is a gravel built up roof with R-3 mineral board insulation and plywood sheathing. +! The windows are of various single and double pane construction with 3mm and 6mm glass and either 6mm or +! 13mm argon or air gap. The window to wall ratio is approximately 0.29. +! The south wall and door have overhangs. +! +! The building is oriented 30 degrees east of north. +! +! Floor Area: 463.6 m2 (5000 ft2) +! Number of Stories: 1 +! +! Zone Description Details: +! +! (0,15.2,0) (30.5,15.2,0) +! _____ ________ ____ +! |\ *** **************** /| +! | \ / | +! | \ (26.8,11.6,0) / | +! * \_____________________________/ * +! * |(3.7,11.6,0) | * +! * | | * +! * | | * +! * | (26.8,3.7,0)| * +! * |___________________________| * +! * / (3.7,3.7,0) \ * +! | / \ | +! | / \ | +! |/___******************___***________\| +! | Overhang | | +! |_______________________| | window/door = * +! |___| +! +! (0,0,0) (30.5,0,0) +! +! Internal gains description: lighting is 1.5 watts/ft2, office equip is 1.0 watts/ft2. There is 1 occupant +! per 100 ft2 of floor area. The infiltration is 0.25 air changes per hour. +! +! Interzone Surfaces: 6 interzone surfaces (see diagram) +! Internal Mass: None +! People: 50 +! Lights: 7500 W +! Windows: 4 ea.: 1) Double pane clear, 3mm glass, 13mm air gap +! 2) Double pane clear, 3mm glass, 13mm argon gap +! 3) Double pane clear, 6mm glass, 6mm air gap +! 4) Double pane lowE, 6mm lowE glass outside, 6mm air gap, 6mm clear glass +! +! Doors: 2 ea.: Single pane grey, 3mm glass +! +! Detached Shading: None +! Daylight: None +! Natural Ventilation: None +! Compact Schedules: Yes +! +! HVAC: Standard VAV system with outside air, hot water reheat coils, +! central chilled water cooling coil. Central Plant is single hot water +! boiler, electric compression chiller with air cooled condenser. +! All equipment is autosized. HW and ChW coils are used in the outside air +! stream to precondition the outside air. +! +! Zonal Equipment: AirTerminal:SingleDuct:VAV:Reheat +! Central Air Handling Equipment: Yes +! System Equipment Autosize: Yes +! Purchased Cooling: None +! Purchased Heating: None +! Coils: Coil:Cooling:Water, Coil:Heating:Water +! Pumps: Pump:VariableSpeed +! Boilers: Boiler:HotWater +! Chillers: Chiller:Electric +! +! Results: +! Standard Reports: None +! Timestep or Hourly Variables: Hourly +! Time bins Report: None +! HTML Report: None +! Environmental Emissions: None +! Utility Tariffs: None + + Version,24.2; + + Building, + Building, !- Name + 30., !- North Axis {deg} + City, !- Terrain + 0.04, !- Loads Convergence Tolerance Value {W} + 0.4, !- Temperature Convergence Tolerance Value {deltaC} + FullExterior, !- Solar Distribution + 25, !- Maximum Number of Warmup Days + 6; !- Minimum Number of Warmup Days + + Timestep,4; + + SurfaceConvectionAlgorithm:Inside,Simple; + + SurfaceConvectionAlgorithm:Outside,SimpleCombined; + + HeatBalanceAlgorithm,ConductionTransferFunction; + + GlobalGeometryRules, + UpperLeftCorner, !- Starting Vertex Position + CounterClockWise, !- Vertex Entry Direction + Relative, !- Coordinate System + Relative; !- Daylighting Reference Point Coordinate System + + ScheduleTypeLimits, + Any Number; !- Name + + ScheduleTypeLimits, + Fraction, !- Name + 0.0, !- Lower Limit Value + 1.0, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + + ScheduleTypeLimits, + Temperature, !- Name + -60, !- Lower Limit Value + 200, !- Upper Limit Value + CONTINUOUS, !- Numeric Type + Temperature; !- Unit Type + + ScheduleTypeLimits, + Control Type, !- Name + 0, !- Lower Limit Value + 4, !- Upper Limit Value + DISCRETE; !- Numeric Type + + ScheduleTypeLimits, + On/Off, !- Name + 0, !- Lower Limit Value + 1, !- Upper Limit Value + DISCRETE; !- Numeric Type + + ScheduleTypeLimits, + FlowRate, !- Name + 0.0, !- Lower Limit Value + 10, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + + RunPeriod, + January, !- Name + 1, !- Begin Month + 1, !- Begin Day of Month + , !- Begin Year + 1, !- End Month + 31, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + RunPeriod, + July, !- Name + 7, !- Begin Month + 1, !- Begin Day of Month + , !- Begin Year + 7, !- End Month + 31, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + Site:Location, + CHICAGO_IL_USA TMY2-94846, !- Name + 41.78, !- Latitude {deg} + -87.75, !- Longitude {deg} + -6.00, !- Time Zone {hr} + 190.00; !- Elevation {m} + + SimulationControl, + Yes, !- Do Zone Sizing Calculation + Yes, !- Do System Sizing Calculation + Yes, !- Do Plant Sizing Calculation + No, !- Run Simulation for Sizing Periods + Yes, !- Run Simulation for Weather File Run Periods + No, !- Do HVAC Sizing Simulation for Sizing Periods + 1; !- Maximum Number of HVAC Sizing Simulation Passes + +! CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, MaxDB= -17.3°C + + SizingPeriod:DesignDay, + CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, !- Name + 1, !- Month + 21, !- Day of Month + WinterDesignDay, !- Day Type + -17.3, !- Maximum Dry-Bulb Temperature {C} + 0.0, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + -17.3, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 99063., !- Barometric Pressure {Pa} + 4.9, !- Wind Speed {m/s} + 270, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 0.0; !- Sky Clearness + +! CHICAGO_IL_USA Annual Cooling 1% Design Conditions, MaxDB= 31.5°C MCWB= 23.0°C + + SizingPeriod:DesignDay, + CHICAGO_IL_USA Annual Cooling 1% Design Conditions DB/MCWB, !- Name + 7, !- Month + 21, !- Day of Month + SummerDesignDay, !- Day Type + 31.5, !- Maximum Dry-Bulb Temperature {C} + 10.7, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 23.0, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 99063., !- Barometric Pressure {Pa} + 5.3, !- Wind Speed {m/s} + 230, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 1.0; !- Sky Clearness + + Site:GroundTemperature:BuildingSurface,20.03,20.03,20.13,20.30,20.43,20.52,20.62,20.77,20.78,20.55,20.44,20.20; + + Material, + WD10, !- Name + MediumSmooth, !- Roughness + 0.667, !- Thickness {m} + 0.115, !- Conductivity {W/m-K} + 513, !- Density {kg/m3} + 1381, !- Specific Heat {J/kg-K} + 0.9, !- Thermal Absorptance + 0.78, !- Solar Absorptance + 0.78; !- Visible Absorptance + + Material, + RG01, !- Name + Rough, !- Roughness + 1.2700000E-02, !- Thickness {m} + 1.442000, !- Conductivity {W/m-K} + 881.0000, !- Density {kg/m3} + 1674.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + Material, + BR01, !- Name + VeryRough, !- Roughness + 9.4999997E-03, !- Thickness {m} + 0.1620000, !- Conductivity {W/m-K} + 1121.000, !- Density {kg/m3} + 1464.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7000000, !- Solar Absorptance + 0.7000000; !- Visible Absorptance + + Material, + IN46, !- Name + VeryRough, !- Roughness + 7.6200001E-02, !- Thickness {m} + 2.3000000E-02, !- Conductivity {W/m-K} + 24.00000, !- Density {kg/m3} + 1590.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.5000000, !- Solar Absorptance + 0.5000000; !- Visible Absorptance + + Material, + WD01, !- Name + MediumSmooth, !- Roughness + 1.9099999E-02, !- Thickness {m} + 0.1150000, !- Conductivity {W/m-K} + 513.0000, !- Density {kg/m3} + 1381.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7800000, !- Solar Absorptance + 0.7800000; !- Visible Absorptance + + Material, + PW03, !- Name + MediumSmooth, !- Roughness + 1.2700000E-02, !- Thickness {m} + 0.1150000, !- Conductivity {W/m-K} + 545.0000, !- Density {kg/m3} + 1213.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7800000, !- Solar Absorptance + 0.7800000; !- Visible Absorptance + + Material, + IN02, !- Name + Rough, !- Roughness + 9.0099998E-02, !- Thickness {m} + 4.3000001E-02, !- Conductivity {W/m-K} + 10.00000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + GP01, !- Name + MediumSmooth, !- Roughness + 1.2700000E-02, !- Thickness {m} + 0.1600000, !- Conductivity {W/m-K} + 801.0000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + GP02, !- Name + MediumSmooth, !- Roughness + 1.5900001E-02, !- Thickness {m} + 0.1600000, !- Conductivity {W/m-K} + 801.0000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + CC03, !- Name + MediumRough, !- Roughness + 0.1016000, !- Thickness {m} + 1.310000, !- Conductivity {W/m-K} + 2243.000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + Material:NoMass, + CP01, !- Name + Rough, !- Roughness + 0.3670000, !- Thermal Resistance {m2-K/W} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material:NoMass, + MAT-CLNG-1, !- Name + Rough, !- Roughness + 0.652259290, !- Thermal Resistance {m2-K/W} + 0.65, !- Thermal Absorptance + 0.65, !- Solar Absorptance + 0.65; !- Visible Absorptance + + Material:AirGap, + AL21, !- Name + 0.1570000; !- Thermal Resistance {m2-K/W} + + Material:AirGap, + AL23, !- Name + 0.1530000; !- Thermal Resistance {m2-K/W} + + Construction, + ROOF-1, !- Name + RG01, !- Outside Layer + BR01, !- Layer 2 + IN46, !- Layer 3 + WD01; !- Layer 4 + + Construction, + WALL-1, !- Name + WD01, !- Outside Layer + PW03, !- Layer 2 + IN02, !- Layer 3 + GP01; !- Layer 4 + + Construction, + CLNG-1, !- Name + MAT-CLNG-1; !- Outside Layer + + Construction, + FLOOR-SLAB-1, !- Name + CC03; !- Outside Layer + + Construction, + INT-WALL-1, !- Name + GP02, !- Outside Layer + AL21, !- Layer 2 + GP02; !- Layer 3 + + WindowMaterial:Gas, + AIR 13MM, !- Name + Air, !- Gas Type + 0.0127; !- Thickness {m} + + WindowMaterial:Glazing, + CLEAR 3MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.837, !- Solar Transmittance at Normal Incidence + 0.075, !- Front Side Solar Reflectance at Normal Incidence + 0.075, !- Back Side Solar Reflectance at Normal Incidence + 0.898, !- Visible Transmittance at Normal Incidence + 0.081, !- Front Side Visible Reflectance at Normal Incidence + 0.081, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + WindowMaterial:Glazing, + GREY 3MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.626, !- Solar Transmittance at Normal Incidence + 0.061, !- Front Side Solar Reflectance at Normal Incidence + 0.061, !- Back Side Solar Reflectance at Normal Incidence + 0.611, !- Visible Transmittance at Normal Incidence + 0.061, !- Front Side Visible Reflectance at Normal Incidence + 0.061, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + Construction, + Dbl Clr 3mm/13mm Air, !- Name + CLEAR 3MM, !- Outside Layer + AIR 13MM, !- Layer 2 + CLEAR 3MM; !- Layer 3 + + Construction, + Sgl Grey 3mm, !- Name + GREY 3MM; !- Outside Layer + + Schedule:Compact, + OCCUPY-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00,0.0, !- Field 3 + Until: 11:00,1.00, !- Field 5 + Until: 12:00,0.80, !- Field 7 + Until: 13:00,0.40, !- Field 9 + Until: 14:00,0.80, !- Field 11 + Until: 18:00,1.00, !- Field 13 + Until: 19:00,0.50, !- Field 15 + Until: 24:00,0.0, !- Field 17 + For: Weekends WinterDesignDay Holiday, !- Field 19 + Until: 24:00,0.0; !- Field 20 + + Schedule:Compact, + LIGHTS-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00,0.05, !- Field 3 + Until: 9:00,0.9, !- Field 5 + Until: 10:00,0.95, !- Field 7 + Until: 11:00,1.00, !- Field 9 + Until: 12:00,0.95, !- Field 11 + Until: 13:00,0.8, !- Field 13 + Until: 14:00,0.9, !- Field 15 + Until: 18:00,1.00, !- Field 17 + Until: 19:00,0.60, !- Field 19 + Until: 21:00,0.20, !- Field 21 + Until: 24:00,0.05, !- Field 23 + For: Weekends WinterDesignDay Holiday, !- Field 25 + Until: 24:00,0.05; !- Field 26 + + Schedule:Compact, + EQUIP-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00,0.02, !- Field 3 + Until: 9:00,0.4, !- Field 5 + Until: 14:00,0.9, !- Field 7 + Until: 15:00,0.8, !- Field 9 + Until: 16:00,0.7, !- Field 11 + Until: 18:00,0.5, !- Field 13 + Until: 20:00,0.3, !- Field 15 + Until: 24:00,0.02, !- Field 17 + For: Weekends WinterDesignDay Holiday, !- Field 19 + Until: 24:00,0.2; !- Field 20 + + Schedule:Compact, + INFIL-SCH, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0, !- Field 3 + Through: 10/31, !- Field 5 + For: AllDays, !- Field 6 + Until: 24:00,0.0, !- Field 7 + Through: 12/31, !- Field 9 + For: AllDays, !- Field 10 + Until: 24:00,1.0; !- Field 11 + + Schedule:Compact, + ActSchd, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,117.239997864; !- Field 3 + + !- Field 4 + + Schedule:Compact, + ShadeTransSch, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,0.0; !- Field 3 + + Space, + Space 5 Office, !- Name + Zone 5, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Office, !- Space Type + Std 62.1 Office Space, !- Tag 1 + Std 90.1 Office-Open Plan; !- Tag 2 + + Space, + Space 5 Conference, !- Name + Zone 5, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Conference, !- Space Type + Std 62.1 Conference/meeting, !- Tag 1 + Std 90.1 Conference/Meeting/Multipurpose; !- Tag 2 + + Space, + Space 2, !- Name + Zone 2, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Reception, !- Space Type + Std 62.1 Reception areas,!- Tag 1 + Std 90.1 Lobby; !- Tag 2 + + Space, + Space 3 Open Office 1, !- Name + Zone 3, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Office, !- Space Type + Std 62.1 Office Space, !- Tag 1 + Std 90.1 Office-Open Plan; !- Tag 2 + + Space, + Space 3 Open Office 2, !- Name + Zone 3, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Office, !- Space Type + Std 62.1 Office Space, !- Tag 1 + Std 90.1 Office-Open Plan; !- Tag 2 + + Space, + Space 3 Storage, !- Name + Zone 3, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Storage, !- Space Type + Std 62.1 Storage, !- Tag 1 + Std 90.1 Storage; !- Tag 2 + + Space, + Space 4, !- Name + Zone 4, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Office, !- Space Type + Std 62.1 Office Space, !- Tag 1 + Std 90.1 Office-Open Plan; !- Tag 2 + + Space, + Space 1, !- Name + Zone 1, !- Zone Name + autocalculate, !- Ceiling Height {m} + autocalculate, !- Volume {m3} + , !- Floor Area {m2} + Office, !- Space Type + Std 62.1 Office Space, !- Tag 1 + Std 90.1 Office-Open Plan; !- Tag 2 + + SpaceList, + AllConditionedSpaces, !- Name + Space 1, !- Space 1 Name + Space 2, !- Space 2 Name + Space 3 Open Office 1, !- Space 3 Name + Space 3 Open Office 2, !- Space 4 Name + Space 3 Storage, !- Space 5 Name + Space 4, !- Space 6 Name + Space 5 Office, !- Space 7 Name + Space 5 Conference; !- Space 8 Name + + ZoneList, + All Zones, !- Name + Zone 1, !- Zone 1 Name + Zone 2, !- Zone 2 Name + Zone 3, !- Zone 3 Name + Zone 4, !- Zone 4 Name + Zone 5; !- Zone 5 Name + + Zone, + PLENUM-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 0.609600067, !- Ceiling Height {m} + 283.2, !- Volume {m3} + , !- Floor Area {m2} + , !- Zone Inside Convection Algorithm + , !- Zone Outside Convection Algorithm + No; !- Part of Total Floor Area + + BuildingSurface:Detailed, + WALL-1PF, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,0.0,3.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 30.5,0.0,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + WALL-1PR, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,0.0,3.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + WALL-1PB, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,3.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 0.0,15.2,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + WALL-1PL, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,3.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 0.0,0.0,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + TOP-1, !- Name + ROOF, !- Surface Type + ROOF-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.00000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,3.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,3.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,3.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C1-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C1-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C2-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C2-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C3-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C3-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 3, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,15.2,2.4; !- X,Y,Z ==> Vertex 3 {m} + + BuildingSurface:Detailed, + C3-2P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C3-2, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 12.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C3-3P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C3-3, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,11.6,2.4, !- X,Y,Z ==> Vertex 2 {m} + 12.0,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C4-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C4-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C5-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C5-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + Zone 1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 239.247360229; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + Zone 1 Infil 1, !- Name + Zone 1, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.032, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + Zone 1 People, !- Name + Zone 1, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 11, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + Zone 1 Lights, !- Name + Zone 1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 1584, !- Lighting Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 1.0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + Daylighting:Controls, + Zone 1 Daylighting Control, !- Name + Zone 1, !- Zone or Space Name + SplitFlux, !- Daylighting Method + , !- Availability Schedule Name + Stepped, !- Lighting Control Type + 0.3000, !- Minimum Input Power Fraction for Continuous or ContinuousOff Dimming Control + 0.2000, !- Minimum Light Output Fraction for Continuous or ContinuousOff Dimming Control + 3, !- Number of Stepped Control Steps + 1.0000, !- Probability Lighting will be Reset When Needed in Manual Stepped Control + Zone 1 Reference Point1, !- Glare Calculation Daylighting Reference Point Name + 180, !- Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis {deg} + 20, !- Maximum Allowable Discomfort Glare Index + , !- DElight Gridding Resolution {m2} + Zone 1 Reference Point1, !- Daylighting Reference Point 1 Name + 1.0000, !- Fraction of Lights Controlled by Reference Point 1 + 400.0000; !- Illuminance Setpoint at Reference Point 1 {lux} + + Daylighting:ReferencePoint, + Zone 1 Reference Point1, !- Name + Zone 1, !- Zone or Space Name + 15.0, !- X-Coordinate of Reference Point {m} + 3.0, !- Y-Coordinate of Reference Point {m} + 0.7; !- Z-Coordinate of Reference Point {m} + + Output:IlluminanceMap, + Zone 1 Daylit Map, !- Name + Zone 1, !- Zone Name + 0.8, !- Z height {m} + 3.9, !- X Minimum Coordinate {m} + 26.6, !- X Maximum Coordinate {m} + 5, !- Number of X Grid Points + 0.2, !- Y Minimum Coordinate {m} + 3.5, !- Y Maximum Coordinate {m} + 5; !- Number of Y Grid Points + + ElectricEquipment, + All Spaces Elec Equip, !- Name + AllConditionedSpaces, !- Zone or ZoneList or Space or SpaceList Name + EQUIP-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Design Level {W} + 10.0, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + BuildingSurface:Detailed, + FRONT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + Zone 1, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WF-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + FRONT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 3.0,0.0,2.1, !- X,Y,Z ==> Vertex 1 {m} + 3.0,0.0,0.9, !- X,Y,Z ==> Vertex 2 {m} + 16.8,0.0,0.9, !- X,Y,Z ==> Vertex 3 {m} + 16.8,0.0,2.1; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + DF-1, !- Name + GLASSDOOR, !- Surface Type + Sgl Grey 3mm, !- Construction Name + FRONT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 21.3,0.0,2.1, !- X,Y,Z ==> Vertex 1 {m} + 21.3,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 23.8,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 23.8,0.0,2.1; !- X,Y,Z ==> Vertex 4 {m} + + Shading:Zone:Detailed, + Main South Overhang, !- Name + FRONT-1, !- Base Surface Name + ShadeTransSch, !- Transmittance Schedule Name + 4, !- Number of Vertices + 0.0,-1.3,2.2, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.2, !- X,Y,Z ==> Vertex 2 {m} + 19.8,0.0,2.2, !- X,Y,Z ==> Vertex 3 {m} + 19.8,-1.3,2.2; !- X,Y,Z ==> Vertex 4 {m} + + Shading:Zone:Detailed, + South Door Overhang, !- Name + FRONT-1, !- Base Surface Name + ShadeTransSch, !- Transmittance Schedule Name + 4, !- Number of Vertices + 21.0,-2.0,2.6, !- X,Y,Z ==> Vertex 1 {m} + 21.0,0.0,2.6, !- X,Y,Z ==> Vertex 2 {m} + 24.1,0.0,2.6, !- X,Y,Z ==> Vertex 3 {m} + 24.1,-2.0,2.6; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C1-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C1-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F1-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 1, !- Zone Name + , !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB12, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB21, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB14, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB41, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB15, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 1, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB51, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + Zone 2, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 103.311355591; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + Zone 2 Infil 1, !- Name + Zone 2, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.014, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + Zone 2 People, !- Name + Zone 2, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 5, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + Zone 2 Lights, !- Name + Zone 2, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 684, !- Lighting Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + BuildingSurface:Detailed, + RIGHT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + Zone 2, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WR-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + RIGHT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 30.5,3.8,2.1, !- X,Y,Z ==> Vertex 1 {m} + 30.5,3.8,0.9, !- X,Y,Z ==> Vertex 2 {m} + 30.5,11.4,0.9, !- X,Y,Z ==> Vertex 3 {m} + 30.5,11.4,2.1; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C2-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 2, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C2-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F2-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 2, !- Zone Name + , !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB21, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 2, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB12, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB23, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 2, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB32, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB25, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 2, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB52, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + Zone 3, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 239.247360229; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + Zone 3 Infil, !- Name + Zone 3, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.032, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + Zone 3 People, !- Name + Zone 3, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 11, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + Space 3 Open Office 1 Lights, !- Name + Space 3 Open Office 1, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 1.0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + Daylighting:Controls, + Space 3 Open Office 1 Daylighting Control, !- Name + Space 3 Open Office 1, !- Zone or Space Name + SplitFlux, !- Daylighting Method + , !- Availability Schedule Name + Stepped, !- Lighting Control Type + 0.3000, !- Minimum Input Power Fraction for Continuous or ContinuousOff Dimming Control + 0.2000, !- Minimum Light Output Fraction for Continuous or ContinuousOff Dimming Control + 3, !- Number of Stepped Control Steps + 1.0000, !- Probability Lighting will be Reset When Needed in Manual Stepped Control + Space 3 Open Office 1 Reference Point1, !- Glare Calculation Daylighting Reference Point Name + 180, !- Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis {deg} + 20, !- Maximum Allowable Discomfort Glare Index + , !- DElight Gridding Resolution {m2} + Space 3 Open Office 1 Reference Point1, !- Daylighting Reference Point 1 Name + 1.0000, !- Fraction of Lights Controlled by Reference Point 1 + 400.0000; !- Illuminance Setpoint at Reference Point 1 {lux} + + Daylighting:ReferencePoint, + Space 3 Open Office 1 Reference Point1, !- Name + Space 3 Open Office 1, !- Zone or Space Name + 8.0, !- X-Coordinate of Reference Point {m} + 12.5, !- Y-Coordinate of Reference Point {m} + 0.7; !- Z-Coordinate of Reference Point {m} + + Output:IlluminanceMap, + Space 3 Open Office 1 Daylit Map, !- Name + Space 3 Open Office 1, !- Zone or Space Name + 0.8, !- Z height {m} + 3.8, !- X Minimum Coordinate {m} + 11.8, !- X Maximum Coordinate {m} + 5, !- Number of X Grid Points + 11.8, !- Y Minimum Coordinate {m} + 15.0, !- Y Maximum Coordinate {m} + 10; !- Number of Y Grid Points + + Lights, + Space 3 Open Office 2 Lights, !- Name + Space 3 Open Office 2, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + Lights, + Space 3 Storage Lights, !- Name + Space 3 Storage, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 5.0, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + Construction, + Furniture, !- Name + WD10; !- Outside Layer + + InternalMass, + Zone 3 Furniture, !- Name + Furniture, !- Construction Name + Zone 3, !- Zone or ZoneList Name + , !- Space or SpaceList Name + 77; !- Surface Area {m2} + + InternalMass, + Misc Furniture, !- Name + Furniture, !- Construction Name + , !- Zone or ZoneList Name + AllConditionedSpaces, !- Space or SpaceList Name + 5.0; !- Surface Area {m2} + + InternalMass, + Misc Furniture 2, !- Name + Furniture, !- Construction Name + All Zones, !- Zone or ZoneList Name + , !- Space or SpaceList Name + 2.0; !- Surface Area {m2} + + BuildingSurface:Detailed, + BACK-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Storage, !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + BACK-2, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 1, !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + BACK-3, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 2, !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 12.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 12.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Storage-Office Wall, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Storage, !- Space Name + Surface, !- Outside Boundary Condition + Office-Storage Wall, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Office-Storage Wall, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 1, !- Space Name + Surface, !- Outside Boundary Condition + Storage-Office Wall, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Construction:AirBoundary, + AirBoundary, !- Name + , !- Air Exchange Method + , !- Simple Mixing Air Changes per Hour {1/hr} + ; !- Simple Mixing Schedule Name + + BuildingSurface:Detailed, + AirWall 1, !- Name + WALL, !- Surface Type + AirBoundary, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 1, !- Space Name + Surface, !- Outside Boundary Condition + AirWall 2, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 12.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 12.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + AirWall 2, !- Name + WALL, !- Surface Type + AirBoundary, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 2, !- Space Name + Surface, !- Outside Boundary Condition + AirWall 1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 12.0,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WB-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + BACK-3, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 27.4,15.2,2.1, !- X,Y,Z ==> Vertex 1 {m} + 27.4,15.2,0.9, !- X,Y,Z ==> Vertex 2 {m} + 13.7,15.2,0.9, !- X,Y,Z ==> Vertex 3 {m} + 13.7,15.2,2.1; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + DB-1, !- Name + GLASSDOOR, !- Surface Type + Sgl Grey 3mm, !- Construction Name + BACK-2, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 9.1,15.2,2.1, !- X,Y,Z ==> Vertex 1 {m} + 9.1,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 7.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 7.0,15.2,2.1; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C3-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Storage, !- Space Name + Surface, !- Outside Boundary Condition + C3-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 3, !- Number of Vertices + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,15.2,2.4; !- X,Y,Z ==> Vertex 3 {m} + + BuildingSurface:Detailed, + C3-2, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 1, !- Space Name + Surface, !- Outside Boundary Condition + C3-2P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 3 {m} + 12.0,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C3-3, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 2, !- Space Name + Surface, !- Outside Boundary Condition + C3-3P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 12.0,11.6,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F3-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Storage, !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 3, !- Number of Vertices + 3.7,15.2,0.0, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0; !- X,Y,Z ==> Vertex 3 {m} + + BuildingSurface:Detailed, + F3-2, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 1, !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 12.0,15.2,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F3-3, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 2, !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 12.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB32, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 2, !- Space Name + Surface, !- Outside Boundary Condition + SB23, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB34, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Storage, !- Space Name + Surface, !- Outside Boundary Condition + SB43, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB35-1, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 1, !- Space Name + Surface, !- Outside Boundary Condition + SB53-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 12.0,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB35-2, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 3, !- Zone Name + Space 3 Open Office 2, !- Space Name + Surface, !- Outside Boundary Condition + SB53-2, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + Zone 4, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 103.311355591; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + Zone 4 Infil, !- Name + Zone 4, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.014, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + Zone 4 People, !- Name + Zone 4, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 5, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + Zone 4 Lights, !- Name + Zone 4, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 684, !- Lighting Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + BuildingSurface:Detailed, + LEFT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + Zone 4, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WL-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + LEFT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 0.0,11.4,2.1, !- X,Y,Z ==> Vertex 1 {m} + 0.0,11.4,0.9, !- X,Y,Z ==> Vertex 2 {m} + 0.0,3.8,0.9, !- X,Y,Z ==> Vertex 3 {m} + 0.0,3.8,2.1; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C4-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 4, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C4-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F4-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 4, !- Zone Name + , !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB41, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 4, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB14, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB43, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 4, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB34, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB45, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 4, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB54, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + Zone 5, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 447.682556152; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + Zone 5 Infil, !- Name + Zone 5, !- Zone or ZoneList or Space or SpaceList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.062, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + Zone 5 People, !- Name + Zone 5, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 20, !- Number of People + , !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + , !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + People, + ZoneList People, !- Name + All Zones, !- Zone or ZoneList or Space or SpaceList Name + OCCUPY-1, !- Number of People Schedule Name + People/Area, !- Number of People Calculation Method + , !- Number of People + 0.5, !- People per Floor Area {person/m2} + , !- Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + autocalculate, !- Sensible Heat Fraction + ActSchd, !- Activity Level Schedule Name + 0.0000000382, !- Carbon Dioxide Generation Rate {m3/s-W} + No, !- Enable ASHRAE 55 Comfort Warnings + EnclosureAveraged, !- Mean Radiant Temperature Calculation Type + , !- Surface Name/Angle Factor List Name + , !- Work Efficiency Schedule Name + ClothingInsulationSchedule; !- Clothing Insulation Calculation Method + + Lights, + Zone 5 Lights, !- Name + Zone 5, !- Zone or ZoneList or Space or SpaceList Name + LIGHTS-1, !- Schedule Name + LightingLevel, !- Design Level Calculation Method + 2964, !- Lighting Level {W} + , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.2, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + InternalMass, + Space 5 Office Furniture, !- Name + Furniture, !- Construction Name + , !- Zone or ZoneList Name + Space 5 Office, !- Space or SpaceList Name + 10.0; !- Surface Area {m2} + + InternalMass, + Space 5 Conference Furniture, !- Name + Furniture, !- Construction Name + , !- Zone or ZoneList Name + Space 5 Conference, !- Space or SpaceList Name + 5.0; !- Surface Area {m2} + + BuildingSurface:Detailed, + C5-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + Zone 5, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + C5-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F5-1a, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 5, !- Zone Name + Space 5 Office, !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 6.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 6.7,11.6,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F5-1b, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + Zone 5, !- Zone Name + Space 5 Conference, !- Space Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 6.7,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 6.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB51, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 5, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB15, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB52, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 5, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB25, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB53-1, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 5, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB35-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 12.0,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB53-2, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 5, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB35-2, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 12.0,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 12.0,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB54, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + Zone 5, !- Zone Name + , !- Space Name + Surface, !- Outside Boundary Condition + SB45, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Sizing:Parameters, + 1.0, !- Heating Sizing Factor + 1.0; !- Cooling Sizing Factor + + Sizing:Zone, + Zone 1, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 14., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA Zone 1, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDayWithLimit, !- Cooling Design Air Flow Method + , !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + , !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA Zone 1, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + Zone 2, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 14., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA Zone 2, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDayWithLimit, !- Cooling Design Air Flow Method + , !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + , !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA Zone 2, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + Zone 3, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 14., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA Zone 3, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDayWithLimit, !- Cooling Design Air Flow Method + , !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + , !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA Zone 3, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + Zone 4, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 14., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA Zone 4, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDayWithLimit, !- Cooling Design Air Flow Method + , !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + , !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA Zone 4, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + Zone 5, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 14., !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA Zone 5 List, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDayWithLimit, !- Cooling Design Air Flow Method + , !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + , !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + , !- Heating Maximum Air Flow Fraction + , !- Design Specification Zone Air Distribution Object Name + No, !- Account for Dedicated Outdoor Air System + NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy + autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} + autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + + DesignSpecification:OutdoorAir, + SZ DSOA Zone 5 Office, !- Name + sum, !- Outdoor Air Method + 0.00236, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + DesignSpecification:OutdoorAir, + SZ DSOA Zone 5 Conference, !- Name + sum, !- Outdoor Air Method + 0.00436, !- Outdoor Air Flow per Person {m3/s-person} + 0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + DesignSpecification:OutdoorAir:SpaceList, + SZ DSOA Zone 5 List, !- Name + Space 5 Office, !- Space 1 Name + SZ DSOA Zone 5 Office, !- Space 1 Design Specification Outdoor Air Object Name + Space 5 Conference, !- Space 2 Name + SZ DSOA Zone 5 Conference; !- Space 2 Design Specification Outdoor Air Object Name + + Sizing:System, + VAV Sys 1, !- AirLoop Name + sensible, !- Type of Load to Size On + autosize, !- Design Outdoor Air Flow Rate {m3/s} + 0.3, !- Central Heating Maximum System Air Flow Ratio + 4.5, !- Preheat Design Temperature {C} + 0.008, !- Preheat Design Humidity Ratio {kgWater/kgDryAir} + 11.0, !- Precool Design Temperature {C} + 0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir} + 12.8, !- Central Cooling Design Supply Air Temperature {C} + 16.7, !- Central Heating Design Supply Air Temperature {C} + noncoincident, !- Type of Zone Sum to Use + no, !- 100% Outdoor Air in Cooling + no, !- 100% Outdoor Air in Heating + 0.008, !- Central Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.008, !- Central Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + DesignDay, !- Cooling Supply Air Flow Rate Method + 0, !- Cooling Supply Air Flow Rate {m3/s} + , !- Cooling Supply Air Flow Rate Per Floor Area {m3/s-m2} + , !- Cooling Fraction of Autosized Cooling Supply Air Flow Rate + , !- Cooling Supply Air Flow Rate Per Unit Cooling Capacity {m3/s-W} + DesignDay, !- Heating Supply Air Flow Rate Method + 0, !- Heating Supply Air Flow Rate {m3/s} + , !- Heating Supply Air Flow Rate Per Floor Area {m3/s-m2} + , !- Heating Fraction of Autosized Heating Supply Air Flow Rate + , !- Heating Fraction of Autosized Cooling Supply Air Flow Rate + , !- Heating Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W} + , !- System Outdoor Air Method + 1.0, !- Zone Maximum Outdoor Air Fraction {dimensionless} + CoolingDesignCapacity, !- Cooling Design Capacity Method + autosize, !- Cooling Design Capacity {W} + , !- Cooling Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Cooling Design Capacity + HeatingDesignCapacity, !- Heating Design Capacity Method + autosize, !- Heating Design Capacity {W} + , !- Heating Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Heating Design Capacity + VAV; !- Central Cooling Capacity Control Method + + Sizing:Plant, + Hot Water Loop, !- Plant or Condenser Loop Name + heating, !- Loop Type + 82., !- Design Loop Exit Temperature {C} + 11; !- Loop Design Temperature Difference {deltaC} + + Sizing:Plant, + Chilled Water Loop, !- Plant or Condenser Loop Name + cooling, !- Loop Type + 7.00, !- Design Loop Exit Temperature {C} + 4.00; !- Loop Design Temperature Difference {deltaC} + + Schedule:Compact, + Htg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00,16.7, !- Field 3 + For: WinterDesignDay, !- Field 5 + Until: 24:00,22.2, !- Field 6 + For: WeekDays, !- Field 8 + Until: 6:00,16.7, !- Field 9 + Until: 20:00,22.2, !- Field 11 + Until: 24:00,16.7, !- Field 13 + For: WeekEnds Holiday, !- Field 15 + Until: 24:00,16.7, !- Field 16 + For: AllOtherDays, !- Field 18 + Until: 24:00,16.7; !- Field 19 + + Schedule:Compact, + PlenumHtg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,12.8; !- Field 3 + + Schedule:Compact, + Clg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00,23.9, !- Field 3 + For: WinterDesignDay, !- Field 5 + Until: 24:00,29.4, !- Field 6 + For: WeekDays, !- Field 8 + Until: 6:00,29.4, !- Field 9 + Until: 20:00,23.9, !- Field 11 + Until: 24:00,29.4, !- Field 13 + For: WeekEnds Holiday, !- Field 15 + Until: 24:00,29.4, !- Field 16 + For: AllOtherDays, !- Field 18 + Until: 24:00,29.4; !- Field 19 + + Schedule:Compact, + PlenumClg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,40.0; !- Field 3 + + Schedule:Compact, + Zone Control Type Sched, !- Name + Control Type, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00,2, !- Field 3 + For: WinterDesignDay, !- Field 5 + Until: 24:00,1, !- Field 6 + For: AllOtherDays, !- Field 8 + Until: 24:00,4; !- Field 9 + + Schedule:Compact, + Min OA Sched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: Weekdays, !- Field 2 + Until: 6:00,0.02, !- Field 3 + Until: 20:00,1.0, !- Field 5 + Until: 24:00,0.02, !- Field 7 + For: AllOtherDays, !- Field 9 + Until: 24:00,0.02; !- Field 10 + + Schedule:Compact, + FanAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0, !- Field 3 + Through: 9/30, !- Field 5 + For: WeekDays, !- Field 6 + Until: 6:00,0.0, !- Field 7 + Until: 20:00,1.0, !- Field 9 + Until: 24:00,0.0, !- Field 11 + For: SummerDesignDay WinterDesignDay, !- Field 13 + Until: 24:00,1.0, !- Field 14 + For: AllOtherDays, !- Field 16 + Until: 24:00,0.0, !- Field 17 + Through: 12/31, !- Field 19 + For: AllDays, !- Field 20 + Until: 24:00,1.0; !- Field 21 + + Schedule:Compact, + CoolingCoilAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays, !- Field 2 + Until: 6:00,0.0, !- Field 3 + Until: 20:00,1.0, !- Field 5 + Until: 24:00,0.0, !- Field 7 + For: SummerDesignDay WinterDesignDay, !- Field 9 + Until: 24:00,1.0, !- Field 10 + For: AllOtherDays, !- Field 12 + Until: 24:00,0.0; !- Field 13 + + Schedule:Compact, + CoolingPumpAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0; !- Field 3 + + Schedule:Compact, + ReheatCoilAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0, !- Field 3 + Through: 9/30, !- Field 5 + For: WeekDays, !- Field 6 + Until: 6:00,0.0, !- Field 7 + Until: 20:00,1.0, !- Field 9 + Until: 24:00,0.0, !- Field 11 + For: SummerDesignDay WinterDesignDay, !- Field 13 + Until: 24:00,1.0, !- Field 14 + For: AllOtherDays, !- Field 16 + Until: 24:00,0.0, !- Field 17 + Through: 12/31, !- Field 19 + For: AllDays, !- Field 20 + Until: 24:00,1.0; !- Field 21 + + Schedule:Compact, + CW Loop Temp Schedule, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,7.22; !- Field 3 + + Schedule:Compact, + HW Loop Temp Schedule, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,82; !- Field 3 + + Schedule:Compact, + PlantOnSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0; !- Field 3 + + Schedule:Compact, + Seasonal Reset Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,16.0, !- Field 3 + Through: 9/30, !- Field 5 + For: AllDays, !- Field 6 + Until: 24:00,13.0, !- Field 7 + Through: 12/31, !- Field 9 + For: AllDays, !- Field 10 + Until: 24:00,16.0; !- Field 11 + + Schedule:Compact, + OA Cooling Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,11.5; !- Field 3 + + Schedule:Compact, + OA Heating Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,4.5; !- Field 3 + + OutdoorAir:NodeList, + OutsideAirInletNodes; !- Node or NodeList Name 1 + + NodeList, + OutsideAirInletNodes, !- Name + Outside Air Inlet Node 1;!- Node 1 Name + + ZoneHVAC:EquipmentConnections, + Zone 1, !- Zone Name + Zone 1 Eq, !- Zone Conditioning Equipment List Name + Zone 1 In Node, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + Zone 1 Node, !- Zone Air Node Name + Zone 1 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + Zone 2, !- Zone Name + Zone 2 Eq, !- Zone Conditioning Equipment List Name + Zone 2 In Node, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + Zone 2 Node, !- Zone Air Node Name + Zone 2 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + Zone 3, !- Zone Name + Zone 3 Eq, !- Zone Conditioning Equipment List Name + Zone 3 In Node, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + Zone 3 Node, !- Zone Air Node Name + Zone 3 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + Zone 4, !- Zone Name + Zone 4 Eq, !- Zone Conditioning Equipment List Name + Zone 4 In Node, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + Zone 4 Node, !- Zone Air Node Name + Zone 4 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + Zone 5, !- Zone Name + Zone 5 Eq, !- Zone Conditioning Equipment List Name + Zone 5 In Node, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + Zone 5 Node, !- Zone Air Node Name + Zone 5 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneControl:Thermostat, + Zone 1 Control, !- Name + Zone 1, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleCooling, !- Control 1 Object Type + CoolingSetPoint, !- Control 1 Name + ThermostatSetpoint:SingleHeating, !- Control 2 Object Type + HeatingSetpoint, !- Control 2 Name + ThermostatSetpoint:DualSetpoint, !- Control 3 Object Type + DualSetPoint; !- Control 3 Name + + ZoneControl:Thermostat, + Zone 2 Control, !- Name + Zone 2, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleCooling, !- Control 1 Object Type + CoolingSetPoint, !- Control 1 Name + ThermostatSetpoint:SingleHeating, !- Control 2 Object Type + HeatingSetpoint, !- Control 2 Name + ThermostatSetpoint:DualSetpoint, !- Control 3 Object Type + DualSetPoint; !- Control 3 Name + + ZoneControl:Thermostat, + Zone 3 Control, !- Name + Zone 3, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleCooling, !- Control 1 Object Type + CoolingSetPoint, !- Control 1 Name + ThermostatSetpoint:SingleHeating, !- Control 2 Object Type + HeatingSetpoint, !- Control 2 Name + ThermostatSetpoint:DualSetpoint, !- Control 3 Object Type + DualSetPoint; !- Control 3 Name + + ZoneControl:Thermostat, + Zone 4 Control, !- Name + Zone 4, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleCooling, !- Control 1 Object Type + CoolingSetPoint, !- Control 1 Name + ThermostatSetpoint:SingleHeating, !- Control 2 Object Type + HeatingSetpoint, !- Control 2 Name + ThermostatSetpoint:DualSetpoint, !- Control 3 Object Type + DualSetPoint; !- Control 3 Name + + ZoneControl:Thermostat, + Zone 5 Control, !- Name + Zone 5, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:SingleCooling, !- Control 1 Object Type + CoolingSetPoint, !- Control 1 Name + ThermostatSetpoint:SingleHeating, !- Control 2 Object Type + HeatingSetpoint, !- Control 2 Name + ThermostatSetpoint:DualSetpoint, !- Control 3 Object Type + DualSetPoint; !- Control 3 Name + + ThermostatSetpoint:SingleHeating, + HeatingSetpoint, !- Name + Htg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleCooling, + CoolingSetpoint, !- Name + Clg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleHeating, + PlenumHeatingSetpoint, !- Name + PlenumHtg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleCooling, + PlenumCoolingSetpoint, !- Name + PlenumClg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:DualSetpoint, + DualSetPoint, !- Name + Htg-SetP-Sch, !- Heating Setpoint Temperature Schedule Name + Clg-SetP-Sch; !- Cooling Setpoint Temperature Schedule Name + + ZoneHVAC:EquipmentList, + Zone 1 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + Zone 1 ATU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + Zone 2 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + Zone 2 ATU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + Zone 3 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + Zone 3 ATU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + Zone 4 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + Zone 4 ATU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + Zone 5 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + Zone 5 ATU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + ZoneHVAC:AirDistributionUnit, + Zone 1 ATU, !- Name + Zone 1 In Node, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type + Zone 1 VAV Reheat; !- Air Terminal Name + + ZoneHVAC:AirDistributionUnit, + Zone 2 ATU, !- Name + Zone 2 In Node, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type + Zone 2 VAV Reheat; !- Air Terminal Name + + ZoneHVAC:AirDistributionUnit, + Zone 3 ATU, !- Name + Zone 3 In Node, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type + Zone 3 VAV Reheat; !- Air Terminal Name + + ZoneHVAC:AirDistributionUnit, + Zone 4 ATU, !- Name + Zone 4 In Node, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type + Zone 4 VAV Reheat; !- Air Terminal Name + + ZoneHVAC:AirDistributionUnit, + Zone 5 ATU, !- Name + Zone 5 In Node, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type + Zone 5 VAV Reheat; !- Air Terminal Name + + AirTerminal:SingleDuct:VAV:Reheat, + Zone 1 VAV Reheat, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + Zone 1 Zone Coil Air In Node, !- Damper Air Outlet Node Name + Zone 1 ATU In Node, !- Air Inlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + Constant, !- Zone Minimum Air Flow Input Method + 0.3, !- Constant Minimum Air Flow Fraction + , !- Fixed Minimum Air Flow Rate {m3/s} + , !- Minimum Air Flow Fraction Schedule Name + Coil:Heating:Water, !- Reheat Coil Object Type + Zone 1 Zone Coil, !- Reheat Coil Name + autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s} + 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s} + Zone 1 In Node, !- Air Outlet Node Name + 0.001, !- Convergence Tolerance + NORMAL, !- Damper Heating Action + AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2} + AUTOCALCULATE; !- Maximum Flow Fraction During Reheat + + AirTerminal:SingleDuct:VAV:Reheat, + Zone 2 VAV Reheat, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + Zone 2 Zone Coil Air In Node, !- Damper Air Outlet Node Name + Zone 2 ATU In Node, !- Air Inlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + Constant, !- Zone Minimum Air Flow Input Method + 0.3, !- Constant Minimum Air Flow Fraction + , !- Fixed Minimum Air Flow Rate {m3/s} + , !- Minimum Air Flow Fraction Schedule Name + Coil:Heating:Water, !- Reheat Coil Object Type + Zone 2 Zone Coil, !- Reheat Coil Name + autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s} + 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s} + Zone 2 In Node, !- Air Outlet Node Name + 0.001, !- Convergence Tolerance + NORMAL, !- Damper Heating Action + AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2} + AUTOCALCULATE; !- Maximum Flow Fraction During Reheat + + AirTerminal:SingleDuct:VAV:Reheat, + Zone 3 VAV Reheat, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + Zone 3 Zone Coil Air In Node, !- Damper Air Outlet Node Name + Zone 3 ATU In Node, !- Air Inlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + Constant, !- Zone Minimum Air Flow Input Method + 0.3, !- Constant Minimum Air Flow Fraction + , !- Fixed Minimum Air Flow Rate {m3/s} + , !- Minimum Air Flow Fraction Schedule Name + Coil:Heating:Water, !- Reheat Coil Object Type + Zone 3 Zone Coil, !- Reheat Coil Name + autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s} + 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s} + Zone 3 In Node, !- Air Outlet Node Name + 0.001, !- Convergence Tolerance + NORMAL, !- Damper Heating Action + AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2} + AUTOCALCULATE; !- Maximum Flow Fraction During Reheat + + AirTerminal:SingleDuct:VAV:Reheat, + Zone 4 VAV Reheat, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + Zone 4 Zone Coil Air In Node, !- Damper Air Outlet Node Name + Zone 4 ATU In Node, !- Air Inlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + Constant, !- Zone Minimum Air Flow Input Method + 0.3, !- Constant Minimum Air Flow Fraction + , !- Fixed Minimum Air Flow Rate {m3/s} + , !- Minimum Air Flow Fraction Schedule Name + Coil:Heating:Water, !- Reheat Coil Object Type + Zone 4 Zone Coil, !- Reheat Coil Name + autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s} + 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s} + Zone 4 In Node, !- Air Outlet Node Name + 0.001, !- Convergence Tolerance + NORMAL, !- Damper Heating Action + AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2} + AUTOCALCULATE; !- Maximum Flow Fraction During Reheat + + AirTerminal:SingleDuct:VAV:Reheat, + Zone 5 VAV Reheat, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + Zone 5 Zone Coil Air In Node, !- Damper Air Outlet Node Name + Zone 5 ATU In Node, !- Air Inlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + Constant, !- Zone Minimum Air Flow Input Method + 0.3, !- Constant Minimum Air Flow Fraction + , !- Fixed Minimum Air Flow Rate {m3/s} + , !- Minimum Air Flow Fraction Schedule Name + Coil:Heating:Water, !- Reheat Coil Object Type + Zone 5 Zone Coil, !- Reheat Coil Name + autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s} + 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s} + Zone 5 In Node, !- Air Outlet Node Name + 0.001, !- Convergence Tolerance + NORMAL, !- Damper Heating Action + AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2} + AUTOCALCULATE; !- Maximum Flow Fraction During Reheat + + Coil:Heating:Water, + Zone 1 Zone Coil, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + Zone 1 Zone Coil Water In Node, !- Water Inlet Node Name + Zone 1 Zone Coil Water Out Node, !- Water Outlet Node Name + Zone 1 Zone Coil Air In Node, !- Air Inlet Node Name + Zone 1 In Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + Coil:Heating:Water, + Zone 2 Zone Coil, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + Zone 2 Zone Coil Water In Node, !- Water Inlet Node Name + Zone 2 Zone Coil Water Out Node, !- Water Outlet Node Name + Zone 2 Zone Coil Air In Node, !- Air Inlet Node Name + Zone 2 In Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + Coil:Heating:Water, + Zone 3 Zone Coil, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + Zone 3 Zone Coil Water In Node, !- Water Inlet Node Name + Zone 3 Zone Coil Water Out Node, !- Water Outlet Node Name + Zone 3 Zone Coil Air In Node, !- Air Inlet Node Name + Zone 3 In Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + Coil:Heating:Water, + Zone 4 Zone Coil, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + Zone 4 Zone Coil Water In Node, !- Water Inlet Node Name + Zone 4 Zone Coil Water Out Node, !- Water Outlet Node Name + Zone 4 Zone Coil Air In Node, !- Air Inlet Node Name + Zone 4 In Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + Coil:Heating:Water, + Zone 5 Zone Coil, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + Zone 5 Zone Coil Water In Node, !- Water Inlet Node Name + Zone 5 Zone Coil Water Out Node, !- Water Outlet Node Name + Zone 5 Zone Coil Air In Node, !- Air Inlet Node Name + Zone 5 In Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + AirLoopHVAC:ReturnPath, + ReturnAirPath1, !- Name + PLENUM-1 Out Node, !- Return Air Path Outlet Node Name + AirLoopHVAC:ReturnPlenum,!- Component 1 Object Type + Return-Plenum-1; !- Component 1 Name + + AirLoopHVAC:ReturnPlenum, + Return-Plenum-1, !- Name + PLENUM-1, !- Zone Name + PLENUM-1 Node, !- Zone Node Name + PLENUM-1 Out Node, !- Outlet Node Name + , !- Induced Air Outlet Node or NodeList Name + Zone 1 Out Node, !- Inlet 1 Node Name + Zone 2 Out Node, !- Inlet 2 Node Name + Zone 3 Out Node, !- Inlet 3 Node Name + Zone 4 Out Node, !- Inlet 4 Node Name + Zone 5 Out Node; !- Inlet 5 Node Name + + AirLoopHVAC:SupplyPath, + Zone Supply Air Path 1, !- Name + Zone Eq In Node, !- Supply Air Path Inlet Node Name + AirLoopHVAC:ZoneSplitter,!- Component 1 Object Type + Zone Supply Air Splitter 1; !- Component 1 Name + + AirLoopHVAC:ZoneSplitter, + Zone Supply Air Splitter 1, !- Name + Zone Eq In Node, !- Inlet Node Name + Zone 1 ATU In Node, !- Outlet 1 Node Name + Zone 2 ATU In Node, !- Outlet 2 Node Name + Zone 3 ATU In Node, !- Outlet 3 Node Name + Zone 4 ATU In Node, !- Outlet 4 Node Name + Zone 5 ATU In Node; !- Outlet 5 Node Name + + AirLoopHVAC, + VAV Sys 1, !- Name + VAV Sys 1 Controllers, !- Controller List Name + VAV Sys 1 Avail List, !- Availability Manager List Name + autosize, !- Design Supply Air Flow Rate {m3/s} + VAV Sys 1 Branches, !- Branch List Name + , !- Connector List Name + VAV Sys 1 Inlet Node, !- Supply Side Inlet Node Name + PLENUM-1 Out Node, !- Demand Side Outlet Node Name + Zone Eq In Node, !- Demand Side Inlet Node Names + VAV Sys 1 Outlet Node; !- Supply Side Outlet Node Names + + AirLoopHVAC:ControllerList, + VAV Sys 1 Controllers, !- Name + Controller:WaterCoil, !- Controller 1 Object Type + Central Cooling Coil Controller 1, !- Controller 1 Name + Controller:WaterCoil, !- Controller 2 Object Type + Central Heating Coil Controller 1; !- Controller 2 Name + + AvailabilityManagerAssignmentList, + VAV Sys 1 Avail List, !- Name + AvailabilityManager:Scheduled, !- Availability Manager 1 Object Type + VAV Sys 1 Avail; !- Availability Manager 1 Name + + AvailabilityManager:Scheduled, + VAV Sys 1 Avail, !- Name + FanAvailSched; !- Schedule Name + + BranchList, + VAV Sys 1 Branches, !- Name + VAV Sys 1 Main Branch; !- Branch 1 Name + + Branch, + VAV Sys 1 Main Branch, !- Name + , !- Pressure Drop Curve Name + AirLoopHVAC:OutdoorAirSystem, !- Component 1 Object Type + OA Sys 1, !- Component 1 Name + VAV Sys 1 Inlet Node, !- Component 1 Inlet Node Name + Mixed Air Node 1, !- Component 1 Outlet Node Name + Coil:Cooling:Water, !- Component 2 Object Type + Main Cooling Coil 1, !- Component 2 Name + Mixed Air Node 1, !- Component 2 Inlet Node Name + Main Cooling Coil 1 Outlet Node, !- Component 2 Outlet Node Name + Coil:Heating:Water, !- Component 3 Object Type + Main Heating Coil 1, !- Component 3 Name + Main Cooling Coil 1 Outlet Node, !- Component 3 Inlet Node Name + Main Heating Coil 1 Outlet Node, !- Component 3 Outlet Node Name + Fan:VariableVolume, !- Component 4 Object Type + Supply Fan 1, !- Component 4 Name + Main Heating Coil 1 Outlet Node, !- Component 4 Inlet Node Name + VAV Sys 1 Outlet Node; !- Component 4 Outlet Node Name + + AirLoopHVAC:OutdoorAirSystem, + OA Sys 1, !- Name + OA Sys 1 Controllers, !- Controller List Name + OA Sys 1 Equipment; !- Outdoor Air Equipment List Name + + AirLoopHVAC:ControllerList, + OA Sys 1 Controllers, !- Name + Controller:OutdoorAir, !- Controller 1 Object Type + OA Controller 1, !- Controller 1 Name + Controller:WaterCoil, !- Controller 2 Object Type + OA CC Controller 1, !- Controller 2 Name + Controller:WaterCoil, !- Controller 3 Object Type + OA HC Controller 1; !- Controller 3 Name + + AirLoopHVAC:OutdoorAirSystem:EquipmentList, + OA Sys 1 Equipment, !- Name + Coil:Heating:Water, !- Component 1 Object Type + OA Heating Coil 1, !- Component 1 Name + Coil:Cooling:Water, !- Component 2 Object Type + OA Cooling Coil 1, !- Component 2 Name + OutdoorAir:Mixer, !- Component 3 Object Type + OA Mixing Box 1; !- Component 3 Name + + Coil:Heating:Water, + OA Heating Coil 1, !- Name + CoolingCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + OA Heating Coil 1 Water Inlet Node, !- Water Inlet Node Name + OA Heating Coil 1 Water Outlet Node, !- Water Outlet Node Name + Outside Air Inlet Node 1,!- Air Inlet Node Name + OA Heating Coil 1 Air Outlet Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + Coil:Cooling:Water, + OA Cooling Coil 1, !- Name + CoolingCoilAvailSched, !- Availability Schedule Name + autosize, !- Design Water Flow Rate {m3/s} + autosize, !- Design Air Flow Rate {m3/s} + autosize, !- Design Inlet Water Temperature {C} + autosize, !- Design Inlet Air Temperature {C} + autosize, !- Design Outlet Air Temperature {C} + autosize, !- Design Inlet Air Humidity Ratio {kgWater/kgDryAir} + autosize, !- Design Outlet Air Humidity Ratio {kgWater/kgDryAir} + OA Cooling Coil 1 Water Inlet Node, !- Water Inlet Node Name + OA Cooling Coil 1 Water Outlet Node, !- Water Outlet Node Name + OA Heating Coil 1 Air Outlet Node, !- Air Inlet Node Name + OA Mixing Box 1 Inlet Node, !- Air Outlet Node Name + SimpleAnalysis, !- Type of Analysis + CrossFlow, !- Heat Exchanger Configuration + , !- Condensate Collection Water Storage Tank Name + 4.0; !- Design Water Temperature Difference {deltaC} + + OutdoorAir:Mixer, + OA Mixing Box 1, !- Name + Mixed Air Node 1, !- Mixed Air Node Name + OA Mixing Box 1 Inlet Node, !- Outdoor Air Stream Node Name + Relief Air Outlet Node 1,!- Relief Air Stream Node Name + VAV Sys 1 Inlet Node; !- Return Air Stream Node Name + + Coil:Cooling:Water, + Main Cooling Coil 1, !- Name + CoolingCoilAvailSched, !- Availability Schedule Name + autosize, !- Design Water Flow Rate {m3/s} + autosize, !- Design Air Flow Rate {m3/s} + autosize, !- Design Inlet Water Temperature {C} + autosize, !- Design Inlet Air Temperature {C} + autosize, !- Design Outlet Air Temperature {C} + autosize, !- Design Inlet Air Humidity Ratio {kgWater/kgDryAir} + autosize, !- Design Outlet Air Humidity Ratio {kgWater/kgDryAir} + Main Cooling Coil 1 Water Inlet Node, !- Water Inlet Node Name + Main Cooling Coil 1 Water Outlet Node, !- Water Outlet Node Name + Mixed Air Node 1, !- Air Inlet Node Name + Main Cooling Coil 1 Outlet Node, !- Air Outlet Node Name + SimpleAnalysis, !- Type of Analysis + CrossFlow, !- Heat Exchanger Configuration + , !- Condensate Collection Water Storage Tank Name + 4.0; !- Design Water Temperature Difference {deltaC} + + Coil:Heating:Water, + Main Heating Coil 1, !- Name + ReheatCoilAvailSched, !- Availability Schedule Name + autosize, !- U-Factor Times Area Value {W/K} + autosize, !- Maximum Water Flow Rate {m3/s} + Main Heating Coil 1 Water Inlet Node, !- Water Inlet Node Name + Main Heating Coil 1 Water Outlet Node, !- Water Outlet Node Name + Main Cooling Coil 1 Outlet Node, !- Air Inlet Node Name + Main Heating Coil 1 Outlet Node, !- Air Outlet Node Name + UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method + autosize, !- Rated Capacity {W} + 82.2, !- Rated Inlet Water Temperature {C} + 16.6, !- Rated Inlet Air Temperature {C} + 71.1, !- Rated Outlet Water Temperature {C} + 32.2, !- Rated Outlet Air Temperature {C} + , !- Rated Ratio for Air and Water Convection + 11; !- Design Water Temperature Difference {deltaC} + + Fan:VariableVolume, + Supply Fan 1, !- Name + FanAvailSched, !- Availability Schedule Name + 0.7, !- Fan Total Efficiency + 600.0, !- Pressure Rise {Pa} + autosize, !- Maximum Flow Rate {m3/s} + Fraction, !- Fan Power Minimum Flow Rate Input Method + 0.25, !- Fan Power Minimum Flow Fraction + , !- Fan Power Minimum Air Flow Rate {m3/s} + 0.9, !- Motor Efficiency + 1.0, !- Motor In Airstream Fraction + 0.35071223, !- Fan Power Coefficient 1 + 0.30850535, !- Fan Power Coefficient 2 + -0.54137364, !- Fan Power Coefficient 3 + 0.87198823, !- Fan Power Coefficient 4 + 0.000, !- Fan Power Coefficient 5 + Main Heating Coil 1 Outlet Node, !- Air Inlet Node Name + VAV Sys 1 Outlet Node; !- Air Outlet Node Name + + Controller:WaterCoil, + OA HC Controller 1, !- Name + Temperature, !- Control Variable + Normal, !- Action + FLOW, !- Actuator Variable + OA Heating Coil 1 Air Outlet Node, !- Sensor Node Name + OA Heating Coil 1 Water Inlet Node, !- Actuator Node Name + 0.002, !- Controller Convergence Tolerance {deltaC} + autosize, !- Maximum Actuated Flow {m3/s} + 0.0; !- Minimum Actuated Flow {m3/s} + + Controller:WaterCoil, + OA CC Controller 1, !- Name + Temperature, !- Control Variable + Reverse, !- Action + FLOW, !- Actuator Variable + OA Mixing Box 1 Inlet Node, !- Sensor Node Name + OA Cooling Coil 1 Water Inlet Node, !- Actuator Node Name + 0.002, !- Controller Convergence Tolerance {deltaC} + autosize, !- Maximum Actuated Flow {m3/s} + 0.0; !- Minimum Actuated Flow {m3/s} + + Controller:WaterCoil, + Central Cooling Coil Controller 1, !- Name + Temperature, !- Control Variable + Reverse, !- Action + FLOW, !- Actuator Variable + Main Cooling Coil 1 Outlet Node, !- Sensor Node Name + Main Cooling Coil 1 Water Inlet Node, !- Actuator Node Name + 0.002, !- Controller Convergence Tolerance {deltaC} + autosize, !- Maximum Actuated Flow {m3/s} + 0.0; !- Minimum Actuated Flow {m3/s} + + Controller:OutdoorAir, + OA Controller 1, !- Name + Relief Air Outlet Node 1,!- Relief Air Outlet Node Name + VAV Sys 1 Inlet Node, !- Return Air Node Name + Mixed Air Node 1, !- Mixed Air Node Name + Outside Air Inlet Node 1,!- Actuator Node Name + autosize, !- Minimum Outdoor Air Flow Rate {m3/s} + autosize, !- Maximum Outdoor Air Flow Rate {m3/s} + NoEconomizer, !- Economizer Control Type + ModulateFlow, !- Economizer Control Action Type + 19., !- Economizer Maximum Limit Dry-Bulb Temperature {C} + , !- Economizer Maximum Limit Enthalpy {J/kg} + , !- Economizer Maximum Limit Dewpoint Temperature {C} + , !- Electronic Enthalpy Limit Curve Name + 4.6, !- Economizer Minimum Limit Dry-Bulb Temperature {C} + NoLockout, !- Lockout Type + FixedMinimum, !- Minimum Limit Type + Min OA Sched; !- Minimum Outdoor Air Schedule Name + + Controller:WaterCoil, + Central Heating Coil Controller 1, !- Name + Temperature, !- Control Variable + Normal, !- Action + FLOW, !- Actuator Variable + Main Heating Coil 1 Outlet Node, !- Sensor Node Name + Main Heating Coil 1 Water Inlet Node, !- Actuator Node Name + 0.002, !- Controller Convergence Tolerance {deltaC} + autosize, !- Maximum Actuated Flow {m3/s} + 0.0; !- Minimum Actuated Flow {m3/s} + + SetpointManager:Scheduled, + Supply Air Temp Manager 1, !- Name + Temperature, !- Control Variable + Seasonal Reset Supply Air Temp Sch, !- Schedule Name + VAV Sys 1 Outlet Node; !- Setpoint Node or NodeList Name + + SetpointManager:Scheduled, + OA Air Temp Manager 1, !- Name + Temperature, !- Control Variable + OA Cooling Supply Air Temp Sch, !- Schedule Name + OA Mixing Box 1 Inlet Node; !- Setpoint Node or NodeList Name + + SetpointManager:Scheduled, + OA Air Temp Manager 2, !- Name + Temperature, !- Control Variable + OA Heating Supply Air Temp Sch, !- Schedule Name + OA Heating Coil 1 Air Outlet Node; !- Setpoint Node or NodeList Name + + SetpointManager:MixedAir, + Mixed Air Temp Manager 1,!- Name + Temperature, !- Control Variable + VAV Sys 1 Outlet Node, !- Reference Setpoint Node Name + Main Heating Coil 1 Outlet Node, !- Fan Inlet Node Name + VAV Sys 1 Outlet Node, !- Fan Outlet Node Name + Main Branch SetPoint Node List; !- Setpoint Node or NodeList Name + + NodeList, + Main Branch SetPoint Node List, !- Name + Mixed Air Node 1, !- Node 1 Name + Main Cooling Coil 1 Outlet Node, !- Node 2 Name + Main Heating Coil 1 Outlet Node; !- Node 3 Name + + PlantLoop, + Hot Water Loop, !- Name + Water, !- Fluid Type + , !- User Defined Fluid Type + Hot Loop Operation, !- Plant Equipment Operation Scheme Name + HW Supply Outlet Node, !- Loop Temperature Setpoint Node Name + 100, !- Maximum Loop Temperature {C} + 10, !- Minimum Loop Temperature {C} + autosize, !- Maximum Loop Flow Rate {m3/s} + 0.0, !- Minimum Loop Flow Rate {m3/s} + , !- Plant Loop Volume {m3} + HW Supply Inlet Node, !- Plant Side Inlet Node Name + HW Supply Outlet Node, !- Plant Side Outlet Node Name + Heating Supply Side Branches, !- Plant Side Branch List Name + Heating Supply Side Connectors, !- Plant Side Connector List Name + HW Demand Inlet Node, !- Demand Side Inlet Node Name + HW Demand Outlet Node, !- Demand Side Outlet Node Name + Heating Demand Side Branches, !- Demand Side Branch List Name + Heating Demand Side Connectors, !- Demand Side Connector List Name + SequentialLoad; !- Load Distribution Scheme + + SetpointManager:Scheduled, + Hot Water Loop Setpoint Manager, !- Name + Temperature, !- Control Variable + HW Loop Temp Schedule, !- Schedule Name + HW Supply Outlet Node; !- Setpoint Node or NodeList Name + + BranchList, + Heating Supply Side Branches, !- Name + Heating Supply Inlet Branch, !- Branch 1 Name + Central Boiler Branch, !- Branch 2 Name + Heating Supply Bypass Branch, !- Branch 3 Name + Heating Supply Outlet Branch; !- Branch 4 Name + + ConnectorList, + Heating Supply Side Connectors, !- Name + Connector:Splitter, !- Connector 1 Object Type + Heating Supply Splitter, !- Connector 1 Name + Connector:Mixer, !- Connector 2 Object Type + Heating Supply Mixer; !- Connector 2 Name + + Branch, + Heating Supply Inlet Branch, !- Name + , !- Pressure Drop Curve Name + Pump:VariableSpeed, !- Component 1 Object Type + HW Circ Pump, !- Component 1 Name + HW Supply Inlet Node, !- Component 1 Inlet Node Name + HW Pump Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Central Boiler Branch, !- Name + , !- Pressure Drop Curve Name + Boiler:HotWater, !- Component 1 Object Type + Central Boiler, !- Component 1 Name + Central Boiler Inlet Node, !- Component 1 Inlet Node Name + Central Boiler Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Heating Supply Bypass Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Supply Side Bypass, !- Component 1 Name + Heating Supply Bypass Inlet Node, !- Component 1 Inlet Node Name + Heating Supply Bypass Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Supply Side Bypass, !- Name + Heating Supply Bypass Inlet Node, !- Inlet Node Name + Heating Supply Bypass Outlet Node; !- Outlet Node Name + + Branch, + Heating Supply Outlet Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Supply Outlet, !- Component 1 Name + Heating Supply Exit Pipe Inlet Node, !- Component 1 Inlet Node Name + HW Supply Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Supply Outlet, !- Name + Heating Supply Exit Pipe Inlet Node, !- Inlet Node Name + HW Supply Outlet Node; !- Outlet Node Name + + BranchList, + Heating Demand Side Branches, !- Name + Heating Demand Inlet Branch, !- Branch 1 Name + Zone 1 Reheat Branch, !- Branch 2 Name + Zone 2 Reheat Branch, !- Branch 3 Name + Zone 3 Reheat Branch, !- Branch 4 Name + Zone 4 Reheat Branch, !- Branch 5 Name + Zone 5 Reheat Branch, !- Branch 6 Name + OA Heating Coil Branch, !- Branch 7 Name + Main Heating Coil 1 Branch, !- Branch 8 Name + Heating Demand Bypass Branch, !- Branch 9 Name + Heating Demand Outlet Branch; !- Branch 10 Name + + ConnectorList, + Heating Demand Side Connectors, !- Name + Connector:Splitter, !- Connector 1 Object Type + Heating Demand Splitter, !- Connector 1 Name + Connector:Mixer, !- Connector 2 Object Type + Heating Demand Mixer; !- Connector 2 Name + + Branch, + Heating Demand Inlet Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Demand Inlet Pipe, !- Component 1 Name + HW Demand Inlet Node, !- Component 1 Inlet Node Name + HW Demand Entrance Pipe Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Demand Inlet Pipe, !- Name + HW Demand Inlet Node, !- Inlet Node Name + HW Demand Entrance Pipe Outlet Node; !- Outlet Node Name + + Branch, + Heating Demand Outlet Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Demand Outlet Pipe, !- Component 1 Name + HW Demand Exit Pipe Inlet Node, !- Component 1 Inlet Node Name + HW Demand Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Demand Outlet Pipe, !- Name + HW Demand Exit Pipe Inlet Node, !- Inlet Node Name + HW Demand Outlet Node; !- Outlet Node Name + + Branch, + Zone 1 Reheat Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + Zone 1 Zone Coil, !- Component 1 Name + Zone 1 Zone Coil Water In Node, !- Component 1 Inlet Node Name + Zone 1 Zone Coil Water Out Node; !- Component 1 Outlet Node Name + + Branch, + Zone 2 Reheat Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + Zone 2 Zone Coil, !- Component 1 Name + Zone 2 Zone Coil Water In Node, !- Component 1 Inlet Node Name + Zone 2 Zone Coil Water Out Node; !- Component 1 Outlet Node Name + + Branch, + Zone 3 Reheat Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + Zone 3 Zone Coil, !- Component 1 Name + Zone 3 Zone Coil Water In Node, !- Component 1 Inlet Node Name + Zone 3 Zone Coil Water Out Node; !- Component 1 Outlet Node Name + + Branch, + Zone 4 Reheat Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + Zone 4 Zone Coil, !- Component 1 Name + Zone 4 Zone Coil Water In Node, !- Component 1 Inlet Node Name + Zone 4 Zone Coil Water Out Node; !- Component 1 Outlet Node Name + + Branch, + Zone 5 Reheat Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + Zone 5 Zone Coil, !- Component 1 Name + Zone 5 Zone Coil Water In Node, !- Component 1 Inlet Node Name + Zone 5 Zone Coil Water Out Node; !- Component 1 Outlet Node Name + + Branch, + OA Heating Coil Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + OA Heating Coil 1, !- Component 1 Name + OA Heating Coil 1 Water Inlet Node, !- Component 1 Inlet Node Name + OA Heating Coil 1 Water Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Main Heating Coil 1 Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Heating:Water, !- Component 1 Object Type + Main Heating Coil 1, !- Component 1 Name + Main Heating Coil 1 Water Inlet Node, !- Component 1 Inlet Node Name + Main Heating Coil 1 Water Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Heating Demand Bypass Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Heating Demand Bypass, !- Component 1 Name + Heating Demand Bypass Inlet Node, !- Component 1 Inlet Node Name + Heating Demand Bypass Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Heating Demand Bypass, !- Name + Heating Demand Bypass Inlet Node, !- Inlet Node Name + Heating Demand Bypass Outlet Node; !- Outlet Node Name + + Connector:Splitter, + Heating Demand Splitter, !- Name + Heating Demand Inlet Branch, !- Inlet Branch Name + Zone 1 Reheat Branch, !- Outlet Branch 1 Name + Zone 2 Reheat Branch, !- Outlet Branch 2 Name + Zone 3 Reheat Branch, !- Outlet Branch 3 Name + Zone 4 Reheat Branch, !- Outlet Branch 4 Name + Zone 5 Reheat Branch, !- Outlet Branch 5 Name + OA Heating Coil Branch, !- Outlet Branch 6 Name + Main Heating Coil 1 Branch, !- Outlet Branch 7 Name + Heating Demand Bypass Branch; !- Outlet Branch 8 Name + + Connector:Mixer, + Heating Demand Mixer, !- Name + Heating Demand Outlet Branch, !- Outlet Branch Name + Zone 1 Reheat Branch, !- Inlet Branch 1 Name + Zone 2 Reheat Branch, !- Inlet Branch 2 Name + Zone 3 Reheat Branch, !- Inlet Branch 3 Name + Zone 4 Reheat Branch, !- Inlet Branch 4 Name + Zone 5 Reheat Branch, !- Inlet Branch 5 Name + OA Heating Coil Branch, !- Inlet Branch 6 Name + Main Heating Coil 1 Branch, !- Inlet Branch 7 Name + Heating Demand Bypass Branch; !- Inlet Branch 8 Name + + Connector:Splitter, + Heating Supply Splitter, !- Name + Heating Supply Inlet Branch, !- Inlet Branch Name + Central Boiler Branch, !- Outlet Branch 1 Name + Heating Supply Bypass Branch; !- Outlet Branch 2 Name + + Connector:Mixer, + Heating Supply Mixer, !- Name + Heating Supply Outlet Branch, !- Outlet Branch Name + Central Boiler Branch, !- Inlet Branch 1 Name + Heating Supply Bypass Branch; !- Inlet Branch 2 Name + + PlantEquipmentOperationSchemes, + Hot Loop Operation, !- Name + PlantEquipmentOperation:HeatingLoad, !- Control Scheme 1 Object Type + Central Boiler Only, !- Control Scheme 1 Name + PlantOnSched; !- Control Scheme 1 Schedule Name + + PlantEquipmentOperation:HeatingLoad, + Central Boiler Only, !- Name + 0, !- Load Range 1 Lower Limit {W} + 1000000, !- Load Range 1 Upper Limit {W} + heating plant; !- Range 1 Equipment List Name + + PlantEquipmentList, + heating plant, !- Name + Boiler:HotWater, !- Equipment 1 Object Type + Central Boiler; !- Equipment 1 Name + + Boiler:HotWater, + Central Boiler, !- Name + NaturalGas, !- Fuel Type + autosize, !- Nominal Capacity {W} + 0.8, !- Nominal Thermal Efficiency + LeavingBoiler, !- Efficiency Curve Temperature Evaluation Variable + BoilerEfficiency, !- Normalized Boiler Efficiency Curve Name + autosize, !- Design Water Flow Rate {m3/s} + 0.0, !- Minimum Part Load Ratio + 1.2, !- Maximum Part Load Ratio + 1.0, !- Optimum Part Load Ratio + Central Boiler Inlet Node, !- Boiler Water Inlet Node Name + Central Boiler Outlet Node, !- Boiler Water Outlet Node Name + 100., !- Water Outlet Upper Temperature Limit {C} + LeavingSetpointModulated;!- Boiler Flow Mode + + SetpointManager:Scheduled, + Central Boiler Setpoint Manager, !- Name + Temperature, !- Control Variable + HW Loop Temp Schedule, !- Schedule Name + Central Boiler Outlet Node; !- Setpoint Node or NodeList Name + + Curve:Quadratic, + BoilerEfficiency, !- Name + 1.0, !- Coefficient1 Constant + 0.0, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0, !- Minimum Value of x + 1; !- Maximum Value of x + + Pump:VariableSpeed, + HW Circ Pump, !- Name + HW Supply Inlet Node, !- Inlet Node Name + HW Pump Outlet Node, !- Outlet Node Name + autosize, !- Design Maximum Flow Rate {m3/s} + 179352, !- Design Pump Head {Pa} + autosize, !- Design Power Consumption {W} + 0.9, !- Motor Efficiency + 0.0, !- Fraction of Motor Inefficiencies to Fluid Stream + 0, !- Coefficient 1 of the Part Load Performance Curve + 1, !- Coefficient 2 of the Part Load Performance Curve + 0, !- Coefficient 3 of the Part Load Performance Curve + 0, !- Coefficient 4 of the Part Load Performance Curve + 0, !- Design Minimum Flow Rate {m3/s} + INTERMITTENT; !- Pump Control Type + + PlantLoop, + Chilled Water Loop, !- Name + Water, !- Fluid Type + , !- User Defined Fluid Type + CW Loop Operation, !- Plant Equipment Operation Scheme Name + CW Supply Outlet Node, !- Loop Temperature Setpoint Node Name + 98, !- Maximum Loop Temperature {C} + 1, !- Minimum Loop Temperature {C} + autosize, !- Maximum Loop Flow Rate {m3/s} + 0.0, !- Minimum Loop Flow Rate {m3/s} + , !- Plant Loop Volume {m3} + CW Supply Inlet Node, !- Plant Side Inlet Node Name + CW Supply Outlet Node, !- Plant Side Outlet Node Name + Cooling Supply Side Branches, !- Plant Side Branch List Name + Cooling Supply Side Connectors, !- Plant Side Connector List Name + CW Demand Inlet Node, !- Demand Side Inlet Node Name + CW Demand Outlet Node, !- Demand Side Outlet Node Name + Cooling Demand Side Branches, !- Demand Side Branch List Name + Cooling Demand Side Connectors, !- Demand Side Connector List Name + SequentialLoad, !- Load Distribution Scheme + CW Avail List; !- Availability Manager List Name + + AvailabilityManagerAssignmentList, + CW Avail List, !- Name + AvailabilityManager:LowTemperatureTurnOff, !- Availability Manager 1 Object Type + CW Low Temp Limit; !- Availability Manager 1 Name + + AvailabilityManager:LowTemperatureTurnOff, + CW Low Temp Limit, !- Name + Outside Air Inlet Node 1,!- Sensor Node Name + 2.0, !- Temperature {C} + CoolingPumpAvailSched; !- Applicability Schedule Name + + SetpointManager:Scheduled, + Chilled Water Loop Setpoint Manager, !- Name + Temperature, !- Control Variable + CW Loop Temp Schedule, !- Schedule Name + CW Supply Outlet Node; !- Setpoint Node or NodeList Name + + BranchList, + Cooling Supply Side Branches, !- Name + CW Pump Branch, !- Branch 1 Name + Central Chiller Branch, !- Branch 2 Name + Cooling Supply Bypass Branch, !- Branch 3 Name + Cooling Supply Outlet; !- Branch 4 Name + + BranchList, + Cooling Demand Side Branches, !- Name + Cooling Demand Inlet, !- Branch 1 Name + Cooling Coil Branch, !- Branch 2 Name + OA Cooling Coil Branch, !- Branch 3 Name + Cooling Demand Bypass Branch, !- Branch 4 Name + Cooling Demand Outlet; !- Branch 5 Name + + ConnectorList, + Cooling Supply Side Connectors, !- Name + Connector:Splitter, !- Connector 1 Object Type + CW Loop Splitter, !- Connector 1 Name + Connector:Mixer, !- Connector 2 Object Type + CW Loop Mixer; !- Connector 2 Name + + ConnectorList, + Cooling Demand Side Connectors, !- Name + Connector:Splitter, !- Connector 1 Object Type + CW Demand Splitter, !- Connector 1 Name + Connector:Mixer, !- Connector 2 Object Type + CW Demand Mixer; !- Connector 2 Name + + Branch, + Cooling Demand Inlet, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Cooling Demand Side Inlet Pipe, !- Component 1 Name + CW Demand Inlet Node, !- Component 1 Inlet Node Name + CW Demand Entrance Pipe Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Cooling Demand Side Inlet Pipe, !- Name + CW Demand Inlet Node, !- Inlet Node Name + CW Demand Entrance Pipe Outlet Node; !- Outlet Node Name + + Branch, + Cooling Coil Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Cooling:Water, !- Component 1 Object Type + Main Cooling Coil 1, !- Component 1 Name + Main Cooling Coil 1 Water Inlet Node, !- Component 1 Inlet Node Name + Main Cooling Coil 1 Water Outlet Node; !- Component 1 Outlet Node Name + + Branch, + OA Cooling Coil Branch, !- Name + , !- Pressure Drop Curve Name + Coil:Cooling:Water, !- Component 1 Object Type + OA Cooling Coil 1, !- Component 1 Name + OA Cooling Coil 1 Water Inlet Node, !- Component 1 Inlet Node Name + OA Cooling Coil 1 Water Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Cooling Demand Bypass Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Cooling Demand Side Bypass, !- Component 1 Name + CW Demand Bypass Inlet Node, !- Component 1 Inlet Node Name + CW Demand Bypass Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Cooling Demand Side Bypass, !- Name + CW Demand Bypass Inlet Node, !- Inlet Node Name + CW Demand Bypass Outlet Node; !- Outlet Node Name + + Branch, + Cooling Demand Outlet, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + CW Demand Side Outlet Pipe, !- Component 1 Name + CW Demand Exit Pipe Inlet Node, !- Component 1 Inlet Node Name + CW Demand Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + CW Demand Side Outlet Pipe, !- Name + CW Demand Exit Pipe Inlet Node, !- Inlet Node Name + CW Demand Outlet Node; !- Outlet Node Name + + Branch, + Cooling Supply Outlet, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Supply Side Outlet Pipe, !- Component 1 Name + Supply Side Exit Pipe Inlet Node, !- Component 1 Inlet Node Name + CW Supply Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Supply Side Outlet Pipe, !- Name + Supply Side Exit Pipe Inlet Node, !- Inlet Node Name + CW Supply Outlet Node; !- Outlet Node Name + + Branch, + CW Pump Branch, !- Name + , !- Pressure Drop Curve Name + Pump:VariableSpeed, !- Component 1 Object Type + CW Circ Pump, !- Component 1 Name + CW Supply Inlet Node, !- Component 1 Inlet Node Name + CW Pump Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Central Chiller Branch, !- Name + , !- Pressure Drop Curve Name + Chiller:Electric, !- Component 1 Object Type + Central Chiller, !- Component 1 Name + Central Chiller Inlet Node, !- Component 1 Inlet Node Name + Central Chiller Outlet Node; !- Component 1 Outlet Node Name + + Branch, + Cooling Supply Bypass Branch, !- Name + , !- Pressure Drop Curve Name + Pipe:Adiabatic, !- Component 1 Object Type + Supply Side Bypass, !- Component 1 Name + CW Supply Bypass Inlet Node, !- Component 1 Inlet Node Name + CW Supply Bypass Outlet Node; !- Component 1 Outlet Node Name + + Pipe:Adiabatic, + Supply Side Bypass, !- Name + CW Supply Bypass Inlet Node, !- Inlet Node Name + CW Supply Bypass Outlet Node; !- Outlet Node Name + + Connector:Splitter, + CW Loop Splitter, !- Name + CW Pump Branch, !- Inlet Branch Name + Central Chiller Branch, !- Outlet Branch 1 Name + Cooling Supply Bypass Branch; !- Outlet Branch 2 Name + + Connector:Mixer, + CW Loop Mixer, !- Name + Cooling Supply Outlet, !- Outlet Branch Name + Central Chiller Branch, !- Inlet Branch 1 Name + Cooling Supply Bypass Branch; !- Inlet Branch 2 Name + + Connector:Splitter, + CW Demand Splitter, !- Name + Cooling Demand Inlet, !- Inlet Branch Name + Cooling Coil Branch, !- Outlet Branch 1 Name + OA Cooling Coil Branch, !- Outlet Branch 2 Name + Cooling Demand Bypass Branch; !- Outlet Branch 3 Name + + Connector:Mixer, + CW Demand Mixer, !- Name + Cooling Demand Outlet, !- Outlet Branch Name + Cooling Coil Branch, !- Inlet Branch 1 Name + OA Cooling Coil Branch, !- Inlet Branch 2 Name + Cooling Demand Bypass Branch; !- Inlet Branch 3 Name + + PlantEquipmentOperationSchemes, + CW Loop Operation, !- Name + PlantEquipmentOperation:CoolingLoad, !- Control Scheme 1 Object Type + Central Chiller Only, !- Control Scheme 1 Name + PlantOnSched; !- Control Scheme 1 Schedule Name + + PlantEquipmentOperation:CoolingLoad, + Central Chiller Only, !- Name + 0, !- Load Range 1 Lower Limit {W} + 900000, !- Load Range 1 Upper Limit {W} + Cooling Plant; !- Range 1 Equipment List Name + + PlantEquipmentList, + Cooling Plant, !- Name + Chiller:Electric, !- Equipment 1 Object Type + Central Chiller; !- Equipment 1 Name + + Chiller:Electric, + Central Chiller, !- Name + AirCooled, !- Condenser Type + autosize, !- Nominal Capacity {W} + 3.2, !- Nominal COP {W/W} + Central Chiller Inlet Node, !- Chilled Water Inlet Node Name + Central Chiller Outlet Node, !- Chilled Water Outlet Node Name + Central Chiller Condenser Inlet Node, !- Condenser Inlet Node Name + Central Chiller Condenser Outlet Node, !- Condenser Outlet Node Name + 0.0, !- Minimum Part Load Ratio + 1.0, !- Maximum Part Load Ratio + 0.65, !- Optimum Part Load Ratio + 35.0, !- Design Condenser Inlet Temperature {C} + 2.778, !- Temperature Rise Coefficient + 6.67, !- Design Chilled Water Outlet Temperature {C} + autosize, !- Design Chilled Water Flow Rate {m3/s} + autosize, !- Design Condenser Fluid Flow Rate {m3/s} + 0.9949, !- Coefficient 1 of Capacity Ratio Curve + -0.045954, !- Coefficient 2 of Capacity Ratio Curve + -0.0013543, !- Coefficient 3 of Capacity Ratio Curve + 2.333, !- Coefficient 1 of Power Ratio Curve + -1.975, !- Coefficient 2 of Power Ratio Curve + 0.6121, !- Coefficient 3 of Power Ratio Curve + 0.03303, !- Coefficient 1 of Full Load Ratio Curve + 0.6852, !- Coefficient 2 of Full Load Ratio Curve + 0.2818, !- Coefficient 3 of Full Load Ratio Curve + 5, !- Chilled Water Outlet Temperature Lower Limit {C} + LeavingSetpointModulated;!- Chiller Flow Mode + + SetpointManager:Scheduled, + Central Chiller Setpoint Manager, !- Name + Temperature, !- Control Variable + CW Loop Temp Schedule, !- Schedule Name + Central Chiller Outlet Node; !- Setpoint Node or NodeList Name + + OutdoorAir:Node, + Central Chiller Condenser Inlet Node, !- Name + -1.0; !- Height Above Ground {m} + + Pump:VariableSpeed, + CW Circ Pump, !- Name + CW Supply Inlet Node, !- Inlet Node Name + CW Pump Outlet Node, !- Outlet Node Name + autosize, !- Design Maximum Flow Rate {m3/s} + 179352, !- Design Pump Head {Pa} + autosize, !- Design Power Consumption {W} + 0.9, !- Motor Efficiency + 0.0, !- Fraction of Motor Inefficiencies to Fluid Stream + 0, !- Coefficient 1 of the Part Load Performance Curve + 1, !- Coefficient 2 of the Part Load Performance Curve + 0, !- Coefficient 3 of the Part Load Performance Curve + 0, !- Coefficient 4 of the Part Load Performance Curve + 0, !- Design Minimum Flow Rate {m3/s} + INTERMITTENT, !- Pump Control Type + CoolingPumpAvailSched; !- Pump Flow Rate Schedule Name + + Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly; + + Output:Variable,*,Zone Air Temperature,hourly; + + Output:Variable,*,Zone Mean Air Dewpoint Temperature,hourly; + + Output:Variable,*,Zone Air System Sensible Cooling Rate,hourly; + + Output:Variable,*,Zone Air System Sensible Heating Rate,hourly; + + Output:Variable,*,Zone People Occupant Count,hourly; + + Output:Variable,*,Zone People Total Heating Rate,hourly; + + Output:Variable,*,Space People Occupant Count,hourly; + + Output:Variable,*,Space People Total Heating Rate,hourly; + + Output:Variable,*,People Total Heating Rate,hourly; + + Output:Variable,*,People Occupant Count,hourly; + + Output:Variable,*,Lights Electricity Rate,hourly; + + Output:Variable,*,Zone Lights Electricity Rate,hourly; + + Output:Variable,*,Space Lights Electricity Rate,hourly; + + Output:Variable,*,Zone Electric Equipment Electricity Rate,hourly; + + Output:Variable,*,Space Electric Equipment Electricity Rate,hourly; + + Output:Variable,*,Zone Total Internal Radiant Heating Rate,hourly; + + Output:Variable,*,Zone Total Internal Visible Radiation Heating Rate,hourly; + + Output:Variable,*,Zone Total Internal Convective Heating Rate,hourly; + + Output:Variable,*,Zone Total Internal Latent Gain Rate,hourly; + + Output:Variable,*,Zone Total Internal Total Heating Rate,hourly; + + Output:Variable,*,Space Total Internal Radiant Heating Rate,hourly; + + Output:Variable,*,Space Total Internal Visible Radiation Heating Rate,hourly; + + Output:Variable,*,Space Total Internal Convective Heating Rate,hourly; + + Output:Variable,*,Space Total Internal Latent Gain Rate,hourly; + + Output:Variable,*,Space Total Internal Total Heating Rate,hourly; + + Output:VariableDictionary,idf; + + Output:Meter:MeterFileOnly,Electricity:Facility,monthly; + + Output:Meter:MeterFileOnly,Electricity:Building,monthly; + + Output:Meter:MeterFileOnly,InteriorLights:Electricity,monthly; + + Output:Meter:MeterFileOnly,Electricity:HVAC,monthly; + + Output:Meter:MeterFileOnly,Electricity:Plant,monthly; + + Output:Meter:MeterFileOnly,NaturalGas:Facility,monthly; + + Output:Meter:MeterFileOnly,NaturalGas:Plant,monthly; + + Output:Meter:MeterFileOnly,Electricity:Facility,runperiod; + + Output:Meter:MeterFileOnly,Electricity:Building,runperiod; + + Output:Meter:MeterFileOnly,InteriorLights:Electricity,runperiod; + + Output:Meter:MeterFileOnly,Electricity:HVAC,runperiod; + + Output:Meter:MeterFileOnly,Electricity:Plant,runperiod; + + Output:Meter:MeterFileOnly,NaturalGas:Facility,runperiod; + + Output:Meter:MeterFileOnly,NaturalGas:Plant,runperiod; + + Output:Meter:MeterFileOnly,MyGeneralLights,monthly; + + Output:Meter:MeterFileOnly,MyGeneralLights,runperiod; + + Output:Meter:MeterFileOnly,MyBuildingElectric,monthly; + + Output:Meter:MeterFileOnly,MyBuildingElectric,runperiod; + + Output:Meter:MeterFileOnly,MyBuildingOther,monthly; + + Output:Meter:MeterFileOnly,MyBuildingOther,runperiod; + +! The following custom meters are set up to illustrate the capabilities +! of custom meters. +! Custom Meter "MyGeneralLights" duplicates the InteriorLights:Electricity meter. +! Custom Meter "MyBuildingElectric" duplicates the Electricity:Building meter (by specifying that meter). +! Custom Meter (Decrement) "MyBuildingOther" uses Electricity:Building as its source meter +! and subtracts out the values for MyGeneralLights (aka InteriorLights:Electricity). The +! resultant value for MyBuildingOther should be equal to the value for the meters +! Electricity:Building - InteriorLights:Electricity (aka MyGeneralLights) + + Meter:Custom, + MyGeneralLights, !- Name + Electricity, !- Resource Type + Zone 1 Lights, !- Key Name 1 + Lights Electricity Energy, !- Output Variable or Meter Name 1 + Zone 2 Lights, !- Key Name 2 + Lights Electricity Energy, !- Output Variable or Meter Name 2 + Space 3 Storage Lights, !- Key Name 3 + Lights Electricity Energy, !- Output Variable or Meter Name 3 + Space 3 Open Office 1 Lights, !- Key Name 4 + Lights Electricity Energy, !- Output Variable or Meter Name 4 + Space 3 Open Office 2 Lights, !- Key Name 5 + Lights Electricity Energy, !- Output Variable or Meter Name 5 + Zone 4 Lights, !- Key Name 6 + Lights Electricity Energy, !- Output Variable or Meter Name 6 + Space 5 Office Zone 5 Lights, !- Key Name 7 + Lights Electricity Energy, !- Output Variable or Meter Name 7 + Space 5 Conference Zone 5 Lights, !- Key Name 8 + Lights Electricity Energy; !- Output Variable or Meter Name 8 + + Meter:Custom, + MyBuildingElectric, !- Name + Electricity, !- Resource Type + , !- Key Name 1 + Electricity:Building; !- Output Variable or Meter Name 1 + + Meter:CustomDecrement, + MyBuildingOther, !- Name + Electricity, !- Resource Type + Electricity:Building, !- Source Meter Name + , !- Key Name 1 + MyGeneralLights; !- Output Variable or Meter Name 1 + + Output:Surfaces:Drawing,VRML; + + OutputControl:Table:Style, + HTML; !- Column Separator + + Output:Table:SummaryReports, + AllSummary, !- Report 1 Name + ZoneComponentLoadSummary;!- Report 2 Name + + Output:Surfaces:List,Details; + + Output:Surfaces:List,DecayCurvesFromComponentLoadsSummary; + + Output:Surfaces:Drawing,dxf; + diff --git a/testfiles/5ZoneAirCooledWithSpacesHVAC.idf b/testfiles/5ZoneAirCooledWithSpacesHVAC.idf index aa2a19233fb..799f1f8e735 100644 --- a/testfiles/5ZoneAirCooledWithSpacesHVAC.idf +++ b/testfiles/5ZoneAirCooledWithSpacesHVAC.idf @@ -2536,9 +2536,20 @@ ZoneAirHeatBalanceAlgorithm, Zone 5 Exhaust Fan Inlet,!- Zone Equipment Inlet Node Name DesignCoolingLoad, !- Space Fraction Method Space 5 Conference, !- Space 1 Name - autosize, !- Space 1 Fraction {dimensionless} + autosize, !- Space 1 Fraction {dimensionless} Space 5 Conference Exhaust Fan Inlet; !- Space 1 Node Name + SpaceHVAC:ZoneReturnMixer, + Zone 5 Return Mixer, !- Name + Zone 5, !- Zone Name + Zone 5 Out Node, !- Zone Return Air Node Name + Space 5 Office, !- Space 1 Name + Space 5 Office Return Node, !- Space 1 Return Air Node Name + Space 5 Conference, !- Space 2 Name + Space 5 Conference Return Node, !- Space 2 Return Air Node Name + Zone 5-Remainder, !- Space 3 Name + Zone 5-Remainder Return Node; !- Space 3 Return Air Node Name + SpaceHVAC:EquipmentConnections, Space 5 Office, !- Space Name Space 5 Office In Node, !- Space Air Inlet Node or NodeList Name @@ -3828,6 +3839,20 @@ Output:Variable,*,Space Predicted Sensible Load to Setpoint Heat Transfer Rate,h Output:Variable,Space 5 Conference In Node,System Node Temperature,hourly; !- HVAC Average [kg/s] Output:Variable,Zone 5-Remainder In Node,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,Zone 5 Out Node,System Node Mass Flow Rate,hourly; !- HVAC Average [kg/s] + Output:Variable,Zone 5 Exhaust Fan Inlet,System Node Mass Flow Rate,hourly; !- HVAC Average [kg/s] + Output:Variable,Space 5 Office Return Node,System Node Mass Flow Rate,hourly; !- HVAC Average [kg/s] + Output:Variable,Space 5 Conference Return Node,System Node Mass Flow Rate,hourly; !- HVAC Average [kg/s] + Output:Variable,Space 5 Conference Exhaust Fan Inlet,System Node Mass Flow Rate,hourly; !- HVAC Average [kg/s] + Output:Variable,Zone 5-Remainder Return Node,System Node Mass Flow Rate,hourly; !- HVAC Average [kg/s] + + Output:Variable,Zone 5 Out Node,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,Zone 5 Exhaust Fan Inlet,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,Space 5 Office Return Node,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,Space 5 Conference Return Node,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,Space 5 Conference Exhaust Fan Inlet,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,Zone 5-Remainder Return Node,System Node Temperature,hourly; !- HVAC Average [kg/s] + Output:Variable,*,EMS Zone Wetbulb Globe Temperature,hourly; Output:Variable,*,EMS Space Wetbulb Globe Temperature,hourly; diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt index 19f20cb9cfd..0f07fc71c17 100644 --- a/testfiles/CMakeLists.txt +++ b/testfiles/CMakeLists.txt @@ -51,6 +51,7 @@ add_simulation_test(IDF_FILE 5ZoneAirCooledConvCoef.idf EPW_FILE USA_CO_Golden-N add_simulation_test(IDF_FILE 5ZoneAirCooledConvCoef_VSFan.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) add_simulation_test(IDF_FILE 5ZoneAirCooledKeepSiteLocation.idf EPW_FILE USA_CO_Golden-NREL.724666_TMY3.epw) add_simulation_test(IDF_FILE 5ZoneAirCooledWithSpaces.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) +add_simulation_test(IDF_FILE 5ZoneAirCooledWithSpacesDaylightingIntMass.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) add_simulation_test(IDF_FILE 5ZoneAirCooledWithSpaceHeatBalance.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) add_simulation_test(IDF_FILE 5ZoneAirCooledWithSpacesHVAC.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) add_simulation_test(IDF_FILE 5ZoneAirCooledDemandLimiting.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) diff --git a/testfiles/RefBldgMediumOfficeNew2004_Chicago_OutputControl.idf b/testfiles/RefBldgMediumOfficeNew2004_Chicago_OutputControl.idf index b7a0ca050ce..b89feeb9c58 100644 --- a/testfiles/RefBldgMediumOfficeNew2004_Chicago_OutputControl.idf +++ b/testfiles/RefBldgMediumOfficeNew2004_Chicago_OutputControl.idf @@ -7875,6 +7875,7 @@ No, !- Output SQLite No, !- Output JSON No, !- Output AUDIT + No, !- Output Space Sizing No, !- Output Zone Sizing No, !- Output System Sizing No, !- Output DXF diff --git a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf index 91ddad35a01..b766fbdc1a5 100644 --- a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf +++ b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf @@ -482,7 +482,7 @@ 0, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanModeSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU1 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU1 OA Mixer, !- Outside Air Mixer Object Name @@ -497,7 +497,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name Coil:Heating:Electric, !- Supplemental Heating Coil Object Type TU1 Supp Heating Coil, !- Supplemental Heating Coil Name - 50; !- Maximum Supply Air Temperature from Supplemental Heater {C} + 50, !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU1 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU1 VRF Fan Outlet Node, !- Air Outlet Node Name + 0.595, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0.69748, !- Electric Power Minimum Flow Rate Fraction + 400, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.5, !- Fan Total Efficiency + TU1 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU1 VRF Supply Fan_curve,!- Name + 0.09, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.91, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type !- =========== ALL OBJECTS IN CLASS: COIL:HEATING:ELECTRIC =========== @@ -530,26 +568,6 @@ OutdoorAir:NodeList, Outside Air Inlet Node 1;!- Node or NodeList Name 1 - Fan:VariableVolume, - TU1 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.5, !- Fan Total Efficiency - 400, !- Pressure Rise {Pa} - 0.595, !- Maximum Flow Rate {m3/s} - FixedFlowRate, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0.415, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.09, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.91, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU1 VRF Fan Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL =========== Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl, @@ -4695,7 +4713,7 @@ DishWasher, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 65.698787492023, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.15, !- Fraction Latent 0.6, !- Fraction Radiant @@ -4708,7 +4726,7 @@ Refrigerator, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 91.0575745202123, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 1, !- Fraction Radiant @@ -4721,7 +4739,7 @@ ClothesWasher, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 28.4784377542718, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.8, !- Fraction Radiant @@ -4734,7 +4752,7 @@ ClothesDryer, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 213.064557285022, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.05, !- Fraction Latent 0.15, !- Fraction Radiant @@ -4747,7 +4765,7 @@ CookingRange, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 248.154224774405, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.3, !- Fraction Latent 0.4, !- Fraction Radiant @@ -4760,7 +4778,7 @@ InteriorLighting, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 0, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 1, !- Fraction Radiant @@ -4773,7 +4791,7 @@ MiscPlugLoad, !- Schedule Name EquipmentLevel, !- Design Level Calculation Method 567.464237516869, !- Design Level {W} - , !- Watts per Zone Floor Area {W/m2} + , !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.06, !- Fraction Latent 0.69, !- Fraction Radiant @@ -4786,7 +4804,7 @@ MiscPlugLoad, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 1.54356736989469, !- Watts per Zone Floor Area {W/m2} + 1.54356736989469, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0624390461422629, !- Fraction Latent 0.41190936353998, !- Fraction Radiant @@ -6355,7 +6373,7 @@ InteriorLightingHE, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 1.91387072900558, !- Watts per Zone Floor Area {W/m2} + 1.91387072900558, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Return Air Fraction 0.6, !- Fraction Radiant @@ -6368,7 +6386,7 @@ InteriorLightingHE, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 0.478467682251396, !- Watts per Zone Floor Area {W/m2} + 0.478467682251396, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Return Air Fraction 0.6, !- Fraction Radiant diff --git a/testfiles/VariableRefrigerantFlow_FluidTCtrl_5Zone.idf b/testfiles/VariableRefrigerantFlow_FluidTCtrl_5Zone.idf index d766ef40844..e674841ad1f 100644 --- a/testfiles/VariableRefrigerantFlow_FluidTCtrl_5Zone.idf +++ b/testfiles/VariableRefrigerantFlow_FluidTCtrl_5Zone.idf @@ -320,7 +320,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU1 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU1 OA Mixer, !- Outside Air Mixer Object Name @@ -335,7 +335,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU1 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU1 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU1 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU1 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU2, !- Zone Terminal Unit Name @@ -351,7 +389,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU2 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU2 OA Mixer, !- Outside Air Mixer Object Name @@ -366,7 +404,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU2 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU2 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU2 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU2 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU3, !- Zone Terminal Unit Name @@ -382,7 +458,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU3 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU3 OA Mixer, !- Outside Air Mixer Object Name @@ -397,7 +473,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU3 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU3 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU3 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU3 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU4, !- Zone Terminal Unit Name @@ -413,7 +527,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU4 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU4 OA Mixer, !- Outside Air Mixer Object Name @@ -428,7 +542,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU4 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU4 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU4 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU4 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU5, !- Zone Terminal Unit Name @@ -444,7 +596,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU5 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU5 OA Mixer, !- Outside Air Mixer Object Name @@ -459,7 +611,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU5 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU5 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU5 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU5 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type Schedule:Compact, VRFFanSchedule, !- Name @@ -505,106 +695,6 @@ Relief Air Outlet Node 5,!- Relief Air Stream Node Name TU5 Inlet Node; !- Return Air Stream Node Name - Fan:VariableVolume, - TU1 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU1 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU2 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU2 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU3 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU3 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU4 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU4 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU5 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU5 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL =========== Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl, @@ -2040,7 +2130,8 @@ HeatBalanceAlgorithm,ConductionTransferFunction; ZoneAirHeatBalanceAlgorithm, - AnalyticalSolution; !- Algorithm + AnalyticalSolution, !- Algorithm + ; !- Do Space Heat Balance for Sizing GlobalGeometryRules, UpperLeftCorner, !- Starting Vertex Position @@ -2742,8 +2833,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.0167, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -2768,7 +2859,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -2782,7 +2873,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -2957,8 +3048,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.00717, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -2983,7 +3074,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -2997,7 +3088,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3137,8 +3228,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.0167, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3163,7 +3254,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3177,7 +3268,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3332,8 +3423,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.00717, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3358,7 +3449,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3372,7 +3463,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3512,8 +3603,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.031089, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3538,7 +3629,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3552,7 +3643,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3691,7 +3782,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE1-1, !- Name @@ -3727,7 +3825,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE2-1, !- Name @@ -3763,7 +3868,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE3-1, !- Name @@ -3799,7 +3911,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE4-1, !- Name @@ -3835,7 +3954,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE5-1, !- Name diff --git a/testfiles/VariableRefrigerantFlow_FluidTCtrl_HR_5Zone.idf b/testfiles/VariableRefrigerantFlow_FluidTCtrl_HR_5Zone.idf index 31458c8e19f..c40c8642f64 100644 --- a/testfiles/VariableRefrigerantFlow_FluidTCtrl_HR_5Zone.idf +++ b/testfiles/VariableRefrigerantFlow_FluidTCtrl_HR_5Zone.idf @@ -339,7 +339,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU1 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU1 OA Mixer, !- Outside Air Mixer Object Name @@ -354,7 +354,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU1 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU1 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU1 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU1 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU2, !- Zone Terminal Unit Name @@ -370,7 +408,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU2 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU2 OA Mixer, !- Outside Air Mixer Object Name @@ -385,7 +423,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU2 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU2 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU2 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU2 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU3, !- Zone Terminal Unit Name @@ -401,7 +477,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU3 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU3 OA Mixer, !- Outside Air Mixer Object Name @@ -416,7 +492,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU3 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU3 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU3 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU3 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU4, !- Zone Terminal Unit Name @@ -432,7 +546,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU4 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU4 OA Mixer, !- Outside Air Mixer Object Name @@ -447,7 +561,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU4 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU4 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU4 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU4 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU5, !- Zone Terminal Unit Name @@ -463,7 +615,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU5 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU5 OA Mixer, !- Outside Air Mixer Object Name @@ -478,7 +630,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name , !- Supplemental Heating Coil Object Type , !- Supplemental Heating Coil Name - ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU5 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU5 Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU5 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU5 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type Schedule:Compact, VRFFanSchedule, !- Name @@ -524,106 +714,6 @@ Relief Air Outlet Node 5,!- Relief Air Stream Node Name TU5 Inlet Node; !- Return Air Stream Node Name - Fan:VariableVolume, - TU1 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU1 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU2 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU2 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU3 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU3 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU4 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU4 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU5 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU5 Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL =========== Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl, @@ -2059,7 +2149,8 @@ HeatBalanceAlgorithm,ConductionTransferFunction; ZoneAirHeatBalanceAlgorithm, - AnalyticalSolution; !- Algorithm + AnalyticalSolution, !- Algorithm + ; !- Do Space Heat Balance for Sizing GlobalGeometryRules, UpperLeftCorner, !- Starting Vertex Position @@ -2761,8 +2852,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.0167, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -2787,7 +2878,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -2801,7 +2892,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -2976,8 +3067,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.00717, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3002,7 +3093,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3016,7 +3107,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3156,8 +3247,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.0167, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3182,7 +3273,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3196,7 +3287,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3351,8 +3442,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.00717, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3377,7 +3468,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3391,7 +3482,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3531,8 +3622,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.031089, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -3557,7 +3648,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -3571,7 +3662,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 107.64, !- Watts per Zone Floor Area {W/m2} + 107.64, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -3710,7 +3801,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE1-1, !- Name @@ -3746,7 +3844,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE2-1, !- Name @@ -3782,7 +3887,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE3-1, !- Name @@ -3818,7 +3930,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE4-1, !- Name @@ -3854,7 +3973,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} DesignSpecification:OutdoorAir, SZ DSOA SPACE5-1, !- Name diff --git a/testfiles/VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone.idf b/testfiles/VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone.idf index d5a19ad2e8d..4b4c889d90c 100644 --- a/testfiles/VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone.idf +++ b/testfiles/VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone.idf @@ -145,7 +145,8 @@ !- =========== ALL OBJECTS IN CLASS: ZONEAIRHEATBALANCEALGORITHM =========== ZoneAirHeatBalanceAlgorithm, - AnalyticalSolution; !- Algorithm + AnalyticalSolution, !- Algorithm + ; !- Do Space Heat Balance for Sizing !- =========== ALL OBJECTS IN CLASS: TIMESTEP =========== @@ -1721,7 +1722,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -1735,7 +1736,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -1749,7 +1750,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -1763,7 +1764,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -1777,7 +1778,7 @@ LIGHTS-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Lighting Level {W} - 16.15, !- Watts per Zone Floor Area {W/m2} + 16.15, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0.0, !- Return Air Fraction 0.59, !- Fraction Radiant @@ -1793,7 +1794,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -1805,7 +1806,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -1817,7 +1818,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -1829,7 +1830,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -1841,7 +1842,7 @@ EQUIP-1, !- Schedule Name Watts/Area, !- Design Level Calculation Method , !- Design Level {W} - 10.76, !- Watts per Zone Floor Area {W/m2} + 10.76, !- Watts per Floor Area {W/m2} , !- Watts per Person {W/person} 0, !- Fraction Latent 0.3, !- Fraction Radiant @@ -1855,8 +1856,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.0167, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -1869,8 +1870,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.00717, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -1883,8 +1884,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.0167, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -1897,8 +1898,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.00717, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -1911,8 +1912,8 @@ INFIL-SCH, !- Schedule Name flow/zone, !- Design Flow Rate Calculation Method 0.031089, !- Design Flow Rate {m3/s} - , !- Flow per Zone Floor Area {m3/s-m2} - , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Flow Rate per Floor Area {m3/s-m2} + , !- Flow Rate per Exterior Surface Area {m3/s-m2} , !- Air Changes per Hour {1/hr} 0, !- Constant Term Coefficient 0, !- Temperature Term Coefficient @@ -1991,7 +1992,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} Sizing:Zone, SPACE2-1, !- Zone or ZoneList Name @@ -2020,7 +2028,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} Sizing:Zone, SPACE3-1, !- Zone or ZoneList Name @@ -2049,7 +2064,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} Sizing:Zone, SPACE4-1, !- Zone or ZoneList Name @@ -2078,7 +2100,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} Sizing:Zone, SPACE5-1, !- Zone or ZoneList Name @@ -2107,7 +2136,14 @@ No, !- Account for Dedicated Outdoor Air System NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C} - autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + autosize, !- Dedicated Outdoor Air High Setpoint Temperature for Design {C} + , !- Zone Load Sizing Method + , !- Zone Latent Cooling Design Supply Air Humidity Ratio Input Method + , !- Zone Dehumidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + , !- Zone Cooling Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} + , !- Zone Latent Heating Design Supply Air Humidity Ratio Input Method + , !- Zone Humidification Design Supply Air Humidity Ratio {kgWater/kgDryAir} + ; !- Zone Humidification Design Supply Air Humidity Ratio Difference {kgWater/kgDryAir} !- =========== ALL OBJECTS IN CLASS: SIZING:PLANT =========== ! ************* Hot Water Plant Loop for space heating ****************************** @@ -2207,7 +2243,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU1 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU1 OA Mixer, !- Outside Air Mixer Object Name @@ -2222,7 +2258,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name Coil:Heating:Electric, !- Supplemental Heating Coil Object Type TU1 Supp Heating Coil, !- Supplemental Heating Coil Name - autosize; !- Maximum Supply Air Temperature from Supplemental Heater {C} + autosize, !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU1 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU1 VRF Fan Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU1 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU1 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU2, !- Zone Terminal Unit Name @@ -2238,7 +2312,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU2 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU2 OA Mixer, !- Outside Air Mixer Object Name @@ -2253,7 +2327,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name Coil:Heating:Fuel, !- Supplemental Heating Coil Object Type TU2 Supp Heating Coil, !- Supplemental Heating Coil Name - autosize; !- Maximum Supply Air Temperature from Supplemental Heater {C} + autosize, !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU2 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU2 VRF Fan Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU2 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU2 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU3, !- Zone Terminal Unit Name @@ -2269,7 +2381,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU3 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU3 OA Mixer, !- Outside Air Mixer Object Name @@ -2284,7 +2396,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name Coil:Heating:Water, !- Supplemental Heating Coil Object Type TU3 Supp Heating Coil, !- Supplemental Heating Coil Name - autosize; !- Maximum Supply Air Temperature from Supplemental Heater {C} + autosize, !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU3 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU3 VRF Fan Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU3 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU3 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU4, !- Zone Terminal Unit Name @@ -2300,7 +2450,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU4 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU4 OA Mixer, !- Outside Air Mixer Object Name @@ -2315,7 +2465,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name Coil:Heating:Fuel, !- Supplemental Heating Coil Object Type TU4 Supp Heating Coil, !- Supplemental Heating Coil Name - autosize; !- Maximum Supply Air Temperature from Supplemental Heater {C} + autosize, !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU4 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU4 VRF Fan Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU4 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU4 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, TU5, !- Zone Terminal Unit Name @@ -2331,7 +2519,7 @@ autosize, !- No Load Outdoor Air Flow Rate {m3/s} VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name drawthrough, !- Supply Air Fan Placement - Fan:VariableVolume, !- Supply Air Fan Object Type + Fan:SystemModel, !- Supply Air Fan Object Type TU5 VRF Supply Fan, !- Supply Air Fan Object Name OutdoorAir:Mixer, !- Outside Air Mixer Object Type TU5 OA Mixer, !- Outside Air Mixer Object Name @@ -2346,7 +2534,45 @@ , !- Design Specification ZoneHVAC Sizing Object Name Coil:Heating:Steam, !- Supplemental Heating Coil Object Type TU5 Supp Heating Coil, !- Supplemental Heating Coil Name - autosize; !- Maximum Supply Air Temperature from Supplemental Heater {C} + autosize, !- Maximum Supply Air Temperature from Supplemental Heater {C} + ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C} + + Fan:SystemModel, + TU5 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU5 VRF Fan Outlet Node, !- Air Outlet Node Name + autosize, !- Design Maximum Air Flow Rate {m3/s} + Continuous, !- Speed Control Method + 0, !- Electric Power Minimum Flow Rate Fraction + 600, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1, !- Motor In Air Stream Fraction + autosize, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.7, !- Fan Total Efficiency + TU5 VRF Supply Fan_curve,!- Electric Power Function of Flow Fraction Curve Name + , !- Night Ventilation Mode Pressure Rise {Pa} + , !- Night Ventilation Mode Flow Fraction + , !- Motor Loss Zone Name + , !- Motor Loss Radiative Fraction + General; !- End-Use Subcategory + + Curve:Quartic, + TU5 VRF Supply Fan_curve,!- Name + 0.059, !- Coefficient1 Constant + 0, !- Coefficient2 x + 0, !- Coefficient3 x**2 + 0.928, !- Coefficient4 x**3 + 0, !- Coefficient5 x**4 + 0.0000000, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.0, !- Minimum Curve Output + 5.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type !- =========== ALL OBJECTS IN CLASS: ZONEHVAC:EQUIPMENTLIST =========== @@ -2442,108 +2668,6 @@ SPACE5-1 Node, !- Zone Air Node Name SPACE5-1 Out Node; !- Zone Return Air Node or NodeList Name -!- =========== ALL OBJECTS IN CLASS: FAN:VARIABLEVOLUME =========== - - Fan:VariableVolume, - TU1 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU1 VRF Fan Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU2 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU2 VRF Fan Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU3 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU3 VRF Fan Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU4 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU4 VRF Fan Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - - Fan:VariableVolume, - TU5 VRF Supply Fan, !- Name - VRFAvailSched, !- Availability Schedule Name - 0.7, !- Fan Total Efficiency - 600, !- Pressure Rise {Pa} - autosize, !- Maximum Flow Rate {m3/s} - Fraction, !- Fan Power Minimum Flow Rate Input Method - 0, !- Fan Power Minimum Flow Fraction - 0, !- Fan Power Minimum Air Flow Rate {m3/s} - 0.9, !- Motor Efficiency - 1, !- Motor In Airstream Fraction - 0.059, !- Fan Power Coefficient 1 - 0, !- Fan Power Coefficient 2 - 0, !- Fan Power Coefficient 3 - 0.928, !- Fan Power Coefficient 4 - 0, !- Fan Power Coefficient 5 - TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name - TU5 VRF Fan Outlet Node, !- Air Outlet Node Name - General; !- End-Use Subcategory - !- =========== ALL OBJECTS IN CLASS: COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL =========== Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl, @@ -2820,7 +2944,7 @@ Branch, Heating Purchased Hot Water Branch, !- Name , !- Pressure Drop Curve Name - DistrictHeating:Water, !- Component 1 Object Type + DistrictHeating:Water, !- Component 1 Object Type Purchased Heating, !- Component 1 Name Purchased Heat Inlet Node, !- Component 1 Inlet Node Name Purchased Heat Outlet Node; !- Component 1 Outlet Node Name @@ -3272,7 +3396,7 @@ PlantEquipmentList, heating plant, !- Name - DistrictHeating:Water, !- Equipment 1 Object Type + DistrictHeating:Water, !- Equipment 1 Object Type Purchased Heating; !- Equipment 1 Name PlantEquipmentList, diff --git a/testfiles/_1ZoneUncontrolled_ForAPITesting.idf b/testfiles/_1ZoneUncontrolled_ForAPITesting.idf new file mode 100644 index 00000000000..371220f4605 --- /dev/null +++ b/testfiles/_1ZoneUncontrolled_ForAPITesting.idf @@ -0,0 +1,466 @@ +!-Generator IDFEditor 1.34 +!-Option OriginalOrderTop UseSpecialFormat +!-NOTE: All comments with '!-' are ignored by the IDFEditor and are generated automatically. +!- Use '!' comments if they need to be retained when using the IDFEditor. +!1ZoneUncontrolled.idf +! Basic file description: Basic test for EnergyPlus. Resistive Walls. Regular (no ground contact) floor. +! Regular roof. No Windows. +! +! Highlights: Very basic test to see that EnergyPlus "works". +! +! +! Simulation Location/Run: Denver Centennial Golden CO USA WMO=724666, 2 design days, 1 run period, +! Run Control executes two design days (see RUN PERIOD object) +! +! Location: Denver, CO +! +! Design Days: Denver Centennial Golden CO USA Annual Heating 99%, MaxDB=-15.5°C +! Denver Centennial Golden CO USA Annual Cooling (DB=>MWB) 1%, MaxDB=32°C MWB=15.5°C +! +! Run Period (Weather File): Full Annual Simulation, DENVER_STAPLETON_CO_USA_WMO_724690 +! +! Run Control: No zone or system sizing, design day run control (no weather file simulation) +! +! Building: Fictional 1 zone building with resistive walls. +! +! The building is oriented due north. +! +! Floor Area: 232.25 m2 +! Number of Stories: 1 +! +! Zone Description Details: +! +! (0,15.24,0) (15.24,15.24,0) +! _____________________________ +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! | | +! |_____________________________| +! +! (0,0,0) (15.24,0,0) +! +! Internal gains description: NA +! +! Interzone Surfaces: None +! Internal Mass: None +! People: None +! Lights: None +! Equipment: None +! Windows: 0 +! Detached Shading: None +! Daylight: None +! Natural Ventilation: None +! Compact Schedules: NA (Example of non-Compact Schedules) +! Solar Distribution: MinimalShadowing +! +! HVAC: NA +! +! Zonal Equipment: NA +! Central Air Handling Equipment: No +! System Equipment Autosize: No +! Purchased Cooling: No +! Purchased Heating: No +! Purchased Chilled Water: No +! Purchased Hot Water: No +! Coils: None +! Pumps: None +! Boilers: None +! Chillers: None +! Towers: None +! +! Results: +! Standard Reports: Variable Dictionary, Surfaces (dxf-wireframe), Meter File +! Timestep or Hourly Variables: Hourly and Daily +! Time bins Report: None +! HTML Report: None +! Environmental Emissions: None +! Utility Tariffs: None + + Version,24.2; + + Timestep,4; + + Building, + Simple One Zone (Wireframe DXF), !- Name + 0, !- North Axis {deg} + Suburbs, !- Terrain + 0.04, !- Loads Convergence Tolerance Value {W} + 0.004, !- Temperature Convergence Tolerance Value {deltaC} + MinimalShadowing, !- Solar Distribution + 30, !- Maximum Number of Warmup Days + 6; !- Minimum Number of Warmup Days + + HeatBalanceAlgorithm,ConductionTransferFunction; + + SurfaceConvectionAlgorithm:Inside,TARP; + + SurfaceConvectionAlgorithm:Outside,DOE-2; + + SimulationControl, + No, !- Do Zone Sizing Calculation + No, !- Do System Sizing Calculation + No, !- Do Plant Sizing Calculation + Yes, !- Run Simulation for Sizing Periods + Yes, !- Run Simulation for Weather File Run Periods + No, !- Do HVAC Sizing Simulation for Sizing Periods + 1; !- Maximum Number of HVAC Sizing Simulation Passes + + RunPeriod, + Run Period 1, !- Name + 1, !- Begin Month + 1, !- Begin Day of Month + , !- Begin Year + 12, !- End Month + 31, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + Site:Location, + Denver Centennial Golden N_CO_USA Design_Conditions, !- Name + 39.74, !- Latitude {deg} + -105.18, !- Longitude {deg} + -7.00, !- Time Zone {hr} + 1829.00; !- Elevation {m} + + ! WMO=724666 Time Zone=NAM: (GMT-07:00) Mountain Time (US & Canada) + ! Data Source=ASHRAE 2009 Annual Design Conditions + ! Denver Centennial Golden N_CO_USA Annual Heating Design Conditions Wind Speed=3m/s Wind Dir=340 + ! Coldest Month=DEC + ! Denver Centennial Golden N_CO_USA Annual Heating 99%, MaxDB=-15.5°C + + SizingPeriod:DesignDay, + Denver Centennial Golden N Ann Htg 99% Condns DB, !- Name + 12, !- Month + 21, !- Day of Month + WinterDesignDay, !- Day Type + -15.5, !- Maximum Dry-Bulb Temperature {C} + 0.0, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + -15.5, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 81198., !- Barometric Pressure {Pa} + 3, !- Wind Speed {m/s} + 340, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 0.00; !- Sky Clearness + + ! Denver Centennial Golden N Annual Cooling Design Conditions Wind Speed=4.9m/s Wind Dir=0 + ! Hottest Month=JUL + ! Denver Centennial Golden N_CO_USA Annual Cooling (DB=>MWB) 1%, MaxDB=32°C MWB=15.5°C + + SizingPeriod:DesignDay, + Denver Centennial Golden N Ann Clg 1% Condns DB=>MWB, !- Name + 7, !- Month + 21, !- Day of Month + SummerDesignDay, !- Day Type + 32, !- Maximum Dry-Bulb Temperature {C} + 15.2, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 15.5, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 81198., !- Barometric Pressure {Pa} + 4.9, !- Wind Speed {m/s} + 0, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 1.00; !- Sky Clearness + + Material:NoMass, + R13LAYER, !- Name + Rough, !- Roughness + 2.290965, !- Thermal Resistance {m2-K/W} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material:NoMass, + R31LAYER, !- Name + Rough, !- Roughness + 5.456, !- Thermal Resistance {m2-K/W} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + C5 - 4 IN HW CONCRETE, !- Name + MediumRough, !- Roughness + 0.1014984, !- Thickness {m} + 1.729577, !- Conductivity {W/m-K} + 2242.585, !- Density {kg/m3} + 836.8000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + Construction, + R13WALL, !- Name + R13LAYER; !- Outside Layer + + Construction, + FLOOR, !- Name + C5 - 4 IN HW CONCRETE; !- Outside Layer + + Construction, + ROOF31, !- Name + R31LAYER; !- Outside Layer + + Zone, + ZONE ONE, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + autocalculate, !- Ceiling Height {m} + autocalculate; !- Volume {m3} + + ScheduleTypeLimits, + Fraction, !- Name + 0.0, !- Lower Limit Value + 1.0, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + + GlobalGeometryRules, + UpperLeftCorner, !- Starting Vertex Position + CounterClockWise, !- Vertex Entry Direction + World; !- Coordinate System + + BuildingSurface:Detailed, + Zn001:Wall001, !- Name + Wall, !- Surface Type + R13WALL, !- Construction Name + ZONE ONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,0,4.572000, !- X,Y,Z ==> Vertex 1 {m} + 0,0,0, !- X,Y,Z ==> Vertex 2 {m} + 15.24000,0,0, !- X,Y,Z ==> Vertex 3 {m} + 15.24000,0,4.572000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Wall002, !- Name + Wall, !- Surface Type + R13WALL, !- Construction Name + ZONE ONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 15.24000,0,4.572000, !- X,Y,Z ==> Vertex 1 {m} + 15.24000,0,0, !- X,Y,Z ==> Vertex 2 {m} + 15.24000,15.24000,0, !- X,Y,Z ==> Vertex 3 {m} + 15.24000,15.24000,4.572000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Wall003, !- Name + Wall, !- Surface Type + R13WALL, !- Construction Name + ZONE ONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 15.24000,15.24000,4.572000, !- X,Y,Z ==> Vertex 1 {m} + 15.24000,15.24000,0, !- X,Y,Z ==> Vertex 2 {m} + 0,15.24000,0, !- X,Y,Z ==> Vertex 3 {m} + 0,15.24000,4.572000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Wall004, !- Name + Wall, !- Surface Type + R13WALL, !- Construction Name + ZONE ONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.5000000, !- View Factor to Ground + 4, !- Number of Vertices + 0,15.24000,4.572000, !- X,Y,Z ==> Vertex 1 {m} + 0,15.24000,0, !- X,Y,Z ==> Vertex 2 {m} + 0,0,0, !- X,Y,Z ==> Vertex 3 {m} + 0,0,4.572000; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Flr001, !- Name + Floor, !- Surface Type + FLOOR, !- Construction Name + ZONE ONE, !- Zone Name + , !- Space Name + Adiabatic, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 1.000000, !- View Factor to Ground + 4, !- Number of Vertices + 15.24000,0.000000,0.0, !- X,Y,Z ==> Vertex 1 {m} + 0.000000,0.000000,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.000000,15.24000,0.0, !- X,Y,Z ==> Vertex 3 {m} + 15.24000,15.24000,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + Zn001:Roof001, !- Name + Roof, !- Surface Type + ROOF31, !- Construction Name + ZONE ONE, !- Zone Name + , !- Space Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0, !- View Factor to Ground + 4, !- Number of Vertices + 0.000000,15.24000,4.572, !- X,Y,Z ==> Vertex 1 {m} + 0.000000,0.000000,4.572, !- X,Y,Z ==> Vertex 2 {m} + 15.24000,0.000000,4.572, !- X,Y,Z ==> Vertex 3 {m} + 15.24000,15.24000,4.572; !- X,Y,Z ==> Vertex 4 {m} + + Output:Variable,*,Site Outdoor Air Drybulb Temperature,hourly; + + Output:Variable,*,Site Total Sky Cover,hourly; + + Output:Variable,*,Site Opaque Sky Cover,hourly; + + Output:Variable,*,Site Daylight Saving Time Status,daily; + + Output:Variable,*,Site Day Type Index,daily; + + Output:Variable,*,Zone Mean Air Temperature,hourly; + + Output:Variable,*,Zone Operative Temperature,hourly; !- Zone Average [C] + + Output:Variable,ZONE ONE,Zone Wetbulb Globe Temperature,hourly; + + Output:Variable,*,Zone Total Internal Latent Gain Energy,hourly; + + Output:Variable,*,Zone Mean Radiant Temperature,hourly; + + Output:Variable,*,Zone Air Heat Balance Surface Convection Rate,hourly; + + Output:Variable,*,Zone Air Heat Balance Air Energy Storage Rate,hourly; + + Output:Variable,*,Surface Inside Face Temperature,daily; + + Output:Variable,*,Surface Outside Face Temperature,daily; + + Output:Variable,*,Surface Inside Face Convection Heat Transfer Coefficient,daily; + + Output:Variable,*,Surface Outside Face Convection Heat Transfer Coefficient,daily; + + Output:Variable,*,Other Equipment Total Heating Energy,monthly; + + Output:Variable,*,Zone Other Equipment Total Heating Energy,monthly; + + Output:VariableDictionary,IDF; + + Output:Surfaces:Drawing,dxf:wireframe; + + Output:Constructions,Constructions; + + Output:Meter:MeterFileOnly,ExteriorLights:Electricity,hourly; + + Output:Meter:MeterFileOnly,EnergyTransfer:Building,hourly; + + Output:Meter:MeterFileOnly,EnergyTransfer:Facility,hourly; + + OutputControl:Table:Style, + ALL; !- Column Separator + + Output:Table:SummaryReports, + AllSummary; !- Report 1 Name + + Exterior:Lights, + ExtLights, !- Name + AlwaysOn, !- Schedule Name + 5250, !- Design Level {W} + AstronomicalClock, !- Control Option + Grounds Lights; !- End-Use Subcategory + + ScheduleTypeLimits, + On/Off, !- Name + 0, !- Lower Limit Value + 1, !- Upper Limit Value + DISCRETE; !- Numeric Type + + OtherEquipment, + Test 352a, !- Name + None, !- Fuel Type + ZONE ONE, !- Zone or ZoneList or Space or SpaceList Name + AlwaysOn, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + 352, !- Design Level {W} + , !- Power per Zone Floor Area {W/m2} + , !- Power per Person {W/person} + 0, !- Fraction Latent + 0, !- Fraction Radiant + 0; !- Fraction Lost + + OtherEquipment, + Test 352 minus, !- Name + None, !- Fuel Type + ZONE ONE, !- Zone or ZoneList or Space or SpaceList Name + AlwaysOn, !- Schedule Name + EquipmentLevel, !- Design Level Calculation Method + -352, !- Design Level {W} + , !- Power per Zone Floor Area {W/m2} + , !- Power per Person {W/person} + 0, !- Fraction Latent + 0, !- Fraction Radiant + 0; !- Fraction Lost + + Schedule:Constant,AlwaysOn,On/Off,1.0; + + EnergyManagementSystem:GlobalVariable,MaximumEffort; diff --git a/tst/EnergyPlus/api/TestDataTransfer.c b/tst/EnergyPlus/api/TestDataTransfer.c index 3980ba06440..978d1bbde5f 100644 --- a/tst/EnergyPlus/api/TestDataTransfer.c +++ b/tst/EnergyPlus/api/TestDataTransfer.c @@ -79,7 +79,7 @@ void afterZoneTimeStepHandler(EnergyPlusState state) char **surfaceNames = getObjectNames(state, "BuildingSurface:Detailed", &arraySize); if (arraySize == 0) { - printf("Encountered a file with no BuildingSurface:Detailed, can't run this script on that file! Aborting!"); + printf("Encountered a file with no BuildingSurface:Detailed, can't run this script on that file! Aborting!\n"); exit(1); } @@ -91,11 +91,27 @@ void afterZoneTimeStepHandler(EnergyPlusState state) wallConstruction = getConstructionHandle(state, "R13WALL"); floorConstruction = getConstructionHandle(state, "FLOOR"); - // don't forget to free memory from the API! + // checking for EMS globals + int const emsGlobalValid = getEMSGlobalVariableHandle(state, "MaximumEffort"); + int const emsGlobalInvalid = getEMSGlobalVariableHandle(state, "4or5moments"); + int const emsGlobalBuiltIn = getEMSGlobalVariableHandle(state, "WARMUPFLAG"); + if (emsGlobalValid > 0 && emsGlobalInvalid == 0 && emsGlobalBuiltIn == 0) { + printf("EMS Global handle lookups worked just fine!\n"); + } else { + printf("EMS Global handle lookup failed. Make sure to call this with _1ZoneUncontrolled_ForAPITesting.idf\n"); + exit(1); + } + setEMSGlobalVariableValue(state, emsGlobalValid, 2.0); + Real64 const val = getEMSGlobalVariableValue(state, emsGlobalValid); + if (val < 1.9999 || val > 2.0001) { + printf("EMS Global assignment/lookup didn't seem to work, odd\n"); + exit(1); + } + freeAPIData(data, arraySize); freeObjectNames(surfaceNames, arraySize); - printf("Got handles %d, %d, %d, %d, %d, %d", + printf("Got handles %d, %d, %d, %d, %d, %d\n", outdoorDewPointActuator, outdoorTempSensor, outdoorDewPointSensor, @@ -106,6 +122,13 @@ void afterZoneTimeStepHandler(EnergyPlusState state) wallConstruction == -1 || floorConstruction == -1) { exit(1); } + + char *idfPath = inputFilePath(state); + char *epwPath = epwFilePath(state); + printf("Got an input file path of: %s, and weather file path of: %s\n", idfPath, epwPath); + free(idfPath); + free(epwPath); + handlesRetrieved = 1; } setActuatorValue(state, outdoorDewPointActuator, -25.0); diff --git a/tst/EnergyPlus/api/TestDataTransfer.py b/tst/EnergyPlus/api/TestDataTransfer.py index a73a91b1107..422670190d7 100644 --- a/tst/EnergyPlus/api/TestDataTransfer.py +++ b/tst/EnergyPlus/api/TestDataTransfer.py @@ -101,6 +101,26 @@ def time_step_handler(state): wall_construction_handle = api.exchange.get_construction_handle(state, "R13WALL") floor_construction_handle = api.exchange.get_construction_handle(state, "FLOOR") + + idf_path = api.exchange.get_input_file_path(state) + epw_path = api.exchange.get_weather_file_path(state) + print(f"Got an input file path of: {idf_path}, and weather file path of: {epw_path}") + + # checking for EMS globals + ems_global_valid = api.exchange.get_ems_global_handle(state, "MaximumEffort") + ems_global_invalid = api.exchange.get_ems_global_handle(state, "4or5moments") + ems_global_builtin = api.exchange.get_ems_global_handle(state, "WARMUPFLAG") + if ems_global_valid > 0 and ems_global_invalid == 0 and ems_global_builtin == 0: + print("EMS Global handle lookups worked just fine!") + else: + raise Exception( + "EMS Global handle lookup failed. Make sure to call this with _1ZoneUncontrolled_ForAPITesting.idf" + ) + api.exchange.set_ems_global_value(state, ems_global_valid, 2.0) + val = api.exchange.get_ems_global_value(state, ems_global_valid) + if val < 1.9999 or val > 2.0001: + raise Exception("EMS Global assignment/lookup didn't seem to work, odd") + except Exception as e: # Capture ok and exception message exception = e diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index 6fb85c4a598..752ccc73f3b 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -3405,7 +3405,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMInletSi " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", " , !- Outside Air Mixer Object Type", " , !- Outside Air Mixer Object Name", @@ -3416,26 +3416,43 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMInletSi " 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W}", " 20; !- Zone Terminal Unit Off Parasitic Electric Energy Use {W}", - " Fan:VariableVolume,", + " Fan:SystemModel,", " TU1 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " 0.500, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", " TU1 Outlet Node, !- Air Outlet Node Name", + " 0.500, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU1 Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", + " Curve:Quartic,", + " TU1 Fan Power Curve , !- Name", + " 0.059, !- Coefficient1 Constant", + " 0, !- Coefficient2 x ", + " 0, !- Coefficient3 x**2 ", + " 0.928, !- Coefficient4 x**3 ", + " 0, !- Coefficient5 x**4 ", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.0, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + " Coil:Heating:DX:VariableRefrigerantFlow:FluidTemperatureControl,", " TU1 VRF DX Heating Coil, !- Name", " VRFAvailSched, !- Availability Schedule", @@ -5063,6 +5080,8 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMInletSi // set secondary air mass flow rate to zero state->dataLoopNodes->Node(state->dataSingleDuct->SysATMixer(1).SecInNode).MassFlowRate = 0.0; + state->dataFans->fans(1)->set_size(*state); // add sizing + state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio = 1.0; // Simulate zoneHVAC equipment (VRF terminal unit) SimVRF(*state, VRFTUNum, FirstHVACIteration, OnOffAirFlowRatio, QUnitOutVRFTU, LatOutputProvided, QZnReq); @@ -5164,7 +5183,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMSupplyS " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", " , !- Outside Air Mixer Object Type", " , !- Outside Air Mixer Object Name", @@ -5175,26 +5194,43 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMSupplyS " 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W}", " 20; !- Zone Terminal Unit Off Parasitic Electric Energy Use {W}", - " Fan:VariableVolume,", + " Fan:SystemModel,", " TU1 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " 0.500, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", " SPACE1-1 AIR TERMINAL MIXER SECONDARY INLET, !- Air Outlet Node Name", + " 0.500, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU1 Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", + " Curve:Quartic,", + " TU1 Fan Power Curve , !- Name", + " 0.059, !- Coefficient1 Constant", + " 0, !- Coefficient2 x ", + " 0, !- Coefficient3 x**2 ", + " 0.928, !- Coefficient4 x**3 ", + " 0, !- Coefficient5 x**4 ", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.0, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + " Coil:Heating:DX:VariableRefrigerantFlow:FluidTemperatureControl,", " TU1 VRF DX Heating Coil, !- Name", " VRFAvailSched, !- Availability Schedule", @@ -6817,6 +6853,8 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMSupplyS state->dataScheduleMgr->Schedule(state->dataHVACVarRefFlow->VRFTU(VRFTUNum).SchedPtr).CurrentValue = 1.0; // unit is always available state->dataScheduleMgr->Schedule(state->dataHVACVarRefFlow->VRFTU(VRFTUNum).FanAvailSchedPtr).CurrentValue = 1.0; // fan is always available + state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio = 1.0; + state->dataFans->fans(1)->set_size(*state); // add fan sizing // set secondary air mass flow rate to zero state->dataLoopNodes->Node(state->dataSingleDuct->SysATMixer(1).SecInNode).MassFlowRate = 0.0; @@ -6829,8 +6867,8 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMSupplyS // check the terminal air mixer outlet flow rate must be equal to the mass flow rate of VRFTU + the primary air ATMixerOutletMassFlowRate = SecondaryAirMassFlowRate + PrimaryAirMassFlowRate; ASSERT_EQ(ATMixerOutletMassFlowRate, state->dataSingleDuct->SysATMixer(1).MixedAirMassFlowRate); - // check the cooling output delivered is within 2.0 Watt of zone cooling load - ASSERT_NEAR(QZnReq, QUnitOutVRFTU, 2.0); + // changed the threshold from 2 to 3 as the fan was changed from hard-sized to autosize, a little more error is expected + ASSERT_NEAR(QZnReq, QUnitOutVRFTU, 3.0); } TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimUnitVent_ATMInletSide) diff --git a/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc b/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc index 7b11550948c..ab90e93809e 100644 --- a/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc +++ b/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc @@ -2898,7 +2898,7 @@ TEST_F(EnergyPlusFixture, DesiccantDehum_OnOASystemTest) auto &finalSysSizing = state->dataSize->FinalSysSizing(1); auto &sysSizPeakDDNum = state->dataSize->SysSizPeakDDNum(1); EXPECT_ENUM_EQ(finalSysSizing.coolingPeakLoad, DataSizing::PeakLoad::SensibleCooling); - EXPECT_EQ(finalSysSizing.SizingOption, DataSizing::NonCoincident); + EXPECT_ENUM_EQ(finalSysSizing.SizingOption, DataSizing::SizingConcurrence::NonCoincident); EXPECT_EQ(sysSizPeakDDNum.SensCoolPeakDD, coolPeakDD); int timeStepIndexAtPeakCoolLoad = sysSizPeakDDNum.TimeStepAtSensCoolPk(coolPeakDD); EXPECT_EQ(sysSizPeakDDNum.TimeStepAtTotCoolPk(coolPeakDD), timeStepIndexAtPeakCoolLoad); diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index 4616f9874a1..97f3bc54e4a 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -90,6 +90,7 @@ void EnergyPlusFixture::openOutputFiles(EnergyPlusData &state) state.files.mtd.open_as_stringstream(); state.files.edd.open_as_stringstream(); state.files.zsz.open_as_stringstream(); + state.files.spsz.open_as_stringstream(); state.files.ssz.open_as_stringstream(); } @@ -130,6 +131,7 @@ void EnergyPlusFixture::TearDown() state->files.eio.del(); state->files.debug.del(); state->files.zsz.del(); + state->files.spsz.del(); state->files.ssz.del(); state->files.mtr.del(); state->files.bnd.del(); diff --git a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc index f26620cf1a4..c7f26710338 100644 --- a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc +++ b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc @@ -11784,7 +11784,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", " , !- Outside Air Mixer Object Type", " , !- Outside Air Mixer Object Name", @@ -11856,26 +11856,43 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) " Temperature, !- Input Unit Type for X", " Temperature; !- Output Unit Type", - " Fan:VariableVolume,", + " Fan:SystemModel,", " TU1 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", " TU1 Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU1 Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", + " Curve:Quartic,", + " TU1 Fan Power Curve , !- Name", + " 0.059, !- Coefficient1 Constant", + " 0, !- Coefficient2 x ", + " 0, !- Coefficient3 x**2 ", + " 0.928, !- Coefficient4 x**3 ", + " 0, !- Coefficient5 x**4 ", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.0, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + " !- =========== ALL OBJECTS IN CLASS: FLUIDPROPERTIES:NAME =========== ", " ", " FluidProperties:Name, ", @@ -13229,6 +13246,8 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) Real64 OAUCoilOutTemp = 0.0; bool ZoneEquipment = true; + // add VRF cycling ratio initialization. Since TU's are simulated first, if there's no initialization, the coil runtime fraction will be zero + state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio = 1.0; SimulateVRF(*state, state->dataHVACVarRefFlow->VRFTU(VRFTUNum).Name, FirstHVACIteration, @@ -13256,8 +13275,10 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) EXPECT_EQ(0.0, thisVRFTU.NoCoolHeatOutAirMassFlow); EXPECT_NEAR(5125.0840, thisDXCoolingCoil.TotalCoolingEnergyRate, 0.0001); EXPECT_NEAR(4999.8265, thisVRFTU.TotalCoolingRate, 0.0001); - EXPECT_NEAR(125.2573, thisFan->totalPower, 0.0001); + EXPECT_NEAR(125.2573 * thisDXCoolingCoil.CoolingCoilRuntimeFraction, thisFan->totalPower, 0.0001); EXPECT_NEAR(thisDXCoolingCoil.TotalCoolingEnergyRate, (thisVRFTU.TotalCoolingRate + thisFan->totalPower), 0.0001); + EXPECT_NEAR(0.8930, state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio, 0.0001); + EXPECT_NEAR(state->dataHVACVarRefFlow->VRF(1).OUFanPower, state->dataHVACVarRefFlow->VRF(1).RatedOUFanPower, 0.0001); } // Test for #7648: HREIRFTHeat wrongly used HRCAPFTHeatConst. Occurs only if you have Heat Recovery @@ -16295,7 +16316,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_SupplementalHtgCoilTest) " 0, !- No Load Outdoor Air Flow Rate {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", " OutdoorAir:Mixer, !- Outside Air Mixer Object Type", " TU1 OA Mixer, !- Outside Air Mixer Object Name", @@ -16326,7 +16347,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_SupplementalHtgCoilTest) " 0, !- No Load Outdoor Air Flow Rate {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU2 VRF Supply Fan, !- Supply Air Fan Object Name", " OutdoorAir:Mixer, !- Outside Air Mixer Object Type", " TU2 OA Mixer, !- Outside Air Mixer Object Name", @@ -16379,44 +16400,64 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_SupplementalHtgCoilTest) " SPACE2-1 Node, !- Zone Air Node Name", " SPACE2-1 Out Node; !- Zone Return Air Node or NodeList Name", - "Fan:VariableVolume,", + " Fan:SystemModel,", " TU1 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", - " TU1 VRF Fan Outlet Node, !- Air Outlet Node Name", + " TU1 VRF Fan Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", - "Fan:VariableVolume,", + " Curve:Quartic,", + " TU Fan Power Curve , !- Name", + " 0.059, !- Coefficient1 Constant", + " 0, !- Coefficient2 x ", + " 0, !- Coefficient3 x**2 ", + " 0.928, !- Coefficient4 x**3 ", + " 0, !- Coefficient5 x**4 ", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.0, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Fan:SystemModel,", " TU2 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", - " TU2 VRF Fan Outlet Node, !- Air Outlet Node Name", + " TU2 VRF Fan Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", "Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl,", @@ -18256,6 +18297,8 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_SupplementalHtgCoilTest) state->dataHVACVarRefFlow->HeatingLoad(VRFCond) = false; state->dataHVACVarRefFlow->TerminalUnitList(1).IsSimulated = true; + state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio = 1.0; + QZnReq = state->dataZoneEnergyDemand->ZoneSysEnergyDemand(zone_num_TU1).RemainingOutputRequired; SimVRF(*state, VRFTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); ReportVRFTerminalUnit(*state, VRFTUNum); @@ -18408,7 +18451,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_offSupplementalHtgCoilTest) " 0, !- No Load Outdoor Air Flow Rate {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", " OutdoorAir:Mixer, !- Outside Air Mixer Object Type", " TU1 OA Mixer, !- Outside Air Mixer Object Name", @@ -18439,7 +18482,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_offSupplementalHtgCoilTest) " 0, !- No Load Outdoor Air Flow Rate {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU2 VRF Supply Fan, !- Supply Air Fan Object Name", " OutdoorAir:Mixer, !- Outside Air Mixer Object Type", " TU2 OA Mixer, !- Outside Air Mixer Object Name", @@ -18492,44 +18535,64 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_offSupplementalHtgCoilTest) " SPACE2-1 Node, !- Zone Air Node Name", " SPACE2-1 Out Node; !- Zone Return Air Node or NodeList Name", - "Fan:VariableVolume,", + " Fan:SystemModel,", " TU1 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", - " TU1 VRF Fan Outlet Node, !- Air Outlet Node Name", + " TU1 VRF Fan Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", - "Fan:VariableVolume,", + " Curve:Quartic,", + " TU Fan Power Curve , !- Name", + " 0.059, !- Coefficient1 Constant", + " 0, !- Coefficient2 x ", + " 0, !- Coefficient3 x**2 ", + " 0.928, !- Coefficient4 x**3 ", + " 0, !- Coefficient5 x**4 ", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.0, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Fan:SystemModel,", " TU2 VRF Supply Fan, !- Name", " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", " TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", - " TU2 VRF Fan Outlet Node, !- Air Outlet Node Name", + " TU2 VRF Fan Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", " General; !- End-Use Subcategory", "Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl,", @@ -20269,6 +20332,9 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_offSupplementalHtgCoilTest) GetVRFInput(*state); state->dataHVACVarRefFlow->GetVRFInputFlag = false; + state->dataHVACGlobal->OnOffFanPartLoadFraction = 1.0; + state->dataHVACVarRefFlow->VRF(VRFCond).VRFCondCyclingRatio = 1.0; + state->dataScheduleMgr->Schedule(state->dataHVACVarRefFlow->VRF(VRFCond).SchedPtr).CurrentValue = 1.0; VRFTUNum = zone_num_TU1; state->dataScheduleMgr->Schedule(state->dataHVACVarRefFlow->VRFTU(VRFTUNum).SchedPtr).CurrentValue = 1.0; @@ -20514,7 +20580,7 @@ TEST_F(EnergyPlusFixture, VRF_MixedTypes) " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", " , !- Outside Air Mixer Object Type", " , !- Outside Air Mixer Object Name", @@ -20546,25 +20612,28 @@ TEST_F(EnergyPlusFixture, VRF_MixedTypes) " IUCondTempCurve; !- Indoor Unit Condensing Temperature Function of Subcooling Curve Name", "", "", - "Fan:VariableVolume,", - " TU1 VRF Supply Fan, !- Name", - " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", - " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", - " TU1 Outlet Node, !- Air Outlet Node Name", - " General; !- End-Use Subcategory", + " Fan:SystemModel,", + " TU1 VRF Supply Fan, !- Name", + " VRFAvailSched, !- Availability Schedule Name", + " TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", + " TU1 Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " , !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", + " General; !- End-Use Subcategory", }); std::string const vrfFluidCtrl_HR = delimited_string({ @@ -20682,7 +20751,7 @@ TEST_F(EnergyPlusFixture, VRF_MixedTypes) " 0, !- Outdoor Air Flow Rate When No Cooling or Heating is Needed {m3/s}", " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", " drawthrough, !- Supply Air Fan Placement", - " Fan:VariableVolume, !- Supply Air Fan Object Type", + " Fan:SystemModel, !- Supply Air Fan Object Type", " TU2 VRF Supply Fan, !- Supply Air Fan Object Name", " , !- Outside Air Mixer Object Type", " , !- Outside Air Mixer Object Name", @@ -20714,28 +20783,45 @@ TEST_F(EnergyPlusFixture, VRF_MixedTypes) " IUCondTempCurve; !- Indoor Unit Condensing Temperature Function of Subcooling Curve Name", "", "", - "Fan:VariableVolume,", - " TU2 VRF Supply Fan, !- Name", - " VRFAvailSched, !- Availability Schedule Name", - " 0.7, !- Fan Total Efficiency", - " 600, !- Pressure Rise {Pa}", - " autosize, !- Maximum Flow Rate {m3/s}", - " Fraction, !- Fan Power Minimum Flow Rate Input Method", - " 0, !- Fan Power Minimum Flow Fraction", - " 0, !- Fan Power Minimum Air Flow Rate {m3/s}", - " 0.9, !- Motor Efficiency", - " 1, !- Motor In Airstream Fraction", - " 0.059, !- Fan Power Coefficient 1", - " 0, !- Fan Power Coefficient 2", - " 0, !- Fan Power Coefficient 3", - " 0.928, !- Fan Power Coefficient 4", - " 0, !- Fan Power Coefficient 5", - " TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", - " TU2 Outlet Node, !- Air Outlet Node Name", - " General; !- End-Use Subcategory", + " Fan:SystemModel,", + " TU2 VRF Supply Fan, !- Name", + " VRFAvailSched, !- Availability Schedule Name", + " TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name", + " TU2 Outlet Node, !- Air Outlet Node Name", + " autosize, !- Design Maximum Air Flow Rate {m3/s}", + " Continuous, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " autosize, !- Design Electric Power Consumption {W}", + " , !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.7, !- Fan Total Efficiency", + " TU Fan Power Curve, !- Electric Power Function of Flow Fraction Curve Name", + " ,", + " ,", + " ,", + " ,", + " General; !- End-Use Subcategory", }); std::string const commonCurvesAndFansForFluidCtrlAndHR = delimited_string({ + " Curve:Quartic,", + " TU Fan Power Curve , !- Name", + " 0.059, !- Coefficient1 Constant", + " 0, !- Coefficient2 x ", + " 0, !- Coefficient3 x**2 ", + " 0.928, !- Coefficient4 x**3 ", + " 0, !- Coefficient5 x**4 ", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.0, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + "Curve:Quadratic,", " OUEvapTempCurve, !- Name", " 0, !- Coefficient1 Constant", diff --git a/tst/EnergyPlus/unit/OutputFiles.unit.cc b/tst/EnergyPlus/unit/OutputFiles.unit.cc index e0417086a8d..62a7f0d0747 100644 --- a/tst/EnergyPlus/unit/OutputFiles.unit.cc +++ b/tst/EnergyPlus/unit/OutputFiles.unit.cc @@ -293,6 +293,7 @@ OutputControl:Files, {sqlite}, !- Output SQLite {json}, !- Output JSON {audit}, !- Output AUDIT + {spsz}, !- Output Space Sizing {zsz}, !- Output Zone Sizing {ssz}, !- Output System Sizing {dxf}, !- Output DXF @@ -329,29 +330,30 @@ OutputControl:Files, bool sqlite = (i == 5); bool json = (i == 6); bool audit = (i == 7); - bool zsz = (i == 8); - bool ssz = (i == 9); - bool dxf = (i == 10); - bool bnd = (i == 11); - bool rdd = (i == 12); - bool mdd = (i == 13); - bool mtd = (i == 14); - bool end = (i == 15); - bool shd = (i == 16); - bool dfs = (i == 17); - bool glhe = (i == 18); - bool delightin = (i == 19); - bool delighteldmp = (i == 20); - bool delightdfdmp = (i == 21); - bool edd = (i == 22); - bool dbg = (i == 23); - bool perflog = (i == 24); - bool sln = (i == 25); - bool sci = (i == 26); - bool wrl = (i == 27); - bool screen = (i == 28); - bool extshd = (i == 29); - bool tarcog = (i == 30); + bool spsz = (i == 8); + bool zsz = (i == 9); + bool ssz = (i == 10); + bool dxf = (i == 11); + bool bnd = (i == 12); + bool rdd = (i == 13); + bool mdd = (i == 14); + bool mtd = (i == 15); + bool end = (i == 16); + bool shd = (i == 17); + bool dfs = (i == 18); + bool glhe = (i == 19); + bool delightin = (i == 20); + bool delighteldmp = (i == 21); + bool delightdfdmp = (i == 22); + bool edd = (i == 23); + bool dbg = (i == 24); + bool perflog = (i == 25); + bool sln = (i == 26); + bool sci = (i == 27); + bool wrl = (i == 28); + bool screen = (i == 29); + bool extshd = (i == 30); + bool tarcog = (i == 31); std::string const idf_objects = fmt::format(idf_objects_fmt, fmt::arg("csv", boolToString(csv)), @@ -362,6 +364,7 @@ OutputControl:Files, fmt::arg("sqlite", boolToString(sqlite)), fmt::arg("json", boolToString(json)), fmt::arg("audit", boolToString(audit)), + fmt::arg("spsz", boolToString(spsz)), fmt::arg("zsz", boolToString(zsz)), fmt::arg("ssz", boolToString(ssz)), fmt::arg("dxf", boolToString(dxf)), @@ -398,6 +401,7 @@ OutputControl:Files, EXPECT_EQ(sqlite, state->files.outputControl.sqlite); EXPECT_EQ(json, state->files.outputControl.json); EXPECT_EQ(audit, state->files.outputControl.audit); + EXPECT_EQ(spsz, state->files.outputControl.spsz); EXPECT_EQ(zsz, state->files.outputControl.zsz); EXPECT_EQ(ssz, state->files.outputControl.ssz); EXPECT_EQ(dxf, state->files.outputControl.dxf); @@ -432,6 +436,7 @@ OutputControl:Files, state->files.outputControl.sqlite = false; state->files.outputControl.json = false; state->files.outputControl.audit = false; + state->files.outputControl.spsz = false; state->files.outputControl.zsz = false; state->files.outputControl.ssz = false; state->files.outputControl.dxf = false; diff --git a/tst/EnergyPlus/unit/OutputProcessor.unit.cc b/tst/EnergyPlus/unit/OutputProcessor.unit.cc index 44ae8837d37..effaeb282d0 100644 --- a/tst/EnergyPlus/unit/OutputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/OutputProcessor.unit.cc @@ -1315,9 +1315,9 @@ namespace OutputProcessor { ASSERT_EQ(2ul, errorData.size()); std::vector errorData0{ - "1", "1", "0", "DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[unknown].", "1"}; + "1", "1", "0", "DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[unknown].", "0"}; std::vector errorData1{ - "2", "1", "0", "DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[unknown].", "1"}; + "2", "1", "0", "DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[unknown].", "0"}; EXPECT_EQ(errorData0, errorData[0]); EXPECT_EQ(errorData1, errorData[1]); } @@ -2140,7 +2140,7 @@ namespace OutputProcessor { "0", "DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[unknown]. ..on " "Meter=\"testMeter2\". ..requests for IP units from this meter will be ignored.", - "1"}; + "0"}; EXPECT_EQ(errorData0, errorData[0]); ASSERT_EQ(2ul, op->meters.size()); diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index 333ea62a9c2..68afb1ad5ec 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -7233,7 +7233,7 @@ TEST_F(SQLiteFixture, OutputReportTabular_WriteLoadComponentSummaryTables_AirLoo state->dataSize->NumSysSizInput = 1; state->dataSize->SysSizInput.allocate(state->dataSize->NumSysSizInput); state->dataSize->SysSizInput(1).AirLoopNum = 1; - state->dataSize->SysSizInput(1).SizingOption = DataSizing::NonCoincident; + state->dataSize->SysSizInput(1).SizingOption = DataSizing::SizingConcurrence::NonCoincident; auto degC_to_F = [](Real64 celsius) constexpr { return celsius * (9.0 / 5.0) + 32.0; diff --git a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc index 7dcaa240cb5..86ba25331bb 100644 --- a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc +++ b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc @@ -555,7 +555,7 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_CalcZoneMassBalanceTest2) Real64 StdTotalReturnMassFlow = 0.0; Real64 FinalTotalReturnMassFlow = 0.0; - CalcZoneReturnFlows(*state, ZoneNum, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); + state->dataZoneEquip->ZoneEquipConfig(ZoneNum).calcReturnFlows(*state, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); EXPECT_EQ(FinalTotalReturnMassFlow, 0.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode1).MassFlowRate, 0.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode2).MassFlowRate, 0.0); @@ -572,7 +572,7 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_CalcZoneMassBalanceTest2) StdTotalReturnMassFlow = 0.0; FinalTotalReturnMassFlow = 0.0; - CalcZoneReturnFlows(*state, ZoneNum, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); + state->dataZoneEquip->ZoneEquipConfig(ZoneNum).calcReturnFlows(*state, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); EXPECT_EQ(FinalTotalReturnMassFlow, 6.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode1).MassFlowRate, 2.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode2).MassFlowRate, 1.0); @@ -792,7 +792,7 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_CalcZoneMassBalanceTest4) Real64 StdTotalReturnMassFlow = 0.0; Real64 FinalTotalReturnMassFlow = 0.0; - CalcZoneReturnFlows(*state, ZoneNum, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); + state->dataZoneEquip->ZoneEquipConfig(ZoneNum).calcReturnFlows(*state, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); EXPECT_EQ(FinalTotalReturnMassFlow, 0.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode1).MassFlowRate, 0.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode2).MassFlowRate, 0.0); @@ -809,7 +809,7 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_CalcZoneMassBalanceTest4) StdTotalReturnMassFlow = 6.0; FinalTotalReturnMassFlow = 0.0; - CalcZoneReturnFlows(*state, ZoneNum, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); + state->dataZoneEquip->ZoneEquipConfig(ZoneNum).calcReturnFlows(*state, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); EXPECT_EQ(FinalTotalReturnMassFlow, 5.9); EXPECT_EQ(state->dataLoopNodes->Node(returnNode1).MassFlowRate, 2.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode2).MassFlowRate, 0.9); @@ -832,7 +832,7 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_CalcZoneMassBalanceTest4) StdTotalReturnMassFlow = 6.0; FinalTotalReturnMassFlow = 0.0; - CalcZoneReturnFlows(*state, ZoneNum, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); + state->dataZoneEquip->ZoneEquipConfig(ZoneNum).calcReturnFlows(*state, StdTotalReturnMassFlow, FinalTotalReturnMassFlow); EXPECT_EQ(FinalTotalReturnMassFlow, 6.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode1).MassFlowRate, 2.0); EXPECT_EQ(state->dataLoopNodes->Node(returnNode2).MassFlowRate, 1.0); @@ -5217,8 +5217,8 @@ TEST_F(EnergyPlusFixture, SpaceHVACMixerTest) mixSpace2.spaceNodeNum = 12; mixSpace3.spaceNodeNum = 13; state->dataLoopNodes->Node.allocate(13); - thisMixer.zoneEquipInletNodeNum = 1; - auto &equipInletNode = state->dataLoopNodes->Node(thisMixer.zoneEquipInletNodeNum); + thisMixer.outletNodeNum = 1; + auto &equipInletNode = state->dataLoopNodes->Node(thisMixer.outletNodeNum); auto &mixSpace1Node = state->dataLoopNodes->Node(mixSpace1.spaceNodeNum); auto &mixSpace2Node = state->dataLoopNodes->Node(mixSpace2.spaceNodeNum); auto &mixSpace3Node = state->dataLoopNodes->Node(mixSpace3.spaceNodeNum); @@ -5357,3 +5357,181 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_GetZoneEquipmentTest) EXPECT_FALSE(state->dataZoneEquipmentManager->GetZoneEquipmentInputFlag); EXPECT_EQ(state->dataZoneEquipmentManager->NumOfTimeStepInDay, 24); } +TEST_F(EnergyPlusFixture, SpaceReturnMixerTest) +{ + state->dataZoneEquip->zoneReturnMixer.resize(1); + auto &thisMixer = state->dataZoneEquip->zoneReturnMixer[0]; + // Assume 3 spaces are served by this mixter + int numSpaces = 3; + thisMixer.spaces.resize(numSpaces); + auto &mixSpace1 = thisMixer.spaces[0]; + auto &mixSpace2 = thisMixer.spaces[1]; + auto &mixSpace3 = thisMixer.spaces[2]; + mixSpace1.spaceIndex = 1; + mixSpace2.spaceIndex = 3; + mixSpace3.spaceIndex = 2; + mixSpace1.spaceNodeNum = 11; + mixSpace2.spaceNodeNum = 13; + mixSpace3.spaceNodeNum = 12; + state->dataLoopNodes->Node.allocate(13); + thisMixer.outletNodeNum = 10; + auto &outletNode = state->dataLoopNodes->Node(thisMixer.outletNodeNum); + auto &mixSpace1Node = state->dataLoopNodes->Node(mixSpace1.spaceNodeNum); + auto &mixSpace2Node = state->dataLoopNodes->Node(mixSpace2.spaceNodeNum); + auto &mixSpace3Node = state->dataLoopNodes->Node(mixSpace3.spaceNodeNum); + state->dataContaminantBalance->Contaminant.CO2Simulation = true; + state->dataContaminantBalance->Contaminant.GenericContamSimulation = true; + state->dataZoneEquip->spaceEquipConfig.allocate(numSpaces); + auto &spaceEquipConfig1 = state->dataZoneEquip->spaceEquipConfig(1); + auto &spaceEquipConfig2 = state->dataZoneEquip->spaceEquipConfig(2); + auto &spaceEquipConfig3 = state->dataZoneEquip->spaceEquipConfig(3); + spaceEquipConfig1.NumReturnNodes = 1; + spaceEquipConfig2.NumReturnNodes = 1; + spaceEquipConfig3.NumReturnNodes = 1; + spaceEquipConfig1.ReturnNode.allocate(1); + spaceEquipConfig2.ReturnNode.allocate(1); + spaceEquipConfig3.ReturnNode.allocate(1); + spaceEquipConfig1.ReturnNode(1) = 11; + spaceEquipConfig2.ReturnNode(1) = 12; + spaceEquipConfig3.ReturnNode(1) = 13; + spaceEquipConfig1.ReturnNodeInletNum.allocate(1); + spaceEquipConfig2.ReturnNodeInletNum.allocate(1); + spaceEquipConfig3.ReturnNodeInletNum.allocate(1); + spaceEquipConfig1.ReturnNodeInletNum(1) = 1; + spaceEquipConfig2.ReturnNodeInletNum(1) = 1; + spaceEquipConfig3.ReturnNodeInletNum(1) = 1; + spaceEquipConfig1.InletNodeADUNum.allocate(1); + spaceEquipConfig2.InletNodeADUNum.allocate(1); + spaceEquipConfig3.InletNodeADUNum.allocate(1); + spaceEquipConfig1.InletNodeADUNum(1) = 0; + spaceEquipConfig2.InletNodeADUNum(1) = 0; + spaceEquipConfig3.InletNodeADUNum(1) = 0; + spaceEquipConfig1.ReturnNodeAirLoopNum.allocate(1); + spaceEquipConfig2.ReturnNodeAirLoopNum.allocate(1); + spaceEquipConfig3.ReturnNodeAirLoopNum.allocate(1); + spaceEquipConfig1.ReturnNodeAirLoopNum(1) = 1; + spaceEquipConfig2.ReturnNodeAirLoopNum(1) = 1; + spaceEquipConfig3.ReturnNodeAirLoopNum(1) = 1; + spaceEquipConfig1.InletNode.allocate(1); + spaceEquipConfig2.InletNode.allocate(1); + spaceEquipConfig3.InletNode.allocate(1); + spaceEquipConfig1.InletNode(1) = 1; + spaceEquipConfig2.InletNode(1) = 2; + spaceEquipConfig3.InletNode(1) = 3; + auto &space1InletNode = state->dataLoopNodes->Node(spaceEquipConfig1.InletNode(1)); + auto &space2InletNode = state->dataLoopNodes->Node(spaceEquipConfig2.InletNode(1)); + auto &space3InletNode = state->dataLoopNodes->Node(spaceEquipConfig3.InletNode(1)); + spaceEquipConfig1.FixedReturnFlow.allocate(1); + spaceEquipConfig2.FixedReturnFlow.allocate(1); + spaceEquipConfig3.FixedReturnFlow.allocate(1); + + spaceEquipConfig1.ZoneNode = 5; + spaceEquipConfig2.ZoneNode = 6; + spaceEquipConfig3.ZoneNode = 7; + auto &space1Node = state->dataLoopNodes->Node(spaceEquipConfig1.ZoneNode); + auto &space2Node = state->dataLoopNodes->Node(spaceEquipConfig2.ZoneNode); + auto &space3Node = state->dataLoopNodes->Node(spaceEquipConfig3.ZoneNode); + + // Note that spaces are not in numerical order + // mixSpace1.spaceIndex = 1; + // mixSpace2.spaceIndex = 3; + // mixSpace3.spaceIndex = 2; + space1InletNode.MassFlowRate = 0.2; + space3InletNode.MassFlowRate = 0.5; + space2InletNode.MassFlowRate = 0.3; + + state->dataAirLoop->AirLoopFlow.allocate(1); + auto &thisAirLoopFlow = state->dataAirLoop->AirLoopFlow(1); + thisAirLoopFlow.SysRetFlow = 1.0; + state->dataAirSystemsData->PrimaryAirSystems.allocate(1); + + // Set flow rates/fractions + outletNode.MassFlowRate = 1.0; + thisMixer.setInletFlows(*state); + EXPECT_NEAR(mixSpace1.fraction, 0.2, 0.001); + EXPECT_NEAR(mixSpace2.fraction, 0.5, 0.001); + EXPECT_NEAR(mixSpace3.fraction, 0.3, 0.001); + + // Case 1 + space1Node.Temp = 15.0; + space3Node.Temp = 15.0; + space2Node.Temp = 15.0; + + space1Node.HumRat = 0.004; + space3Node.HumRat = 0.001; + space2Node.HumRat = 0.080; + + space1Node.Press = 100000.0; + space3Node.Press = 100020.0; + space2Node.Press = 99400.0; + + space1Node.GenContam = 10.0; + space3Node.GenContam = 20.0; + space2Node.GenContam = 30.0; + + space1Node.Enthalpy = Psychrometrics::PsyHFnTdbW(space1Node.Temp, space1Node.HumRat); + space2Node.Enthalpy = Psychrometrics::PsyHFnTdbW(space2Node.Temp, space2Node.HumRat); + space3Node.Enthalpy = Psychrometrics::PsyHFnTdbW(space3Node.Temp, space3Node.HumRat); + + thisMixer.setInletConditions(*state); + + EXPECT_NEAR(mixSpace1Node.Temp, space1Node.Temp, 0.01); + EXPECT_NEAR(mixSpace2Node.Temp, space3Node.Temp, 0.01); + EXPECT_NEAR(mixSpace3Node.Temp, space2Node.Temp, 0.01); + + EXPECT_NEAR(mixSpace1Node.HumRat, space1Node.HumRat, 0.01); + EXPECT_NEAR(mixSpace2Node.HumRat, space3Node.HumRat, 0.01); + EXPECT_NEAR(mixSpace3Node.HumRat, space2Node.HumRat, 0.01); + + EXPECT_NEAR(mixSpace1Node.Enthalpy, space1Node.Enthalpy, 0.001); + EXPECT_NEAR(mixSpace2Node.Enthalpy, space3Node.Enthalpy, 0.001); + EXPECT_NEAR(mixSpace3Node.Enthalpy, space2Node.Enthalpy, 0.001); + + EXPECT_NEAR(mixSpace1Node.Press, space1Node.Press, 0.001); + EXPECT_NEAR(mixSpace2Node.Press, space3Node.Press, 0.001); + EXPECT_NEAR(mixSpace3Node.Press, space2Node.Press, 0.001); + + EXPECT_NEAR(mixSpace1Node.GenContam, space1Node.GenContam, 0.001); + EXPECT_NEAR(mixSpace2Node.GenContam, space3Node.GenContam, 0.001); + EXPECT_NEAR(mixSpace3Node.GenContam, space2Node.GenContam, 0.001); + + outletNode.Temp = 19.2; + outletNode.HumRat = 0.005; + outletNode.CO2 = 100.0; + + thisMixer.setOutletConditions(*state); + Real64 expectedInletEnthalpy = + mixSpace1Node.Enthalpy * mixSpace1.fraction + mixSpace2Node.Enthalpy * mixSpace2.fraction + mixSpace3Node.Enthalpy * mixSpace3.fraction; + Real64 expectedInletHumRat = + mixSpace1Node.HumRat * mixSpace1.fraction + mixSpace2Node.HumRat * mixSpace2.fraction + mixSpace3Node.HumRat * mixSpace3.fraction; + Real64 expectedInletCO2 = + mixSpace1Node.CO2 * mixSpace1.fraction + mixSpace2Node.CO2 * mixSpace2.fraction + mixSpace3Node.CO2 * mixSpace3.fraction; + Real64 expectedInletGenContam = + mixSpace1Node.GenContam * mixSpace1.fraction + mixSpace2Node.GenContam * mixSpace2.fraction + mixSpace3Node.GenContam * mixSpace3.fraction; + Real64 expectedInletPress = + mixSpace1Node.Press * mixSpace1.fraction + mixSpace2Node.Press * mixSpace2.fraction + mixSpace3Node.Press * mixSpace3.fraction; + Real64 expectedInletTemp = Psychrometrics::PsyTdbFnHW(expectedInletEnthalpy, expectedInletHumRat); + + EXPECT_NEAR(expectedInletEnthalpy, outletNode.Enthalpy, 0.0001); + EXPECT_NEAR(expectedInletTemp, outletNode.Temp, 0.0001); + EXPECT_NEAR(expectedInletHumRat, outletNode.HumRat, 0.0001); + EXPECT_NEAR(expectedInletCO2, outletNode.CO2, 0.0001); + EXPECT_NEAR(expectedInletGenContam, outletNode.GenContam, 0.0001); + EXPECT_NEAR(expectedInletPress, outletNode.Press, 0.0001); + + outletNode.MassFlowRate = 0.1; + outletNode.MassFlowRateMinAvail = 0.0; + outletNode.MassFlowRateMaxAvail = 0.15; + + thisMixer.setInletFlows(*state); + + EXPECT_NEAR(mixSpace1Node.MassFlowRate, outletNode.MassFlowRate * mixSpace1.fraction, 0.0001); + EXPECT_NEAR(mixSpace2Node.MassFlowRate, outletNode.MassFlowRate * mixSpace2.fraction, 0.0001); + EXPECT_NEAR(mixSpace3Node.MassFlowRate, outletNode.MassFlowRate * mixSpace3.fraction, 0.0001); + EXPECT_NEAR(mixSpace1Node.MassFlowRateMinAvail, outletNode.MassFlowRateMinAvail * mixSpace1.fraction, 0.0001); + EXPECT_NEAR(mixSpace2Node.MassFlowRateMinAvail, outletNode.MassFlowRateMinAvail * mixSpace2.fraction, 0.0001); + EXPECT_NEAR(mixSpace3Node.MassFlowRateMinAvail, outletNode.MassFlowRateMinAvail * mixSpace3.fraction, 0.0001); + EXPECT_NEAR(mixSpace1Node.MassFlowRateMaxAvail, outletNode.MassFlowRateMaxAvail * mixSpace1.fraction, 0.0001); + EXPECT_NEAR(mixSpace2Node.MassFlowRateMaxAvail, outletNode.MassFlowRateMaxAvail * mixSpace2.fraction, 0.0001); + EXPECT_NEAR(mixSpace3Node.MassFlowRateMaxAvail, outletNode.MassFlowRateMaxAvail * mixSpace3.fraction, 0.0001); +}