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

Grigori Grozman's profile - activity

2016-04-05 08:28:40 -0500 asked a question Ambient files in parallel computations

Dear Radiance community.

Since you have been kind enough give me a quick and very relevant answer to my previous question, a ask a subsequent one.

If I understand correctly, in the last versions of Radiance, it is safe to use ambient files in parallel computations. I assume threads wait for each other before adding new results to the ambient file. However, the order, in which the different runs execute, seems to affect the final result, which is problematic, since the order of execution of parallel cases may vary from one run to another.

In order to illustrate the problem, I have created a small case with two zones. In each of them, a single measurement point is placed. The scene files are compressed into the attached file. The extension .bmp needs to be removed from the file name since the forum would not allow to .zip attachment [Dear moderators, please forgive me if I thereby break your rules. Feel free to delete this post. I will then try to rewrite it is a correct way]. In the archive, the file run2.bat starts the simulations and writes the results to file res.txt.

C:\fakepath\ambient files test.zip.bmp

In the first part of the experiment, I start with an empty ambient file and call rtrace for zone 1 first and then for zone 2 (run 1). Then, using the same ambient file, I call the same rtrace again for zone 1 first and then for zone 2 (run 2). I get different results in run 1 and run 2, which is expected, since the ambient files is being populated in run 1. Now, I call rtrace with the same ambient file for zone 2 first and then for zone 1 (run 3), but I get the same results as in in run 2. This is also expected, since the ambient file does not change during run 2 and run 3.

Now, I reset the ambient file and make runs 4,5 and 6 the same way as runs 1,2,and 3 but with reversed zone order.

As it turns out, the results are the same in run 5 and 6 (as expected), but not the same in runs 3 and 6, as I would hope they would.

As stated previously, this illustrates that the order of execution is crucial for the way the ambient file is populated. This means, one may obtain different results if one runs the same set of radiance commands in parallel. However, it is absolutely non-negotiable for me that the results are exactly the same from one simulation to another. The users get unhappy otherwise. The only way to achieve that, I as see it now, is to completely abandon the ambient files, at the cost of much longer simulation times.

So here finally comes the question: Do you know another workaround?

2016-03-15 12:28:59 -0500 received badge  Teacher (source)
2016-03-15 10:55:21 -0500 answered a question Ambient files increase illiminance

Thank you for your answers.

Following the advise of Nathanael, I tried to increase -lr and decrease -lw. My aim is to generate the same illuminance value without the use of the ambient file as I get using it.

I have tried -ab 500 -lr 1000 -lw 0.000000001. The results are still (for zone 2):

With ambient file (created in rtrace for zone 1): 211.394704

Without ambient file: 203.645436

So I am closer than before, but still not there.

The new run.bat file is:

echo This result file is to show that usage of ambient file increases illuminance > res.txt

gensky -ang 0 45 -b 22.86 -c -m 0 -g 0.2 > sky.mat 

oconv sky.mat sky.rad materials.mat zone1.rad zone2.rad shade.rad > scene.oct

echo Zone 1 without ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa scene.oct < p1.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt

echo Zone 2 without ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa scene.oct < p2.pnt  | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt

echo Zone 1 without ambient file but with large ab >> res.txt
rtrace -ab 500 -lr 1000 -lw 0.000000001 -h -I+ -ov -u- -faa scene.oct < p1.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo Zone 2 without ambient file but with large ab >> res.txt
rtrace -ab 500 -lr 1000 -lw 0.000000001 -h -I+ -ov -u- -faa scene.oct < p2.pnt  | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo Zone 1 with ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa -af ambf.amb scene.oct < p1.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo Zone 2 with ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa -af ambf.amb scene.oct < p2.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo The illuminance in zone 2 is higher when using ambient files than without it. Such a high value can not be achieved by using a very large ab. >> res.txt

del ambf.amb
del scene.oct
del sky.mat

The result file is:

This result file is to show that usage of ambient file increases illuminance 
Zone 1 without ambient file 
189.745012
Zone 2 without ambient file 
193.791486
Zone 1 without ambient file but with large ab 
195.498072
Zone 2 without ambient file but with large ab 
203.645436
Zone 1 with ambient file 
189.745012
Zone 2 with ambient file 
211.394704
The illuminance in zone 2 is higher when using ambient files than without ...
(more)
2016-03-15 09:08:10 -0500 received badge  Student (source)
2016-03-15 08:37:37 -0500 asked a question Ambient files increase illiminance

Dear Radiance experts.

I am professionally using radiance for calculating daylight factors and illuminance. It all works quite well. However, I can not fully understand how to use ambient files.

Question 1: Is there any comprehensive documentation on the topic?

Question 2: It seems to me that when rtrace is used with ambient files, a higher value of illuminance is calculated than when no ambient files are used. Is there any explanations to that? Which value is more correct?

I have put together a simple example that illustates the problem. Since I am a newbie in this forum and I can not attach files, I post them here directly. All the files below need to be saved into the same directory. The run.bat file needs to be run and the result is printed to the file res.txt.

materials.mat

void plastic walls
0
0
5 0.5 0.5 0.5 0.002 0.3

void glass windows
0
0
3 0.7 0.7 0.7

zone1.rad

walls polygon zone1.1540
0
0
12
    1 0 0
    1 0 1
    0 0 1
    0 0 0

walls polygon zone1.4620
0
0
12
    0 0 1
    0 1 1
    0 1 0
    0 0 0

walls polygon zone1.2310
0
0
12
    0 1 0
    1 1 0
    1 0 0
    0 0 0

walls polygon zone1.5137
0
0
12
    1 0 1
    1 0 0
    1 1 0
    1 1 1

walls polygon zone1.6457
0
0
12
    0 1 1
    0 0 1
    1 0 1
    1 1 1

walls polygon zone1.1
0
0
18
    0 1 0
    1 1 0
    1 1 1
    0.75 1 0.75
    0.75 1 0.25
    0.25 1 0.25

walls polygon zone1.2
0
0
18
    0 1 0
    0.25 1 0.25
    0.25 1 0.75
    0.75 1 0.75
    1 1 1
    0 1 1

windows polygon zone1.3267
0
0
12
    0.75 1 0.25
    0.25 1 0.25
    0.25 1 0.75
    0.75 1 0.75

zone2.rad

walls polygon zone2.1540
0
0
12
  0  0  0
  0  0  1
 -1  0  1
 -1  0  0

walls polygon zone2.4620
0
0
12
 -1  0  1
 -1  1  1
 -1  1  0
 -1  0  0

walls polygon zone2.2310
0
0
12
 -1  1  0
  0  1  0
  0  0  0
 -1  0  0



walls polygon zone2.5137
0
0
12
  0  0  1
  0  0  0
  0  1  0
  0  1  1

walls polygon zone2.6457
0
0
12
 -1  1  1
 -1  0  1
  0  0  1
  0  1  1


walls polygon zone2.1
0
0
18
    0 1 0
    -1 1 0
    -1 1 1
    -0.75 1 0.75
    -0.75 1 0.25
    -0.25 1 0.25

walls polygon zone2.2
0
0
18
    0 1 0
    -0.25 1 0.25
    -0.25 ...
(more)