CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Computing Courant number

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2013, 09:50
Exclamation Computing Courant number
  #1
Member
 
Liam
Join Date: Aug 2013
Posts: 40
Rep Power: 12
Many is on a distinguished road
Hi everyone,

I have one question related to Courant number. I am trying to simulate a flow in a complex channel with icoFoam, and Courant number is giving me some problems.

I have info about pressure on both inlet and outlet, but no velocity values are given. Also I have made a tetrahedral mesh and on another stage a hybrid mesh (tetra+prism). In order to satisfy stability criterion based on Courant<1, I am not sure about:

1. Which is delta_x? The maximum edge lenght of tetrahedrons?Minimum? This is an unstructured mesh so delta_x is not fixed!

2. How can I stablish a characteristic velocity magnitude for the formula if I donīt have any info about velocity values? (pressure driven flow)

3. IS there any way of fixing the maximum Courant number (less than 0.75 for example) in all mesh and let OpenFOAM work with time step?

Sorry for that stupids questions, but the beginnings are always hard...

Thank you so much in advance!
Many is offline   Reply With Quote

Old   September 12, 2013, 06:18
Default
  #2
New Member
 
Benedikt
Join Date: Apr 2012
Posts: 7
Rep Power: 14
Benedikt is on a distinguished road
First about the mesh: I'm not sure, but I reckon in general a hexaedral mesh should work better than a tetrahedral mesh.

The courant number will be calculated for each cell.
I would suggest to just run the solver and have a look at the logfile afterwards. There you can see the mean Courant number and the max Courant number. If it is too high, decrease deltaT or change the mesh. It is also possible to have a look in paraview in which cell the Courant number is too high. See http://www.cfd-online.com/Forums/ope...nt-number.html

Regarding question 3. Have a look at the systemDic.
There is an entry called "adjustTimeStep".

Last edited by Benedikt; September 12, 2013 at 06:29. Reason: an Addition to visualizing mesh regions with high courant number
Benedikt is offline   Reply With Quote

Old   September 12, 2013, 06:48
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Quote:
Originally Posted by Many View Post
Hi everyone,

I have one question related to Courant number. I am trying to simulate a flow in a complex channel with icoFoam, and Courant number is giving me some problems.

I have info about pressure on both inlet and outlet, but no velocity values are given. Also I have made a tetrahedral mesh and on another stage a hybrid mesh (tetra+prism). In order to satisfy stability criterion based on Courant<1, I am not sure about:

1. Which is delta_x? The maximum edge lenght of tetrahedrons?Minimum? This is an unstructured mesh so delta_x is not fixed!

2. How can I stablish a characteristic velocity magnitude for the formula if I donīt have any info about velocity values? (pressure driven flow)

3. IS there any way of fixing the maximum Courant number (less than 0.75 for example) in all mesh and let OpenFOAM work with time step?

Sorry for that stupids questions, but the beginnings are always hard...

Thank you so much in advance!

icoFoam is a transient solver that used fixed time steps. You need to use e.g. simpleFoam for transient simulations with variable time steps. Then you can specify a maximum Courant number and OF will compute the appropriate time step size.

According to my studies of the sources, the Courant number is computed by OF using the flux, the cell volume instead of velocity and discretization length.

Co = \frac{u \Delta t}{\Delta x} = \frac{u \Delta t}{\Delta x} \frac{A}{A} = \frac{\phi \Delta t}{\Delta V}

The above equation is strictly true only for homogeneous uniform hex-grids. However, it demonstrates how you can calculate a Courant number from fluxes and cells volumes.

So your first question is handled by OF. It computes the Courant number of all cells and then looks for the maximum value. delta_x is not used in the equations.

Is your second question related to estimating the allowed time step size prior to the simulation? With variable time step size solvers, the initial time step size is not that important. If it is too big, you will see it in the solver output, when the solver drastically reduces time step size to match the maxCo criterion.
vgalindo and JohnBruijnen like this.
GerhardHolzinger is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 12:55
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 07:59
Fluent 6.4 courant number Aris Nikolopoulos FLUENT 0 May 6, 2008 08:52
LES near wall model & courant number kasim CFX 5 March 16, 2008 18:23


All times are GMT -4. The time now is 07:39.