|November 6, 2012, 23:55||
How to calculate velocity at cell face?
Join Date: Nov 2012
Posts: 3Rep Power: 6
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.
|November 7, 2012, 02:42||
Join Date: Feb 2010
Location: Shanghai, China
Posts: 109Rep Power: 8
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.
|face cells, velocity components|
|Thread||Thread Starter||Forum||Replies||Last Post|
|A function to calculate gradient in a cell||Ballal||CD-adapco||0||June 9, 2012 00:07|
|channelFoam for a 3D pipe||AlmostSurelyRob||OpenFOAM||3||June 24, 2011 13:06|
|Compare 2D axi-symmetric and 3D. Is OpenFOAM calculate the velocity wrong?||RalphS||OpenFOAM||6||November 13, 2010 21:51|
|How to calculate gradient of pressure and velocity on an outlet face||skabilan||OpenFOAM Running, Solving & CFD||2||December 8, 2008 18:26|
|DPM velocity at cell face||Szabolcs Varga||FLUENT||1||September 16, 2004 07:30|