how thermal power is produced