Porosity is an important parameter to reflect the internal structure of the heap, and it is related to the permeability of a packed bed. Thus, understanding and further adjusting the porosity distribution will help to control the gas-solid reaction in a chemical reactor. In this work, sandpiles formed by ternary size particles with variable mass ratio were researched by discrete element method. The porosity increases with the increase of the mass fraction of small particles. Different dump methods (Drop Test and Chute Test) both cause four distinct porosity regions (Zone A, B, C and D), but the locations are not the same. Changing the drop height in Drop Test and chute properties in Chute Test both have influence on the porosity zone, especially for the upper porosity. Furthermore, size segregation will lead to uneven porosity distribution, but there is no evident relationship between porosity and size segregation in sandpile.