modifies thermo_materials to preserve data when material is changed