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

Calculating center of mass

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2005, 09: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, 09:35
Default Try: vector c = sum(mesh.V(
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
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, 04:59
Post how to use this code???
  #3
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 0
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


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 Off
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 11: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 06:53.