Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
2

EnergyPlus output variables in OpenStudio

asked 2016-09-26 10:39:25 -0500

clguen gravatar image

Is there a way to output EnergyPlus variables that are not in the OpenStudio Output Variables tab such as "HVAC,Average,Fan Runtime Fraction" within the OpenStudio framework?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2016-09-26 11:00:23 -0500

You can export single variables with the "Export Output Variable to csv" measure, and export single meters with the "Export Meter to csv" measure, available on BCL.

More detail on applying these is described in this unmet hours post

If you have several variables, use Julien Marrec's "Output Variables from csv" measure, which reads a list of output variables you would like from a csv file, also available on BCL.

On the unmet hours slack channel, Andrew Parker posted the DView measure, which will take the output variables you've requested and put them into a .csv file that can be read by DView for visual analysis.

edit flag offensive delete link more

Comments

2

There is also the more basic Add Output Variable and Add Meter measures if you just want to get the variable into the EnergyPlus SQL file.

David Goldwasser gravatar image David Goldwasser  ( 2016-09-26 12:01:42 -0500 )edit

Another option is to save all the OVs for a particular object class (e.g. boilers) to an IDF and use the Inject IDF Objects measure with the path to that IDF.

MatthewSteen gravatar image MatthewSteen  ( 2016-09-26 12:47:48 -0500 )edit
0

answered 2021-07-05 12:57:30 -0500

wei_zhang gravatar image

updated 2021-07-05 14:42:05 -0500

Hi All

I just updated the "Export Meter to csv" for the OpenStudio Application 1.1.0, because I found the original one from BCL doesn't work anymore with new OpenStudio Application. Thus I learned from other OpenStudio measure and modified the original one. Thanks mdahlhausen for the original measure. It is great measure.

The modified measure.rb works well. As I do not have enough points to upload the .rb file, just put the related parts below.

1: the reporting class name

class ExportMetertoCSV < OpenStudio::Measure::ReportingMeasure

2: the arguments function

def arguments(model=nil)
    args = OpenStudio::Measure::OSArgumentVector.new

    #make an argument for the variable name
    meter_name = OpenStudio::Measure::OSArgument.makeStringArgument("meter_name",true)
    meter_name.setDisplayName("Enter Meter Name.")
    args << meter_name

    #make an argument for the reporting frequency
    reporting_frequency_chs = OpenStudio::StringVector.new
    reporting_frequency_chs << "Hourly"
    reporting_frequency_chs << "Zone Timestep"
    reporting_frequency = OpenStudio::Measure::OSArgument.makeChoiceArgument('reporting_frequency', reporting_frequency_chs, true)
    reporting_frequency.setDisplayName("Reporting Frequency.")
    reporting_frequency.setDefaultValue("Hourly")
    args << reporting_frequency

3: in run function

 def run(runner, user_arguments)
    super(runner, user_arguments)

    # use the built-in error checking 
    if !runner.validateUserArguments(arguments, user_arguments)
      return false
    end
edit flag offensive delete link more

Comments

I've updated the measure on BCL to work with the newer OpenStudio API. https://bcl.nrel.gov/node/83269

mdahlhausen gravatar image mdahlhausen  ( 2021-07-06 15:36:38 -0500 )edit

Thanks Matthew, But when I download the measure as you gave (https://bcl.nrel.gov/node/83269), I can only found one XML file inside. Maybe something missing or I missed something?

wei_zhang gravatar image wei_zhang  ( 2021-07-06 19:10:54 -0500 )edit

I re-uploaded it.

mdahlhausen gravatar image mdahlhausen  ( 2021-07-07 10:14:29 -0500 )edit

Cool, thanks a lot

wei_zhang gravatar image wei_zhang  ( 2021-07-07 12:48:32 -0500 )edit

Your Answer

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

Add Answer

 

Question Tools

4 followers

Stats

Asked: 2016-09-26 10:39:25 -0500

Seen: 1,418 times

Last updated: Jul 05