[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EnergyPlus_Support] Simple EMS function help required



Hi there,

I'm trying to use EMS to create a new variable from several standard output options at the end of the simulation period.  My new variable does not need to feed back into any simulation, or to cancel the run or modify it in any other complex way, as EMS allows you to do, it just needs to sum several Output: Meter values and Output: Variable values, then increase this figure by a percentage if the discomfort hours exceed a certain amount.  

As I said, it only needs to do this at the very end of the simulation, as it's working with values for the total time of the simulation.  This doesn't seem to be an option in EMS, so I am using "EndOfZoneTimestepBeforeZoneReporting" as the calling point.

My question is, for something so simple as this, is EMS the right thing to be using at all?  The most simple example in the EMS guide literature (EMSCustomOutputVariable) is similarly just summing things, but it is doing it for each time step, rather than just at the end.  If it isn't EMS then what should I use?

Relevent code below.  At the moment the loop to check the comfort hours isn't in.  At the moment it runs but I can't access the variable that I'm trying to produce.  Can provide full idf file if needed.  Thanks for your time.

  EnergyManagementSystem:Sensor,
    T1,                      !- Name
    Block1:Zone1,          !- Output:Variable or Output:Meter Index Key Name
    Time Not Comfortable Summer or Winter Clothes;  !- Output:Variable or Output:Meter Name

  EnergyManagementSystem:Sensor,
    T2,                      !- Name
    *,          !- Output:Variable or Output:Meter Index Key Name
    Heating:DistrictHeating;  !- Output:Variable or Output:Meter Name 

  EnergyManagementSystem:Sensor,
    T3,                      !- Name
    *,          !- Output:Variable or Output:Meter Index Key Name
    Cooling:DistrictCooling;  !- Output:Variable or Output:Meter Name 

  EnergyManagementSystem:Sensor,
    T4,                      !- Name
    *,          !- Output:Variable or Output:Meter Index Key Name
    WaterSystems:DistrictHeating;  !- Output:Variable or Output:Meter Name 

  EnergyManagementSystem:Sensor,
    T5,                      !- Name
    *,                 !- Output:Variable or Output:Meter Index Key Name
    InteriorLights:Electricity;  !- Output:Variable or Output:Meter Name 

  EnergyManagementSystem:Sensor,
    T6,                      !- Name
    *,                 !- Output:Variable or Output:Meter Index Key Name
    InteriorEquipment:Electricity;  !- Output:Variable or Output:Meter Name 

  !EnergyManagementSystem:Sensor,
   ! T7,                      !- Name
    !*,                 !- Output:Variable or Output:Meter Index Key Name
    !Fans:Electricity;  !- Output:Variable or Output:Meter Name 

  EnergyManagementSystem:ProgramCallingManager,
    CO2 incl penalty,  !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CO2InclPenalty;        !- Program Name 1

  EnergyManagementSystem:GlobalVariable,
    TotCO2InclPenalty;     !- Erl Variable 1 Name

  EnergyManagementSystem:OutputVariable,
    Total CO2 emissions including penalty [kg],  !- Name
    TotCO2InclPenalty,     !- EMS Variable Name !
    Summed,			     !- Type of Data in Variable
    SystemTimeStep;			    !- Update Frequency

  !  SumOrAverage,                !- Type of Data in Variable
  !  ZoneTimeStep;            !- Update Frequency


  EnergyManagementSystem:Program,
    CO2InclPenalty,        !- Name 
    SET CO2gas = 0.19,	! Kg CO2 per what?
    SET CO2elec = 0.43, !Kg CO2 per kWh
    SET BoilEff = 0.9, ! efficiency of boiler
    SET ChillEff = 3.5, ! efficiency of chiller
    SET GasDemand = (T2+T4)/BoilEff, !total demand for gas
    SET ElecChill = T3/ChillEff, ! electricity demand from chiller
    SET OtherElec = T5+T6,
    SET TotalElecDemand = OtherElec+ElecChill, ! total electricity demand
    SET CO2ExclPenalty = (GasDemand*CO2gas) + (TotalElecDemand*CO2elec),
    SET TotCO2InclPenalty = CO2ExclPenalty*1.2;

! So do the above as a dummy, then work out how to put the if/else loop in for overheating hours.

  Output:EnergyManagementSystem,
    Verbose,                 !- Actuator Availability Dictionary Reporting
    Verbose,                 !- Internal Variable Availability Dictionary Reporting
    Verbose;                 !- EMS Runtime Language Debug Output Level



------------------------------------

Primary EnergyPlus support is found at:
http://energyplus.helpserve.com or send a message to energyplus-support@xxxxxxxx

The primary EnergyPlus web site is found at:
http://www.energyplus.gov

The group web site is:
http://groups.yahoo.com/group/EnergyPlus_Support/

Attachments are currently allowed but be mindful that not everyone has a high speed connection.  Limit attachments to small files.

EnergyPlus Documentation is searchable.  Open EPlusMainMenu.pdf under the Documentation link and press the "search" button.
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EnergyPlus_Support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EnergyPlus_Support/join
    (Yahoo! ID required)

<*> To change settings via email:
    EnergyPlus_Support-digest@xxxxxxxxxxxxxxx 
    EnergyPlus_Support-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/