star-phor-input

File format for describing photoreactor configurations
git clone https://www.edstar.cnrs.fr/git/star-phor-input.git
Log | Files | Refs | README | LICENSE

commit 4c460c5f48ac0487abc0a818defa451820881af7
parent adb0bad3e90fbae7ab965ff236d65b6ed734932c
Author: Eduardo Fontana Lazzari <edufonlaz@gmail.com>
Date:   Tue, 10 Feb 2026 12:53:10 +0100

WIP: Collective proofreading of examples in star-phor-input.5

Diffstat:
Mdoc/star-phor-input.5.scd | 108+++++++++++++++++++++++++++++++++++++------------------------------------------
1 file changed, 50 insertions(+), 58 deletions(-)

diff --git a/doc/star-phor-input.5.scd b/doc/star-phor-input.5.scd @@ -202,10 +202,42 @@ The syntax rules enabling the description of a photoreactor are as follows: # EXAMPLES -1. The example below describes a simple photoreactive system composed of a cube, -in which only absorption takes place. Absorption is due to the specie "chemical -1", with a concentration of 1 mol/m^3, and whose absorption cross section is -provided in the file "sigma_a.txt" in m^2/mol for wavelengths in nm. Cube walls +1. The example below describes a simple photoreactive system composed of +a cube, in which only absorption takes place. The volume and surface are +composed by several .stl files each. In the following example, the top +and the bottom surface of the cube are light sources, which emit light +with a defined flux density (total flux 200e-6 mol/m^2/s), with a +spectrum defined in "spectrum.txt". Emission directions follow a +Lambertian distribution. The volume of the cube is defined as the union +of these two surfaces with the side walls. Absorption is due to the +specie "chemical 1", with a concentration of 1 mol/m^3, and whose +absorption cross section is provided in the file "sigma_a.txt" in +m^2/mol for wavelengths in nm. Here, the volume of the cube is defined +as a sensor, with a unit response function, enabling for instance to +compute the number of photons absorbed within the cube per second. + +``` +volume: "reaction volume" + geometry: FRONT cube_top.stl + geometry: FRONT cube_bottom.stl + geometry: FRONT cube_walls.stl + prop_rad: "chemical 1" + scatterer: + concentration: 1 mol/m^3 + cross_sections: + abs_cross_sec: sigma_a.txt nm m^2/mol + sensor: + response_function: 1 + +surface: "light sources" + geometry: FRONT cube_top.stl + geometry: FRONT cube_bottom.stl + source: + flux_density: 200e-6 mol/m^2/s spectrum.txt nm nm^-1 + direction: LAMBERT +``` + +2. Cube walls have a reflectivity of 10%, with a diffuse (Lambertian) distribution. A LED panel emits light with a defined flux density (total flux 200e-6 mol/m^2/s), with a spectrum defined in "spectrum.txt". Emission directions follow a @@ -215,9 +247,8 @@ unit response function, enabling for instance to compute the number of photons absorbed within the cube per second. ``` -# Keyword name -volume: "reaction volume" - geometry: FRONT cube.stl +volume: "reaction volume" + geometry: FRONT cube.stl prop_rad: "chemical 1" SCATTERER concentration: 1 mol/m^3 cross_sections: @@ -225,78 +256,36 @@ volume: "reaction volume" sensor: response_function: 1 -# Keyword name surface: "cube walls" geometry: BACK cube.stl - brdf: LAMBERT 0.1 + brdf: LAMBERT 0.1 # OPTIQUE GEOMETRIQUE -# Keyword name surface: "led panel" geometry: FRONT led_panel.stl mm brdf: LAMBERT 0 source: flux_density: 200e-6 mol/m^2/s spectrum.txt nm nm^-1 direction: COLLIM NORMAL +``` + +?. A surface in which both sides have the same properties. Note that +this same syntax is not allowed when the surface is also a source. Such +case is treated in example ?. -# A surface in which both sides have the same properties. -# Note that this same syntax is not allowed when the -# surface is also a source. Such case is treated in example 3. -# Keyword name +``` surface: "reflecting base" geometry: FRONT base.stl geometry: BACK base.stl brdf: SPECULAR 0.9 ``` -2. The example below describes a volume and a surface source composed by several -.stl files each. In the following example, the top and the bottom surface of the -cube are light sources. The volume of the cube is defined as the union of these -two surfaces with the side walls. - -``` -# Keyword name -volume: "reaction volume" - geometry: FRONT cube_top.stl - geometry: FRONT cube_bottom.stl - geometry: FRONT cube_walls.stl - prop_rad: "chemical 1" SCATTERER - concentration: 1 mol/m^3 - cross_sections: - abs_cross_sec: sigma_a.txt nm m^2/mol - sensor: - response_function: 1 - -# Keyword name -surface: "light sources" - geometry: FRONT cube_top.stl - geometry: FRONT cube_bottom.stl - source: - flux_density: 200e-6 mol/m^2/s spectrum.txt nm nm^-1 - direction: LAMBERT -``` - 3. The example below describes the case in which both sides of a same surface emit. Since both sides are composed by the same set of triangles, each side of the geometry has to be entered as a separated source in order to ensure that the total flux of the source is properly computed. ``` -# Keyword name -volume: "reaction volume" - geometry: FRONT reaction_volume.stl - prop_rad: "chemical 1" SCATTERER - concentration: 1 mol/m^3 - cross_sections: - abs_cross_sec: sigma_a.txt nm m^2/mol - sensor: - response_function: 1 - -# If both sides of a same geometry are emitting surfaces, -# they have to be entered as separeted surfaces, -# even if the source properties are identical. - # The front side of the source -# Keyword name surface: "light source front" geometry: FRONT light_source.stl source: @@ -304,7 +293,6 @@ surface: "light source front" direction: LAMBERT # The back side of the source -# Keyword name surface: "light source back" geometry: BACK light_source.stl source: @@ -312,8 +300,12 @@ surface: "light source back" direction: LAMBERT ``` -# SEE ALSO +?. On peut aussi décorer en deux temps +LAMBERTAN + + +# SEE ALSO _sphin-lint_(1) https://en.wikipedia.org/wiki/Backus-Naur_form