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

Boundary Conditions for Internal compressible Flow

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2009, 07:33
Default Boundary Conditions for Internal compressible Flow
  #1
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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
xisto is offline   Reply With Quote

Old   November 18, 2009, 07:36
Default
  #2
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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;
xisto is offline   Reply With Quote

Old   November 21, 2009, 06:46
Default
  #3
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
Anyone???

CX
xisto is offline   Reply With Quote

Old   December 3, 2009, 20:47
Default
  #4
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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
mm.abdollahzadeh likes this.
xisto is offline   Reply With Quote

Old   January 30, 2010, 18:06
Default
  #5
New Member
 
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16
mhmt is on a distinguished road
Carlos, may I ask you to share your 0/ p U T files ?

Regards,

Mehmet
mhmt is offline   Reply With Quote

Old   January 30, 2010, 19:16
Default
  #6
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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).
Attached Files
File Type: zip 0.zip (1.6 KB, 869 views)
xisto is offline   Reply With Quote

Old   February 1, 2010, 08:24
Default
  #7
New Member
 
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16
mhmt is on a distinguished road
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.
mhmt is offline   Reply With Quote

Old   February 1, 2010, 08:40
Default
  #8
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
Ok first of all I'm new at openFoam...

I'm using 1.6

Can you post the shell information here?

Cheers,

CX
xisto is offline   Reply With Quote

Old   February 1, 2010, 10:01
Default
  #9
New Member
 
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16
mhmt is on a distinguished road
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
Attached Files
File Type: zip 0.zip (2.9 KB, 221 views)
File Type: zip constant.zip (1.5 KB, 159 views)
File Type: zip system.zip (2.2 KB, 136 views)
mhmt is offline   Reply With Quote

Old   February 1, 2010, 11:23
Default
  #10
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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
xisto is offline   Reply With Quote

Old   February 1, 2010, 12:48
Default
  #11
New Member
 
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16
mhmt is on a distinguished road
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.4792e-06 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.43012e-09, No Iterations 15
time step continuity errors : sum local = 0.000107626, global = -5.18031e-05, cumulative = -5.20557e-05
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/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/software/oss/OpenFOAM/OpenFOAM-1.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/OpenFOAM-1.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/OpenFOAM-1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#5 main in "/software/oss/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/rhoSimpleFoam"
#6 __libc_start_main in "/lib64/libc.so.6"
#7 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception

Regards.
mhmt is offline   Reply With Quote

Old   February 1, 2010, 13:14
Default
  #12
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
Why do you use a deltaT=0.1 - the rhoSimpleFoam is a steady state solver.

Try deltaT=1..

CX
xisto is offline   Reply With Quote

Old   February 1, 2010, 14:16
Default
  #13
New Member
 
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16
mhmt is on a distinguished road
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.61836e-09, No Iterations 13
time step continuity errors : sum local = 9.54107e-08, global = 3.18967e-08, cumulative = 8.01901e-07
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.86563e-09, No Iterations 13
time step continuity errors : sum local = 1.02277e-07, global = 4.39179e-08, cumulative = 8.45819e-07
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
mhmt is offline   Reply With Quote

Old   February 1, 2010, 17:00
Default
  #14
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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*(1|A(U))),p) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}
xisto is offline   Reply With Quote

Old   February 4, 2010, 13:30
Default
  #15
New Member
 
Mehmet Kaya
Join Date: Jan 2010
Posts: 10
Rep Power: 16
mhmt is on a distinguished road
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 e-mail 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 e-mail:mehmetkaya84@gmail.com...Thanks for your efforts.

Regards.
mhmt is offline   Reply With Quote

Old   February 4, 2010, 17:22
Default
  #16
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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
Attached Images
File Type: png export.png (12.6 KB, 370 views)
File Type: png export2.png (3.8 KB, 196 views)
fumiya and lpz456 like this.
xisto is offline   Reply With Quote

Old   February 18, 2010, 19:42
Default compressible flow
  #17
gaz
New Member
 
GHASSAN
Join Date: Feb 2010
Posts: 1
Rep Power: 0
gaz is on a distinguished road
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
gaz is offline   Reply With Quote

Old   February 19, 2010, 11:59
Default
  #18
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 17
xisto is on a distinguished road
Send a message via MSN to xisto
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.
xisto is offline   Reply With Quote

Old   November 27, 2012, 08:54
Default Need help
  #19
Member
 
Valentin Wibaut
Join Date: Oct 2012
Posts: 45
Rep Power: 14
vwibaut is on a distinguished road
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?
vwibaut is offline   Reply With Quote

Old   February 27, 2013, 13:24
Default
  #20
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
what George?
what schemes there are for div(U)?
immortality 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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
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. Al-zoubi CFX 0 November 3, 2007 08:11
compressible flow boundary conditions yangqing FLUENT 2 January 22, 2002 11:19


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