Thermic transfert simulation in JS