|
[Sponsors] |
Courant Number Decreasing Causing Slow Progress |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 25, 2017, 13:14 |
Courant Number Decreasing Causing Slow Progress
|
#1 |
New Member
Join Date: Jun 2016
Posts: 9
Rep Power: 9 |
Hello,
I have been simulating a rocket thrusting into oncoming flow using rhoCentralFoam. I have been trying to use the max courant number setting in controlDict to cap the time steps. This has previously been working fine by having the simulation run at the largest time step for the courant number. However, after some time, the simulation drops to a very small courant number and time step causing the simulation to make almost no progress. For now I have simply fixed the deltaT to allow the simulation to continue, but what is the reason for this drop in courant number after a while of simulation? Thank you |
|
September 26, 2017, 08:37 |
|
#2 |
Member
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 52
Rep Power: 11 |
Hi there,
Since the Courant number depends on: 1º velocity 2º cell size 3º time step it is very likely that u have some cells with a very high velocity value. Due to that, the code lowers the time step to adjust it to the maximum Courant number that you have previuosly set. I hope that info could help u, Alex |
|
September 26, 2017, 14:56 |
|
#3 |
New Member
Join Date: Jun 2016
Posts: 9
Rep Power: 9 |
Thank you for the reply.
The maximum courant number that I have specified is .5. After running at this courant number for a while, the courant number drops to a very low number, something like 1e-17(Order may be wrong, but it is still a small number). If this is because the simulation is detecting that velocity and the cell size require a very small courant number to proceed, is there a fix I can apply to my problem? |
|
September 27, 2017, 02:18 |
|
#4 |
New Member
CFDfreak
Join Date: Dec 2016
Posts: 15
Rep Power: 9 |
Hello
1. Try to change your mesh sizes that is alter your mesh size as per velocity. At high velocity region dont use very fine mesh. Actually reduction in time step indicates solution blow up(apparently i think). So try running in pimpleFoam with high value of nOuterCorrectors like 50-100.
2. Try to initialize proper boundary condition, like k and epsilon value if it is a turbulent model. 3. Try to use lower order schemes for divergence (i.e bounded gauss upwind). update the results Thank you |
|
September 27, 2017, 06:36 |
|
#5 | |
Member
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 52
Rep Power: 11 |
Quote:
In addition to this, another thing you can do is checking where your high Courant number values are very high. This can be done with "postProcess -func CourantNo -time XXXX". With this you can check with paraview where this is happening, and if it is only a small zone or if it is a general thing. In case it is only a small, non important zone, you could try to fix the time step value instead of setting it according to the maximum Courant value. Alex |
||
September 28, 2017, 17:42 |
|
#6 |
New Member
Join Date: Jun 2016
Posts: 9
Rep Power: 9 |
I tried running "postProcess -func CourantNo" (I wasn't sure what to put in "XXXX". Is this for specifying a single time step?) and it failed to execute because "CourantNO cannot find required object phi of type surfaceScalarField". What is the issue here?
Thanks |
|
September 29, 2017, 04:10 |
|
#7 | |
Member
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 52
Rep Power: 11 |
Quote:
If you still want to do this, the easiest way to go is modyfing the solver, making a small change in the createFields.H to make phi writable. In OF 4.1 the line which defines phi is this: surfaceScalarField phi("phi", fvc::flux(rhoU)); You'd have to comment it and put something like this instead volScalarField phi ( IOobject ( "phi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), fvc::flux(rhoU) ); Also, you would havce to compile it under a new name and all that, I don't know if you know how to do that. There's a lot of info of how to do that, but if u are not quite sure, come over here again. Once the field phi is calculated and written in the temporal folders, you should be able of postprocessig the Courant. PS: the XXX refers to the name of the folder you want to postpro. If you don't specify a value, the function will calculate it for all of them Example: postProcess -func CourantNo -time 25.1 (this will calculate for time 25.1) postProcess -func CourantNo (this will calculate for all of them) Alex |
||
January 24, 2023, 02:10 |
|
#8 | |
Member
Join Date: Mar 2017
Posts: 61
Rep Power: 9 |
Quote:
Hi wididid, Could you solve this problem? I have similar issue. I checked the replies into this post, but they didnt help my problem. I am expecting large values of velocity in domain and i cant do anything about it. My time steps, courant number also decreases to 1e-13s which solution does not progress. |
||
January 24, 2023, 11:55 |
|
#9 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Is it possible, that something else limits Co Number?
Which Di Number do you have? Post one step of your log file. Or try something like: // Maximum diffusion number maxDi 1000; in your controlDict. Or simply turn off the adjustTimeStep using: adjustTimeStep no; Regards Peter Last edited by peterhess; January 26, 2023 at 12:48. |
|
January 25, 2023, 05:27 |
|
#10 |
Member
Join Date: Mar 2017
Posts: 61
Rep Power: 9 |
Hi Peter,
I have tried constant time steps at 1e-8, but they didn't work at past. Now, i am trying your maxDi trick on control dict. It seems going well now, but i am not sure, solution needs some time. What does that diffusion number mean? It seems obviously not physical mass/thermal diff number. I couldn't find any explanation on internet. Can you share some document or link? |
|
January 25, 2023, 15:39 |
|
#11 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
If it works, please confirm, so that others can use the suggestion.
You may use a finer mesh by the way, that could also help. If not working, run checkMesh please and post the output, to see if your mesh is fine or not. https://www.researchgate.net/post/Wh...rical-solution Regards Peter Last edited by peterhess; January 25, 2023 at 17:32. |
|
February 6, 2023, 03:15 |
|
#12 | |
Member
Join Date: Mar 2017
Posts: 61
Rep Power: 9 |
Quote:
Hi Peter, I have tried and get the correct solution. I can confirm maxDi (limiting diffusion number) didn't help. Indeed, solution is very sensitive to initial conditions. So I patch the domain with inlet properties (total press, temperature, very low velocity, inlet species mol fractions etc.), then i get the solution and my timesteps didn't drop below 4e-8. However, obviously this method is not time accurate in terms of initial conditions. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TwoPhaseEulerFoam high courant number | mwaqas | OpenFOAM Running, Solving & CFD | 11 | July 11, 2017 14:19 |
multiphaseEulerFoam high Courant number | Frenk_T | OpenFOAM | 5 | November 24, 2016 03:23 |
foam-extend_3.1 decompose and pyfoam warning | shipman | OpenFOAM | 3 | July 24, 2014 08:14 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |