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

Courant number

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2012, 22:54
Default Courant number
  #1
New Member
 
Melika
Join Date: Feb 2012
Location: Japan
Posts: 24
Rep Power: 14
libra is on a distinguished road
Hi everyone
I am simulating the water flow in a pipe using LES with OpenFoam version 1.6.
It seems that there is something wrong with "courant number" in my computations. During the computations it gets bigger and bigger and finally the computation stops. The value I should choose for courant number is 5*10^-4 according to the calculations, but I have even chosen a smaller value: 10^-5. I am wondering why this number gets so big?????
libra is offline   Reply With Quote

Old   February 15, 2012, 05:35
Default
  #2
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 17
niaz is on a distinguished road
Dear libra
it is big problem in openfoam. but it has easy solution
you can limit your courant with "maxCo 0.2;"
it controls your courant and adapt your time steps.
niaz is offline   Reply With Quote

Old   February 15, 2012, 23:56
Default
  #3
New Member
 
Melika
Join Date: Feb 2012
Location: Japan
Posts: 24
Rep Power: 14
libra is on a distinguished road
Hi Niaz
Thanks for your comment. I limited the Courant number and my computation is running for now. I hope it works.
libra is offline   Reply With Quote

Old   February 17, 2012, 05:48
Default
  #4
New Member
 
Melika
Join Date: Feb 2012
Location: Japan
Posts: 24
Rep Power: 14
libra is on a distinguished road
Quote:
Originally Posted by niaz View Post
Dear libra
it is big problem in openfoam. but it has easy solution
you can limit your courant with "maxCo 0.2;"
it controls your courant and adapt your time steps.
Dear Niaz
I changed my "controlDict" file to the following to limit the courant number:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application channelFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1;

deltaT 1e-5;

writeControl adjustableRunTime;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.5;

maxDeltaT 1;

functions
{
fieldAverage1
{
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;
fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}
);
}
}


// ************************************************** *********************** //

But it didn't work and the courant number exceeds 0.5. Do you have any idea about this?
Thanks
libra is offline   Reply With Quote

Old   February 22, 2012, 15:02
Default
  #5
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 17
niaz is on a distinguished road
Libra
channelFoam cannot control courant number.
you should add setDeltaT.H to your solver.
niaz is offline   Reply With Quote

Old   February 22, 2012, 15:03
Default
  #6
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 17
niaz is on a distinguished road
If you need help just look at pimpleFoam as an example.
niaz is offline   Reply With Quote

Old   February 23, 2012, 22:25
Default
  #7
New Member
 
Melika
Join Date: Feb 2012
Location: Japan
Posts: 24
Rep Power: 14
libra is on a distinguished road
Thanks Niaz. Problem solved.
libra is offline   Reply With Quote

Old   April 9, 2014, 08:06
Default
  #8
New Member
 
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12
DuarteMagalhaes is on a distinguished road
Hi everyone. I'm using icoFoam and i want to control the Courant number. I've tried to insert "maxCo 0.5;" in the controlDict file, but it didn't work. Can anyone help me on this?
DuarteMagalhaes is offline   Reply With Quote

Old   April 9, 2014, 08:40
Default
  #9
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Quote:
Originally Posted by DuarteMagalhaes View Post
Hi everyone. I'm using icoFoam and i want to control the Courant number. I've tried to insert "maxCo 0.5;" in the controlDict file, but it didn't work. Can anyone help me on this?
The solution is in this topic. Read carefully!
Bernhard 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
Courant number fireman FLUENT 7 September 11, 2021 12:33
IcoFoam unstability, courant number gets large! vivien OpenFOAM 11 March 9, 2017 04:45
LES near wall model & courant number kasim CFX 5 March 16, 2008 19:23
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58
Courant number calculation - unsteady flow Kuba FLUENT 0 November 8, 2005 23:44


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