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

Revision history [back]

click to hide/show revision 1
initial version

Output hourly HDR for uncontrolled windows

I'd like to do glare analysis (evalglare) using HDR images generated in OS/Radiance. I only want to do this for uncontrolled windows for now. First step is to get the images generated. The below is the code I'm proposing in the runSimulation routine. unctrld_wg_glr_b is a user-selected parameter that will choose either to run an annual illuminance run, or generate HDR images. Any thoughts on a better approach?

  windowMaps.each do |row|
    # skip header
    next if row[0] == "#"
    wg = row.split(",")[0]

    # do uncontrolled windows (WG0)
    if wg == "WG0"
    # if row.split(",")[2] == "n/a" || row.split(",")[2] == "AlwaysOff"
      # keep header, convert to illuminance, but no transpose
      ### foo (-ff)

      while merge_count() > 2
        puts "waiting in rmtxop queue..."
        sleep(5)
      end
      # if user-specifies to generate hourly images for later glare processing...
      if unctrld_wg_glr_b = 'Yes'
        rad_command = "dctimestep output/ts/#{wg}_%04d.hdr output/dc/#{wg}.vmx annual-sky.mtx"
      else
        rad_command = "dctimestep output/dc/#{wg}.vmx annual-sky.mtx | rmtxop -fa -c 47.4 120 11.6 - > output/ts/#{wg}.ill"
      exec_statement(rad_command, runner)

Output hourly HDR for uncontrolled windows

I'd like to do glare analysis (evalglare) using HDR images generated in OS/Radiance. I only want to do this for uncontrolled windows for now. First step is to get the images generated. The below is the code I'm proposing in the runSimulation routine. unctrld_wg_glr_b is a user-selected parameter that will choose either to run an annual illuminance run, or generate HDR images. How do I make the view from a glare sensors view? Any thoughts on a better approach?

  windowMaps.each do |row|
    # skip header
    next if row[0] == "#"
    wg = row.split(",")[0]

    # do uncontrolled windows (WG0)
    if wg == "WG0"
    # if row.split(",")[2] == "n/a" || row.split(",")[2] == "AlwaysOff"
      # keep header, convert to illuminance, but no transpose
      ### foo (-ff)

      while merge_count() > 2
        puts "waiting in rmtxop queue..."
        sleep(5)
      end
      # if user-specifies to generate hourly images for later glare processing...
      if unctrld_wg_glr_b = 'Yes'
        rad_command = "dctimestep output/ts/#{wg}_%04d.hdr output/dc/#{wg}.vmx annual-sky.mtx"
      else
        rad_command = "dctimestep output/dc/#{wg}.vmx annual-sky.mtx | rmtxop -fa -c 47.4 120 11.6 - > output/ts/#{wg}.ill"
      exec_statement(rad_command, runner)

Output hourly HDR for uncontrolled windows

I'd like to do glare analysis (evalglare) using HDR images generated in OS/Radiance. I only want to do this for uncontrolled windows for now. First step is to get the images generated. The below is the code I'm proposing in the runSimulation routine. unctrld_wg_glr_b is a user-selected parameter that will choose either to run an annual illuminance run, or generate HDR images. How do I make the view from a glare sensors view? Any thoughts on a better approach?approach? Am I handling the glare sensor views correctly?

  windowMaps.each do |row|
    # skip header
    next if row[0] == "#"
    wg = row.split(",")[0]

    # do uncontrolled windows (WG0)
    if wg == "WG0"
    # if row.split(",")[2] == "n/a" || row.split(",")[2] == "AlwaysOff"
      # keep header, convert to illuminance, but no transpose
      ### foo (-ff)

      while merge_count() > 2
        puts "waiting in rmtxop queue..."
        sleep(5)
      end
      # if user-specifies to generate hourly images for later glare processing...
      if unctrld_wg_glr_b = 'Yes'
        # daylighting control views, unfiltered
        views_daylighting_control = Dir.glob('views/*_dc.vfh')
        views_daylighting_control.each do |dc|
          rad_command = "dctimestep output/ts/#{wg}_%04d.hdr output/dc/#{wg}.vmx output/ts/#{dc}_%04d.hdr output/dc/#{dc}.vmx annual-sky.mtx"
      else
        rad_command = "dctimestep output/dc/#{wg}.vmx annual-sky.mtx | rmtxop -fa -c 47.4 120 11.6 - > output/ts/#{wg}.ill"
      exec_statement(rad_command, runner)

    else

Output hourly HDR for uncontrolled windows

I'd like to do glare analysis (evalglare) using HDR images generated in OS/Radiance. I only want to do this for uncontrolled windows for now. First step is to get the images generated. The below is the code I'm proposing in the runSimulation routine. unctrld_wg_glr_b is a user-selected parameter that will choose either to run an annual illuminance run, or generate HDR images. Any thoughts on a better approach? Am Also not really sure how to handle the glare views...pretty sure I handling the glare sensor views correctly?need to rename or copy the view files so I can put the %04 in their before the command. Help?

  windowMaps.each do |row|
    # skip header
    next if row[0] == "#"
    wg = row.split(",")[0]

    # do uncontrolled windows (WG0)
    if wg == "WG0"
    # if row.split(",")[2] == "n/a" || row.split(",")[2] == "AlwaysOff"
      # keep header, convert to illuminance, but no transpose
      ### foo (-ff)

      while merge_count() > 2
        puts "waiting in rmtxop queue..."
        sleep(5)
      end
      # if user-specifies to generate hourly images for later glare processing...
      if unctrld_wg_glr_b = 'Yes'
        # daylighting control views, unfiltered
        views_daylighting_control = Dir.glob('views/*_dc.vfh')
        views_daylighting_control.each do |dc|
          rad_command = "dctimestep output/ts/#{dc}_%04d.hdr output/dc/#{dc}.vmx annual-sky.mtx"
      else
        rad_command = "dctimestep output/dc/#{wg}.vmx annual-sky.mtx | rmtxop -fa -c 47.4 120 11.6 - > output/ts/#{wg}.ill"
      exec_statement(rad_command, runner)

    else

Output hourly HDR for uncontrolled windows

I'd like to do glare analysis (evalglare) using HDR images generated in OS/Radiance. I only want to do this for uncontrolled windows for now. First step is to get the images generated. The below is the code approach I'm proposing in proposing.

For each valid hour (I intend to eventually filter for the hours I care about):

somehow convert OS/Radiance's runSimulationannual-sky.mtx routine. to a single hour, say, unctrld_wg_glr_bhour.sky is a user-selected parameter that will choose either to run an annual illuminance run, or generate HDR images. Any thoughts on a better approach? Also not really sure how to handle the glare views...pretty sure I need to rename or copy the view files so I can put the %04 in their before the command. Help?then:

  windowMaps.each do |row|
    # skip header
    next if row[0] == "#"
    wg = row.split(",")[0]

    # do uncontrolled windows (WG0)
    if wg == "WG0"
    # if row.split(",")[2] == "n/a" || row.split(",")[2] == "AlwaysOff"
      # keep header, convert to illuminance, but no transpose
      ### foo (-ff)

      while merge_count() oconv materials/materials.rad model.rad skies/hour.sky > 2
        puts "waiting in rmtxop queue..."
        sleep(5)
      end
      # if user-specifies to generate hourly images for later octrees/images.oct
#glare_sensor.vth is a file specifying a fisheye view from the glare processing...
      if unctrld_wg_glr_b = 'Yes'
        # daylighting control views, unfiltered
        views_daylighting_control = Dir.glob('views/*_dc.vfh')
        views_daylighting_control.each do |dc|
          rad_command = "dctimestep output/ts/#{dc}_%04d.hdr output/dc/#{dc}.vmx annual-sky.mtx"
      else
        rad_command = "dctimestep output/dc/#{wg}.vmx annual-sky.mtx | rmtxop -fa -c 47.4 120 11.6 - sensor
rpict -av .3 .3 .3 -ab 1 -vf glare_sensor.vth octrees/images.oct > output/ts/#{wg}.ill"
      exec_statement(rad_command, runner)

    else
temp.hdr
evalglare -vta -vv 180 -vh 180 temp.hdr

But, how do I go from annual-sky.mtx to hour.sky?

Output hourly HDR for uncontrolled windows

I'd like to do glare analysis (evalglare) using HDR images generated in OS/Radiance. First step is to get the images generated. The below is the approach I'm proposing.

For each valid hour (I intend to eventually filter for the hours I care about):

somehow convert OS/Radiance's annual-sky.mtx to a single hour, say, hour.sky then:

oconv materials/materials.rad model.rad skies/hour.sky > octrees/images.oct
#glare_sensor.vth is a file specifying a fisheye view from the glare sensor
rpict -av .3 .3 .3 -ab 1 -vf glare_sensor.vth octrees/images.oct > temp.hdr
evalglare -vta -vv 180 -vh 180 temp.hdr

But, how do I go from annual-sky.mtx to hour.sky?