How is peakEnergyDemandByMonth calculated?
In the sql object there is the peakEnergyDemandByMonth
method.
How is it calculated? Does it correspond the cooling load for each month?
I am asking because I would like to estimate the total electricity demand for my building and I am using ideal loads. This means that I need to estimate the electricity associated witht districtCooling.
I think I was able to reproduce it in this way.
First add a meter
output_meter_district_cooling = OpenStudio::Model::OutputMeter.new(model)
output_meter_district_cooling.setName("DistrictCooling")
output_meter_district_cooling.setInstallLocationType(OpenStudio::InstallLocationType.new("Facility"))
output_meter_district_cooling.setReportingFrequency("Hourly")
Then get the timeSeries
, calculate the maximum and divide by 3600 (for hourly frequency). This assumes that the rate is approximately constant during an hour.
data = sql.timeSeries(env_pd, "Hourly", "DistrictCooling:Facility")[0]
peak = data.values.to_a.max/3600.0
It is not exactly the same as peakEnergyDemandByMonth
, but it is close enough.
Is this the right approach?