{'fraction_non_alphanumeric': 0.03001517621269181, 'fraction_numerical': 0.008543645663537745, 'mean_word_length': 4.726424203411651, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SOLFAST, a Ray-Tracing Monte-Carlo software for solar concentrating facilities

In this communication, the software SOLFAST is presented. It is a simulation tool based on the Monte-Carlo method and accelerated Ray-Tracing techniques to evaluate efficiently the energy flux in concentrated solar installations.


Introduction
According to the International Energy Agency, the world production of electricity by concentrating solar power (CSP) could reach 10% by 2050. That is as much as the solar photovoltaic (PV) or the nuclear industry. Compared to other renewable energy (particularly wind power and PV), the CSP technology has the advantage of adapting electricity production compared to the demand even at night, thanks to the possibility of storage of the heat for several hours before electricity production by thermodynamic cycles. However the cost of installation is still very high compared to other renewable technologies. This high cost is mainly due to the optical concentration system either linear concentrators (parabolic trough, Fresnel) or punctual concentrators (tower, beam-down) compared to the cost of the thermodynamic processes facilities (steam turbines and heat storage). From a technological point of view, the whole thermodynamic process for electricity generation benefits from the experience of existing power plants (thermal or nuclear). Thus reducing the cost of installing a CSP plant will be primarily by optimizing the optical system (receiver, heliostat field, tower). One difficulty is that the design of optical system is unique for a particular facility. Indeed it must be adapted to the latitude, the ground topology and the solar resource. Given the peculiarity of the optical system, CSP plants design and optimization require high-performance computer codes that can efficiently simulate different configurations of systems with complex geometries with thousands of heliostats themselves composed of several mirrors. In terms of modelling to assist in the design of CSP plants there are two types of tools: codes for predicting the radiative flux at the entrance of solar receiver (optical codes) and on the other hand codes to model the whole process to generate electricity ("process" codes). These can be coupled to optical codes or use simple models to predict the radiative flux as boundary condition of the process model. In this paper, we present an algorithm implemented in the Solfast (SOLar FAcilities Simulation Tools) software developed in partnership by HPC-SA and PROMES-CNRS laboratory. Solfast aims to calculate maps of directional solar flux to design or to characterize solar concentration facilities by considering the reflective properties of mirrors. Other Ray-Tracing solvers exist [1] and among them Soltrace [2] and Tonatiuh [3] are freely available and well documented. However these two solvers use collision-based Monte-Carlo algorithms that follow the bundles of ray from the source to the receiver. A first drawback is that the source modelling leads to lose many bundles that do not impact reflective surfaces. A second drawback is that it uses bundles with identical Monte-Carlo weights with russian roulettes causing supplementary bundle losses. These drawbacks slow down Monte-Carlo algorithm convergence. In this article, we present a Monte-Carlo (MC) algorithm which uses an integral formulation with variance reduction techniques to overcome the drawbacks of collision-based Ray-Tracing solvers described previously. Sec. 2 presents the Monte-Carlo algorithm implemented in Solfast. The employed methodology is particularly suitable to solve the radiative transfer equation in complex geometries such as optical system in the concentrated solar processess [4]. Sec. 3 presents the features enabled in Solfast and the graphical interface which allows users to design a solar facility optical system. Sec. 4 presents some academic test cases and a more realistic complex geometry to validate the gain in performance of our Monte-Carlo integral formulation.

Monte-Carlo Ray-Tracing model
The Monte-Carlo Ray-Tracing (MCRT) model implemented in the Solfast software includes (1) the reflection events involved in a solar concentrating system having a complex geometry and (2) techniques to increase the speed of the MCRT algorithm. The first point is addressed by using an interface able to manage tessellated complex geometry where reflection events are simulated with a bi-directional reflection distribution function (BRDF). The second point is addressed by reformulating the integral and by using a variance reduction technique and a fast intersector (RayBooster technology [5]).
The aim of the computation is to predict the concentrated solar flux spatial distribution incident on virtual surfaces located anywhere in the scene, e.g. at the receiver entrance as shown in the sketch of a solar concentrating system depicted in Fig.1. Three types of surfaces are considered in Solfast: two reflecting surfaces i.e. heliostats H and concentrators C, and one virtual surface V where radiative power density is computed. Each surface has two sides, denoted by a plus or minus sign, for which separate optical properties can be specified. The virtual surface V is discretized in surface elements that are called hereafter pixels. The concentrated radiant solar flux P (in W atts) incident on an arbitrary pixel of the virtual surface V + is expressed by the following integral: with the sun intensity related to the Direct Normal Irradiance (DNI) by: DNI= νmax ν min dν ∆Ωsun dω 0 I sun (ω 0 , ν)|ω 0 · n 0 |. This integral expression for P assumes a specific formulation of the problem [6,4] by considering (after the integral over the frequencies) an integral over the surface H + which represents the reflecting surface involved in the first reflection. The general principle of the MCRT algorithm highlighted by this formulation is to first sample the H + surface for the first reflection location, then the direction of the incident radiation can be sampled and the Ray-Tracing of the reflected bundle of ray can begin. The presented equations include tests whose symbol is The test in Eq.(1) is related to the position of the bundle source with location r 0 and direction ω 0 . The test ensures that there is no shadowing by any geometry element and the Ray-Tracing can begin with the recurrence term I i dealing with the multiple reflections: The Figure 2 shows a representation of directions and angles. The recurrence term includes the reciprocal and conservative BRDF, ρ , and represents the Ray-Tracing of the bundle with multiple reflections. The equation Eq.(2) involves two tests: • H(r i+1 ∈ V + ) means that if the location of the next intersection is contained in the pixel surface, then H = 1 and the realization of the Monte-Carlo weigth is stored. • H(r i+1 ∈ {H + ∪ C + }) means that if the next intersection is located on a reflective surface, another Eq.(2) should be computed to account for another intersection.
It should be noted that if the ray is neither reflected nor impacted on the pixel, the ray is lost.  The MCRT model is used to evaluate the integral P (Eq. (1)) and with the Monte-Carlo model the quantity P is considered as the mean of a random variable W P : P = E[W P ]. An approximation is used to compute a finite (but large) number N of realizations w P,k of W P : This radiative flux is computed for each pixel to obtain a spatial distribution of the radiative flux. Furthermore, with each evaluation of P , a standard deviation is associated σ e P to each estimate of P and can be approximated by a statistical uncertainty σ e P : The MCRT algorithm is used to compute P and σ e P for each pixel. The Monte-Carlo model allows one to use probability density functions (PDF) in order to improve convergence and reduce the variance. Dropping the frequency integral, assuming a microfacet model (distribution of facet normals) with specular reflection and introducing the PDF and the Monte-Carlo weight, equations Eqs.(1)-(2) become: with the Monte-Carlo weight with the specular direction defined by ω spec = ω i−1 −2(ω i−1 ·n)n, and the following expressions for the PDFs: with θ sun the apparent radius of the sun. Several PDFs can be chosen to sample α. In Solfast, three distributions are available i.e. the gaussian Eq.(11), circular normal Eq.(12) and uniform Eq.(13). The α domain is truncated to the value of α max = π 4 − cos −1 (|ω i · n|)/2 to prevent any reflection below the mirror surface.
With the presented expressions for the PDFs, the MCRT algorithm proceeds with the computation of the cumulatives which allow to randomly sample their related variable. The Monte-Carlo integral formulation can be directly interpreted as the algorithm below: Uniform sampling of r 0 on H + ; Sampling of ω 0 on solar disk ; if No shadowing between sun and r 0 then w P = DN I |n(r 1 ) · ω 0 | H + ; r i = r 0 ; elseŵ P = 0; break; end while r i ∈ H + ∪ C + dô w P =ŵ P · ρ; sampling α and β to generate n h ; specular reflection ω i = ω i + 2|n h · ω i |n h ; r i = Intersection of Ray(r i , ω i ) with geometry element; end if r i ∈ V + theñ P =P +ŵ P end end P = 1 NP ;

Solfast features
In this section, we present briefly the Solfast features and some graphical interface elements which allow user to design the system to simulate. The optical system elements can be classified in four categories : the emitter, the reflectors, the receivers and the occulting objects. These elements except the occulting objects can be chosen in the Solfast library by a simple drag-anddrop action. When an element is placed, a double-click on it brings up a specific graphical user interface to parametrize the object.

the emitters
Three types of source are available in Solfast : a sun-like emitter, a parallel emitter and a point emitter. The emission intensity of the three emitters is characterized by the Direct Normal Irradiance (DNI) which is defined by the irradiance measured (in W.m −2 ) with a surface element perpendicular to the emitter direction.

sun-like emitter
The sun-like emitter is modelized by a pill-box with an apparent diameter (9.3 mrad by default). The emitter direction can be indicated by vector components or by the zenith and azimuth angles. The NREL solar position algorithm [7] is also implemented to get the sun direction in function of the date and the geographical positions.

parallel emitter The parallel emitter is characterized by the direction of incident rays.
To measure DNI, the surface element must be perpendicular to this direction.

point emitter
The point emitter is characterized by its position. To measure DNI, the surface element normal vector must be pointed toward the emitter position.

the reflectors
Two types of reflectors are available in the library: the simple reflector and the patched reflector. This last can be considered as a group of simple reflectors. Many menus in the reflector interface allow the user to place the object at a given position, to determine the surface type (the generic quadratic surface is implemented) and the aperture (any polygonal aperture), to choose a pointing direction ('manually' fixed or source tracking) and to parametrize different noises. Among noises we focus on the BRDF model choices which modelizes the specularity defects of the reflecting surface. The defects are represented by a microfacets distribution model [8]. Three distributions have been implemented : • the gaussian α which consists to sample the angle α between the theoretical normal vector and the microfacet normal vector with a truncated gaussian distribution. • the circular normal distribution [9] which is implemented in Tonatiuh [3] software for the surface slope error. • the uniform distribution which also implemented in Tonatiuh.
Another important reflector parameter which is the 'primary' reflector setting. For example, for the Odeillo solar furnace, only the heliostat field mirrors are considered as primary reflectors and not the big parabola. This is an advantage of the Monte-Carlo integral formulation presented in Sec. 2 which allows to get an efficient algorithm because only rays reflected on primary reflectors are generated. No rays which can touch directly the ground are sampled.

the receivers
The user can chose two types of receivers: simple receivers and directional receivers. The simple receivers are used to get a flux map. They are parametrized by the size and a number of pixels. The directional receivers are similar but with a directional information about the incident energy. Thus the parametrization of directional discretization is also required. Receivers produce the output results of a simulation including the standard deviation. These results can be visualized on a PNG picture and written in a ASCII file.

the occulting objects
The occulting objects are completely absorbing (no reflection or diffuse reflection). These objects can be imported from a Sketchup model. This is for example the building of the Odeillo solar furnace. The only parameters of an occulting object are its position and orientation.
3.5. the solver When the optical system is designed, the Ray-Tracing Monte-Carlo simulation can be run from the solver interface. The number of sampled rays must be indicated. The computing performance of Solfast comes from the Monte-Carlo integral formulation and the techniques to accelerate Ray-Tracing (RayBooster technology).

Validations and test cases
Two preliminary test cases are presented and compared with two other softwares: Soltrace [2] developed by the NREL and Tonatiuh [3] developed by the CENER. The cases include two simplified geometries: the Eurodish parabolic dish receiver and the LS-2 parabolic trough collector. For the validation cases a DNI of 1000 W.m −2 was considered with a pill-box sunshape of 9.3 mrad full width. The material properties of reflectors are set with the Gaussian sigma slope error model in Soltrace and the normal sigma slope error model in Tonatiuh. These two BRDF models give similar results [3]. In Solfast the material properties settings are slightly different (cf. 3.2): BRDF models are implemented with different choices of microfacets distributions.
To be compatible between the sigma slope error models of Soltrace and Tonatiuh, the chosen microfacets distribution was the circular normal distribution in both cases (Eq.(12)). We present also a more complex system which is a simplified but realistic representation of the THEMIS solar plant. This last example shows the benefits in term of convergence of the Monte-Carlo integral formulation implemented in Solfast compared with the collision-based Monte-Carlo algorithm of both Soltrace and Tonatiuh. Figures 3 and 4 represent respectively a screenshot of the Solfast interface showing the simplified Eurodish parabolic receiver geometry and the profiles of the radial distributions of photons obtained by Solfast and Tonatiuh. This study was presented in fig. 5 of [3] to compare Tonatiuh to Soltrace. The present comparison shows a very good agreement between the results of Solfast and Tonatiuh algorithms with a maximum relative difference less than 5%. Figure 5 represents a screenshot of the Solfast interface where the simplified LS-2 parabolic trough is designed. It is composed of 20 cylindro-parabolic mirrors. Figure 6 represents the mean flux density profile obtained by Solfast and Soltrace. The flux density was averaged along the main axis of the trough. A good agreement between the results is also observed. Two results are shown for Solfast: a real-time preview simulation obtained with 10 4 rays in less than 0.1 sec computational time and an accurate result obtained with 10 7 rays in 23.5 sec on an Intel Core

Discussion about efficiency of Monte-Carlo integral formulations
To highlight the importance of the Monte-Carlo integral formulation a comparison was done between Tonatiuh (version 1.2.5), Soltrace (version 2011.7.5) and Solfast for a simplified representation of THEMIS (see Fig. 7). Each of the 115 heliostats is composed with a single 7.5 m × 7.5 m square mirror. The reflectivity is set to 0.94 and the reflection is specular (no slope or specularity errors). The simulation was done for the March 21 th at solar noon. The figures 8 and 9 present respectively the flux received by the target and the Monte-Carlo

Computation time
As the ultimate performance measurement is running time, they were measured on an Intel Core i7 Q720 both for a given number of rays (10 6 ) and for a given standard deviation target (500 W) using the simplified THEMIS model introduced above (Figs. 10 and 11). As a result Solfast takes benefit from using the RayBooster technology for Ray-Tracing computations [5] (Fig. 10), and the gap between Solfast and Tonatiuh or Soltrace is enlarged when the comparison criteria is the running time required to achieve a given accuracy (Fig. 11) .

Conclusion and future work
Solfast is a new software for optical simulation of solar concentrating systems with a greater efficiency than the state of the art software Soltrace and Tonatiuh. This is due to the use of Monte-Carlo integral formulation instead of collision based formulation which requires more calculation to provide the same quality of results. Another advantage of the Monte-Carlo integral   . Computation time in sec. needed to reach a 500 W standard deviation target formulation is the ability to estimate systematically for a negligible computational cost the sensitivity of any physical quantity to some parameters reusing the flux ray paths [10,11]. This, in conjunction with the RayBooster high performance Ray-Tracing library, will enable effective analysis and optimization of complex models on mainstream computers.