CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Calculating center of mass

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   March 20, 2005, 10:24
Default Does OpenFOAM has the function
New Member
Kristaps Ermanis
Join Date: Mar 2009
Posts: 1
Rep Power: 0
kristaps is on a distinguished road
Does OpenFOAM has the functionality to calculate the center of mass for a complex geometry? If yes, how to do that? If no, is it possible to implement it, using the libraries of OpenFOAM?
kristaps is offline   Reply With Quote

Old   March 20, 2005, 10:35
Default Try: vector c = sum(mesh.V(
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,810
Rep Power: 25
hjasak will become famous soon enough

vector c = sum(mesh.V()*mesh.C().internalField())/sum(mesh.V());

You will, of course, need a mesh for your geometry.


Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote

Old   March 8, 2015, 05:59
Post how to use this code???
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 5
13msmemusman is on a distinguished road
can You guide me how to calculate centre of poressure???? can you tell me how to use it as i am new in openfoam vector c = sum(mesh.V()*mesh.C().internalField())/sum(mesh.V());
13msmemusman is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
center of mass for naca airfoil frederic Felten Main CFD Forum 4 November 15, 2016 12:24
How to get the cellcell center to center distance dx dy dz dbxmcf OpenFOAM Running, Solving & CFD 2 August 8, 2008 04:37
Calculating mass flow rate cfd novice Main CFD Forum 7 April 21, 2008 06:38
Calculating mass flow rate cfd novice CFX 2 April 5, 2008 06:26
Calculating mass flow rate cfd novice FLUENT 1 April 3, 2008 18:31

All times are GMT -4. The time now is 21:47.