## 1. Introduction

[2] The deformation of alluvial beds under the action of flowing water produces complex geometries that change in time. Solving such problems is one of the main challenges in computational morphodynamics. Methods based on boundary-fitted grids offer an attractive way to deal with complex geometries, because they greatly simplify the imposition of boundary conditions. However, the possibilities to fit the boundaries are limited for structured grids, whilst unstructured grids are computationally more expensive. Moreover, boundary-fitted grids must be regenerated after each deformation of the boundaries, which requires much computational effort. Generation of a grid suitable for complex geometries can also be troublesome and sometimes cannot be applied without multiblock techniques. These issues lead to complexity and possibly instability in the computational process. To avoid these problems, we use a fixed Cartesian grid with special treatment of the boundary zones.

[3] Methods based on Cartesian grids have attracted special attention, now that techniques to handle complex geometries have become available. The Cartesian grids are fixed and intersect the boundaries, which requires special treatment of these boundaries, such as cut-cell techniques, or ghost-cell immersed-boundary methods. In the former approach, the cells that intersect the boundaries are cut. This approach has been used for inviscid [*Bayyuk*, 1996; *Quirk*, 1994] and viscous flow computations, including fixed and moving boundaries [*Mittal et al.*, 2008; *Udaykumar et al.*, 2001; *Ye et al.*, 1999; *Kirkpatrick et al.*, 2003]. It represents the boundary location accurately, but a boundary can intersect a cell in many ways, which causes complexity in programming and reduces computational efficiency. Ghost-cell immersed-boundary techniques force the flow at the boundary using simple interpolation, which does not increase computation time significantly. This method has been applied to viscous flows with fixed [*Gilmanov et al.*, 2003; *Tseng and Ferziger*, 2003; *Balaras*, 2004] and moving boundaries [*Fadlun et al.*, 2000; *Yang and Balaras*, 2006]. The cases they describe show that the ghost-cell immersed-boundary method is suitable for problems with very complex geometries.

[4] Uniform Cartesian grids are still expensive for simulation of alluvial processes with large spatial and temporal scales, because the entire domain has to be covered by cells of the same size. The regions with highest gradients determine the cell size, whereas they usually cover only a small fraction of the domain. A locally refined Cartesian grid is therefore preferable. This method has been applied successfully to inviscid flows [*Aftosmis et al.*, 1998; *Clarke et al.*, 1986; *Zeeuw and Powell*, 1993; *Waymel et al.*, 2006; *Ham et al.*, 2002] and viscous flows [*Martin et al.*, 2008; *Iaccarino and Verzicco*, 2003]. *Aftosmis et al.* [1998] consider the grid as fully unstructured and discretize the equations on a single grid, whereas *Ham et al.* [2002] treat the grid as multilevel and use a hierarchical tree data structure. In a multilevel grid, each grid covers a subdomain of a coarser grid. Some authors have suggested [*Coirier and Powell*, 1996] or demonstrated [*Berger et al.*, 2000; *Ham et al.*, 2002] that the hierarchical tree structure for the grid is amenable to multigrid methods, which are more efficient than the Krylov space methods for large matrices [*Saad*, 2003].

[5] To avoid complexity and the need of regridding after each time step, we solve the flow on a Cartesian grid that is locally refined in high-gradient regions such as the boundary layer near the river bed. A ghost-cell immersed-boundary method is applied, enforcing the no-slip condition on the bed surface via momentum forcing at the bed. The current method interpolates the flow for the ghost cells in a way similar to*Balaras* [2004]. The current paper focuses on describing the numerical methods for the hydrodynamic part of the solver, validating the accuracy of the applied approach and demonstrating the capabilities of the solver in complex dynamic geometries. The cases used for this hydrodynamic validation are Stokes flow around a cylinder in the vicinity of a moving wall, flow around a cylinder at higher Reynolds numbers, and flow over two-dimensional (2-D) and three-dimensional (3-D) dunes. Two companion papers (M. Nabi et al., Detailed simulation of morphodynamics: 2. Sediment pick-up, transport and deposition; 3. Ripples and dunes, submitted to*Water Resour. Res.*, 2013a, 2013b) show that the model performs well as a hydrodynamic submodel in the high-resolution modeling of sediment transport and formation and evolution of subaqueous ripples and dunes.