|
[Sponsors] |
November 27, 2019, 04:55 |
simpleFoam convergence issue
|
#1 |
New Member
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 8 |
I am new to OpenFoam. I am trying to simulate flow over an aircraft fuselage at Re=36000000. I have created my mesh in ansys meshing using cutcell method with inflation layers and y+ ~ 30 and imported it in Openfoam. I am using k omega SST model and I have specified all boundary conditions to the best of my knowledge. I am using simpleFoam as the solver. The solution does not converge and I am getting completely wrong results. I am pasting my case files below. Can someone please take a look and tell me where the problem is? Any help would be greatly appreciated.
K Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 18.37479; boundaryField { inlet { type fixedValue; value uniform 18.37479; } outlet { type zeroGradient; } wall { type zeroGradient; } fuselage { type kqRWallFunction; value uniform 18.37479; } symmetry { type symmetry; } } Code:
dimensions [0 2 -1 0 0 0 0]; internalField uniform 1.6496e-5; boundaryField { inlet { type freestream; freestreamValue uniform 1.6496e-5; } outlet { type freestream; freestreamValue uniform 1.6496e-5; } wall { type nutkWallFunction; value uniform 1.6496e-5; } fuselage { type nutkWallFunction; value uniform 1.6496e-5; } symmetry { type symmetry; } } Code:
dimensions [0 0 -1 0 0 0 0]; internalField uniform 5.4941; boundaryField { inlet { type fixedValue; value uniform 5.4941; } outlet { type zeroGradient; } wall { type zeroGradient; } fuselage { type omegaWallFunction; value uniform 5.4941; } symmetry { type symmetry; } } Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type freestreamPressure; freestreamValue $internalField; } wall { type zeroGradient; } fuselage { type zeroGradient; } symmetry { type symmetry; } } Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (70 0 0); boundaryField { inlet { type freestreamVelocity; freestreamValue $internalField; } outlet { type zeroGradient; } wall { type slip; } fuselage { type noSlip; } symmetry { type symmetry; } } Code:
solvers { p { solver GAMG; tolerance 1e-10; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration on; agglomerator faceAreaPair; nCellsInCoarsestLevel 120; mergeLevels 1; maxIter 500; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } k { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } omega { solver smoothSolver; smoother GaussSeidel; tolerance 1e-8; relTol 0.1; nSweeps 1; } } SIMPLE { nNonOrthogonalCorrectors 3; nCorrectors 1; } potentialFlow { nNonOrthogonalCorrectors 10; } relaxationFactors { fields { p 0.2; } equations { U 0.5; k 0.5; omega 0.5; } } cache { grad(U); } Code:
ddtSchemes { default steadyState; } gradSchemes { default cellMDLimited Gauss linear 0.5; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear uncorrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } wallDist { method meshWave; } // ************************************************************************* // Code:
application simpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 1000; deltaT 1; writeControl timeStep; writeInterval 50; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { forces { type forceCoeffs; libs ("libforces.so"); writeControl writeTime; patches ( fuselage ); rho rhoInf; rhoInf 1.0556; CofR (0.4127 0 0); liftDir (0 0 1); dragDir (1 0 0); pitchAxis (0 1 0); magUInf 70; lRef 8.669; Aref 5.01095; } } |
|
November 27, 2019, 05:10 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
did you run checkMesh to check if the quality of your mesh is Ok? Can you post snapshot of you mesh. I had the experience that if there are a lot of thetrahedra in the mesh you use openfoam has convergence problems
|
|
November 27, 2019, 05:13 |
|
#3 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
by the way are you sure you want to use an incompressible solver for an inflow velocity of 70m/s. I would guess that in some parts of your domain you will reach velocities where the Ma number is above the limit where the flow can be regarded as incompressible
|
|
November 28, 2019, 00:53 |
|
#4 |
New Member
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 8 |
Hi
I have attached the snapshot of the mesh and after giving the check mesh I have got Code:
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : 7-6ef561967074 Exec : checkMesh Date : Nov 28 2019 Time : 10:12:13 Host : "freedom" PID : 4545 I/O : uncollated Case : /home/leapaero/OpenFOAM/leapaero-7/run/tutorials/incompressible/simpleFoam/fuselage nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 1854705 faces: 5569374 internal faces: 5433716 cells: 1853250 faces per cell: 5.93719 boundary patches: 5 point zones: 0 face zones: 1 cell zones: 1 Overall number of cells of each type: hexahedra: 1614876 prisms: 192058 wedges: 0 pyramids: 4933 tet wedges: 16 tetrahedra: 5274 polyhedra: 36093 Breakdown of polyhedra by number of faces: faces number of cells 5 252 6 8929 7 7546 8 291 9 12017 10 83 11 255 12 4974 13 9 15 1710 18 25 21 2 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology fuselage 41276 33202 ok (non-closed singly connected) inlet 5202 5356 ok (non-closed singly connected) wall 41616 42025 ok (non-closed singly connected) symmetry 42362 43443 ok (non-closed singly connected) outlet 5202 5356 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-130 -0.000285276 -65) (130 65 65) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (7.31581e-16 4.9481e-15 -8.75319e-16) OK. Max cell openness = 5.31195e-15 OK. Max aspect ratio = 185.675 OK. Minimum face area = 1.22156e-06. Maximum face area = 1.62551. Face area magnitudes OK. Min volume = 7.9565e-09. Max volume = 2.07182. Total volume = 2.197e+06. Cell volumes OK. Mesh non-orthogonality Max: 82.2994 average: 6.16104 *Number of severely non-orthogonal (> 70 degrees) faces: 445. Non-orthogonality check OK. <<Writing 445 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. Max skewness = 2.57593 OK. Coupled point location match (average 0) OK. Mesh OK. Thank You |
|
November 28, 2019, 00:55 |
|
#5 |
New Member
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 8 |
Also after around a 150 iterations the solution used to give a error and i suspect the mesh would be the reason for that error
|
|
November 28, 2019, 01:40 |
|
#6 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
The mesh seems ok. Did you try to write out the solution a few iterations before it converges. This may give you a hint what's going wrong
|
|
November 28, 2019, 01:42 |
|
#7 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Why do you use so many non orthogonal correctors. The mesh quantity does non require this from my experience
|
|
November 28, 2019, 02:18 |
|
#8 |
New Member
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 8 |
Should I set both of the non orthogonal correctors to 0 one in potential flow and SIMPLE and try running the case?
|
|
November 28, 2019, 02:33 |
|
#9 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Only for simple. For potentialflow it is fine since I assume you use potentialfoam to initialize the flow field
|
|
November 28, 2019, 02:35 |
|
#10 |
New Member
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 8 |
Sure thank you I'll run the case and post the updates
|
|
November 28, 2019, 08:47 |
|
#12 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16 |
If mesh and boundary conditions are fine and initialization with potentialFoam does not help, you might want to consider running a case with more numerical diffusion first. For example, use a coarser mesh, and choose 1st order upwind for the div terms of the momentum equations. If this one converges use mapFields to initialize your simulation with 2nd order schemes and finer mesh.
|
|
November 28, 2019, 17:39 |
|
#13 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Some ideas from my bed:
- numerical predictions might not be time-invariant. might be there appears considerable extent time-variant patterns. - relaxation factors: increase p to 0.9 and the rest 0.7. - might use simplec instead of simple. if you use simplec, remove relaxation factor for p completely (delete those lines) - find alternative boundary conditions to freestream bpundary conditions, and do the tests. - depending on Ma number might consider to use an equivalent compressible solver
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence issue with continuity equation | Jake | FLUENT | 8 | June 6, 2018 04:41 |
simpleFoam: simple 1-D channel flow, yet very strange convergence behavior | kishpishar | OpenFOAM Running, Solving & CFD | 2 | June 20, 2013 14:55 |
Convergence Problems SimpleFOAM | Kutti | OpenFOAM | 16 | June 14, 2010 09:12 |
Getting faster convergence in simpleFoam | basneb | OpenFOAM | 8 | February 9, 2010 05:20 |
Definition of convergence criterion in simpleFoam | titio | OpenFOAM Running, Solving & CFD | 1 | February 6, 2010 02:34 |