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

sonicfoam nozzle case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 16, 2015, 00:15
Question sonicfoam nozzle case
  #1
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
hi
i am try to simulate aerospike nozzle and examine different bc. when i decrease initial p solving diverge. my bc
for p
dimensions [1 -1 -2 0 0 0 0];

internalField uniform 500000;

boundaryField
{
gasInlet
{
// type fixedValue;
// value uniform 800000;
type totalPressure;
p0 uniform 700000;
U U;
phi phi;
rho none;
psi none;
gamma 1.3;
value uniform 364000;

// type zeroGradient;
}
airInlet
{
// type fixedValue;
// value uniform 100000;

type zeroGradient;
}

outlet
{

type waveTransmissive;
field p;
phi phi;
rho rho;
psi thermosi;
gamma 1.3;
fieldInf 14000;
lInf 1;
value uniform 14000;

// type zeroGradient;
}

symPlane
{
type symmetry;
}

freestreem
{
type zeroGradient;
}

spikeWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}
for u

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

internalField uniform (100 0 0);

boundaryField
{
gasInlet
{
// type fixedValue;
//value uniform (650 0 0);
type pressureInletOutletVelocity;
phi phi;
rho rho;
value uniform (0 0 0);
}
airInlet
{
// type fixedValue;
// value uniform (10 0 0);
type pressureInletVelocity;
phi phi;
rho rho;
value uniform (0 0 0);
/*
type supersonicFreestream;
pInf 380000;
TInf 300;
UInf (650 0 0);
gamma 1.3;
value uniform (0 0 0);
*/
}

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

symPlane
{
type symmetry;
}

freestreem
{
type supersonicFreestream;
pInf 500000;
TInf 300;
UInf (400 0 0);
gamma 1.3;
value uniform (0 0 0);

// type slip;
}

spikeWall
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

for T
dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
gasInlet
{
type fixedValue;
value uniform 320;
}
airInlet
{
type fixedValue;
value uniform 300;
}

outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}

symPlane
{
type symmetry;
}

freestreem
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}

spikeWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

I want the flow to be induced by the pressure difference between inlet (exit of the nozzle) and the ambient.Screenshot from 2015-08-16 08:41:44.png

Screenshot from 2015-08-16 08:42:32.png



With thanks for your attention
rafigh is offline   Reply With Quote

Old   August 16, 2015, 08:57
Default
  #2
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
no one comment???????
rafigh is offline   Reply With Quote

Old   August 17, 2015, 03:52
Default
  #3
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hi, can you show picture with schematic view of your computational domain - where inlet is located, where outlet and so on.
mkraposhin is offline   Reply With Quote

Old   August 17, 2015, 03:59
Default
  #4
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Can you als share your case directory with 0, constant and system?
mkraposhin is offline   Reply With Quote

Old   August 17, 2015, 04:14
Default
  #5
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
thank you for your answer.
please visit this
regards
rafigh is offline   Reply With Quote

Old   August 17, 2015, 05:37
Default
  #6
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by rafigh View Post
thank you for your answer.
please visit this
regards
Hi,

information on the link, that you provided do not gives more about your numerical model.

Problem can be:
- in numeric schemes (fvSchemes, fvSolution)
- in physical properties (constant/thermopysicalProperties)
- in boundary conditions (0/)

The first step, i would recommend is to switch outlet pressure condition to totalPressure.

Can you also upload your case here?
mkraposhin is offline   Reply With Quote

Old   August 17, 2015, 06:26
Default
  #7
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
plug.tar.gz

thanks a lot for the reply.
i have attached.
rafigh is offline   Reply With Quote

Old   August 17, 2015, 16:23
Default
  #8
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hi,

I would suggest next steps to improve stability

- change pressure "outlet" condition to totalPressure
Code:
    outlet
    {
        type               totalPressure;
        p0                 uniform 350000;
        U                  U;
        phi                phi;
        rho                none;
        psi                none;
        gamma              1.3;
        value              uniform 350000;
    }
- change "freestreem" condition for velocity to slip
Code:
    freestreem
    {
        type            slip;
    }
- change schemes for convection terms to upwind (system/fvSchemes)
Code:
divSchemes
{
    default         none;
    div(phi,U)      Gauss upwind;
    div(phi,e)      Gauss upwind;
    div(phid,p)     Gauss upwind;
    div(phi,K)      Gauss upwind;
    div(phiv,p)     Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
}
- change solution methods for p, U, e (system/fvSolution)
Code:
    "p.*"
    {
        solver             PBiCG;
        preconditioner  DILU;
        tolerance       1e-08;
        relTol          0;
    }

    "(U|e|R).*"
    {
        $p;
    }

    "(k|epsilon).*"
    {
        $p;
    }
- disable relaxation for all fields (system/fvSolution)
Code:
relaxationFactors
{
}
- disable outer corrections, momentum predictor, enable explicit non-orthogonal correction
Code:
PIMPLE
{
    nOuterCorrectors 1;
    nCorrectors      2;
    nNonOrthogonalCorrectors 1;
}
Maybe, it would be better to switch to rhoPimpleFoam instead of sonicFoam. Because rhoPimpleFoam can work without momentumPredictor and energy conservation, formulated in enthalpy.

Also, you must check that max Courant number (Co) do reach values 0.5 or higher.

Also you can try rhoCentralFoam for your case.

Unfortunately, i can't check this case updated with my changes, because polyMesh folder is missing in tgz
mkraposhin is offline   Reply With Quote

Old   August 17, 2015, 18:17
Default
  #9
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
thank you very much for the your exact answer and Attention.
after apply your suggest,i am decrease the ambient pressure and case Converged.
i am try rhoCentralFoam but Unfamiliarity with that setup, case diverged.
if i increase the nozzle pressure to supersonic flow, must i change freestreem and outlet BC?
polymesh file i have attached here.


Thanks for all.
rafigh is offline   Reply With Quote

Old   August 18, 2015, 15:06
Default
  #10
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
hi dear Matvej.
can you check the k,epsilon,alphat,mut files??
thanks a lot.
rafigh is offline   Reply With Quote

Old   August 18, 2015, 16:55
Default
  #11
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
hi matvej
i am decrease the ambient pressure to 14000 and case diverged.
so i refinement mesh to 109000 cell but diverged.
rafigh is offline   Reply With Quote

Old   August 19, 2015, 13:27
Default
  #12
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hi, mohammad

After inspecting your case i found next issues about computational domain and B.C.:

1) Mesh is too thick in z-direction. Despite the absence of third coordinate (Z) in solution, it is a good practice, to have thickness of cells in Z-direction for 2D simulation in OpenFOAM of order 1/100 of some characteristic length. In your case i would propose to make thickness of mesh 100 or more times smaller then you have now

2) Also, checkMesh tells, that you have some edges, that are not aligned or not perpindicular to empy (Z) direction. This usually means, that mesh is corrupted somewhere. See checkMesh log at the end of my message.

3) For supersonic flows you have to change your boundary conditions at inlet as follow:
- if you know velocity and it is supersonic, then you must supply pressure (p), velocity (U) and temperature (T) at inlet
- if you know only pressure at inlet, then you must extend your inlet in upwind direction to build converging-diverging nozzle to resolve subsonic-supersonic flow correctly

I hope, this will help you

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           9208
    internal points:  0
    faces:            31351
    internal faces:   13229
    cells:            8916
    faces per cell:   5
    boundary patches: 7
    point zones:      0
    face zones:       0
    cell zones:       0
                                                                                                                                                                                                                                             
Overall number of cells of each type:                                                                                                                                                                                                        
    hexahedra:     0                                                                                                                                                                                                                         
    prisms:        8916                                                                                                                                                                                                                      
    wedges:        0                                                                                                                                                                                                                         
    pyramids:      0                                                                                                                                                                                                                         
    tet wedges:    0                                                                                                                                                                                                                         
    tetrahedra:    0                                                                                                                                                                                                                         
    polyhedra:     0                                                                                                                                                                                                                         
                                                                                                                                                                                                                                             
Checking topology...                                                                                                                                                                                                                         
    Boundary definition OK.                                                                                                                                                                                                                  
    Cell to face addressing OK.                                                                                                                                                                                                              
    Point usage OK.                                                                                                                                                                                                                          
    Upper triangular ordering OK.                                                                                                                                                                                                            
    Face vertices OK.                                                                                                                                                                                                                        
    Number of regions: 1 (OK).                                                                                                                                                                                                               
                                                                                                                                                                                                                                             
Checking patch topology for multiply connected surfaces...                                                                                                                                                                                   
    Patch               Faces    Points   Surface topology                                                                                                                                                                                   
    frontAndBack        17832    9208     ok (non-closed singly connected)                                                                                                                                                                   
    outlet              17       36       ok (non-closed singly connected)                                                                                                                                                                   
    freestreem          47       96       ok (non-closed singly connected)                                                                                                                                                                   
    spikeWall           86       176      ok (non-closed singly connected)                                                                                                                                                                   
    gasInlet            2        6        ok (non-closed singly connected)                                                                                                                                                                   
    symPlane            87       176      ok (non-closed singly connected)                                                                                                                                                                   
    airInlet            51       104      ok (non-closed singly connected)                                                                                                                                                                   
                                                                                                                                                                                                                                             
Checking geometry...                                                                                                                                                                                                                         
    Overall domain bounding box (-0.0441409 0 0) (2.07111 0.82878 1)                                                                                                                                                                         
    Mesh (non-empty, non-wedge) directions (1 1 0)                                                                                                                                                                                           
    Mesh (non-empty) directions (1 1 0)                                                                                                                                                                                                      
 ***Number of edges not aligned with or perpendicular to non-empty directions: 7
  <<Writing 14 points on non-aligned edges to set nonAlignedEdges
    Boundary openness (2.96576e-17 7.11784e-17 -1.0531e-19) OK.
    Max cell openness = 2.18691e-16 OK.
    Max aspect ratio = 2.09584 OK.
    Minimum face area = 1.5752e-06. Maximum face area = 0.0662324.  Face area magnitudes OK.
    Min volume = 1.57525e-06. Max volume = 0.00138491.  Total volume = 1.74312.  Cell volumes OK.
    Mesh non-orthogonality Max: 18.7975 average: 4.39822
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.402559 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
mkraposhin is offline   Reply With Quote

Old   August 19, 2015, 22:49
Default
  #13
New Member
 
mohammad javad
Join Date: Jul 2015
Posts: 9
Rep Power: 10
rafigh is on a distinguished road
Hi Matvej.
You know what is the reason of diverge case in very low ambient pressure(14000)?

فرستاده شده از GLX G5ِ من با Tapatalk
rafigh is offline   Reply With Quote

Old   August 20, 2015, 02:58
Default
  #14
Member
 
MB
Join Date: Sep 2012
Posts: 30
Rep Power: 13
matzbanni is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
Also, you must check that max Courant number (Co) do reach values 0.5 or higher.
Don't understand this part, why?

Regards!
matzbanni is offline   Reply With Quote

Old   August 20, 2015, 04:43
Default
  #15
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by matzbanni View Post
Don't understand this part, why?

Regards!
I'm sorry, Co do not reach 0.5
mkraposhin is offline   Reply With Quote

Old   August 20, 2015, 12:42
Default
  #16
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hi, mohammad

Did you fixed your mesh and B.C.?
mkraposhin is offline   Reply With Quote

Reply


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
Laval Nozzle sonicFoam inlet and outlet bc BernhardGrieser OpenFOAM Running, Solving & CFD 10 February 16, 2017 07:45
extracting outlet velocity profile from one case to another case's inlet tonggysun OpenFOAM 2 September 13, 2013 04:19
Problem with axi-symmetric case using sonicFoam Madhura OpenFOAM 0 April 16, 2010 16:59
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
compressible flow in a counterflow nozzle d.vamsidhar FLUENT 0 November 24, 2005 01:45


All times are GMT -4. The time now is 05:02.