×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Problem with reading constraints forces after each analysis with API

Problem with reading constraints forces after each analysis with API

Problem with reading constraints forces after each analysis with API

(OP)
Hello,

I wrote a script in Femap using API. In this script there is running a static linear analysis for many times. After each analysis i need to read from model the T3 Constraint force on 2 nodes.

To read the Constraint Force i used the following script:

rc = App.feAppGetActiveView( viewID )
rc = feView.Get( viewID )
outSetID = feView.OutputSet
ouVec1.SetID = outSetID
rc = ouVec1.Get( 54 ) 'T3 Constraint Force
Dim feNode As femap.Node
Set feNode = App.feNode
While feNode.Next
If feNode.ID = NDpp Then
RT3pp = ouVec1.Value(feNode.ID)
Msg = " NDpp = " + Str$(RT3pp)
rc = App.feAppMessage( FCM_NORMAL, Msg )
End If
If feNode.ID = NDpv Then
RT3pv = ouVec1.Value(feNode.ID)
Msg = " NDpv = " + Str$(RT3pv)
rc = App.feAppMessage( FCM_NORMAL, Msg )
End If
Wend

This works fine if i have the output cases.

But here is the problem. I have a loop where i change the load case at each iteration (changing the value of pressure). I run analysis from API and after the analysis is complete the FEMAP doesn't create the output data and goes for the next analysis.

This is the script part for running analysis:

ldSetID = ldset.NextEmptyID
ldset.Put (ldSetID)
App.Info_ActiveID( FT_LOAD_DIR ) = ldSetID

elLoad.SetID = ldSetID

elID = elSet.First()
While elID <> FE_FAIL
el.Get( elID )

pval = (dsw- elZ) * dens * 9.81

If pval >0 Then
elLoad.meshID = elID
elLoad.type = FLT_EPRESSURE
elLoad.LoadValue = pval
elLoad.FaceNumber = 1
rc = elLoad.Put(elLoad.NextEmptyID)
End If

elID = elSet.Next()
Wend

am.Get (1)
am.BCSet (2) = ldSetID
am.Put(1)
am.Analyze (1)

While App.feFileProgramRunning()= FE_OK
Wait(5)
Wend


Can you please help me with a method and / or tips how to read the Constraint Forces on nodes after each analysis.

Thank you very much! And I hope, that my description is clear enough.
George

RE: Problem with reading constraints forces after each analysis with API

I don't use API ... how about putting the two nodes into a group, and printing the f06 (output constraint forces for that 1 group only) ?

curious ... you're pulling off Fz at two nodes ... how redundant is the model?

Quando Omni Flunkus Moritati

RE: Problem with reading constraints forces after each analysis with API

(OP)
I need to make a procedure for static equilibration of the ship in still water. That means I need to find the water depth in order to determine the equilibrium between hydrostatic pressure and the gravity force ( mass of the model * gravity acceleration).

If the two reaction forces from aft end and fore end of the ship are almost zero then i can say that i found the equilibrium.


UPDATE: I divided the API script in two loops. on for applying loads and running analysis. and one for reading results.
After the program finish one step from first loop i get the output set and I can continue my job.

Now the problem is how can I put gravity acceleration (body load) from API.

Thanks.

RE: Problem with reading constraints forces after each analysis with API

(OP)
So, now i have to chose from two methods.
1. I need to delete the pressure loads from a load set.
2. Or I need to create a body load (gravity acceleration) on a new load set.

Can anybody help me with a method for first / second solution.

Thanks a lot.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources