# rhoPimpleFoam algorithm

 Register Blogs Members List Search Today's Posts Mark Forums Read

April 16, 2011, 12:15
rhoPimpleFoam algorithm
#1
New Member

Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 6
I am working in OF v1.7.1 and have a couple quick questions regarding the implementation of the compressible PISO-SIMPLE algorithm:

1) On line 00095 of the rhoPimpleFoam/pEqn.H code: Why is the if statement commented out? Should the relaxation of pressure really be allowed in the final outer iteration?

Quote:
 //if (oCorr != nOuterCorr-1) { // Explicitly relax pressure for momentum corrector p.relax(); rho = thermo.rho(); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; }
This is not consistent with the pimpleFoam solver, which does not relax p in the last outer iteration.

Quote:
 // Explicitly relax pressure for momentum corrector except for last corrector if (oCorr != nOuterCorr-1) { p.relax(); }
2) Why is the hEqn solved prior to the PISO loop? The Fluent manual indicates that its solver includes temperature/enthalpy equations after the pressure-correction. Would it not be more beneficial to solve this equation after continuity has been enforced?

 April 18, 2011, 02:57 #2 Senior Member   Christian Lucas Join Date: Aug 2009 Location: Braunschweig, Germany Posts: 198 Rep Power: 8 Hi, you are correct, there should be no relaxation in the last iteration because otherwise you get a continuity error (which is very large if you look at the tutorial case). I'm not sure about the energy equation but would be interested in your result. Regards, Christian

April 18, 2011, 19:22
#3
Senior Member

Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,895
Rep Power: 26
Quote:
 Originally Posted by PerryLJohnson I am working in OF v1.7.1 and have a couple quick questions regarding the implementation of the compressible PISO-SIMPLE algorithm: 1) On line 00095 of the rhoPimpleFoam/pEqn.H code: Why is the if statement commented out? Should the relaxation of pressure really be allowed in the final outer iteration? This is not consistent with the pimpleFoam solver, which does not relax p in the last outer iteration.
You are right, it is not consistent with the incompressible version, however it is consistent with many implementations of the unsteady SIMPLE algorithm. At convergence that relaxation won't make any difference.

Quote:
 2) Why is the hEqn solved prior to the PISO loop? The Fluent manual indicates that its solver includes temperature/enthalpy equations after the pressure-correction. Would it not be more beneficial to solve this equation after continuity has been enforced?
I think the idea behind this is to have the density updated (rho.thermo()) before entering the pressure equation. If you solve it after, the dependency on the temperature is lagged when solving pEqn.

However this aspect might influence convergence rate, but it should not affect the results.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods

 April 20, 2011, 09:40 #4 New Member   Perry L. Johnson Join Date: Feb 2011 Location: Orlando, FL, USA Posts: 17 Rep Power: 6 Alberto and Christian, Thank you for entertaining my curiosities. I will let you know anything I find through experimentation, though it seems as if Alberto does not expect much difference on either point. For the interested foamer stumbling across this thread, I suggest reviewing the following thread for a more involved discussion of relaxation Suggested unsteady, implicit solver stable with arbitrarily large time steps Regards, Perry

April 20, 2011, 21:56
#5
Senior Member

Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,895
Rep Power: 26
Yes, I do not expect any difference on the solution.

Quote:
 Originally Posted by PerryLJohnson For the interested foamer stumbling across this thread, I suggest reviewing the following thread for a more involved discussion of relaxation Suggested unsteady, implicit solver stable with arbitrarily large time steps
If I remember this correctly, it was on the dependency of the solution on under-relaxation due to Rhie-Chow interpolation.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods

July 27, 2015, 10:16
#6
Member

Christa
Join Date: Apr 2011
Posts: 39
Rep Power: 6
Quote:
 Originally Posted by PerryLJohnson I am working in OF v1.7.1 and have a couple quick questions regarding the implementation of the compressible PISO-SIMPLE algorithm: 1) On line 00095 of the rhoPimpleFoam/pEqn.H code: Why is the if statement commented out? Should the relaxation of pressure really be allowed in the final outer iteration?
Hi Perry,

this commented-out IF statement has been removed from OF v.2.4, as can be seen here:

https://github.com/OpenFOAM/OpenFOAM...oam/pEqn.H#L92

I am getting massive timestep continuity errors and no pressure convergence for what should be a very straightforward problem of orthogonal mesh and subsonic gas flow. After searching a lot in this forum (and it is quite hard to get the keywords right!) I think that if I don't relax the pressure in the last outer iteration my solution may converge.

Has anyone tried to do this in newer versions of OF? Anyone know why the commented out section was removed? Can you please guide me to where OF explains changes from one version to the next?

Thanks,

Christa

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post snakejoe Main CFD Forum 0 April 7, 2009 05:58 Jeff Yanke Main CFD Forum 6 August 25, 2008 00:32 Yan Kai Main CFD Forum 0 April 18, 2007 03:48 Yan Kai FLUENT 0 April 13, 2007 23:17 ilyas Main CFD Forum 0 February 22, 2007 11:53

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