I am using Code_Saturne 7.0.2 to test coupling case by PLE coupling library, and using c language. I successfully do coupling case by Dirichlet boundary condition for lid-driven case(or cavity flow), and in Code_Saturne part, my code shows as follows,
Now, I am testing the Nuemann boundary condition, and I send velocity gradient (dUx/dx, dUy/dx, dUz/dx) perpendicular to the boundary. The code in CS shows as follows,
However, the code can run but I found the flow field does not change after a lots time step, and all velocities are zero. Do you know how to deal with the problem?
Attachment: the configure file in Code_Saturne.
Much appreciated!
Yang
Code: Select all
// Implement Dirichlet BC
icodcl[(ivarv + ic) * n_b_faces + face_id] = 1;
rcodcl[(ivarv + ic) * n_b_faces + face_id] = v_luma[3 * i + ic];
// here, v_luma[] is the velocity component in there direction at a coupling point.
// Implement Neumann BC
icodcl[(ivarv + ic) * n_b_faces + face_id] = 3;
rcodcl[(ivarv + ic) * n_b_faces + face_id] = v_luma[3 * i + ic];
//here, I send velocity gradient (dUx/dx, dUy/dx, dUz/dx) using v_luma[].