SESRI 300 MeV synchrotron in Harbin Institute of Technology is now under construction and the whole equipment has been installed and tested. Before commissioning beam, the beam transport through the injection line is simulated by using a full-scall model through the Tracewin code. The field distribution of RFQ cavity is calculated with CST, and the results are substituted into the Tracewin code to generate the accurate results. The envelop mode and multi-particles mode are used in the beam simulation with two typical beams (H
${}_2^+ $
and
209Bi
32+, the lightest beam and the heaviest beam). Both beams are accelerated from 4 keV/u to 2 MeV/u by an RFQ cavity and two IH-DTL cavities. Then the H
${}_2^+ $
beam is stripped into a proton beam by a carbon foil and accelerated to 5.6 MeV with the third IH-DTL cavity. Simulation results show that the strength of the magnetic field and the acceleration field are proportional to the mass charge ratio. The beam transmission efficiency and the injection line reception are inversely proportional to the beam transverse emittance. The
209Bi
32+beam transmission efficiency and beam reception (momentum spread less than ±0.2%) are 72.16% and 46.72% with transverse emittance
ε= 0.12π mm·mrad (ECR source output) and
ε= 0.4π mm·mrad (RFQ output). H
${}_2^+ $
beam transmission ratio and beam reception are 24.19% and 17.89% with
ε= 0.2π mm·mrad (ECR source output) and
ε= 0.5π mm·mrad (RFQ output). In order to obtain high transmission efficiency and beam reception, the transverse emittance should be limited to 0.1π mm·mrad after the RFQ. With this limitation, the
209Bi
32+beam transmission efficiency and the reception are increased to 96.68% and 92.63%, respectively, and the H
${}_2^+ $
beam transmission efficiency and the rception rise to 74.40% and 68.18%, respectively. If two additional quadrupole magnets are added, the H
${}_2^+ $
beam transmission efficiency and beam reception can be increased to 90.73% and 83.61%, respectively, which will fulfill the requirement for long-time operation. The phase space change process shows that loss of
209Bi
32+beam is caused mainly by longitudinal defocusing (energy spread and phase width spread), the loss of proton beam is caused both by the longitudinal defocusing and by the transverse defocusing (beam envelop spreading), that is why two additional focusing magnets should be added in proton beam acceleration. Results also show that by using field distribution calculation in the simulation process the greater influence of the cavity design details can be confirmed such as beam off-axis caused by dipole field in the IH-DTL cavity and beam loss caused by unperfect field in the RFQ. Tracking with field distribution is shown to be a useful method to link the cavity design process, beam line design process, and beam commission process.