The pressure cabin is an indispensable part of the underwater system. It needs to bear both internal equipment and external pressure,and its strength is very important. When the stiffeners of the cabin body are not ring ribs,the design of the stiffeners can only be completed by the designer's experience,and then the simulation verification is carried out,which greatly increases the research and development cost. In this paper,the variable density topology optimization method based on SIMP interpolation is used to solve the force transmission path of the pressure cabin under external pressure,and based on this,the arrangement of stiffeners on the bulkhead is optimized. By calculation,the maximum stress of the optimized cabin model is reduced to the allowable range of materials,and the deformation is greatly reduced,indicating that the topology optimization method has a certain guiding significance in the design of stiffeners.