View Issue Details

IDProjectCategoryView StatusLast Update
0002731OpenFOAMBugpublic2017-10-20 23:54
ReporterShorty Assigned Tohenry  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version16.04
Summary0002731: Selection of Final solver settings in each outer loop?
DescriptionHi all,
as far as I understood the PIMPLE algorithm and the Final flags, the Final flags should be used only in the final PIMPLE iteration, right. Or is the final flag for the relaxation and linear solver differently? Lets assume solving a case with nOuterCorrections 5 (no residual control):

| PIMPLE 1
|-- Using p, U solver dict
| PIMPLE 2
|-- Using p, U solver dict
| PIMPLE 3
|-- Using p, U solver dict
| PIMPLE 4
|-- Using p, U solver dict
| PIMPLE 5
|-- Using pFinal and UFinal solver dict
|
| NEXT dt
|
| PIMPLE 1
|-- Using p, U solver dict
| PIMPLE 2
|-- Using p, U solver dict
| PIMPLE 3
|-- Using p, U solver dict
| PIMPLE 4
|-- Using p, U solver dict
| PIMPLE 5
|-- Using pFinal and UFinal solver dict
|
| AND SO ON


Lets assume that we solve the same case with nOuterCorrections 1:
| PIMPLE 1
|-- Using pFinal and UFinal solver dict
|
| NEXT dt
|
| PIMPLE 1
|-- Using pFinal and UFinal solver dict
|
| NEXT dt
|
| PIMPLE 1
|-- Using pFinal and UFinal solver dict


The same is valid if we would solve the case with nOuterCorrectors 1000 and add the residual control (lets assume the 3rd loop converged):


| PIMPLE 1
|-- Using p, U solver dict
| PIMPLE 2
|-- Using p, U solver dict
| PIMPLE 3
|-- Using p, U solver dict (Converged - set FINAL flag)
| PIMPLE 4
|-- Using pFinal, UFinal solver dict
|
| NEXT dt
|
| and so on


However, in the pimpleFoam solver I realized that we always use the pFinal in each nOuterCorrection and this is done always after the last nCorrectors was made. E.g. nOuterCorrectors 3 and nCorrectors 3:

| PIMPLE 1
|-- | nCorrector 1
| |-- Using p solver dict
| | nCorrector 2
| |-- Using p solver dict
| | nCorrector 3
| |-- Using pFinal solver dict
|
| PIMPLE 2
|-- | nCorrector 1
| |-- Using p solver dict
| | nCorrector 2
| |-- Using p solver dict
| | nCorrector 3
| |-- Using pFinal solver dict
|
| PIMPLE 3
|-- | nCorrector 1
| |-- Using p solver dict
| | nCorrector 2
| |-- Using p solver dict
| | nCorrector 3
| |-- Using pFinal solver dict


Based on my knowledge I would expect the final flag only in the last outer correction such as:

| PIMPLE 1
|-- | nCorrector 1
| |-- Using p solver dict
| | nCorrector 2
| |-- Using p solver dict
| | nCorrector 3
| |-- Using p solver dict
|
| PIMPLE 2
|-- | nCorrector 1
| |-- Using p solver dict
| | nCorrector 2
| |-- Using p solver dict
| | nCorrector 3
| |-- Using p solver dict
|
| PIMPLE 3
|-- | nCorrector 1
| |-- Using p solver dict
| | nCorrector 2
| |-- Using p solver dict
| | nCorrector 3
| |-- Using pFinal solver dict



At least it is done with the relaxation factors. Maybe there is a numerical background behind that which I do not know. As you are more experts let me know it I am right or not. If I would be right, I can locate the problem and patch it.

TagsFinal Flag

Activities

henry

2017-10-20 23:53

manager   ~0008918

pFinal is necessary when continuity must be obeyed which is often the case when solving for conserved scalars but is not usually the case for solving for momentum. If solving pressure to pFinal is not necessary at the end of each PIMPLE iteration it is not necessary at the end of the time-step either for exactly the same reason in which case pFinal can be set the same as p.

Issue History

Date Modified Username Field Change
2017-10-20 23:27 Shorty New Issue
2017-10-20 23:27 Shorty Tag Attached: Final Flag
2017-10-20 23:53 henry Note Added: 0008918
2017-10-20 23:54 henry Assigned To => henry
2017-10-20 23:54 henry Status new => closed
2017-10-20 23:54 henry Resolution open => no change required