Supersonic tube inlet&outlet boundary conditions
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 thermo:psi; 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!! |
1 Attachment(s)
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 |
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 |
Quote:
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 |
Hi Ryokou,
Your case looks like it's set up for rhoCentralFoam, so have you checked out the corresponding shock tube tutorial? Caelan |
Quote:
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 |
All times are GMT -4. The time now is 20:47. |