With the rapid development of cities, the overhead cables commonly used in urban transmission and distribution projects have been gradually replaced by underground cable channels due to their vulnerability to natural disasters and unfavorable urban aesthetics. In recent years, along with the development trend of digitalization and intelligence, the digital twin system has been introduced for the operation of underground cable channels. The digital twin platform requires the monitoring of cable channels in service as well as the numerical simulation of conditions such as ground loading and proximity to construction to evaluate structural safety. This is where modeling of different structural forms under different operating conditions becomes a very important research element. In this study, a parametric modeling approach is used to automatically generate the finite element model and the mesh of the model based on Python, and then Flac3D is automatically invoked to compute and post-process the finite element model. At the end of this paper, the stress-strain state of the structure is simulated in the case of a shallow buried cable channel under ground stacking conditions. The research results can provide some reference for similar projects in the future.