Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

idf_max_fields in json, how it's calculated?

asked 2019-10-09 09:23:00 -0600

Sim's avatar

updated 2019-10-10 10:33:50 -0600

Hello,

Can you explain how the idf_max_fields field in json is calculated? Obviously it plays a very important role, because when it's not set properly, the simulation fails.

I do try to make a converter idf->json myself ( don't ask me why :) ), but I can't manage to match the converted file with idf_max_fields value to be the same in my convert and energyplus one.

I do use energyplus with the -c option to convert the idf file. Here is a partial from 5ZoneAirCooledWithDOASAirLoop.epJSON example file. I converted it with the -c option.

My understanding is to count all the fields set in the object in order to calculate the value. I do not count idf_order, idf_max_fields, idf_max_extensible_fields . Here is the example:

5ZoneAirCooledWithDOASAirLoop.epJSON

"Coil:Cooling:DX:TwoStageWithHumidityControlMode": {
        "DOAS Cooling Coil": {
            "air_inlet_node_name": "DOAS Supply Fan Outlet",
            "air_outlet_node_name": "DOAS Cooling Coil Outlet",
            "dehumidification_mode_1_stage_1_2_coil_performance_name": "DOAS Dehumid Perf 1+2",
            "dehumidification_mode_1_stage_1_2_coil_performance_object_type": "CoilPerformance:DX:Cooling",
            "dehumidification_mode_1_stage_1_coil_performance_name": "DOAS Dehumid Perf 1",
            "dehumidification_mode_1_stage_1_coil_performance_object_type": "CoilPerformance:DX:Cooling",
            "idf_max_extensible_fields": 0,
            "idf_max_fields": 19,
            "idf_order": 302,
            "minimum_outdoor_dry_bulb_temperature_for_compressor_operation": 0,
            "normal_mode_stage_1_2_coil_performance_name": "DOAS Standard Perf 1+2",
            "normal_mode_stage_1_2_coil_performance_object_type": "CoilPerformance:DX:Cooling",
            "normal_mode_stage_1_coil_performance_name": "DOAS Standard Perf 1",
            "normal_mode_stage_1_coil_performance_object_type": "CoilPerformance:DX:Cooling",
            "number_of_capacity_stages": 2,
            "number_of_enhanced_dehumidification_modes": 1
        }
    }

It says idf_max_fields = 19 My json:

"Coil:Cooling:DX:TwoStageWithHumidityControlMode": {
    "DOAS Cooling Coil": {
      "air_inlet_node_name": "DOAS Supply Fan Outlet",
      "air_outlet_node_name": "DOAS Cooling Coil Outlet",
      "number_of_capacity_stages": 2,
      "number_of_enhanced_dehumidification_modes": 1,
      "normal_mode_stage_1_coil_performance_object_type": "CoilPerformance:DX:Cooling",
      "normal_mode_stage_1_coil_performance_name": "DOAS Standard Perf 1",
      "normal_mode_stage_1_2_coil_performance_object_type": "CoilPerformance:DX:Cooling",
      "normal_mode_stage_1_2_coil_performance_name": "DOAS Standard Perf 1+2",
      "dehumidification_mode_1_stage_1_coil_performance_object_type": "CoilPerformance:DX:Cooling",
      "dehumidification_mode_1_stage_1_coil_performance_name": "DOAS Dehumid Perf 1",
      "dehumidification_mode_1_stage_1_2_coil_performance_object_type": "CoilPerformance:DX:Cooling",
      "dehumidification_mode_1_stage_1_2_coil_performance_name": "DOAS Dehumid Perf 1+2",
      "minimum_outdoor_dry_bulb_temperature_for_compressor_operation": 0,
      "idf_max_extensible_fields": 0,
      "idf_max_fields": 14,
      "idf_order": 302
    }
  }

Idf max fields is 14, because I do count 14 fields set including the name. I do not count idf_order, idf_max_fields, idf_max_extensible_fields . Can you explain why the energyplus one (the file generated with -c option) has idf_max_fields set to 19?

This causes simulation errors. When I make my json with idf_max_fields set to 19, the simulation completes successfully. Otherwise with 14, it gives errors.

And here is the error log:

Program Version,EnergyPlus, Version 9.0.1-bb7ca4f0da, YMD=2019.10.09 17:13,
   ************* Beginning Zone Sizing Calculations
   ** Warning ** Weather file location will be used rather than entered (IDF) Location object.
   **   ~~~   ** ..Location object=CHICAGO_IL_USA TMY2-94846
   **   ~~~   ** ..Weather File Location=Tampa International Ap FL USA TMY3 WMO#=722110
   **   ~~~   ** ..due to location differences, Latitude difference=[13.81] degrees, Longitude difference=[5.22] degrees.
   **   ~~~   ** ..Time Zone difference=[1.0] hour(s), Elevation difference=[96.84] percent, [184.00] meters.
   ************* Beginning System Sizing Calculations
   ************* Beginning Plant Sizing Calculations
   ** Severe  ** GetDXCoils: Coil:Cooling:DX:TwoStageWithHumidityControlMode="DOAS COOLING COIL", invalid
   **   ~~~   ** ...not enough remaining fields for specified Number of Operating Modes.
   **   ~~~   ** ...Need additional Coil Performance Object Type and Coil Performance Object Name fields.
   **  Fatal  ** GetDXCoils: Errors found in getting Coil:Cooling:DX:TwoStageWithHumidityControlMode input.  Preceding condition(s) causes termination.
   ...Summary of Errors that led to program termination:
   ..... Reference severe error count=1
   ..... Last severe error=GetDXCoils: Coil:Cooling:DX:TwoStageWithHumidityControlMode="DOAS COOLING COIL", invalid
   ************* Warning:  Node connection errors not checked - most system ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-10-14 16:23:30 -0600

The idf_max_fields, idf_max_extensible_fields, and idf_order fields are used internally in EnergyPlus when an IDF is automatically converted to epJSON. These fields are needed to make sure the input IDF is faithfully represented in epJSON format, however, when using epJSON directly you should not use these fields in the input file. In EnergyPlus 9.2, these fields are no longer output when using the -c command line flag.

idf_max_fields is not just the max number of fields in the epJSON but rather the max fields set in the IDF file. In your example, this likely means that there were 5 blank fields after the last field with a value, but this is still recorded as 19 max fields.

That said, it is odd that EnergyPlus gives a severe/fatal error when you manually set the max fields to 14. I will need to investigate that, but basically you should not be setting or using those three fields listed at the top of this answer when you use epJSON. It is an artifact of the automatic conversion within EnergyPlus and should not have been output originally.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

Stats

Asked: 2019-10-09 09:23:00 -0600

Seen: 562 times

Last updated: Oct 14 '19