|
[Sponsors] |
October 5, 2016, 00:45 |
How to identify a problem in CFL condition.
|
#1 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
This is about explicit, 3D, compressible NS solver. Consider two cases:
1) Code diverges after n time steps with step size dt. When I reduce the time step to 0.1*dt, the code diverges after 10*n time steps. i.e. code blows at the same actual time. 2) Code diverges after n time steps with step size dt. When I reduce the time step to 0.1*dt, the code still diverges after n time steps. Which of the cases indicate a problem in CFL condition/numerical instability? What does the other case indicate? Or is it that either of the cases don't indicate anything specific, and there can be multiple possibilities where the problem is? Thanks |
|
October 5, 2016, 03:30 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
I think that before to talk of a numerical instability you have to check that exists a certain smaller dt for which your computation is stable. Conversely, I would always check for some bug in the code.
|
|
October 5, 2016, 12:37 |
|
#3 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
The code works when Mach no of the flow is 2. When I increase it to 4, it diverges. I decreased dt several times but it diverges at the same nth time step.
|
|
October 5, 2016, 12:45 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Are you solving Euler equations? Do you consider in the CFL condition the sound velocity? no dt values drive to a stable solution at M=4?
|
|
October 5, 2016, 12:54 |
|
#5 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
I'm solving compressible navier stokes.
Actually the code is not mine and the person who wrote the code has not included any CFL condition. He used a dt which worked for him for Mach no 2. I have to run it for Mach no 4. I just wanted to test it out quickly so when it diverged, I reduced dt, but does not work. And no dt works. Reduced it to at least 0.0001*dt just to see if it works, but it doesn't. |
|
October 5, 2016, 13:03 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Quote:
these details are not sufficient to understand the problem.... what are you simulating? Increasing the Mach number you increase the velocity and the Reynolds number. Have you checked the fields before the code diverges? |
||
October 5, 2016, 13:08 |
|
#7 | |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
Quote:
The conditions are standard atm. And with the present conditions, Reynolds no is around 1000 And thanks for the help |
||
October 5, 2016, 13:15 |
|
#8 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Usually, numerical instability does not appear in few steps... I would check for a bug in the code ...I suggest to run the code for a single dt and check all the variables.
|
|
October 5, 2016, 14:06 |
|
#9 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
||
October 6, 2016, 13:14 |
|
#10 |
New Member
Join Date: Aug 2014
Location: Lexington
Posts: 11
Rep Power: 12 |
I use Cradle CFD for my simulations and I do a lot of transients. You may want to refine the mesh close to the boundaries especially. Secondly, run the simulations with a fixed time step instead of CFL and monitor the CFL number as the simulation progresses. Go back and use a Courant number that is lower than that.
|
|
October 7, 2016, 00:09 |
|
#11 |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
Thanks ashi.ismd
|
|
October 7, 2016, 05:27 |
|
#12 |
Senior Member
|
Generally speaking, if the simulation blows up at a given physical time, then it is a matter of physics or how you represented it in your code.
In this sense, a CFL instability is physics, because your scheme amplifies perturbations at a given rate. But you might have, as well, also introduced additional "unwanted" physics by some coding mistake. In contrast, when the simulation blows after a fixed number of steps, no matter how small they are, it is much more likely that something is wrong from the programming point of view (allocations, etc.). |
|
October 7, 2016, 21:22 |
|
#13 | |
New Member
Pawan Kerkar
Join Date: Sep 2016
Posts: 29
Rep Power: 10 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem of implementing a new solver with a special boundary condition | huyidao | OpenFOAM Programming & Development | 0 | April 27, 2015 09:24 |
an error problem for a change of boundary condition | tsi07 | FLUENT | 7 | May 15, 2012 08:56 |
Problem with "symmetryPlanne" boundary condition | fcuevas | OpenFOAM Running, Solving & CFD | 1 | March 14, 2012 06:07 |
problem with boundary condition??? | smn | CFX | 5 | November 24, 2009 07:37 |
CFL condition | Sergei | Main CFD Forum | 2 | October 13, 2004 16:38 |