This article introduces a new method of combining closed and semi-open spaces in a mid-rise office building. This method presented in the paper aims to improve energy efficiency and thermal comfort and emphasize the use of open spaces on all floors and in different directions. Usually, open spaces in buildings such as courtyards, balconies, atriums, and sky_court, despite their positive performance, have limitations in terms of geometry, location, enclosure, and connection with the building. However, this approach has tried to solve these limitations using a modular network in the plan production process. This approach allows the creation of open spaces with various geometries and areas on the floors. This study pays attention to the presence of semi-open space in mid-rise buildings and the creation of porosity in the volume, which reduces energy consumption and increases the comfort of employees. This article introduces an innovative approach to utilizing semi-open space on the floors of office buildings. This approach, by allocating a part of the area of each floor to semi-open space with two different parameters, i.e., “semi-open space with the most connection with the façade” and “semi-open space with the least connection with the facade,” is a framework for the design and optimal placement of the semi-open space in It offers office buildings. This research tries to generate all possible situations to achieve 40 % of open space in the building. By dividing the plan into 5 × 5 modules in the presented simulation model, 320 modules are available, and to convert 40 % of the building into semi-open space, 128 modules should be allocated for this purpose. The models simulated by Ladybug and Honeybee plugins show that in the volumes where the semi-open spaces in the building have a combination of the maximum connection with the facade and minimum connection with the facade, they perform better in energy consumption and thermal comfort. The research results show that a volume comprising closed and semi-open spaces with a suitable porosity ratio can perform best. In other words, the change in volume porosity significantly affects energy consumption and thermal comfort.