-
-
April 15, 2019 at 12:01 pm
Jurjen
SubscriberDear reader,
For a model i am storing stress in between simulation. Therefore i also store the node numbers, but the past week i noticed that the number of nodes obtained via the command window does not correspond with the actual mesh size.
Does someone know why these numbers are not matching?
For obtaining the number of nodes i use a command: *GET,numnodes,NODE,0,COUNT
numnodes being my number of nodes.
Hereby some illustrations of the mismatch:
- Number of nodes according to the statistics from meshing (25.376):
- number of nodes using the command window (25.400 nodes), gives 24 additional nodes:
- Illustration of selecting nodes 25.376-25.400, only 25.376 is found (as expected from statistics). Node 25.377-25.400 seem not to exist?
-
April 15, 2019 at 12:05 pm
peteroznewman
SubscriberThe solver will create nodes to apply Loads and Supports that are in addition to the nodes connected to elements. You can see that in the solve.out file.
-
April 15, 2019 at 12:50 pm
Jurjen
SubscriberThanks for the quick reply. I was already suspecting this.
Is there a command to find out how many the solver uses or a way to prevent these nodes to be counted?
-
April 16, 2019 at 1:51 am
Sandeep Medikonda
Ansys EmployeeThe number reported under mesh metric or the statics of geometry refer to the correct number of nodes or elements of the physical structure.
Anything you find using the *GET command can include either the surface elements created by the solver or the contact elements. The number that the solver uses can be easily found by subtracting these 2 values either using APDL math commands or by hand calculations.
You can further use the *GET command to isolate the specific element types and count/sum them as needed. Another simple way is to use Tools>Write Input File and look at the ds.dat in a text editor.
-
May 4, 2020 at 4:13 pm
PhatBoyB
Subscriber Jurjen, thank you for posting this query and for the helpful responses, I have been working on addressing this issue for a while. I know it's over a year since the OP but I wanted to share my experience in the hope that it helps other save time.
I have been trying to export nodal data in a single text file from an ANSYS Mechanical simulation for some post processing on MATLAB; I wanted to export all temperature, displacement, strain and stress data for all nodes in the mesh as a tab/space delimited txt file. I did this with a solution ADPL snippet. I noticed some "ghost nodes" when analysing my txt file that were either outside of the geometry or just a strange temperature compared to nearby nodes. Thanks to the answers on this post I realised these nodes were created by the solver, and not part of the solution.
I have managed to find a way of exporting the data whilst OMITTING these "extra" nodes made by the solver. I do this by "deselecting" the nodes that belong to the "maximum element type" in the model. This seems to work in my case because the "solver-created" nodes are the only nodes assigned to this element type. In my case, I believe they were created by the weak springs setting.
See my export code below:
 ! SCROLL DOWN TO CHANGE PATH AND FILE NAME AS REQUIREDÂ
/OUT, C:EXECUTION_FILE_LOCATION,TXT ! text file location to see commands being executed (useful for development)
SET,LAST
NSLE,R,CORNER ! retain only corner nodes
Â
! IF NOT USING WEAK SPRINGS, COMMENT THE NEXT THREE LINES (using "!") AS THEY ARE TO REMOVE WEAK SPRING ELEMENTS
Â
*GET,WEAK_SPRING_ELS,ETYP,,NUM,MAX ! activate this line if using weak springs
ESEL,U,TYPE,,WEAK_SPRING_ELS ! deselect the weak spring elements
NSLE,S ! select nodes within the active set (all but the weakspring nodes)
Â
*GET,NNUM,NODE,,COUNT !GET NUMBER OF NODES IN MODEL
*GET,N,NODE,,NUM,MIN
Â
*DIM,RESULTS,ARRAY,NNUM,20 !DIMENSION AN ARRAY CALLED "RESULTS" WITHÂ 20 COLUMNS AND "NNUM" ROWS
*DIM,NMASK,ARRAY,NNUM ! create a mask array
!
*VGET,NMASK(1),NODE,1,NSEL
!
*VMASK,NMASK(1)
*VGET,RESULTS(1,1),NODE,1,ATTR,ELEM ! 1ST COLUMN STORES NODE NUMBER
*VMASK,NMASK(1)
*VGET,RESULTS(1,2),NODE,1,LOC,X ! 2ND COLUMN STORES X LOCATION
*VMASK,NMASK(1)
*VGET,RESULTS(1,3),NODE,1,LOC,Y ! 3RD COLUMN STORES Y LOCATION
*VMASK,NMASK(1)
*VGET,RESULTS(1,4),NODE,1,LOC,Z ! 4TH COLUMN STORES Z LOCATION
*VMASK,NMASK(1)
*VGET,RESULTS(1,5),NODE,1,BFE,TEMP ! 5TH COLUMN STORES TEMPERATURE
*VMASK,NMASK(1)
*VGET,RESULTS(1,6),NODE,1,U,X ! 6TH COLUMN STORES X DISPLACEMENT
*VMASK,NMASK(1)
*VGET,RESULTS(1,7),NODE,1,U,Y ! 7TH COLUMN STORES Y DISPLACEMENT
*VMASK,NMASK(1)
*VGET,RESULTS(1,
,NODE,1,U,Z ! 8TH COLUMN STORES Z DISPLACEMENT
*VMASK,NMASK(1)
*VGET,RESULTS(1,9),NODE,1,S,X ! 9TH COLUMN STORES X STRESS
*VMASK,NMASK(1)
*VGET,RESULTS(1,10),NODE,1,S,Y ! 10TH COLUMN STORES Y STRESS
*VMASK,NMASK(1)
*VGET,RESULTS(1,11),NODE,1,S,Z ! 11TH COLUMN STORES Z STRESS
*VMASK,NMASK(1)
*VGET,RESULTS(1,12),NODE,1,S,XY ! 12TH COLUMN STORES XY STRESS
*VMASK,NMASK(1)
*VGET,RESULTS(1,13),NODE,1,S,YZ ! 13TH COLUMN STORES YZ STRESS
*VMASK,NMASK(1)
*VGET,RESULTS(1,14),NODE,1,S,XZ ! 14TH COLUMN STORES XZ STRESS
*VMASK,NMASK(1)
*VGET,RESULTS(1,15),NODE,1,EPTO,X ! 15TH COLUMN STORES X STRAIN
*VMASK,NMASK(1)
*VGET,RESULTS(1,16),NODE,1,EPTO,Y ! 16TH COLUMN STORES Y STRAIN
*VMASK,NMASK(1)
*VGET,RESULTS(1,17),NODE,1,EPTO,Z ! 17TH COLUMN STORES Z STRAIN
*VMASK,NMASK(1)
*VGET,RESULTS(1,18),NODE,1,EPTO,XY ! 18TH COLUMN STORES XY STRAIN
*VMASK,NMASK(1)
*VGET,RESULTS(1,19),NODE,1,EPTO,YZ ! 19TH COLUMN STORES YZ STRAIN
*VMASK,NMASK(1)
*VGET,RESULTS(1,20),NODE,1,EPTO,XZ ! 20TH COLUMN STORES XZ STRAIN
Â
*DIM,HEADINGS,CHAR,1,20 !DIMENSION A STRING ARRAY CALLED "HEADINGS" WITH 20 COLUMNS AND 1 ROW
Â
HEADINGS(1,1)='Node'
HEADINGS(1,2)='XPos(mm)'
HEADINGS(1,3)='YPos(mm)'
HEADINGS(1,4)='ZPos(mm)'
HEADINGS(1,5)='Temp(K)'
HEADINGS(1,6)='XDis(mm)'
HEADINGS(1,7)='YDis(mm)'
HEADINGS(1,9)='SXX(MPa)'
HEADINGS(1,10)='SYY(MPa)'
HEADINGS(1,11)='SZZ(MPa)'
HEADINGS(1,12)='SXY(MPa)'
HEADINGS(1,13)='SYZ(MPa)'
HEADINGS(1,14)='SXZ(MPa)'
HEADINGS(1,15)='eXX'
HEADINGS(1,16)='eYY'
HEADINGS(1,17)='eZZ'
HEADINGS(1,18)='eXY'
HEADINGS(1,19)='eYZ'
HEADINGS(1,20)='eXZ'
Â
/OUT, C:OUTPUT_TEXT_FILE_LOCATION,TXT, ! choose output filename and location
Â
*VWRITE,HEADINGS(1,1),HEADINGS(1,2),HEADINGS(1,3),HEADINGS(1,4),HEADINGS(1,5),HEADINGS(1,6),HEADINGS(1,7),HEADINGS(1,
,HEADINGS(1,9),HEADINGS(1,10),HEADINGS(1,11),HEADINGS(1,12),HEADINGS(1,13),HEADINGS(1,14),HEADINGS(1,15),HEADINGS(1,16),HEADINGS(1,17),HEADINGS(1,18),HEADINGS(1,19),HEADINGS(1,20)
(X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A,X,A)
Â
*VWRITE, RESULTS(1,1),RESULTS(1,2),RESULTS(1,3),RESULTS(1,4),RESULTS(1,5),RESULTS(1,6),RESULTS(1,7), RESULTS(1,
, RESULTS(1,9), RESULTS(1,10), RESULTS(1,11), RESULTS(1,12), RESULTS(1,13), RESULTS(1,14), RESULTS(1,15), RESULTS(1,16), RESULTS(1,17), RESULTS(1,18), RESULTS(1,19), RESULTS(1,20)
(X,F10.0,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5,X,E11.5)
Â
/OUT
-
- The topic ‘Number of nodes’ is closed to new replies.
- The legend values are not changing.
- LPBF Simulation of dissimilar materials in ANSYS mechanical (Thermal Transient)
- Convergence error in modal analysis
- APDL, memory, solid
- How to model a bimodular material in Mechanical
- Meaning of the error
- Simulate a fan on the end of shaft
- Real Life Example of a non-symmetric eigenvalue problem
- Nonlinear load cases combinations
- How can the results of Pressures and Motions for all elements be obtained?
-
3997
-
1461
-
1287
-
1124
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.