CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Unable to validate results with sonicFoam and rhoCentralFoam (https://www.cfd-online.com/Forums/openfoam-solving/172945-unable-validate-results-sonicfoam-rhocentralfoam.html)

lordvon June 9, 2016 16:15

Unable to validate results with sonicFoam and rhoCentralFoam
 
What I thought was going to be a simulation of trivial physics, was in fact something the supersonic solvers in OpenFOAM could not handle. I was trying to validate an axisymmetric simulation of a converging-diverging nozzle with the data found here:

http://www.grc.nasa.gov/WWW/wind/valid/cdv/cdv.html

The pressure ratio of 0.89 (subsonic, peaking at 0.8+ Mach) simply could not match; peaks were much too low by about 10%, when it should be almost exactly matching. I tried different numerical schemes, grid resolutions, to no avail. The pressure ratio of 0.16 (supersonic, no shocks in throat) actually predicted a shock right at the exit, causing the predicted pressures to be much too high and the Mach numbers much too low.

So you can observe this for yourself, the boundary condition directories that I used can be found in 'case_sonic/0' and 'case_rhocentral/0' at the following github page:

https://github.com/rlee32/upcoming/tree/master/CDNozzle

Let me know what you think...


[Moderator note: For future reference, the original title was: PSA: sonicFoam and rhoCentralFoam are bunk...]

wyldckat June 18, 2016 16:57

Quick note: I haven't checked the case set-up you have (and this topic is beyond my expertises :(), but there have been others who have stumbled on this issue. A few examples:

schuyler July 14, 2016 14:00

My experience with rhoCentralFoam has been very positive! I believe the problem you are experiencing is due to your setup. I think the main issue is that the totalPressure boundary condition requires a definition of psi for compressible flow.

Since this is a compressible flow the definition of psi should be
Code:

thermo:psi
calling psi from the thermophysical models set for the compressible flow.

With regards to the supersonic flow with an unwanted shock, you should not specify an outlet pressure for this case. You CAN. But remember that the supersonic flow solution for this problem is unique (contrasting to flow with shock, or subsonic where the solution is not unique). It does not require this information. All you are doing is making the simulation more rigid. Unless you input the exact answer that the solver is looking for (and this will depend slightly on schemes, resolution etc) you will have some difficulties. The shock formed because of this probably. I suggest using zeroGradient for the outlet pressure. Once you get the answer, how closely the exit pressure matches the analytical, expected result, will be an indication of the quality of the solution.

I started a blog on CFD about 6 months ago. I just made a post regarding this test case:

https://curiosityfluids.com/2016/07/...hocentralfoam/

I am still building up the content. But now this case is covered! Hopefully this helps.

lordvon July 15, 2016 22:36

Great job schuyler! I wish I could change the title now, but it seems I cannot.

blais.bruno September 1, 2016 10:03

Dear Schuyler,
Do you have the mesh and files for the tests cases you discuss on your blog post?

Best regards,
Bruno

Quote:

Originally Posted by schuyler (Post 609509)
My experience with rhoCentralFoam has been very positive! I believe the problem you are experiencing is due to your setup. I think the main issue is that the totalPressure boundary condition requires a definition of psi for compressible flow.

Since this is a compressible flow the definition of psi should be
Code:

thermo:psi
calling psi from the thermophysical models set for the compressible flow.

With regards to the supersonic flow with an unwanted shock, you should not specify an outlet pressure for this case. You CAN. But remember that the supersonic flow solution for this problem is unique (contrasting to flow with shock, or subsonic where the solution is not unique). It does not require this information. All you are doing is making the simulation more rigid. Unless you input the exact answer that the solver is looking for (and this will depend slightly on schemes, resolution etc) you will have some difficulties. The shock formed because of this probably. I suggest using zeroGradient for the outlet pressure. Once you get the answer, how closely the exit pressure matches the analytical, expected result, will be an indication of the quality of the solution.

I started a blog on CFD about 6 months ago. I just made a post regarding this test case:

https://curiosityfluids.com/2016/07/...hocentralfoam/

I am still building up the content. But now this case is covered! Hopefully this helps.


schuyler September 2, 2016 18:11

Hi Bruno,

I will update the blog this weekend and upload the files! I usually do... dont really know why I forgot this time.

Schuyler

Quote:

Originally Posted by blais.bruno (Post 616276)
Dear Schuyler,
Do you have the mesh and files for the tests cases you discuss on your blog post?

Best regards,
Bruno


schuyler September 6, 2016 17:38

The blog post is updated now with a downloadable link.

Quote:

Originally Posted by blais.bruno (Post 616276)
Dear Schuyler,
Do you have the mesh and files for the tests cases you discuss on your blog post?

Best regards,
Bruno


blais.bruno December 5, 2016 14:16

Hello!
Thank you very much for putting the files online.
However I have a question. I am trying to reproduce the subsonic and the sonic (well the case where there is a shock wave within the nozzle) and I am getting confusing results. How do you set the pressure outlet boundary? do you set it as a totalPressure boundary condition (specifying thermo:psi and etc.) or as a regular pressure BC with fixedValue?

I think I am failing to understand the maths and physics behind the totalPressure BC.
Sorry, I am not too familiar with compressible flows....


Quote:

Originally Posted by schuyler (Post 616855)
The blog post is updated now with a downloadable link.


schuyler December 5, 2016 14:25

Quote:

Originally Posted by blais.bruno (Post 628417)
Hello!
Thank you very much for putting the files online.
However I have a question. I am trying to reproduce the subsonic and the sonic (well the case where there is a shock wave within the nozzle) and I am getting confusing results. How do you set the pressure outlet boundary? do you set it as a totalPressure boundary condition (specifying thermo:psi and etc.) or as a regular pressure BC with fixedValue?

I think I am failing to understand the maths and physics behind the totalPressure BC.
Sorry, I am not too familiar with compressible flows....

For the outlet boundary, I set the pressure as a fixedValue. You can see how the outlet pressure dictates the location of a normal shock in a nozzle here:

https://curiosityfluids.com/2016/03/...l-shock-waves/

also, an alternative case to the one discussed in this feed is posted here:

https://curiosityfluids.com/2016/04/...hocentralfoam/

Schuyler


All times are GMT -4. The time now is 17:26.