Abstract
A code is developed to simulate a viscous flow field around a deformable body using the hybrid Cartesian/immersed boundary method. In this method, the immersed boundary(IB) nodes are defined near the body boundary then velocities at the IB nodes are reconstructed based on the interpolation along the normal direction to the body surface. A new method is suggested to define the IB nodes so that a closed fluid domain is guaranteed by a set of IB nodes and the method is applicable to a zero-thickness body such as a sail. To validate the developed code, the vorticity fields are compared with other recent calculations where a cylinder orbits and moves into its own wake. It is shown the code can handle a sharp trailing edge at Reynolds number of $10^5$ under moderate requirements on girds. Finally the developed code is applied to simulate the vortex shedding behind a deforming foil with flapping tail like a fish. It is shown that the acceleration of fluids near the flapping tail contributes to the generation of the thrust for propulsion.