Thermo-mechanical model for incremental fracturing in cooling lava flows