General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

Goldak double ellipsoidal Moving heat source simulation-unknown error occured

    • mkalel
      Subscriber

      I m trying to simulate the moving heat source to calculate the depth of the melt pool and validate with my experimental bead depth. For that I have seen the couple of videos on youtube and I found this video shown below could be helpful.

      https://www.youtube.com/watch?v=HfTf2KZS6E4

       I copied and pasted the whole code shown in the video and its not working. I am confused if there is problem with the code or something. I made the geometry same and had same global coordinate system origin.

      I am sharing the code he has provided. Let me know if some one can help me on finding the error. When I tried It says unkoen error ocured.

      the simulation has two laser passes. 

      %%%%%code for first pass%%%%%%:

      CMSEL,ALL
      *GET,EMAX,ELEM,,NUM,MAX
      *GET,EMIN,ELEM,,NUM,MIN
      ALLSEL
      AUTOTS,ON
       
      A=0.003
      B=0.004
      C1=0.004
      C2=0.016
       
      TAU=0
      FF=0.6
      FR=1.4
      Q=2840
      VEL=0.01
      PI=acos(-1)
       
      time_weld=10
      time_inc=0.26
      time_steps=time_weld/time_inc
      NROPT,FULL
       
      *DO,i,1,time_steps,1
      WTIME=(i*time_inc)
      TIME,WTIME
      HCENTER=VEL*WTIME
       
      *DO,jj,EMIN,EMAX,1
      X=CENTRX(jj)
      Y=CENTRY(jj)
      Z=CENTRZ(jj)
      CSI_Y+(VEL*(TAU-WTIME))
       
      *IF,Y,GT,HCENTER,THEN
      C=C1
      F=F1
      *ELSE
      C=C2
      F=FR
      *ENDIF
      PART1=(6*(3**0.5)*Q*F)/(A*B*C*PI*(PI**0.5))
      PART2=(exp(-3*(X/A)**2))*(exp(-3*(CSI_Y/B)**2))*(exp(-3*(Z/C)**2))
      QF=PART1*PART2
      BFE,jj,HGEN,,QF
      *ENDDO
      SOLVE
      *ENDDO
       
      CMSEL,ALL
      BFEDELE,ALL,ALL
      ALLSEL

      %%%%%%%%%%%%code for the second pass%%%%%%

      CMSEL,ALL
      *GET,EMAX,ELEM,,NUM,MAX
      *GET,EMIN,ELEM,,NUM,MIN
      ALLSEL
      AUTOTS,ON
       
      A=0.003
      B=0.004
      C1=0.004
      C2=0.016
       
      TAU=0
       
      FF=0.6
      FR=1.4
      Q=2840T
      VEL=0.01
      PI=acos(-1)
       
      time_weld=10
      time_inc=0.26
      time_steps=time_weld/time_inc
      NROPT,FULL
       
      *DO,i,1,time_steps,1
      WTIME=(i*time_inc)
      TIME,WTIME+time_weld
      HCENTER=VEL*WTIME
       
      *DO,jj,EMIN,EMAX,1
      X=CENTRX(jj)
      Y=CENTRY(jj)
      Z=CENTRZ(jj)
      CSI_Y+(VEL*(TAU-WTIME))
       
      *IF,Y,GT,HCENTER,THEN
      C=C1
      F=F1
      *ELSE
      C=C2
      F=FR
      *ENDIF
      PART1=(6*(3**0.5)*Q*F)/(A*B*C*PI*(PI**0.5))
      PART2=(exp(-3*(X/A)**2))*(exp(-3*(CSI_Y/B)**2))*(exp(-3*(Z/C)**2))
      QF=PART1*PART2
      BFE,jj,HGEN,,QF
      *ENDDO
      SOLVE
      *ENDDO
       
      CMSEL,ALL
      BFEDELE,ALL,ALL
      ALLSEL

       

       

    • Dave Looman
      Ansys Employee

      The debugging procedure is to run a few lines of the input at at time and check the output file to see if they were interpreted correctly.  You can add /eof at a location where you want to stop the input.  To get ouput for every loop, add /gopr after the *do command.  

Viewing 1 reply thread
  • You must be logged in to reply to this topic.