Inviscid and Reynolds-averaged Navier-Stokes (RANS) simulations of transonic flows around the NASA Common Research Model are conducted using the Cartesian flow solver UTCart. The immersed boundary method is used to represent the smooth geometry surfaces on the Cartesian grids. The wall function is combined with the immersed boundary method to reproduce the turbulent boundary layer on the geometry surface in the RANS simulations. In the inviscid calculations, the qualitative flow feature including the position on the shock-wave on the wing shows agreement with the reference result a body-fitted grid. In the RANS calculations, the trend of pitching moment and drag shows fair agreement with the reference result, while prediction of the flow separation at high angle of attack is still difficult. Compared with the reference result, the differences in the total drag coefficient at a moderate angle of attack on the medium grid (33 million cells) and the fine grid (99 million cells) are 31 drag counts (10%) and 20 drag counts (6.5%), respectively. Furthermore, each of the calculated aerodynamic coefficients shows a consistent trend of grid convergence toward the reference result.