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

[EnergyPlus_Support] Re: Defining DesignDays based on the weather file



Hi Linda.

Thanks for your advise. My macro is almost OK. I can make it insert different idf's using the counter, but I cannot use one imf containing all the sites.

The imf's you pointed out have this structure:
##ifdef name (for example USA_IL_CHICAGO_OHARE_INTL_AP)
  data
  ...
##endif

In my macro I have:
##if #[counter[] eq 1]
  ! Case 1 - Chicago, Base
  ##def USA_IL_CHICAGO_OHARE_INTL_AP
     ##include [path]Region_4_North_And_Central_America.imf
  ##enddef
##elseif #[counter[] eq 2]
  ! Case 2 - LA
  ##def USA_CA_LOS_ANGELES_INTL_ARPT
     ##include [path]Region_4_North_And_Central_America.imf
  ##enddef
##endif

But this does not work. The documentation is not very explicit, nor I could find any example on the use of ##def and ##ifdef

Could you please guide me on how to use the DDY imf files?

Thanks

Homero.

--- In EnergyPlus_Support@xxxxxxxxxxxxxxx, Linda Lawrie <linda@...> wrote:
>
> I've thought about this -- currently there is no way for EP-Macro to 
> read environment variables that might have the weather file name.
> 
> What you can do is use the EP-Launch "counter" so that in the idf you 
> would have something like:
> (this is from the parametric example file in the YG files area, so 
> doesn't have location usage):
> 
> ! Include the run sequence counter file generated by EP-Launch
> ! This reads in the current counter setting during the group simulation
> ##include counter.inc
> ! Set up variables for each case
> ! In this example, a variable name BuildingNorthAxis is set to a 
> value which is used
> ! later in the north axis field of the BUILDING object.
> ##if #[counter[] eq 1]
>    ! Case 1 - Building north axis 0
>    ##set1 BuildingNorthAxis = 0
>    ! set other variable names here as desired
>    ! or use counter[] directly in ##if blocks elsewhere in the input file
> ##elseif #[counter[] eq 2]
>    ! Case 2 - Building north axis 90
>    ##set1 BuildingNorthAxis = 90
>    ! set other variable names here as desired
> ##elseif #[counter[] eq 3]
>    ! Case 2 - Building north axis 180
>    ##set1 BuildingNorthAxis = 180
>    ! set other variable names here as desired
> ##elseif #[counter[] eq 4]
>    ! Case 2 - Building north axis 270
>    ##set1 BuildingNorthAxis = 270
>    ! set other variable names here as desired
> ##else
>    ! Invalid counter
> 
>    Output:PreprocessorMessage,
>      Parametric Example File, !- Preprocessor Name
>      Fatal,                   !- Error Severity
>      Invalid counter value = counter[],  !- Message Line 1
>      Expecting values from 1 to 4;  !- Message Line 2
> 
> ##endif
> ! Test that all required variables have been set.
> ##ifndef counter[]
> 
>    Output:PreprocessorMessage,
>      Parametric Example File, !- Preprocessor Name
>      Fatal,                   !- Error Severity
>      "counter" variable has not been set,  !- Message Line 1
>      Probably means the include file was not read successfully;  !- 
> Message Line 2
> 
> ##endif
> 
> 
> At 06:42 AM 6/4/2012, hnoboam wrote:
> >Thanks for your advise, the include would certainly make the macro shorter.
> >
> >What I have not figure out, is the way to learn the location from 
> >the Weather File, i.e. the 725300 (or the weather file name itself, 
> >or the "Chicago Ohare Intl Ap, or whatever particular information I 
> >could get to use in the ##if) as a variable; in the macro below, the "Site".
> >
> >My problem boils down to: Can I know the site location from the 
> >Weather file inside the macro?
> >
> >--- In EnergyPlus_Support@xxxxxxxxxxxxxxx, Jason Kirkpatrick 
> ><jason.alan.kirkpatrick@> wrote:
> > >
> > > If you're reading the site:location from the .stat file then couldn't you
> > > also read the design day data from the .ddy file?
> > >
> > > Something like this:
> > >
> > > ##if Site = 725300 ! Chicago
> > > ##fileprefix C:\EnergyPlusV7-0-0\WeatherData
> > > ##include USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.ddy
> > >
> >
> >
> >
> >
> >------------------------------------
> >
> >Primary EnergyPlus support is found at:
> >http://energyplus.helpserve.com or send a message to 
> >energyplus-support@...
> >
> >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
> >
> >
> >
>



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

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/