CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Supersonic helium jet with sonicFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 23, 2014, 12:25
Exclamation Need serious help please! --- Supersonic helium jet with sonicFoam
  #1
New Member
 
Intrepid's Avatar
 
Join Date: Feb 2014
Location: Normandy, France
Posts: 5
Rep Power: 3
Intrepid is on a distinguished road
Hi everyone,

This is my first post on this forum, I hope someone can help me.

I want to simulate a supersonic helium jet coming from a nozzle and expanding into an helium atmosphere (helium jet in helium environment, so the Mach number is calculated with respect to sound velocity in helium).

I want to do it with sonicFoam. I'm new to serious case study with OpenFoam: I've already used it but limited myself to basic properties like zeroGradient and fixedValue...

For now, to simplify the case, my inlet is the exit of the nozzle, so I just want to simulate the jet which goes out of the nozzle, not what happens in the nozzle. My mesh is axisymmetric. This is what the domain looks like:



The small white part at the bottom left is the inlet, the big one at the right is the outlet.

The command ideasUnvToFoam worked well and checkMesh says "Mesh OK".

constant/polyMesh/boundary :

Code:
    inlet
    {
        type            patch;
        nFaces          4;
        startFace       10049;
    }
    outlet
    {
        type            patch;
        nFaces          51;
        startFace       10053;
    }
    aboveInlet
    {
        type            wall;
        nFaces          47;
        startFace       10104;
    }
    top
    {
        type            wall;
        nFaces          100;
        startFace       10151;
    }
    front
    {
        type            wedge;
        nFaces          5100;
        startFace       10251;
    }
    back
    {
        type            wedge;
        nFaces          5100;
        startFace       15351;
    }
In the ideal, I'd like to set "top" and "aboveInlet" as open surfaces (so the fluid can leave the domain) but I don't know how to do it, so I've set it to walls.

constant/thermophysicalProperties :

Code:
thermoType
{
    type hePsiThermo;
    mixture pureMixture;
    transport const;
    thermo hConst;
    equationOfState perfectGas;
    specie specie;
    energy sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles 1;
        molWeight 4.0;
    }
    thermodynamics
    {
        Cp 5193.1;
        Hf 0;
    }
    transport
    {
        mu 2.146e-05;
        Pr 0.69738;
    }
}
Is it correct for helium?


0/p :

Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 101325;

boundaryField
{
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
    top
    {
        type            zeroGradient;
    }
    aboveInlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type           fixedValue;
        value          uniform 1013250;
    }
    outlet
    {
        type           waveTransmissive;
        field           p;
        phi             phi;
        rho             rho;
        psi             thermo:psi;
        gamma           1.66;
        fieldInf        100.0;
        lInf            1;
        value           uniform 101325;
    }
}
0/T :

Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
    top
    {
        type            zeroGradient;
    }
    aboveInlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value           uniform 350;
    }
    outlet
    {
        type            zeroGradient;
    }
}
0/U :

Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
    top
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    aboveInlet
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    inlet
    {
        type            pressureInletVelocity;
        phi             phi;
        rho             rho;
        value           uniform (0 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
}
I want the flow to be induced by the pressure difference between inlet (exit of the nozzle) and the environment, so I don't want to fix the inlet velocity.
I've been looking for the right boundary conditions for weeks. I've browsed the Doxygen documentation and found pressureInletVelocity and waveTransmissive which seem to be what I'm looking for... but here is what I obtain at t=6.9e-7s with a time step of dt=3e-9s:



The maximum velocity in the X-direction should be along the X-axis, right? I think my boundary conditions are wrong... What's wrong with my files?

Could someone help me, please? It's driving me crazy...

Another question related to sonicFoam: when I try to visualize pressure or temperature in paraView on a calculation made by sonicFoam (this one, for instance), the values are always between 0 and 1, even if I fix them to other values! Could you tell me what happens?


Thank you very much in advance.

Last edited by Intrepid; February 25, 2014 at 14:03.
Intrepid is offline   Reply With Quote

Old   February 25, 2014, 13:59
Default
  #2
New Member
 
Intrepid's Avatar
 
Join Date: Feb 2014
Location: Normandy, France
Posts: 5
Rep Power: 3
Intrepid is on a distinguished road
Anyone? Please I really need help with OpenFoam! I know it's a classic case but I can't get it work... I can't find a complete tutorial... People are making videos of supersonic flows but never really say HOW they do it...

How would you do to simulate a supersonic flow coming from a nozzle, with sonicFoam or maybe rhoCentralFoam (I don't even know if there is a difference)? What would your boundary conditions be? Can you share your p, T and U files? Thank you very much to those who'll take the time to help...
Intrepid is offline   Reply With Quote

Old   February 26, 2014, 04:15
Default
  #3
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 226
Rep Power: 10
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I think you may need to change your static pressure on the inlet to a total pressure. Also it may just be some startup effects. Or maybe your mesh density is not sufficient. Hard to tell.

About ParaView: probably you have to set to automatically scale to the entire data range. Usually you open ParaView, show some data, choose your favorite colorbar, tick automatically scale to data range, hit set as default and close ParaView. Next time it should scale to the entire range automatically. But the behavior has changed a bit from version to version.

Regards,
Tom
tomf is offline   Reply With Quote

Old   February 26, 2014, 10:26
Default
  #4
New Member
 
Intrepid's Avatar
 
Join Date: Feb 2014
Location: Normandy, France
Posts: 5
Rep Power: 3
Intrepid is on a distinguished road
Hi tomf, thank you for your reply!

I've tried totalPressure as mentionned here, like this in 0/p:
Code:
inlet
{
        type            totalPressure;
        U                U;
        phi              phi;
        rho              none;
        psi              thermo:psi;
        gamma        1.66;
        p0               uniform 101325;
}
but that doesn't change anything.

Here is my mesh:


You think it could come from the fact that my cells are too big?


For pressure and temperature visualization in paraView, it also comes from a BC since with pressureInletOutletVelocity, I guess I once had the correct values...
Intrepid is offline   Reply With Quote

Old   February 26, 2014, 10:40
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 226
Rep Power: 10
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Maybe you can get some grading in the y-direction, so you have more cells near the edge of your nozzle. Than also run the simulation longer and see what happens.

In using the totalPressure BC, p0 should be your total pressure (I assume this should be 1013250 Pa, as you have in your code example for pressureInletVelocity).

So:

Code:
inlet 
{         
     type            totalPressure;         
     U                U;         
     phi              phi;         
     rho              none;         
     psi              thermo:psi;         
     gamma         1.66;         
     p0               uniform 1013250; 
}
Good luck,
Tom
tomf is offline   Reply With Quote

Reply

Tags
boundary conditions, pressure, sonicfoam

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jet in Supersonic Crossflow, controlling mass flow rate ChrisA OpenFOAM Running, Solving & CFD 3 November 13, 2012 19:20
C-D nozzle supersonic jet boundary Gland FLUENT 4 May 24, 2012 00:25
Liquid Jet into Supersonic Flow Alex CFX 4 June 20, 2007 10:56
Supersonic Jet Flows Danny Tan FLUENT 0 November 30, 2001 22:01
Turbulence model for supersonic jet Danny Tandra Main CFD Forum 3 August 24, 2001 04:10


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