Wednesday, June 18, 2008

picking apart the Google SketchUp minimal file

Now that we've seen the basic content of Google SketchUp .inp file, let's pick it apart and see exactly what the plugin is giving us.



First, the stuff we knew we would need, based on a non-SketchUp minimal file:



VERSION,2.2.0;

This is an important cue to the program... We saw in my first post that the model is executed slightly differently depending on whether this is in the file or not. If it wasn't there, we might see strange problems when running the model in a different version of EnergyPlus. The program would try to run the model expecting it to be compatible with the version of the program being used -- this is often a bad assumption since the EnergyPlus developers are always refining the structure of the information in the file to make it suited to more situations.



BUILDING, Building, 0.0, CITY, 0.04, 0.4, FULLINTERIORANDEXTERIOR, 25;



On comparing the output from the Sketchup plugin to the default output created from the .idf editor, we see this:


  • The default name of building for Sketchup is "Building", where it is "NONE" for the .idf editor.

  • The orientation is specified by Sketchup as Model North=True North, which is the same as the default value implied by the .idf editor.

  • The terrain specified by the Sketchup plugin is CITY, where the .idf editor defaults to Suburbs. This has an effect on the calculation of wind on the building exterior. Interesting that they are different.

  • Both programs use 0.04 watts for the Loads Convergence Tolerance Value, which is also the same as the default.

  • Also, both programs use 0.4 degrees C as the Temperature Convergence Tolerance Value, which is the same as the default.

  • The Sketchup plugin specifies FULLINTERIORANDEXTERIOR for the solar distribution model, but the .idf editor uses FullExterior. The Sketchup setting provides for more accurate simulation, but the documentation states that there are some condititons that must be met to be able to use FULLINTERIORANDEXTERIOR, e.g. the space must be convex (every possible line through the space can intersect only two walls).

  • Maximum number of warmup days is 25 in both files as well as the default.

SurfaceGeometry,UPPERLEFTCORNER, COUNTERCLOCKWISE, WORLD;



For the SurfaceGeometry object, we see the following:


  • The surface starting position is UPPERLEFTCORNER in both programs. There is no default.

  • The vertex entry order is COUNTERCLOCKWISE in both programs. again, no default.

  • The Coordinate system is WORLD in the Google Sketchup plugin and relative in the .idf editor. This is important to note if you will be editing geometry in the .idf editor, since the origin will have a large effect on the coordinates to be specified.

  • For the daylight reference point coordinate system, the Sketchup plugin leaves it blank (making it default to relative) while the .idf editor explicitly sets it to be relative. I'm wondering if it is wise to position the daylight reference point with relative coordinates when the surface itself is specified with world coordinates... I guess the important thing is to be aware of this, since it could affect daylight sensor performance.

RUNPERIOD,1, !- Begin Month1, !- Begin Day Of Month12, !- End Month31, !- End Day Of MonthSUNDAY; !- Day Of Week For Start Day

RunPeriod, 1, 1, 12, 31, UseWeatherFile, Yes, Yes, No, Yes, Yes, 1;

This post was not completed, and sat waiting to be completed for several months. I've posted it as is, in case it might be helpful to others in the future.

Tuesday, June 3, 2008

minimal file created with Google SketchUp

Note: I will be doing the following excercise with EnergyPlus 2.2.0 and the Google SketchUp plugin version 0.9.4 beta. Of course, the behavior of future beta or final versions of beta software may (and probably will) be different.



In my previous post, I tried to find a minimum amount of information needed in an EnergyPlus input file to produce an error-free output. I started out with the goal of doing the same thing using a file created by the Sketchup plugin. However, it seems that the plugin is way ahead of me -- it produces a valid input file with no modification required. Let's look at it.

!- =========== ALL OBJECTS IN CLASS: VERSION ===========

VERSION,2.2;

!- =========== ALL OBJECTS IN CLASS: BUILDING ===========


BUILDING,
Building, !- Building Name
0.0, !- North Axis {deg}
CITY, !- Terrain
0.04, !- Loads Convergence Tolerance Value
0.4, !- Temperature Convergence Tolerance Value {deltaC}
FULLINTERIORANDEXTERIOR, !- Solar Distribution
25; !- Maximum Number of Warmup Days


!- =========== ALL OBJECTS IN CLASS: TIMESTEP IN HOUR ===========

TIMESTEP IN HOUR,4;


!- =========== ALL OBJECTS IN CLASS: RUN CONTROL ===========


RUN CONTROL,
NO, !- Do the zone sizing calculation
NO, !- Do the system sizing calculation
NO, !- Do the plant sizing calculation
NO, !- Do the design day simulations
YES; !- Do the weather file simulation


!- =========== ALL OBJECTS IN CLASS: LOCATION ===========

Location,
CHICAGO_IL_USA TMY2-94846, !- LocationName
41.78, !- Latitude {deg}
-87.75, !- Longitude {deg}
-6.00, !- TimeZone {hr}
190.00; !- Elevation {m}


SurfaceGeometry,
UPPERLEFTCORNER, !- SurfaceStartingPosition
COUNTERCLOCKWISE, !- VertexEntry
WORLD; !- CoordinateSystem


!- =========== ALL OBJECTS IN CLASS: MATERIAL:REGULAR ===========

MATERIAL:REGULAR,
F08 Metal surface, !- Name
Smooth , !- Roughness
0.0008, !- Thickness {m}
45.28, !- Conductivity {W/m-K}
7824, !- Density {kg/m3}
500; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
I02 50mm insulation board, !- Name
MediumRough , !- Roughness
0.0508, !- Thickness {m}
0.03, !- Conductivity {W/m-K}
43, !- Density {kg/m3}
1210; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
G01a 19mm gypsum board, !- Name
MediumSmooth , !- Roughness
0.019, !- Thickness {m}
0.16, !- Conductivity {W/m-K}
800, !- Density {kg/m3}
1090; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
M11 100mm lightweight concrete, !- Name
MediumRough, !- Roughness
0.1016, !- Thickness {m}
0.53, !- Conductivity {W/m-K}
1280, !- Density {kg/m3}
840; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
F16 Acoustic tile, !- Name
MediumSmooth, !- Roughness
0.0191, !- Thickness {m}
0.06, !- Conductivity {W/m-K}
368, !- Density {kg/m3}
590; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
M01 100mm brick, !- Name
MediumRough, !- Roughness
0.1016, !- Thickness {m}
0.89, !- Conductivity {W/m-K}
1920, !- Density {kg/m3}
790; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
M15 200mm heavyweight concrete, !- Name
MediumRough, !- Roughness
0.2032, !- Thickness {m}
1.95, !- Conductivity {W/m-K}
2240, !- Density {kg/m3}
900; !- Specific Heat {J/kg-K}

MATERIAL:REGULAR,
M05 200mm concrete block,!- Name
MediumRough, !- Roughness
0.2032, !- Thickness {m}
1.11, !- Conductivity {W/m-K}
800, !- Density {kg/m3}
920; !- Specific Heat {J/kg-K}


!- =========== ALL OBJECTS IN CLASS: MATERIAL:AIR ===========

MATERIAL:AIR,
F04 Wall air space resistance, !- Name
0.15; !- Thermal Resistance {m2-K/W}

MATERIAL:AIR,
F05 Ceiling air space resistance, !- Name
0.18; !- Thermal Resistance {m2-K/W}


!- =========== ALL OBJECTS IN CLASS: MATERIAL:WINDOWGLASS ===========

MATERIAL:WINDOWGLASS,
CLEAR 3MM, !- Name
SpectralAverage, !- Optical Data Type
, !- Name of Window Glass Spectral Data Set
0.003, !- Thickness {m}
0.837, !- Solar Transmittance at Normal Incidence
0.075, !- Solar Reflectance at Normal Incidence: Front Side
0.075, !- Solar Reflectance at Normal Incidence: Back Side
0.898, !- Visible Transmittance at Normal Incidence
0.081, !- Visible Reflectance at Normal Incidence: Front Side
0.081, !- Visible Reflectance at Normal Incidence: Back Side
0, !- IR Transmittance at Normal Incidence
0.84, !- IR Hemispherical Emissivity: Front Side
0.84, !- IR Hemispherical Emissivity: Back Side
0.9; !- Conductivity {W/m-K}


!- =========== ALL OBJECTS IN CLASS: MATERIAL:WINDOWGAS ===========

MATERIAL:WINDOWGAS,
AIR 6MM, !- Name
Air , !- Gas Type
0.0063; !- Thickness {m}


!- =========== ALL OBJECTS IN CLASS: CONSTRUCTION ===========

CONSTRUCTION,
Window Single Pane, !- Name
CLEAR 3MM; !- Outside Layer

CONSTRUCTION,
Window Double Pane, !- Name
CLEAR 3MM, !- Outside Layer
AIR 6MM, !- Layer #2
CLEAR 3MM; !- Layer #3

CONSTRUCTION,
Light Exterior Wall, !- Name
F08 Metal surface, !- Outside Layer
I02 50mm insulation board, !- Layer #2
F04 Wall air space resistance, !- Layer #3
G01a 19mm gypsum board; !- Layer #4

CONSTRUCTION,
Light Roof/Ceiling, !- Name
M11 100mm lightweight concrete, !- Outside Layer
F05 Ceiling air space resistance, !- Layer #2
F16 Acoustic tile; !- Layer #3

CONSTRUCTION,
Light Partition, !- Name
G01a 19mm gypsum board, !- Outside Layer
F04 Wall air space resistance, !- Layer #2
G01a 19mm gypsum board; !- Layer #3

CONSTRUCTION,
Light Floor, !- Name
F16 Acoustic tile, !- Outside Layer
F05 Ceiling air space resistance, !- Layer #2
M11 100mm lightweight concrete; !- Layer #3

CONSTRUCTION,
Heavy Exterior Wall, !- Name
M01 100mm brick, !- Outside Layer
M15 200mm heavyweight concrete, !- Layer #2
I02 50mm insulation board, !- Layer #3
F04 Wall air space resistance, !- Layer #4
G01a 19mm gypsum board; !- Layer #5

CONSTRUCTION,
Heavy Roof/Ceiling, !- Name
M15 200mm heavyweight concrete, !- Outside Layer
F05 Ceiling air space resistance, !- Layer #2
F16 Acoustic tile; !- Layer #3

CONSTRUCTION,
Heavy Partition, !- Name
G01a 19mm gypsum board, !- Outside Layer
M05 200mm concrete block,!- Layer #2
G01a 19mm gypsum board; !- Layer #3

CONSTRUCTION,
Heavy Floor, !- Name
F16 Acoustic tile, !- Outside Layer
F05 Ceiling air space resistance, !- Layer #2
M15 200mm heavyweight concrete; !- Layer #3

REPORT,
Variable Dictionary; !- Type_of_Report


RUNPERIOD,
1, !- Begin Month
1, !- Begin Day Of Month
12, !- End Month
31, !- End Day Of Month
SUNDAY; !- Day Of Week For Start Day



There's a lot here. For today, let's just end with this summary: "The SketchUp plugin gives us a lot for free."

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).