cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong nodes recived for the AskElementNodalResult method

Experimenter
Experimenter

I want to recived Element-Nodal results for a specific element using a journalfile. I've used the AskElementNodalResult and the AskElementNodalResultAllComponents methods but they both deliver stange data.

 

When I controll if I recive the correct nodes for the element I specify the nodes I recive have the node indices are a number of 8 less for them compared to the node indices for the wished element.

Why is that?

 

I use NX 10.0.2.6

 

/Mikael, Tau Beräkning

2 REPLIES

Re: Wrong nodes recived for the AskElementNodalResult method

Phenom
Phenom

Difficult to say without seeing the code.

Have you got something along these lines

 

Dim theFEElm As CAE.FEElement

	Dim elmIndex As Integer = theresults.AskElementIndex(theFEElm.Label)
	Dim elmNodeIdxs() As Integer = Nothing
	Dim iNumComponents As Integer
	Dim elementValues() As Double = Nothing
						
theAccessedResult.AskElementNodalResult(elmIndex, elmNodeIdxs, elementValues)

For i = 0 To elmNodeIdxs.Length - 1
Dim iNodeLabel As Integer = theresults.AskNodeLabel(elmNodeIdxs(i))
theLw.WriteLine("Node: " + iNodeLabel.ToString)
theLw.WriteLine("VM Stress: " + elementValues(i).ToString)

Next i

 

 

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: Wrong nodes recived for the AskElementNodalResult method

Siemens Phenom Siemens Phenom
Siemens Phenom

It is important to note the difference between a node index and a node label. The node index is an array index that always has a range from 0 to the number of nodes in the model -1. For example, if your model contained 4 nodes wilth labels 1,5,12 and 101, the node label array might look like:

 

nodeLabel(0) = 5

nodeLabel(1) = 2

nodeLabel(2) = 101

nodeLabel(3) = 1

 

In the above, {0, 1, 2, 3} are the node indicies. {1, 2, 5, 101} are the node labels.

 

AskElementNodalResult() and AskElementNodalResultAllComponents() return a list of node indices. As the code sample given by selex_ct shows, you need to use NXOpen.CAE.Result.AskNodeLabel() to get the node label for each index.