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

Calculating Forces

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

LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2017, 13:59
Default Calculating Forces
Join Date: Jun 2017
Posts: 73
Rep Power: 8
Friendly is on a distinguished road

I intend to calculate the drag and lift on a body. Therefore I would like to know how OpenFOAM calculates those forces. I have no troubles to make the solver calculate thoses forces but I would like to interpret them and therefore I need to know how they are calculated.

In forces.C it appears, that OpenFOAM calculates a total force by integrating the pressure over a surface. The projection in a given direction is the drag force. But what about viscious drag?

Can anybody help me with that?
Friendly is offline   Reply With Quote

Old   November 30, 2017, 22:08
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 12
Lisandro Maders is on a distinguished road

I took a quick look in the "forces.C" file and I think it should be something close to this:

In the "forces.C" file you will find the function

void Foam::functionObjects::forces::calcForcesMoment()
in which the pressure, viscous and porous forces are calculated separately. The viscous forces, for instance, are stored as a "vectorField", through an object called "fT" and it is calculated in its construction as follows:

vectorField fT(Sfb[patchi] & devRhoReffb[patchi])
Somewhere it should have a loop to sweep all surfaces from a given [patchId].

Hope it helps.

Regards, Lisandro Maders
Lisandro Maders is offline   Reply With Quote

Old   December 1, 2017, 06:26
Join Date: Jun 2017
Posts: 73
Rep Power: 8
Friendly is on a distinguished road
Thank you very much, it does.

I have found this as aswell (and for fN aswell). I have two questions for the second line of code you have posted:

What excatly does "&" mean? And what is "Sfb"? B stands for boundary, but why excatly is Sf? I think it has to be the normal vector fo the surface times the are of the surface (surface of the face).
Friendly is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! problems in calculating forces with SimpleFoam DLC OpenFOAM 3 April 25, 2022 23:43
Problem calculating forces on blades 2 (for finding forces) bye bye my blue OpenFOAM Running, Solving & CFD 16 April 19, 2018 10:48
calculating forces from forceDensity achyutan OpenFOAM Running, Solving & CFD 0 August 6, 2013 07:37
Calculating forces on a non-closed surface ScottN FLUENT 0 March 1, 2011 17:18
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27

All times are GMT -4. The time now is 04:35.