Considering the latest improvement of international simulation technology, this paper studies the advanced simulation technology for nuclear reactor thermal-hydraulic system based on Modelica. The model architecture of thermal-hydraulic characteristics of the two-phase flow is established The layering architecture figure is constructed based on the basic control equations model and system model, and validated by the simulation of thermal-hydraulic characteristics of the two-phase flow in the pipe based on Modelica, to demonstrate its feasibility. The study shows that the hierarchical modeling technology based on Modelica can easily extract the generality and base class as basic models in the thermal-hydraulic characteristics of two phase flow of the nuclear system. By using multi-stage inheritance method, the Modelica model for specific object can be constructed by parameter configuration and association combination of basic level models, and the component model or system model can be formed by combination encapsulation or drag and drop modeling. The simulation result of the thermal-hydraulic characteristics of the two phase flow in the pipe by Modelica agrees with that by Relap5. The Modelica modeling approach is standard, efficient and flexible, which is suitable for the collaborative simulation of complex physical systems