htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit 38078e74ccc1bf4d221d3a5e3b4279edf4237a69
parent 49f03715f51138c3a3264ea0ad9bfdc707e401ec
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon,  9 Oct 2023 16:37:08 +0200

Move mdoc manpages to doc subdirectory

Delete scdoc version of man pages

Diffstat:
MMakefile | 44++++++++++++++++++++++----------------------
Rhtrdr-atmosphere.1.in -> doc/htrdr-atmosphere.1.in | 0
Ddoc/htrdr-atmosphere.1.scd.in | 508-------------------------------------------------------------------------------
Rhtrdr-combustion.1.in -> doc/htrdr-combustion.1.in | 0
Ddoc/htrdr-combustion.1.scd.in | 461-------------------------------------------------------------------------------
Rhtrdr-image.5 -> doc/htrdr-image.5 | 0
Ddoc/htrdr-image.5.scd | 124-------------------------------------------------------------------------------
Rhtrdr-materials.5 -> doc/htrdr-materials.5 | 0
Ddoc/htrdr-materials.5.scd | 76----------------------------------------------------------------------------
Rhtrdr-obj.5 -> doc/htrdr-obj.5 | 0
Ddoc/htrdr-obj.5.scd | 103-------------------------------------------------------------------------------
Rhtrdr-planeto.1.in -> doc/htrdr-planeto.1.in | 0
Ddoc/htrdr-planeto.1.scd.in | 441-------------------------------------------------------------------------------
Adoc/htrdr.1 | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddoc/htrdr.1.scd | 88-------------------------------------------------------------------------------
Rrnrl.5 -> doc/rnrl.5 | 0
Ddoc/rnrl.5.scd | 82-------------------------------------------------------------------------------
Dhtrdr.1 | 75---------------------------------------------------------------------------
18 files changed, 107 insertions(+), 1980 deletions(-)

diff --git a/Makefile b/Makefile @@ -558,9 +558,9 @@ distclean_planeto: clean_planeto ################################################################################ # Man pages ################################################################################ -man: htrdr-atmosphere.1 htrdr-combustion.1 htrdr-planeto.1 +man: doc/htrdr-atmosphere.1 doc/htrdr-combustion.1 doc/htrdr-planeto.1 -htrdr-atmosphere.1: htrdr-atmosphere.1.in +doc/htrdr-atmosphere.1: doc/htrdr-atmosphere.1.in sed -e 's/@HTRDR_ATMOSPHERE_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD@/$(HTRDR_ATMOSPHERE_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD)/g' \ -e 's/@HTRDR_ATMOSPHERE_ARGS_DEFAULT_SKY_MTL_NAME@/$(HTRDR_ATMOSPHERE_ARGS_DEFAULT_SKY_MTL_NAME)/g' \ -e 's/@HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN@/$(HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN)/g' \ @@ -580,7 +580,7 @@ htrdr-atmosphere.1: htrdr-atmosphere.1.in -e 's/@HTRDR_ARGS_DEFAULT_RECTANGLE_SZ@/$(HTRDR_ARGS_DEFAULT_RECTANGLE_SZ)/g'\ $@.in > $@ -htrdr-combustion.1: htrdr-combustion.1.in +doc/htrdr-combustion.1: doc/htrdr-combustion.1.in sed -e 's/@HTRDR_COMBUSTION_ARGS_DEFAULT_LASER_FLUX_DENSITY@/$(HTRDR_COMBUSTION_ARGS_DEFAULT_LASER_FLUX_DENSITY)/g' \ -e 's/@HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_DIMENSION@/$(HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_DIMENSION)/g' \ -e 's/@HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_PREFACTOR@/$(HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_PREFACTOR)/g' \ @@ -604,7 +604,7 @@ htrdr-combustion.1: htrdr-combustion.1.in -e 's/@HTRDR_ARGS_DEFAULT_RECTANGLE_SZ@/$(HTRDR_ARGS_DEFAULT_RECTANGLE_SZ)/g'\ $@.in > $@ -htrdr-planeto.1: htrdr-planeto.1.in +doc/htrdr-planeto.1: doc/htrdr-planeto.1.in sed -e 's/@HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN@/$(HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN)/g' \ -e 's/@HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MAX@/$(HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MAX)/g' \ -e 's/@HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOCAL_DST@/$(HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOCAL_DST)/g' \ @@ -621,7 +621,7 @@ htrdr-planeto.1: htrdr-planeto.1.in $@.in > $@ clean_man: - rm -f htrdr-atmosphere.1 htrdr-combustion.1 htrdr-planeto.1 + rm -f doc/htrdr-atmosphere.1 doc/htrdr-combustion.1 doc/htrdr-planeto.1 ################################################################################ # Installation @@ -634,17 +634,17 @@ install: all @if [ "$(LIB_TYPE)" = "SHARED" ]; then \ $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib" $(CORE_LIBNAME_SHARED); fi @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/doc/htrdr" COPYING README.md - @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" htrdr.1 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/htrdr.1 @if [ "$(ATMOSPHERE)" = "ENABLE" ]; then \ - $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" htrdr-atmosphere.1; fi + $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/htrdr-atmosphere.1; fi @if [ "$(COMBUSTION)" = "ENABLE" ]; then \ - $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" htrdr-combustion.1; fi + $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/htrdr-combustion.1; fi @if [ "$(PLANETO)" = "ENABLE" ]; then \ - $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" htrdr-planeto.1; fi - @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" htrdr-image.5 - @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" htrdr-materials.5 - @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" htrdr-obj.5 - @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" rnrl.5 + $(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man1" doc/htrdr-planeto.1; fi + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/htrdr-image.5 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/htrdr-materials.5 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/htrdr-obj.5 + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/man/man5" doc/rnrl.5 uninstall: rm -f "$(DESTDIR)$(PREFIX)/bin/htrdr" @@ -688,13 +688,13 @@ distclean:\ distclean_core\ clean_man -lint: htrdr-atmosphere.1 htrdr-combustion.1 htrdr-planeto.1 +lint: doc/htrdr-atmosphere.1 doc/htrdr-combustion.1 doc/htrdr-planeto.1 shellcheck -o all make.sh - mandoc -Tlint -Wall htrdr.1 || [ $$? -le 1 ] - mandoc -Tlint -Wall htrdr-atmosphere.1 || [ $$? -le 1 ] - mandoc -Tlint -Wall htrdr-combustion.1 || [ $$? -le 1 ] - mandoc -Tlint -Wall htrdr-planeto.1 || [ $$? -le 1 ] - mandoc -Tlint -Wall htrdr-image.5 || [ $$? -le 1 ] - mandoc -Tlint -Wall htrdr-materials.5 || [ $$? -le 1 ] - mandoc -Tlint -Wall htrdr-obj.5 || [ $$? -le 1 ] - mandoc -Tlint -Wall rnrl.5 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr.1 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr-atmosphere.1 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr-combustion.1 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr-planeto.1 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr-image.5 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr-materials.5 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/htrdr-obj.5 || [ $$? -le 1 ] + mandoc -Tlint -Wall doc/rnrl.5 || [ $$? -le 1 ] diff --git a/htrdr-atmosphere.1.in b/doc/htrdr-atmosphere.1.in diff --git a/doc/htrdr-atmosphere.1.scd.in b/doc/htrdr-atmosphere.1.scd.in @@ -1,508 +0,0 @@ -htrdr-atmosphere(1) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -htrdr-atmosphere - simulate radiative transfer in cloudy atmospheres - -# SYNOPSIS - -htrdr-atmosphere [_option_]... -a _atmosphere_ - -# DESCRIPTION - -*htrdr-atmosphere* simulates radiative transfer in scenes composed of an -atmospheric gas mixture, liquid clouds, and a ground. It evaluates the intensity -incoming on each pixel of the sensor array. The underlying algorithm is based on -a Monte-Carlo method: it consists in simulating a given number of optical paths -originating from the sensor, directed into the atmosphere, taking into account -light absorption and scattering phenomena. This algorithm and the way it is -efficiently implemented in *htrdr-atmosphere* is presented in the following -article: "A path-tracing Monte Carlo library for 3-D radiative transfer in -highly resolved cloudy atmospheres", N. Villefranque et al, JAMES 2019 [1]. - -Radiative transfer can be evaluated in any part of the spectrum. It uses -k distributions that should be provided for the pressure and temperature -atmospheric vertical profile [2] (*-a* _atmosphere_), the liquid water content -in suspension within the clouds stored in a *htcp*(5) file (*-c* _clouds_), and -the optical properties of water droplets that have been obtained from a Mie code -and formatted according to the *htmie*(5) file format (*-m* _mie_). The user -also has to set the position of the sun (*-D* _azimuth_,_elevation_), the sensor -type (*-C* _camera_ or *-p* _rectangle_) and its definition (*-i* _image_). It -is also possible to provide an *htrdr-obj*(5) file representing the ground -geometry (*-g* _ground_) whose materials are listed in the *htrdr-material*(5) -file provided through the *-M* option. Both, the clouds and ground, can be -infinitely repeated along the X and Y axis by setting the *-r* and the *-R* -options, respectively. - -Four types of sensor are supported by *htrdr-atmosphere*. The pinhole and thin -lens camera (*-C* _camera_) are used to render an image of the scene from the -given point of view. The orthographic camera (*-P* _camera_) render the scene -with a parallel projection rather than a perspective projection. Finally, the -rectangle sensor (*-p* _rectangle_) is used to compute a flux map. - -Spectral dimension can be integrated in many ways (*-s* option). When rendering -an image (*-C* _camera_), the computation is by default performed for the -visible part of the spectrum in [380, 780] nanometers, for the three components -of the CIE 1931 XYZ colorimetric space that are subsequently recombined in -order to obtain the final color for each pixel, and finally the whole image of -the scene as seen from the set observation position. The two other ways consist -in explicitly defining the longwave or shortwave spectral range to handle and -continuously sampling a wavelength in this range. Actually longwave and -shortwave are keywords that mean that the source of radiation is whether -internal or external to the medium, respectively. In shortwave rendering, only -the pixel radiance is evaluated and stored in the output image. For longwave -rendering this estimated radiance is then converted to its brightness -temperature and both are saved in the image. When computing a flux map (*-p* -_rectangle_), the per pixel flux is saved into the output map whether spectral -domain is longwave or shortwave. - -In *htrdr-atmosphere* the spatial unit 1.0 corresponds to one meter and the -temperatures are expressed in Kelvin. The estimated radiances are given in -W/sr/m² excepted for monochromatic computations where the computed spectral -radiance is defined in W/sr/m²/nm. The flux densities are saved in W/m². The -results are written to the output file if the *-o* option is defined and the -standard output otherwise. The output image is a list of raw ASCII data -formatted with respect to the *htrdr-image*(5) file format. - -*htrdr-atmosphere* supports shared memory parallelism and relies on the Message -Passing Interface specification [4] to parallelise its computations in a -distributed memory environment; it can thus be run either directly or through a -MPI process launcher like *mpirun*(1). - -# OPTIONS - -*-a* _atmosphere_ - Path toward the file containing the gas optical properties of the atmosphere. - Data must be formatted according to the fileformat described in [2]. - -*-c* _clouds_ - Submit a *htcp*(5) file describing the properties of the clouds. If not - defined, only the atmosphere properties submitted through the *-a* option - are taken into account. - -*-C* <_camera-parameter_:...> - Define a perspective camera. Available parameters are: - - *focal-dst*=_dst_ - Distance to focus on with a thin lens camera, that is, a camera whose - *lens-radius* is not zero. The default focal distance is - @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOCAL_DST@ meter. - - *focal-length*=_length_ - Focal length of a camera lens. It is another way to control the field of - view of a thin lens camera. By default, the field of view is directly set - through the *fov* parameter. - - *fov*=_angle_ - Vertical field of view of the camera in - \]@HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN@, - @HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MAX@\[ degrees. By - default _angle_ is set to - @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOV@ degrees. - - *lens-radius*=_radius_ - Radius of the camera lens. A non-zero radius means that the camera is a thin - lens camera while a zero radius defines a pinhole camera. By default the - lens radius is @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_LENS_RADIUS@. - - *pos*=_x_,_y_,_z_ - Camera lens position. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_UP@}. - -*-D* <_azimuth_,_elevation_> - Direction toward the sun center. The direction is defined by two angles in - degrees: the _azimuth_ angle in [0, 360[ and the _elevation_ angle in [0, - 90]. Following the right-handed convention, the azimuthal rotation is - counter-clockwise, with 0 degree on the X axis. The elevation starts from 0 - degree for a direction in the XY plane, up to 90 degrees at zenith. Thus - *-D* _0_,_0_ *-D* _90_,_0_ -*D* _180_,_0_ and *-D* _270_,_0_ will produce solar - vectors {+1,0,0} {0,+1,0} {-1,0,0} and {0,-1,0} respectively, while - *-D* _azimuth_,_90_ will produce {0,0,+1} regardless of _azimuth_ value. - -*-d* - Write in _output_ the space partitioning data structures used to speed up - the radiative transfer computations in the clouds. The written data are - octrees saved in the VTK file format [3]. Each octree node stores the minimum - and the maximum of the extinction coefficients of the cloud cells overlapped - by the octree node. In the _output_ file, each octree is separated from the - previous one by a line with three minus characters, i.e. '---'. - -*-f* - Force overwrite of the _output_ file. - -*-g* _ground_ - Path toward a *htrdr-obj*(5) representing the ground geometry. - -*-h* - List short help and exit. - -*-i* <_image-parameter_:...> - Define the sensor array. Available image parameters are: - - *def*=<_width_>x<_height_> - Definition of the image. By default the image definition is - @HTRDR_ARGS_DEFAULT_IMG_WIDTH@x@HTRDR_ARGS_DEFAULT_IMG_HEIGHT@. - - *spp*=_samples-count_ - Number of samples per pixel estimation. In regular image rendering, a pixel - will use "3 \* _samples-count_" Monte-Carlo realisations, one set of - _samples-count_ realisations for each X, Y and Z component of the CIE 1931 - XYZ color space. In shortwave/longwave rendering or flux computation, only - one set of _samples-count_ is used. By default, *spp* is set to - @HTRDR_ARGS_DEFAULT_IMG_SPP@. - -*-R* - Infinitely repeat the _ground_ along the X and Y axis. - -*-r* - Infinitely repeat the _clouds_ along the X and Y axis. - -*-M* _materials_ - Path toward a *htrdr-materials*(5) file listing the ground materials. - -*-m* _mie_ - Path toward a *htmie*(5) file defining the optical properties of water - droplets. - -*-n* _sky-mtl_ - Name of the material representing the sky in the *htrdr-materials*(5) file. - By default, _sky-mtl_ is @HTRDR_ATMOSPHERE_ARGS_DEFAULT_SKY_MTL_NAME@. - -*-O* _cache_ - File used to cache the sky data. If the _cache_ file does not exists, it is - created and filled with the sky data built from the _clouds_, the _atmosphere_ - and the _mie_ input files. This cached data can then be reused in the next - runs as long as the input files provided on the command are the same as the - ones used to setup the cache; leading to a significant speed-up of the - pre-processing step. If _cache_ contains data generated from input files that - are not the ones submitted on the command line, an error is notified and the - execution is stopped, avoiding the use of wrong cached data. Note that when - the cache is used, *htrdr-atmosphere* ignores the arguments used to - parametrise the structures partitioning the sky data, i.e. the *-T* and *-V* - options. - -*-o* _output_ - File where *htrdr-atmosphere* writes its _output_ data. If not defined, write - results to standard output. - -*-P* <_camera-parameter_:...> - Define an orthographic camera. Available parameters are: - - *height*=_radius_ - Height of the image plane. By default it is set to - @HTRDR_ARGS_DEFAULT_CAMERA_ORTHOGRAPHIC_HEIGHT@. - - *pos*=_x_,_y_,_z_ - Camera lens position. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_UP@}. - -*-p* <_rectangle-parameter_:...> - Switch in flux map computation. The flux is computed for the part of the - sensor that is outside any geometry. The rectangular sensor onto which the - flux is integrated is defined by the following parameters: - - *pos*=_x_,_y_,_z_ - Position of the center of the rectangle. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the rectangle, i.e. *tgt* - *pos* is the rectangle - normal. By default it is set to {@HTRDR_ARGS_DEFAULT_RECTANGLE_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the rectangle. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_UP@}. - - *sz*=_width_,_height_ - Size of the rectangle. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_SZ@}. - -*-s* <_spectral-parameter_:...> - Define the type and the range of the spectral integration. Available - spectral parameters are: - - *cie_xyz* - the radiance is computed for the visible part of the spectrum in [380, 780] - nanometers with respect to the XYZ CIE 1931 tristimulus values. This is the - default comportment of *htrdr-atmosphere*. - - *lw*=_wlen-min_,_wlen-max_ - perform the spectral sampling continuously in the [_wlen-min_, _wlen-max_] - wavelength range (wavelength must be provided in nanometers) according to - the Planck function for a reference temperature. If _wlen-min_ and - _wlen-max_ are equals the computation is monochromatic. *lw* means for - longwave but is here a code word that really means "computation of radiance - using the internal source of radiation": in other words, radiation is - emitted by the medium and its boundaries (ground and space). Because the - application is for the terrestrial atmosphere, internal radiation is - emitted in the thermal longwave part of the electromagnetic spectrum. - Therefore the default value of the reference temperature used in the - spectral sampling is fixed at 290 K. - - *sw*=_wlen-min_,_wlen-max_ - perform the spectral sampling continuously in the [_wlen-min_, _wlen-max_] - wavelength range (wavelength must be provided in nanometers) according to - the Planck function for a reference temperature. If _wlen-min_ and - _wlen-max_ are equals the computation is monochromatic. In the present - case, *sw* means that the source of radiation is external to the medium: - because the application is for the terrestrial atmosphere, the value of the - reference temperature is by default fixed at 5778 K, i.e. the blackbody - temperature of the Sun. - - *Tref*=_temperature_ - reference temperature of the Planck function used to continuously sample the - longwave/shortwave spectral range. In longwave, it is set to 290 K by - default while in shortwave its default value is the blackbody temperature of - the sun (i.e. 5778 K). - -*-T* _threshold_ - Optical thickness used as threshold criteria to partition the properties of - the clouds. By default its value is - @HTRDR_ATMOSPHERE_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD@. This option is - ignored if a cache file is used (option *-O*). - -*-t* _threads-count_ - Hint on the number of threads to use. By default use as many threads as CPU - cores. - -*-V* _x_,_y_,_z_ - Define the maximum definition of the acceleration data structure that - partitions the cloud properties. By default the finest definition is the - definition of the submitted *htcp*(5) file. This option is ignored if a cache - file is used (option *-O*). - -*-v* - Make *htrdr-atmosphere* verbose. - -# OUTPUT IMAGE - -Images calculated by *htrdr-atmosphere* are saved in the *htrdr-image*(5) file -format. This section describes the nature and arrangement of image data -depending on the type of calculation performed by *htrdr-atmosphere*. - -## XYZ image - -For an image rendering in the visible part of the spectrum (default behavior or -*-s cie_xyz* option), the pixel components store 4 estimates. The first, -second, and third pairs of floating point values encode the estimated -integrated radiance in W/sr/m² for the X, Y, and Z components of the CIE -1931 XYZ color space. The first value of each pair is the expected value of the -average radiance of the pixel. The second value is its associated standard -deviation. The fourth and final pair records the microsecond estimate of the -computation time per radiative path and its standard error. - -## Longwave image - -If the image is an infrared rendering (option *-s* *lw*=_wlen-min_,_wlen-max_) -the first and second pixel components store the expected value and the standard -error of the estimated brightness temperature (in K), respectively. The third -and fourth components record the expected value and the standard deviation of -the pixel radiance which is either an integrated radiance in W/sr/m² or a -spectral radiance in W/sr/m²/nm depending on whether this radiance was -calculated for a spectral range or at a single wavelength. The fifth and sixth -pixel components are not used. Finally, the last 2 components of the pixel -record the estimate in microseconds of the computation time per radiative path -and its standard error. - -## Shortwave image - -For shortwave renderings (option *-s* *sw*=_wlen-min_,_wlen-max_), the data -written to the output image are formatted as for a longwave image except -that the first and second components of the pixels are not used because no -brightness temperature has been evaluated. - -## Flux density map (shortwave and longwave) - -A flux density map (option *-p*) is saved in an *htrdr-image*(5) storing the -expected value and the standard error of the pixel radiative flux density (in -W/m²) on its first and second component. All other components are unused -excepted the seventh and eighth components that store the estimate of the -radiative path computation time in microseconds and its standard error. - -# EXAMPLES - -Render a clear sky scene, i.e. a scene without any cloud, whose sun is at -zenith. The vertical atmospheric gaz mixture along the Z axis is described in -the _gas.txt_ file. The ground geometry is a quad repeated to the infinity -whose materials are listed in the _material.mtl_ file. The camera is positioned -at _400_ meters height and looks toward the positive Y axis. The definition of -the rendered image is _800_ by _600_ pixels and the radiance of each pixel -component is estimated with _64_ Monte-Carlo realisations. The resulting image -is written to _output_ excepted if the file already exists; in this case an -error is notified, the program stops and the _output_ file remains unchanged: - -``` -htrdr-atmosphere -D0,90 -a gas.txt -m Mie.nc -g quad.obj -R \ - -M materials.mtl \ - -C pos=0,0,400:tgt=0,1,0:up=0,0,1 \ - -i def=800x600:spp=64 \ - -o output -``` - -Add clouds to the previous scene and use a more complex geometry to represent -the ground. The Mie data are provided through the _Mie.nc_ file. The ground -geometry was carefully designed to be cyclic and can be thus infinitely -repeated without visual glitches. Use the _-f_ option to write the rendered -image to _output_ even though the file already exists. Finally, use the -*htpp*(1) command to convert the *htrdr-image*(5) saved in output in a regular -PPM image [5]: - -``` -htrdr-atmosphere -D0,90 -a gas.txt -m Mie.nc -g mountains.obj -R \ - -M materials.mtl \ - -c clouds.htcp \ - -C pos=0,0,400:tgt=0,1,0:up=0,0,1 \ - -i def=800x600:spp=64 \ - -f -o output -htpp -o image.ppm output -``` - -Render the previous scene in infrared for the wavelengths in [_9200_, _10000_] -nanometers with a reference temperature of _300_ Kelvin: - -``` -htrdr-atmosphere -a gas.txt -m Mie.nc -g mountains.obj -R \ - -M materials.mtl \ - -c clouds.htcp \ - -C pos=0,0,400:tgt=0,1,0:up=0,0,1 \ - -i def=800x600:spp=64 \ - -s lw=9200,10000:Tref=300 \ - -f -o output -``` - -Move the sun by setting its azimuthal and elevation angles to _120_ and _40_ -degrees respectively. Use the *-O* option to enable the cache mechanism on -sky data. Increase the image definition to _1280_ by _720_ and set the -number of samples per pixel component to _1024_. Write results on standard -output and convert the resulting image in PPM before visualising it through the -*feh*(1) image viewer: - -``` -htrdr-atmosphere -D120,40 -a gas.txt -m Mie.nc -g mountains.obj -R \ - -M materials.mtl \ - -c clouds.htcp \ - -O my_cache \ - -C pos=0,0,400:tgt=0,1,0:up=0,0,1 \ - -i def=1280x720:spp=1024 | htpp | feh - -``` - -Compute the downward flux for the shortwave interval [_350_, _4000_] nanometers -on a square of _100_ meters side positionned at the origin at *1* meter height. -The resolution of the flux map is _500_ by _500_ pixels and _1000_ realisations -is used to estimate the flux per pixel. It is saved in the _flux_map.txt_ file -even though this file already exists: - -``` -htrdr-atmosphere -D0,90 -a gas.txt -m Mie.nc -g plane.obj -R \ - -M materials.mtl \ - -c clouds.htcp \ - -O my_cache \ - -p pos=0,0,1:tgt=0,0,2:up=0,1,0:sz=100,100 \ - -i def=500x500:spp=1000 \ - -s sw=350,4000 \ - -f -o flux_map.txt -``` - -Write into _output_ the data structures used to partition the clouds properties. -Use the *csplit*(1) Unix command to extract from _output_ the list of the -generated grids and save each of them in a specific VTK file whose name is -_cloud_grid<NUM>.vtk_ with _NUM_ in [0, N-1] where N is the number of grids -written into _output_: - -``` -htrdr-atmosphere -a gas.txt -m Mie.nc -c clouds.htcp -d -f -o output -csplit -f cloud_grid_ -b %02d.vtk -z --suppress-matched output /^---$/ {*} -``` - -Use *mpirun*(1) to launch *htrdr-atmosphere* on several hosts defined in the -_my_hosts_ file. Make the clouds infinite along the X and Y axis: - -``` -mpirun --hostfile my_hosts htrdr-atmosphere \ - -D120,40 -a gas.txt -m Mie.nc -g mountains.obj -R \ - -M materials.mtl \ - -c clouds.htcp -r \ - -C pos=0,0,400:tgt=0,1,0:up=0,0,1 \ - -i def=1280x720:spp=1024 \ - -f -o output -``` - -# COPYRIGHT - -Copyright © 2018-2019, 2022-2023 Centre National de la Recherche Scientifique++ -Copyright © 2020-2022 Institut Mines Télécom Albi-Carmaux++ -Copyright © 2022-2023 Institut Pierre-Simon Laplace++ -Copyright © 2022-2023 Institut de Physique du Globe de Paris++ -Copyright © 2018-2023 |Méso|Star> <contact@meso-star.com>++ -Copyright © 2022-2023 Observatoire de Paris++ -Copyright © 2022-2023 Université de Reims Champagne-Ardenne++ -Copyright © 2022-2023 Université de Versaille Saint-Quentin++ -Copyright © 2018-2019, 2022-2023 Université Paul Sabatier - -# LICENSE - -*htrdr-atmosphere* is free software released under the GPLv3+ license: GNU GPL -version 3 or later <https://gnu.org/licenses/gpl.html>. You are free to change -and redistribute it. There is NO WARRANTY, to the extent permitted by law. - -# SEE ALSO - -. A path-tracing Monte Carlo library for 3-D radiative transfer in highly - resolved cloudy atmospheres. N. Villefranque et al, JAMES 11, 2449-2473, 2019 - - <https://doi.org/10.1029/2018MS001602> -. High-Tune: Gas Optical Properties file format - - <https://www.meso-star.com/projects/high-tune/downloads/gas_opt_prop_en.pdf> -. VTK file format - - <http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf> -. MPI specifications - <https://www.mpi-forum.org/docs/> -. Portable PixMap - <http://netpbm.sourceforge.net/doc/ppm.html> - -*csplit*(1), -*feh*(1), -*mpirun*(1), -*htcp*(5), -*htmie*(5), -*htpp*(1), -*htrdr*(1), -*htrdr-image*(5), -*htrdr-materials*(5) -*htrdr-obj*(5) diff --git a/htrdr-combustion.1.in b/doc/htrdr-combustion.1.in diff --git a/doc/htrdr-combustion.1.scd.in b/doc/htrdr-combustion.1.scd.in @@ -1,461 +0,0 @@ -htrdr-combustion(1) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - - -# NAME - -htrdr-combustion - simulate radiative transfer in combustion medium - -# SYNOPSIS - -htrdr-combustion [_option_]... -m _tetrahedra_ -p _thermoprops_ -r _refract_ids_ - -# DESCRIPTION - -The purpose of *htrdr-combustion* is to perform radiative transfer computations -in a scene representing a semi-transparent medium enlightened by a laser sheet. -The combustion medium may be surrounded by solid boundaries (inner limits of -the combustion chamber). The program will currently compute, in the visible at -a given frequency, the monochromatic image or the radiative flux density of the -combustion medium: collected light comes from the laser, and is scattered by -soot aggregates within the flame before eventually reaching the sensor. - -Data about the gaseous medium have to be provided on the vertices of a -unstructured tetrahedral mesh: pressure, temperature and concentrations of H2O, -CO2 and CO have to be provided for every spatial position used to define this -mesh. These data have to be provided in anticipation of future developments for -the longwave range: since the gas is assumed to be transparent in the visible, -it is not currently used. - -Soot optical properties are computed using the Rayleigh-Debye Gans theory, for -Fractal Aggregates (RDG-FA) [1]. This requires the knowledge of: soot volumic -fraction, soot number density (number of primary particles per aggregate) and -primary particles diameter, over each vertex of the tetrahedron mesh. For any -position in the volume, these quantities are first interpolated from the values -retrieved at the nodes of the current tetrahedron, and are then interpolated -for the position of interest. Which then makes possible to compute the -absorption and scattering cross-sections of soot aggregates, as well as their -scattering function. - -The Monte-Carlo algorithm that accounts for the visible intensity is inspired -from the algorithm used for solar radiation in the *htrdr-atmosphere*(1) -command. It was adapted to partially illuminated scenes in order to solve -convergence issues. The algorithm is presented in the following article: -"Null-collision meshless Monte-Carlo - a new reverse Monte-Carlo algorithm -designed for laser-source emission in absorbing/scattering inhomogeneous -media". M. Sans et al, JQSRT, 2021 [2]. - -In *htrdr-combustion* the spatial unit 1.0 corresponds to one meter while the -estimated monochromatic radiances and flux densities are saved in W/sr/m² and -W/m² respectively. Computed images are stored in the *htrdr-image*(5) file -format. - -*htrdr-combustion* implements a mixed parallelism: on one computer (i.e. a -node) it uses a shared memory parallelism, and it relies on the message passing -interface [4] to parallelize the computations between several nodes. We can -thus launch *htrdr-combustion* either directly, or via a process launcher -like *mpirun*(1) to distribute the rendering over several nodes. - -# OPTIONS - -*-C* <_camera-parameter_:...> - Define the camera. Available parameters are: - - *focal-dst*=_dst_ - Distance to focus on with a thin lens camera, that is, a camera whose - *lens-radius* is not zero. The default focal distance is - @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOCAL_DST@ meter. - - *focal-length*=_length_ - Focal length of a camera lens. It is another way to control the field of - view of a thin lens camera. By default, the field of view is directly set - through the **fov** parameter. - - *fov*=_angle_ - Vertical field of view of the camera in - \]@HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN@, - @HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MAX@[ degrees. By - default _angle_ is set to - @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOV@ degrees. - - *lens-radius*=_radius_ - Radius of the camera lens. A non-zero radius means that the camera is a thin - lens camera while a zero radius defines a pinhole camera. By default the - lens radius is @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_LENS_RADIUS@. - - *pos*=_x_,_y_,_z_ - Camera lens position. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_UP@}. - -*-D* _flux_density_ - Flux density of the laser in W/m². By default it is set to - @HTRDR_COMBUSTION_ARGS_DEFAULT_LASER_FLUX_DENSITY@. - -*-d* <_laser_|_octree_> - When define with the _laser_ argument, write in _output_ the geometry of the - laser sheet saved in the VTK file format [3]. With the _octree_ argument, - write in _output_ a VTK file that stores the octree leaves of the space - partitioning data structure used to speed up the radiative transfer - computations in the combustion medium. Each leaf stores the minimum and the - maximum of the extinction coefficients of the tetrahedra that the leaf - overlaps. - -*-F* <_fractal-coefficients_:...> - Fractal parameters of the RDG-FA model. This option disable the *-I* option - if it was previously set. Available fractal coefficients are: - - *dimension*=_real_ - Fractal dimension. By default it is set to - @HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_DIMENSION@. - - *prefactor*=_real_ - Fractal prefactor. By default it is set to - @HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_PREFACTOR@. - -*-f* - Force overwrite of the _output_ file. - -*-g* <_geometry-parameter_:...> - Define the geometry of the combustion chamber. Note that this geometry does - not prevent the camera from viewing the medium or the laser from illuminating - it, even if they are outside the combustion chamber. The rendering algorithm - ensures that they are not occluded by this geometry like with a two-way - mirror. When the laser is out of geometry, its emissive surface is seen as if - it were following the interior surface of the chamber. Likewise, the radiance - seen by the camera outside the chamber is the radiance that reaches it as if - its image plane were following the surface of the geometry. Available - geometry parameters are: - - *mats*=_materials_ - Path to the *htrdr-materials*(5) that defines the media and materials used - by the combustion chamber geometry. - - *obj*=_mesh_ - Path to the *htrdr-obj*(5) file that represents the mesh of the combustion - chamber. Following the *htrdr-obj*(5) fileformat, the interface of the - submitted mesh must be defined as a thin interface, i.e. it must be composed - of 3 components separated by the ':' character. By convention, - *htrdr-combustion* expects the outside environment to be called "air" and - the medium inside the combustion chamber to be called "chamber". No - assumption is made on the name of the surface material excepted that it has - to reference a valid material. - -*-h* - List short help and exit. - -*-I* - Use an isotropic phase function rather than the RDG-FA model. - -*-i* <_image-parameter_:...> - Define the sensor array. Available image parameters are: - - *def*=<_width_>x<_height_> - Definition of the image. By default the image definition is - @HTRDR_ARGS_DEFAULT_IMG_WIDTH@x@HTRDR_ARGS_DEFAULT_IMG_HEIGHT@. - - *spp*=_samples-count_ - Number of samples per pixel estimation. By default, *spp* is set to - @HTRDR_ARGS_DEFAULT_IMG_SPP@. - -*-l* <_laser-parameter_:...> - Define the laser surface emission. Available laser parameters are: - - *pos*=_x_,_y_,_z_ - Position of the center of the surface emission. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the laser, i.e. *tgt* - *pos* is normal of the laser - surface. By default it is set to {@HTRDR_ARGS_DEFAULT_RECTANGLE_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the laser surface. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_UP@}. - - *sz*=_width_,_height_ - Size of the laser surface. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_SZ@}. - -*-m* _tetrahedra_ - Path to the *smsh*(5) file that stores the volumetric mesh of the combustion - medium. - -*-N* - Precompute the normals of the tetrahedra. This option should speed up the - computation since the normals are computed once per tetrahedron rather than - reevaluated each time a tetrahedron is queried at a given position. On the - other hand, the storage required by these normals increases the memory - footprint. - -*-O* _cache_ - Path to the file used to cache the acceleration structure that partitions the - combustion medium. If the _cache_ file does not exist, it is created and - populated with the octree built from the _tetrahedra_, _thermoprops_ and - _refract_ids_ input files. This cached acceleration structure can then be - reused in future runs as long as the input data provided on the command line - is the same as that used to configure the cache; leading to a significant - acceleration of the pretreatment step. If _cache_ contains data generated - from input data that is not that submitted on the command line, an error is - notified and execution is stopped, thus avoiding the use of bad cached data. - -*-o* _output_ - Path to the file where *htrdr-combustion* writes the output data. If not set, - data is written to standard output. - -*-P* <_camera-parameter_:...> - Define an orthographic camera. Available parameters are: - - *height*=_radius_ - Height of the image plane. By default it is set to - @HTRDR_ARGS_DEFAULT_CAMERA_ORTHOGRAPHIC_HEIGHT@. - - *pos*=_x_,_y_,_z_ - Camera lens position. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_UP@}. - -*-p* _thermprops_ - Path to the *atrtp*(5) file that stores the thermodynamic properties of the - combustion medium. - -*-R* <_rectangle-parameter_:...> - Compute a radiatve flux density map rather than an image. The rectangular - sensor onto which the flux is integrated is defined by the following - parameters: - - *pos*=_x_,_y_,_z_ - Position of the center of the rectangle. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the rectangle, i.e. *tgt* - *pos* is the rectangle - normal. By default it is set to {@HTRDR_ARGS_DEFAULT_RECTANGLE_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the rectangle. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_UP@}. - - *sz*=_width_,_height_ - Size of the rectangle. By default it is set to - {@HTRDR_ARGS_DEFAULT_RECTANGLE_SZ@}. - -*-r* _refract_ids_ - Path the the *atrri*(5) file that lists the spectrally varying refractive - indices of the combustion medium. - -*-s* - Use of Single Instruction, Multiple Data (SIMD) instruction sets if - available. This should speed up the computation time. - -*-T* - Optical thickness used as threshold criteria to build the acceleration - structure the combustion medium. By default its value is - @HTRDR_COMBUSTION_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD@. - -*-t* _threads-count_ - Hint on the number of threads to use. By default use as many threads as CPU - cores. - -*-V* <_definition_> - definition of the grid of the upper bound field of radiative coefficients - from which the volumetric acceleration structure is built. The grid extent - corresponds to the axis aligned bounding box of the volumetric mesh - representing the combustion medium. Grid definition can be set in two ways: - - _x_,_z_,_z_ - Explicitly set the grid definition along the X, Y, and Z extents. - - _hint_ - Provide an hint on the expected definition of the grid along its major - extent. The definition along the two remaining axes are then internally - computed. This is the default comportment with an _hint_ set to - @HTRDR_COMBUSTION_ARGS_DEFAULT_GRID_DEFINITION_HINT@. - -*-v* - Make *htrdr-combustion* verbose. - -*-w* - Define the wavelength of the laser in nanometre. By default it is set to - @HTRDR_COMBUSTION_ARGS_DEFAULT_WAVELENGTH@. - -# OUTPUT IMAGE - -Images calculated by *htrdr-combustion* are saved in the *htrdr-image*(5) file -format. This section describes the nature and arrangement of image data -depending on the type of calculation performed by *htrdr-combustion*. - -## Shortwave monochromatic image - -For a monochromatic image rendering, the expected value and the standard -deviation of the pixel radiance (in W/sr/m²) are saved on the first and the -second components. All other components are unused excepted the seventh and -eighth components that store the estimate of the radiative path computation -time in microseconds and its standard error. - -## Shortwave flux density map - -A flux density map (option *-R*) is saved in an *htrdr-image*(5) storing the -expected value and the standard error of the pixel radiative flux density (in -W/m²) on its first and second component. All other components are unused -excepted the seventh and eighth components that store the estimate of the -radiative path computation time in microseconds and its standard error. - -# EXAMPLES - -Make htrdr-combustion verbose (option *-v*) and render an image of a combustion -medium whose tetrahedral mesh is stored in _tetra.smsh_ and its associated -thermodynamic properties are saved in _thermprops.atrtp_. The spectrally -varying indices of the medium are listed in the _refract_ids.atrri_ file. The -center of the laser surface emission is positioned at the origin and its -direction is aligned to the Y axis. The definition of the rendered image is -_800_ by _600_ pixels and the monochromatic radiance of each pixel is estimated -at _500_ nanometre with _64_ Monte-Carlo realisations. The resulting image is -written to _output_ excepted if it already exists; in this case an -error is notified, the program stops and the _output_ file remains unchanged. - -``` -htrdr-combustion -v \ - -m tetra.smsh \ - -p thermprops.atrtp \ - -r refract_ids.atrri \ - -l pos=0,0,0:tgt=0,1,0:up=0,0,1:sz=0.001,0.2 \ - -w 500 \ - -C pos=0.06,0,0.01:tgt=0.05,0,0.01:up=0,0,1:fov=30 \ - -i def=800x600:spp=64 \ - -o output -``` - -Add a combustion chamber to the previous example: its mesh is defined in -_chamber.obj_ while its materials are listed in _materials.mtls_. Save the -volumetric acceleration structure in _octree.cache_ or reused it if it was -already populated in a previous run with compatible input data. Set the finest -resolution of this acceleration structure to _1000_ along the major extend of the -medium and use a optical thickness criterion of _5_ to build it. Use the *-f* -option to force the overwrite of the _output_ file if it exists and use *-s* to -speed up the rendering with the available SIMD instruction sets. - -``` -htrdr-combustion -v \ - -m tetra.smsh \ - -p thermprops.atrtp \ - -r refract_ids.atrri \ - -g obj=chamber.obj:mats=materials.mtls \ - -l pos=0,0,0:tgt=0,1,0:up=0,0,1:sz=0.001,0.2 \ - -w 500 \ - -C pos=0.06,0,0.01:tgt=0.05,0,0.01:up=0,0,1:fov=30 \ - -i def=800x600:spp=64 \ - -O octree.cache \ - -V 1000 \ - -T 5 \ - -o output -f -s -``` - -Compute a flux density map whose definition is _500_ by _500_ pixels. The flux -density per pixel is estimated with _64_ realisations; the flux density for the -entire sensor is thus calculated with 16 million realisations (500 \* 500 -\* 64). The sensor on which the flux density is calculated is a square with -sides measuring _0.05_ meter. Its center is positioned at the origin and points -to the Z axis. - -``` -htrdr-combustion -v \ - -m tetra.smsh \ - -p thermprops.atrtp \ - -r refract_ids.atrri \ - -l pos=0,0,0:tgt=0,1,0:up=0,0,1:sz=0.001,0.2 \ - -w 500 \ - -R pos=0,0,0:tgt=0,0,1:up=0,1,0:sz=0.05,0.05 \ - -i def=500x500:spp=64 \ - -O octree.cache \ - -V 1000 \ - -T 5 \ - -o map.txt -f -s -``` - -Write into _octree.vtk_ a representation of the volumetric acceleration -structure. - -``` -htrdr-combustion -v \ - -m tetra.smsh \ - -p thermprops.atrtp \ - -r refract_ids.atrri \ - -O octree.cache \ - -d octree -o octree.vtk -``` - -# COPYRIGHT - -Copyright © 2018-2019, 2022-2023 Centre National de la Recherche Scientifique++ -Copyright © 2020-2022 Institut Mines Télécom Albi-Carmaux++ -Copyright © 2022-2023 Institut Pierre-Simon Laplace++ -Copyright © 2022-2023 Institut de Physique du Globe de Paris++ -Copyright © 2018-2023 |Méso|Star> <contact@meso-star.com>++ -Copyright © 2022-2023 Observatoire de Paris++ -Copyright © 2022-2023 Université de Reims Champagne-Ardenne++ -Copyright © 2022-2023 Université de Versaille Saint-Quentin++ -Copyright © 2018-2019, 2022-2023 Université Paul Sabatier - -# LICENSE - -*htrdr-combustion* is free software released under the GPLv3+ license: GNU GPL -version 3 or later <https://gnu.org/licenses/gpl.html>. You are free to change -and redistribute it. There is NO WARRANTY, to the extent permitted by law. - -# SEE ALSO - -. Effects of multiple scattering on radiative properties of soot - fractal aggregates. J. Yon et al, JQSRT 133, 374-381, 2014 - - <https://doi.org/10.1016/j.jqsrt.2013.08.022> -. Null-collision meshless Monte-Carlo - a new reverse Monte-Carlo algorithm - designed for laser-source emission in absorbing/scattering inhomogeneous media. M. - Sans et al, JQSRT, 2021 - <https://doi.org/10.1016/j.jqsrt.2021.107725> -. VTK file format - - <http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf> -. MPI specifications - <https://www.mpi-forum.org/docs/> - -*atrtp*(5), -*atrri*(5), -*htrdr-atmosphere*(1), -*htrdr-image*(5), -*htrdr-obj*(5), -*htrdr-materials*(5), -*mpirun*(1), -*smsh*(5) diff --git a/htrdr-image.5 b/doc/htrdr-image.5 diff --git a/doc/htrdr-image.5.scd b/doc/htrdr-image.5.scd @@ -1,124 +0,0 @@ -htrdr-image(5) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -htrdr-image - two dimensional image format - -# DESCRIPTION - -The *htrdr-image* is a raw image file format where data are stored in plain -text. Characters after the '#' character are considered as comments and are -thus ignored as well as empty lines. The first valid line stores 2 unsigned -integers that represent the image definition, i.e. the number of pixels per -line and per column. Then each line stores 8 floating point components per -pixel. - -Pixels are sorted line by line, with the origin defined at the top left corner -of the image. With an image definition of N by M pixels, with N the number of -pixels per line and M the overall number of lines in the image, the first N -pixels correspond to the pixels of the top line of the image, the following N -pixels are the pixels of the second line and so on. - -The *htpp*(1) program can be used to convert an *htrdr-image* into a regular -PPM image [1]. Note that the nature and unit of the data stored in an -*htrdr-image* is not determined by the file format itself. Refer to the -program that generates the image for a full description of the data it -contains. - -# GRAMMAR - -``` -<htrdr-image> ::= <definition> - <pixel> - [ <pixel> ... ] - -<definition> ::= <width> <height> -<width> ::= INTEGER -<height> ::= INTEGER - -<pixel> ::= <pixel-sw> - | <pixel-lw> - -<pixel-sw> ::= <X> <Y> <Z> <time> -<pixel-lw> ::= <temperature> <radiance> 0 0 <time> - -<X> ::= <estimate> -<Y> ::= <estimate> -<Z> ::= <estimate> -<time> ::= <estimate> -<temperature> ::= <estimate> -<radiance> ::= <estimate> - -<estimate> ::= <expected-value> <standard-error> -<expected-value> ::= REAL -<standard-error> ::= REAL -``` - -# EXAMPLE - -The following output was produced by *htrdr*(1) invoked to render an image of -_800_ by _600_ pixels. Note that actually the comments and blank lines were -not necessarily written by *htrdr*(1); they are used here only to help the -reader understand the data layout. The comment after each pixel gives the -two-dimensional index of the pixel in the image: the first and second integer -is the index of the line and the column of the pixel in the image, -respectively. - -``` -800 600 # Image definition - -# Pixels of the 1st line -2.55e-4 2.90e-5 3.75e-4 4.48e-5 3.20e-4 3.16e-5 306.484 259.723 # (1,1) -2.95e-4 3.37e-5 3.39e-4 4.16e-5 3.38e-4 4.60e-5 18.3633 2.66317 # (2,1) -3.76e-4 5.43e-5 3.13e-4 3.48e-5 3.38e-4 3.32e-5 19.6252 2.67015 # (3,1) - ... -7.13e-4 1.14e-4 7.66e-4 1.35e-4 7.97e-4 1.26e-4 119.820 93.7820 # (799,1) -6.59e-4 1.14e-4 7.47e-4 1.41e-4 4.39e-4 7.33e-5 24.8655 2.46348 # (800,1) - -# Pixels of the 2nd line -3.33e-4 6.02e-5 4.21e-4 7.66e-5 3.44e-4 3.81e-5 19.4580 2.50692 # (1,2) -3.50e-4 4.93e-5 3.23e-4 2.52e-5 3.03e-4 2.42e-5 102.566 81.2936 # (2,2) -2.72e-4 4.69e-5 3.41e-4 4.12e-5 2.52e-4 2.06e-5 25.5801 5.37736 # (3,2) - ... -7.52e-4 1.31e-4 8.91e-4 1.84e-4 5.48e-4 1.30e-4 46.5418 12.4728 # (799,2) -6.82e-4 1.42e-4 6.61e-4 7.85e-5 4.44e-4 5.99e-5 59.8728 32.1468 # (800,2) - - ... - -# Pixels of the 600th line -2.69e-4 7.44e-5 2.31e-4 2.56e-5 1.95e-4 2.30e-5 43.8242 15.0047 # (1,600) -4.32e-4 1.25e-4 2.22e-4 2.22e-5 2.04e-4 2.60e-5 25.5498 1.73942 # (2,600) -2.78e-4 5.81e-5 2.75e-4 4.99e-5 2.17e-4 3.30e-5 38.4448 7.16199 # (3,600) - ... -3.54e-4 4.32e-5 3.07e-4 3.80e-5 2.38e-4 2.49e-5 102.893 36.9865 # (799,600) -3.07e-4 2.61e-5 4.60e-4 1.13e-4 2.69e-4 4.29e-5 42.75070 11.913 # (800,600) -``` - -# SEE ALSO - -. Portable PixMap - <http://netpbm.sourceforge.net/doc/ppm.html> - -*htpp*(1), *htrdr*(1) diff --git a/htrdr-materials.5 b/doc/htrdr-materials.5 diff --git a/doc/htrdr-materials.5.scd b/doc/htrdr-materials.5.scd @@ -1,76 +0,0 @@ -htrdr-materials(5) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -htrdr-materials - list of materials used by the geometries in htrdr(1) - -# DESCRIPTION - -A *htrdr-materials* file lists the materials that can be used by geometries -provided through a *htrdr-obj*(5) file to the *htrdr*(1) program. Each line -of the file gives the name of the material. For opaque materials the material -name is followed by the path toward the *mrumtl*(5) file storing the spectral -properties of its associated Bidirectional Reflectance Distribution Function. -Furthermore, the temperature of the material must be defined too. - -The material name can be composed of any characters excepted for spaces and -tabulations. The path toward the *mrumtl*(5) file must be a valid path -relative to the file system. - -Characters behind the hash mark (#) are considered as comments and are thus -ignored. Empty lines, i.e. lines without any characters or composed of spaces -and tabulations, are simply skipped. - -# GRAMMAR - -``` -<htrdr-materials> ::= <material> - [ <material> ... ] -<material> ::= <name> <properties> -<name> ::= STRING -<properties> ::= none | <mrumtl-path> <temperature> -<mrumtl-path> ::= PATH -<temperature> ::= REAL # In Kelvin -``` - -# EXAMPLE - -The following file lists 3 materials. The first one named _grass_ has its -spectral BRDF defines in the _A001.mrumtl_ file. The second one is named -_sand_ and has its spectral properties saved in the _B002.mrumtl_ file. Both -materials have a temperature of 300 Kelvin. The last material is a -semi-transparent material named _air_ with no additionnal properties defined -in this file. - -``` -grass /opt/materials/A001.mrumtl 300 -sand /opt/materials/B002.mrumtl 300 -air none -``` - -# SEE ALSO - -*htrdr*(1), *htrdr-obj*(5), *mrumtl*(5) diff --git a/htrdr-obj.5 b/doc/htrdr-obj.5 diff --git a/doc/htrdr-obj.5.scd b/doc/htrdr-obj.5.scd @@ -1,103 +0,0 @@ -htrdr-obj(5) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -htrdr-obj - file format of the ground geometry in htrdr(1) - -# DESCRIPTION - -A *htrdr-obj* file is a regular OBJ [1] composed only of triangular meshes. -Each triangle must be included in a material group as defined by the 'usemtl' -directive. The name of the material group must be of the form -"<_front-mtl-name_>:[<_interface-mtl-name_>:]<_back-mtl-name_>", where -<_front-mtl-name_>, <_interface-mtl-name_> and <_back-mtl-name_> are -strings separated by a colon (:) defining the name of the front, interface, -and back facing materials, respectively. The interface material name is -optionnal: it is used for thin geometries, i.e. geometries with no thickness. -Material names can be composed of any characters expected for spaces and -tabulations. Note that regarding the *htrdr*(1) convention, a triangle side is -said "front facing" when its vertices are clock-wise ordered. - -Note that to be a valid *htrdr-obj*(5) file for *htrdr*(1), the front and the -back facing names must reference a material listed in *htrdr-materials*(5) -file submitted to the *htrdr*(1) command line. - -The grammar of a *htrdr-obj* file is thus a subset of the OBJ file -format [1] with only a specific convention regarding the material name. -As a consequence, any software supporting the OBJ file format can be -used to create or visualise an *htrdr-obj* file. - -# EXAMPLES - -Define a quad at the interface between the air medium and the concrete -material. - -``` -v -5.0 -5.0 0 -v -5.0 5.0 0 -v 5.0 -5.0 0 -v 5.0 5.0 0 - -usemtl air:concrete -f 1 2 3 -f 3 2 4 -``` - -Define a wooden cube whose Z-aligned faces are against a brick material. -The remaining faces are in contact with the air. - -``` -v 0 0 0 -v 1 0 0 -v 0 1 0 -v 1 1 0 -v 0 0 1 -v 1 0 1 -v 0 1 1 -v 1 1 1 - -usemtl wood:air -f 1 3 2 -f 2 3 4 -f 1 5 3 -f 3 5 7 -f 5 6 7 -f 7 6 8 -f 4 8 2 -f 2 8 6 - -usemtl wood:brick -f 3 7 4 -f 4 7 8 -f 1 2 5 -f 5 2 6 -``` - -# SEE ALSO - -. OBJ file format - <http://www.martinreddy.net/gfx/3d/OBJ.spec> - -*htrdr*(1) diff --git a/htrdr-planeto.1.in b/doc/htrdr-planeto.1.in diff --git a/doc/htrdr-planeto.1.scd.in b/doc/htrdr-planeto.1.scd.in @@ -1,441 +0,0 @@ -htrdr-planeto(1) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -htrdr-planeto - simulate radiative transfer in 3D planetary atmosphere - -# SYNOPSIS - -htrdr-planeto [_option_] ... -G _ground_ -g _gas_ - -# DESCRIPTION - -*htrdr-planeto* simulates the radiative transfer of a terrestrial planet in the -visible or the infrared part of the spectrum. The planet's ground (option *-G*) -can be any set of triangles with BRDFs and temperatures defined per triangle. -The atmosphere is composed of a gas mixture (option *-g*) and a potentially -empty set of aerosols (option *-a*). Both can have arbitrary tetrahedral meshes -with per-node radiative properties. Rayleigh is used as a gas phase function and -the temperature of the gas is defined on the mesh nodes. Aerosol phase functions -(Henyey and Greenstein or user defined) are also defined per node. - -*htrdr-planeto* is mainly a renderer that calculates an image (option *-i*) -for a given observation position (option *-C*). Its internal rendering algorithm -is based on Monte-Carlo integration, which consists for each pixel of simulating -a given number of optical paths from the sensor, taking into account the -phenomena of light absorption and scattering. - -*htrdr-planeto* offers three ways to perform spectral integration (*-s* option). -By default, it calculates an image for the visible part of the spectrum between -380 and 780 nanometers, for the three components of the CIE 1931 XYZ color space -which are then recombined to obtain the final color for each pixel, and finally -the entire image of the scene as seen from the observation position. The other -two methods are to explicitly define the longwave or shortwave spectral range to -be integrated and continuously sample a wavelength in this range. In fact, -longwave and shortwave are keywords that mean that the source of radiation is -either internal or external to the medium, respectively. In shortwave, only -radiance is evaluated and stored in the output image. For longwave rendering, -this estimated radiance is then converted to brightness temperature and both are -recorded in the image. - -In *htrdr-planeto*, the spatial unit 1.0 corresponds to one meter and -temperatures are expressed in Kelvin. The estimated radiances are given in -W/sr/m², except for monochromatic calculations where the calculated spectral -radiance is defined in W/sr/m²/nm. - -*htrdr-planeto* implements mixed parallelism. On a single computer (that is, a -node), it uses shared memory parallelism while it relies on Message Passing -Interface (MPI) to parallelize calculations between multiple nodes. -*htrdr-planeto* can therefore be launched either directly or via a process -launcher such as *mpirun*(1) to distribute the rendering on several computers. - -# OPTIONS - -*-a* <_aerosol-parameter_:...> - Define an aerosol. Use this option once per aerosol, and duplicate it as many - times as necessary. - - *mesh*=_path_ - Path to the *smsh*(5) file that stores the aerosol tetrahedral mesh. - - *name*=_string_ - Name assigned to the aerosol. - - *radprop*=_path_ - Path to the *sars*(5) file that stores the radiative properties of the - aerosol. Radiative properties are defined per volumetric mesh node and, - therefore, this file and the volumetric mesh file (see *mesh* parameter) - must be consistent with each other. - - *phasefn*=_path_ - Path to the *rnsl*(5) file that lists the *rnsf*(5) files to load; each of - these files stores an aerosol phase function. The phase function to be used - per volumetric mesh node is defined in another file (see *phaseids* - parameter). - - *phaseids*=_path_ - Path to the *rnpfi*(5) file that stores the index of the phase function to - be used per volumetric mesh node; the list of phase function is defined in - another file (see *phasefn* parameter). Note that this file must be - consistent with the volumetric mesh defined in the *mesh* parameter. - -*-C* <_camera-parameter_:...> - Configure a perspective camera. Available parameters are: - - *focal-dst*=_dst_ - Distance to focus on with a thin lens camera, that is, a camera whose - *lens-radius* is not zero. The default focal distance is - @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOCAL_DST@ meter. - - *focal-length*=_length_ - Focal length of a camera lens. It is another way to control the field of - view of a thin lens camera. By default, the field of view is directly set - through the **fov** parameter. - - *fov*=_angle_ - Vertical field of view of the camera in - \]@HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN@, - @HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MAX@[ degrees. By - default _angle_ is set to - @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOV@ degrees. - - *lens-radius*=_radius_ - Radius of the camera lens. A non-zero radius means that the camera is a thin - lens camera while a zero radius defines a pinhole camera. By default the - lens radius is @HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_LENS_RADIUS@. - - *pos*=_x_,_y_,_z_ - Camera lens position. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_POS@}. - - *tgt*=_x_,_y_,_z_ - Position targeted by the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_TGT@}. - - *up*=_x_,_y_,_z_ - Up vector of the camera. By default it is set to - {@HTRDR_ARGS_DEFAULT_CAMERA_UP@}. - -*-d* - Write atmospheric acceleration structures to _output_. Each structure is saved - in VTK ASCII file format [1]. To divide the resulting output into _n_ files - (_n_ > 1), each storing an acceleration structure, one can use the *csplit*(1) - command as below: - - ``` - csplit -f octree -k output %^#\\ vtk% /^#\\ vtk/ \\ - {$(($(grep -ce "^# vtk" output)-2))} - ``` - -*-f* - Force overwrite the _output_ file. - -*-G* <_ground-parameter_:...> - Define the ground of the planet. Available ground parameters are: - - *brdf*=_path_ - Path to the *rnsl*(5) file that lists the *mrumtl*(5) files to load; each of - these files stores a ground BRDF. The BRDF to be used per ground node is - defined in another file (see *prop* parameter). - - *mesh*=_path_ - Path to the *smsh*(5) file which stores the triangular mesh of the ground. - - *name*=_string_ - Name assigned to the ground. - - *prop*=_path_ - Path to the *rnsp*(5) file that stores ground surface properties. The - properties (BRDF index and temperature) are defined per triangle and, - therefore, this file and the mesh file (see *mesh* parameter) must be - consistent with each other. - -*-g* <_gas-parameter_:...> - Define the gas mixture. Available gas parameters are: - - *mesh*=_path_ - Path to the *smsh*(5) file that stores the gas tetrahedral mesh. - - *ck*=_path_ - Path to the *sck*(5) file that stores the correlated K of the gas. The CKs - are defined per volumetric mesh node and, therefore, this file and the - volumetric mesh file (see *mesh* parameter) must be consistent with each - other. - - *temp*=_path_ - Path to the *rngt*(5) file that stores the temperature of the gas. The - temperature is defined per volumetric mesh node and, therefore, this file - and the volumetric mesh file (see *mesh* parameter) must be consistent with - each other. - -*-h* - Display short help and exit. - -*-i* <_image-parameter_:...> - Define the image to compute. Available image parameters are: - - *def*=<_width_>x<_height_> - Image definition. By default the image definition is - @HTRDR_ARGS_DEFAULT_IMG_WIDTH@x@HTRDR_ARGS_DEFAULT_IMG_HEIGHT@. - - *spp*=_samples-count_ - Number of samples to estimate one pixel, i.e. number of radiative paths - sampled per pixel. By default, *spp* is set to - @HTRDR_ARGS_DEFAULT_IMG_SPP@. - -*-N* - Precalculate tetrahedron normals. This speeds up runtime performance by - calculating normals once and for all rather than re-evaluating them every time - a tetrahedron is queried at a given position. In return, the memory space used - to store normals increases the memory footprint. - -*-O* _storage_ - File where atmospheric acceleration structures are stored/loaded. If _storage_ - does not exist, it is created and is used to store the built acceleration - structures. - - If _storage_ exists, acceleration structures are loaded from it rather than - built from scratch, resulting in significant acceleration of the preprocessing - step. Note that if the data structures stored in _storage_ are not as expected - (that is, the input atmospheric data or construction parameters are - different), an error is notified and execution is stopped, thus avoiding the - use of incorrect acceleration structures. - -*-o* _output_ - File to write the output data. The output data is either an image or atmospheric - acceleration structures if the *-d* option is set. If it is not defined, the - data is written to the standard output. - -*-S* <_source-parameter_:...> - Define the external source. Available source parameters are: - - *lat*=_real_ - The latitude of the source, i.e. its angle between [-90, 90] degrees from - the x-axis. The default latitude is set to 0. - - *lon*=_real_ - The longitude of the source, i.e. its angle between [-180, 180] degrees - about the z-axis. The default longitude is set to 0. - - *dst*=_real_ - Distance in kilometers from source to origin. The default distance is 0. - - *rad*=_path_ - The path to the *rnrl*(5) file that stores the source radiance distribution. - This option is not compatible with the temperature setting of the source - (parameter *temp*) which also defines its radiance distribution. - - *radius*=_real_ - Source radius in kilometers. - - *temp*=_real_ - Source temperature in Kelvin; when this option is set, the radiance - distribution of the source is Planck, at the specified temperature. This - option is not compatible with the *rad* parameter that explicitly defines - the source radiance distribution. - -*-s* <_spectral-parameter_:...> - Configure spectral integration. Available spectral parameters are: - - *cie_xyz* - The radiance is calculated for the visible part of the spectrum between - 380 nm and 780 nm by sampling the wavelength relative to the XYZ CIE 1931 - color space. This is the default spectral integration. - - *lw*=_wlen-min_,_wlen-max_ - Perform continuous spectral sampling in the wavelength range [_wlen-min_, _wlen-max_] - (wavelengths must be provided in nanometers) according to the Planck - function for a reference temperature which is the maximum ground - temperature, which is assumed to be the maximum scene temperature. If - _wlen-min_ and _wlen-max_ are equal, the calculation is monochromatic. *lw* - stands for "longwaves" but is only a keyword that actually refers to - internal source (emitted within the medium, as opposed to external source - like sun): in other words, radiation is emitted by the medium and its limits - (ground and space). - - *sw*=_wlen-min_,_wlen-max_ - Perform continuous spectral sampling in the wavelength range [_wlen-min_, _wlen-max_] - (wavelengths must be provided in nanometers) according to the Planck - function for a reference temperatura which is the source temperature. If - _wlen-min_ and _wlen-max_ are equal, the calculation is monochromatic. Here, - *sw* means shortwaves, i.e. the radiation source is external to the medium - (option *-S*). - -*-T* _optical-thickness_ - Optical thickness used as a criterion to construct atmospheric acceleration - structures. Its default value is - @HTRDR_PLANETO_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD@. - -*-t* _threads-count_ - Hint on the number of threads to use. Default assumes as many threads as CPU - cores. - -*-V* _definition_ - Advice on the definition of the atmospheric acceleration structures. Its - default value is - @HTRDR_PLANETO_ARGS_DEFAULT_GRID_DEFINITION_HINT@. - -*-v* - Make the command verbose. - -# OUTPUT IMAGE - -Images calculated by *htrdr-planeto* are saved in *htrdr-image*(5) file format. -This section describes the nature and arrangement of the output data depending -on the type of calculation. - -## XYZ image - -For image rendering in the visible part of the spectrum (default behavior or -when the *-s cie_xyz* option is set), each pixel stores 4 estimates, or 8 -floating-point values. The first, second and third pairs of numbers store the -estimated radiation in W/sr/m² for the X, Y, and Z components of the CIE 1931 -XYZ color space. For each pair, the first corresponds to the expected value and -the second its standard error. Finally, the fourth and last pair records the -estimate of the calculation time in µs of a radiative path (expected value and -standard error). - -## Longwave image - -If the image is an infrared rendering (option *-s lw*=_wlen-min_,_wlen-max_), -the first and second pixel values store the expected value and standard error of -the estimated brightness temperature in Kelvin. The third and fourth values -record the expected value and standard error of the estimated radiance, which is -either integrated radiance in W/sr/m² or spectral radiance in W/sr/m²/nm -depending on whether this radiance was calculated for a spectral range or at a -single wavelength. The fifth and sixth values are not used and are therefore set -to 0. Finally, the last 2 components of the pixel record the expected value and -the standard error in µs of the calculation time per radiative path. - -## Shortwave image - -For shortwave renderings (option *-s sw*=_wlen-min_,_wlen-max_), the image -layout is the same as for infrared rendering, except for the first and second -pixel values that are not used. That is, the third and fourth values record the -estimated radiance per pixel and the seventh and eighth values store the -estimate of the calculation time by radiative path. The other values are set to -0. - -# EXAMPLES - -The following command line runs *htrdr-planeto* in a verbose way (option *-v*) -to calculate an _800_ by _600_ pixel image by sampling _64_ radiative paths per -pixel for the 3 components of the CIE XYZ 1931 color space. The external source -is positioned at _-45_ degrees longitude and _50_ degrees latitude relative to -the absolute referential. The camera looks at the origin (*tgt=*_0_,_0_,_0_) and -is positioned at _1.5e7_ meters along the Y axis with an image plane aligned -along the Z axis (*up=*_0_,_0_,_1_). Its vertical field of view is _70_ degrees. -The gas of the planetary atmosphere is described by the tetrahedral mesh -recorded in the _gas.smsh_ file, while its spectral data and temperature are -given by the files _gas.sck_ and _gas.rngt_, respectively. Two aerosols complete -the planetary atmosphere: one for _clouds_ and one for _haze_. Their respective -meshes are stored in the _a<1|2>.smsh_ files while their radiative properties -are given by the _a<1|2>.sars_ files. Finally, their phase functions are -described by a set of 2 files: the _a<1|2>.rnsf_ file which lists the aerosol -phase functions and the _a<1|2>.rnpfi_ file which references them by volumetric -mesh node. To speed up rendering time, the normals of the tetrahedral meshes of -the gas and aerosols are precalculated once and for all (option *-N*). The -ground geometry is stored in the _ground.smsh_ file with its triangle properties -(temperature and BRDF) defined in the _ground.rnsp_ file. The referenced BRDFs -are listed in the _ground.rnsl_ file. The definition of acceleration structures -cannot exceed _512³_ and its voxels can be merged until their optical thickness -is greater than _10_. These structures are either reloaded from -_storage_cie.bin_ or built from scratch and stored in _storage_cie.bin_ -depending on whether that file exists or not. Finally, the calculated images are -stored in the _image_CIE_XYZ.ht_ file even if the file already exists (option -*-f*). - -``` -htrdr-planeto -v -N \ - -i def=800x600:spp=64 \ - -s cie_xyz \ - -S lon=-45:lat=50:dst=1.5e8:radius=6.9e5:temp=5778 \ - -C pos=0,1.5e7,0:tgt=0,0,0:up=0,0,1:fov=70 \ - -g mesh=gas.smsh:ck=gas.sck:temp=gas.rngt \ - -a mesh=a1.smsh:radprop=a1.sars:phasefn=a1.rnsf:phaseids=a1.rnpfi:name=clouds \ - -a mesh=a2.smsh:radprop=a2.sars:phasefn=a2.rnsf:phaseids=a2.rnpfi:name=haze \ - -G mesh=ground.smsh:prop=ground.rnsp:brdf=ground.rnsl:name=namek \ - -V 512 -T 10 -O storage_cie.bin \ - -f -o image_CIE_XYZ.ht -``` - -The next command line is the same as the previous one, except that it calculates -an infrared image between _10,000_ nm and _20,000_ nm (option *-s*). Note that -the acceleration structure storage file is no longer the same (_storage_lw.bin_ -rather than _storage_cie.bin_). Indeed, the previous one records the -acceleration structures for the spectral range of the CIE XYZ color space, while -one wants to store/reload the acceleration structures for a spectral range -between 10 and 20 µm (see *-O* option). In any case, if the previous storage, -incompatible with the current spectral range, had been submitted, the command -would have stopped with an error message, thus avoiding the use of the wrong -accelerartion structures. - -``` -htrdr-planeto -v -N \ - -i def=800x600:spp=64 \ - -s lw=10000,20000 \ - -C pos=0,1.5e7,0:tgt=0,0,0:up=0,0,1:fov=70 \ - -g mesh=gas.smsh:ck=gas.sck:temp=gas.rngt \ - -a mesh=a1.smsh:radprop=a1.sars:phasefn=a1.rnsf:phaseids=a1.rnpfi:name=clouds \ - -a mesh=a2.smsh:radprop=a2.sars:phasefn=a2.rnsf:phaseids=a2.rnpfi:name=haze \ - -G mesh=ground.smsh:prop=ground.rnsp:brdf=ground.rnsl:name=namek \ - -V 512 -T 10 -O storage_lw.bin \ - -f -o image_infrared.ht -``` - -# COPYRIGHT - -Copyright © 2018-2019, 2022-2023 Centre National de la Recherche Scientifique++ -Copyright © 2020-2022 Institut Mines Télécom Albi-Carmaux++ -Copyright © 2022-2023 Institut Pierre-Simon Laplace++ -Copyright © 2022-2023 Institut de Physique du Globe de Paris++ -Copyright © 2018-2023 |Méso|Star> <contact@meso-star.com>++ -Copyright © 2022-2023 Observatoire de Paris++ -Copyright © 2022-2023 Université de Reims Champagne-Ardenne++ -Copyright © 2022-2023 Université de Versaille Saint-Quentin++ -Copyright © 2018-2019, 2022-2023 Université Paul Sabatier - -# LICENSE - -*htrdr-planeto* is free software released under the GPLv3+ license: GNU GPL -version 3 or later <https://gnu.org/licenses/gpl.html>. You are free to change -and redistribute it. There is NO WARRANTY, to the extent permitted by law. - -# SEE ALSO - -. VTK file format - - <http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf> - -*htpp*(1), -*htrdr-image*(5), -*mpirun*(1), -*mrumtl*(5), -*rnpfi*(5), -*rnrl*(5), -*rnsf*(5), -*rnsl*(5), -*sars*(5), -*smsh*(5) diff --git a/doc/htrdr.1 b/doc/htrdr.1 @@ -0,0 +1,85 @@ +.\" Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique +.\" Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux +.\" Copyright (C) 2022-2023 Institut Pierre-Simon Laplace +.\" Copyright (C) 2022-2023 Institut de Physique du Globe de Paris +.\" Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) +.\" Copyright (C) 2022-2023 Observatoire de Paris +.\" Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne +.\" Copyright (C) 2022-2023 Université de Versaille Saint-Quentin +.\" Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier +.\" +.\" This program is free software: you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation, either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program. If not, see <http://www.gnu.org/licenses/>. +.Dd September 27, 2023 +.Dt HTRDR 1 +.Os +.Sh NAME +.Nm htrdr +.Nd simulate radiative transfer +.Sh SYNOPSIS +.Nm +.Op Fl vh +.Op Ar mode Op Ar options ... +.Sh DESCRIPTION +.Nm +simulates radiative transfer in scenes composed of heterogeneous +semi-transparent materials and geometries with varying spectral +reflectivities. +.Pp +The way the scenes are described and the Monte Carlo algorithms solved +are controlled by the +.Ar mode +argument, which defines the computational context. +A +.Ar mode +corresponds to a command line named +.Li htrdr- Ns Ar mode +with its set of options. +See the corresponding manual page for a full description. +.Pp +The available modes are as follows: +.Bl -tag -width Ds +.It Cm atmosphere +Calculate radiative transfer in a cloudy atmosphere +.Pq see Xr htrdr-atmosphere 1 . +.It Cm combustion +Calculate radiative transfer in a combustion chamber +.Pq see Xr htrdr-combustion 1 . +.It Cm planeto +Calculate radiative transfer in 3d planetary atmosphere +.Pq see Xr htrdr-planeto 1 . +.El +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl h +Display short help and exit. +.It Fl v +Display the version number and exit. +.El +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr htrdr-atmosphere 1 , +.Xr htrdr-combustion 1 , +.Xr htrdr-planeto 1 +.\".Sh HISTORY +.\".Nm +.\"was initially developed for cloudy atmospheres in High-Tune +.\".Li ANR-16-CE01-0010 . +.\"It was then extended in +.\".Li MODEVAL-URBA 2019 . +.\"Support for combustion chambers was added in Astoria +.\".Li ANR-18-CE05-0015 . +.\"Planetology simulations were developed in RaD-net +.\".Li ANR-21-CE49-0020 . diff --git a/doc/htrdr.1.scd b/doc/htrdr.1.scd @@ -1,88 +0,0 @@ -htrdr(1) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -htrdr - the Monte-Carlo radiative transfert simulator - -# SYNOPSIS - -htrdr [-v] [-h] <_mode_> [<_args_>] - -# DESCRIPTION - -*htrdr* computes images of scenes composed of semi transparent materials and -geometries with spectral varying reflectivities. The way the scenes are -described and the solved Monte-Carlo algorithms are controlled by the _mode_ -argument that defines the computation context. - -# OPTIONS - -*-h* - Print short help and exit. - -*-v* - Display version information and exit. - -# MODES - -Each *htrdr* _mode_ is actually a mapping to a seperate command line named -_htrdr-<mode>_ with its own set of arguments. Refer to their corresponding -man page for their complete description. - -The available _htrdr-<mode>_ commands are: - -*htrdr-atmosphere*(1) - Radiative transfer computations in a cloudy atmosphere. - -*htrdr-combustion*(1) - Radiative transfer computations in a combustion medium. - -*htrdr-planeto*(1) - Radiative transfer computations in 3D planetary atmosphere. - -# COPYRIGHT - -Copyright © 2018-2019, 2022-2023 Centre National de la Recherche Scientifique++ -Copyright © 2020-2022 Institut Mines Télécom Albi-Carmaux++ -Copyright © 2022-2023 Institut Pierre-Simon Laplace++ -Copyright © 2022-2023 Institut de Physique du Globe de Paris++ -Copyright © 2018-2023 |Méso|Star> <contact@meso-star.com>++ -Copyright © 2022-2023 Observatoire de Paris++ -Copyright © 2022-2023 Université de Reims Champagne-Ardenne++ -Copyright © 2022-2023 Université de Versaille Saint-Quentin++ -Copyright © 2018-2019, 2022-2023 Université Paul Sabatier - -# LICENSE - -*htrdr* is free software released under the GPLv3+ license: GNU GPL version 3 -or later <https://gnu.org/licenses/gpl.html>. You are free to change and -redistribute it. There is NO WARRANTY, to the extent permitted by law. - -# SEE ALSO - -*htrdr-atmosphere*(1), -*htrdr-combustion*(1), -*htrdr-planeto*(1) diff --git a/rnrl.5 b/doc/rnrl.5 diff --git a/doc/rnrl.5.scd b/doc/rnrl.5.scd @@ -1,82 +0,0 @@ -rnrl(5) - -; Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -; Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -; Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -; Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -; Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -; Copyright (C) 2022-2023 Observatoire de Paris -; Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -; Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -; Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see <http://www.gnu.org/licenses/>. - -# NAME - -rnsr - Rad-Net Radiance List file format - -# DESCRIPTION - -*rnrl* is a binary file format for storing a list of spectrally varying -radiances. The radiances (in W/m²/sr/m) are listed by wavelength (in nm) -sorted in ascending order. - -A *rnrl* file is actually a Star-Buffer file (see *sbuf*(5)). It starts with a -header of 4 64-bit integers describing the layout of the data. The first integer -is a power of two (usually 4096) which defines the size of the memory page in -bytes on which the list of radiances by wavelength aligns (_pagesize_). The -second integer is the _size_ of the array, that is, the number of wavelengths -for which a radiance is defined. Finally, the remaining 2 integers store the -memory size (16 bytes) and memory alignment (16 bytes) of a radiance per -wavelength. - -The fill bytes follow the file header to align the radiances by wavelength to -_pagesize_. - -Each item in the list is composed of 2 double-precision floating-point values: -the wavelength in nanometers and its corresponding radiance in W/m²/sr/m. - -The end of the file is eventually padded with dummy bytes to ensure that the -overall file size is a multiple of _pagesize_. - -# BINARY FILE FORMAT - -Data are encoded with respect to the little endian bytes ordering, i.e. least -significant bytes are stored first. - -``` -<rnsr> ::= <pagesize> <size> 16 16 - <padding> - <radiances> - <padding> - -<pagesize> ::= UINT64 -<size> ::= UINT64 # Number of items stored - ---- - -<radiances> ::= <property> ... ... -<property> ::= <wavelength> <radiance> -<wavelength> ::= DOUBLE # in nanometer -<radiance> ::= DOUBLE # in W/m²/sr/m - ---- - -<padding> ::= [ BYTE ... ] # Ensure alignement -``` - -# SEE ALSO - -*sbuf*(5) diff --git a/htrdr.1 b/htrdr.1 @@ -1,75 +0,0 @@ -.\" Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -.\" Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -.\" Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -.\" Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -.\" Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -.\" Copyright (C) 2022-2023 Observatoire de Paris -.\" Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -.\" Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -.\" Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -.\" -.\" This program is free software: you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation, either version 3 of the License, or -.\" (at your option) any later version. -.\" -.\" This program is distributed in the hope that it will be useful, -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.\" GNU General Public License for more details. -.\" -.\" You should have received a copy of the GNU General Public License -.\" along with this program. If not, see <http://www.gnu.org/licenses/>. -.Dd September 27, 2023 -.Dt HTRDR 1 -.Os -.Sh NAME -.Nm htrdr -.Nd simulate radiative transfer -.Sh SYNOPSIS -.Nm -.Op Fl vh -.Op Ar mode Op Ar options ... -.Sh DESCRIPTION -.Nm -simulates radiative transfer in scenes composed of heterogeneous -semi-transparent materials and geometries with varying spectral -reflectivities. -.Pp -The way the scenes are described and the Monte Carlo algorithms solved -are controlled by the -.Ar mode -argument, which defines the computational context. -A -.Ar mode -corresponds to a command line named -.Li htrdr- Ns Ar mode -with its set of options. -See the corresponding manual page for a full description. -.Pp -The available modes are as follows: -.Bl -tag -width Ds -.It Cm atmosphere -Calculate radiative transfer in a cloudy atmosphere -.Pq see Xr htrdr-atmosphere 1 . -.It Cm combustion -Calculate radiative transfer in a combustion chamber -.Pq see Xr htrdr-combustion 1 . -.It Cm planeto -Calculate radiative transfer in 3d planetary atmosphere -.Pq see Xr htrdr-planeto 1 . -.El -.Pp -The options are as follows: -.Bl -tag -width Ds -.It Fl h -Display short help and exit. -.It Fl v -Display the version number and exit. -.El -.Sh EXIT STATUS -.Ex -std -.Sh SEE ALSO -.Xr htrdr-atmosphere 1 , -.Xr htrdr-combustion 1 , -.Xr htrdr-planeto 1