CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

rhoSimpleFoam converginv-diverging nozzle

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

Like Tree2Likes
  • 1 Post By sheaker
  • 1 Post By Hillie

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2018, 08:08
Default rhoSimpleFoam converginv-diverging nozzle
  #1
Member
 
Stevie_1200's Avatar
 
Steven Taggart
Join Date: Jan 2014
Location: Hull, UK
Posts: 50
Rep Power: 7
Stevie_1200 is on a distinguished road
Hello,

I am fairly new to OpenFOAM but I have been working in CFD for a few year, at my company I have been tasked with implementing OpenFOAM as their CFD solution to get around license costs. We primarily work with gas pressure relief valves so its generally all highly compressible flows that I am dealing with. To get started I have been working with a converging-diverging nozzle from an old NASA study, I have set it up in a manner of different ways but struggling to get the expected behaviour for this type of problem.

I have it configured as a pressure driven flow with a pressure drop of 1.3BARg across the nozzle, I have tried many other configurations but this is the most recent. Generally the solution achieved with OpenFOAM results in either the inlet pressure spreading through the whole nozzle and just forming a uniform pressure field with no acceleration in the diverging outlet. Or also I have achieved a solution with some high pressure cells against the outlet boundary (see attached image). I have been working at this problem for some time but cannot find the issue with my setup.

I have used.

Inlet :-
Pressure - total pressure (230000)
Temperature - zeroGradient
Velocity - zeroGradient

Outlet :-
Pressure - total pressure (100000)
Temperature - zeroGradient
Velocity - zeroGradient

I have also tried prescribing velocity values at the outlet but that is when I result in a uniform pressure field throughout the nozzle.

Can anyone guide me on issues with the setup?

Thanks for your time.
Attached Images
File Type: jpg c-d_nozzle_pressure.jpg (18.4 KB, 30 views)
Stevie_1200 is offline   Reply With Quote

Old   June 1, 2018, 08:20
Default
  #2
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 180
Rep Power: 6
sheaker is on a distinguished road
Hello. As I remember I have successfully simulate tesla valve with pressure driven flow.
Here are pressure and velocity inlet files:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM Extend Project: Open Source CFD        |
|  \\    /   O peration     | Version:  1.6-ext                               |
|   \\  /    A nd           | Web:      www.extend-project.de                 |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 111325;

boundaryField
{
    inlet
    {
        type            totalPressure;
        p0              uniform 111325;

//        type            timeVaryingTotalPressure;
//        p0              100040; // only used for restarts
//        outOfBounds     clamp;
//        fileName        "$FOAM_CASE/constant/p0vsTime";

        U               U;
        phi             phi;
        rho             none;
        psi             none;
        gamma           1;
        value           uniform 111325;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 101325;
    }


    wall
    {
        type            zeroGradient;
    }

    defaultFaces
    {
    type        empty;
    }
}

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





Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM Extend Project: Open Source CFD        |
|  \\    /   O peration     | Version:  1.6-ext                               |
|   \\  /    A nd           | Web:      www.extend-project.de                 |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            pressureInletVelocity;
        value           uniform (0 0 0);
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           uniform (0 0 0);
    }

    wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    defaultFaces
    {
    type        empty;
    }
}

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

Have a nice day,
Sheaker
Stevie_1200 likes this.
sheaker is offline   Reply With Quote

Old   June 1, 2018, 09:09
Default
  #3
Member
 
Stevie_1200's Avatar
 
Steven Taggart
Join Date: Jan 2014
Location: Hull, UK
Posts: 50
Rep Power: 7
Stevie_1200 is on a distinguished road
Hi Sheaker,

I will give that configuration a try.

Thank you.

Steven
Stevie_1200 is offline   Reply With Quote

Old   June 6, 2018, 02:47
Default
  #4
Member
 
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 52
Rep Power: 6
Hillie is on a distinguished road
Hi Stevie,


The conditions by shaker are looking quite good. I would just add that you do need a total temperature condition at the inlet as well.


Also with the current setup you might get supersonic flow in the throat, (not sure if you are expecting this). rhoSimpleFoam is not setup to deal with this, and so it will crash if the solution goes supersonic.


Hope it helps
Hillie is offline   Reply With Quote

Old   June 6, 2018, 04:14
Default
  #5
Member
 
Stevie_1200's Avatar
 
Steven Taggart
Join Date: Jan 2014
Location: Hull, UK
Posts: 50
Rep Power: 7
Stevie_1200 is on a distinguished road
Hi Hillie,

Thanks for your reply, I am actually looking for choking in the throat and supersonic flow downstream of that. I chose rhoSimpleFoam as it was the only steady-state compressible solver. I ended up giving up with that solver as I could not get a steady simulation. I moved to rhoCentralFoam and everything worked fine, I am going to look at rhoPimpleFoam for turbulent work.

Is it the correct decision to move to these solvers for supersonic flow, I am looking for a steady state simulation but these seem to be the only way I can obtain it.

Thanks for your help.

Steven.
Stevie_1200 is offline   Reply With Quote

Old   June 6, 2018, 04:29
Default
  #6
Member
 
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 52
Rep Power: 6
Hillie is on a distinguished road
Hi Stevie,


If you want to obtain supersonic flow sonicFoam and rhoCentralFoam are the only solver you can choose from. The others will just crash.



rhoCentralFoam can deal with turbulence modelling, and I have always gotten good results out of it. If you change the interpolation schemes in rhocentral from vanLeer to Gamma you get a lot better results.


Also both sonicFoam van rhoCentral are transient solvers. If you use local time stepping you can accelerate your solution quite a bit.


Cheers
Stevie_1200 likes this.
Hillie is offline   Reply With Quote

Old   June 6, 2018, 04:36
Default
  #7
Member
 
Stevie_1200's Avatar
 
Steven Taggart
Join Date: Jan 2014
Location: Hull, UK
Posts: 50
Rep Power: 7
Stevie_1200 is on a distinguished road
Hi Hille,

That's excellent, thanks for your advice.

Steven
Stevie_1200 is offline   Reply With Quote

Reply

Tags
compressible flows, nozzle flow, rhosimplefoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine the distance between points on Converging diverging nozzle geometry Sorwar22 FLUENT 0 December 4, 2017 21:07
compressible, rhoSimpleFoam, multi-species, steady state, rocket nozzle David_C OpenFOAM Running, Solving & CFD 1 April 18, 2017 12:01
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 7 April 16, 2014 04:38
Converging Diverging Nozzle in OpenFOAM danishdude OpenFOAM Running, Solving & CFD 1 September 15, 2012 01:12
compressible flow in a counterflow nozzle d.vamsidhar FLUENT 0 November 24, 2005 02:45


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