meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

stardis.md.in (16481B)


      1 # Stardis
      2 
      3 Stardis is a *thermal simulation* framework for *complex 2D and 3D
      4 environments*, based on new *Monte Carlo* algorithms built from
      5 reformulations of the main heat transfer phenomena: conduction,
      6 convection and radiation.
      7 A set of cross-recursive algorithms have then been derived, and result
      8 in the simulation of "*thermal paths*" that explore space and time until
      9 a boundary condition or an initial condition is found.
     10 The key concept here is that heat transfer phenomena are not considered
     11 separately but are *naturally coupled* via the cross-recursion of the
     12 various Monte Carlo algorithms.
     13 
     14 [![Foam](thumbs/foam_path.jpg)](images/foam_path.jpg)
     15 
     16 > Example of conductive path sampled by Stardis in a foam geometry: it
     17 > starts from the probe position (green point) and after several
     18 > diffusive steps reaches a boundary condition (red point).
     19 
     20 Beyond its use as a regular thermal simulation tool, the Stardis
     21 framework explicitly targets engineers, researcher, teachers or students
     22 wishing to fully appropriate the *statistical formulation of heat
     23 transfer*, from theoretical concepts to practical implementation.
     24 The complete Stardis
     25 framework is thus released under [free license](#license)
     26 that guarantee the users the ability to freely use, study, modify or
     27 extend the complete source code according to their needs.
     28 
     29 Despite its specific advantages, Stardis is not meant to fully replace
     30 already well established and highly validated thermal simulation tools.
     31 Instead, it can be seen as an additional tool that can be useful for
     32 various purposes:
     33 
     34 - *Probe computation*: Stardis will _not_ compute the full temperature
     35   field of a system;
     36   instead, it can be used to focus on a specific
     37   spatial/temporal zone of the system.
     38 
     39 - *Reference method*: the numerical uncertainty is a unique feature of
     40   stochastic methods.
     41   It can be reduced using a reformulation of the underlying integral for
     42   specific problems, and possibly using better suited sampling
     43   techniques.
     44   Ultimately, the numerical uncertainty can also be reduced by
     45   increasing the number of statistical samples.
     46   Any value of temperature (or flux) computed by Stardis must agree with
     47   the values computed by other tools, within the uncertainty range (and
     48   also within the limits of validity of the various
     49   [assumptions](#hypothesis) used to derive the Monte Carlo algorithms
     50   used in Stardis).
     51   This can prove very useful in order to validate any result obtained by
     52   any thermal solver in a case when no analytic solution is available or
     53   when a physical intuition is impossible to achieve due to the
     54   complexity of the problem.
     55 
     56 - *Educational purposes*: since the various probability sets used by the
     57   underlying Monte Carlo algorithms solely rely on the physics, thermal
     58   paths naturally explore the spatial and temporal zones of interest in
     59   the system.
     60   This can be a drawback in some situations (the paths will have a hard
     61   time exiting a highly conductive solid surrounded by non-conductive
     62   media) but is a major asset for the [direct visualization](#visu) of
     63   what contributes to a given result: the main sources of heat, what
     64   transfer modes are dominant, what are the main paths of heat transfer,
     65   etc.
     66 
     67 - *Sensitivity analysis*: the [Green functions](#green) of the system
     68   (estimated and stored during an initial Monte Carlo computation) can
     69   be reused for subsequent (very fast) post-processing computations.
     70   This makes possible to explore the sensitivity of any given result to
     71   the variations of a boundary or initial condition, or internal power
     72   source.
     73   This technique is only a small part of a family of so-called
     74   "symbolic" Monte Carlo algorithms that extend the scope of sensitivity
     75   analysis to any thermal parameter (for instance: the conductivity of a
     76   given solid, a convective exchange coefficient or the emissivity of a
     77   solid).
     78 
     79 <span id="insensib"/>
     80 
     81 [![Plot computation time](thumbs/plot_insensib_MC.jpg)](images/plot_insensib_MC.jpg)
     82 
     83 > Stardis computation time as function of geometrical refinement.
     84 > Both the standard Monte Carlo computation and the Green function
     85 > construction and usage are insensitive.
     86 > In this example, once constructed, *using the Green function with any
     87 > new set of sources is 10³ times faster than Monte Carlo*.
     88 
     89 The Stardis framework is structured around *two main components*.
     90 The first one, [Stardis-Solver](#solver), is the core library that
     91 implements the Monte Carlo algorithms.
     92 The second one is the [Stardis application](#cli), a command line tool
     93 that can be seen as a reference implementation of a complete workflow
     94 relying on Stardis-Solver, from input data describing the system to
     95 simulate (geometry, thermal properties, limit conditions, etc.)
     96 to heat transfer simulation and results post-processing.
     97 See below for more information on each of these components.
     98 
     99 ## Related articles
    100 
    101 - [Caliot et al. 2024](https://doi.org/10.1016/j.ijheatmasstransfer.2023.125139),
    102   "Coupled heat transfers resolution by Monte Carlo in urban geometry
    103   including direct and diffuse solar irradiations", International
    104   Journal of Heat and Mass Transfer
    105   ([open access](https://hal.science/hal-04251373))
    106 
    107 - [Penazzi et al. 2024](https://doi.org/10.1016/j.cpc.2023.108911),
    108   "Path integrals formulations leading to propagator evaluation for
    109   coupled linear physics in large geometric models", Computer Physic
    110   Communications
    111   ([open access](https://hal.science/hal-04204702v2))
    112 
    113 - [Bati et al. 2023](https://dx.doi.org/10.1145/3592121),
    114   "Coupling Conduction, Convection and Radiative Transfer in a Single
    115   Path-Space: Application to Infrared Rendering", SIGGRAPH
    116   ([open access](https://hal.science/hal-04090428))
    117 
    118 - [Tregan et al. 2023](https://doi.org/10.1371/journal.pone.0283681),
    119   "Coupling radiative, conductive and convective heat-transfers in a
    120   single Monte Carlo algorithm: A general theoretical framework for
    121   linear situations", PLOS ONE
    122   ([open access](https://hal.science/hal-03819157))
    123 
    124 - [Villefranque et al. 2022](https://doi.org/10.1126/sciadv.abp8934),
    125   "The “teapot in a city”: A paradigm shift in urban climate modeling",
    126   Science Advances
    127   ([open access](https://arxiv.org/abs/2204.14227))
    128 
    129 <span id="solver"/>
    130 
    131 ## Stardis-Solver
    132 
    133 [Stardis-Solver](https://gitlab.com/meso-star/stardis-solver.git) is the
    134 core library of Stardis:
    135 it simulates coupled convecto - conducto - radiative heat transfers by
    136 sampling thermal paths that explore space and time until a boundary
    137 condition or an initial condition is met.
    138 Note that this path formulation does not require *any volumetric mesh*:
    139 in addition of the thermal properties and the limit/boundary conditions,
    140 only the geometry defining the contours of the objects is necessary.
    141 
    142 <span id="hypothesis"/>
    143 
    144 The coupled Monte Carlo algorithms implemented into Stardis-Solver are
    145 based on the following hypothesis:
    146 
    147 - *Conduction*:
    148   Stardis-Solver offers two ways of sampling unsteady Brownian motion to
    149   solve for conductivity in a solid.
    150   The [delta sphere](https://doi.org/10.1371/journal.pone.0283681)
    151   algorithm is based on the discrimination of thermal heat transfer in
    152   solids, which introduces the notion of conductive path length.
    153   Solutions obtained using this algorithm are formally exact to the
    154   limit of zero path length.
    155   In practice, this path length must be adapted to a given geometrical
    156   configuration so that its value is small compared to the smallest
    157   typical space-time length of a solid.
    158 
    159   As an alternative, the
    160   [Walk on Sphere](https://www.jstor.org/stable/2237369)
    161   algorithm samples an unbiased diffuse trajectory in a solid with
    162   Dirichlet boundary conditions, unbiased with respect to what numerical
    163   accuracy can account for.
    164   Its coupling with other boundary or connection conditions behaves as
    165   with the delta sphere algorithm, i.e.  the solution is exact when the
    166   length of the trajectory used as a first-order approximation tends
    167   towards 0.
    168 
    169 - *Convection*: fluid media are supposed to be *isothermal*, even if
    170   their temperature may vary with time.
    171   This hypothesis relies on the assumption of perfectly agitated fluids.
    172 
    173 - *Radiation*:
    174   local radiative transfer is solved by an
    175   [iterative numerical method ](https://hal.archives-ouvertes.fr/tel-03266863/)
    176   (Picard algorithm) that requires the knowledge of a reference
    177   temperature field.
    178   At the basic level (one level of recursion), and using a uniform
    179   reference temperature field, this algorithm translates into the
    180   hypothesis of a linearized radiative transfer.
    181   Using a higher order or recursion makes possible to converge the
    182   result closer to the solution of a rigorous spectrally-integrated
    183   radiative transfer (a difference of temperatures to the power 4 when
    184   integrated over the whole spectrum).
    185   The higher the recursion order, the better will be the convergence of
    186   the algorithm.
    187 
    188 The main functionalities provided by Stardis-Solver upon the aforementioned
    189 hypothesis are as follows:
    190 
    191 - *Probe computation*:
    192   Stardis-Solver computes the temperature at any given position
    193   (spatial and temporal).
    194   The main idea is that thermal paths start from this probe position,
    195   and scatter in space while going back in time, until a (spatial)
    196   boundary condition or a (temporal) initial condition is met.
    197   In addition to the value of temperature, using a Monte Carlo method
    198   makes it possible to compute a *numerical uncertainty* (standard
    199   deviation of the weight distribution) over each result.
    200 
    201 - *Integrated calculation*:
    202   thanks to Monte Carlo, Stardis-Solver can calculate the temperature of
    203   an entire volume or surface, over a given time range, without
    204   increasing calculation time or uncertainty compared with a probe-based
    205   calculation at a specific point in time.
    206 
    207 - *Flux computation*:
    208   Stardis-Solver can compute the flux over any surface (or group of
    209   surfaces) at any time.
    210   Alternatively, it can also compute the total energy output from a
    211   solid element where an internal source of power must be taken into
    212   account.
    213 
    214 <span id="green"/>
    215 
    216 - *Green function*:
    217   the value of temperature computed at a probe position is no more than
    218   the mean of the Monte Carlo weights of a set of thermal paths.
    219   In practice: when no internal power source has to be considered, the
    220   weight of any given thermal path is the temperature of the boundary or
    221   initial condition that has been reached;
    222   when internal power sources or imposed fluxes are taken into account,
    223   additional contributions to the weight must be continuously evaluated
    224   by the thermal conduction algorithm, but these contributions are
    225   proportional to the local dissipated power and imposed flux.
    226 
    227   In any case, the position and date at the end of each thermal path (and also
    228   accumulation coefficients) can be stored during a first complete Monte Carlo
    229   simulation.
    230   This information, known as the Green function, can then be used in a
    231   ([very fast](#insensib)) post-processing step to compute all
    232   required results for different boundary and initial conditions (and
    233   also different internal power sources and imposed flux).
    234 
    235 - *Infrared rendering*:
    236   Stardis can render a scene in infrared without prior knowledge of the
    237   temperature field.
    238   Thermal paths that start at the camera in radiative mode propagate
    239   through the model, possibly in conductive, convective or radiative
    240   mode until reaching a boundary condition (or an initial condition in a
    241   non-stationary case).
    242 
    243 - *Temporal dynamics analysis*:
    244   Stardis-Solver can output the end of each path sampled during a Monte
    245   Carlo computation, including position, elapsed time, and
    246   boundary/medium ID.
    247   This not only allows to weight the contribution of each boundary or initial
    248   condition to the result, but also gives the temporal dynamics of these
    249   contributions.
    250 
    251 <span id="visu"/>
    252 
    253 - *Thermal path visualization*:
    254   Stardis-Solver can output the complete history of a set of thermal
    255   paths for later visualization.
    256   In addition to positions and dates, physics data is stored along
    257   thermal paths, such as the type of heat transfer phenomenon involved
    258   at each step, the accumulated power and flux, etc.
    259 
    260 [![Ramier island with sun](thumbs/ramier_island_sun.jpg)](images/ramier_island_sun.png)
    261 
    262 > Infrared rendering by Stardis of a city district generated by
    263 > [City\_Generator2](https://gitlab.com/meso-star/city_generator2)
    264 > from the cadastral map of Ile du Ramier in Toulouse, France.
    265 > Temperature are given in Kelvin.
    266 > The coupled exchanges of convection, conduction and
    267 > radiation are evaluated within and between all buildings, i.e. in each
    268 > room, through every pane of glass and wall with insulation, via the
    269 > floor, etc.
    270 > Note that shadows are "heat" shadows produced by the sun defined as an
    271 > external source boundary condition.
    272 
    273 <span id="cli"/>
    274 
    275 ## Stardis CLI tools
    276 
    277 The stardis framework includes Command Line Interface (CLI) software, namely
    278 [stardis](man/man1/stardis.1.html)
    279 and
    280 [sgreen](man/man1/sgreen.1.html),
    281 to use along with Stardis-Solver.
    282 They make it easy to exploit the features of the solver.
    283 
    284 - *stardis*:
    285   it is the main CLI tool of the Stardis framework.
    286   It is a barebone front-end to the stardis solver.
    287   Depending on the provided command line arguments, it simulates a
    288   thermal system described through a simple text file and geometry files
    289   and produces various types of output, from simple Monte Carlo results
    290   to infrared images or Green functions.
    291   Refer to its [manual page](man/man1/stardis.1.html) for more
    292   informations.
    293 
    294 - *sgreen*
    295   the purpose of `sgreen` is to post-process binary
    296   green-function files produced by `stardis`.
    297   It allows to apply a set of values to the initial and boundary
    298   conditions as well as the power and flux sources of the model to
    299   produce the same result a new simulation would produce.
    300   The obvious benefit of using the `sgreen` post-process
    301   instead of a new Monte Carlo simulation is the tremendous
    302   improvement on computation time.
    303   Refer to its [manual page](man/man1/sgreen.1.html) page for more
    304   informations.
    305 
    306 [![Heatsink](thumbs/heatsink_anim.gif)](images/heatsink_anim.gif)
    307 
    308 > Infrared timelapse animation of a chip and its heatsink covering a
    309 > 14-second period of time.
    310 > Computed using the stardis infrared rendering feature, one image per
    311 > simulated second.
    312 
    313 ## Installation
    314 
    315 The installation of Stardis consists of compiling the solver and the
    316 command line tools directly on the target machine.
    317 A simple way is to rely on
    318 [star-build](https://gitlab.com/meso-star/star-build/),
    319 which automates the build and installation of `stardis` and
    320 its dependencies from source code.
    321 
    322 ### Prerequisites
    323 
    324 To build `stardis` with `star-build`, first make sure your system has
    325 the following prerequisites:
    326 
    327 - POSIX shell
    328 - POSIX make
    329 - curl
    330 - git
    331 - mandoc
    332 - pkg-config
    333 - sha512sum
    334 - GNU Compiler Collection in version 8.3 or higher
    335 - OpenMPI library and headers in version 2 or higher (optional)
    336 
    337 ### Build
    338 
    339 Assuming that the aforementioned prerequisites are available, the
    340 build procedure is summed up to:
    341 
    342     ~ $ git clone https://gitlab.com/meso-star/star-build.git
    343     ~ $ cd star-build
    344     ~/star-build $ make \
    345       PREFIX=/path/to/stardis/ \
    346       BUILD=src/therm-apps/stardis_@STARDIS_VERSION@.sh
    347 
    348 With `PREFIX` defining the path where Stardis will be installed
    349 and `BUILD` defining the installation script to be run.
    350 
    351 By default, Stardis is built with MPI enabled, so OpenMPI is one of its
    352 requirements.
    353 To disable MPI support, simply set the `DISTRIB_PARALLELISM` parameter
    354 to NONE as follows:
    355 
    356     ~/star-build $ make \
    357       PREFIX=/path/to/stardis/ \
    358       BUILD=src/therm-apps/stardis_@STARDIS_VERSION@.sh \
    359       DISTRIB_PARALLELISM=NONE
    360 
    361 ### Run
    362 
    363 Evaluate the installed `profile` file in the current
    364 shell to register `stardis` against it.
    365 You can then run `stardis` and consult its manual pages:
    366 
    367     . /path/to/stardis/etc/profile
    368     stardis -h
    369     man stardis
    370 
    371 Refer to the [Stardis: Starter Pack](starter-pack.html) to quickly run a
    372 thermal simulation through the `stardis` CLI; this archive provides
    373 input data and scripts and is a good starting point to begin with the
    374 Stardis framework.
    375 
    376 ## License
    377 <span id="license"/>
    378 
    379 Stardis is free software released under the GPLv3+ license: GNU GPL
    380 version 3 or later.
    381 You can freely study, modify or extend it.
    382 You are also welcome to redistribute it under certain conditions; refer
    383 to the
    384 [license](https://www.gnu.org/licenses/gpl.html) for details.