The paper presents an algorithm to reconstruct the component composition of the mixture based on the results of production modeling in the black oil format and a fixed set of tables with the results of phase equilibrium calculations in a given pressure range. The approach is based on analyzing the ratio of flow rates for each phase and the ratio between average reservoir pressure and saturation pressure. The algorithm takes into account the possibility of oil degassing when saturation pressure decreases, as well as gas breakthrough of gas caps to the bottoms of producing wells.Implementation of the method is based on a unified thermodynamic model of multilayer reservoir, built on the principles of a single set of HC mixture components and uniform parameters of the equation of state on a set of fluid samples for all modeling stages: reservoir model, model of the gathering system and site facilities. In addition to steady-state flow calculations performed together with reservoir modeling, the unified model is planned to be used for dynamic flow calculations in the corresponding simulator (well start/stop), which will allow solving production problems in the process of operation of wells with complex completions.The conversion algorithm is automated using modern high-level tools: Python and data automation components from MS Excel, which eliminates the need for manual data input at all stages and makes it possible to obtain the estimated component composition of produced fluid for any set of wells and for any time step within the forecasting horizon.The obtained compositions are used to verify the reproduction of the main controlled parameters (oil density and gas oil ratio) and can be used for subsequent calculations of fluid transportation and treatment systems.The implemented algorithm has been tested for stability at different ratios of gas and oil flow rates by wells and meets the practical requirements of engineering calculations — the error of oil density is not higher than 2 % and gas factor is not higher than 10 %.