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/)
-   -   rhoSimplecFoam - which algorithm is implemented - references (https://www.cfd-online.com/Forums/openfoam-programming-development/116575-rhosimplecfoam-algorithm-implemented-references.html)

Manuel CFD April 22, 2013 13:22

rhoSimplecFoam - which algorithm is implemented - references
 
Dear Foamers,

I have a problem in implementing classical all mach flow solver. Mainly I would like to implement the all-Mach flow solver described in Ferziger and Peric book, but I have some problem in running it. As test case I chose the classical shock reflecting wall 2D domain, with both left and down inlet being supersonic. My algorithm diverges.
I have tested on the same test case also the rhoSimpleFoam and rhoSimplecFoam solvers: the first one diverges too, the second one seems to work well. But, having a look at the algorithm implemented therein, I do not understand what kind of algorithm is implemented in the "pEqn.H" file.
Could anybody please help me in understanding this algorithm? Or could anybody please indicate me some reference which I have to look for in order to understand the algorithm implemented therein?
I thank you in advance for your help and attention.

Manuel

fredo490 April 23, 2013 06:47

rhoSimplecFoam is either SIMPLE, SIMPLEC or PISO depending of your settings in fvsolution. You can have a look into to Ferziger and Perics book for the algorithms.

Ps. The algorithm depends of the number of correction iterations you set in fvsolution.

Manuel CFD April 23, 2013 08:55

Dear Frederic,

I thank you a lot for your attention and for your quick answer.

I had already read Peric-Ferziger book concerning the SIMPLE, SIMPLEC and PISO methods, and things seem to work well: I have implemented some different versions of these algorithms inside OpenFOAM, and they seem to perform well for incompressible flows.

But problems arise when I try to simulate all-Mach flows. In particular I would like to implement a pressure-based all-Mach flow solver. I read the Peric-Ferziger book concerning this subject (see chapter 10), and I tried to implement the corresponding solver based on SIMPLE algorithm. Unfortunately, when I tested it on the shock-reflecting-wall test case, the code diverges. So I tried to use the codes already implemented in OpenFOAM, that is, "rhoSimpleFoam" and "rhoSimplecFoam": the first one diverges too, the second one seems to perform well.
This is why I had a look at the algorithms implemented therein. But I found an algorithm which does not seem to be the one described in Ferziger-Peric book. In the following I post a short part of the "pEqn.H" file, which I am not able to understand:

surfaceScalarField phic
(
"phic",
fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf()
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
);

fvScalarMatrix pEqn
(
fvm::div(phid, p)
+ fvc::div(phic)
- fvm::Sp(fvc::div(phid), p)
+ fvc::div(phid)*p
- fvm::laplacian(rho/AtU, p)
);

What does the variable "phic" represent? Where does the difference between interpolated pressures come from? And, moreover, where does this kind of pressure correction equation arise from?

These are the main problems I am not able to solve. Do you know something about those?

I thank you a lot in advance.

Bye

fredo490 April 23, 2013 11:07

what you quote is only used in the case of the transonic = true. I guess it is a specific correction to avoid problems in the transonic region. From my old knowledge, the equations in the transonic region switch from parabolic to hyperbolic. This might be the reason of this expression.

Manuel CFD April 23, 2013 11:25

Yes, exactly, the part of code I posted refers to the transonic case. And, as you wrote, when the problem becomes supersonic, in the Navier-Stokes equations the hyperbolic part is not negligible.
So, concerning the part of code I posted, do you know some reference in literature where I can find the algorithms and the adjustments implemented in "pEqn.H"?
Because I am not able to understand the reason why the modifying terms are implemented in this way.
I thank you a lot again.

Bye

fredo490 April 23, 2013 12:33

I've never seen this exact code and I don't know where you can find the reference... Sorry

Manuel CFD April 24, 2013 03:39

Ok. No problem. I'll continue to look for any helpful references in literature.
If anybody will be able to help me, please do not hesitate to contact me..!!

Thanks

Bye

Tushar@cfd September 8, 2014 07:28

Quote:

Originally Posted by Manuel CFD (Post 422744)
Ok. No problem. I'll continue to look for any helpful references in literature.
If anybody will be able to help me, please do not hesitate to contact me..!!

Thanks

Bye

Hello Manuel,

I would like to know, Were you able to solve the stated problem in your post?


All times are GMT -4. The time now is 21:31.