
[Sponsors] 
June 5, 2019, 16:38 
SimpleFoam & Theater

#1 
New Member
Join Date: Oct 2015
Posts: 11
Rep Power: 6 
Hi Foamers,
I'm trying to run an airflow simulation on a theater with OpenFOAM, at a first glance with simpleFoam and then hopefully with buoyantBoussinesqSimpleFoam. The boundary conditions are as follows :  Inlet 42 circular inlets : 8,25m/s from the ceiling toward the floor (U fixedValue), p zeroGradient, k fixedValue uniform 0.150, epsilon fixedValue uniform 0.778, nut calculated  Outlet : 1 rectangular outlet : U zeroGradient, p fixedValue 0, k zeroGradient, epsilon zeroGradient, nut calculated  Walls : U noSlip, p zeroGradient, k zeroGradient, epsilon zeroGradient, nut zeroGradient (I don't care about the flow near the walls, I just wish it doesn't cause divergence in my settings ^^). I don't succeed in making my solver to converge. I tried at first to run the simulation in laminar conditions. U solvers doesn't go under 10e2 and P stays between 0.2 and 0.3. So what could be wrong ? The resulting airflow isn't that bad. The values are coherent, though a little higher than expected, and the global air circulation is coherent. Then I tried to turn on turbulence after few iterations. The solver runs for 300 iteration with the sames U and p residuals (102 and 0.20.3) and then suddenly diverges. I tried many parameters and also many meshes. I simplified the mesh as much as possible and reduce the cell size to gain precision at the maximum my machine can run. Here I give my logs :  checkMesh  snappyHexMesh  simpleFoam > CheckMesh Create time Create polyMesh for time = 1 Time = 1 Mesh stats points: 13044316 faces: 37910503 internal faces: 37108483 cells: 12438874 faces per cell: 6.031011 boundary patches: 3 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 12298744 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 140130 Breakdown of polyhedra by number of faces: faces number of cells 6 28002 8 4723 9 92649 10 198 11 102 12 11013 13 110 14 44 15 3207 18 82 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 walls 792580 803925 ok (nonclosed singly connected) inlet 4096 5064 ok (nonclosed singly connected) outlet 5344 5544 ok (nonclosed singly connected) Checking geometry... Overall domain bounding box (7.401487e17 13.9375 9.251859e17) (44.1875 37.5 14.76563) Mesh has 3 geometric (nonempty/wedge) directions (1 1 1) Mesh has 3 solution (nonempty) directions (1 1 1) Boundary openness (2.169213e16 1.027522e16 1.313974e14) OK. Max cell openness = 3.330669e16 OK. Max aspect ratio = 1.00096 OK. Minimum face area = 0.0002439844. Maximum face area = 0.015625. Face area magnitudes OK. Min volume = 3.811036e06. Max volume = 0.001953125. Total volume = 22056.98. Cell volumes OK. Mesh nonorthogonality Max: 25.24883 average: 2.934891 Nonorthogonality check OK. Face pyramids OK. Max skewness = 1 OK. Coupled point location match (average 0) OK. Mesh OK. End > SnappyHexMesh Create mesh for time = 0 Read mesh in = 67.8 s Overall mesh bounding box : (0.5 14 0.5) (45.5 38 15.5) Relative tolerance : 1e06 Absolute matching distance : 7.124605e05 Reading refinement surfaces. Read refinement surfaces in = 0.02 s Reading refinement shells. Read refinement shells in = 0 s Setting refinement level of surface to be consistent with shells. Checked shell refinement in = 0 s Reading features. Read features in = 0 s Determining initial surface intersections  Edge intersection testing: Number of edges : 59039232 Number of edges to retest : 59039232 Number of intersected edges : 457737 Calculated surface intersections in = 77.85 s Initial mesh : cells:19595264 faces:59039232 points:19849617 Cells per refinement level: 0 19595264 Adding patches for surface regions  Patch Type Region    walls: 1 wall walls inlet: 2 patch inlet outlet: 3 patch outlet Added patches in = 0.73 s Selecting decompositionMethod none Layer thickness specified as final layer and expansion ratio. Refinement phase  Found point (3.0001 3.0001 1.7777) in cell 2805660 on processor 0 Surface refinement iteration 0  Marked for refinement due to surface intersection : 520 cells. Marked for refinement due to curvature/regions : 76132 cells. Determined cells to refine in = 170.83 s Selected for refinement : 76652 cells (out of 19595264) Edge intersection testing: Number of edges : 60808950 Number of edges to retest : 2382322 Number of intersected edges : 706471 Refined mesh in = 54.5 s After refinement surface refinement iteration 0 : cells:20131828 faces:60808950 points:20554188 Cells per refinement level: 0 19518612 1 613216 Surface refinement iteration 1  Marked for refinement due to surface intersection : 2042 cells. Marked for refinement due to curvature/regions : 629 cells. Determined cells to refine in = 2.42 s Selected for refinement : 3265 cells (out of 20131828) Edge intersection testing: Number of edges : 60888069 Number of edges to retest : 131483 Number of intersected edges : 713480 Refined mesh in = 43.5 s After refinement surface refinement iteration 1 : cells:20154683 faces:60888069 points:20588367 Cells per refinement level: 0 19517369 1 621138 2 16176 /!\ I cut the inbetween iterations Surface refinement iteration 8  Marked for refinement due to surface intersection : 0 cells. Marked for refinement due to curvature/regions : 8 cells. Determined cells to refine in = 2.56 s Selected for refinement : 8 cells (out of 20186925) Stopping refining since too few cells selected. Removing mesh beyond surface intersections  Found point (3.0001 3.0001 1.7777) in global region 1 out of 2 regions. Keeping all cells in region 1 containing point (3.0001 3.0001 1.7777) Selected for keeping : 12092222 cells. Edge intersection testing: Number of edges : 36799461 Number of edges to retest : 686943 Number of intersected edges : 724364 Shell refinement iteration 0  Marked for refinement due to distance to explicit features : 0 cells. Marked for refinement due to refinement shells : 0 cells. Determined cells to refine in = 2390.59 s Selected for internal refinement : 56363 cells (out of 12092222) Edge intersection testing: Number of edges : 38070489 Number of edges to retest : 2131171 Number of intersected edges : 776914 Refined mesh in = 30.68 s After refinement shell refinement iteration 0 : cells:12486763 faces:38070489 points:13105240 Cells per refinement level: 0 11641853 1 760801 2 46709 3 37400 /!\ I cut the inbetween iterations Shell refinement iteration 99  Marked for refinement due to distance to explicit features : 0 cells. Marked for refinement due to refinement shells : 0 cells. Determined cells to refine in = 2.48 s Selected for internal refinement : 21 cells (out of 13547347) Edge intersection testing: Number of edges : 41298225 Number of edges to retest : 1292 Number of intersected edges : 813267 Refined mesh in = 27.97 s After refinement shell refinement iteration 99 : cells:13547494 faces:41298225 points:14211894 Cells per refinement level: 0 11494674 1 1936296 2 59788 3 56736 Dangling coarse cells refinement iteration 0  Determined cells to refine in = 0.39 s Selected for refinement : 0 cells (out of 13547494) Stopping refining since too few cells selected. Dangling coarse cells refinement iteration 0  Determined cells to refine in = 0.31 s Selected for refinement : 0 cells (out of 13547494) Stopping refining since too few cells selected. Splitting mesh at surface intersections  Introducing baffles for 813267 faces that are intersected by the surface. Edge intersection testing: Number of edges : 42111490 Number of edges to retest : 5928458 Number of intersected edges : 1609984 Created baffles in = 23.73 s After introducing baffles : cells:13547494 faces:42111490 points:14211894 Cells per refinement level: 0 11494674 1 1936296 2 59788 3 56736 Introducing baffles to block off problem cells  markFacesOnProblemCells : marked 1074685 additional internal faces to be converted into baffles. Analyzed problem cells in = 16.46 s Introducing baffles to delete problem cells. Edge intersection testing: Number of edges : 43186175 Number of edges to retest : 3464439 Number of intersected edges : 1610513 Created baffles in = 22.63 s After introducing baffles : cells:13547494 faces:43186175 points:14211894 Cells per refinement level: 0 11494674 1 1936296 2 59788 3 56736 Remove unreachable sections of mesh  Keeping all cells in region 89947 containing point (3.0001 3.0001 1.7777) Selected for keeping : 12438874 cells. Edge intersection testing: Number of edges : 37917743 Number of edges to retest : 0 Number of intersected edges : 802080 Split mesh in = 1188.01 s After subsetting : cells:12438874 faces:37917743 points:13051401 Cells per refinement level: 0 11140237 1 1217875 2 39658 3 41104 Handling cells with snap problems  Introducing baffles for 802080 faces that are intersected by the surface. Edge intersection testing: Number of edges : 37917743 Number of edges to retest : 2927171 Number of intersected edges : 802080 Created baffles in = 16.07 s After introducing baffles : cells:12438874 faces:37917743 points:13051401 Cells per refinement level: 0 11140237 1 1217875 2 39658 3 41104 Introducing baffles to block off problem cells  markFacesOnProblemCells : marked 0 additional internal faces to be converted into baffles. Analyzed problem cells in = 14.35 s Introducing baffles to delete problem cells. Edge intersection testing: Number of edges : 37917743 Number of edges to retest : 0 Number of intersected edges : 802080 Created baffles in = 14.36 s After introducing baffles : cells:12438874 faces:37917743 points:13051401 Cells per refinement level: 0 11140237 1 1217875 2 39658 3 41104 Remove unreachable sections of mesh  Keeping all cells in region 0 containing point (3.0001 3.0001 1.7777) Selected for keeping : 12438874 cells. Edge intersection testing: Number of edges : 37917743 Number of edges to retest : 0 Number of intersected edges : 802080 Split mesh in = 1094.92 s After subsetting : cells:12438874 faces:37917743 points:13051401 Cells per refinement level: 0 11140237 1 1217875 2 39658 3 41104 Merge freestanding baffles  freeStandingBaffles : detected 0 freestanding baffles out of 0 Detected freestanding baffles : 0 Merged freestanding baffles in = 3.25 s dupNonManifoldPoints : Found : 1 nonmanifold points (out of 13051401) Edge intersection testing: Number of edges : 37917743 Number of edges to retest : 0 Number of intersected edges : 802080 Detected unsplittable baffles : 0 Merge refined boundary faces  Merging 6072 sets of faces. Edge intersection testing: Number of edges : 37910503 Number of edges to retest : 44164 Number of intersected edges : 794840 Undo iteration 0  Checking faces in error : nonorthogonality > 65 degrees : 0 faces with face pyramid volume < 1e13 : 0 faces with facedecomposition tet quality < 1e15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Merging all points on surface that  are used by only two boundary faces and  make an angle with a cosine of more than 0.7071068. Removing 6502 straight edge points ... Edge intersection testing: Number of edges : 37910503 Number of edges to retest : 47269 Number of intersected edges : 794840 Undo iteration 0  Checking faces in error : nonorthogonality > 65 degrees : 0 faces with face pyramid volume < 1e13 : 0 faces with facedecomposition tet quality < 1e15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Removing zerosized patches: frontAndBack type patch at position 0 Refined mesh : cells:12438874 faces:37910503 points:13044316 Cells per refinement level: 0 11140237 1 1217875 2 39658 3 41104 Writing mesh to time 1 Wrote mesh in = 154.89 s. Mesh refined in = 8612.52 s. Checking final mesh ... Checking faces in error : nonorthogonality > 65 degrees : 0 faces with face pyramid volume < 1e13 : 0 faces with facedecomposition tet quality < 1e15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Finished meshing without any errors Finished meshing in = 8791.99 s. End > SimpleFOAM Create time Create mesh for time = 100 SIMPLE: no convergence criteria found. Calculations will run for 900 steps. Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon No MRF models present No finite volume options present Starting time loop Time = 101 smoothSolver: Solving for Ux, Initial residual = 0.04420976, Final residual = 0.0003398643, No Iterations 9 smoothSolver: Solving for Uy, Initial residual = 0.04553454, Final residual = 0.000331451, No Iterations 9 smoothSolver: Solving for Uz, Initial residual = 0.02992303, Final residual = 0.0002255237, No Iterations 9 GAMG: Solving for p, Initial residual = 0.2121712, Final residual = 0.0001443541, No Iterations 6 GAMG: Solving for p, Initial residual = 0.0007468585, Final residual = 9.9382e07, No Iterations 13 time step continuity errors : sum local = 1.907021e07, global = 7.843384e11, cumulative = 7.843384e11 ExecutionTime = 33.46 s ClockTime = 54 s fieldMinMax minMax write: min(mag(U)) = 0 in cell 2028828 at location (26.39062 23.625 0.109375) on processor 5 max(mag(U)) = 8.286627 in cell 1455994 at location (15.82812 22.73437 14.70312) on processor 4 min(p) = 0.9655955 in cell 2021604 at location (26.32812 23.70312 0.765625) on processor 5 max(p) = 10.91654 in cell 33048 at location (7.0625 26.6875 0.0625) on processor 3 Time = 102 smoothSolver: Solving for Ux, Initial residual = 0.04418991, Final residual = 0.0003376186, No Iterations 9 smoothSolver: Solving for Uy, Initial residual = 0.04544644, Final residual = 0.0003304752, No Iterations 9 smoothSolver: Solving for Uz, Initial residual = 0.02998624, Final residual = 0.0002256606, No Iterations 9 GAMG: Solving for p, Initial residual = 0.2118488, Final residual = 0.0001422935, No Iterations 6 GAMG: Solving for p, Initial residual = 0.0007463951, Final residual = 7.782941e07, No Iterations 14 time step continuity errors : sum local = 1.49576e07, global = 5.337561e11, cumulative = 1.318095e10 ExecutionTime = 50.01 s ClockTime = 80 s fieldMinMax minMax write: min(mag(U)) = 0 in cell 2028828 at location (26.39062 23.625 0.109375) on processor 5 max(mag(U)) = 8.28675 in cell 1455994 at location (15.82812 22.73437 14.70312) on processor 4 min(p) = 0.9651283 in cell 2028845 at location (26.32812 23.70312 0.234375) on processor 5 max(p) = 10.99684 in cell 33048 at location (7.0625 26.6875 0.0625) on processor 3 and so on for 700 iterations (no evolution in the residuals) 

June 5, 2019, 16:42 

#2 
New Member
Join Date: Oct 2015
Posts: 11
Rep Power: 6 
I add :
 fvSchemes  fvSolutions /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 5   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,k) bounded Gauss limitedLinear 1; div(phi,epsilon) bounded Gauss limitedLinear 1; div(phi,omega) bounded Gauss limitedLinear 1; div(phi,v2) bounded Gauss limitedLinear 1; div((nuEff*dev2(T(grad(U))))) Gauss linear; div(nonlinearStress) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } // ************************************************** *********************** // /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 5   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e06; relTol 0.001; smoother GaussSeidel; minIter 3; maxIter 100; } Phi { $p; } "(Ukepsilonomegafv2)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e05; relTol 0.001; minIter 3; maxIter 100; } } potentialFlow { nNonOrthogonalCorrectors 10; } SIMPLE { nNonOrthogonalCorrectors 1; consistent yes; residualControl { p 1e5; U 1e5; "(kepsilonomegafv2)" 1e5; } } relaxationFactors { equations { U 0.3; // 0.9 is more stable but 0.95 more convergent p 0.5; k 0.7; epsilon 0.7; ".*" 0.9; // 0.9 is more stable but 0.95 more convergent } } // ************************************************** *********************** // 

June 5, 2019, 16:44 

#3 
New Member
Join Date: Oct 2015
Posts: 11
Rep Power: 6 
Since I'm not used to post on this forum, please ask me if you need some more information about the settings.
Has someone any hints ? It would be great ! 

June 18, 2019, 10:11 

#4 
Member
Kumar
Join Date: Jun 2013
Posts: 37
Rep Power: 9 
Your mesh seem to be OK and most of the settings seem to be fine except for the following points:
(1) You ran the solver in laminar flow mode at first  if the flow is turbulent, and in this case very likely it is, you run the risk of getting oscillatory or even diverging solutions. (2) If you model turbulence using kEpsilon, you'll need to use wall functions on the walls> kqRWallFunction, epsilonWallFunction and nutkWallFunction for k, epsilon and nut fields, respectively. 

Tags 
simplefoam indoor airflow 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
interFoam vs. simpleFoam channel flow comparison  DanM  OpenFOAM Running, Solving & CFD  12  January 31, 2020 15:26 
MPI error with simpleFoam  blaise  OpenFOAM Running, Solving & CFD  0  November 7, 2015 14:01 
simpleFoam parallel solver & Fluent polyhedral mesh  Zlatko  OpenFOAM Running, Solving & CFD  3  September 26, 2014 06:53 
Laminar simpleFoam and inviscid simpleFoam  herenger  OpenFOAM Running, Solving & CFD  7  July 11, 2013 06:27 
Trying to run a benchmark case with simpleFoam  spsb  OpenFOAM  3  February 24, 2012 09:07 