CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to get stress on a wall from the wind (https://www.cfd-online.com/Forums/openfoam-post-processing/229246-how-get-stress-wall-wind.html)

bansan August 1, 2020 07:29

How to get force on a wall from the wind
 
2 Attachment(s)
Hi,


I run the example windAroundBuildings. I now have the U (x, y, z) and p.


My question is simple : how can I have the pressure on the wall ? I try to use the x projection of the pressure. But on the wall, the pressure is vertical so I don't have any horizontal effort.


Can you explain me how can I compute the pressure on the wall ?


I'm civil engineering, not a physician so maybe it's a formula I don't know.


Thanks for any advice,


Vincent

VigneshSP August 3, 2020 03:55

Hi bansan,
I would recommend you to use "forces" function object and you can get the force on the patches directly and write it as a field.

for Openfoam v2006 : https://www.openfoam.com/documentati...es-forces.html

for Openfoam V8 :
https://cpp.openfoam.org/v8/classFoa...1_1forces.html

example video:
https://youtu.be/LFn7ti4nCm8

bansan August 3, 2020 05:56

Thanks, it's almost what I wanted. But instead of the sum, do you know if it's possible to have the force in each node of the mesh ?

bansan August 3, 2020 08:35

A found a trick to get force at every point.

In file src/functionObjects/forces/forces/forces.C, in function void Foam::functionObjects::forces::applyBins, I add

Code:

forAll(fN, i)
{
  Log << "fN, fT, fP, d : " << fN[i] << " " << fT[i] << " " << fP[i] << " " << d[i] << endl;
}

I just have to do the sum (fN+fT+fP) manually.

It's a hack but that do the job. Thanks again for your help. :)

VigneshSP August 3, 2020 08:47

Glad to help, best wishes:)


All times are GMT -4. The time now is 10:28.