LohCG: Lid-driven cavity
This example uses LohCG in Inciter to compute the stationary viscous constant-density (incompressible) laminar flow field in a cubic domain driven by a shearing velocity on one side. The numerical solution is compared to those published in [1].
Problem setup
The problem domain is a cube with 5 solid walls and a constant shear-velocity prescribed on the 6th one. The mesh consts of 750,000 tetrahedra connecting 132,651 pointsis, displayed below. The initial conditions prescribe a quiescent state with . The boundaries at walls prescribe no-slip/no-penetration with . The shear velocity on top of the cube is enforced using a Dirichlet condition as . The dynamic viscosity is specified as , which yields a Reynolds number of , defined based on the fluid density , the length of the cube , and the imposed shear velocity of .
Code revision to reproduce
To reproduce the results below, use code revision 4c61fe1 and the control file below.
Control file
-- vim: filetype=lua: print "Lid-driven cavity" -- mesh: mms/unitcube_94K.exo -- mms/unitcube_750K.exo -- mms/unitcube_6M.exo -- mms/unitcube_48M.exo term = 40.0 ttyi = 1000 cfl = 0.9 solver = "lohcg" flux = "damp2" stab2 = true stab2coef = 0.01 soundspeed = 1000.0 rk = 2 part = "rcb" Re = 100.0 mat = { dyn_viscosity = 1.0/Re } pressure = { iter = 500, tol = 1.0e-3, verbose = 1, pc = "jacobi", hydrostat = 0 } ic = { velocity = { 0.0, 0.0, 0.0 } } bc_noslip = { sideset = { 1, 2, 3, 5, 6 } } bc_dir = { { 4, 0, 2, 2, 2 } } bc_dirval = { { 4, 0.0, 1.0, 0.0, 0.0 } } fieldout = { iter = 100000 } diag = { iter = 100, format = "scientific", precision = 12 }
Run on 64 CPUs
./charmrun +p64 Main/inciter -i unitcube_750K.exo -c ldc_lohcg.q
Numerical solution
Plotted below are the computed velocity profiles sampled in the middle of the domain along lines in the X and Y directions, obtained after the solution has converged to a stationary state. The numerical solution is compared to those in [1].
References
- U. Ghia, K.N. Ghia, and C.T. Shin, High-Re Solutions of Incompressible Flow Using the Navier-Stokes Equations and a Multigrid Method, Journal of Computational Physics, 48(3), 387-411, 1982.