Showing results for 
Search instead for 
Do you mean 
Reply

AskElementNodalResultAllComponents for beam elements

Hello,

 

I want to access the results for beam elements and write these to a universal file (text format).

 

I'm using

AskElementNodalResultAllComponents(ii, NodeIndex, NumComponents, NodalData)

but the values I get returned in NodalData do not make sense to me. I believe the problem lies in the definition of the resultparameters I pass in the CreateResultsAccess function. I now have:

Dim resultParameters_Beam As CAE.ResultParameters
resultParameters_Beam = theSession.ResultManager.CreateResultParameters()
'The following line sets the loadcase implicitly
resultParameters_Beam.SetGenericResultType(resultType1)
resultParameters_Beam.SetResultComponent(StressComponentId)
resultParameters_Beam.SetBeamResultsInLocalCoordinateSystem(True)
resultParameters_Beam.SetCoordinateSystem(CAE.Result.CoordinateSystem.Local)
resultParameters_Beam.SetResultBeamSection(CAE.Result.Section.All)
Dim unit1 As NXOpen.Unit = CType(workSimPart.UnitCollection.FindObject("Newton"), NXOpen.Unit)
resultParameters_Beam.SetUnit(unit1)

Does anyone have any suggestions?

 

Kind regards,

Frederik

2 REPLIES

Re: AskElementNodalResultAllComponents for beam elements

You haven't provided enough information to formulate a useful response.

 

What are the values of the objects that are the input arguments shown?

What is the output?

What does not make sense? The number of values returned or the values themselves?

Etc.

Re: AskElementNodalResultAllComponents for beam elements

Hello Jim,

 

I have a "Beam resultants - Element nodal" result. When I probe element 165  in the user interface I obtain the following result:

 

-----------------------------------------------------------------------------------------------------------------------------------
QUERY INFORMATION
-----------------------------------------------------------------------------------------------------------------------------------

Solution Name : BeamModel_fem1_sim1 : Solution 1

Load Case : Subcase - Static Loads 1
Iteration : Static Step 1
Result : Beam Resultants - Element-Nodal, Unaveraged
Units :
Force : N
Moment : N-mm
Coordinate System : Native

-----------------------------------------------------------------------------------------------------------------------------------
Elem ID : Node ID NXX MYY MZZ MXX QXY QXZ
-----------------------------------------------------------------------------------------------------------------------------------
165 : 1 3.3511E+005 -1.3253E+006 2.2955E+006 -3.3443E-008 -336.768 194.433
165 : 32 3.3511E+005 1.0079E+006 -1.7457E+006 -3.3443E-008 -336.768 194.433
-----------------------------------------------------------------------------------------------------------------------------------

 

When I use the AskElementNodalResultAllComponents, the result I get back for element 165:

 

Number of elements is: 198
The number of LoadCases in this result is: 1
Subcase - Static Loads 1
Beam Resultants - Element-Nodal
Beam Resultants - Element-Nodal
Local
Exporting subcase: Subcase - Static Loads 1 result Beam Resultants - Element-Nodal
Results for element with label: 165
NodeLabels for element:
1
32
NumComponents: 6
-1.46577250481952E+34
2.8684579564729E-42
1.52923028788504E-38
0
0
0
0
0
0
0
0
0
Axial
BendingS
BendingT
Torsion
ShearS
ShearT
Axial Force NXX
Bending Moment MYY
Bending Moment MZZ
Torsional Moment MXX
Shear Force QXY
Shear Force QXZ
-------------------------------------------------------------------------------------------
Writing results to file H:\temp\TestBeam.unv

 

 

Element 165 is defined between nodes 1 and 32 and it is a beam, so the number of components is 6. The NodalData I use in the code has a length of 12 which is what I expect (2 nodes, 6 components).

I expect the values of NodalData to be in line with the probe values, but this is not the case. I suspect that the resultParameters_Beam in the sub ExportSingle1DResultFromDatabase are not correctly set.

 

I also get different results depending whether I run it as a .dll or as a journal...

 

I have added the complete code as an attachment.

 

I hope this information is sufficient.

Regards,

Frederik