# What methods exist to solve for the fluid flow past a cylinder using finite differences on a Cartesian grid?

I'm interested in finite-difference approaches to the incompressible Navier-Stokes equations that can handle complex geometry without the use of an unstructured mesh or a non-Cartesian grid. To be clear, I'm aware of standard approaches, e.g. Chorin's projection method, to solving the Navier-Stokes equations on a rectangular domain, but I'd I'd like to know more about what methodologies exist to extend these techniques to more sophisticated geometries.

To clarify my intent, one particularly notable example of what I'm looking for would be Peskin's Immersed Boundary Method.

See below for a more precise statement of the particular problem I'm interested in.

Consider solving the incompressible Navier-Stokes equations \begin{align*} \rho\left(\mathbf{u}_t + (\mathbf{u}\cdot\nabla)\mathbf{u}\right) &= - \nabla p + \mu\Delta\mathbf{u} + \mathbf{f}\\ \nabla\cdot\mathbf{u} &= 0 \end{align*} with $$\mathbf{f} = (f_0,0,0)$$ on the domain $\Omega = [-1,1]^d \setminus C$ where $$C = \left\{\mathbf{x} \in [-1,1]^d : |\mathbf{x}| < \frac{1}{2}\right\}.$$ The boundary conditions are no-slip (i.e., $\mathbf{u} = 0$) except at $\{x=-1\}$ and $\{x=1\}$, where we enforce a periodic boundary condition. In other words, this is periodic Poiseuille flow around a cylinder.

The challenge here lies entirely in enforcing the no-slip condition on $\partial C$, the boundary of the cylinder. A naive -- and inaccurate -- approach is to simply set $\mathbf{u} = 0$ at grid points inside the cylinder every time step. The Immersed Boundary Method is another option. Simply put, what other techniques are out there?

• Hi,As cylinder body and flow pattern are symmetric, you can take half of the domain into account, to avoid extra calculations. I hope this paper will help you to solve your problem. All the best! – Shainath May 17 '13 at 5:16
• I wouldn't treat only the half of the domain if you're trying to reproduce the von Karman vortex street in the wake of the cylinder. It's impossible to do so if you impose symmetry. – Bill Barth May 17 '13 at 12:18
• There are also discrete IBM methods compared to original continuous Peskin's approach. I would refer you to 10.1146/annurev.fluid.37.061903.175743 for review of IBM methods. – Jan Blechta May 17 '13 at 19:55
• @BillBarth Sir,What you are saying is very true, but I was talking about steady flow. Full domain is must for unsteady flow over the cylinder. – Shainath May 18 '13 at 5:54
• @Shainath I should have been more clear in the original question, but I'm interested resolving the transitory start-up flow that results from starting with $u = 0$, so treating half the domain isn't appropriate here, as noted by Bill. – Ben May 21 '13 at 4:49

## 4 Answers

Is there a reason why you don't want to implement your FDM solver in generalized coordinates? Even if you use the IBM, is still a good idea to have the N-S equations in a generalized coordinate system. Let us say you have a 'S-shaped' geometry, Wouldn't it be better (in terms of grid size) just to make your domain as two curves instead of a box? Documentation on generalized coordinates can be found on the paper of Steger, J.L. (1978) AIAA J. 16, 679-686

In the past semester, I was busy writing some CFD code for a simulation I needed for an engineering project. I stumbled upon a few methods that can handle complex geometry and still maintain decent simplicity, such as Finite Difference Approximations. You should look for the following:

• Generalized Finite Difference (also look into Least-Squares approaches within this)
• Radial basis functions for solution interpolation

In the title you ask about solving flow past a cylinder on a cartesian grid, but then in the question you talk about what seem to be unstructured grids. If you want to do finite differences on unstructured grids you should take a look at Discrete Exterior Calculus, there is a Python library called PyDEC that may be of use to you.

I'm coming a long time after the OP asked the question, but I think a general answer is still missing.

If your code allows you to interact with the linear problem you obtain, the simplest is that you remove the lines and columns corresponding to the nodes in the cylinder. You then solve on the unknown part of the velocity only, and you need to rearrange the output into the numbering of the cartesian grid. This is what is done e.g. in the FEM software rheolef to impose Dirichlet boundary conditions, see http://www-ljk.imag.fr/membres/Pierre.Saramito/rheolef/ (first example of the manual), it works also for FDM. But your linear solver has to be not too specialized of course.

Another way is to have a Lagrange multiplier for each node in the cylinder: your constraint is $v_{i,j,k} = 0$ for $x_{i,j,k} \in C$, so you just add lines and columns of 0's with a $1$ at the relevant position for ${i,j,k}$ (e.g. $k*NY*(j*NX+i)$) to the original problem. If your solver cannot solve this new full problem, you can use Uzawa algorithm to solve by iterations of the initial problem and updates of the Lagrange multipliers. See Fortin and Glowinski 1983, Augmented Lagrangian methods