In this study, a grain-scale modelling technique has been developed to generate the capillary pressure–saturation curves for swelling granular materials. This model employs only basic granular properties such as particles size distribution, porosity, and the amount of absorbed water for swelling materials. Using this model, both drainage and imbibition curves are directly obtained by pore-scale simulations of fluid invasion. This allows us to produce capillary pressure–saturation curves for a large number of different packings of granular materials with varying porosity and/or amount of absorbed water. The algorithm is based on combining the Discrete Element Method for generating different particle packings with a pore-unit assembly approach. The pore space is extracted using a regular triangulation, with the centres of four neighbouring particles forming a tetrahedron. The pore space within each tetrahedron is referred to as a pore unit. Thus, the pore space of a particle packing is represented by an assembly of pore units for which we construct drainage and imbibition capillary pressure–saturation curves. A case study on Hostun sand is conducted to test the model against experimental data from literature and to investigate the required minimum number of particles to have a Representative Elementary Volume. Then, the capillary pressure–saturation curves are constructed for Absorbent Gelling Material particles, for different combinations of porosity values and amounts of absorbed water. Each combination yields a different configuration of pore units, and thus distinctly different capillary pressure–saturation curves. All these curves are shown to collapse into one curve for drainage and one curve for imbibition when we normalize capillary pressure and saturation values. We have developed a formula for the Van Genuchten parameter alpha (which is related to the inverse of the entry pressure) as a function of porosity and the amount of absorbed water.