Vorticity calculation
I need to calculate vorticity at every time-step since I need to use it for some other calculations. I will be doing that using
Code:
W = fvc::curl(U) My query is about the locations of the generated field, W. Is it stored at the cell centers or at the cell face centers? |
Hello,
To answer it in short, cell centres. Two ways to find out Method 1 Take a look at the vorticity functionObject. https://www.openfoam.com/documentati...8H_source.html https://www.openfoam.com/documentati...8C_source.html See line 54 in vorticity.C. It kind of does what you want to do. Basically the same operation. Now let us look at vorticity.H, see lines 49 and 51. You see that input (which is a velocity) is of the type volVectorField and the output (which is vorticity) is also of the type volVectorField. The data of the type volVectorField is stored in cell centres. Method 2 Just print out your vorticity. Code:
w.write() Thanks |
All times are GMT -4. The time now is 02:44. |