-
-
May 5, 2018 at 4:05 pm
watchdog23
Subscriber"
Â
yc = 0.0
xc = 5.0
nsel, s, loc, x,  0 , xc
esln,s,
esel, r, cent, y, -1e-3, 1e-3
Â
cm, cenelem, elem
nelem = 1000
iel = 0
Phi = 0.0
Psi = 0.0
*do, i, 1, nelem, 1
 iel = elnext(iel)
 *if, iel, ne, 0, then
 *do, j, 1, 4, 1
  nd = nelem(iel,j)
  Phi = ny(nd) - yc
  Psi = nx(nd) - xc
  xfdata, ENRICH1, LSM, iel, nd, Phi, Psi
 *enddo
 *endif
*enddo "
Â
This a code of an XEFM based stationary crack analysis in ANSYS APDL. I couldn't understand this looping section of the code and would mean a lot if someone could explain what is it this portion of the code does.Â
-
July 5, 2018 at 5:59 pm
jpasquerell
Ansys Employeeparameter iel is the element number to be processed for that loop. It is initialized to 0 before the loop. This is a method to loop thru a set of numbers that may not be sequential (1,2,3,4) or not be equally spaced (2,4,6,
. It will do up to 1000 loops and if there are less than 1000 elements the elnext get function will return 0 if there are no higher element numbers/
Apparently xfdata is a macro file (as I do not recognize it as an ANSYS command) so each loop calls xfdata with the current parameter values of ENRICH1, LSM, iel, nd, Phi, and Psi.
-
July 5, 2018 at 6:40 pm
-
- The topic ‘Help regarding a portion of the code used in example in ANSYS APDL’ is closed to new replies.
- LPBF Simulation of dissimilar materials in ANSYS mechanical (Thermal Transient)
- Real Life Example of a non-symmetric eigenvalue problem
- How can the results of Pressures and Motions for all elements be obtained?
- BackGround Color
- Contact stiffness too big
- Element Birth and Death
- Python-Script to Export all Children of a Solution Tree
- Which equations and in what form are valid for defining excitations?
-
4597
-
1495
-
1386
-
1209
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.