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

EnergyPlus End Uses By Subcategory Table from eplusout.sql

asked 2017-11-21 18:39:43 -0500

gmehta75's avatar

updated 2017-11-24 08:51:42 -0500

I am using DB Browser for SQLite to read the eplusout.sql. I am having trouble with End Uses By Subcategory table. It does not appear as I would like it to appear.

Here is what I have tried:

Select ColumnName as "Utility", Rowname as "End Use", Value as "Subcategory",   Units
from TabularDataWithStrings WHERE ReportName = "AnnualBuildingUtilityPerformanceSummary"
and TableName = "End Uses By Subcategory"

Can anyone suggest any edits to the above query or if the information exists elsewhere and two tables need to be joined.

edit retag flag offensive close merge delete

Comments

Can you provide examples of how it appears and how you would like it to appear?

shorowit's avatar shorowit  ( 2017-11-22 10:31:08 -0500 )edit

I would like it to appear as Electricity, Natural Gas, District Heating....etc under column titled Utility, end uses under column titled End Use, Subcategories such as Fans, zone exhaust fans, etc under column titled Subcategory, energy consumption under column titled Value and GJ, m3, etc. under column titled Units.

When I run the above query, the Utility column includes the text Subcategory repeated and after a number of rows Electricity, Natural Gas, etc. appear. All the information is there but its not organized the way I would like it to be.

gmehta75's avatar gmehta75  ( 2017-11-22 15:58:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-11-23 08:48:56 -0500

updated 2017-11-23 08:49:13 -0500

The problem is the structure of the underlying SQL, it doesn't really has a subcategory column so it ends up being positional...

Try this query:

SELECT ColumnName as "Utility", Rowname as "End Use", Value,   Units
FROM TabularDataWithStrings 
WHERE ReportName = "AnnualBuildingUtilityPerformanceSummary"
AND ReportForString='Entire Facility'
AND TableName = "End Uses By Subcategory"
// Optional: AND ColumnName != "Subcategory"

If you just pivot the Utility column it should look like the HTML report I think. There is no pivot in SQLite, so I'd just do it somewhere else (python is my goto for that), but you could write a verbose JOIN query to do that in SQLite

edit flag offensive delete link more

Comments

Note that EnergyPlus v9.3 and newer makes it easier to query the End Uses by Subcategory table. See https://github.com/NREL/EnergyPlus/pu... implemented by @Julien Marrec.

shorowit's avatar shorowit  ( 2020-09-02 17:32:51 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2017-11-21 18:39:43 -0500

Seen: 325 times

Last updated: Nov 23 '17