ulfsri / fsri_materials_database

Repository of materials and products properties and fire test data to improve fire modeling and fire investigation.
7 stars 6 forks source link

collect_thermophysical_properties.py imports incorrect density information #263

Open johodges opened 3 weeks ago

johodges commented 3 weeks ago

The script 02_Scripts/Utilities/collect_thermophysical_properties.py will provide incorrect density values for materials which do not have HFM data. The "density_df" dataFrame is set within try/except blocks in lines 210-222. However, if the HFM directory does not exist this dataFrame will retain its value from the previous material. The block in 224-232 will then use the density from the previous material in kpc_df. This will then get saved out to the Cone directory for the material.

mckinnonm commented 3 weeks ago

Hey Jonathan, I'm having trouble replicating this. From what I can tell, the try/except logic will not allow a file to be saved if there is no HFM density data for the material. The lines where density_df is defined (211 and 217) are in try/except statements, so if there is no '*HFM_Density_Summary.csv' file for the material, the except block should be executed in each case which ends up with a continue command and should advance the loop to the next material without saving.

There may be some edge cases that I haven't considered. Do you have a specific material for which you see this issue?