Friday, May 30, 2008

a minimal EnergyPlus .IDF file

It's oftentimes instructive to ask the question "what's the minimum amount of input that a computer program needs to not complain?" The answer to this question can help answer another question, more interesting: "What is the minimum amount of input required to make a useful result?"

Let's see if we can figure out the answer to the first question as it pertains to EnergyPlus.

I created a blank text file, called Simple1.idf. When I run the simulation, I see these messages:

** Warning ** Version missing in IDF, processing for version="2.2.0"
**
Severe ** No Design Days or Run Period(s) specified, program will
terminate.
** Severe ** Errors found in getting a new environment
**
Warning ** ManageSimulation: Design Days/Periods were requested in RUN CONTROL
but no DesignDays/Periods in input.
** Fatal ** Error condition occurred.
Previous Severe Errors cause termination.

Fair 'nuff. I haven't told it what version of EnergyPlus I'm using or what days I'm using. Here's another try with Simple2.idf, which has only this line:

VERSION,2.2.0;

The output from this run is:

** Severe ** IP: No items found for Required Object=BUILDING
** Severe ** IP: No items found for Required Object=SURFACEGEOMETRY
** Severe ** IP: Other miscellaneous errors found in input
** Severe ** IP: Out of "range" values and/or blank required fields found in input
** Fatal ** IP: Errors occurred on processing IDF file. Preceding condition(s) cause termination.

So, I need to define a BUILDING object and a SURFACEGEOMETRY object too. It is interesting that the Design Days/Periods message isn't there anymore, but I have no doubt that it will reappear when some of the other errors are addressed.

Simple3.idf has the following contents:

VERSION,2.2.0;
BUILDING, NONE, , Suburbs, 0.04, 0.4, FullExterior, 25;
SurfaceGeometry, UpperLeftCorner, CounterClockWise, relative, relative;

(As you might have guessed, I'm cheating a little -- using the IDF editor to generate these settings.)

And the output:

** Severe ** No Design Days or Run Period(s) specified, program will terminate.
** Severe ** Errors found in getting a new environment
** Warning ** ManageSimulation: Design Days/Periods were requested in RUN CONTROL but no DesignDays/Periods in input.
** Fatal ** Error condition occurred. Previous Severe Errors cause termination.

Ah, there's our old friend, the Design Days/Periods error. Let's try again with Simple4.idf:

VERSION,2.2.0;
BUILDING, NONE, , Suburbs, 0.04, 0.4, FullExterior, 25;
SurfaceGeometry, UpperLeftCorner, CounterClockWise, relative, relative;
RunPeriod, 1, 1, 12, 31, UseWeatherFile, Yes, Yes, No, Yes, Yes, 1;

And at this point, we have a simulation that actually runs without errors or warnings!

So... we've learned the following:

  • The simulation engine really likes a version number, and behaves slightly differently depending on whether it has the version number or not.
  • There needs to be a BUILDING object to describe some key aspects of the simulation.
  • There needs to be a SURFACEGEOMETRY object to describe how surfaces will be described (even if there aren't actually any surfaces yet)
  • There needs to be a RUNPERIOD object to describe the dates and parameters of running the model. (The error message implies that a DesignDay object might be able to be used instead.)

The simulation runs, but it is pretty academic at this point -- without details of building structure and operation, there can be no meaningful output (also, the reports need to be configured).

No comments: