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/)
-   -   Inviscid Supersonic Flow Simulation (https://www.cfd-online.com/Forums/openfoam-solving/66853-inviscid-supersonic-flow-simulation.html)

Alan July 26, 2009 23:04

Inviscid Supersonic Flow Simulation
 
Hi everyone.

I am currently undertaking a Phd in hypersonics, and I am required to perform some supersonic CFD simulations in OpenFOAM. I am quite new to this, so I have a few (and I am sure I will have plenty more) questions.

Initially I am simulating a wedge in a supersonic flow. I have based my initial model on the wedge15Ma5 tutorial case in rhopSonicFoam.

My first question is when playing around with the wedge tutorial, if I increase the Mach number the solution rapidly diverges (courant number increases exponentially until the solver crashes). I altered the mach number in the 0/U file (changed it from 5 to 10, and also tried other values in between this range). Any ideas why this is happening?

My second question is what are the differences between rhoSonicFoam and rhopSonicFoam? I know that rhop is density pressure solver, but what does this mean? Am I using the right solvers in this case? What are their limitations etc?

If anyone could point me in the right direction as to where I could find this information, that would be great. Thanks,
Alan.

alberto July 27, 2009 03:08

Quote:

Originally Posted by Alan (Post 224200)
Hi everyone.

I am currently undertaking a Phd in hypersonics, and I am required to perform some supersonic CFD simulations in OpenFOAM. I am quite new to this, so I have a few (and I am sure I will have plenty more) questions.

Initially I am simulating a wedge in a supersonic flow. I have based my initial model on the wedge15Ma5 tutorial case in rhopSonicFoam.

My first question is when playing around with the wedge tutorial, if I increase the Mach number the solution rapidly diverges (courant number increases exponentially until the solver crashes). I altered the mach number in the 0/U file (changed it from 5 to 10, and also tried other values in between this range). Any ideas why this is happening?

I run the tutorial case with U set to 10, and turning the adaptive time stepping on, with max dt = 10^-4s. It did not diverge.

Did you reduce the time step or enable the automatic time stepping to respect the CFL condition? I run it with Co = 1. However for better results stay under 0.5.

Quote:

My second question is what are the differences between rhoSonicFoam and rhopSonicFoam? I know that rhop is density pressure solver, but what does this mean? Am I using the right solvers in this case? What are their limitations etc?
Take a look at the codes, you'll notice how the algorithms are implemented.

You might want to consider also rhoCentralFoam, which is based on a Riemann-free type of scheme developed by Turganov and Tadmor (the reference to the paper is in the code). I tried it on the same tutorial, and with the same changes I suggested above it runs OK.

Quote:

If anyone could point me in the right direction as to where I could find this information, that would be great. Thanks,
Alan.
You're welcome! Good luck with your simulations. :)

Best,

Alan July 27, 2009 03:36

Thanks Alberto, I had tried adjusting the time step, but it still diverged. Now that I have put adaptive time step on, it doesn't diverge. Thanks again for that.

I'm having a bit of trouble with a mesh I am generating based on this tutorial. I am essentially trying to model a cone in a supersonic flow. My blockMeshDict file is:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.5                                  |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;
vertices       
(
  (0 0 -0.05)
  (1 0 -0.05)
  (1.5 0 -0.05)
  (3 0 -0.05)
  (1 0.85 -0.05)
  (1.5 0.85 -0.05)
  (1 1 -0.05)
  (1 1.15 -0.05)
  (1.5 1.15 -0.05)
  (0 2 -0.05)
  (1 2 -0.05)
  (1.5 2 -0.05)
  (3 2 -0.05)
  (3 0.85 -0.05)
  (3 1.15 -0.05)
  (0 0 0.05)
  (1 0 0.05)
  (1.5 0 0.05)
  (3 0 0.05)
  (1 0.85 0.05)
  (1.5 0.85 0.05)
  (1 1 0.05)
  (1 1.15 0.05)
  (1.5 1.15 0.05)
  (0 2 0.05)
  (1 2 0.05)
  (1.5 2 0.05)
  (3 2 0.05)
  (3 0.85 0.05)
  (3 1.15 0.05)
);

blocks         
(
    hex (0 1 10 9 15 16 25 24)  (100 200 1) simpleGrading (1 1 1)
    hex (1 2 5 4 16 17 20 19)    (50 85 1) simpleGrading (1 1 1)
    prism (8 7 6 23 22 21)      (50 15 1) simpleGrading (1 1 1)
    prism (6 4 5 21 19 20)      (50 15 1) simpleGrading (1 1 1)
    hex (7 8 11 10 22 23 26 25)  (50 85 1) simpleGrading (1 1 1)
    hex (2 3 14 5 17 18 29 20)  (150 85 1) simpleGrading (1 1 1)
    hex (5 14 13 8 20 29 28 23)  (150 30 1) simpleGrading (1 1 1)
    hex (8 13 12 11 23 28 27 26) (150 85 1) simpleGrading (1 1 1)
);

edges         
(
);


patches       
(
    patch inlet
    (
        (0 15 24 9)
    )

    patch outlet
    (
        (3 18 29 14)
        (14 29 28 13)
        (13 28 27 12)
    )

    symmetryPlane bottom
    (
        (0 1 16 15)
        (1 2 17 16)
        (2 3 18 17)
    )
    symmetryPlane top
    (
        (9 10 25 24)
        (10 11 26 25)
    (11 12 27 26)
    )
    patch obstacle
    (
        (6 8 23 21)
        (6 21 20 5)
    (5 20 23 8)
    )
);

mergePatchPairs
(
);

// ************************************************************************* //

Which, when run, gives the following error:

Code:

inconsistent point locations between block pair 1 and 3 probably due to inconsistent grading.
I assume it is in the way I have defined the two prism blocks (blocks 2 and 3) that is not allowing the mesh to join properly, but I cant seem to figure out why it would be doing this. I also get a warning that there is a 'zero or negative pyramid volume: -0.0075 for face 1'

Any ideas as to what I am doing wrong:confused:

Thanks again very much for your help!


All times are GMT -4. The time now is 11:15.