htrdr 0.7.0 is available
- Build from sources: git
htrdr evaluates the intensity at any position (probe) of the
scene, in any direction, in the presence of surfaces and an absorbing
and diffusing semi-transparent medium, for both longwave radiation
sources (internal to the medium) and shortwave radiation sources
(external to the medium). The intensity is calculated using the
Monte-Carlo method: a number of optical paths are simulated backward,
from the probe position and into the medium. Various algorithms are used,
depending on the specificities of the nature and shape of the radiation
Applications are theoretically possible to any configuration. However, it
all eventually comes down to the possibility of using the physical data of
interest, in their most common formats, in each scientific community.
htrdr is currently suitable for two main application fields:
Atmospheric radiative transfer: the clear-sky atmosphere is vertically stratified, cloud thermodynamic data is provided on a regular 3D rectangular grid, and surface optical properties can be provided for an arbitrary number of materials. Internal radiation and solar radiation are taken into account.
Combustion processes: thermodynamic data is provided at the nodes of an unstructured tetrahedral mesh, while surface properties can still be provided for various materials. The radiation source is only external: a monochromatic laser sheet illuminates the inside of the combustion chamber for diagnostic purposes.
Since any observable radiative transfer is expressed as an integral of the intensity, and since there is a strict equivalence between the integral to be solved and the underlying Monte-Carlo algorithm (each integral results in the sampling of a random variable), the algorithms that calculate the radiance are used for computing various quantities:
Images on a camera sensor, in a given field of view. For combustion applications, only monochromatic images are supported. In atmospheres, both visible and infrared images are possible: CIE colorimetry is used for visible images, while and infrared image is in fact a brightness temperature map, obtained from the incoming radiative flux over the required spectral interval
Flux density maps, on a grid of sensors, integrated over an entire hemisphere. In the case of combustion chambers, only monochromatic flux maps can be calculated, while spectrally integrated flux density maps (both on the visible part of the spectrum and on the infrared) are possible for atmospheric applications.
htrdr is currently used, developped and extended in the
following research projects.
- In project ModRadUrb the emphasis is put on taking into account the representation of complex geometries (detailled city scenes) using spectral properties of a arbitrary number of materials. The solver was extended to solve upward and downward atmospheric fluxes at any level in the scene, both in the visible and the infrared spectral ranges.
- In project MCG-Rad the
htrdrcodebase is used to explore a whole new class of radiative transfer algorithms: instead of relying on the full atmospheric radiative properties data set (prerequisite for current algorithms), the so-called line sampling algorithms will not require nor compute the absorption coefficient of the atmosphere. Instead, it will sample energetic transitions and use a Line-by-Line parameters database (such as HITRAN) in order to perform a rigorous spectral integration, both in the visible and the infrared spectral ranges.
- In project Astoria,
htrdris used to produce images in the visible, in the presence of combustion chambers where radiation scattering is performed by soot aggregates. One of the main difficulty resides in the fact that the chamber is illuminated by a laser: the classical solar radiative transfer algorithm then fails to converge because of the collimated radiation source, and a new algorithm was thus designed in order to ensure numerical convergence.
A straight interface
htrdr is a command-line tool that performs computations
on input data, writes the rendered image and nothing more. No assumption is
made on how input data are created excepted that they have to follow the
expected file formats. In the same spirit, the output image is written in plain
text, as a list of raw pixel estimations, making easier the processing of its
This thin interface is, by nature, particularly well suited to be
extended and integrated into any workflow. For instance, one can
save the cloud properties used by htrdr-atmosphere directly in the
htcp file format or use the les2htcp tool to convert cloud properties
from NetCDF to
htcp. In the same way, the output image can be post-treated
through gnuplot or converted in a regular
PPM image by the htpp program, and then
visualised in an image viewer as for instance feh or display.
No pre-compiled version of
htrdr is provided; it must be
compiled directly from its source tree. A simple way is to rely on the
htrdr branch of the Star-Engine
project: it provides CMake scripts that automate the download, the compilation
and the installation of
htrdr and its dependencies. This build
procedure assumes the following prerequisites:
- CMake in version 3.5 or higher.
- git source control.
- GNU Compiler Collection in version 4.8 or higher.
- NetCDF library and headers in version 4 or higher.
- OpenMPI library and headers in version 2 or higher.
- Optionally, the AsciiDoc tool suite to generate the man pages of the reference documentation.
Assuming that the aforementioned prerequisites are available, the build procedure is summed up to:
~ $ git clone -b htrdr-0.7.0 \ https://gitlab.com/meso-star/star-engine.git htrdr-0.7.0 ~ $ mkdir htrdr-0.7.0/build ~ $ cd htrdr-0.7.0/build ~/htrdr-0.7.0/build $ cmake ../cmake ~/htrdr-0.7.0/build $ make
Tune the build
By default, the whole
htrdr project is built but you may prefer
htrdr only for a specific application, i.e. only for
atmospheric radiative transfer or combustion processes. In this case, only
activate the desired application during the CMake configuration step. For
example, to install only the atmospheric part of
~ $ git clone -b htrdr-0.7.0 \ https://gitlab.com/meso-star/star-engine.git htrdr-0.7.0 ~ $ mkdir htrdr-0.7.0/build ~ $ cd htrdr-0.7.0/build ~/htrdr-0.7.0/build $ cmake ../cmake \ -DHTRDR_BUILD_ATMOSPHERE=On \ -DHTRDR_BUILD_COMBUSTION=Off ~/htrdr-0.7.0/build $ make
Visit the Star-Engine git
htrdr for a complete description of the build
process and available options.
~ $ source ~/htrdr-0.7.0/local/etc/htrdr.profile ~ $ htrdr --help
htrdr is installed in the
htrdr-0.7.0. Source the provided
htrdr.profile file to register
htrdr against the
If the AsciiDoc tool suite was installed on
invocation, the reference documentation of the
program and its associated file formats should be available through man pages.
man command-line to consult them. For example:
~ $ man htrdr ~ $ man htrdr-atmosphere ~ $ man htrdr-combustion
Refer to the Starter Packs to quickly run a
htrdr rendering; these archives provide input data and scripts
that are good starting points to use
Once built, the
htrdr installation can be packaged in an
archive that can then be deployed on compatible systems, i.e. systems
whose C library, NetCDF library and MPI implementation are compatibles with the
ones available on the system used to build
~/htrdr-0.7.0/build $ make pkg ~/htrdr-0.7.0/build $ ls package/htrdr-0.7.0*
Adds the simulation of radiative transfer in combustion media
htrdr-combustion command performs radiative transfer computations in
a scene representing a semi-transparent medium enlightened by a laser sheet. It
uses Monte-Carlo to calculate a monochromatic image of the medium or the
radiative flux density. Both computations are performed in the visible at a
The medium data are defined on the vertices of an unstructured tetrahedral mesh that may be surrounded by a triangular surface mesh representing the inner limits of the combustion chamber.
htrdr command is renamed to
a proxy for the
htrdr-atmosphere command or the
htrdr with the
<atmosphere|combustion> options is equivalent to
directly calling the
- Major update of the entire codebase to add multiple applications to
htrdr: It was originally designed to handle atmospheric applications only.
- Always displays the number of processes and the number of threads: previously they were only printed on multi-node executions.
- Fixed auto intersection issue on surfaces not facing the sun.
- Fixed writing of pixel data: assumed pixel layout could be wrong.
- Fix the self-intersection issue in shortwave computations introduced by the 0.6 version.
- Add support of flux map computation for both shortwave and longwave. The flux
is computed for the part of the flux map lying outside any geometry. The new
command line option
-pdefines the rectangle in the scene onto which the flux is going to be integrated. The flux map resolution and the realisations count per pixel is controlled by the
- Add support of thin materials, i.e. materials without geometric thickness as for instance the leaves of the trees.
- Add the temperature property to the materials and used it as the limit condition during longwave computations. Previously, the surface temperatures were fetched from the atmosphere at the given surface position.
- Add the
-noption to fix the name of the material defining the atmosphere.
- In shortwave, fix how direct contribution is handled for purely specular BRDF.
- Fix the
undefined strtok_r symbolissue exhibited by some GCC versions that leads to memory corruption and segmentation fault when parsing the ground interfaces.
- Fix typos in the man pages.
Add support of shortwave integration with respect to the Planck function for a reference temperature whose default value is the blackbody temperature of the sun. Actually this is the counterpart of the longwave integration introduced by the "infrared rendering" in the 0.4 version. The main difference is that the source of radiation is the sun rather than the medium and its boundaries.
-l that enabled the infrared rendering is now replaced by the new
-s option that controls the spectral integration that can be CIE XYZ (i.e.
regular image rendering), longwave or shortwave.
- Fix the returned sun radiance: the precomputed per spectral band solar incoming flux is removed and the sun radiance is now retrieved by directly evaluating the monochromatic Planck for the blackbody temperature of the sun.
- Fix CIE XYZ spectral integration: the pdf used to sample the CIE tristimulus values was not correctly handled in the Monte-Carlo weight.
- Fix the longwave spectral integration: the Monte-Carlo weight was wrong leading to overestimated temperatures.
- Add support of infrared rendering: when defined, the new
-loption setups the range of longwave into which the rendering is performed. In infrared rendering, each pixel stores the radiance per pixel and its associated brightness temperature. Spectral integration is done with respect to the Planck function for a reference temperature of 290 K.
- The ground geometry can now have several materials whose data vary over the
spectrum. These materials are listed in a new
file where each materials is defined by a name and a file storing its spectral
data with respect to the
fileformat. A material is mapped to a part of the OBJ geometry by using the
usemtldirective of the OBJ fileformat.
- Improve the sampling of the spectral dimension: the per wavelength realisation is now precisely sampled rather than arbitrarly fixed to the center of the sampled spectral band. Consequently, high resolution data defined per wavelength (e.g. Mie's properties and the reflectivity of the materials) are now fully taken into account.
- Fix a deadlock when
htrdrwas run through MPI.
- Fix a memory leak: the output file was not closed on exit.
- Add the
-Ooption that defines the file where the sky data are cached. If the file does not exist, the sky data structures are built from scratch and serialized into this new file. If this file exists, these data structures are directly read from it, leading to a huge speed up of the
htrdrpre-processing step. Note that if the provided file exists but is filled with data that do not match the submitted HTGOP, HTCP and HTMie files, an error is detected and the program stops.
- Rely on the HTSky library to manage the sky data. This library handles the
code previously defined into the
htrdr_sky.<c|h>files. The HTCP, HTGOP, HTMie libraries are thus no more dependencies of
htrdrsince only the
htrdr_skyfiles used them.
- Add the
-boption that controls the BRDF of the ground geometry.
- Make optional the use of a ground geometry (option
- Make optional the definition of the optical properties of water droplets
-m) when no cloud field is used.
- Add the
-Voption that fixes the maximum definition of the octrees used to partitioned the radiative properties of the clouds.
- Add a per pixel estimation of the per radiative path computation time.
- Fix the computation of the surface scattering: there was a bug in how Russian roulette was implemented at surface scattering leading to an underestimation of the surface reflection.
- Update the thread allocation policy: by default, the number of threads is now
defined as the maximum between the number of processors detected by OpenMP
and the number of threads defined by the
OMP_NUM_THREADSenvironment variable. This variable can be used to counteract the number of processors detected by OpenMP that can be lower than the real number of processors of the system.
- Fix compilation on systems with a GNU C Library whose version is less than 2.19.
- Fix a possible invalid memory access to cloud data leading to segmentation faults.
Copyright © 2018, 2019, 2020, 2021 |Meso|Star>.
Copyright © 2018, 2019, 2021 CNRS.
Copyright © 2018, 2019 Université Paul Sabatier.
htrdr is free software released under the GPL v3+ license: GNU GPL version 3 or
later. You are welcome to redistribute it under certain conditions; refer to
the COPYING file for details.