A transient thermal model for machining