General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Code Write

    • Ä°lker
      Subscriber
      Can I ask you something?
      How do we calculate the values on the side of the codes in the example I gave?
      *SET,_FNCNAME,'HEATFLX'
       *DIM,_FNC_C1,,1
       *DIM,_FNC_C2,,1
       *DIM,_FNC_C3,,1
       *DIM,_FNC_C4,,1
       *DIM,_FNC_C5,,1
       *DIM,_FNC_C6,,1
       *SET,_FNC_C1(1),8625279.2 ! A = Beam power density (pW/um2)
      *SET,_FNC_C2(1),-2 ! B = -2 for Gaussian, -3 for Goldak
      *SET,_FNC_C3(1),0.0 ! C = X offset
      *SET,_FNC_C4(1),-10.0 ! D = Y velocity
      *SET,_FNC_C5(1),15 ! E = Y offset
      *SET,_FNC_C6(1),1.5 ! F = Beam radius
      *SET,_FNCCSYS,12  *DIM,%_FNCNAME%,TABLE,8,16,1,,,,%_FNCCSYS%
       ! ! Begin of equation: A*exp(B*(({X}-C)^2+({Y}-D*{TIME}-E)^2)/F^2)
      *SET,%_FNCNAME%(0,0,1), 0.0, -999 
      *SET,%_FNCNAME%(2,0,1), 0.0 
      *SET,%_FNCNAME%(3,0,1), %_FNC_C1(1)%
      *SET,%_FNCNAME%(4,0,1), %_FNC_C2(1)%
      *SET,%_FNCNAME%(5,0,1), %_FNC_C3(1)%
      *SET,%_FNCNAME%(6,0,1), %_FNC_C4(1)%
      *SET,%_FNCNAME%(7,0,1), %_FNC_C5(1)%
      *SET,%_FNCNAME%(8,0,1), %_FNC_C6(1)%
      *SET,%_FNCNAME%(0,1,1), 1.0, -1, 0, 1, 2, 2, 19 <-- how to find this data??
      *SET,%_FNCNAME%(0,2,1), 0.0, -2, 0, 2, 0, 0, -1 
      *SET,%_FNCNAME%(0,3,1), 0, -3, 0, 1, -1, 17, -2 
      *SET,%_FNCNAME%(0,4,1), 0.0, -1, 0, 1, 20, 3, 1 
      *SET,%_FNCNAME%(0,5,1), 0.0, -2, 0, 1, 3, 2, -1 
      *SET,%_FNCNAME%(0,6,1), 0.0, -1, 0, 1, -2, 2, 21
      *SET,%_FNCNAME%(0,7,1), 0.0, -2, 0, 2, 0, 0, -1 
      *SET,%_FNCNAME%(0,8,1), 0.0, -4, 0, 1, -1, 17, -2 
      *SET,%_FNCNAME%(0,9,1), 0.0, -1, 0, 1, -3, 1, -4
      *SET,%_FNCNAME%(0,10,1), 0.0, -2, 0, 1, 18, 3, -1 
      *SET,%_FNCNAME%(0,11,1), 0.0, -1, 0, 2, 0, 0, 22
      *SET,%_FNCNAME%(0,12,1), 0.0, -3, 0, 1, 22, 17, -1 
      *SET,%_FNCNAME%(0,13,1), 0.0, -1, 0, 1, -2, 4, -3 
      *SET,%_FNCNAME%(0,14,1), 0.0, -1, 7, 1, -1, 0, 0
      *SET,%_FNCNAME%(0,15,1), 0.0, -2, 0, 1, 17, 3, -1 
      *SET,%_FNCNAME%(0,16,1), 0.0, 99, 0, 1, -2, 0, 0
      ! End of equation: A*exp(B*(({X}-C)^2+({Y}-D*{TIME}-E)^2)/F^2)
    • mrife
      Ansys Employee

      Hi Hasan

      The format of tables from the Mechanical APDL function tool is not documented.  Mike

    • Ä°lker
      Subscriber

      The values in this table are handwritten values. That's why I'm asking.

    • Ä°lker
      Subscriber

      https://www.youtube.com/watch?v=HsohSHa0L6s&t=94s this video

      How were these values written?

      My goal is to obtain a temperature distribution as in the relevant video, and then to obtain material depth. I want to remove paint from the surface.

    • mrife
      Ansys Employee

      Hi Hasan

      No, the values in the table were not hand written.  The video creator used Mechanical APDL interactively to create the equation and evaluate it over a time range.  Then exported it out - the exported APDL text version was then copy/pasted to the WB Mechanical Commands Object.  They just did not show those steps.

      See for example this Forum discussion:

      /forum/forums/topic/mathematical-function-in-ansys-apdl/

       

      mike

       

Viewing 4 reply threads
  • The topic ‘Code Write’ is closed to new replies.