CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Transient analysis with turbFoam very high Courant nr

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

Like Tree1Likes
  • 1 Post By philippose

Reply
 
LinkBack Thread Tools Display Modes
Old   August 7, 2007, 05:33
Default Hello! I am using turbFoam
  #1
New Member
 
Hardy
Join Date: Mar 2009
Location: Sweden
Posts: 19
Rep Power: 8
hardy is on a distinguished road
Hello!

I am using turbFoam to do a transient analysis. First I made a steady state analysis to get a start solution for the transient case. After changing to transient, whith Euler scheme, the Courant number becomes very high within a couple of time steps and the simulation crashes.

This happens even when I lower the time step to a small value. Am I perhaps doing something wrong when going to transient? I simply set the start time, in controlDict, as the number of the latest iteration from the steady state case in whose folder all variables are saved. Will my boundary conditions be preserved now? Is this the right way to do it or am i missing something here....or somewhere else...

Any ideas appreciated!!
hardy is offline   Reply With Quote

Old   August 13, 2007, 09:01
Default Hello again! Just to compl
  #2
New Member
 
Hardy
Join Date: Mar 2009
Location: Sweden
Posts: 19
Rep Power: 8
hardy is on a distinguished road
Hello again!

Just to complement myself, the steady state start solution is made with simpleFoam before taking the results to turbFoam.

And after doing some more investigation I think I can rule out the concerns about preservation of the boundary conditions. They are stored in the result files under boundaryField, right?

Thank You!!
/H
hardy is offline   Reply With Quote

Old   August 13, 2007, 11:33
Default Hello Hardy, this may happen,
  #3
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8
rolando is on a distinguished road
Hello Hardy,
this may happen, if the pressure equation isn´t solved accurately enough.
Make sure, that your initial Co is small enough, take a value of 0.2 or 0.3 for that.
Increment the number of correctors and non-orthogonal correctors (how much is problem dependend).
If your simulation runs stable, after a while you can change that parameters to improve efficiency.

Experiment with that.

Rolando
rolando is offline   Reply With Quote

Old   August 13, 2007, 11:43
Default Hello Hardy, A Good day to
  #4
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello Hardy,

A Good day to you :-)!

I have a couple (ok..more :-)!) of questions regarding the problem you are facing.....

You mentioned that the Courant number becomes "high" after a few iterations, and that happens even when you make the time steps "small".

Could you quantify these terms? How high does the Courant number go and after how many iterations, and what was the smallest time step you tried ?

Also... how big is your mesh, what kind of cells does your mesh contain, and how well did the solution converge during the steady state run using simpleFOAM, after how many iterations?

I know that is a lot of stuff to ask for :-)! But it would help figure out why your Courant number is shooting up.

One other thing.... did you try the Automatic Time Step adjust feature in OpenFOAM? You can set a maximum courant number, and the time step is automatically adjusted to maintain this courant number.

Have a nice day!

Philippose
philippose is offline   Reply With Quote

Old   August 14, 2007, 02:52
Default Thank You for your kind answer
  #5
New Member
 
Hardy
Join Date: Mar 2009
Location: Sweden
Posts: 19
Rep Power: 8
hardy is on a distinguished road
Thank You for your kind answers and ideas!

I have now set the time step to give a Courant nr = 0.3 I also set the number of correctors and nonorthogonal correctors up to 5 and it really seems to work now!! :-)

Philippose, you made me interested in the Automatic Time Step adjust feature. How do you use it, is there perhaps some kind of tutorial to look into?

Thanks!

/H
hardy is offline   Reply With Quote

Old   August 14, 2007, 14:24
Default Hi Hardy, The Automatic Tim
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 9
paka is on a distinguished road
Hi Hardy,

The Automatic Time Step function is defined in the same dictionary file as maximum Courant number. It is a controlDict file in system/ folder.

There is writeControl option. Change it to adjustableRunTime. Also there is runTimeModifiable option, set it to yes. Remember the automatic time step is dependent on maxCo value, so it is adjusted to fit it.

Hope that helps.

Cheers!
Krystian
paka is offline   Reply With Quote

Old   August 14, 2007, 15:55
Default Hello, Oops.... Krystian, t
  #7
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello,

Oops.... Krystian, there is an oversight in the suggestion you have provided.... the changes to be made to enable Automatic Time stepping in OpenFOAM are the following:

As you mentioned, these changes have to be made to the controlDict file within the system folder of a case... but the changes themselves are:

maxCo [the maximum Courant number you want];

adjustTimeStep [yes/no];

For example, you could add the following two lines to the end of your controlDict file to enable automatic time stepping, where the maximum courant number is limited to 0.5:

maxCo 0.5;
adjustTimeStep yes;

The other two options...

writeControl adjustableRunTime - This basically tells the system, to adjust the time step (if the time step is variable) so that at the point in time when an output needs to be written to disk, the simulation time exactly equals the write time.....

For example, if you had a simulation time of 0.0018, and the time at which the next write happens is 0.002, and you had variable time step step which at that instance was 0.00025... then, the time step would be adjusted to 0.0002, so that the solution can be written to disk at the next step.

runTimeModifiable [yes/no>] - This option tells the system, that even when a simulation has been started, and is running, if there is a change in any of the files for example, controlDict, fvSolution, fvSchemes, etc...etc... these changes should be accounted for, from the next simulation step onwards.

Using this option, you can change, for example, the write interval, or the solver tolerances, etc... while the simulation is running.

Anyway.... now... there is one more problem... :-)!

turbFoam by default, does not support adjustable time stepping. So, even if you do put these two options into the controlDict file, you will still not see any changes in the time step.

I have made the small modifications required to turbFoam to enable variable time-stepping, and created another solver called turbFoamVarDt (Couldnt think of a better name :-)!), which you could compile and try out...

turbFoamVarDt.tar.gz

Enjoy!

Philippose
dalaron likes this.
philippose is offline   Reply With Quote

Old   August 15, 2007, 05:34
Default Thank You all once again!
  #8
New Member
 
Hardy
Join Date: Mar 2009
Location: Sweden
Posts: 19
Rep Power: 8
hardy is on a distinguished road
Thank You all once again!

I managed to get the turbFoamVarDt solver to run and am now exploring its capabilities :-)

To switch subject a bit, does anyone know how to get values of lift and drag force from each time step? I have seen other threads on this subject on the forum but don´t realy get it??

Regards!

/H
hardy is offline   Reply With Quote

Old   August 1, 2008, 16:39
Default Thanks Philippose for sharing
  #9
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Québec, QC, Canada
Posts: 208
Rep Power: 9
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Thanks Philippose for sharing this variable delta T turbFoam, I have adapted it to OF 1.5 and also made it read the maxCo value at every loop in order to be able to change it while the program is running.

(I simply moved the # include "readTimeControls.H" within the while loop)

turbFoam.tar.gz

It is also interesting to note that the writeInterval for this represents the time interval in seconds and not in timesteps.
louisgag is offline   Reply With Quote

Old   November 12, 2008, 04:33
Default Time = 0.0038 Courant Numbe
  #10
emilianyassenov
Guest
 
Posts: n/a
Time = 0.0038

Courant Number mean: 2.09671 max: 1060.3
DILUPBiCG: Solving for Ux, Initial residual = 0.919624, Final residual = 1.67874e-06, No Iterations 37
DILUPBiCG: Solving for Uy, Initial residual = 0.901699, Final residual = 2.47234e-06, No Iterations 36
DILUPBiCG: Solving for Uz, Initial residual = 0.938489, Final residual = 4.1829e-06, No Iterations 36
DICPCG: Solving for p, Initial residual = 0.879601, Final residual = 0.00364827, No Iterations 1001
time step continuity errors : sum local = 0.0259577, global = 9.6956e-08, cumulative = 3.94409e-06
DICPCG: Solving for p, Initial residual = 0.666183, Final residual = 0.000557632, No Iterations 1001
time step continuity errors : sum local = 0.0113467, global = 8.28394e-06, cumulative = 1.2228e-05
DILUPBiCG: Solving for T, Initial residual = 0.64382, Final residual = 6.68318e-08, No Iterations 59
ExecutionTime = 378.29 s ClockTime = 381 s

Time = 0.0039

Courant Number mean: 9.857 max: 30723.2
DILUPBiCG: Solving for Ux, Initial residual = 0.992898, Final residual = 7.52633e-06, No Iterations 52
DILUPBiCG: Solving for Uy, Initial residual = 0.990041, Final residual = 4.81015e-06, No Iterations 55
DILUPBiCG: Solving for Uz, Initial residual = 0.995945, Final residual = 7.08196e-06, No Iterations 51
DICPCG: Solving for p, Initial residual = 0.943505, Final residual = 0.00279098, No Iterations 1001
time step continuity errors : sum local = 0.133287, global = 0.000834918, cumulative = 0.000847146
DICPCG: Solving for p, Initial residual = 0.511564, Final residual = 0.000185419, No Iterations 1001
time step continuity errors : sum local = 0.0590576, global = -0.0111944, cumulative = -0.0103473
DILUPBiCG: Solving for T, Initial residual = 0.906877, Final residual = 6.47856e-08, No Iterations 76
ExecutionTime = 392.06 s ClockTime = 395 s

Time = 0.004

Courant Number mean: 114.419 max: 474556
DILUPBiCG: Solving for Ux, Initial residual = 0.997831, Final residual = 5.29673e-06, No Iterations 199
DILUPBiCG: Solving for Uy, Initial residual = 0.995946, Final residual = 2.97571e-06, No Iterations 208
DILUPBiCG: Solving for Uz, Initial residual = 0.997078, Final residual = 7.97488e-06, No Iterations 198
DICPCG: Solving for p, Initial residual = 0.967972, Final residual = 0.244505, No Iterations 1001
time step continuity errors : sum local = 357.75, global = -0.0473633, cumulative = -0.0577106
DICPCG: Solving for p, Initial residual = 0.43629, Final residual = 0.000865386, No Iterations 1001
time step continuity errors : sum local = 78.2216, global = -0.0380752, cumulative = -0.0957858
DILUPBiCG: Solving for T, Initial residual = 0.96816, Final residual = 8.15618e-08, No Iterations 88
ExecutionTime = 411.14 s ClockTime = 414 s

Time = 0.0041

I have such a problem that courant number increasing after a while...I can t find out the problem...I have decrease time steps and it is working longer but again crash...
can someone help me?

best regards

emo
  Reply With Quote

Old   November 12, 2008, 09:02
Default can anyone help me? please
  #11
emilianyassenov
Guest
 
Posts: n/a
can anyone help me?

please
thanks

Emo
  Reply With Quote

Old   November 12, 2008, 10:42
Default If I recall correctly, turbFoa
  #12
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
If I recall correctly, turbFoam is already equiped with a variable timestepping routine based on a Courant number.

If you are in doubt with respect to how to apply it, look into the controlDict in the interFoam/damBreak case.

Besst regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   November 18, 2008, 05:55
Default Hi Emilian, I see your delt
  #13
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 8
wolle1982 is on a distinguished road
Hi Emilian,

I see your deltaT is 1e-4...? try a smaller deltaT. when I calculate my grids. I'm startting with a deltaT of 1e-8. after 1000 timesteps calculated I turn it up to 1e-7. 1000 later to 1-e6. and finally to 5e-6. this works fine.
wolle1982 is offline   Reply With Quote

Old   November 19, 2008, 14:36
Default Hi again, here are some fac
  #14
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 8
wolle1982 is on a distinguished road
Hi again,

here are some facts to look after for a better running (anyone please correct me if I'm wrong)

- alternatively you can use adjustable timestepcontrol (see under http://www.cfd-online.com/OpenFOAM_D...tml?1227012935 )

- the non-horthogonality mustn't be to great

- using a more aggressive solver/schema

- increasing the solution precision (make smaller!)

- maybe start simulation with turbulence OFF. after good advice turn on and go on simulating

- turn down turbulence a little

- does your mesh look "smooth"??

- all BC correct?

hope that helps a little
wolle1982 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
courant number for transient flow on CFX ? amine CFX 13 August 20, 2013 19:02
TurbFoam and high nu viscosity lam OpenFOAM Running, Solving & CFD 0 June 7, 2007 10:54
PISO for high Courant Numbers turb Main CFD Forum 1 April 20, 2006 11:42
courant number for cfx transient run Mike CFX 8 April 6, 2006 23:48
High lift analysis using overset kei-tee Main CFD Forum 0 April 10, 2003 09:53


All times are GMT -4. The time now is 10:01.