Open chriswmackey opened 4 years ago
Thank you @chriswmackey!
@theo-armour, I know you are having so much fun with the idf viewer. Whenever you are done with that this result visualization step can be a very interesting one! 😀
@mostaphaRoudsari
I very much appreciate that the Spider SQL Viewer could be a very nice thing. I look forward to updating the viewer in many ways. There are circumstance that would greatly help.
I have googled looking for other examples, but currently the one and only test case I know about about and have access to is this one:
https://github.com/ladybug-tools/honeybee-energy/tree/master/tests/result
Furthemore, I have no idea what the raw model should actually look like let alone what any of the test result simulations should look like. In contrast I have access to over 700 IDF models and dozens of gbXML models.
But I do understand that the Pollination tools will be able to generate hundreds of simulations. Can't wait!! Fingers crossed each one includes a representation of the model in a PNG.
Hi @theo-armour, that's a catch 22 situation! Without a viewer Pollination will not be able to generate the models with the results but you need that first to develop the viewer! 😀
An alternative solution is to use Honeybee plugin for Grasshopper to automate the runs and results visualization and generate the images to help you with the process. That is possible but it will take some time before myself or Chris get the chance to generate those.
To give some guidance on the most useful things in the energyplus sql file, I should preface by saying most tables in the file do not contain particularly useful information. In fact, all of the data that I currently import with the Grasshopper plugin comes from just ~4 tables:
I would recommend starting with the first one (ReportData), which contains all of the timeseries simulation results for each Room in the model. This sql result file here has 7 Rooms/Zones so you will find 7 lists of hourly data for each simulation output that was requested. In that particular sqlite file you are using for testing, I think I requested the following outputs:
You can see the sql queries that I used to extract these lists of timeseries data in this Python code here. The
output_name
is one of the 4 strings above.Steps to Get Timeseries Data
To simplify the steps you should follow to get a matrix with 7 rows (one for each zone) and 168 columns (one for each hour of the simulation), you should:
'SELECT * FROM ReportDataDictionary WHERE Name="Zone Ideal Loads Supply Air Total Heating Energy"'
(note that any of the 4 outputs I listed there can be used instead of ideal loads cooling)rel_indices = [row[0] for row in returned_rows]
'SELECT Value FROM ReportData WHERE ReportDataDictionaryIndex IN rel_indices'
(note thatrel_indices
should be the list of values that you obtained in the previous step)rel_inidices
that you have. So you will need to run some code like this:Note that the
data
variable is the stream of data returned from step 3. Also note that the last line there is just transposing the matrix.