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

Create a dummy Output:Variable in EnergyPlus

asked 2015-04-20 20:22:47 -0600

antonszilasi's avatar

updated 2015-04-21 07:07:28 -0600

Hi everyone,

I have a bunch of financial data that I need to use after running my EnergyPlus simulation. It would be really convenient to have that financial data written to the CSV along with the other Output:Variables - essentially make a dummy Output:Variable.

I think this should be possible with macros but Im not sure how to approach it does anyone have any ideas? Any help would be much appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2015-04-21 02:02:55 -0600

What does that financial data look like? Is it something complicated like 8760 hourly values, or something fairly simple like X between 0-9 hours, Y after that, or something like this?

You could technically write a simple EMS program to output that custom variable. There's actually an example in the E+ installation folder called EMSCustomOutputVariable.idf, which is example 1 in the EMS Application Guide. I would also have you look at the Example 5 in the EMS to compute a custom schedule, that's probably what resembles more how you would build the financial data for output.

But it could be more complicated than anything else, especially if your financial data is always different.

I suppose you are going to do some post-processing on that csv anyway, aren't you? In this case, I would just add the financial data to the csv there.

Another thing you could theoretically do is to use the Building Controls Virtual Test Bed (BCVTB), but this is likely more complicated anyways.

Outside the scope

In order to do post-processing, there are numerous suitable programming languages and interfaces to do so. Excel (and VBA) obviously, but I'm getting really fond of Python with Pandas(check out the 10-min tour of Pandas): once you get past the learning curve, it's really powerful. It makes some operation such as resampling to hourly, daily or monthly values a matter of a simple line of code.

edit flag offensive delete link more

Comments

Hi Julien

Thanks for your reply, to make it clear I'll add a bit more background I am making a interface for EnergyPlus using Grasshopper its an addition to Mostapha Sadeghipours' Honeybee.

The financial data is the cost of different items e.g Photovoltaics, insulation, glazing etc in each case it will just be one line of data - and the most convenient way to access that data for post-processing is to have it written to the EnergyPlus CSV along with all the other EnergyPlus outputs since I am reading that CSV into Grasshopper.

antonszilasi's avatar antonszilasi  ( 2015-04-22 22:59:29 -0600 )edit

I know this is possible by writing the financial data to the IDF and using a marco (I think its using the ##set1 command) to make dummy output variable - as I have seen it done in the past but unfortunately I cant work out how to do it now.

antonszilasi's avatar antonszilasi  ( 2015-04-22 22:59:39 -0600 )edit
3

answered 2017-01-06 09:57:49 -0600

@antonszilasi, I believe the "ComponentCost:LineItem" object in E+ would do the trick for you and if you add the economics output report you would be able to access your cost data in outputs. Technically you should be OK using this for your single line cost data to be accessed in the outputs but say you want to perform some sort of math to post-process an output variable, then you can use EPMacro capabilities to do your calculations within the .imf file and it can be stored in this cost object as a dummy placeholder that then you can access after E+ is run.

See example below where I am trying to pass on my total area parametrically in conjunction with jEplus+EA engine. Then I am using the variables passed on from jEplus to calculate the areas of individual zones from dimensions. I store the areas for each zone in one of the lineItem objects and read them later from .csv file to pass back to jEPlus for further calculations.

Check jEplus+EA documentation and examples too btw, they have great examples on the use of EPMacro.

image description

Output:Table:SummaryReports, ComponentCostEconomicsSummary; !- Report 1 Name

image description

edit flag offensive delete link more

Comments

Btw, be very careful with the EPMacro function syntax, it is very unforgiving of the spaces and brackets between operators!

Amir Rezaei's avatar Amir Rezaei  ( 2017-01-06 10:04:55 -0600 )edit

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: 2015-04-20 20:22:47 -0600

Seen: 530 times

Last updated: Jan 06 '17