General Mechanical

General Mechanical

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

Error in Additive simulation via ANSYS APDL

    • Naeel D
      Subscriber

      Hello all,

      I have attempted to simulate additive manufacturing using ANSYS APDL. I have already applied an element type of SOLID278 with relevant material properties for aluminum 7075. I have also used 'Mapped Meshing' due to my design parameters. In addition to this, I have used the 'Element Birth and Death Technique' with a 'DO* LOOP' to simulate the additive manufacturing of 'Laser Cladding'. However, after running my PYANSYS code, I am running into this error where physical gaps are visible once the simulation is complete (shown in the image below). I would appreciate the solution to this cause.

      Error: Gaps in the model

      The following code below is my code used for the full process in ANSYS APDL:

      !----------------!Pre-processing----------------
       
      /PREP7 
      !* 
      ET,1,SOLID70     !Thermal 3D element
       
      !----------------!Defining Material Properties----------------
       
      !* 
      /UNIT,SI 
      MPTEMP,,,,,,,,  
      MPTEMP,1,0  
      MPDATA,EX,1,,71.7e09
      MPDATA,PRXY,1,,0.32 
      MPTEMP,,,,,,,,  
      MPTEMP,1,0  
      MPDATA,KXX,1,,130   
      MPTEMP,,,,,,,,  
      MPTEMP,1,0  
      MPDATA,C,1,,960 
      MPTEMP,,,,,,,,  
      MPTEMP,1,0  
      MPDATA,DENS,1,,2810 
       
      !----------------!Geometry----------------
       
      /PREP7  
      K, ,0,0,0,  !Modelling with Keypoints to create geometry
      K, ,0.004,0,0,  
      K, ,0.005,0,0,  
      K, ,0.005,0,0.002,  
      K, ,0.004,0,0.002,  
      K, ,0,0,0.002,
         
      K, ,0,0.004,0,  
      K, ,0.004,0.004,0,  
      K, ,0.005,0.004,0,  
      K, ,0.005,0.004,0.002,  
      K, ,0.004,0.004,0.002,  
      K, ,0,0.004,0.002,  
       
      K, ,0,0.005,0,  
      K, ,0.004,0.005,0,  
      K, ,0.005,0.005,0,  
      K, ,0.005,0.005,0.002,  
      K, ,0.004,0.005,0.002,  
      K, ,0,0.005,0.002,  
      !*
      CYL4,0.005,0.005,0.0005, , , ,0.002  !Create Cyclinder
      lplot   
      KL,7,0.5, ,   
      KL,2,0.5, , 
      !*
      /REPLO  !Create Volumes from Keypoints
      V,       1,       2,       5,       6,       7,       8,      11,      12   
      V,       2,       3,       4,       5,       8,       9,      10,      11   
      V,       7,       8,      11,      12,      13,      14,      17,      18   
      V,      14,      21,      25,      17,       8,      28,      27,      11   
      V,       8,      28,      27,      11,       9,      19,      26,      10   
      !*
      FLST,2,2,6,ORDE,2    !Substract Cyclinder from Main Volume
      FITEM,2,5   
      FITEM,2,-6  
      VSBV,P51X,       1  
       
      !----------------!Optimised Mesh (Mesh Size 0.4mm)----------------
       
      lplot   
      FLST,5,41,4,ORDE,10 
      FITEM,5,9   
      FITEM,5,11  
      FITEM,5,-40 
      FITEM,5,42  
      FITEM,5,-43 
      FITEM,5,45  
      FITEM,5,47  
      FITEM,5,-48 
      FITEM,5,50  
      FITEM,5,-54 
      CM,_Y,LINE  
      LSEL, , , ,P51X 
      CM,_Y1,LINE 
      CMSEL,,_Y   
      !*  
      LESIZE,_Y1,0.0004, , , , , , ,1 
      !*  
       
      !----------------!Creating the Mesh (0.4mm)----------------
       
      FLST,5,5,6,ORDE,4   
      FITEM,5,2   
      FITEM,5,-4  
      FITEM,5,7   
      FITEM,5,-8  
      CM,_Y,VOLU  
      VSEL, , , ,P51X 
      CM,_Y1,VOLU 
      CHKMSH,'VOLU'   
      CMSEL,S,_Y  
      !*  
      !*  
      VCLEAR,_Y1  
      VMESH,_Y1   
      !*  
      CMDELE,_Y   
      CMDELE,_Y1  
      CMDELE,_Y2  
      !*  
       
      !----------------!Solutions-Settings----------------
       
      /SOL
      TUNIF,293,           !Uniform temperature
      TREF,293,            !Reference temperature
      KBC,0    !Ramped loading
      NEQIT,100     !No. of iteration
       
      !*  
      ANTYPE,4       !Define model Transient Analysis
      !*  
      TRNOPT,FULL   !Define Solution Method
      LUMPM,0   !Use of 'Lumped Mass approx.'
      !*         
      NROPT,FULL    !Specify Newton-Raphson as Full Transient Analysis
      TIME,1   !End of Time Step
       
      !----------------!Kill all ELEMENTS---------------- 
       
      !*  
      FLST,5,114,1,ORDE,2       !Select all NODES
      FITEM,5,1   
      FITEM,5,-114
      NSEL,S, , ,P51X 
      ESLN,S         !Select all ELEMENTS attached to those NODES
      /GRAPHICS,FULL   !Turn Off POWERGRAPHICS
      EKILL,ALL   !Deactivate all ELEMENTS
      ESEL,S,LIVE           !To confirm success of EKILL command: Select all 'Live ELEMENTS'
      /REPLO
       
      !----------------!DO LOOP COMMAND----------------
       
      *set,user_time,0
       
      !*do,variable_z,0,0.002,0.001
      !*do,variable_y,0,0.005,0.0012
      *do,variable_x,0,0.0012,0.0012
       
      NSEL,S,LOC,X,1*variable_x,0.0012+variable_x
      NSEL,R,LOC,Y,1*variable_y,0.0012+variable_y
      NSEL,R,LOC,Z,1*variable_z,*0.001+variable_z
       
      ESLN,S
      EALIVE,ALL   !Re-Activate Selected NODES
      SFE,ALL, ,HFLUX, ,10e05
      !DELTIM,0.1,0,0              !Time step size, 0.1 s
      user_time=user_time+1
      TIME,user_time              !Total time, 1 s
      AllSEL,ALL
      SOLVE
      SFEDELE,all,all,all            !Removing surface element load
      /GRAPIHCS,POWER                              !Turn On POWERGRAPHICS
      esel,s,live
      eplot
      *enddo
      !*enddo
      !*enddo
       
       
       

      Thank you,

      Naeel D

    • John Doyle
      Ansys Employee

      Seems like an error in your select logic.  What happens if you select all the elements before the last plot (as a test)?

      • Naeel D
        Subscriber

        Hello John Doyle,

        Thanks for the response. I have applied 'ALLSEL,ALL' in replacement of the 'esel,s,live' command and found there has been no significant change in the solution. 

         

    • John Doyle
      Ansys Employee

      I think it still comes down to select logic.  The gray elements are what remain killed.

    • mrife
      Ansys Employee

      Hi Naeel

      Check this code block as there are more than 114 nodes in the model.  Instead of using picking commands, maybe change to nsel,all and esel,all etc

       

      !----------------!Kill all ELEMENTS---------------- 
       
      !*  
      FLST,5,114,1,ORDE,2       !Select all NODES
      FITEM,5,1   
      FITEM,5,-114
      NSEL,S, , ,P51X 
      ESLN,S         !Select all ELEMENTS attached to those NODES
      /GRAPHICS,FULL   !Turn Off POWERGRAPHICS
      EKILL,ALL   !Deactivate all ELEMENTS
      ESEL,S,LIVE           !To confirm success of EKILL command: Select all 'Live ELEMENTS'
      /REPLO
Viewing 3 reply threads
  • The topic ‘Error in Additive simulation via ANSYS APDL’ is closed to new replies.