The traditional installation position of safety valve of electric desalter in CDU/VDU usually cannot meet the requirements of safe discharge.The optimized installation position is the platform or framework close to flash tower or the flash section of primary tower.Under accident conditions,the medium discharged from safety valve is directly sent to the flash tower or primary tower,so that the gravity flow discharge from the outlet piping of safety valve will not be affected by the pocket in pipe or the low position of the safety valve itself.Due to the long distance between the safety valve and the electric desalter,the requirement in API 520 that the pressure drop in the inlet piping of safety valve shall be less than 3%of the set pressure of safety valve cannot be met.Therefore,the set pressure of safety valve cannot be directly equivalent to the design pressure of electric desalter under this condition,and the static pressure difference and flow resistance drop between the outlet of electric desalter and the inlet of safety valve need to be deducted.This article uses the Safety Analysis module of Aspen Plus to input the key information such as the number and specification of valves,pipe sections and pipe fittings between the outlet of electric desalter and the inlet of safety valve combined with 3D model,so as to accurately simulate the flow resistance drop and calculate the static pressure difference between the outlet of desalter and the inlet of safety valve,providing a theoretical basis for determining the set pressure of safety valve.