CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Courant number constraint and Co utility (https://www.cfd-online.com/Forums/openfoam-bugs/144210-courant-number-constraint-co-utility.html)

francesco.manara90 November 10, 2014 09:55

Courant number constraint and Co utility
 
Hi everyone,

I hope this is the right place for my post, since it's my first post on here.
I'm using pimpleFoam to solve an instationary problem in a nasal cavity using LES under the constraint of max Courant number = 1, of course with adjustable time step. The log file displays good mean and max Co (usually between 0.6 and 1.01), but when i run the Co utility in order to plot the Co field, it gives completely different values such as 1e08.
Where is the mistake?

Thanks!

laurentD November 10, 2014 10:31

Hi Francesco,
i had the same interrogation some weeks ago.
When you fix the limit of the Courant number, it is calculated at each timestep with the velocities of the previous timestep.
But when you use the Co utility, i think that, like me, you use it with the results from your job. But you don't print results at each time step (i hope).
So for example, if you print your results every 1 second, the timestep used for the calculation of the Courant number is 1.
It is normal that the result seems too big.
Otherwise, the global plot show the good relative distribution.
I hope i have helped you a little.
Have a good day.
Laurent

francesco.manara90 November 10, 2014 10:45

Hi Laurent,

thank you for your quick reply. Unfortunately, i dont't think this is the (unique) reason for the results being different. In fact, for example, I am writing results each 0.2 seconds and the calculated time step is, as I can see from the log file, 0.02667 seconds. So, this would only explain a difference of 10 times, not 1e08.
However, the question about where does the utility take the time step in order to post-calculate Courant number is a very good one.

laurentD November 10, 2014 10:58

Yes you're right : 1e08 is a very strange result. But in my case, the difference between the Co calculated during he job and the one calculated with the Co utility is exactly the one caused by the reason i told you. In your case, there is another problem.
What rho value do you use ? (to work, the Co utility needs a rho file in each timestep directory if my remembers are good).
Laurent

francesco.manara90 November 10, 2014 11:02

I am running an incompressible case, so there is no rho file (neither the Co utility asks for it)
Francesco


All times are GMT -4. The time now is 23:47.