Using the Toolpath-Mesh Intersection Utility Routines

Hi, 


I want to use Toolpath-Mesh Intersection Utility Routines. 

I am following the documentation to write UEPACTIVATIONSETUP and UEPACTIVATIONVOL subroutines. And update the jActivatingElems(nActivatingElems) and nActivatingElems with Toolpath-Mesh Intersection Utility Routines. Although I am not getting any error from the subroutine, I am not getting any intersection with the defined toolpath and mesh. I simplified the problem to one element. I am not quite sure if I am missing anything or if these are related to the utility routine. 


Besides, regarding include file PtkUtilitySubs.hdr

In PtkUtilitySubs.hdr 

Only PtkGetDataAccess and PtkGetNumIntersectedElements are defined. 

Should we expect to see all function definitions related to these utility routines here? I want to make sure I have the correct include files. 

Can you help me to understand what I am missing here? 

Thank you!
Salih

UEPACTIVATIONSETUP and UEPACTIVATIONVOL

Activation_Sub.f
 

      subroutine uepactivationsetup(
     *	lop,
     *	epaName,
     *	epaElsetName,
     *	jActivatingElems,
     *	nActivatingElems,
     *	kstep,
     *	kinc,
     *	time,
     *	dtime)     
C

C
      include 'aba_param.inc'
      include 'PtkUtilitySubs.hdr'
      include 'aba_ptk_enums.inc'
C
      integer lop, nActivatingElems, kstep, kinc
      integer jActivatingElems(nActivatingElems)
      real*8 time(2), dtime(2)
      character*80 epaName, epaElsetName
      integer :: iEventType
      integer :: jPtkEvtOps(nPtkEventOpt_ArraySize)
      integer :: jPtkEvtProps(nPtkIntEventProperties_ArraySize)
      real*8 :: rPtkEvtProps(nPtkRealEventProperties_ArraySize)
      character*80 :: cEventSeries, cPtkID
      real*8 :: tStart, tEnd
      integer :: nIntersectedElems
      pointer (ptr_elemListHandler, elemListHandler)
      integer, allocatable :: intersectedElems(:)
	  

C     Initialize variables with element set and event series names
      cEventSeries = 'ToolpathSeries'  ! 
      cPtkID = 'ToolpathBox'                !

C     --- Setup Phase ---
C     Call PtkSetMeshAndEventSeries to set the element set and event series
      call PtkSetMeshAndEventSeries(epaElsetName, cEventSeries)

C     Set event type for the box toolpath
      iEventType = iPtkEventSeriesShape_Box

C     Set up jPtkEvtOps properties for the box toolpath using subelement approach
      jPtkEvtOps(iPtkEventOpt_Algorithm) = iPtkEventSeriesAlgorithm_SubElement
      jPtkEvtOps(iPtkEventOpt_AbsoluteOffsets) = 1
      jPtkEvtOps(iPtkEventOpt_SegmentTransition) = 1
      jPtkEvtOps(iPtkEventOpt_Conservative) = 1

C     Set up rPtkEvtProps for box size and offset
      rPtkEvtProps(iPtkRealEventProperties_BoxLength1) = 5
      rPtkEvtProps(iPtkRealEventProperties_BoxLength2) = 5
      rPtkEvtProps(iPtkRealEventProperties_BoxLength3) = 5
      rPtkEvtProps(iPtkRealEventProperties_Offset1) = 0
      rPtkEvtProps(iPtkRealEventProperties_Offset2) = 0
      rPtkEvtProps(iPtkRealEventProperties_Offset3) = 0

C     Set normal vector for orientation
      rPtkEvtProps(iPtkRealEventProperties_NormalVector1) = 0
      rPtkEvtProps(iPtkRealEventProperties_NormalVector2) = 0
      rPtkEvtProps(iPtkRealEventProperties_NormalVector3) = 1

C     Call PtkSetEventSeriesProperties to define the toolpath shape and algorithm
      call PtkSetEventSeriesProperties(cEventSeries, cPtkID, iEventType,
     *     jPtkEvtOps, jPtkEvtProps, rPtkEvtProps)

C     --- Compute Phase ---
C     Set the start and end time of the increment
      tStart = time(1)                      ! 
      tEnd = time(1) + dtime(1)             ! 

C     Call PtkCompute to compute the geometric intersection for this increment
      call PtkCompute(cPtkID, tStart, tEnd)

C     --- Data Retrieval Phase ---
C     Call PtkGetNumIntersectedElements to get the number of intersected elements
      ptr_elemListHandler = PtkGetNumIntersectedElements(cPtkID, nIntersectedElems)

C     Update nActivatingElems to the number of intersected elements
      nActivatingElems = nIntersectedElems

C     Retrieve the list of intersected element labels and update jActivatingElems
      call PtkGetIntersectedElements(ptr_elemListHandler, jActivatingElems)

C     
!	  WRITE(6, *) 'INC_START_Setup = ', kinc
!	  WRITE(6, *) 'nActivatingElems = ', nActivatingElems
!	  WRITE(6, *) 'jActivatingElems = ', jActivatingElems(1)	  
      return
      end

      subroutine uepactivationvol(
     & lFlags,
     & epaName,
     & noel,
     & nElemNodes,
     & iElemNodes,
     & mcrd,
     & coordNodes,
     & uNodes,
     & kstep,
     & kinc,
     & time,
     & dtime,
     & temp,
     & npredef,
     & predef,
     & nsvars,
     & svars,
     & sol,
     & solinc,
     & volFract,
     & nVolumeAddEvents,
     & volFractAdded,
     & csiAdded,
     & ori,
     & eigenstrains)
C
      include 'aba_param.inc'
C
      integer lFlags(*)
      character*80 epaName
      integer noel, nElemNodes, iElemNodes(*)
      integer mcrd
      real*8 coordNodes(mcrd,nElemNodes), uNodes(mcrd,nElemNodes)
      integer kstep, kinc
      real*8 time(2), dtime
      real*8 temp(2,nElemNodes)
      integer npredef
      real*8 predef(2,npredef,nElemNodes)
      integer nsvars
      real*8 svars(nsvars,2)
      real*8 sol(nElemNodes), solinc(nElemNodes)
      real*8 volFract(*), volFractAdded(*)
      real*8 csiAdded(3,*)
      real*8 ori(3,3), eigenstrains(*)
C

	  WRITE(6, *) 'INC_START_Vol = ', kinc


      volFractAdded(1) = 1.0D0
C
C
      return
      end


 

 

mesh_single_El.inp
 

** Job name: mesh_single_El Model name: Model-1
** Generated by: Abaqus/CAE 2023
*Node
      1,           5.,           5.,           5.
      2,           5.,           0.,           5.
      3,           5.,           5.,           0.
      4,           5.,           0.,           0.
      5,           0.,           5.,           5.
      6,           0.,           0.,           5.
      7,           0.,           5.,           0.
      8,           0.,           0.,           0.
*Element, type=DC3D8
1, 5, 6, 8, 7, 1, 2, 4, 3
*Elset, elset=All
 1,
*Nset, nset=All, generate
 1,  8,  1
*Elset, elset=PARTTOFABRICATE
 1,
*Nset, nset=PARTTOFABRICATE, generate
 1,  8,  1

 

Input file 
MeshToolPathExp1.inp

*HEADING
** Units: 
**------------------------------------------------
**------------------------------------------------
*INCLUDE, INPUT = mesh_single_El.inp
*SOLID SECTION, MATERIAL=Inconel625, ELSET=PARTTOFABRICATE
*ELEMENT PROGRESSIVE ACTIVATION, NAME=PARTTOPRINT, ELSET=PARTTOFABRICATE
**------------------------------------------------
*PHYSICAL CONSTANTS, ABSOLUTE ZERO=-273.15, STEFAN BOLTZMANN=5.67e-11
** Stefan Boltzmann constant unit: mW/(mm^2.C^4)
**------------------------------------------------
*MATERIAL, NAME=Aluminum
*DENSITY
** Unit: tonne/mm^3
 2.70e-9
*CONDUCTIVITY
** Unit: mW/(mm.C)
 237
*SPECIFIC HEAT
** Unit: mJ/(tonne.C)
 9.1e+8
**
*MATERIAL, NAME=Inconel625
*DENSITY
** Unit: tonne/mm^3
 8.44e-09
*CONDUCTIVITY
** Unit: mW/(mm.C)
  9.9,  20.
 10.8,  93.
 12.5, 205. 
 14.1, 315.
 15.7, 425.
 17.5, 540.
 19.0, 650.
 20.8, 760.
 22.8, 870.
*SPECIFIC HEAT
** Unit: mJ/(tonne.C)
 410e+06,  20.
 427e+06,  93.
 456e+06, 205.
 481e+06, 315.
 511e+06, 425.
 536e+06, 540.
 565e+06, 650.
 590e+06, 760.
 620e+06, 870.
*LATENT HEAT, SMOOTH
** Unit: mJ/tonne, C, C
 272E9, 1290., 1350., 18.
**------------------------------------------------
**------------------------------------------------
*INITIAL CONDITIONS,TYPE=TEMPERATURE
 All, 26.
**------------------------------------------------
*EVENT SERIES TYPE, NAME=DepositionType, FIELDS=1
*EVENT SERIES, NAME=ToolpathSeries, TYPE=DepositionType
0.0000, 	 0,  2.5,   2.5, 100
10.0000, 	 5,  2.5,   2.5, 100
*STEP,INC=80000, NAME=Printing, UNSYMM=YES, EXTRAPOLATION=NO
*HEAT TRANSFER
 2.5, 10, 0.5e-10,0.1
*ACTIVATE ELEMENTS,ACTIVATION=PARTTOPRINT
*FILM
 All, FFS, 26., 18e-3
** Unit: mW/(mm^2.C)
*RADIATE
 All, RFS, 26., 0.28
*OUTPUT,FIELD,FREQ=1
*NODE OUTPUT
 NT
*END STEP