understanding the PIMPLE algorithm

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

shIxx
Posts: 21
Joined: Wed Mar 28, 2018 10:13 am
Location: Bavaria (Germany)

understanding the PIMPLE algorithm

Postby shIxx » Wed Oct 24, 2018 9:21 am

hi guys,
I have a question regarding the transient algorithm.
I noticed that the size of the time steps for the solver does not matter. The solver calculates with another delta t
.......
.......
smoothSolver: Solving for omega, Initial residual = 0.004410836, Final residual = 7.8808988e-009, No Iterations 17
smoothSolver: Solving for k, Initial residual = 0.16740384, Final residual = 8.6197292e-009, No Iterations 37
ExecutionTime = 121.62 s ClockTime = 122 s

Courant Number mean: 0.20074245 max: 5.0545416
deltaT = 0.00027325827
Time = 0.00108677

PIMPLE: iteration 1
smoothSolver: Solving for Ux, Initial residual = 0.00016858864, Final residual = 1.5728663e-005, No Iterations 1
.......


should't delta t match the specified time step (in this case 0.05s) and should the graph of the residuals not look like this?
Image
case 3b [https://openfoamwiki.net/index.php/Open ... n_OpenFOAM]
thschrader
Posts: 1383
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: understanding the PIMPLE algorithm

Postby thschrader » Wed Oct 24, 2018 10:01 am

I had a look at the pitzdaily-tutorial.
In the controlDict, parameter "adjustTimeStep" is set to "yes" by default.
Did you use this too?
shIxx
Posts: 21
Joined: Wed Mar 28, 2018 10:13 am
Location: Bavaria (Germany)

Re: understanding the PIMPLE algorithm

Postby shIxx » Wed Oct 24, 2018 12:30 pm

thschrader wrote:
Wed Oct 24, 2018 10:01 am
I had a look at the pitzdaily-tutorial.
In the controlDict, parameter "adjustTimeStep" is set to "yes" by default.
Did you use this too?
No I do not, because I have no idea of openFOAM in the text-based environment. I only used it with freeCAD as GUI so I do not know how to look/runs through at these tutorials.

At least I've found where they are :D
C:\Program Files\blueCFD-Core-2017\OpenFOAM-5.x\tutorials\basic\potentialFoam\pitzDaily\system\controlDict

However, I do not know what to do with these files
thschrader
Posts: 1383
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: understanding the PIMPLE algorithm

Postby thschrader » Wed Oct 24, 2018 2:05 pm

shIxx wrote:
Wed Oct 24, 2018 12:30 pm
... I have no idea of openFOAM in the text-based environment. I only used it with freeCAD as GUI so I do not know how to look/runs through at these tutorials.
At least I've found where they are :D
C:\Program Files\blueCFD-Core-2017\OpenFOAM-5.x\tutorials\basic\potentialFoam\pitzDaily\system\controlDict
However, I do not know what to do with these files
Create a new run-folder in ofuser-of5
Copy the pitzdaily tutorial into this folder
doubleclick on bluecfd-core terminal icon, terminal starts.
In terminal:
goto run folder with command "$FOAM_RUN" (dont type the ")
EDIT: type "cd $FOAM_RUN"
goto pitzdaily folder with command "cd pitzDaily"
Command "ls" lists all files
generate mesh: type "blockMesh"
check mesh: type "checkMesh"
view mesh: type "paraFoam"
close paraview and run sim: type "pimpleFoam"
view result: type "paraFoam" ==> feel good
"clear" removes all text from console, "exit" closes console

You should get familiar with the text files of OF by DOING the tutorials from this guy:
https://www.youtube.com/channel/UCjdgpu ... qheyE82Vvw
Need cfd-help in german? Go here:
https://forum.freecadweb.org/viewtopic. ... &start=170
Thomas
run_folder.JPG
run_folder.JPG (40.59 KiB) Viewed 374 times
User avatar
oliveroxtoby
Posts: 233
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: understanding the PIMPLE algorithm

Postby oliveroxtoby » Thu Oct 25, 2018 8:03 pm

shIxx wrote:
Wed Oct 24, 2018 9:21 am
hi guys,
I have a question regarding the transient algorithm.
I noticed that the size of the time steps for the solver does not matter. The solver calculates with another delta t
.......
.......
smoothSolver: Solving for omega, Initial residual = 0.004410836, Final residual = 7.8808988e-009, No Iterations 17
smoothSolver: Solving for k, Initial residual = 0.16740384, Final residual = 8.6197292e-009, No Iterations 37
ExecutionTime = 121.62 s ClockTime = 122 s

Courant Number mean: 0.20074245 max: 5.0545416
deltaT = 0.00027325827
Time = 0.00108677

PIMPLE: iteration 1
smoothSolver: Solving for Ux, Initial residual = 0.00016858864, Final residual = 1.5728663e-005, No Iterations 1
.......


should't delta t match the specified time step (in this case 0.05s) and should the graph of the residuals not look like this?
Image
case 3b [https://openfoamwiki.net/index.php/Open ... n_OpenFOAM]
There are a few different ways of using PIMPLE. With a fixed time step size, it is wise to solve to a particular residual tolerance. One can use a fixed number of iterations if one keeps a limit on the max Courant number. The latter is the mode we use at the moment in CfdOF, as it is not really dependent on appropriate user input of time step size. The first option can give you faster run times, however, and should perhaps be considered.
shIxx
Posts: 21
Joined: Wed Mar 28, 2018 10:13 am
Location: Bavaria (Germany)

Re: understanding the PIMPLE algorithm

Postby shIxx » Tue Oct 30, 2018 10:20 am

thschrader wrote:
Wed Oct 24, 2018 2:05 pm
You should get familiar with the text files of OF by DOING the tutorials from this guy:
https://www.youtube.com/channel/UCjdgpu ... qheyE82Vvw
Need cfd-help in german? Go here:
https://forum.freecadweb.org/viewtopic. ... &start=170
Thomas
run_folder.JPG
Thanks, he explains it very detailed. The problems are very academical and shows well the impact of different values.
I will watch his videos!

oliveroxtoby wrote:
Thu Oct 25, 2018 8:03 pm
There are a few different ways of using PIMPLE. With a fixed time step size, it is wise to solve to a particular residual tolerance. One can use a fixed number of iterations if one keeps a limit on the max Courant number. The latter is the mode we use at the moment in CfdOF, as it is not really dependent on appropriate user input of time step size. The first option can give you faster run times, however, and should perhaps be considered.
I have already suspected such a behavior of the solvers.
So the solver works with a time step so that the condition C<1 is true (for the defined convergance criteria) and then solves all other equations with this time step. But then entering a time step is redundant in all cases where it is not small enough to satisfy C <1.
Thank you for your explanation, I will delve more deeply into this subject.