[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EnergyPlus_Support] Re: IMF files & EP Macro
And to illistrate...here is a bit of code epmacro i used to create the CO2 part of my idf for the different zones to which it must be applied.
I ran this sepperately (still using eplaunch and just exchanged the include file for the CO2 for this one. It expands into the CO2 idf that I then later included...if that makes sense. Unfortunately it expands with a character that has to be manually removed with find and replace. I can't remember what the character was...possibly a '#' or a space?
##DEF CO2_EMS_FOR_ZONES[mmZone]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!EMS for Damper Control by CO2 Level
!*****THIS FILE IS USED TO GENERATE A FILE THAT HAS "" THAT NEED TO BE REMOVED******!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! CC = CurrentCO2Concentration
! CCSP = CurrentCO2SP
! CDP = CurrentDamperPos
! CO2SPUL = CO2_SP_Sensor UPPER LIMIT
! CO2SPLL = CO2_SP_Sensor LOWER LIMIT
! ODACO2SPUL = ODA CO2_SP_Sensor
! ZDCS = ZDC_Sensor
! ZDC = Zone_Damper_Changer
! MDF = MINDAMPERFRACTION
! CMM = CO2ModificationManager
! CMMPr = CO2ModificationManager Program
! CS = CO2_Sensor
! DaLL = Damper Lower Limit
EnergyManagementSystem:GlobalVariable,
#[mmZone // _CC] ,
#[mmZone // _CCSP ] ,
#[mmZone // _CDP ] ,
#[mmZone // _dDamper ] ,
#[mmZone // _dCO2 ] ,
#[mmZone // _MM ] ,
#[mmZone // _ODACO2SPULV ],
#[mmZone // _CO2SPULV ],
#[mmZone // _CO2SPLLV ],
#[mmZone // _DaLLV ]; !- Erl Variable 2 Name
EnergyManagementSystem:Sensor,
#[mmZone // _CS] , ! Sensor Name...reporting temperature
mmZone ,! Output:Variable or Output:Meter Index Key Name Output:Variable,*,Outdoor Dry Bulb,hourly; !- Zone Average [C]
Zone Air Carbon Dioxide Concentration ; ! Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
#[mmZone // _ODACO2SPUL] , ! Sensor Name...reporting temperature
Outdoor CO2 Schedule , ! Output:Variable or Output:Meter Index Key Name Zone/Sys Thermostat Cooling Setpoint Output:Variable,*,Zone/Sys Thermostat Cooling Setpoint,hourly; !- Zone Average [C]
Schedule Value ; ! Output:Variable or Output:Meter Name
!Setpoint Value
EnergyManagementSystem:Sensor,
#[mmZone // _CO2SPLL] , ! Sensor Name...reporting schedule properties
CO2SPLL , ! Output:Variable or Output:Meter Index Key Name Zone/Sys Thermostat Cooling Setpoint Output:Variable,*,Zone/Sys Thermostat Cooling Setpoint,hourly; !- Zone Average [C]
Schedule Value ; ! Output:Variable or Output:Meter Name
!Setpoint Value
EnergyManagementSystem:Sensor,
#[mmZone // _CO2SPUL] , ! Sensor Name...reporting schedule properties
CO2SPUL , ! Output:Variable or Output:Meter Index Key Name Zone/Sys Thermostat Cooling Setpoint Output:Variable,*,Zone/Sys Thermostat Cooling Setpoint,hourly; !- Zone Average [C]
Schedule Value ; ! Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
#[mmZone // _DaLL] , !- Name
DaLL , ! Output:Variable or Output:Meter Index Key Name...in this case !-EnergyManagementSystem:Actuator Available,COOLING SP SCH,Schedule:Compact,Schedule Value,[ ]
Schedule Value ;!Damper Lower Limit Schedule
EnergyManagementSystem:Sensor,
#[mmZone // _ZDCS] , !- Name
mmZone MDF , ! Output:Variable or Output:Meter Index Key Name...in this case !-EnergyManagementSystem:Actuator Available,COOLING SP SCH,Schedule:Compact,Schedule Value,[ ]
Schedule Value ;!VAV Terminal Damper Position ; ! Output:Variable or Output:Meter Name
! <EnergyManagementSystem:Actuator Available>, Component Unique Name, Component Type, Control Type, Units
!EnergyManagementSystem:Actuator Available,MDF,Schedule:Compact,Schedule Value,[ ]
EnergyManagementSystem:Actuator,
#[mmZone // _ZDC] , !- Name
mmZone MDF , !- Actuated Component Unique Name...in this case !-EnergyManagementSystem:Actuator Available,COOLING SP SCH,Schedule:Compact,Schedule Value,[ ]
Schedule:Compact, !- Actuated Component Type
Schedule Value ; !- Actuated Component Control Type
!***Program Calling Proceedure***
EnergyManagementSystem:ProgramCallingManager,
#[mmZone // _CMM] , ! Name
AfterPredictorAfterHVACManagers,!BeginTimestepBeforePredictor , ! EnergyPlus Model Calling Point
#[mmZone // _CMMPr] ; ! Program 1 Name
!***Main Program***
!******************
EnergyManagementSystem:Program,
#[mmZone // _CMMPr] , ! Program 1 Name
SET #[mmZone // _ODACO2SPULV ] = #[mmZone // _ODACO2SPUL],
SET #[mmZone // _CO2SPULV ] = #[mmZone // _CO2SPUL],
SET #[mmZone // _CO2SPLLV ] = #[mmZone // _CO2SPLL],
SET #[mmZone // _DaLLV ] = #[mmZone // _DaLL] ,
SET #[mmZone // _CC] = #[mmZone // _CS] ,
SET #[mmZone // _CDP] = #[mmZone // _ZDCS] ,
SET #[mmZone // _dDamper ] = (1 - #[mmZone // _DaLLV ]), !max min damper positions
SET #[mmZone // _dCO2 ] = #[mmZone // _CO2SPULV] - #[mmZone // _CO2SPLLV] , !max min CO2 levels, i.e. SP and ODA CO2
SET #[mmZone // _MM ] = 1 - (#[mmZone // _dDamper ] / #[mmZone // _dCO2 ] * #[mmZone // _CO2SPULV] ) ,
IF (#[mmZone // _CC] >= #[mmZone // _CO2SPLLV ] ) && (#[mmZone // _CC] <= #[mmZone // _CO2SPULV ] ),
SET #[mmZone // _ZDC] = #[mmZone // _CC] * #[mmZone // _dDamper ] / #[mmZone // _dCO2 ] + #[mmZone // _MM ] ,
ELSEIF #[mmZone // _CC] < #[mmZone // _CO2SPLLV ] ,
SET #[mmZone // _ZDC] = #[mmZone // _DaLLV ] ,
ELSEIF #[mmZone // _CC] > #[mmZone // _CO2SPULV ] ,
SET #[mmZone // _ZDC] = 1 ,
ENDIF;
!***End Main Program***
!**********************
##EndDEF
CO2_EMS_FOR_ZONES [U12]
CO2_EMS_FOR_ZONES [PE00WN]
CO2_EMS_FOR_ZONES [PE00WS]
CO2_EMS_FOR_ZONES [PE00WW]
CO2_EMS_FOR_ZONES [PE0Z02W]
CO2_EMS_FOR_ZONES [PE03W]
CO2_EMS_FOR_ZONES [HE00]
CO2_EMS_FOR_ZONES [HE0Z03]
CO2_EMS_FOR_ZONES [PavN]
CO2_EMS_FOR_ZONES [PavS]
!*******************************************DEFINE DAMPER SCHEDULES FOR ZONES*****************************
##def DAMPER_SCH_ZONES[mmZone]
Schedule:Compact,
mmZone MDF,
Fraction,
Through: 12/31,
For: AllDays,
Until: 05:00, 0.3,!0,
Until: 23:00, 0.7,
Until: 24:00, 0.3;
##EndDef
DAMPER_SCH_ZONES [U12]
DAMPER_SCH_ZONES [PE00WN]
DAMPER_SCH_ZONES [PE00WS]
DAMPER_SCH_ZONES [PE00WW]
DAMPER_SCH_ZONES [PE0Z02W]
DAMPER_SCH_ZONES [PE03W]
DAMPER_SCH_ZONES [HE00]
DAMPER_SCH_ZONES [HE0Z03]
DAMPER_SCH_ZONES [PavN]
DAMPER_SCH_ZONES [PavS]
!*******************************************END DEFINE DAMPER SCHEDULES FOR ZONES **********************
------------------------------------
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/