After millions of years of evolution, fishes have been endowed with agile swimming ability to accomplish various behaviourally relevant tasks. In comparison, robotic fish are still quite poor swimmers. One of the unique challenges facing robotic fish is the difficulty in tuning the motion control parameters on the robot directly. This is mainly due to the complex fluid environment robotic fish need to contend with and endurance limitations (i.e. battery capacity limitations). To overcome these limitations, we propose a computational fluid dynamics (CFD) simulation platform to first tune the motion control parameters for the computational robotic fish and then refine the parameters by experiments on robotic fish. Within the simulation platform, the body morphology and gait control of the computational robotic fish are designed according to a robotic fish. The gait control is implemented by a central pattern generator (CPG); The CFD model is solved by using a hydrodynamic-kinematics strong-coupling method. We tested our simulation platform with three basic tasks under active disturbance rejection control (ADRC) and try-and-error-based parameter tuning. Trajectory comparisons between the computational robotic fish and robotic fish verify the effectiveness of our simulation platform. Moreover, power costs and swimming efficiency under the motion control are also analyzed based on the outputs from the simulation platform. Our results indicate that the CFD based simulation platform is powerful and robust, and shed new light on the efficient design and parameter optimization of the motion control of robotic fish.