stardis-spk

Scripts and datasets for running Stardis simulations
git clone git://git.meso-star.fr/stardis-spk.git
Log | Files | Refs | README | LICENSE

README.md (11036B)


      1 # Stardis: Starter Pack
      2 
      3 The Stardis: Starter Pack is a collection of input data sets ready for
      4 use with `stardis`, over a few examples.
      5 It also provides POSIX shell scripts that make easier the invocation of
      6 the `stardis` program.
      7 It gives an overview of the required input data and the features of
      8 `stardis`.
      9 
     10 ## Quick start
     11 
     12 Assuming that `stardis` is correctly installed and registered against
     13 your current POSIX shell, simply run the POSIX shell script of the
     14 example that you want to run.
     15 For instance:
     16 
     17     ~/Stardis-StarterPack $ cd heatsink
     18     ~/Stardis-StarterPack/heatsink $ sh run_medium_computation.sh
     19 
     20 On script invocation, `stardis` is ran according to the data of the
     21 example and the simulation parameters defined in the `USER PARAMETERS`
     22 section of the script.
     23 Each example and its launching script is explained hereafter.
     24 
     25 ## Content
     26 
     27 ### The cube
     28 
     29 This example is simply a cube of solid with a constant source term in
     30 the whole volume.
     31 Only thermal conduction is considered in this example.
     32 The interest of this example is to be able to compare with an
     33 unstationary analytical solution.
     34 
     35 The 3 provided POSIX shell scripts illustrate 3 main features of
     36 Stardis: the *probe computation*, the *visualization of thermal paths*
     37 and the *Green function evaluation*.
     38 
     39 #### Geometric data and physical properties
     40 
     41 The geometric data are described in ASCII STL format.
     42 The cube is provided in the `solid.stl` file.
     43 If you visualize the stl file with a software like `paraview` or
     44 `meshlab`, you can see that the cube is described by a basic
     45 triangulation.
     46 Stardis does not require a fine meshing: the computation is not based on
     47 any geometrical meshing; the STL file must only describe the boundary of
     48 a solid.
     49 
     50 You can see three other STL files: `left_bc.stl`, `right_bc.stl` and
     51 `center_bc.stl`.
     52 These files are required to attach boundary conditions to the geometry.
     53 We note an important constraint in the CAD process: the triangles in
     54 these boundary STL files which coincide with the triangles in the solid
     55 STL files must be *rigorously* the same.
     56 This *conformal mesh* constraint is also required for adjacent solids
     57 that share a common interface.
     58 
     59 Finally you can have a look at the `model.txt` file which is the
     60 `stardis` input data file.
     61 In this file we *connect*:
     62 
     63 - physical properties (thermal conductivity, thermal capacity, ...) to
     64   the geometrical data (here `solid.stl` only);
     65 
     66 - boundary conditions to the geometrical data.
     67   You can see here a fixed temperature (Dirichlet boundary condition) is
     68   applied to the boundaries represented by `right_bc.stl` and
     69   `left_bc.stl`, and a null flux condition is applied to the boundaries
     70   represented by `center_bc.stl` (adiabatic boundaries).
     71 
     72 You can refer to the
     73 [stardis-input](https://www.meso-star.com/projects/stardis/man/man5/stardis-input.5.html)
     74 man page to read this file and modify it as you wish.
     75 
     76 #### Probe computation
     77 
     78 The script `run_probe_computation.sh` invokes the `stardis` program in
     79 order to compute the temperature at the center of the cube for different
     80 values of time.
     81 The results will be recorded in a file and plotted with gnuplot
     82 (provided it has been installed), in order to compare results obtained
     83 by `stardis` to the analytical solution stored in the `analytical_T.txt`
     84 file.
     85 
     86 Assuming the current shell directory is `~/Stardis-StarterPack/cube` and
     87 that the `stardis` program is registered against the current shell, you
     88 can run the script using the following command:
     89 
     90     ~/Stardis-StardisPack/cube $ sh ./run_probe_computation.sh
     91 
     92 You can also simply invoke the `stardis` program in order to compute the
     93 temperature at the center of the cube at steady state, by using the
     94 following command:
     95 
     96     ~/Stardis-StarterPack/cube $ stardis -M model.txt -p 0.5,0.5,0.5 -e
     97 
     98 Please refer to the
     99 [stardis](https://www.meso-star.com/projects/stardis/man/man1/stardis.1.html)
    100 man page for an explanation about command-line options.
    101 The shell script can be edited and modified.
    102 For instance, in section `USER PARAMETERS`, the number of Monte-Carlo
    103 samples or the value of the probe time can be changed.
    104 
    105 #### Dump some "thermal paths"
    106 
    107 The script `run_dump_paths.sh` invokes `stardis` twice:
    108 
    109 - first to dump the scene in the **vtk** format.
    110   This feature is useful for checking the integrity of the geometrical
    111   data.
    112   For instance if the STL files provide a non-conformal triangle mesh,
    113   some errors will be mentioned in the vtk file.
    114 
    115 - to produce some "thermal paths", starting from the probe position and time.
    116   Visualising these paths provides useful information about the boundary
    117   or initial conditions that are involved for the computation of the
    118   probe temperature, as well as their relative importance.
    119   This example is simple but yet allows the visualization of thermal
    120   paths in a complex geometry where radiative, convective and conductive
    121   heat transfers are coupled.
    122 
    123 You can modify the number of paths or the probe position by editing the
    124 script.
    125 
    126 #### Green function evaluation
    127 
    128 The last script `run_green_evaluation.sh` shows how to estimate the
    129 Green function with `stardis` and how to use it with the `sgreen`
    130 program.
    131 On first invocation, the script runs `stardis` to evaluate the Green
    132 function by generating the required number of thermal paths and store
    133 some data (the end position of each path) in a binary file.
    134 This Green function is evaluated for the probe position defined in the
    135 `USER PARAMETERS SECTION`.
    136 
    137 This Green function is independent of the value of the sources (values
    138 of boundary and initial conditions, as well as the volumetric source
    139 term).
    140 If you launch the script again, the
    141 [sgreen](https://www.meso-star.com/projects/stardis/man/man1/sgreen.1.html)
    142 program will process the Green function to compute the probe
    143 temperature, for the current values of sources (no matter whether they
    144 have been modified or not); in order to modify the values of the
    145 sources, the following line should be modified in the script:
    146 
    147     SOURCES_AND_BOUNDARIES="CUBE.VP=12 LTEMP.T=290 RTEMP.T=310 ADIA.F=5.2"
    148 
    149 with `CUBE.VP` the value of the volumetric source term (in W/m^3);
    150 `LTEMP.T` and `RTEMP.T` the values of the temperature on the left
    151 (`LTEMP`) and right (`RTEMP`) boundaries respectively (in K); and
    152 `ADIA.F` the value of the heat flux density imposed to the boundary
    153 `ADIA` (in W/m^2).
    154 The names of the sources (here `CUBE`, `RTEMP`, `LTEMP` and `ADIA`) are
    155 simply the names used in the `model.txt` file.
    156 
    157 Please note that `ADIA` being a boundary of type flux (defined by the
    158 `F_BOUNDARY_FOR_SOLID` keyword in the `model.txt` file) the
    159 corresponding source value is named `ADIA.F` and not `ADIA.T` as for
    160 boundaries of type temperature.
    161 
    162 ### The heatsink
    163 
    164 This example is more complex than the previous one.
    165 It represents an electronic chip with its heatsink.
    166 As mentioned in the `model.txt` file, the model is composed of three
    167 media: the heasink, the chip that produces heat and an interface
    168 material between the heatsink and the chip.
    169 
    170 The `run_medium_computation.sh` script launches `stardis` to compute the
    171 mean temperature in the *chip* at steady state.
    172 It will also create the geometry in vtk format.
    173 
    174 The `run_medium_computation_multiple.sh` script does the same
    175 computation for the model described in file `model_multiple.txt`.
    176 While this is an assembly of 50 similar electronic devices, the
    177 computation time will not be 50 times greater: it will be of the same
    178 order of magnitude.
    179 
    180 ### The porous medium
    181 
    182 In this example, we show an original feature: infrared rendering.
    183 `stardis` is able to render a scene in infrared without prior knowledge
    184 of the temperature field.
    185 
    186 The `run_IR_rendering.sh` script provides an example to launch `stardis`
    187 in rendering mode.
    188 The scene is an idealized porous medium above a reflective plane.
    189 Some parameters can be modified in the `USER PARAMETERS` section, such
    190 as the resolution of the image and the number of samples per pixel.
    191 For each pixel of the image, the luminance is computed by Monte-Carlo
    192 and the number of realizations is the specified number of samples per
    193 pixel.
    194 Computing a high-definition image with little statistical noise can
    195 therefore take a long time (many hours).
    196 The values of the parameters provided in the script should result in a
    197 computation time of about a dozen minutes on a recent low-end desktop
    198 computer.
    199 
    200 More information about the rendering is provided in the `stardis` man
    201 page (such as the parameters associated with the point of view).
    202 
    203 Acknowledgement to Cyril Caliot who designed the porous model for the
    204 Optisol project (ANR-11-SEED-0009, PROMES-CNRS, CIRIMAT, SICAT, LTN).
    205 This model represents an ideal metallic or SiC foam.
    206 This type of foam is used in the design of heat exchangers in
    207 concentrated solar processes in order to transfer incoming solar
    208 radiation energy to a working fluid.
    209 
    210 ### The city
    211 
    212 This last example shows the ability to deal with geometrical small-scale
    213 details in a larger scene.
    214 The scene is a pseudo-realistic city composed of buildings with
    215 geometrical details like glazing (~ 24 mm width), internal insulation
    216 and balconies.
    217 
    218 An infrared rendering of this scene illustrates typical thermal bridges
    219 in a building, at floor-wall junctions and balcony-floor junctions.
    220 And for didactic reasons, there is no insulation of the roof.
    221 
    222 The rendering is obtained at steady state with a known external air
    223 temperature of 0°C and a known internal air temperature of 20°C (which
    224 is a simple model for a perfect heating system).
    225 The temperature field is unknown at any position in the buildings and in
    226 the ground.
    227 The temperature is set at 13°C at a depth of 5 meters.
    228 We have also added a "lake" (modeled as a reflecting solid) in front of
    229 the buildings to get some specular reflection.
    230 
    231 As for the previous example, the `run_IR_rendering.sh` script provides an
    232 example to launch `stardis` in rendering mode and some parameters can be
    233 modified in the `USER PARAMETERS` section. With the default parameters, the
    234 computation time may take several hours.
    235 
    236 ## Release notes
    237 
    238 ### Version 0.2.1
    239 
    240 - Fix several scripts that were not working properly with Stardis 0.12.
    241 - Update the radiative ambient temperature of the urban scene.
    242   It had been set to 300 K, which did not match the originally planned
    243   configuration, which called for a temperature of 273 K.
    244   The resulting image was therefore saturated: all displayed
    245   temperatures exceeded the expected range of 273 to 275 K.
    246 
    247 ### Version 0.2
    248 
    249 - Updates input files to make them compatible with file format updates
    250   introduced by Stardis 0.8.
    251 - Make script shells POSIX compliant.
    252 
    253 ### Version 0.1
    254 
    255 Add the `city` exemple
    256 
    257 ## Copyright notice
    258 
    259 Copyright (C) 2021, 2022, 2026 [|Meso|Star>](http://www.meso-star.com) (contact@meso-star.com)
    260 
    261 ## License
    262 
    263 Stardis: Starter Pack is free software released under the GPLv3+
    264 license: GNU GPL version 3 or later.
    265 You can freely study, modify or extend it.
    266 You are also welcome to redistribute it under certain conditions; refer
    267 to the [license](https://www.gnu.org/licenses/gpl.html) for details.