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

EnergyPlus SQL Query Returns Incorrect Value

asked 10 years ago

updated 9 years ago

I'm looking at the results a bit closer at the results from an SQL query in EnergyPlus and I'm finding some issues. I'm able to access the HVAC Sizing Summary report properly, but the Sensible Heat Gain Summary report is a bit odd. The SQL query appears to mix up the values from the table.

For instance, the value from the SensibleHeatGainSummary report, Peak Cooling Sensible Heat Gain Components table, and Equipment Sensible Heat Removal column returns 720 W. The query using the Python bindings in OpenStudio looks like this:

sql_query = select Value from TabularDataWithStrings WHERE ReportName=\'SensibleHeatGainSummary\' and ReportForString=\'Entire Facility\' and TableName=\'Peak Cooling Sensible Heat Gain Components\' and ColumnName=\'Equipment Sensible Heat Removal\' and RowName=\'ZONE 0\';

 sql_file.execAndReturnFirstDouble(sql_query).get()

The HTML report shows that 720 W is the value for Lights Sensible Heat Addition. It is not the value for Equipment Sensible Heat Removal.

image description

Is there a mistake in my query syntax or a bug in EnergyPlus or OpenStudio? I'd greatly appreciate any help with this.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
4

answered 10 years ago

I'm assuming you are using EnergyPlus 8.2.0. If you are then the problem is almost certainly a bug found in the original 8.2.0 release. The bug was patched in Update 1, available here. OpenStudio 1.6.0 is designed to work with this patched version of EnergyPlus.

Preview: (hide)
link

Comments

Thanks! I am using EnergyPlus 8.2.0. I'll let you know if that doesn't solve the problem.

jmcneill's avatar jmcneill  ( 10 years ago )
3

answered 10 years ago

This is related to SQL but not exactly related to your question, yet I don't think it needs a separate post as there is no answer to be given.

Anyway, the SQL issues still persist on 8.2.0 Update 1.

In EnergyPlus SQL output there are usually two main views, depending on what you asked in terms of output.

One is called TabularDataWithStrings and works as expected (contains all the tables from the report.html as far as I can tell).

The other one, is called ReportVariableWithTime and it is empty. The SELECT in the CREATE VIEW statement doesn't produce an error but doesn't return anything and that's the problem.

I've checked several sql files and the same problem is always present.

This was nonetheless fixed in the freshly out EnergyPlus 8.3.0 as far as I can tell, after running the same IDF file and checking the sql file.

Preview: (hide)
link

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

1 follower

Stats

Asked: 10 years ago

Seen: 624 times

Last updated: Apr 02 '15