# about calculations of Courant number in openfoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 2, 2013, 06:14 about calculations of Courant number in openfoam #1 Senior Member   Join Date: Jan 2013 Posts: 252 Rep Power: 6 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.

 August 2, 2013, 08:11 #2 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 13 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.

August 2, 2013, 11:49
#3
Senior Member

Join Date: Jan 2013
Posts: 252
Rep Power: 6
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:
 Originally Posted by Bernhard 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.

 August 2, 2013, 11:52 #4 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 13 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?

 August 2, 2013, 11:57 #5 Senior Member   Join Date: Jan 2013 Posts: 252 Rep Power: 6 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.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post flying OpenFOAM Running, Solving & CFD 28 December 30, 2013 16:05 sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47 Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Mesh Utilities 41 January 17, 2013 03:43 Aris Nikolopoulos FLUENT 0 May 6, 2008 08:52 kasim CFX 5 March 16, 2008 19:23

All times are GMT -4. The time now is 13:58.