In current particle-in-cell (PIC) simulation software, the most important parts are several key technologies. In this paper,
we discuss some technologies based on Yee-grid model and time-leapfrog model. Firstly, we induce 3-D electromagnetic
discrete algorithm formulae, which include the centered-difference algorithm formulae, time-biased algorithm formulae
and high-Q algorithm formulae. The application range of these electromagnetic discrete algorithms is also analyzed.
Secondly, we discuss the phenomenological description technology used in emission simulations and induce the
formulae which represent how to set the charge of macro particles in explosive emission. The charge-conserving
algorithm used to calculate current which is produced by the particle moving and the weight algorithm used to calculate
Lorentz force are also discussed. Thirdly, the ways to realize the common boundary conditions including the ideal
conductor, port boundary, absorption boundaries and metal strut are discussed. The way to calculate the absorption
coefficient of the absorption boundary is described in detail. The formulae of the metal strut's current and inductance
under two-dimensional and three-dimensional coordinates in different orientation in space are induced and realized using finite-difference time-domain (FDTD) method. Then, the iterative process under main FDTD iteration of metal strut is given. At last, the correctness of these technologies is proved by computer simulation on the Vavilov-Cherenkov radiation (VCR) in 2-D photonic crystal. The results show that the THz radiation is excited by electron bunches in photonic crystal.