Reduction of pressure loss in ventilation systems can be achieved by changing the shape of the airflow region and smoothing the boundary surfaces. The installation of special profiling components inside a straight shaped part of ventilation duct is the simplest way to reduce the coefficient of local resistance and pressure loss. For the best result under given conditions, the shape optimization problem must be formulated and solved. In this paper, we use the open source code software and numerical methods to study the optimal-shaped drag reduction components in elbow ventilation ducts. Computational Fluid Dynamics is used to predict the flow fields and the drag reduction effect. After the validation of flow model against existing experimental results, a detailed study has been conducted to shape optimization of removable profiled components. The optimization problem is parameterized by a small number of structural variables, which are the coordinates of the control points of the splines that form the contours of the flow region. Total pressure loss coefficient is selected as the objective function for optimization. A genetic algorithm is used as an optimization method. The results reveal that the removable profiled drag reduction component can reduce the resistance in ducts by 60%-80%.