Moving Heat Source (DFlux)

Hi,

I want to implement a moving Heat sourc (Laser). So my Idea was to implement a DFlux subroutine. But I never worked with Subroutines. I want to implement different movements, e.g: Full Circle or spiral. The movement should also have a constant movement speed like 2mm/sec. So my Question is, are there any examples or Tutorials for learning to use the DFlux subroutine?

My Thanks

Oguz