The system thermal-hydraulic code SPACE adopts a multidimensional two-fluid, three-field model to simulate two-phase-flow phenomena encountered during various anticipated transients and postulated accidents of pressurized water reactors. The applicable mesh systems include structured/staggered and unstructured/collocated ones. The staggered mesh system is based on the orthogonal hexahedral shape of cells and their surrounding faces, but it is generalized to describe not only multidimensional Cartesian meshes but also cylindrical meshes and one-dimensional pipe flow networks. The unstructured/collocated mesh system is used to represent more complex geometry using hexahedron, tetrahedron, pyramid, or prism shapes of cells. The structured/staggered mesh system hydraulic solver and the unstructured/collocated mesh system hydraulic solver are merged into a unified version of SPACE so that those hydraulic solvers can analyze simultaneously a complicated system comprising several structured and unstructured mesh blocks. In this paper, the governing equations, mesh systems, and numerical formulations for SPACE are introduced, and the application results are presented for several conceptual problems including the connection of heterogeneous mesh blocks.