
[Sponsors] 
February 17, 2021, 10:33 
RANS of 3D flow around a square cylinder

#1 
New Member
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 4 
Hello all,
Firstly a disclaimer: I'm an idiot! I lack a lot of basic understanding of CFD and openFoam, so please be patient with me I am working on a tutorial I found on wiki.openfoam.com from wolfdynamics. Here's the link. The case is 3D flow past a square cylinder at RE=21,400. The point of the tutorial is to compare RANS and LES turbulent models. The tutorial first uses simpleFoam with RANS. My attempt to run this simulation has lead to a whole heap of questions. See my geometry here: geometry.jpg 1) I know apriori that this case will lead to vortex shedding (i.e. periodic motion). This immediately made me question why simpleFoam (a steady state solver) is being used. Is it ever "correct" to use a steady state solver for a problem that I know contains unsteady flow (even if it is periodic). Can this approach actually result in an accurate timeaveraged flow or will the results always be garbage? 2) A brief google for flow around a square cylinder will show studies using URANS rather than RANS for this problem. What does URANS mean in an openFoam context? Does this simply mean using the RAS turbulence model, but with an unsteady solver (like pimpleFoam)? Or is there more to it than that? 3) Ultimately, my residuals aren't converging. For my initial mesh (which is quite coarse), they plateau around (E4)  (E7). I originally thought that while they weren't converging, they were still 'low enough'. But I've since read that the value alone isn't sufficient to judge convergence, but the amount that they drop. I've seen that a drop of (E3) is considered a converged solution. Is this what I should be looking for? See my residuals here: Residuals_01_Coarse.png 4) The residuals oscillate a lot, but I'm not sure if this is because of the physical problem (oscillating flow) or because of the numerical schemes being used. My understanding of numerical schemes right now could be summed up as: 'use linearUpwind unless you know what your doing'. But in this case I am depending on the tutorial to give me recommended settings. My fvSchmes and fvSolution are below. Is there anything obvious that you think is preventing convergence? Code:
ddtSchemes { default steadyState; } gradSchemes { default cellLimited Gauss linear 0.5; grad(U) cellLimited Gauss linear 1; } 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 limited 1; } interpolationSchemes { default linear; } snGradSchemes { default limited 1; } wallDist { method meshWave; } Code:
solvers { p { solver GAMG; tolerance 1e6; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration on; agglomerator faceAreaPair; nCellsInCoarsestLevel 100; mergeLevels 1; minIter 3; } U { solver PBiCGStab; preconditioner DILU; tolerance 1e08; relTol 0.001; } k { solver PBiCGStab; preconditioner DILU; tolerance 1e08; relTol 0.001; } omega { solver PBiCGStab; preconditioner DILU; tolerance 1e08; relTol 0.001; } } SIMPLE { nNonOrthogonalCorrectors 2; pRefCell 0; pRefValue 0; consistent on; residualControl { p 1e3; U 1e3; nuTilda 1e3; k 1e3; omega 1e3; } } //SIMPLEC URF relaxationFactors { fields { p 0.7; } equations { U 0.7; k 0.7; omega 0.7; } } Thank you for taking the time to read through this question. I hope to hear your response soon! Jeffrey, Last edited by NotDrJeff; February 17, 2021 at 10:56. Reason: Attachments not attached 

Tags 
rans, simplefoam convergence, square cylinder, vortex shedding 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Flow past a 2D cylinder  High Re (1E+05)  Cd too high  Pervispasco  OpenFOAM Running, Solving & CFD  4  March 14, 2022 03:19 
Incorrect Drag and Drag Coefficient for flow over a cylinder  ozzythewise  Main CFD Forum  8  June 13, 2012 07:24 
grids for flow over a square cylinder  student  Main CFD Forum  4  April 21, 2009 07:50 
Flow over a cylinder  Anna  Main CFD Forum  9  March 24, 2006 15:32 
Turbulent steady flow around a circular cylinder  Mirek Kabacinski  FLUENT  0  July 23, 2003 19:40 