How to calculate velocity at cell face?
Currently I am looping over all the cells in my 2-D geometry to find u and v at each cell; however, at the corners and boundaries where I am getting recirculation, the math isn't coming out correctly using the u and v values taken from Fluent. I would assume that the velocity at the centroid is just interpolated from the face velocities so I am trying to find a way to use the velocities at the faces instead; is there a way to do this? I tried writing this quick code to test this but I am getting a Fluent access error when I try to run it:
double centr_x, centr_y;
double vel_x, vel_y;
centr_x = cent;
centr_y = cent;
vel_x = F_U(f,t);
vel_y = F_U(f,t);
printf("%f, %f\n", vel_x, vel_y);
After reading some other threads I saw that this only works for boundaries so I may not be able to do it this way. Is there a way I can get this to work? If not are there any other macros that will help me do what I want? If not I may need to play around with the math and see if I can get it to work better instead. Thanks for your help.
F_U, F_V are only valid for boundary.
For those face in the domain, you can use the averaged value of F_C0 and F_C1.
Thank you, I hadn't seen those macros before. I think I can get what I need from there.
|All times are GMT -4. The time now is 19:11.|