README.md (15720B)
1 # stardis 2 3 ## Overview 4 5 Stardis is a software dedicated to the resolution of coupled 6 convective-conductive-radiative thermal problems in 3D environments. 7 It is based on 8 [Stardis Solver](https://gitlab.com/meso-star/stardis-solver) and 9 exposes some of the main features of the solver in an easy to use way. 10 Using Stardis is a practical way of carrying out thermal studies on CAD 11 models which can be exported from Salomé or other similar software. 12 13 ## Requirements 14 15 - C compiler 16 - POSIX make 17 - pkg-config 18 - Message Passing Interface (optional) 19 - [mandoc](https://mandoc.bsd.lv) 20 - [RSys](https://gitlab.com/vaplv/rsys) 21 - [Star 3D](https://gitlab.com/meso-star/star-3d) 22 - [Stardis Solver](https://gitlab.com/meso-star/stardis-solver) 23 - [Star Enclosure 3D](https://gitlab.com/meso-star/star-enclosures-3d) 24 - [Star Geometry 3D](https://gitlab.com/meso-star/star-geometry-3d) 25 - [Star SamPling](https://gitlab.com/meso-star/star-sp) 26 - [Star StL](https://gitlab.com/meso-star/star-stl) 27 28 ## Installation 29 30 Edit config.mk as needed, then run: 31 32 make clean install 33 34 ## Release notes 35 36 ### Version 0.12 37 38 - Add a new solid/fluid connection with imposed flux. 39 The new directives `F_SOLID_FLUID_CONNECTION` and 40 `F_SOLID_FLUID_CONNECTION_PROG` describe a connection between a solid 41 and a fluid with imposed flux at their common interface, the latter 42 using programmable properties. 43 - Add the `-f` and `-l` options to calculate the flux density for a 44 probe or a list of probes, respectively. 45 - Add the missing inclusion of the `limits.h` header to the programmable 46 properties file. 47 This is necessary in order to use the `UINT_MAX` constant. 48 - Partial correction of the calculation of a system's temperature range. 49 Only the temperature ranges of the connection conditions and boundary 50 conditions were used. 51 Now, programmable solids are also taken into account. 52 Regular solids and fluids should also be taken into account. 53 However, this more significant correction requires further review and 54 additional testing to ensure that the new method for calculating the 55 temperature range does not disrupt existing simulations. 56 Hence this limited correction, sufficient to verify that it corrects 57 the problem on the system that highlighted it, but not overly 58 optimistic as to what it corrects versus what it could deteriorate. 59 - Fix the `-L` option, which defines a list of surface probes to be 60 calculated. 61 It was not working correctly with a list containing only one probe. 62 - Fix the definition of solid properties. 63 The size and alignment of the allocated memory were incorrect. 64 - Fix an invalid memory access when handling errors in the analysis of 65 input files with variable expansion. 66 - Fix an invalid memory access when writing the green function. 67 - Small improvement of the build system. 68 Simplify it by doing everything in one place (the Makefile). 69 Add macros to control installation subdirectories 70 71 ### Version 0.11.1 72 73 - Corrects the writing of the RNG state when resolving a probe 74 temperature on the boundary: the RNG state was written to the file in 75 which the RNG state was read or it was not written at all, depending 76 on whether the RNG state to be read was defined or not, respectively. 77 - Corrects the emissivity of a programmable Dirichlet boundary 78 condition: it was set to a constant value, not the programmable value. 79 - Minor update of stardis man page typesetting. 80 81 ### Version 0.11 82 83 #### Programmable properties 84 85 - Custom sampling of conductive paths. On programmable solids, users 86 can now define the new `stardis_sampling_conductive_path` function, in 87 which they can write their own sampling process. As input, the 88 function takes a path whose spatio-temporal position lies within the 89 programmable solid. Once the path has been sampled, this position is 90 updated and can be either within the solid if the initial condition is 91 reached, or at the boundary, i.e. at a boundary condition. Stardis 92 then continues the path sampling procedure in relation to the returned 93 state. 94 - Addition of the property name as the first argument of the input 95 string sent to the programmable data creation functions. Not only is 96 this useful information, it also respects the convention of program 97 arguments. In this way, the standard getopt function can be used 98 directly to analyze them. 99 - Addition of symbolic constants to the public API for programmable 100 properties. The constants added are those defining an unknown 101 temperature, and constants characterizing null flux or null volumic 102 power. 103 104 #### Manual pages 105 106 - Document the `-n` option which defines the number of realisations. Its 107 documentation was missing from the `stardis` manual page. 108 - Correction of the title of the `stardis-output` manual page. It was 109 defined as `stardis-input`. 110 - Updated the layout of the `stardis-output` manual page. When converted 111 to HTML, the width of the columns changed from one list to another, 112 resulting in an unstructured layout. 113 114 #### Miscellaneous 115 116 - Correction of the Dirichlet boundary condition definition. No 117 reference temperature was defined on a surface oriented towards a 118 fluid and on which a Dirichlet boundary condition was imposed 119 (keywords `T_BOUNDARY_FOR_SOLID[_PROG]`). Stardis therefore notified an 120 error and rejected radiative trajectories reaching such interfaces 121 without a reference temperature. From now on, its reference 122 temperature is implicitly defined as the set temperature value. 123 - Removal of a warning message when calculating a list of boundary 124 probes. It incorrectly warned that the side of the boundary on which 125 the probe was located was not defined. 126 127 ### Version 0.10.1 128 129 Add a pkg-config file to support the use of Stardis header files such as 130 the one declaring function profiles for programmable properties. 131 132 ### Version 0.10 133 134 #### New conduction algorithm 135 136 Addition of a new algorithm for sampling a potentially unsteady 137 conductive path. The new `-a` option lets you select the algorithm to be 138 used, i.e. either the sphere delta algorithm used until now (which is 139 still the default algorithm), or the new Walk on Sphere algorithm (WoS). 140 141 This new algorithm samples an unbiased diffuse trajectory in a solid 142 with Dirichlet boundary conditions, unbiased with respect to what 143 numerical accuracy can account for. Its coupling with other boundary or 144 connection conditions behaves as with the delta sphere algorithm, i.e. 145 the solution is exact when the length of the trajectory used as a 146 first-order approximation tends towards 0. 147 148 Currently, when using WoS, the initial condition must be constant for 149 the solid. The power density is also taken into account, but cannot 150 vary in time and space. 151 152 #### External spherical source 153 154 An external spherical source can be added to the scene using the new 155 stardis-input keyword `SPHERICAL_SOURCE`. Once defined, it is considered 156 as a new boundary condition whose contribution is calculated at the 157 solid/fluid interfaces in the form of an external net flux. 158 159 The external net flux is calculated by evaluating the direct and diffuse 160 part of the incident flux due to the external source. The diffuse part 161 of the flux manages not only the radiation from the external source that 162 reaches the interface after one or more reflections, but also the 163 external radiation scattered in the environment, here simply represented 164 by a `diffuse-radiance` parameter. 165 166 An external spherical source is defined by its position, radius, power 167 and diffuse radiance. While the radius is constant, all other parameters 168 can be programmed using the `SPHERICAL_SOURCE_PROG` keyword. In doing 169 so, the user can provide a shared object as input, enabling him to 170 define a time-dependent power and position, and a diffuse radiance that 171 also depends on the direction along which the sampled trajectory reaches 172 the environment. 173 174 #### Making surface radiative properties source-dependent 175 176 Emissivity and specular fraction can now be varied according to the type 177 of source (internal or external). This is only possible using 178 programmable properties (`H_BOUNDARY_FOR_FLUID_PROG`, 179 `HF_BOUNDARY_FOR_SOLID_PROG` and `SOLID_FLUID_PROG`). Properties are 180 otherwise assumed to be the same for all sources. 181 182 #### Make the radiative environment programmable 183 184 Addition of the `TRAD_PROG` keyword, which allows the user to define a 185 radiative temperature and a reference radiative temperature that depend 186 on a direction. 187 188 #### Parallelize the resolutions of multiple boundary probes 189 190 Add the `-L` option to calculate multiple boundary probes at once. 191 Stardis will then parallelize the probe list calculations, rather than 192 each probe calculation one after the other. Using this option is 193 therefore more advantageous in terms of load distribution when the 194 number of boundary probes to be evaluated is large compared to the cost 195 of calculating a single probe (option `-P`). 196 197 #### Allow relative temperatures 198 199 Allow to perform calculations relative to a given temperature T. In this 200 case, the temperatures managed by Stardis would be relative to T and 201 could therefore be negative, since they would express a deviation from 202 T. It should be noted that reference temperatures must always be 203 positive, i.e. expressed in the absolute domain. Finally, we emphasize 204 that relative calculations only make sense in linear situations, i.e. 205 negative temperatures are not valid for systems with non-linear 206 radiative exchanges (i.e. option `-o` whose argument is greater than 207 one). 208 209 This is a file format break that users *must* take into account. Until 210 now, negative temperatures were considered unknown, whereas they are now 211 valid. For example, an interface with a negative temperature could be 212 considered adiabatic, whereas it is now a Dirichlet boundary condition. 213 In other words, the same data could define completely different systems 214 before and after this version. 215 216 #### Use POSIX make as a build system 217 218 The build procedure is now written in POSIX make instead of CMake. 219 In addition to the features already provided by its CMake alternative, 220 the Makefile supports the use of static libraries and provides an 221 uninstall target. In any case, the main motivation behind its writing is 222 to use a good old well-established standard with simple features, 223 available on all UNIX systems, thus simplifying its portability and 224 support while being much lighter 225 226 #### Proof-reading and editing manual pages 227 228 Write the man pages directly in mdoc's roff macros, instead of using the 229 asciidoc markup language as a source for man pages. 230 231 Unlike writing manuals with man's roff macros, and even more so with 232 asciidoc, mdoc macros take care of layout, font handling and all the other 233 typesetting details which, by construction, guarantee the consistency of 234 all manuals without leaving the responsibility to the individual author. 235 This also facilitates translation into other formats and documentation 236 tools. These are the main reasons for writing manual pages with mdoc 237 macros. 238 239 A complete re-reading of the manual pages was carried out during the 240 translation into mdoc, with several corrections and rewrites to make the 241 manual clearer. 242 243 ### Version 0.9 244 245 #### Programmable properties 246 247 Until now, physical properties as well as boundary and connection 248 conditions were constant in time and space. In this version, they can be 249 programmed, i.e. they are variables returned by functions implemented 250 in user-defined libraries and submitted as dynamically loaded input 251 libraries when Stardis starts. User libraries must also provide 252 create/release functions that are invoked at start-up to allow users to 253 load their data and build the internal data structures required by their 254 libraries at run-time. 255 256 The `stardis-input` file format has been updated to provide a set of new 257 `_PROG` suffixed keywords used to define these programmed properties and 258 conditions (e.g. `T_BOUNDARY_FOR_SOLID_PROG` or 259 `H_BOUNDARY_FOR_FLUID_PROG`) 260 261 #### Miscellaneous 262 263 - Addition of the keyword `HF_BOUNDARY_FOR_SOLID` which allows to impose 264 a flux on a boundary with another condition. For example, a net flux 265 can be defined in addition to a convective exchange and a radiative 266 transfer. 267 - Correct the definition of a net flux as a boundary condition: it might 268 not be defined on the right side of the interface. 269 - Correct the "subpath type" data of the output paths: as we attach the 270 segment type to the vertices, we need to locate the type changes along 271 the path on zero length segments, otherwise the colouring will show a 272 misleading colour gradient. 273 - Replace the Mersenne Twister random number generator with Threefry: 274 the former is much less efficient at rejecting random numbers than the 275 latter, which is designed for this purpose, a feature on which 276 parallel random number generations depend heavily 277 278 ### Version 0.8 279 280 - Add a new option to support non-linear radiative transfer 281 computations. 282 - Changes in input file's format to support non-linear radiative 283 transfer by adding reference temperatures on interfaces. 284 - Add optional support for MPI (must be enabled at compile time, default 285 is OFF). 286 - Change random number generator type to use Threefry. 287 - Change the format of binary Green files. A new public header file is 288 now installed that describes all types involved in binary Green files. 289 - Fix a crash on an exit-on-error execution path. 290 - Fix parsing of command-line options. 291 292 ### Version 0.7.2 293 294 Fix the binary file format of the green function: the fileformat has 295 been updated without incrementing the version of the serialised data. 296 297 ### Version 0.7.1 298 299 Fix debug build. 300 301 ### Version 0.7 302 303 - Remove the boundary condition `T_BOUNDARY_FOR_FLUID`: it was exactly 304 the same than `H_BOUNDARY_FOR_FLUID` that should now be used instead. 305 - Sets the required version of Star-SampPling to 0.12. This version 306 fixes compilation errors with gcc 11 but introduces API breaks. 307 308 ### Version 0.6 309 310 - Add thermal contact resistances. 311 - Add serialization for random generator's state. 312 - Bugfixes in arguments parsing. 313 - Fix Green output file padding. 314 315 ### Version 0.5.1 316 317 - Fix a memleak 318 - Add a file format version in binary Green files. 319 - Man improvement. 320 321 ### Version 0.5 322 323 - Ensure C89 compliance. 324 - New output format for infra-red rendering. 325 - Use new stardis-solver 0.11. 326 - Replace fixed dates by time-ranges as time arguments 327 for computations. 328 - Allow unsteady Green's function computations. 329 - Model files now include scale parameter. 330 331 ### Version 0.4 332 333 - Improve C99 compliance. 334 - Build on Windows systems. 335 - Use new stardis-solver 0.5. 336 - Transition to cmake to manage builds. 337 338 ### Version 0.3.2 339 340 - Add the `solve_probe_boundary` feature. The `solve_probe_boundary` VS 341 `solve_probe` selection is automated according the probe-geometry 342 distance. `solve_probe_boundary` is called for probe points closer 343 than 2.1 delta from geometry. 344 - Add flux boundary conditions. 345 346 ### Version 0.3.1 347 348 Add radiative transfer computations. To achieve this, media gain 2 new 349 parameters: 350 351 - emissivity; 352 - `specular_fraction`. 353 354 ### Version 0.3 355 356 - Upgrade stardis-solver to v0.3. 357 - Add volumic power sources on solids; 358 - Allow to use the `fp_to_meter` parameter of the stardis-solver solve 359 function; 360 - Add a dump geometry feature. It outputs the geometry as it is sent to 361 stardis-solver in VTK format, together with the front and back media 362 and boundary conditions information. 363 364 365 ### Version 0.1 366 367 - Allow probe computations on conductive-only thermal systems. 368 - Allow Dirichlet and h.dT boundary conditions. 369 370 ## License 371 372 Copyright (C) 2018-2025 |Méso|Star> (<contact@meso-star.com>) 373 374 Stardis is free software released under the GPL v3+ license: GNU GPL 375 version 3 or later. You are welcome to redistribute it under certain 376 conditions; refer to the COPYING file for details.