about calculations of Courant number in openfoam
Hi All,
I am wondering why the factor 0.5 is needed in the expression of Courant number in Openfoam? scalar CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); scalar meanCoNum = 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); Removing the factors seems correct when the above expressions are compared with the definition of CFL number. Thank you very much if someone can give some comments. |
For a cubic cell, you will add up the magnitude of the velocities on the six faces (because of surfaceSum). So by the factor 0.5, you make sure you use the average value of the velocity of opposite face when calculating (u_x/dx+u_y/dy+u_z/dz)*dt.
|
Thank you very much! Here the velocity is the normal velocity for each face that encloses a complete cell. Is my understanding correct? If yes, how can we directly add the velocity to get the average values? If the cell is tetrehral, how is this averaging performed? Thank you!
Quote:
|
Let me remind you that phi=U_f . A_f, so normal velocity times area. This is why you divide by volume. How is the Courant number defined for tet-cells?
|
In openfoam, it seems that the Courant number is not particular for tet cells. So in that case, how does the factor 0.5 come from? Thanks.
|
All times are GMT -4. The time now is 00:01. |