FireDynamics / fdsreader

Python reader for FDS data
GNU General Public License v3.0
44 stars 18 forks source link

Provide FDS Version #52

Closed TristanHehnen closed 1 year ago

TristanHehnen commented 1 year ago

Hi,

could we keep track of the FDS version that was used to run the simulation results that are to be loaded? It could be stored in the simulation object directly (fdsreader.Simulation()) as fds_version.

Best, Tristan

JanVogelsang commented 1 year ago

Hi, this is already implemented exactly as you suggested. See the API reference.

TristanHehnen commented 1 year ago

Ah, my bad, should have read properly. Thanks!

lu-kas commented 1 year ago

Wait. I just wanted to use it, yet the variable fds_version is not available in the Simulation object.

In the source, the FDS version is determined with https://github.com/FireDynamics/fdsreader/blob/e26beb7a627249c8da92bbec93b3abc69619bdef/fdsreader/simulation.py#L209

Yet, in (at least a recent) SMV file, the keyword is FDSVERSION:


 f001

FDSVERSION
FDS6.7.9-0-gec52dee-HEAD

ENDF
 f001.end

INPF
 f001.fds

REVISION
Revisio                                                                                                                                                                                                                                                        

CHID
 f001

SOLID_HT3D
  0

CSVF
 hrr
 f001_hrr.csv
[...]```

I will prepare a fix.
JanVogelsang commented 1 year ago

Could you also check if the key has been 'VERSION' in a prior FDS version (e.g. 6.7.5). To provide backwards compatibility, we could look for either 'VERSION' or 'FDSVERSION' to get the version.

lu-kas commented 1 year ago

Good point!

lu-kas commented 1 year ago

Fixed in #53