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

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





Another way I've done this is to create a small file which has the parameters that you want to set such as
 
##set1  City 725300
##set1  Orientation 0
 
(I usually name this file with its parameters such Chicago_725300_Orient000.idf so I can find it later).  I then have a separate base idf file (Base.idf) which includes the macros and all my other inputs:
 
##if  City = 725300
... (as Linda and Jason have shown).
 
 
I then combine the small file and the base file with a batch file (commands like Copy Chicago_725300_Orient000.idf, Base.idf  Chicago_simulation.idf).
 


 
On Mon, Jun 4, 2012 at 8:51 AM, Linda Lawrie <linda@xxxxxxxxxxxxxx> 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@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/




__._,_.___


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.




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___