using Tonatiuh / SolTrace for huge solar fields (GPGPU?)

509 views
Skip to first unread message

homer...@gmail.com

unread,
Feb 17, 2014, 7:48:32 AM2/17/14
to tonatiuh-...@googlegroups.com
Hello,

at the moment I am using SolTrace to simulate solar tower systems.
This works fine for small fields (~5000 Heliostats ) but it takes way too long to
simulate large heliostat fields (> 50000 small heliostas).

As the development of SolTrace seems to have stopped due to limited funds,
we are trying to figure out which way to go now.

Tonatiuh also uses multiple CPU threads for the raytracing, right?
So I guess the speed is about the same as in SolTrace. Have you done
some simulations to evaluate this?

I am looking into the possibility of using a powerful raytracing kernel like Luxrender,PovRay
or Radiance for this task, but I am not sure it this will work out.

A huge opportunity would be to use GPGPU (General Purpose Computation on Graphics Processing Unit)
with an interface like CUDA or OpenCL.
SolTrace is strictly limited to the CPU and I guess it will stay that way.
Is Tonatiuh already using the GPU or is it possible to implement this?

Any thoughts on this topic are very welcome.

Kind regard,
Walter

Manuel J. Blanco

unread,
Feb 17, 2014, 9:02:47 AM2/17/14
to tonatiuh-...@googlegroups.com, homer...@gmail.com
Dear Walter,

In the past, two to three years ago, we did compare SolTrace and Tonatiuh and Tonatiuh was always substantially faster. We have not done this comparison recently, however. 

Modelling a solar plant with a large number of heliostats using a generic ray tracing program is always challenging. Maintaining the flexibility of the program to simulate a large variety of solar concentrating systems, imposes limitations to the kind of optimizations that you will implement to simulate a specific type of system. In the current version of Tonatiuh one of the challenges in simulating very large heliostat fields is associated with the symbolic (tree-like) user interface, because the program will populate the tree with as many objects as heliostats, and any updating of that user interface will take a considerable amount time. Obviously, there are ways in which the problem of populating the symbolic user interface can be solved. But, currently it is not solved.

In regard to parallelization, Tonatiuh use the infrastructure for tha purpose provided by Qt. The current version of Tonatiuh detects how many cores you have in your computer and tries to use all of them to speed up the tracing of rays within the optical system. Tonatiuh is not using the GPU, but we have been entertaining the idea of making it capable of using it, as you say by using CUDA or the like.

Another idea that we are considering is to restructure Tonatiuh, so that we separate completely the kernel, which carries out the ray tracing, from any user interface related layer, so that then we can use the Tonatiuh kernel to develop specific programs to simulate in a very optimized way specific concentrating solar power systems. In this way we could, for instance, develop a Tonatiuh-based tool just for the simulation of solar tower systems, fully optimized for that purpose. Yet another alternative is to give the user options to tailor the behaviour of the program in order to optimize it, at any time, for the type of system she or he may be interested in simulating. We could allow for instance the user to decide if she or he wants Tonatiuh to trace the rays starting from the Sun or starting from the first reflection surfaces (e.g. the heliostats). 

In summary, I suggest that you give Tonatiuh a go in simulating solar towers with large heliostat fields, to see if it is faster than SolTrace, which I believe it is. Then, tell us the kind of new functionality that you would like to see in the program, and we will do our best to introduce such functionality in the next release of Tonatiuh.

Best regards,

homer...@gmail.com

unread,
Feb 18, 2014, 8:59:15 AM2/18/14
to tonatiuh-...@googlegroups.com, homer...@gmail.com

Dear Manuel,

thanks for the quick response.

I already tried Tonatiuh on the heliostat fields provided as example files and I came across the issue with the sluggish UI.
As you mentioned there are some solutions to that.

So far we are using a Matlab-wrapper for SolTrace, which mirrors all methods and properties of the SolTrace UI
and creates a script file. This script file can be run on SolTrace startup from the command line when Matlab
executes SolTrace.
I guess this is also possible with Tonatiuh's scripts, right?

Separating the raytracing kernel from Tonatiuh would make it easy to attach it to Matlab / R / ..., e.g. by
using xml-input that set parameters like output file, optics, scene without using the UI at all.

I was looking into some raytracers like LuxRender, POVRAY, Yafaray and Blender
but as far as I understand it is not possible to use them.
They shoot the rays from the user's point of view into the scene and make further simplifications
to find the light source.

As far as I understand a "path tracer" shoots rays into the scene from the user's point
of view, but these rays in fact have to reach the light source to be "valid".
This the opposite direction of what SolTrace and Tonatioh do, but maybe
it is possible to tweak a Monte-Carlo path tracer to fit our task.
Can't be that difficult just to flip the ray direction. :)

This is free software I found so far:

Embree (http://embree.github.io) is a fast path tracer for the CPU written by Intel, open source, cross-platform.
It is possible to add user defined surfaces like in Tonatiuh by providing the bounding box and the intersection
function.

But I still think using OpenCL with the option on GPU usage would be a better choice.
These are small examples of path tracers using OpenCL:

Very small example of a OpenCL path tracer
https://github.com/pklall/OpenCL-Pathtracer

http://www.luxrender.net/wiki/Luxrender_and_OpenCL
http://davibu.interfree.it/opencl/smallptgpu/smallptGPU.html

Kind regards,
Walter
Reply all
Reply to author
Forward
0 new messages