FOAM FATAL IO ERROR: keyword pcorrFinal is undefined in dictionary
Hello everyone :)
I have simulated a T-juction for oil and water. Now I wanted to make use of dynamic mesh refinement. So having my current case I am modifying "dynamicMeshDict" as Code:
dynamicFvMesh dynamicRefineFvMesh; Also in my "controlDict" I changed to "application interDyMFoam;" Now when running the case with "interDyMFoam" I get the error that FOAM FATAL IO ERROR: keyword pcorrFinal is undefined in dictionary "/home../run/Tjunction/system/fvSolution.solvers" But my fvsolution is as below: Code:
/*--------------------------------*- C++ -*----------------------------------*\ Where I have made a mistake you think? |
I solved the error by changing "pcorr" to the format "pcorr.*". But still don't know why this solved the issue. But now I am stuck in a error saying that
Solving for p_rgh, Initial residual = 1, Final residual = 0.0485562, No Iterations 185 #0 Foam::error:: printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 ? at tensorField.C:? #4 ? at ??:? #5 ? at ??:? #6 ? at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 ? at ??:? Floating point exception (core dumped) |
Quote:
You need the keyword pcorrFinal for the same reason that you need p_rghFinal: in the last iteration the "Final" version of the dictionary is used to give you better control over your simulation. Your floating point exception (FPE) can have an infinite number of causes. Start by checking whether your physical set-up is correct: boundary conditions, reasonable initial condition, mesh quality, etc. Also check whether the FPE occurs when you do not use a dynamic mesh. |
Thanks for your reply.
To clarify that, I did not touch anything from my static mesh case that runs properly except those I mentioned above, so initial, boundary conditions mesh and all set up should be fine. Even if the same dynamic mesh case that I have now, I switch back to static mesh it runs perfectly, or even if I run it with interFoam instead of interDyMFoam it runs without error again. Any guess that what is the issue? Thanks |
I narrowed my investigation to the file "dynamicMeshDict".
there if I put the lower and upper intervals of Code:
lowerRefineLevel 0.001 This is weird to me, why with for example 0.1 and 0.9 or 0.001 and 0.999 as above I get that error. And this is my whole file Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
Starting time loop |
If you set those two to the same value, then it does not refine. After all, it refines between X and X, but there exist no numbers between X and X.
Then, despite having a dynamic mesh, you do not actually have a dynamic mesh. Personally, I use 0.1 and 0.9 in interDyMFoam. Questions: 1) How come max Courant is not zero when you're only just starting? Since it starts at 0.1, and you then refine twice, max Courant very likely becomes 0.4. Whereas this should still be fine, it might get becomes too large when the new velocities are calculated. 2) What happens when you reduce the initial dt by, say, a factor 10? I also notice that you need a lot of iterations for pressure. 3) What happens when you add under-relaxation for PIMPLE? 4) Or what happens when you use PISO instead of PIMPLE (so nOuterCorrector=0)? |
Kevin,
Thanks for your comment, FYI, everything was fine, the issue was that I was simulating a 2d case, I switched to 3d (added cells in the 3rd direction) now it is working fine. |
Quote:
Hi.. For my understanding would you please tell me what change did you make with a example,that will be a great help for me. thanks and regards. |
Quote:
I have solved it.:) |
I was surprised to see the keyword pcorrFinal not being required for interFoam v3.0.1, but required on v6. I ran my case with the fvSolution from the damBreak tutorial.
If anyone can effortlesly shed some light on the pcorr field I'd apreciate it. But it's not urgent. I just think it would be nice to have it explained online. I did a bit of research but it's starting to take to much time for me. "pcorr.*" didn't used to be required: https://github.com/OpenFOAM/OpenFOAM...199e76f37eb4a6 I was looking for clues in the interFoams pEqn.H: https://cpp.openfoam.org/dev/multiph...8H_source.html I did a Code:
grep -r 'pcorr' $FOAM_SRC https://cpp.openfoam.org/dev/CorrectPhi_8C_source.html I'm not sure if CorrectPhi.C is executed by interFoam. |
Quote:
I am getting the same error of pcorrFinal not found when I switch my simulation from 2D to 3D. Any idea how you were able to solve it? |
Could you add the pcorrFinal tolerance:
In the fvSolution:
pcorr { solver PCG; preconditioner { preconditioner GAMG; tolerance 1e-5; relTol 0; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-5; relTol 0; maxIter 50; } Add the next code: the tolerance can be the same. pcorrFinal { $pcorr; tolerance 5e-9; relTol 0; } |
try changing the fvSolution from
Code:
pcorr Code:
"pcorr.*" |
All times are GMT -4. The time now is 02:25. |