In this paper, in the framework of OpenFOAM, the density-based steady and unsteady dual-time implicit LU-SGS solvers which are termed as lusgsFoam and lusgsDualFoam are established. The key implementation details of the forward and backward sweep looping process in the LU-SGS approach are introduced. Three typical test cases, i.e. hypersonic airflow across cylinder(steady), subsonic flow over bump (steady) and supersonic forward step flow (unsteady), are used to investigate the performance of these LU-SGS solvers, and the density-based explicit solver, i.e. the rhoCentralFoam in the official OpenFOAM, is adopted as the comparison solver. Through the comparison of the numerical results for the first two steady cases, it is found that, the convergence performance of the LU-SGS solver is significantly superior to explicit solver rhoCentralFoam. Meanwhile, considering the combined effect of time step and the iteration efficiency, the LU-SGS solver, lusgsFoam is significantly more efficient than the explicit solver, rhoCentralFoam. For the third test case, i.e. the unsteady supersonic forward step flow, the spatial accuracy of the unsteady dual time lusgsDualFoam solver is a little lower than the explicit rhoCentralFoam, but overall, this unsteady implicit solver can capture the transient characteristics efficiently. convective Jacobian matrix positive/negative Steger–Warming flux-splitting Jacobian matrix surface element diagonal matrix, the lower-diagonal matrix and the the upper-diagonal matrix convective flux vectors viscous flux vectors identity matrix sets of “owner” and “neighbor” cells which are adjacent to the cell i in OpenFOAM unit normal vector at the interface set of cells which are adjacent to cell i residual of complete spatial discretization term for the discretized governing equation physical time(s) contravariant velocity vector of conservative variable control volume spectral radius of the convective flux Jacobian, Ac L2 norm residual pseudo time step convective; sound speed index of cell interface between cell i and j time level at the current pseudo time Cartesian coordinates inverse time level at the current physical time viscous symbol indicating direction temporary variable 
Implementation of density-based implicit LU-SGS solver in the framework of OpenFOAM