Issue with rfluxmtx two-phase simulation

Hi and happy new year!

I have a problem with running a two-phase grid-based irradiance simulation. I am a begginer user of it and I started with the tutorial from @sarith, which I managed, but when I switch to my own model I have some issues.

My problem is that my result is fluctuating a lot and the simulation runs suspiciously fast (a few seconds for an annual simulation), so I think that something goes wrong with it. I thought it was an issue with my simulation parameters so I started increasing ab, ad, as and decreasing lw. I am using now these parameters: -ab 6 -ad 16384 -as 16384 -ar 128 -aa 0.05 -lw 6e-5, but still the simulation runs too fast and my result fluctuates a lot.

The commands that I am running are the following:

*rfluxmtx -I+ -y 2 -ab 6 -ad 16384 -as 16384 -ar 128 -aa 0.05 -lw 6e-5 -n 4 - skyglow.rad -i RadSimu_blue_9_oct.oct < RadSimu_blue_9_0.pts > RadSimu_blue_9_illum.mtx *

## Run gendaymtx and dctimestep separately for sun and sky (I want to use a colored sky)
gendaymtx -m 1 -d CHE_Geneva.wea > RadSimu_blue_9_sun.mtx
gendaymtx -m 1 -s -c 0.644 0.884 0.963 CHE_Geneva.wea > RadSimu_blue_9_sky.mtx
dctimestep RadSimu_blue_9_illum.mtx RadSimu_blue_9_sun.mtx > RadSimu_blue_9_annual_sun.ill
dctimestep RadSimu_blue_9_illum.mtx RadSimu_blue_9_sky.mtx > RadSimu_blue_9_annual_sky.ill

From these, I get the 3 channel results which then I use to calculate alpha-opic weighted values (from CIE S 026).

Can someone help me figure out what goes wrong? Here are my simulation files.


Kind regards,

Hi @Myrta_Gk

The simulation is running quickly because you just have two points.

I did a quick test with your model and it appears that the results fluctuate more in the case of direct-sun simulation. The sun position and radiance approximated in the two-phase direct-sun simulation ( outlined in red below) is not really representative of the actual position and size of sun .

Your results will likely be more accurate if you follow all the “phases” outlined in green below. You can find the commands for that in Appendix B.2 or here.

By the way, the values of -aa, -as and (I think) -ar have no influence of the simulation results as rcontrib (and rfluxmtx) does not employ ambient caching.


Hi @sarith,

Thanks for the response! Ok I understand!

However, is it normal that running rtrace with the same model and the above mentioned parameters is slower than rfluxmtx? Does it have to do with the ambient caching?

Best regards,

Hi @Myrta_Gk , yes rtrace implements ambient caching and the parameters to be used for running rtrace are different than that for rfluxmtx. I would suggest reviewing the Rendering with Radiance book, along with John Mardaljevic’s dissertation work (including the papers published by him around that time) and the Ambient parameters crash course presentation to understand the working of rtrace and point-in-time simulations.


Hi @sarith,

I have a follow up question about the two-phase DDS method that I am trying to implement to improve my direct sun calculation.

So the steps of the method as presented in the summary picture that you send me above and your tutorial are:

  • Step 1: 2-phase simulation
  • Step 2: direct only 2-phase simulation (with black materials)
  • Step 3: accurate sun simulation (with black materials)
  • Final step: results step 1 - results step 2 + results step 3

I was wondering why is it necessary to have steps 1 and 2 as two individual steps. The gendaymtx program has an option to do sky only simulation (with the -s option). Why do we need to first simulate both sun and sky and then subtract the sun and not just do a sky only simulation?

Would it be reasonable to do these steps instead?

  • Step 1: sky only 2-phase simulation (with the -s option of gendaymtx)
  • Step 2: accurate sun simulation (with colored materials)
  • Final step: results step 1 + results step 2

Thank you for helping me understand this!

Best regards,

Hi @Myrta_Gk ,

This is a very valid question.

My reasons for proposing this approach are:

  1. It is possible that the user might only be interested in a one step simulation, in which case a (somewhat) reasonable compromise can be running a single Step 1 simulation with higher (577…2305 etc) reinhart skies. If someone is only interested in calculating solar insolation, they could just run Step 3 instead.
  2. The illuminance values generated through Steps 1-3 practically address all the major annual daylight metrics. The combined results (1-2+3) can be used for calculating DA, sDA and UDI. Step 3 gives you the values needed for calculating ASE. sDA and ASE were (and I guess still are) required for LM-83-12 and LEED daylighting credits.
  3. The raytracing aspects of steps 2 and 3 are almost instantaneous as they are single bounce and direct (zero bounce) simulations respectively.
  4. I had compared the results of this workflow with rtrace results and found them to be close enough.

Having said all, this I admit that this approach might not be the most accurate or efficacious. My intention was to document something that would address most of the above points without being overly complicated to explain. This approach was mostly inspired by the original DDS method and Five-Phase method. I investigated a slightly different approach (involving precise sun positions) during my doctoral research which @Mostapha and I implemented in Honeybee.

I did consider some version of the above steps, but did not get around to testing them. These steps would involve running two full fledged annual simulations. Step 3 (direct sun simulation) would still be needed to calculate metrics like ASE. However, it is possible that the results from the combined simulation might be closer to rtrace results than the approach mentioned in the tutorial.

I would suggest reviewing some the papers published by Eleonora Brembilla during her doctoral research for more details/comparisons on the different annual daylighting simulation methods that have been proposed over the years.


(PS: I have been out of the annual daylight simulation scene for almost three years, so my recollection of everything relating to above is pretty rusty).

Ok this is very clear! Thanks for helping me understand this!

Best regards,