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

Supersonic tube inlet&outlet boundary conditions

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

Like Tree1Likes
  • 1 Post By clapointe

Reply
 
LinkBack Thread Tools Display Modes
Old   September 29, 2017, 02:17
Post Supersonic tube inlet&outlet boundary conditions
  #1
New Member
 
LYU XING
Join Date: Jun 2017
Posts: 5
Rep Power: 2
Ryokou is on a distinguished road
Hello everyone,I'm a new OpenFOAM,and after searched CFD Online forum and OpenFOAM WIKI for a long time but I also can't solve the problem.So I hope someone can give me some advices ,I will appreciate a lot!

Ok now I'm doing a simulation about supersonic(M=2) created from a tube.I have done mesh by Gmsh,and that is no problem when I use it to do low velocity water simulation.But when I change to compressible M=2 air condition the calculated result is totally wrong(with the time elapsed there is almost no velocity and pressure change), I thought problem come out from the boundary conditions, but I already tried over 100 times that is also incorrect.

I set the p dictionary like this
dimensions [1 -1 -2 0 0 0 0];

internalField uniform 19600;

boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type waveTransmissive;
field p;
psi thermosi;
gamma 1.4;
fieldInf 19600;
lInf 19600;
value 19600;
}
wall
{
type zeroGradient;
}
}

And the u dictionary like this
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type supersonicFreestream;
pInf 19600;
TInf 300;
UInf (600 0 0);
gamma 1.4;
value (600 0 0);
}

outlet
{
type zeroGradient;
}
wall
{
type noSlip;
}
}

The controlDic like this
application sonicFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1e-6;

deltaT 1e-7;

writeControl timeStep;

writeInterval 1;

purgeWrite 0;

writeFormat ascii;

writePrecision 6; //was 6

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

I hope somebody tell me where is wrong, thank you very very much!!
Ryokou is offline   Reply With Quote

Old   October 17, 2017, 00:30
Default
  #2
New Member
 
LYU XING
Join Date: Jun 2017
Posts: 5
Rep Power: 2
Ryokou is on a distinguished road
Hi everyone

Now I want to simplify this case by using viscosity=0,laminar simulationType.So there is 3 files(p T U) left in 0 dictionary ,and I think it's correct .But after I calculate the case,The velocity of air didn't change with time elapse( except nearby the inlet),I'm very confusing about that.Now I think problems maybe cased by fvScheme or fvSolution files, if it is I really hope somebody can check these two files, thanks a lot !

fvScheme:

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phiv,p) Gauss limitedLinear 1;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}


fvSolution:

solvers
{
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0.01;
}

"(p|rho)Final"
{
$p;
relTol 0;
}

"(U|e|k|nuTilda)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.01;
}

"(U|e|k|nuTilda)Final"
{
$U;
relTol 0;
}
}

PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 3;
nCorrectors 1;
nNonOrthogonalCorrectors 0;

pMinFactor 0.5;
pMaxFactor 2.0;
}

}

Here is the result in time=5e-6 with using paraview
Attached Images
File Type: png ???? 2017-10-17 ??11.52.10.png (138.9 KB, 7 views)
Ryokou is offline   Reply With Quote

Old   October 25, 2017, 10:40
Default
  #3
New Member
 
Join Date: Aug 2015
Posts: 27
Rep Power: 4
clapointe is on a distinguished road
Hi Ryokou,

What solver are you using? Have you taken a look at rhoCentralFoam and the accompanying tutorials? A link to the tutorials for version 4x is included below.

http://github.com/OpenFOAM/OpenFOAM-...rhoCentralFoam

Caelan
Ryokou likes this.
clapointe is offline   Reply With Quote

Old   October 26, 2017, 05:00
Default
  #4
New Member
 
LYU XING
Join Date: Jun 2017
Posts: 5
Rep Power: 2
Ryokou is on a distinguished road
Quote:
Originally Posted by clapointe View Post
Hi Ryokou,

What solver are you using? Have you taken a look at rhoCentralFoam and the accompanying tutorials? A link to the tutorials for version 4x is included below.

http://github.com/OpenFOAM/OpenFOAM-...rhoCentralFoam

Caelan
Hi Caelan ,

Thanks very much for your reply! I used sonicFoam,rhoPimpleFoam as solver.And I have tried rhoCentralFoam but it turned out to the same problem,I can't figure out where is wrong.
Here is my case ,can I get your help to check it? Thanks very much!!
https://www.dropbox.com/s/sgylyf9564...kTube.zip?dl=0

Ryokou
Ryokou is offline   Reply With Quote

Old   October 26, 2017, 11:17
Default
  #5
New Member
 
Join Date: Aug 2015
Posts: 27
Rep Power: 4
clapointe is on a distinguished road
Hi Ryokou,

Your case looks like it's set up for rhoCentralFoam, so have you checked out the corresponding shock tube tutorial?

Caelan
clapointe is offline   Reply With Quote

Old   October 27, 2017, 01:57
Default
  #6
New Member
 
LYU XING
Join Date: Jun 2017
Posts: 5
Rep Power: 2
Ryokou is on a distinguished road
Quote:
Originally Posted by clapointe View Post
Hi Ryokou,

Your case looks like it's set up for rhoCentralFoam, so have you checked out the corresponding shock tube tutorial?

Caelan
Hi Caelan,

Thanks very much for your reply.

I copied fvScheme and fvSolution file from ShockTube tutorial,

Now I have no idea about which scheme and solver is correct to my case, and my current level is not enough to fully understand what are these schemes and solvers meaning about,I'm learning them.can you help me to check out them? maybe the problem come from them.

Here is the case I changed a little.
https://www.dropbox.com/s/vzgr1r84fv...lFoam.zip?dl=0

thanks a lot!

Ryokou
Ryokou is offline   Reply With Quote

Reply

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
Wrong multiphase flow at rotating interface Sanyo CFX 14 February 7, 2017 18:19
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
sliding mesh problem in CFX Saima CFX 45 September 22, 2015 10:53
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source silvan CFX 3 June 16, 2014 09:49


All times are GMT -4. The time now is 19:21.