Page 1 of 1

surface pressure integration

Posted: Wed Dec 16, 2015 3:46 pm
by ggosse
Hi,

Following these steps
http://code-saturne.org/forum/viewtopic.php?f=2&t=1792
I have added a spherical obstacle and traced the streams.

Now I would like to compute the forces torsor of the fluid pressure onto the spherical surface.
Is there a way to do that ?

Best regards
Gregory

Re: surface pressure integration

Posted: Wed Dec 16, 2015 5:03 pm
by Erwan Le Coupanec
Hello

By default, the total stress at the boundaries should be computed and available in the postprocessing.

In addition, you can enable the postprocessing of the normal and tangential stress in the GUI (Calculation control -> Surface solution control).

You can also manipulate the values of this vector stress at the boundaries in the user subroutine cs_user_extra_operations.f90 (see example cs_user_extra_operations-global_efforts.f90).

Regards,
Erwan.

Re: surface pressure integration

Posted: Thu Dec 17, 2015 12:49 pm
by ggosse
Thanks
I have checked the "stress normal" and "stress tangential" options in CODE SATURNE and can visualize them scalarly in PARAVIEW.
What I would like now is to vectorially sum the stresses on a surface to compute the global effect of stresses as one force and one moment.
The surface correspond to a separate "boundary region" type=WALL in CODE SATURNE.

Regards
Gregory

Re: surface pressure integration

Posted: Thu Dec 17, 2015 3:25 pm
by Erwan Le Coupanec
Hi,

As I said, take a look at the file cs_user_extra_operations-global_efforts.f90 in the directory SRC/EXAMPLES of your case.

In this file, first, the boundary force is retrieved in the array bfprp_for.
It is a 3*(number of boundary faces) array, since it is directly the force at the boundary which is computed.

Then the boundary faces of group 1 and 2 are selected and finally the total force exerted on this surface is computed.

The call to parrsm at the end ensures that the sum is performed on all the processors in case of parallel calculation.

To compute the moment, you just need to perform sum up a vectorial product computed at each face.

Regards,
Erwan.

Re: surface pressure integration

Posted: Thu Dec 17, 2015 3:54 pm
by ggosse
Ok, I look at that and let you know.

Regards. Gregory

Re: surface pressure integration

Posted: Wed Feb 17, 2016 2:19 pm
by ggosse
Hi,
I have used cs_user_extra_operations-global_efforts.f90 to compute the front and back efforts on this object.
Radius=600
Fluid velocity : 22m/s Density 1kg/m3 Viscosity 2e-5 Pa.s

And would like to compare to a drag formula F = 0.5 x Density x Coef x Surface x (Velocity)²
With a coef between 1.2 and 1.4 for that kind of shape

cs_user_extra_operations-global_efforts.f90 gives for front face:
-325033805.78958094
5992733.2299289312
2860901.3372025760
for backface:
-816116463.33382785
8027348.1732968809
23022411.520196483

(In Salome I used radius 600 assuming millimeters. As Saturne assumes meters my efforts are 1e6 higher.)

The frontface efforts seem to correspond to the formula with a coef 1.2
But the backface efforts are more than twice !
I think I should add the front and back efforts to compute the total drag. But the result is more than x3 the formula!

Am I wrong ?

The velocity is -x direction and the shape perpendicular so there is also unexpected lateral efforts ...

Regards
Gregory

Re: surface pressure integration

Posted: Wed Feb 17, 2016 3:02 pm
by Yvan Fournier
Hello,

You should integrate the (vector) over the whole obstace.

Actually, "efforts" are a stress (i.e. peru unit surface) value, and were renamed in 4.2 to make things clearer.

So you need to sum efforts.surface_norma over boundary faces of the obstacle.

Regards,

Yvan