cancel
Showing results for 
Search instead for 
Did you mean: 

API to list out the grid point forces of a few nodes

Pioneer
Pioneer

Hi Everyone,

 

1- Is it possible to list out the grid point forces of a few nodes using API?!.

2- How can I do this in Femap, through using List->Output->Query (or other tools!)?!

 

Anyhelp would be gratly appriciated.

Aero1

15 REPLIES

Re: API to list out the grid point forces of a few nodes

Legend
Legend

Dear Aero1,

 

 

To get Grid Point Forces in your results you should request them in analysis options:

analysis options.png

 

Then you get Applied/Reaction and Summed GP Forces for nodes (vectors 161-188):

gpforces.png

 

And also GP forces on elements (element has results for each node, in my case I have only beams that's why I have C1 and C2 results - for 2 ends):

elementalgpforce.png

 

Nodal or elemental results you would like to get using API?

Elemental routine will be a bit more complex.

 

2) As you can see on screenshot above you can get gp forces using List - Query method.

 

Hope this helps.

 

Yarko

Re: API to list out the grid point forces of a few nodes

Pioneer
Pioneer

Thanks Yarko!, yes, I would also like to see how that can be done using API,...

 

Regards,

Aero1

Re: API to list out the grid point forces of a few nodes

Legend
Legend

Dear Aero,

 

 

Do you need nodal results (vectors 161-188) or elemental (85000-85015) results? Or both?

 

Yarko

Re: API to list out the grid point forces of a few nodes

Pioneer
Pioneer

Both please!

Re: API to list out the grid point forces of a few nodes

Pioneer
Pioneer

Yarko, I have requested gridpoint forces to be printed (in the DAT file) for a specific nodes, I can see them listed in the F06 file but can't see them in Femap!

In "Select Post Proccessing Data" menu, the "161.. Total Summed GPForce" option is missing (as well as 168-188 options)!

 

Set 1 = 600100,600200,600300,600400,600500,600600,600121,600221,600321, +
+ 600421,600521,600621,600120,600220,600320,600420,600520,600620
ELFORCE(PRINT,PLOT) = 1
DISPLACEMENT(PRINT,PLOT) = ALL
SPCFORCES(PRINT,PLOT) = ALL
GPFORCE(PRINT,PLOT) = 1

Re: API to list out the grid point forces of a few nodes

Legend
Legend

Dear Aero1,

 

 

Before you run analysis you need to request force balance forces and than you will see all vectors (see my first post).

 

Here is an example how to get applied GP forces for selected nodes (vectors 172 -T1, 173- T2 and 174 - T3). In my example Output Set ID is defined manually in line: Output1.setID =19.


Sub Main
    Dim App As femap.model
    Set App = feFemap()

    'vectors for applied gp forces  T1, T2, T3
    Dim appliedGPForceX ,appliedGPForceY, appliedGPForceZ As Integer
    appliedGPForceX = 172
    appliedGPForceY = 173
    appliedGPForceZ = 174

    'select nodes to display results
    Dim nodeSet As femap.Set
    Set nodeSet = App.feSet
    If nodeSet.Select(FT_NODE,True, "Select Nodes" ) = FE_CANCEL Then End
    Dim nodeIds As Variant
    Dim count As Long
    nodeSet.GetArray(count, nodeIds)

    Dim Output1 As femap.Output
    Set Output1 = App.feOutput
    'use output set with Id = 19
    Output1.setID =19

    For i = 0 To count -1

        Dim x As Double, y As Double, z As Double
        Output1.Get(appliedGPForceX)
        x = Output1.Value(nodeIds(i))
        Output1.Get(appliedGPForceY)
        y = Output1.Value(nodeIds(i))
        Output1.Get(appliedGPForceZ)
        z = Output1.Value(nodeIds(i))

        App.feAppMessage(FCM_NORMAL, "Node ID = " & nodeIds(i) & "    " & x & "    " & y & "    " & z)
    Next

End Sub

For summed forces and constraint gp forces you should vector 172, 173, 174 on (162, 163, 164) or (182, 183, 184)

 

Yarko

Re: API to list out the grid point forces of a few nodes

Pioneer
Pioneer

Thanks Yarko for the great example, is working very well!.

 

Regards,

Aero1

Re: API to list out the grid point forces of a few nodes

Pioneer
Pioneer

Yarko,

 

Can you please teach me how to include the load cases in the example module (I would like to be able to choose a specific LC)? Also how to include the R1, R2, & R3 values in the result?

 

Thanks,

Aero1

Re: API to list out the grid point forces of a few nodes

Legend
Legend

Dear Aero1,

 

 

Short question to understand what you need:

You would like to select load cases using dialog window (each time tool will ask to select Output Sets for which to show resutls)? Or it is fine to define Output Sets (Load Cases Resutls) IDs in code?

 

To be short: Do you want to select load cases with user interaction?

 

Tomorrow I can update this example to use R1, R2 and R3.

 

Yarko