solstice

Compute collected power and efficiencies of a solar plant
git clone git://git.meso-star.com/solstice.git
Log | Files | Refs | README | LICENSE

README.md (11662B)


      1 # Solstice
      2 
      3 The purpose of this program is to compute the total power collected by a
      4 concentrated solar plant, and to evaluate various efficiencies for each primary
      5 reflector: it computes losses due to cosine effect, to shadowing and
      6 masking, to orientation and surface irregularities, to reflectivity, and to
      7 atmospheric transmission. The efficiency for each one of these effects is
      8 subsequently computed for each reflector, which provides insightful information
      9 when looking for the optimal design of a concentrated solar plant. Note that
     10 Solstice relies on Monte Carlo method, which means that every result is
     11 provided with its numerical accuracy.
     12 
     13 In addition to the computations listed above, Solstice can render an image of
     14 the solar plant, either with a simple ray-caster or with a path-tracing
     15 algorithm that correctly handles the materials of the scene.
     16 
     17 Solstice is designed to handle complex solar plants: any number of reflectors
     18 can be specified (planes, conics, cylindro-parabolic, etc.) and positioned in
     19 3D space, with a possibility for 1-axis and 2-axis auto-orientation with
     20 respect to the sun direction. CAD geometries can be added to the solar plant
     21 thanks to the support of the STereo Lithography file format. Multiple materials
     22 can be used, as long as the relevant physical properties are provided (matte,
     23 mirror, dielectric, etc.). Spectral effects are also taken into account: it is
     24 possible to define the spectral distribution of any physical property,
     25 including the input solar spectrum and the absorption of the atmosphere, at any
     26 spectral resolution.
     27 
     28 Solstice was developed as part of the Solstice project, in collaboration with
     29 the [Laboratory of Excellence Solstice](http://www.labex-solstice.fr) and the
     30 [PROMES](http://www.promes.cnrs.fr/) laboratory of the National Center for
     31 Scientific Research ([CNRS](http://www.cnrs.fr)). Starting in 2026, a new
     32 development effort funded by [Ademe](https://www.ademe.fr/) is ongoing.
     33 
     34 Refer to the solstice(1) man pages for more information on the available
     35 features.
     36 
     37 ## How to build
     38 
     39 This program, as part of the Solstice app, can be built on any x86-64 POSIX
     40 system.
     41 
     42 Note that you will most likely want to build the entire Solstice app rather than
     43 this library alone. If so, a good starting point is the dedicated
     44 [Solstice web page](https://www.meso-star.com/solstice/install.html).
     45 
     46 This program depends on the
     47 [LibYAML](http://pyyaml.org/wiki/LibYAML),
     48 [RSys](https://gitlab.com/vaplv/rsys/),
     49 [Solstice-Anim](https://gitlab.com/meso-star/solstice-anim/),
     50 [Solstice-Solver](https://gitlab.com/meso-star/solstice-solver/),
     51 [Star-3DUT](https://gitlab.com/meso-star/star-3dut/),
     52 [Star-SP](https://gitlab.com/meso-star/star-sp/) and
     53 [Star-STL](https://gitlab.com/meso-star/star-stm/) libraries.
     54 
     55 First ensure that the make utility and a compiler that implements the OpenMP 1.2
     56 specification are installed on your system. Then install the above
     57 prerequisites. Finally, edit the config.mk file to meet your needs and build
     58 the project by running:
     59 
     60     make clean install
     61 
     62 ## Release notes
     63 
     64 ### Version 0.11
     65 
     66 - Allow to define sun direction through location + time.
     67 
     68 - Add a command line option to set the sun direction algorithm.
     69   Either meeus or psa (default) at this stage.
     70 
     71 - Add a command line option to set the DNI.
     72   The sun's description in the input data already includes a mandatory dni
     73   value. The new option allow to supersede this dni value from the command line.
     74 
     75 ### Version 0.10
     76 
     77 #### Raise the minimum required versions of companion libs
     78 
     79 solstice-anim minimum version is now 0.3, while solstice-solver minimum version
     80 is now 0.10.
     81 
     82 #### Replace CMake with a POSIX Makefile
     83 
     84 The build procedure is now written in POSIX make and can be configured via
     85 the config.mk file. A pkg-config file is also provided to link the
     86 library as an external dependency.
     87 
     88 Compared to the CMake alternative, this Makefile adds support for static
     89 libraries and an uninstall target. It also enables compiler and linker
     90 flags for various hardening features, improving the security and
     91 robustness of generated binaries. More broadly, the motivation for this
     92 rewrite is to rely on a well-established standard with a simple feature
     93 set, available on all UNIX systems - reducing portability concerns and
     94 maintenance burden while remaining significantly lighter.
     95 
     96 #### Proof-reading and editing manual pages
     97 
     98 Write the man pages directly in mdoc's roff macros, instead of using the
     99 asciidoc markup language as a source for man pages.
    100 Unlike writing manuals with man's roff macros, and even more so with
    101 asciidoc, mdoc macros take care of layout, font handling and all the other
    102 typesetting details which, by construction, guarantee the consistency of
    103 all manuals without leaving the responsibility to the individual author.
    104 This also facilitates translation into other formats and documentation
    105 tools. These are the main reasons for writing manual pages with mdoc
    106 macros.
    107 A complete re-reading of the manual pages was carried out during the
    108 translation into mdoc, with several corrections and rewrites to make the
    109 manual clearer.
    110 
    111 #### Raise the minimum required version of dependencies
    112 
    113 Minimum required versions:
    114 - Rsys = 0.15
    115 - Star-3DUT = 0.4
    116 - Star-SP = 0.15
    117 - Star-STL = 0.7
    118 - libYAML = 0.2
    119 
    120 ### Version 0.9.1
    121 
    122 - Raise the minimum required CMake version to 3.1, as version 2.8 has been
    123   deprecated since CMake 3.20.
    124 - Raise the minimum required Star-SampPling to 0.12. This version fixes
    125   compilation errors with gcc 11 but introduces API breaks.
    126 
    127 ### Version 0.9
    128 
    129 Add the `-G` option that saves and restores the state of the random number
    130 generator. This option can be used to ensure the statistical independence
    131 between successive runs.
    132 
    133 ### Version 0.8.2
    134 
    135 - Fix man pages: the -D option of the solstice CLI was wrongly documented. The
    136   zenith and elevation angles were sometimes inverted.
    137 - Bump version of the StarSP dependency to 0.8.
    138 
    139 ### Version 0.8.1
    140 
    141 Fix the VTK of the receiver map: the receiver map was written as `double` while
    142 the type notified in the VTK file was `float`. This might produce errors on
    143 loading of the resulting VTK file. The VTK data type is now set to `double` to
    144 make it consistent with the type of the written values.
    145 
    146 ### Version 0.8
    147 
    148 Add the support of per-triangle absorbed flux density. The `per_primitive`
    149 attribute of the receiver file format controls which flux densities to output
    150 for each triangle of a receiver. Its value can be:
    151 
    152 - `NONE`: no per-triangle flux density is computed, i.e. no receiver map is
    153   output for the receiver. It was the behaviour of the previous version of
    154   Solstice when the `per_primitive` flag was undefined or was set to 0.
    155 - `INCOMING`: output the estimate of the per-triangle incoming flux density.
    156   It was the behaviour of the previous version of Solstice when the
    157   `per_primitive` flag was set to 1.
    158 - `ABSORBED`: output the estimate of the per-triangle absorbed flux density.
    159 - `INCOMING_AND_ABSORBED`: output both the estimates of incoming and absorbed
    160   flux density for each triangle of the receiver.
    161 
    162 ### Version 0.7.1
    163 
    164 - Replace the `roughness` parameter of the mirror material by the
    165   `slope_error` parameter.
    166 - Improve the documentation of the sun direction.
    167 - Ensure that the per-receiver results are sorted according to the order of the
    168   receivers as listed in the submitted receiver file.
    169 
    170 ### Version 0.7
    171 
    172 - Add the `gaussian` sun shape.
    173 - Add the `microfacet` attribute to the mirror material. It controls the normal
    174   distribution of the microfacets when the mirror roughness is not null. The
    175   supported distributions are `BECKMANN` and `PILLBOX`.
    176 
    177 ### Version 0.6.1
    178 
    179 - Fix the solstice-input man page. The `extinction` parameter of the medium and
    180   the atmosphere was named `absorption`.
    181 - Rename the pillbox `theta_max` parameter in `half_angle`.
    182 
    183 ### Version 0.6
    184 
    185 - Rename the `absorption` parameter of the medium and the atmosphere in
    186   `extinction`.
    187 - Add several global and per-receiver estimations. The outputs now fully
    188   describe the incoming and absorbed fluxes: overall flux, flux without
    189   material loss, flux without atmospheric loss, material losses and atmospheric
    190   losses.
    191 - Rename the pillbox `aperture` parameter in `theta_max`.
    192 - Fix the distribution of the pillbox sun: the pdf was wrong and its angular
    193   parameter was internally used as an angular diameter while it is an angular
    194   radius.
    195 - Fix the solver for non parallel sun: the angle between the principal sun
    196   direction and the sampled direction was not correctly taken into account
    197   leading to a wrong initial weight for the optical paths.
    198 - Fix the solver with shapes having perturbed normals: perturbed normals
    199   must be taken into account in the bounces of the optical paths only, not in
    200   the energy computations.
    201 
    202 ### Version 0.5
    203 
    204 Improve the performances of the solver up to 50% in situations where the
    205 radiative random walks bounce on many surfaces.
    206 
    207 ### Version 0.4.1
    208 
    209 - Update the name of the output data in the solstice-output man page.
    210 - Fix an issue in "dump geometry" mode, i.e. option `-g`. Solstice might fail
    211   to export the solar plant geometry due to a wrong constraint on the pivots.
    212 
    213 ### Version 0.4
    214 
    215 - Update the color of the paths output with the `-p` option. A path is blue,
    216   turquoise or yellow if it reaches a receiver, misses the receivers or is
    217   occluded before it reaches a primary reflector, respectively.
    218 - Add a new type of paths tracked with the `-p` option: a path is red if it
    219   travels unforeseen mediums.
    220 - Correctly handle the `stacks` parameter of the cylinder.
    221 
    222 ### Version 0.3
    223 
    224 - Fix several issues in the output results. Refer to the Solstice-Solver 0.3
    225   release notes for more informations.
    226 - Add the `--version` option.
    227 - Update the man pages to fix some issues and improve the output documentation.
    228 
    229 ### Version 0.2.3
    230 
    231 - Update the solstice-input file format. The anchor and entity name cannot
    232   contain spaces or tabulations anymore.
    233 - Fix the reported sun directions in the solstice-output. For each submitted
    234   sun direction, solstice correctly outputs its Cartesian coordinates but always
    235   wrote the azimuthal and elevation angles of the first direction.
    236 - Update the solstice-output map page: add the missing `<efficiency>` grammar
    237   rule and fix the definition of the `<map-side-data>` grammar rule.
    238 
    239 ### Version 0.2.2
    240 
    241 - Fix how the AsciiDoc tool suite is searched for on Windows; it was never found
    242   and consequently the documentation was not generated.
    243 
    244 ### Version 0.2.1
    245 
    246 - Fix the install target on Windows: copy the solstice runtime libraries in the
    247   solstice installation path.
    248 
    249 ### Version 0.2
    250 
    251 - Add the support of an optional normal map to the materials. It defines
    252   spatially varying normals in the tangent space of the surface. Currently,
    253   only the quadric surfaces are parameterizable: using a normal mapped material
    254   on the other shapes will produce unforeseen behaviors.
    255 - Add the support of spectral data to the materials: a material attribute can be
    256   either a scalar or follow a spectral distribution.
    257 - Add an optional atmospheric absorption after the first reflection of the light
    258   path; the sun description includes the atmospheric effect before the first
    259   reflector.
    260 - Write the man pages of the Solstice command line and its associated file
    261   formats.
    262 - Add the verbose option `-v`.
    263 - Update the output format of the simulation.
    264 
    265 ## License
    266 
    267 Copyright (C) 2018-2026 |Méso|Star> (<contact@meso-star.com>).
    268 Copyright (C) 2016-2018 CNRS.
    269 
    270 Solstice is free software released under the GPL v3+ license: GNU GPL version 3
    271 or later. You are welcome to redistribute it under certain conditions; refer to
    272 the COPYING file for details.
    273