|
[Sponsors] |
What is "pimple.correctNonOrthogonal" in the pEqn.H file ?? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 27, 2014, 22:03 |
What is "pimple.correctNonOrthogonal" in the pEqn.H file ??
|
#1 |
New Member
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 13 |
Hello all,
My pEqn.H reads Code:
while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - fvm::laplacian(rho*rAU, p) == fvOptions(psi, p, rho.name()) ); fvOptions.constrain(pEqn); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); if (pimple.finalNonOrthogonalIter()) { phi = phiHbyA + pEqn.flux(); } } As a side question what is meant by the term pimple.finalNonOrthogonalIter . Under what conditions is this if statement executed ?? I really request someone to help me on this. Thanks a ton ! |
|
July 28, 2014, 04:40 |
|
#2 |
Senior Member
|
Hi,
pimple is an object based on a pimpleControl class. pimpleControl pimple(mesh); pimpleControl Class Reference http://foam.sourceforge.net/docs/cpp/a01837.html The pimpleControl class is derived from a solutionControl class. correctNonOrthogonal() function is a member of the solutionControl class. bool correctNonOrthogonal() Non-orthogonal corrector loop. Definition at line 70 of file solutionControlI.H. good luck, |
|
July 28, 2014, 22:21 |
|
#3 |
New Member
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 13 |
Thanks for your reply Shinji. The link really helps :-)
|
|
February 21, 2023, 14:30 |
|
#4 |
Member
|
For those reading @snak 's response in 2023 and unable to open the link, here are the links to the correctNonOrthogonal() function in OpenFOAM8 docs:
|
|
February 22, 2023, 10:57 |
|
#5 |
Senior Member
|
Hi,
correctNonOrthogonal() judges whether non-orthogonal-corector-step is needed or not. It just returns true or false. Numerical works will be done in a solver (or pEqn.H) if correctNonOrthogonal() returns true in a while-loop. If you specify where/what you don't understand, somebody will help you. |
|
February 22, 2023, 14:55 |
|
#6 |
Member
|
Thank you @snak.
First thing I don't understand is what non orthogonal corrector step is. A brief intelligible explanation in plain English would suffice. I don't need to go deep into the details here. Second thing I don't understand is the following. I'm looking at line 26 in this pEqn.H file. We are going into the while loop only if pimple.correctNonOrthogonal() is True. But where exactly do we set it to True (or False)? I don't think we set in the input file. Then OpenFOAM must detemine the value for pimple.correctNonOrthogonal() itself. How does it do it? (Though, I think the answer to the first question can automatically answer this question.) Thank you in advance. Ivan |
|
February 23, 2023, 06:46 |
|
#7 |
Senior Member
|
Hi Ivan,
here is the nice explanation about the non-orthogonal-correctors: https://www.simscale.com/docs/simula...al-correctors/ You decide On/Off and how many corrector-loop when you use OpenFOAM. Even in basic tutorials, nNonOrthogonalCorrectors setting is povided in system/fvSolution dictionary. An official user guide explains it in "6.3 Solution and algorithm control" and "6.3.3 PISO and SIMPLE algorithms". https://www.openfoam.com/documentati...l#x24-930006.3 "4.6 Solution and algorithm control" and "4.6.3 PISO, SIMPLE and PIMPLE algorithms" https://doc.cfd.direct/openfoam/user...v10/fvsolution |
|
February 24, 2023, 14:26 |
|
#8 |
Member
|
Thank you very much to @snack for the response.
For future readers, I would summarize it as follows.
|
|
February 25, 2023, 20:17 |
|
#9 |
Senior Member
|
Hi Ivan,
Thank you for summarizing your understanding. It is really helpful to us and future readers. Unfortunately, there are some misunderstandings. Usual PIMPLE algorithm does not check orthogonality and does not change mesh. You tell OpenFOAM how many nonOrthogonal-correction loop is needed (using nNonOrthogonalCorrectors setting in fvSolution). Checking the non-orthogonality and deciding the nNonOrthogonalCorrectors number is user's task. In non-orthogonal pressure corrector loop, several additional iterations of the pressure equation will be executed. https://www.simscale.com/docs/simula...al-correctors/ https://develop.openfoam.com/Develop...oam/pEqn.H#L38 A correctNonOrthogonal() function counts how many times the loop is executed. It returns true if the number is below nNonOrthogonalCorrector. |
|
December 11, 2023, 20:08 |
|
#11 |
Member
Santhosh
Join Date: Nov 2021
Posts: 44
Rep Power: 4 |
Hello all,
It is a very interesting tread. I just want to make sure of one thing. The loop to correct the pressure term in the PISO loop: while (pimple.correctNonOrthogonal()) { fvScalarMatrixpdEqn ( fvm::laplacian(rUAf, pd) == fvc::div(phi) + speciesMixture.Mflux()*(1/rho1-1/rho2) ); Is valid even if there NonOrthogonal correctors is set to 0 right ? In which case, the loop is performed one time to correct the pressure value according to the continuity equation. Otherwise I don't see how the PISO loop operates, Thanks for anyone who would take the time to help me here. |
|
December 12, 2023, 03:52 |
|
#12 |
Senior Member
|
I humbly suggest that you run a small tutorial example for a limited (two or three ) iterations and inspect the output generated. This will allow you to verify your doubts on nNonOrthogonalCorrectors. Get in touch here in case that doubts remain.
|
|
December 12, 2023, 13:53 |
|
#13 |
Member
Santhosh
Join Date: Nov 2021
Posts: 44
Rep Power: 4 |
Hello dlahaye,
Appreciate the concise yet effective advice . So, just to clarify, the loop runs once if the non-Orthogonal corrector is set to 0, and increments by +1 for each additional corrector you introduce. Regarding resources for coding in OpenFOAM, particularly with the interFoam solver, do you happen to know of any good guides or literature? I am trying to link the numerical model to the way it is coded in the OpenFOAM, but I'm struggling to find comprehensive material on this. Thanks again for the help! Sincerely, Santhosh |
|
December 13, 2023, 03:22 |
|
#14 | ||
Senior Member
|
Quote:
Quote:
|
|||
December 13, 2023, 12:06 |
|
#15 |
Member
Santhosh
Join Date: Nov 2021
Posts: 44
Rep Power: 4 |
Hello dlahaye,
I just re-checked, the pressure is solved a certain number of times depending on the "nCorrecors" number for the PISO loop, but it does enter one time in the "pimple.correctNonOrthogonal()" since I see one repetition with 0 "nNonOrthogonalCorrector" and increase within this loop when I am incrementing the "nNonOrthogonalCorrectors" numbers. For me it makes sense, otherwise how is the pressure solved ? Because that "while(pimple.CorrectNonOrthogonal)" loop is the only place where we have the continuity equation defined. Concerning the second question, I was hoping there would be a good textbook or thesis that explain the implementation from numerical model equations into C++ code in OpenFoam :/ Thanks for your time and help! Sincerely, Santhosh |
|
December 13, 2023, 15:50 |
|
#16 |
Senior Member
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 01:41 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 11:46 |