NREL / SystemsAnalysisReports

BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Errors in systems_analysis_report_generator with OpenStudio 3.30 #80

Closed DavidGoldwasser closed 2 years ago

DavidGoldwasser commented 2 years ago

Where number is expected for items in this line nil or string are passed in https://github.com/NREL/gbxml-to-openstudio/blob/master/measures/systems_analysis_report_generator/resources/systems_analysis_report/mappers/design_psychrometric_summary_mapper.rb#L23 if coil_sizing_detail.supply_fan_maximum_air_mass_flow_rate > 0 and coil_sizing_detail.moist_air_heat_capacity > 0

coil_sizing_detail is not nil and has values for most keys, however supply_fan_maximum_air_mass_flow_rate is nil and moist_air_heat_capacity is RP-2 1

Below is relevant part of error message [09:17:32.569024 ERROR] Found error in state 'reporting_measures' with message [":/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb failed with message Runner error :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb failed with undefined method `>' for nil:NilClass, /Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/mappers/design_psychrometric_summary_mapper.rb:23:in `call'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/mappers/design_psychrometric_mapper.rb:17:in `call'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/repositories/design_psychrometric_repo.rb:18:in `find'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/services/design_psychrometric_service.rb:15:in `block in call'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/services/design_psychrometric_service.rb:14:in `each'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/services/design_psychrometric_service.rb:14:in `call'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/report_generators/json_generator.rb:18:in `generate'\n/Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/measure.rb:58:in

DavidGoldwasser commented 2 years ago

For reference, here is content of coil_sizing_detail variable with House.xml as test model.

#<struct EPlusOut::Models::CoilSizingDetail name="RP-2 COOLING COIL", autosized_coil_airflow="RP-1", autosized_coil_capacity=6386.314620833596, autosized_coil_water_flow="Yes", coil_air_mass_flow_rate_at_ideal_loads_peak="Yes", coil_air_mass_flow_rate_at_rating_conditions="Yes", coil_air_volume_flow_rate_at_ideal_loads_peak=2.440459145560313, coil_capacity_percentage_of_plant_design_capacity=2.440459145560313, coil_entering_air_drybulb_at_ideal_loads_peak=2.4732633324514164, coil_entering_air_drybulb_at_rating_conditions=51.8236, coil_entering_air_enthalpy_at_ideal_loads_peak=23.75555555555559, coil_entering_air_enthalpy_at_rating_conditions=23.75555555555559, coil_entering_air_humidity_ratio_at_ideal_loads_peak=45217.439999999995, coil_entering_air_humidity_ratio_at_rating_conditions=45217.439999999995, coil_entering_air_wetbulb_at_ideal_loads_peak=0.00831616, coil_entering_air_wetbulb_at_rating_conditions=0.00831616, coil_entering_plant_fluid_temperature_at_ideal_loads_peak=14.116666666666674, coil_final_gross_sensible_capacity=16.144444444444503, coil_final_gross_total_capacity=15.000000000000057, coil_final_reference_air_volume_flow_rate=-292.77799910205005, coil_final_reference_plant_fluid_volume_flow_rate=4613.154930960564, coil_fluid_flow_rate_percentage_of_plant_design_flow_rate=2.4732633324514164, coil_leaving_air_drybulb_at_ideal_loads_peak=0.0005155283443631848, coil_leaving_air_drybulb_at_rating_conditions=51.822679, coil_leaving_air_enthalpy_at_ideal_loads_peak=17.000000000000057, coil_leaving_air_enthalpy_at_rating_conditions=16.99444444444447, coil_leaving_air_humidity_ratio_at_ideal_loads_peak=38099.87999999999, coil_leaving_air_humidity_ratio_at_rating_conditions=38099.87999999999, coil_leaving_air_wetbulb_at_ideal_loads_peak=0.00831616, coil_leaving_air_wetbulb_at_rating_conditions=0.00831616, coil_leaving_plant_fluid_temperature_at_ideal_loads_peak=11.727777777777817, coil_location=13.611111111111143, coil_off_rating_capacity_modifier_at_ideal_loads_peak=18.33333333333337, coil_plant_fluid_mass_flow_rate_at_ideal_loads_peak="Zone Equipment", coil_plant_fluid_temperature_difference_at_ideal_loads_peak=1.0, coil_sensible_capacity_at_ideal_loads_peak=0.3296777247937789, coil_sensible_capacity_at_rating_conditions=3.3333333333333335, coil_total_capacity_at_ideal_loads_peak=4613.155517102705, coil_total_capacity_at_rating_conditions=16838.07595856784, coil_type=4613.155517102705, coil_u_value_times_area_value=16838.07595856784, coil_and_fan_net_total_capacity_at_ideal_loads_peak="COIL:COOLING:WATER", dx_coil_capacity_decrease_ratio_from_too_high_flow_capacity_ratio=-527.00039838369, dx_coil_capacity_increase_ratio_from_too_low_flow_capacity_ratio=4613.155517102705, date_time_at_air_flow_ideal_loads_peak=1.0, date_time_at_sensible_ideal_loads_peak=1.0, date_time_at_total_ideal_loads_peak="7/21 24:00:00", design_day_name_at_air_flow_ideal_loads_peak="7/21 24:00:00", design_day_name_at_sensible_ideal_loads_peak="unknown", design_day_name_at_total_ideal_loads_peak="unknown", dry_air_heat_capacity="DENVER INTL AP ANN CLG .4% CONDNS DB=>MWB", hvac_name="unknown", hvac_type=1004.8319999999999, moist_air_heat_capacity="RP-2 1", oa_pretreated_prior_to_coil_inlet="ZONEHVAC:FOURPIPEFANCOIL", outdoor_air_drybulb_at_ideal_loads_peak=1020.3231599999998, outdoor_air_flow_percentage_at_ideal_loads_peak="No", outdoor_air_humidity_ratio_at_ideal_loads_peak=22.133333333333383, outdoor_air_volume_flow_rate_at_ideal_loads_peak=2.0817, outdoor_air_wetbulb_at_ideal_loads_peak=0.00593221, plant_design_capacity=0.051486162421017605, plant_design_fluid_return_temperature=11.472222222222285, plant_design_fluid_supply_temperature="Sensible", plant_design_fluid_temperature_difference=8901.641041247218, plant_fluid_density=18.33333333333337, plant_fluid_specific_heat_capacity=15.000000000000057, plant_maximum_fluid_mass_flow_rate=3.3333333333333335, plant_name_for_coil=999.8981133439901, standard_air_density_adjusted_for_elevation=4198.104359999999, supply_fan_air_heat_gain_at_ideal_loads_peak=0.6361649636089979, supply_fan_maximum_air_mass_flow_rate=nil, supply_fan_maximum_air_volume_flow_rate=0.9867373438359445, supply_fan_name_for_coil=0.0, supply_fan_type_for_coil=2.440459145560313, system_return_air_drybulb_at_ideal_loads_peak=2.4732633324514164, system_return_air_humidity_ratio_at_ideal_loads_peak="RP-2 + FAN", system_sizing_method_air_flow="Fan:OnOff", system_sizing_method_capacity=23.888888888888914, system_sizing_method_concurrence=0.00851198, terminal_unit_reheat_coil_multiplier="N/A", zone_air_drybulb_at_ideal_loads_peak="N/A", zone_air_humidity_ratio_at_ideal_loads_peak="N/A", zone_air_relative_humidity_at_ideal_loads_peak=-999.0, zone_latent_heat_gain_at_ideal_loads_peak=23.888888888888914, zone_names=0.00851198, zone_sensible_heat_gain_at_ideal_loads_peak=37.7942>

DavidGoldwasser commented 2 years ago

RP-2 1 is the name of four pipe fan coil. That name is being returned instead fo moist_air_heat_capacity


  {fae87f75-8f46-4d91-ab9c-505ec57134f9}, !- Handle
  RP-2 1,                                 !- Name
  {9fcc2fb7-7032-455e-9fb7-656ea8ae798a}, !- Availability Schedule Name
  CyclingFan,                             !- Capacity Control Method
  autosize,                               !- Maximum Supply Air Flow Rate {m3/s}
  ,                                       !- Low Speed Supply Air Flow Ratio
  ,                                       !- Medium Speed Supply Air Flow Ratio
  autosize,                               !- Maximum Outdoor Air Flow Rate {m3/s}
  ,                                       !- Outdoor Air Schedule Name
  {c57ffc3c-14af-47cf-a863-9e7e376d07c4}, !- Air Inlet Node Name
  {a55e3333-c1d1-4415-b8ab-07f7bde60eab}, !- Air Outlet Node Name
  OutdoorAir:Mixer,                       !- Outdoor Air Mixer Object Type
  ,                                       !- Outdoor Air Mixer Name
  {284ac186-d15d-44cc-90d0-7d957debeb7e}, !- Supply Air Fan Name
  {432beac7-f4c1-4253-be47-58b80f05c234}, !- Cooling Coil Name
  autosize,                               !- Maximum Cold Water Flow Rate {m3/s}
  ,                                       !- Minimum Cold Water Flow Rate {m3/s}
  ,                                       !- Cooling Convergence Tolerance
  {89a41962-ab38-43f3-859c-85d0aca59282}, !- Heating Coil Name
  autosize,                               !- Maximum Hot Water Flow Rate {m3/s}
  ,                                       !- Minimum Hot Water Flow Rate {m3/s}
  ,                                       !- Heating Convergence Tolerance
  ,                                       !- Supply Air Fan Operating Mode Schedule Name
  autosize,                               !- Minimum Supply Air Temperature in Cooling Mode {C}
  autosize;                               !- Maximum Supply Air Temperature in Heating Mode {C}``` 
DavidGoldwasser commented 2 years ago

The two zones in the model each have a four pipe fan coil with an autosized on/off fan. There is no air loop in the model. In the eplustbl.htm annual fan energy use is 0, so fans appear that they are not being utilized or are not available.

Also in the eplustbl.htm Design Size Maximum Flow Rate is 5240.55 cfm for RP-2 1 four pipe fan coil.

DavidGoldwasser commented 2 years ago

The four coils in the model are water coils (2 heating, 2 cooling). IN eplustbl.htm all four of > 0 values for Moist Air Heat Capacity

DavidGoldwasser commented 2 years ago

Ok, so when skipping the problematic code the measure runs (but html doesn't render on Mac Chrome). But I noticed looking at put statements for both coils, that this issue only happens for one of the two coils. While data above for RP-2 COOLING COIL are bad, data for RP-1 COOLING COIL is fine (see below). supply_fan_maximum_air_mass_flow_rate=0.0 moist_air_heat_capacity=1020.3231599999998

The zones and the equipment serving them look very similar. I wonder if the failure is more related t whichever one goes thouogh the code first fails, which just happens to be RP-2 COOLING COIL in this case. I may try out another model.

DavidGoldwasser commented 2 years ago

@axelstudios this seems to be specific to House.xml as Villa.xml runs fine. Office.xml doesn't pass in the nil value, but does still pass in string instead of double both parts of conditional in the if statement. Here is error from Office.

[11:29:55.260120 ERROR] Found error in state 'reporting_measures' with message [":/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb failed with message Runner error :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb failed with comparison of String with 0 failed, /Users/dgoldwas/Documents/github/nrel/gbxml-to-openstudio/measures/systems_analysis_report_generator/resources/systems_analysis_report/mappers/design_psychrometric_summary_mapper.rb:23:in

DavidGoldwasser commented 2 years ago

4 of 19 instances this is called inOffice.xml return a string for supply_fan_maximum_air_mass_flow_rate (2 times unknown other times a name). 8 of the times it is a double, it has a negative value which seems to be invalid. Unlike House.xml nil is never returned for that variable.

For moist_air_heat_capacity in Office.xml we have a string 4 times (sometimes a name, other times 'yes,unknown`, a date/time string). It has negative value 1 time.