During the past few years, there has been an increasing effort to understand the behavior of nuclear power plants (NPPs) in normal and abnormal situations. To achieve this goal, large computer codes that allow the description of two-phase flows with sources and sinks of mass and heat have been built in many countries. The analysis of NPP situations often requires a large computation time, so efficient calculational methods are needed to minimize the cost of these studies. Thermal-hydraulic models and calculational methods used in the codes are reviewed. Computational methods and solution procedures involved in some European operating and safety codes are described. Developments concerning code optimization and adaptation of numerical methods to the new supercomputer architectures are discussed.