CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   rhoPimpleFoam algorithm (https://www.cfd-online.com/Forums/openfoam-programming-development/87303-rhopimplefoam-algorithm.html)

PerryLJohnson April 16, 2011 13:15

rhoPimpleFoam algorithm
 
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?

Chris Lucas April 18, 2011 03:57

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

alberto April 18, 2011 20:22

Quote:

Originally Posted by PerryLJohnson (Post 303886)
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,

PerryLJohnson April 20, 2011 10:40

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
http://www.cfd-online.com/Forums/ope...ime-steps.html

Regards,
Perry

alberto April 20, 2011 22:56

Yes, I do not expect any difference on the solution.

Quote:

Originally Posted by PerryLJohnson (Post 304415)
For the interested foamer stumbling across this thread, I suggest reviewing the following thread for a more involved discussion of relaxation
http://www.cfd-online.com/Forums/ope...ime-steps.html

If I remember this correctly, it was on the dependency of the solution on under-relaxation due to Rhie-Chow interpolation.

Best,

user_of_cfx July 27, 2015 11:16

Quote:

Originally Posted by PerryLJohnson (Post 303886)
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


All times are GMT -4. The time now is 13:14.