Steam generator (SG) is one of the major components in nuclear power plants, thus, it is crucial to analyze its thermal-hydraulic characteristics for the economical and safe operation. Various analytical codes have formulated for the research of the secondary side of SG. However, due to its complex geometry, the previous analytical codes have certain limitations in accurately predicting the thermal-hydraulic characteristics at secondary side. In this paper, a specialized code named THAC-SG (Thermal-hydraulic Analysis Code-Steam Generator) has been developed after summarizing main feature of widely-used steam generator three-dimensional thermal-hydraulics calculation codes. The finite volume method is used for the computation of two-phase flow and natural circulation at secondary side, and the complex structure was simulated by porous-media model. This paper takes the SG of Guangdong Daya Bay Nuclear Power Station (GNPS) as the verification model. The code can simulate the dynamically varying void fraction, pressure and temperature in the secondary side. The accuracy and reliability of this code has been validated and can be used for thermal-hydraulic analysis of steam generator under various operating conditions. (C) 2017 Elsevier Ltd. All rights reserved.