Questions about 5 phase method

Hi all,
I am rendering some images with 5 phase method in the tutorial of @sarith . However, it is weird to get the all black images from the direct sun coefficients simulation which is different from the tutorial of @Andrew_McNeil2. So I tested the simulation examples in the tutorial of @sarith. (https://www.radiance-online.org/learning/tutorials) I used the example script and kept the same parameters.
For the 3 phase simulation part, one of the images is as follows:
3P
And for the direct solar part of 3 phase simulation, the corresponding image is the following:
3Pd
As for the direct sun coefficients simulation, the image is all black:
cds
And the final combined image is like this:
image
There is no significant difference between images from 5 phase simulation and 3 phase simulation. I am puzzled about the black image from the direct sun coefficients simulation. Is it reasonable?
Any advice or guidance is appreciated!

Hi @lee

I am not sure which hours you are referring to, but the results should look something like this (3ph, 3phdir, cds and 5ph respectively).


Unless the direct normal radiation in the weather file is zero (implying an overcast sky), you will likely see some difference in the results and an accurate representation of the incident radiation through the blinds. It probably makes more sense to compare images with falsecolor renderings than to look at them through jpg/bitmap conversions.

Regards,
Sarith

Hi Sarith,
The images are at 9:30 09/21 in the file NYC.wea that only has 40 hours. I am also wondering which hour of the image you just showed. I checked my script over and over again but I still got all black images.

##Create sun primitive definition for solar calculations.
echo "void light solar 0 0 3 1e6 1e6 1e6" > skies/suns.rad`
cnt 145 | rcalc -e MF:1 -f reinsrc.cal -e Rbin=recno -o 'solar source sun 0 0 4 ${Dx} ${Dy} ${Dz} 0.533' >> skies/suns.rad
vwrays -vf views/south.vf -x 400 -y 400 -pj 0.7 -ff | accelerad_rcontrib  -w- -i -ab 1 -ad 256 -lw 1.0e-3 -dc 1 -dt 0 -dj 0 -ffc -n 1 `vwrays -vf views/south.vf -x 400 -y 400 -d`  -o matrices/cds/hdrIllSpace/south%03d.hdr -e MF:1 -f reinhart.cal -b rbin -bn Nrbins -m solar octrees/sunCoefficients.oct
##Create a material map
oconv -f materials.rad room.rad objects/GlazingVmtxBlack.rad > octrees/materialMap5Phase.oct
accelerad_rpict -x 400 -y 400 -ps 1 -av 0.31831 0.31831 0.31831 -ab 0 -vf views/south.vf octrees/materialMap5Phase.oct > matrices/cds/materialMapSouth.hdr
##Calculate luminance sun coefficients for images for the view file south.vf.
vwrays -vf views/south.vf -x 400 -y 400 -pj 0.7 -ff | accelerad_rcontrib  -w- -ab 1 -ad 256 -lw 1.0e-3 -dc 1 -dt 0 -dj 0 -ffc -n 1 `vwrays -vf views/south.vf -x 400 -y 400 -d`  -o matrices/cds/hdrLumFacade/south%03d.hdr -e MF:1 -f reinhart.cal -b rbin -bn Nrbins -m solar octrees/sunCoefficients.oct
##Calculate luminance sun coefficients for images for the view files views/south.vf.
for idx in {000..145}
do
	pcomb -h -e 'ro=ri(1)*ri(2)+ri(3);go=gi(1)*gi(2)+gi(3);bo=bi(1)*bi(2)+bi(3)' -o matrices/cds/materialMapSouth.hdr -o matrices/cds/hdrIllSpace/south${idx}.hdr -o matrices/cds/hdrLumFacade/south${idx}.hdr > matrices/cds/hdr/south${idx}.hdr
done
##Generate a sun-matrix for the sun coefficients calculation.
gendaymtx -5 0.533 -d -m 1 assets/NYC.wea > skyVectors/NYCsun.smx
##Images
dctimestep -o results/5ph/cds/hdr/south%02d.hdr matrices/cds/hdr/south%03d.hdr skyVectors/NYCsun.smx

And then I compared three sky matrixes files in the skyVectors folder. Is the file NYCsun.smx reasonable?
https://drive.google.com/file/d/1XR35G5oKBCedPUTyXGY85uCTGKPkmem-/view?usp=sharing
I hope you can help to find the errors, thanks a lot!

Hi Lee,

Since you are using accelerad and have also changed the parameters for both gendaymtx and rcontrib for lower MF values, it will be a while before I can go through your files and troubleshoot your simulation.

The final five phase images generated as per the commands and input files the tutorial can be downloaded from here. There is no timestep relating to 09/21 in the NYC.wea file. In case you are implying 9:30 09/20, then the images corresponding to those (in the shared archive are south0021.hdr and eastBlinds0021.hdr. There is a bug/typo in the final for loop of the five phase script: The count should be from 0000…0039 instead of 0001…0040. But other than that I think the simulation is working as expected.

Regards,
Sarith

1 Like

Hi Sarih,
Thanks for your patient reply! Sorry for the time of the image that I presented and it is 12:30 09/20. The final images your shared were obtained from the script that I uploaded, right? The problem is related to the unreasonable black images the direct sun coefficients simulation. I corrected the error you mentioned and it didn’t influence the simulation.

I tried to not use accelerad command and use the original command such as rcontrib and rpict. At last I got the images of the direct sun coefficients simulation as expected.
image
The problem is linked to the command accelerad_rcontrib @Nathaniel_Jones to make the black images:
tmpBCAE
There could be some problems about the command accelerad_rcontrib.

Hi @lee,

I suggest you remove the -w- from your command, as this suppresses warnings so that you will not see messages that might tell you what the problem is.

I do not know what the material of your window is, but you should also be aware that Accelerad does not support BSDF materials.

Hi @Nathaniel_Jones ,
The warnings are as follows:


The material of the window is just BSDF which Accelerad doesn’t support. As the documentation mentioned([Accelerad Documentation]((Accelerad Documentation), 5 phase method simulations may produce lower illuminance results in Accelerad because interreflection of the direct solar component within the BSDF material is not taken into account.
However, when I replaced the window material as glass and there is no warning.

oconv -f materialBlack.rad roomBlack.rad skies/suns.rad materials.rad objects/Glazing.rad > octrees/sunCoefficients.oct

The images are still black like this:
image