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

Post Processing to find number of hours when temperature was more than 25[C]

asked 2014-12-03 11:02:55 -0500

Waseem gravatar image

updated 2017-06-07 18:13:53 -0500

Hello All, Just wondering is there any way that EnergyPlus can output the number of hours the room air temperature was more than 25 [C] or number of people dissatisfied was more than 10%. It needs to be automatic, may be some C/C++ code?

The program needs to do some post processing to find the number of hours.

Also, Can this be done by using Energy Management System (EMS)?

Your help will be really appreciated.

Thanks

Kindest Regards

Waseem

edit retag flag offensive close merge delete

Comments

@engrwaseem85 - please tag your question appropriately - energy+ is not a tag and should be changed to energyplus, also I suggest removing the #ems# and adding a separate ems tag. Thanks!

MatthewSteen gravatar image MatthewSteen  ( 2014-12-03 11:20:05 -0500 )edit

@MatthewSteen: Thanks for pointing it out mate. :)

Waseem gravatar image Waseem  ( 2014-12-03 11:23:26 -0500 )edit

Is the question asking for an automated way to sum up timesteps where zone temp > 25 OR PPD > 0.1?

Jamie Bull gravatar image Jamie Bull  ( 2014-12-03 13:11:01 -0500 )edit

@Jamie Bull: I want to know the number of hours when the PPD is greater than 10% during occupied hours. Any ideas?

Waseem gravatar image Waseem  ( 2014-12-03 14:02:40 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
5

answered 2014-12-04 09:29:39 -0500

Ivan Korolija gravatar image

updated 2014-12-05 04:30:29 -0500

Hi Waseem,

I replied to your question on E+ yahoo group. Just in case you haven't seen it, I am adding my answer here as well.

I was recently involved in a study between De Montfort University, Salford University and ENSIMS which faced the same issue; how to calculate number of overheating hours (in addition to other overheating criteria outputs such as CEN15251) during occupied period from. I needed a code which can be applied to a large number of simulations and I decided to try to do it in EMS. You can see the piece of code which worked for me.

Regards,

Ivan Korolija

IESD, De Montfort University, Leicester, UK

! EMS code to calculate overheating hours
! EP Macro command to set threshold temperature (you can place it at the top of the imf file)
##set1 OHTempBed 25

! Get the operative temperature from the E+ output variables (This can be dry-bulb temperature too))    
  EnergyManagementSystem:Sensor,
    BedOpTemp,      !- Name
    Bedroom,                !- Output:Variable or Output:Meter Index Key Name
    Zone Operative Temperature;  !- Output:Variable or Output:Meter Name

! Get the occupancy schedule value to use as a reference when the room is occupied
  EnergyManagementSystem:Sensor,
    BedOcc, !- Name
    Occupancy_Bedroom Sch,           !- Output:Variable or Output:Meter Index Key Name
    Schedule Value;  !- Output:Variable or Output:Meter Name

! EMS programm
  EnergyManagementSystem:ProgramCallingManager,
    Overheating,  !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    OverheatingProg;     !- Program Name 1

! If zone is occupied and temperature is above threshold, count for overheating hours
  EnergyManagementSystem:Program,
    OverheatingProg,     !- Name
    IF BedOcc > 0 && BedOpTemp > OHTempBed[],
    SET BedOH = ZoneTimeStep, ! ZoneTimeStep is built in variable which is fraction of hour specified elswhere in the model (default value is 4 which is equal to 0.25 overheating hours)
    ELSE,
    SET BedOH = 0,
    ENDIF;

  EnergyManagementSystem:GlobalVariable,
    BedOH;

  EnergyManagementSystem:OutputVariable,
    Bedroom Zones Overheating While Occupied,  !- Name
    BedOH,         !- EMS Variable Name
    Summed,                  !- Type of Data in Variable
    ZoneTimestep;            !- Update Frequency

  Output:Variable,*,Bedroom Zones Overheating While Occupied,Annual;
  • Since I wasn't able to post the following code in the comment due to length limit, I edited this answer.

It should be possible to calculate PPD over 10% by using EMS. The code (which has to be validated :) )for PPD should be:

##set1 PPDBedThershold 10

  EnergyManagementSystem:Sensor,
    ActualBedPPD,      !- Name
    Bedroom,                !- Output:Variable or Output:Meter Index Key Name
    Zone Thermal Comfort Fanger Model PPD;  !- Output:Variable or Output:Meter Name

! If you already defined occupancy sensor for the overheating hours, you should delete this one
  EnergyManagementSystem:Sensor,
    BedOcc, !- Name
    Occupancy_Bedroom Sch,           !- Output:Variable or Output:Meter Index Key Name
    Schedule Value;  !- Output:Variable or Output:Meter Name

  EnergyManagementSystem:ProgramCallingManager,
    PPD,  !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    PPDProg;     !- Program Name 1

  EnergyManagementSystem:Program,
    PPDProg,     !- Name
    IF BedOcc > 0 && ActualBedPPD > PPDBedThershold[],
    SET BedPPD = ZoneTimeStep, 
    ELSE,
    SET BedPPD = 0,
    ENDIF;

  EnergyManagementSystem:GlobalVariable,
    BedPPD;

  EnergyManagementSystem:OutputVariable,
    Bedroom Zones PPD Over 10 While Occupied,  !- Name
    BedPPD,         !- EMS Variable Name
    Summed,                  !- Type of Data in Variable
    ZoneTimestep;            !- Update Frequency

  Output:Variable,*,Bedroom Zones PPD Over 10 While Occupied,Annual;
edit flag offensive delete link more

Comments

Hi @IvanK: I have not checked on EnergyPlus group yet. Thanks, I will try this. Just wondering: Can we do the same for PPD during occupied hours? e.g. Number of occupied hours when PPD was greater than 10%?

Thanks Kindest Regards Waseem

Waseem gravatar image Waseem  ( 2014-12-05 03:23:27 -0500 )edit

Hi @IvanK: Great. I will try this and will update you after testing it. :)

Thanks

Kindest Regards Waseem

Waseem gravatar image Waseem  ( 2014-12-05 04:33:03 -0500 )edit

@IvanK: The PPD code also works only when I remove ##set1 PPDBedThershold 10 and write a value in IF BedOcc > 0 && ActualBedPPD > PPDBedThershold[] instead of PPDThreshold [].

The error is to add , or ; after ##set1 PPDBedThershold 10. I have tried that but it did not work as well. Any ideas? Also, is it possible to get the variable excel file as .csv file automatically?

Thanks a lot. :)

Waseem gravatar image Waseem  ( 2014-12-05 06:35:57 -0500 )edit

Potential reason why the code doesn't work with ##set1... is that you have to change file extension from idf to imf. ##set1... expression is part of the EP-Macto functions.

"Also, is it possible to get the variable excel file as .csv file automatically?" Can you please clarify this further? I'm not sure what you would like to have in the csv file.

Ivan Korolija gravatar image Ivan Korolija  ( 2014-12-05 07:27:28 -0500 )edit

Hi Ivan, thanks for your reply. @##set1: Oh, I got it now. @.CSV file: In EnergyPlus we get variable outputs (e.g. zone air temperature, PPD more than 10% in above case etc.) in excel file. Can we get these output in CSV (comma separated values) format directly?

thanks Kindest Regards Waseem

Waseem gravatar image Waseem  ( 2014-12-05 08:15:38 -0500 )edit
5

answered 2014-12-03 12:07:42 -0500

Archmage gravatar image

See the input objects called Output:Table:Monthly and Output:Table:TimeBins.

edit flag offensive delete link more

Comments

Hello @Archmage, Thanks for your help. But this gives results in HTML format, right? I want something so that I can easily read that data into a computer program where I have to do other things with it. e.g. getting this data and then running some control algorithm based on percentage of people dissatisfied etc. An Excel output may be easy for me to handle or some already written C program will be more handy, any ideas?

Thanks

Kindest Regards Waseem

Waseem gravatar image Waseem  ( 2014-12-04 00:40:48 -0500 )edit

Those tables can be output in HTML, XML, csv, or tab style, or two kinds or all kinds, see the input object called OutputControl:Table:Style.

You may also be interested in using the SQLite database version of output, see the input object called Output:SQLite.

Archmage gravatar image Archmage  ( 2014-12-04 06:31:01 -0500 )edit

I will give it a go to see what I get from it. Just one question, can we get time bins for only occupied hours? Thanks

Waseem gravatar image Waseem  ( 2014-12-05 03:20:14 -0500 )edit

Yes, if you use an occupancy schedule in the field called Schedule Name in the Output:Table:TimeBins object.

Archmage gravatar image Archmage  ( 2014-12-05 09:50:47 -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

1 follower

Stats

Asked: 2014-12-03 11:02:55 -0500

Seen: 480 times

Last updated: Dec 05 '14