The effect of thermal-fluid properties are considered in the numerical simulation of the tool shape for a given workpiece shape in electrochemical machining. An embedding method is used for this inverse problem. A bubbly two-phase, one-dimensional flow model and a one-phase, two-dimensional flow model are applied to predict the fluid field of the electrolyte, respectively. Results show that the void fraction is the most important factor in determining the electrolyte conductivity and the shape of the workpiece. The proper machining conditions and numerical parameters are important to obtain a good solution. The relative error can be reduced under 0.002.