Panel Forces data via API

Panel Forces data via API

renatoghenoNU2JN
Explorer Explorer
564 Views
1 Reply
Message 1 of 2

Panel Forces data via API

renatoghenoNU2JN
Explorer
Explorer

Hi all,

I'm trying to get the forces transmitted from a wall bearing on a beam to that beam via API (IronPython). My idea is to get panel forces at the nodes that are shared between the panel's mesh and beam. I was able to list all of these nodes and get all sorts of information from them. The problem is that I don't know how to get these results.
What I'm trying to do specifically is to find the NXX, NYY and NXY. I found some classes that have these methods, but I was unsuccessful trying to use them.
I was looking around and found that the following function in Results Connect (excel) RSA_PANEL_FORCE_DATA does exactly what I'm trying to do via API. Unfortunately my script will do a lot more and this must be done in code.
Does anyone know how I could access this info?

 

renatoghenoNU2JN_0-1743183701548.png

 

0 Likes
Accepted solutions (1)
565 Views
1 Reply
Reply (1)
Message 2 of 2

renatoghenoNU2JN
Explorer
Explorer
Accepted solution

Got it. If someone ever has this question, here's one solution. Thanks, ChatGPT, for helping with this one 😄

resAny = structure.Results.Any

# Enumerations from API docs.
I_OLXDDT_CARTESIAN = 1
I_FLT_MIDDLE = 2
I_FRT_DETAILED_NXX = 492
I_FRT_DETAILED_NYY = 493
I_FRT_DETAILED_NXY = 494

# Set the local X-direction: using a Cartesian definition with vector (0, 0, 1)
resAny.SetDirX(I_OLXDDT_CARTESIAN, 0, 0, 1)

# Set the layer to the middle layer (I_FLT_MIDDLE)
resAny.Layer = I_FLT_MIDDLE

# Set the ResultId for the desired result, either NXX, NYY or NXY
resAny.ResultId = I_FRT_DETAILED_NXX

# Set the node number from which to retrieve the result
resAny.Node = 9

# Set the load case
resAny.LoadCase = 2

# Retrieve detailed membrane force NXX.
# I_FRT_DETAILED_NXX has a value of 492 in the IRobotFeResultType enumeration.
resAny.ResultId = I_FRT_DETAILED_NXX
nxx_value = resAny.ResultValue

# Retrieve detailed membrane force NYY.
# I_FRT_DETAILED_NYY has a value of 493.
resAny.ResultId = I_FRT_DETAILED_NYY
nyy_value = resAny.ResultValue

# Retrieve detailed membrane force NXY.
# I_FRT_DETAILED_NXY has a value of 494.
resAny.ResultId = I_FRT_DETAILED_NXY
nxy_value = resAny.ResultValue

# Print the obtained values.
print("Detailed Membrane Forces:")
print("NXX (force per unit length):", nxx_value)
print("NYY (force per unit length):", nyy_value)
print("NXY (force per unit length):", nxy_value)