|
[Sponsors] |
November 8, 2016, 18:56 |
pimpleFoam adjustable timestep
|
#1 |
New Member
Jeremy
Join Date: Jun 2016
Posts: 4
Rep Power: 9 |
Hi guys!
I was running a simulation with pimpleFoam. Everything is ok except the maximum Courant number remains small(~0.1) even if I set the maxco to be 1. The current time step is 0.02(it is stable and doesn't change) and it is also smaller than maxDeltaT that I set to be 0.1. If I would like to increase my simulation speed, that is, to make the Maxco number close to 1, can anyone tell me what should I do? Thanks a lot! Jeremy Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // libs ("libABLBC.so" "libturbulentABLBCInletVelocity.so"); application pimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 500; deltaT 0.1; writeControl adjustableRunTime; writeInterval 0.1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; adjustTimeStep yes; maxCo 1.0; maxDeltaT 0.1; |
|
November 8, 2016, 19:55 |
|
#2 |
Senior Member
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 9 |
Hi Jeremy,
Did you try to increase 'maxdeltaT'? |
|
November 9, 2016, 16:09 |
|
#3 |
Senior Member
|
Hi,
@bling In general, OpenFOAM wants to make at least 5 time steps between saves, since you writeInterval is 0.1, your maximum time step is 0.02. So, to increase time step, increase your writeInterval. |
|
December 2, 2017, 09:56 |
|
#4 | |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 9 |
Quote:
I have set maxCo=10, however it starts low (1e-4) and doesn't increase. In fact it flat-lines. Why won't the Courant number increase if the solution isn't in trouble? RH. |
||
December 2, 2017, 14:11 |
|
#5 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
The time step will not be larger than write interval.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
December 3, 2017, 07:17 |
|
#6 |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 9 |
Thanks for your help, I understand now. I had lowered my writeInterval because I wanted to generate data right at the beginning of my simulation, not realising this was affecting my Courant number. Does the rule above apply? That is
deltaT writeInterval/5, where 5 is the number of saves OpenFOAM wants to make? RH. |
|
December 3, 2017, 09:44 |
|
#7 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
I don't know form where you the "5" have. I would say
deltaT <= writeInterval If you need soma valuses for the first steps you may change the write interval during the simulation. At least if you use only one processor it should change during the run.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
June 15, 2022, 19:37 |
|
#8 |
New Member
Nikolaos Beratlis
Join Date: Jan 2010
Posts: 15
Rep Power: 16 |
I have the same issue, icoFoam runs with constant time step smaller than the maximum time step even though the Courant number is smaller than the max courant number. Here is the controlDict file:
Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application icoFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 300; deltaT 2e-03; maxDeltaT 5e-03; adjustTimeStep yes; maxCo 1.0; writeControl adjustableRunTime; writeInterval 10; purgeWrite 0; writeFormat binary; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { #include "forceCoeffs" fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); enabled true; timeStart 100; timeEnd 300; outputControl outputTime; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean on; base time; } ); } probes { type probes; libs ("libsampling.so"); writeControl timeStep; enable false; probeLocations ( (1 0 0) (1 0.6 0) (2.4 0.6 0) (3 0.6 0) (5 0.6 0) ); fixedLocations true; fields ( U ); } } Code:
Time = 11.628 Courant Number mean: 0.0151234 max: 0.143464 smoothSolver: Solving for Ux, Initial residual = 6.03065e-05, Final residual = 5.06024e-08, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 6.03038e-05, Final residual = 5.03623e-08, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 1.11447e-06, Final residual = 1.11447e-06, No Iterations 0 DICPCG: Solving for p, Initial residual = 0.000156221, Final residual = 7.45208e-06, No Iterations 154 time step continuity errors : sum local = 1.41406e-13, global = -4.9692e-15, cumulative = 5.69836e-12 DICPCG: Solving for p, Initial residual = 7.45005e-05, Final residual = 9.65905e-07, No Iterations 184 time step continuity errors : sum local = 1.83327e-14, global = 3.18384e-16, cumulative = 5.69868e-12 ExecutionTime = 152.05 s ClockTime = 155 s Time = 11.63 Courant Number mean: 0.0151234 max: 0.143464 smoothSolver: Solving for Ux, Initial residual = 6.02107e-05, Final residual = 5.03845e-08, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 6.02125e-05, Final residual = 5.01549e-08, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 1.11191e-06, Final residual = 1.11191e-06, No Iterations 0 DICPCG: Solving for p, Initial residual = 0.000155738, Final residual = 7.40201e-06, No Iterations 74 time step continuity errors : sum local = 1.40469e-13, global = -7.92162e-15, cumulative = 5.69076e-12 DICPCG: Solving for p, Initial residual = 7.46332e-05, Final residual = 9.66485e-07, No Iterations 183 time step continuity errors : sum local = 1.83421e-14, global = 3.82859e-16, cumulative = 5.69114e-12 ExecutionTime = 152.21 s ClockTime = 155 s Could there be an issue with the field averaging or other operation? Can anyone please help me? Last edited by nikosb; June 15, 2022 at 21:42. |
|
April 13, 2023, 14:08 |
|
#9 |
New Member
Join Date: Nov 2022
Posts: 2
Rep Power: 0 |
icoFoam does not support adjustable time stepping. You can actually check which solver application uses it, by checking its .C file and searching setDeltaT.H in that file. If it exists, the solver supports it.!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No vortex shedding for flow over cylinder at Re = 59 using pimpleFoam | kaszt | OpenFOAM Running, Solving & CFD | 9 | March 15, 2022 07:34 |
error with smaller timestep ? | Thomas MADELEINE | FLUENT | 0 | August 8, 2016 13:02 |
Problems with adjustable timestep control and maxCo Number | wolle1982 | OpenFOAM Running, Solving & CFD | 5 | September 24, 2015 10:07 |
Modifying sonicFoam to run with variable timestep - strange results | dalaron | OpenFOAM Programming & Development | 1 | September 2, 2013 07:21 |
Restart 2-way FSI with different timestep? | Lance | CFX | 10 | April 17, 2013 00:37 |