The filling of channels in porous media with particles of a material can be interpreted in a first approximation as a packing of spheres in cylindrical recipients. Numerous studies on micro- and nanoscopic scales show that they are, as a rule, not ideal cylinders. In this paper, the channels, which have an irregular shape and a circular cross-section, as well as the packing algorithms are investigated. Five patterns of channel shapes are detected to represent any irregular porous structures. A novel heuristic packing algorithm for monosized spheres and different irregularities is proposed. It begins with an initial configuration based on an fcc unit cell and the subsequent densification of the obtained structure by shaking and gravity procedures. A verification of the algorithm was carried out for nine sinusoidal axisymmetric channels with different Dmin/Dmax ratio by MATLAB® simulations, reaching a packing fraction of at least 0.67 (for sphere diameters of 5%Dmin or less), superior to a random close packing density. The maximum packing fraction was 73.01% for a channel with a ratio of Dmin/Dmax = 0.1 and a sphere size of 5%Dmin. For sphere diameters of 50%Dmin or larger, it was possible to increase the packing factor after applying shaking and gravity movements.