Skip to content

Commit

Permalink
fix(simulation): Process the unmet_setpoint_tolerance in SimulationPar
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Dec 2, 2023
1 parent 0849ac0 commit 517e887
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 13 deletions.
97 changes: 84 additions & 13 deletions lib/honeybee/_defaults/simulation-parameter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"servers": [],
"info": {
"description": "Honeybee simulation-parameter schema.",
"version": "1.40.0",
"version": "1.54.0",
"title": "Honeybee Simulation Parameter Schema",
"contact": {
"name": "Ladybug Tools",
Expand Down Expand Up @@ -44,6 +44,11 @@
"x-displayName": "CalculationUpdateMethod",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CalculationUpdateMethod\" />\n"
},
{
"name": "climatezones_model",
"x-displayName": "ClimateZones",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ClimateZones\" />\n"
},
{
"name": "daylightsavingtime_model",
"x-displayName": "DaylightSavingTime",
Expand All @@ -69,6 +74,11 @@
"x-displayName": "DryBulbCondition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DryBulbCondition\" />\n"
},
{
"name": "efficiencystandards_model",
"x-displayName": "EfficiencyStandards",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EfficiencyStandards\" />\n"
},
{
"name": "humiditycondition_model",
"x-displayName": "HumidityCondition",
Expand Down Expand Up @@ -138,11 +148,13 @@
"ashraetau_model",
"calculationmethod_model",
"calculationupdatemethod_model",
"climatezones_model",
"daylightsavingtime_model",
"daysofweek_model",
"designday_model",
"designdaytypes_model",
"drybulbcondition_model",
"efficiencystandards_model",
"humiditycondition_model",
"humiditytypes_model",
"reportingfrequency_model",
Expand Down Expand Up @@ -193,18 +205,6 @@
}
]
},
"include_sqlite": {
"title": "Include Sqlite",
"description": "Boolean to note whether a SQLite report should be requested from the simulation.",
"default": true,
"type": "boolean"
},
"include_html": {
"title": "Include Html",
"description": "Boolean to note whether an HTML report should be requested from the simulation.",
"default": true,
"type": "boolean"
},
"outputs": {
"title": "Outputs",
"description": "A list of EnergyPlus output names as strings, which are requested from the simulation.",
Expand All @@ -220,6 +220,15 @@
"items": {
"type": "string"
}
},
"unmet_setpoint_tolerance": {
"title": "Unmet Setpoint Tolerance",
"description": "A number in degrees Celsius for the difference that the zone conditions must be from the thermostat setpoint in order for the setpoint to be considered unmet. This will affect how unmet hours are reported in the output. ASHRAE 90.1 uses a tolerance of 1.11C, which is equivalent to 1.8F.",
"default": 1.11,
"minimum": 0,
"maximum": 10,
"type": "number",
"format": "double"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -813,6 +822,47 @@
],
"additionalProperties": false
},
"EfficiencyStandards": {
"title": "EfficiencyStandards",
"description": "An enumeration.",
"enum": [
"ASHRAE_2019",
"ASHRAE_2016",
"ASHRAE_2013",
"ASHRAE_2010",
"ASHRAE_2007",
"ASHRAE_2004",
"DOE_Ref_1980_2004",
"DOE_Ref_Pre_1980"
],
"type": "string"
},
"ClimateZones": {
"title": "ClimateZones",
"description": "An enumeration.",
"enum": [
"0A",
"1A",
"2A",
"3A",
"4A",
"5A",
"6A",
"0B",
"1B",
"2B",
"3B",
"4B",
"5B",
"6B",
"3C",
"4C",
"5C",
"7",
"8"
],
"type": "string"
},
"SizingParameter": {
"title": "SizingParameter",
"description": "Used to specify heating and cooling sizing criteria and safety factors.",
Expand Down Expand Up @@ -848,6 +898,27 @@
"exclusiveMinimum": 0,
"type": "number",
"format": "double"
},
"efficiency_standard": {
"description": "Text to specify the efficiency standard, which will automatically set the efficiencies of all HVAC equipment when provided. Note that providing a standard here will cause the OpenStudio translation process to perform an additional sizing calculation with EnergyPlus, which is needed since the default efficiencies of equipment vary depending on their size. THIS WILL SIGNIFICANTLY INCREASE TRANSLATION TIME TO OPENSTUDIO. However, it is often worthwhile when the goal is to match the HVAC specification with a particular standard.",
"allOf": [
{
"$ref": "#/components/schemas/EfficiencyStandards"
}
]
},
"climate_zone": {
"description": "Text indicating the ASHRAE climate zone to be used with the efficiency_standard. When unspecified, the climate zone will be inferred from the design days on this sizing parameter object.",
"allOf": [
{
"$ref": "#/components/schemas/ClimateZones"
}
]
},
"building_type": {
"title": "Building Type",
"description": "Text for the building type to be used in the efficiency_standard. If the type is not recognized or is None, it will be assumed that the building is a generic NonResidential. The following have specified systems per the standard: Residential, NonResidential, MidriseApartment, HighriseApartment, LargeOffice, MediumOffice, SmallOffice, Retail, StripMall, PrimarySchool, SecondarySchool, SmallHotel, LargeHotel, Hospital, Outpatient, Warehouse, SuperMarket, FullServiceRestaurant, QuickServiceRestaurant, Laboratory, Courthouse.",
"type": "string"
}
},
"additionalProperties": false
Expand Down
11 changes: 11 additions & 0 deletions lib/to_openstudio/simulation/parameter_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ def create_openstudio_objects
end
end

# set defaults for the simulation output
os_unmet_tol = @openstudio_model.getOutputControlReportingTolerances
default_unmet_tol = out_defaults[:unmet_setpoint_tolerance][:default]
os_unmet_tol.setToleranceforTimeHeatingSetpointNotMet(default_unmet_tol)
os_unmet_tol.setToleranceforTimeCoolingSetpointNotMet(default_unmet_tol)

# set Outputs for the simulation
if @hash[:output]
if @hash[:output][:outputs]
Expand All @@ -272,6 +278,11 @@ def create_openstudio_objects
os_report.addSummaryReport(report)
end
end
if @hash[:output][:unmet_setpoint_tolerance]
unmet_tol = @hash[:output][:unmet_setpoint_tolerance]
os_unmet_tol.setToleranceforTimeHeatingSetpointNotMet(unmet_tol)
os_unmet_tol.setToleranceforTimeCoolingSetpointNotMet(unmet_tol)
end
end

# set defaults for the year description
Expand Down

0 comments on commit 517e887

Please sign in to comment.