Page 1 of 1

access velocity x,y,z

Posted: Tue Feb 19, 2019 5:59 pm
by Ionut G
Hello,

I need to access the velocity, on x, y and z direction, from inside the cs_wall_functions_2scales_log, "cs_wall_functions.h" file.
I assume the variable "vel" is the velocity in the x direction, it is correct?

From doxygen documentation, I understood that I should use this "cs_real_3_t *cvar_vel = (cs_real_3_t *)CS_F_(u)->val" but after when I try to access "uy = cvar_vel[cell_id][1]" I don't know "[cell_id]".
Can anyone help me solve this problem?

Thank you very much,
Ionut

Re: access velocity x,y,z

Posted: Wed Feb 20, 2019 2:01 am
by Yvan Fournier
Hello,

When accessing the general velocity field, the access to cvar_vel described in the Doxygen documentation allows acessing components x, y, z for a given cell (cell_id).

But in the wall functions, the "vel" velocity passed to the cs_wall_functions_2scales_log is the relative tangential velocity (see clptur.f90, starting line 595 on master branch to see how it is computed).
So the velocity accessible inside the wall functions is in a local reference frame, not in the "absolute" reference frame.

Best regards,

Yvan

Re: access velocity x,y,z

Posted: Wed Feb 20, 2019 1:28 pm
by Ionut G
Thank you very much, Yvan