CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Calculating center of mass

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 20, 2005, 10:24
Default Does OpenFOAM has the function
  #1
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(
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Try:

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

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

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 8, 2015, 05:59
Post how to use this code???
  #3
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 67
Rep Power: 3
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

Reply

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
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
center of mass for naca airfoil frederic Felten Main CFD Forum 3 February 20, 2002 12:55


All times are GMT -4. The time now is 07:02.