Hello,
I am trying to write a DFLux subroutine that simulates a motion of a laser making the motion indicated in the image below. At the moment I have a script that I am trying to repurpose which is also included below.
subroutine DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS, & JLTYP,TEMP,PRESS,SNAME) C include 'ABA_PARAM.INC' C dimension FLUX(2), TIME(2), COORDS(3) CHARACTER*80 SNAME
X=COORDS(1) Y=COORDS(2) Z=COORDS(3) Dist = 0.0 Y_center = 0.0 - ((0.1/100.0)*(TIME(2))) X_center = 0.0 YT=Y_center - Y XT=X_center - X Dist = SQRT((YT*YT)+(XT*XT)) if (Dist .le. 0.01) then FLUX(1) = 50000.0 else FLUX(1) = 0.0 endif
RETURN END
It is a pretty simple subroutine and it includes a heat flux travelling down the centre of the workpiece. I got the code from Not Real Engineering.
The work piece I want to get the laser moving across is 0.04mx0.04m and the laser needs to travel at a couple of different speeds The fastest speed is 0.0083m/s and the slowest 0.000167m/s. Any advice would be greatly appreciated. I am extremely new to programming but this is for my MSc(Res) thesis so it is pretty important to me.
Thanks
Alex