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

How to Start Simulation at Custom Hour

asked 2018-03-08 16:34:51 -0600

DW's avatar

updated 2018-03-09 12:15:45 -0600

I am working to run my EnergyPlus (v8.7) model with a custom weather file. Sometimes this means that I want my simulation to start at 7:00 AM on 1/5 and finish at 7 AM on 1/22. Eventually, I would like to do this in OpenStudio as well.

Unfortunately, the simulation seems to fail unless it starts at hour 1 of the day and ends at hour 24 of the last day. Does anyone know a way around this?

For example, I can run starting at 1/5 1:00 - 1/22 24:00, but if I try to start the weather file at 07:00 on 1/5 or end at 07:00 on 1/22, then I get a fatal error from EnergyPlus.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2018-03-09 12:02:10 -0600

updated 2018-03-10 15:33:04 -0600

Short answer: you can't start an EnergyPlus simulation at a custom hour, it will always start at the beginning of the first day in the run period.

For EnergyPlus to run a simulation, the weather file that you use MUST have data for 24 hours of each day in the simulation run period. If you only care about what the simulation calculates from 7AM on January 5 through 7AM on January 22, then set the start date and end date in the RunPeriod object to match those calendar dates. When you run the simulation, EnergyPlus will start at midnight (beginning of the day) on January 5 and you can't change that. So, I would suggest:

  • If you don't have weather data outside of the simulation period that you care about, then apply the weather data for 7AM on January 5 to all the previous hours leading up to 7AM on January 5, and then the weather data for 7AM on January 22 to all the following hours after 7AM on January 22.
  • Run your simulation for the days that you're interested in.
  • When you analyze hourly outputs in the CSV file generated by EnergyPlus, ignore the data for hours that you don't care about.

UPDATE: Per @rraustad's comment below, instead of ignoring the hours that you don't care about in the CSV, you can tell EnergyPlus to not generate them in the CSV. You can do this by setting the Schedule Name input field of the Output:Variable object to reference a schedule that defines the time frame that you want results to be generated in the CSV.

edit flag offensive delete link more

Comments

Hey Aaron, Thank you for the answer. I have adjusted my run period in my .idf already so I am able to run it with less than the 8760 rows.

I can fudge the weather file by adding in extra hours of repeated weather information as you suggested, but I was hoping to avoid that. I'd rather not have to filter through the outputs, and instead have the reports directly list the output data for a simulation that does not start and end at midnight. I gather from your answer that EnergyPlus does not allow that.

DW's avatar DW  ( 2018-03-09 12:12:04 -0600 )edit

You're welcome for the answer! Correct, EnergyPlus will allow you to set custom days to start and end a simulation, but not custom hours. If you aren't using it already, Elements is a great tool to view and edit weather data for EnergyPlus and DOE-2. It would make "fudging" extra hours of repeated data in the weather file much easier.

Aaron Boranian's avatar Aaron Boranian  ( 2018-03-09 12:15:09 -0600 )edit
3

I'm not exactly sure what you are trying to accomplish but you can add a schedule to Output:Variable and report only when the schedule is non-zero.

See IO Reference doc:

5.1.12 Output:Variable 5.1.12.1.4 Field: Schedule Name The final field is a schedule name. This can be used to limit the number of lines that appear in your output file. For example, a schedule such as “ON PEAK” or “OFF PEAK” could provide a slice of values. Or, a seasonal schedule could be devised. The output variable will be active during any hour in which the schedule value is >0.

rraustad's avatar rraustad  ( 2018-03-09 12:21:58 -0600 )edit

Thank you! That helps a lot.

DW's avatar DW  ( 2018-03-09 12:24:00 -0600 )edit

Ah, great catch @rraustad I forgot about that "Schedule Name" input field of the Output:Variable object.

Aaron Boranian's avatar Aaron Boranian  ( 2018-03-09 12:28:41 -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: 2018-03-08 16:34:51 -0600

Seen: 1,074 times

Last updated: Mar 10 '18