Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CG of the model in FEMAP

Status
Not open for further replies.

ttaannggeenntt

Aerospace
Mar 20, 2017
3
0
0
US
Hi All,

I am trying to find the CG of my model in FEMAP in order to apply a mass element which will represent some components of my model. The problem is with Tools> Mass Properties > Solid Properties I am prompted to choose only one geometry. How can I get the CG of my model without meshing the whole model? Do I have to get the CG in cad and just create a node at the CG instead or can I do it all in FEMAP?


Thanks!
 
Replies continue below

Recommended for you

"How can I get the CG of my model without meshing the whole model?" not sure you can ... meshing is how Femap understands the structure, and is where you apply density and weight.

Sure you can go through AutoCad to get the CG ... I guess that'd be a volume CG since I don't think AutoCad understands weight.
Else run Femap with three supports and determine the CG from the results.

another day in paradise, or is paradise one day closer ?
 
This is something that can be done in Femap via API; see the code below, paste it into your Femap API programming window and try it.

Sub Main
Dim App As femap.model
Set App = GetObject(,"femap.model")

Dim sol As femap.Solid
Set sol = App.feSolid

Dim solset As femap.Set
Set solset = App.feSet

Dim area As Double
Dim vol As Double
Dim cg As Variant
Dim Inetia As Variant

Dim density As Double

solset.Select (FT_SOLID, True, "Select Solids for Mass Properties")

App.feGetReal ("Enter Density", 1E-15, 1E+16, density)

SolidID = solset.First

While SolidID > 0

sol.Get (SolidID)

sol.MassProp (area, vol, cg, inertia)

CGXw = cg(0)

CGYw = cg(1)

CGZw = cg(2)

currentmass = vol*density

mass = currentmass + mass

cgxT = (cgxw*currentmass) + cgxT

cgyT = (cgyw*currentmass) + cgyT

cgzT = (cgzw*currentmass) + cgzT

SolidID = solset.Next

Wend

cgx =(cgxT/mass)

cgy =(cgyT/mass)

cgz =(cgzT/mass)

App.feAppMessage (FCM_NORMAL, "The total Mass of the selected solids is "+ mass+".")

App.feAppMessage (FCM_NORMAL, "Center of Gravity: X = "+ Format (cgx, "0.#####")+", Y = "+Format (cgy, "0.#####")+", Z = "+Format (cgz, "0.#####")+"." )

End Sub


Regards,

Joe
 
Status
Not open for further replies.
Back
Top