Page 2 of 2

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Fri Nov 29, 2019 2:33 pm
by daniele
Dear Luciano,

Thanks a lot, you are right, the correct field is iforbr.
I am now able to calculate the Stress on the cell surfaces.
I still have one problem. In order to obtain the force, I have to multiply the Stress by the boundary surface of the cell.
The surface value is given by surfbn(ifac) if I am not wrong.
To check the consistency, I performed the following test to calculate the total boundary surface:

Code: Select all

s_tot = 0.d0
 call getfbr('STRUCTURE_WALL', nlelt, lstelt)
    do ilelt = 1, nlelt
       ifac = lstelt(ilelt)
       s_tot=s_tot+surfbn(ifac)
    enddo
Post-processing "s_tot" at every time step, I always have s_tot=0.
Is surfbn the right field to get the face surface?

Thank you very much in advance.
Best regards,
Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Fri Nov 29, 2019 3:26 pm
by Luciano Garelli
Hello,

You can check the user example cs_user_extra_operations-global_efforts.f90 file. You don't need to multiply by the face area.
Are you running in parallel or serial? Because if you run in parallel you have to do a parallel sum of this variable and the same for the forces.

Regards,
Luciano

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Fri Nov 29, 2019 5:13 pm
by daniele
Hello,

I agree with you about the example.
Nevertheless, in code_saturne doxygen "iforbr" is described to be "field id of the stresses at boundary".
That's why I am confused. It looks as if iforbr was just mu*du_i/dx_i.
Moreover, are pressure forces taken into account inside iforbr?
I did a test to double check: I calculated the sum of iforbr (along a given direction) for the "internal coupling" wall. The obtained value is completely different from the one printed inside the "probes_str_force_i.dat".

I should maybe try to look inside the source what iforbr is exactly...

Have you ever used this field to postprocess forces?

Thank you very much!

Best regards,

Daniele

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Fri Nov 29, 2019 6:10 pm
by Luciano Garelli
Hello,

Both are taken into account, pressure and viscous forces. You can check the file post_util.f90. In this file the forces are used to compute normal and tangential stresses to be the post-processed in salome.

Also I guess that in the forum there are several post about the force posprocessing.

Regards,
Luciano

Re: ALE simulations: local fluid force on specific rigid body positions

Posted: Wed Dec 04, 2019 11:07 am
by daniele
Dear Luciano,

Thanks to your help, I managed to calculate the forces on the faces I wanted to.

Thank you very much!

Best regards,

Daniele