First time here? Check out the Help page!

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

EnergyPlus output variables in OpenStudio

asked 8 years ago

clguen's avatar

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?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
9

answered 8 years ago

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.

Preview: (hide)
link

Comments

3

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's avatar David Goldwasser  ( 8 years ago )

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's avatar MatthewSteen  ( 8 years ago )

has the "Export Output Variable to CSV" been retired? I am unable to find it on the BCL library and the link above does not return any useful page.

Vishak's avatar Vishak  ( 3 years ago )

@Vishak, it is still on BCL here. You can also find it on GitHub.com here..

David Goldwasser's avatar David Goldwasser  ( 3 years ago )

Hi! Just to be clear, does the measure linked in the previous post now export variables like (Zone temperature, humidity, Site Air Temperature-.rdd file list) and meters like (electricity:facility, heating:electricity-.mdd file list)? I recall that export variable to csv and export meter to csv used to be two different measures with a separate reporting capability for each.

Vishak's avatar Vishak  ( 3 years ago )
2

answered 3 years ago

wei_zhang's avatar

updated 3 years ago

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
Preview: (hide)
link

Comments

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

mdahlhausen's avatar mdahlhausen  ( 3 years ago )

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's avatar wei_zhang  ( 3 years ago )

I re-uploaded it.

mdahlhausen's avatar mdahlhausen  ( 3 years ago )

Cool, thanks a lot

wei_zhang's avatar wei_zhang  ( 3 years ago )

Hi Matthew. It seems that the measure Inject IDF Objects (https://bcl.nrel.gov/node/83269) is messing from the site https://bcl.nrel.gov/node/83281

kgobakis's avatar kgobakis  ( 3 years ago )

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

4 followers

Stats

Asked: 8 years ago

Seen: 2,627 times

Last updated: Jul 05 '21