In this study, we develop a compressible fluid analysis program that enables fully automatic generation of computational grids using Hierarchical Cartesian grids and immersed boundary methods. However, these methods are associated with low analysis accuracy, oscillations observed in the surface distribution, and violations of conservation laws near an object. This is because the object geometry is represented using a specific algorithm within the flow solver. We demonstrate that the proposed method is sufficiently accurate by comparing its results with those obtained via the conventional analysis method using body fitted grids. We also explain why the surface physical quantity distribution oscillates when the grid resolution is relatively low. In addition, we have clarified why conserved quantities in the vicinity of the object are not conserved and proposed a method to resolve this problem. Herein, we show that mass conservation is strictly followed by the proposed method.