CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

rhoPimpleFoam - solving pEqn

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Tscar
  • 1 Post By Tobi
  • 2 Post By Tobi
  • 1 Post By Tscar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2017, 11:37
Default rhoPimpleFoam - solving pEqn
  #1
Member
 
Join Date: Nov 2014
Posts: 36
Rep Power: 11
Tscar is on a distinguished road
Hello,

While looking at rhoPimpleFoam solver, I could not find where the pressure equation is solved.

The solve() command is only executed in the non-orthogonal corrector loop, yet the pressure equation is off course solved even when there are no non-orthogonal correctors.

Can you please help me understand how and where the pressure equation is solved?

Thank you!
saladbowl likes this.
Tscar is offline   Reply With Quote

Old   October 29, 2017, 16:13
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
The NonOtho value is still 1, even if you set zero.
saladbowl likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 30, 2017, 01:20
Default
  #3
Member
 
Join Date: Nov 2014
Posts: 36
Rep Power: 11
Tscar is on a distinguished road
Thank you for your response.

I found out later yesterday and I meant to update my question .. but you were quicker.

What I do not understand now is the pimple.finalInnerIter() in pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))) in the correctNonOrthogonal loop.

The pimpleControl.H says that pimple.finalInnerIter() returns true for final inner iteration. Does this mean that the pEqn gets solved only on final inner iteration?
Tscar is offline   Reply With Quote

Old   October 30, 2017, 03:47
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
That is simple. Maybe you realized that you have the dictionaries:

Code:
p
{
     solver    PCG;
     .
     .
}

pFinal
{
     solver    PCG;
     .
     .
}
in the fvSolutions file. You always solve the pressure equation:
Code:
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
However, you can see that the solve() function has an argument. The argument is:
Code:
mesh.solver(p.select(pimple.finalInnerIter()))
This will return the p or pFinal dictionary and is related to the dictionaries in the fvSolutions file. You can find that using doxygen and check out the fvMatrix class:
Code:
SolverPerformance< Type > solve (const dictionary &) 
Solve segregated or coupled returning the solution statistics.  More...
For what purpose? In the final PISO loop we have to make sure that the continuity equation is fulfilled. Therefore we are using more strict settings given in pFinal (common is to set the relTol to zero). This is very important if we have scalar transport equations which really need a fulfilled continuity. If we only solve U and p, one can also choose the final PISO iteration to be less strict based on the coupling of p and U.
Xinze and SHUBHAM9595 like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 30, 2017, 06:40
Default
  #5
Member
 
Join Date: Nov 2014
Posts: 36
Rep Power: 11
Tscar is on a distinguished road
Thank you!

By the way, I am a huge fan of your work. You are doing a great job.
Tobi likes this.
Tscar is offline   Reply With Quote

Old   November 1, 2017, 07:53
Default
  #6
Member
 
Join Date: Nov 2014
Posts: 36
Rep Power: 11
Tscar is on a distinguished road
Can I have one more question?

In chtMultiRegionFoam, the pimple loop is introduced in the form:

for (int oCorr=0; oCorr<nOuterCorr; oCorr++)

Why is it not the following statement instead?

while (pimple.loop())

I believe it has something to do with the multiple "PIMPLE" dictionaries existing in ./system and ./system/regionNames.

How can I make the code understand stuff like pimple.loop() while making it search in the right "PIMPLE" dictionary?
Tscar is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault when using reactingFOAM for Fluids Tommy Floessner OpenFOAM Running, Solving & CFD 4 April 22, 2018 12:30
chtMultiRegionSimpleFoam turbulent case Aditya Patil OpenFOAM Running, Solving & CFD 6 April 24, 2017 22:13
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37


All times are GMT -4. The time now is 20:04.