A transient thermal–hydraulic code THCSA is developed to analyze the primary coolant system for pool-type sodium cooled fast reactor which includes reactor core, intermediate heat exchangers, pumps etc. The mathematical models of various components of the primary sodium circuit, numerical method, and assistant models for sodium flow and heat transfer are provided in detail. Several typical design basis accidents of CEFR such as protected LOFA, LOHS, and RIA etc, are analyzed. The key parameters such as reactor power, mass flow rate and sodium temperature etc agree well with those of the final safety analysis report calculated by DINROS. The results show that it has a benign response to transient conditions, which proves the effectiveness of the models and numerical method developed in the present work. THCSA could be used in the system safety analysis of pool-type sodium cooled fast reactor and adopted in the development of CEFR digital simulator.