
[Sponsors] 
Boundary Conditions for Internal compressible Flow 

LinkBack  Thread Tools  Search this Thread  Display Modes 
November 18, 2009, 07:33 
Boundary Conditions for Internal compressible Flow

#1 
Member

Hello all,
First of all i am a newbie in OpenFOAM I' m trying to simulate a compressible flow in a duct with a bump using laminar rhoPisoFoam. I used Fluent to verify the case. In Fluent i used for bc's Presure inlet (total pressure and tempreture) and pressure Outlet (static pressure). Now i want to reply these bc's in Foam, but i dont no how. I'am trying with these, please tell me if i'm rigth. FOR PRESSURE: internalField uniform 126453; boundaryField { sidewalls { type zeroGradient; } up_wall { type zeroGradient; } low_wall { type zeroGradient; } inlet { type totalPressure; p0 uniform 150000; gamma 1.4; value uniform 150000; } outlet { type fixedValue; value uniform 126453; } } FOR VELOCITY internalField uniform (0 0 0); boundaryField { sidewalls { type zeroGradient; } up_wall { type zeroGradient; } low_wall { type zeroGradient; } inlet { type zeroGradient; } outlet { type zeroGradient; } } FOR TEMPERATURE dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { sidewalls { type zeroGradient; } up_wall { type zeroGradient; } low_wall { type zeroGradient; } inlet { type fixedValue; value uniform 300; } outlet { type inletOutlet; inletValue uniform 300; } } Thanks in advance CX 

November 18, 2009, 07:36 

#2 
Member

The controlDict file:
application rhoPisoFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 2; deltaT 0.00001; writeControl runTime; writeInterval 0.1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep no; maxCo ; maxDeltaT 1; 

November 21, 2009, 06:46 

#3 
Member

Anyone???
CX 

December 3, 2009, 20:47 

#4 
Member

Ok..
I used Total pressure for inlet with psi = psi (compressible flow). For velocity at inlet i used presureDirectedVelocityInlet were i give a value for the inlet direction, and a value for intial velocity at the inlet. I impose also total temprature.. For the outlet i specify a static pressure, and zeroGradient for all other variables. Works fine.. Carlos Xisto 

January 30, 2010, 18:06 

#5 
New Member
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16 
Carlos, may I ask you to share your 0/ p U T files ?
Regards, Mehmet 

January 30, 2010, 19:16 

#6 
Member

These one are for the transonic case (works in the subsonic also).
For the supersonic you need to specify all variables at inlet (fixed values for temperature (static), pressure (static) and velocity). Extrapolate all variables from outlet (zero gradient). 

February 1, 2010, 08:24 

#7 
New Member
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16 
Thanks for the files.
I will also simulate a transonic flow but with a steady solver (rhoSimpleFoam). Tried to copy your files.. but it is asking for U, phi for the total pressure inlet boundary and U,phi and psi for the total temperature inlet boundary. I tried also with the required information for U,psi and phi but unfortunately it is not working again. Can I learn which version of Openfoam you are using? Regards. 

February 1, 2010, 08:40 

#8 
Member

Ok first of all I'm new at openFoam...
I'm using 1.6 Can you post the shell information here? Cheers, CX 

February 1, 2010, 10:01 

#9 
New Member
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16 
Thanks for your quick answer Carlos.
I am using Openfoam 1.5 and here are my files ; I also tried with the 1.6 version; then appears an error with the thermophysical properties. It crashes in a few iterations when I run laminar. I am sure that the problem is not the mesh, because I am just runnuing the code for a test case with a simple rectangular 2D geometry. Any comment is much appreciated.. Regards 

February 1, 2010, 11:23 

#10 
Member

Ok.
I notice an error in your thermophysicalProperties dictionary. You specify that you are using the Sutherland transport in the transport properties and then you input the values for the constTransport. In the termophysical model you specify hThermo, I'm not familiarized with the 1.5, but in the 1.6 I used hPsiThermo  calculation based on h and psi. (I don't now if that patch even exist in the 1.5 version). As you can see in my 0 files I don't need to specify phi and U. If you send me the error that appear in your shell. Maybe I can help... otherwise.. Cheers, CX 

February 1, 2010, 12:48 

#11 
New Member
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16 
As you have suggested, I used hPsiThermo model for the version 1.6.
thermoType hPsiThermo<pureMixture<sutherlandTransport<specieT hermo<hConstThermo<perfectGas>>>>>; mixture air 1 28.9 1007 0 1.4792e06 116; Here is the error message. Time = 0.5 smoothSolver: Solving for Ux, Initial residual = 0.232175, Final residual = 0.0183628, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.20495, Final residual = 0.0115015, No Iterations 6 DILUPBiCG: Solving for h, Initial residual = 0.304703, Final residual = 0.00124444, No Iterations 2 GAMG: Solving for p, Initial residual = 0.983346, Final residual = 7.43012e09, No Iterations 15 time step continuity errors : sum local = 0.000107626, global = 5.18031e05, cumulative = 5.20557e05 rho max/min : 32.9887 1.27449 ExecutionTime = 12.9 s ClockTime = 13 s Time = 0.6 smoothSolver: Solving for Ux, Initial residual = 0.283681, Final residual = 0.0173673, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.38148, Final residual = 0.0216, No Iterations 6 DILUPBiCG: Solving for h, Initial residual = 0.395197, Final residual = 0.0152132, No Iterations 1 #0 Foam::error:rintStack(Foam::Ostream&) in "/software/oss/OpenFOAM/OpenFOAM1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/software/oss/OpenFOAM/OpenFOAM1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #2 __restore_rt at sigaction.c:0 #3 Foam::hPsiThermo<Foam:ureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam:erfectGas> > > > >::calculate() in "/software/oss/OpenFOAM/OpenFOAM1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so" #4 Foam::hPsiThermo<Foam:ureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam:erfectGas> > > > >::correct() in "/software/oss/OpenFOAM/OpenFOAM1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so" #5 main in "/software/oss/OpenFOAM/OpenFOAM1.6/applications/bin/linux64GccDPOpt/rhoSimpleFoam" #6 __libc_start_main in "/lib64/libc.so.6" #7 _start at /usr/src/packages/BUILD/glibc2.9/csu/../sysdeps/x86_64/elf/start.S:116 Floating point exception Regards. 

February 1, 2010, 13:14 

#12 
Member

Why do you use a deltaT=0.1  the rhoSimpleFoam is a steady state solver.
Try deltaT=1.. CX 

February 1, 2010, 14:16 

#13 
New Member
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16 
Changing the time step does not work unfortunately. I tried many variations for delta T.
With version 1.5, I have suceeded to run the code but the residuals are unacceptably big. Time = 99 smoothSolver: Solving for Ux, Initial residual = 0.0108103, Final residual = 0.000975499, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.0274258, Final residual = 0.00263698, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 0.0152814, Final residual = 0.000172995, No Iterations 1 GAMG: Solving for p, Initial residual = 0.733572, Final residual = 3.61836e09, No Iterations 13 time step continuity errors : sum local = 9.54107e08, global = 3.18967e08, cumulative = 8.01901e07 rho max/min : 1.67032 1.35875 smoothSolver: Solving for epsilon, Initial residual = 0.00824669, Final residual = 0.000471946, No Iterations 2 smoothSolver: Solving for k, Initial residual = 0.0100756, Final residual = 0.000737614, No Iterations 2 Time = 100 smoothSolver: Solving for Ux, Initial residual = 0.0105662, Final residual = 0.00099737, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.0252288, Final residual = 0.000761451, No Iterations 4 DILUPBiCG: Solving for h, Initial residual = 0.0152109, Final residual = 0.000173026, No Iterations 1 GAMG: Solving for p, Initial residual = 0.735529, Final residual = 3.86563e09, No Iterations 13 time step continuity errors : sum local = 1.02277e07, global = 4.39179e08, cumulative = 8.45819e07 rho max/min : 1.66991 1.35852 smoothSolver: Solving for epsilon, Initial residual = 0.00844277, Final residual = 0.000502872, No Iterations 2 smoothSolver: Solving for k, Initial residual = 0.0101629, Final residual = 0.000767375, No Iterations 2 My BC should be allright because it is proved to be working on your case. I think I have a problem with the settings in fvSchemes. Increasing the number of correctors of the SIMPLE scheme is getting the residuals a bit lower, but not so much. Regards 

February 1, 2010, 17:00 

#14 
Member

the transonic case is a bit hard to solve.
In your fvSchemes you used for the divSchemes  upwind (in my case the residuals get stuck as well with the upwind) Check mine: With Gauss linear in the divSchemes works as well, but it perform better with the Gamma. ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(p) Gauss linear; } divSchemes { default none; div(phi,U) Gauss GammaV 1; div(phid,p) Gauss Gamma 1; div(phiU,p) Gauss Gamma 1; div(phi,h) Gauss Gamma 1; div(phi,k) Gauss Gamma 1; div(phi,epsilon) Gauss Gamma 1; div(phi,R) Gauss Gamma 1; div(phi,omega) Gauss Gamma 1; div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss Gamma 1; div((muEff*dev2(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; laplacian(mut,U) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DomegaEff,omega) Gauss linear corrected; laplacian((rho*(1A(U))),p) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } 

February 4, 2010, 13:30 

#15 
New Member
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16 
Hi Carlos.
Whatever I do, I could not get any reasonable results. I start thinking about that the rhoSimpleFoam solver may not be stable for transonic calculations. So, if you can email me your own case, I would like to try it first with a transient solver (which is proved to be working) and than rhoSimpleFoam. If you can upload also the mesh, it would be better, so I can be sure that I am not doing any mistakes. My email:mehmetkaya84@gmail.com...Thanks for your efforts. Regards. 

February 4, 2010, 17:22 

#16 
Member

Ok Mehmet I will mail it to you.
But mine is a 3D inviscid Case. Open the grid with ParaFoam, the direction of the flow is z. And I used rhoPisoFoam works fine, check the results. regards and best luck CX 

February 18, 2010, 19:42 
compressible flow

#17 
New Member
GHASSAN
Join Date: Feb 2010
Posts: 1
Rep Power: 0 
Hi all
First of all I am a new user to ANSYS 12. I want to use fluent with compessible flow in side nozzle with heigh speed could you help me please. Regards Gaz 

February 19, 2010, 11:59 

#18 
Member

Hi gaz,
My advice is for you to try some of FLUENT tutorials available in the web. Check this website. http://courses.cit.cornell.edu/fluent/ Good Luck CX PS: This is a forum reserved for openFoam, if you have more doubts check the FLUENT forum. 

November 27, 2012, 08:54 
Need help

#19 
Member
Valentin Wibaut
Join Date: Oct 2012
Posts: 45
Rep Power: 13 
Hi all
I would like to simulate a supersonic nozzle with and without shock. So I have the same boundary conditions of Xisto except for the pressure at the outlet. I use waveTransmissive to avoid the reflection of the wave. Is it ok? Other question: When I use waveTransmissive I have to choose a "linf". But how do I choose the value? 

February 27, 2013, 13:24 

#20 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 
what George?
what schemes there are for div(U)? 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Wind turbine simulation  Saturn  CFX  58  July 3, 2020 02:13 
mass flow in is not equal to mass flow out  saii  CFX  12  March 19, 2018 06:21 
Help needed with laminar couette flow boundary conditions  bengt  OpenFOAM Running, Solving & CFD  0  March 19, 2009 09:25 
boundary conditions for boundary layer flow  A. Alzoubi  CFX  0  November 3, 2007 08:11 
compressible flow boundary conditions  yangqing  FLUENT  2  January 22, 2002 11:19 