Hello

This is a follow up to a question I asked a few years ago about calculating the total irradiation on a pedestrian in an outdoor space.

For one single pedestrian position and a full year I do the following (based on Greg suggestion):

```
# <combined.rad>
# Combined ground and sky vault for calculating cylindrical irradiance
# Start by telling rfluxmtx to generate a single coefficient for the ground:
#@rfluxmtx h=u
void glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180
# Now, tell rfluxmtx to generate a set of Tregenza sky patches using Y for "north/up":
#@rfluxmtx h=r1 u=+Y
void glow sky_glow
0 0 4 1 1 1 0
sky_glow source sky
0 0 4 0 0 1 180
```

Generate sky matrix (only once);

```
gendaymtx weather.wea > sky.mtx
```

I then generate random sample points on an ideal cylinder:

```
cnt 2 | rcalc -e 'HT:2;RAD:0.2' \
-e 'rrad=RAD*sqrt(rand(.836*recno+.238));phi=2*PI*rand(-.3582*recno+.861);' \
-e '$1=rrad*cos(phi);$2=rrad*sin(phi);$3=HT;$4=0;$5=0;$6=1' > samps.txt
cnt 40 | rcalc -e 'HT:2;RAD:0.2' \
-e 'rht=HT*rand(.571*recno-.7633);phi=2*PI*rand(-.6716*recno-.1023)' \
-e '$1=RAD*cos(phi);$2=RAD*sin(phi);$3=rht;$4=cos(phi);$5=sin(phi);$6=0' >> samps.txt
```

I then use `rfluxmyx`

to calculate the irradiation coefficients (geometry and materials if needed):

```
rfluxmtx -I+ -c 42 -y 1 -ab 2 - combined.rad shadow_mask_materials.rad shadow_mask_geometry.rad < samps.txt > daycoef.mtx
```

And finally multiply

```
dctimestep daycoef.mtx sky.mtx > annual.out
```

The last three operations need to be repeated for each one of the positions considered. This number can be as high as 20,000 in my case. I have timed the execution and it takes around 0.65s per position. For 20,000 positions this is around 3.6 hours.

```
real 0m0.626s
user 0m0.584s
sys 0m0.035s
```

From what I understand, I should be able to speed it up by using binary io and, I think, not writing to disk all the intermediate files, but I am struggling to write the correct command. If I try

```
rfluxmtx -I+ -c 42 -y 1 -ab 2 - combined.rad shadow_mask_materials.rad shadow_mask_geometry.rad < samps.txt | dctimestep sky.mtx > annual.out
```

I get the error `fatal - unexpected column count in header`

What am I doing wrong? Is this the right approach or do you have any advice?

Thanks

Ruggiero