|
[Sponsors] |
June 3, 2021, 13:36 |
rhoCentralFoam - Supersonic nozzle BC's
|
#1 |
New Member
Join Date: Feb 2021
Posts: 3
Rep Power: 5 |
Hello, I've been using OpenFOAM for a few months, so I am fairly new to most of the applications. I've been trying to simulate a supersonic nozzle at various altitudes to see the flow conditions inside the nozzle. Only have the divergent part where my inlet is the "throat" and the outlet is the nozzle outlet.
I've been meaning to ask a few questions regarding my system. Since I don't have a reservoir or a combustion chamber, is it safe to use a fixedValue for the pressure at the throat? (Where I calculated the appropriate values.) I ran it a few different back pressures but the exit results don't seem to get affected by it. What would be the reason? I read some of the applications of pressureInletOutletVelocity. Would it be feasible for this simulation? Tried using it for the inlet (throat) with totalPressure, but got a negative initial temperature error. I've added my p, T and U case files. Thank you all for your time. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ /* Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt *\ | Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325.1; //101325 boundaryField { front { type empty; } back { type empty; } inlet { type totalPressure; //totalPressure value uniform 5134898; rho rho; psi thermo:psi; p0 uniform 5134898; gamma 1.4; field p; } nozzle { type zeroGradient; } outlet { type waveTransmissive; gamma 1.4; field p; phi phi; rho rho; psi thermo:psi; fieldInf 101325; lInf 15; value uniform 101325; } symmetry { type symmetryPlane; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ /* Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt *\ | Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (100 0 0); // () boundaryField { front { type empty; } back { type empty; } inlet { type fixedValue; value uniform ( 1213 0 0 ); //type pressureInletOutletVelocity; //value uniform ( 1213 0 0 ); } nozzle { type slip; } outlet { type zeroGradient; } symmetry { type symmetryPlane; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ /* Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt *\ | Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 274; boundaryField { front { type empty; } back { type empty; } inlet { type fixedValue; //totalTemperature value uniform 2965; gamma 1.4; T0 uniform 2965; inletValue uniform 2965; psi thermo:psi; field U; } nozzle { type zeroGradient; } outlet { type zeroGradient; } symmetry { type symmetryPlane; } } // ************************************************************************* // |
|
June 4, 2021, 06:42 |
|
#2 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 8 |
Hi,
I would mesh the entire nozzle (convergent and divergent part). For the inlet I would choose totalPressure, totalTemperature, pressureInletOutletVelocity. I suppose in your case slip walls should be ok. At the outlet waveTransmissive for p and U and zeroGradient for T. A 2D-Mesh is not applicable for a nozzle. I hope you mean axially symmetrical mesh, basically a wedge. |
|
June 4, 2021, 12:10 |
|
#3 | |
New Member
Join Date: Feb 2021
Posts: 3
Rep Power: 5 |
Hi shock,
Yes, I totally forgot to mention that. It is a 2D axis-symmetric mesh. I used method of characteristics for the divergent part of course, but I don't think there is such an ideal approach for the congervent part right? I remember someone mentioning like basic rule of thumbs would be enough mostly. Quote:
Using totalPressure with a convergent part is more feasible as you suggested. I'll give that a try. Thank you so much. |
||
June 7, 2021, 05:00 |
|
#4 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 8 |
Hi,
I am glad your results improved! Using fixedPressure at the throat can be very tricky, thats why I suggested to model the convergent and divergent part of the nozzle and to use totalPressure. The reason is the following: Imagine a long throttle, lets say 100 mm long. What you learn is that the throttle becomes critical, but thats in fact not entirely true. For like 90% of the throttle you will have Ma: 0.8-0.9, only at the exit of throat you will have Ma = 1. |
|
June 8, 2021, 08:42 |
|
#5 | |
New Member
Join Date: Feb 2021
Posts: 3
Rep Power: 5 |
Hi,
Quote:
With totalPressure and totalTemperature I got some good results. But I noticed that if I dont give a slight initial velocity for the internalField the case just diverges to unreal velocities like 10^38 m/s. Do you have any idea why that happens? Thanks again! retro. |
||
June 8, 2021, 17:33 |
|
#6 | |
New Member
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5 |
Quote:
Would these same BCs work for a compressible but subsonic flow? I am trying to work out one such case using rhoSimpleFoam but my solver crashes. |
||
June 9, 2021, 04:37 |
|
#7 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 8 |
Yes, you can also use the totalPressure BC for subsonic flows, but the formulation of the total pressure changes, see here: https://cpp.openfoam.org/v3/a02627.html
And also there is no need to use waveTransmissive, since you do not have anny shockwaves. As far as I know you use totalPressure and fixedPressure for inlet and outlet in subsonic flows. |
|
June 9, 2021, 10:45 |
|
#9 | |
New Member
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5 |
Quote:
Yup, I think it's a good pointer and that should be fine. I am however stuck with the corresponding T and U BCs for inlet and outlet. I tried setting mass flow rate for U with those pressure BCs but it doesn't quiet work - probably because of bad T BCs. |
||
June 10, 2021, 06:22 |
|
#10 | |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 8 |
Quote:
Sometime when I start with 0 m/s I get strange oscillations. There is a reason, but I have actually forgotten way. I dont think its the checker board problem, but also in my cases it helps to start with like 1 m/s. |
||
April 5, 2024, 13:24 |
Problems with simulation control
|
#11 |
New Member
Join Date: Mar 2024
Posts: 1
Rep Power: 0 |
Hi there,
I am also simulating a CD nozzle with rhoCentralFoam but I am having trouble with actually getting the simulation ready, as I get many errors: #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam" #5 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam" #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam" I've seen that changing deltaT and other controlDict parameters it actually simulates for a few iterations but again stops, but then all the residuals and everything is 0, so I don't think it is actually simulating. May I get some help on this topic please. Many thanks in advance. |
|
Tags |
nozzle flow, openfoam, rhocentralfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help: rhoCentralFoam de Laval Nozzle supersonic shock waves | vizvaz | OpenFOAM Running, Solving & CFD | 2 | August 15, 2022 09:27 |
kOmegaSST Boundary Conditions for Supersonic Nozzle | shang2 | OpenFOAM Running, Solving & CFD | 2 | September 17, 2018 14:06 |
Supersonic Nozzle Exhaust Simulation | mikeh | FLUENT | 0 | May 1, 2014 22:28 |
calculate a nozzle flow using rhoCentralFoam | hg2lf | OpenFOAM | 0 | October 25, 2012 22:26 |
some questions for supersonic channel nozzle | goldenland | FLUENT | 2 | November 4, 2007 22:18 |