This paper presents a DEM study of cake formation and growth in sedimentation and filtration processes with constant flow rate or pressure. The liquid flow is assumed to be one-dimensional and the motion of particles is three-dimensional. Various forces are included to determine the motion of particles, including the particle-particle contact forces, the van der Waals force and the particle-fluid interactions such as buoyancy, drag and lift forces. The effects of the material properties of particles and liquid and the operational conditions are examined. The structures of cakes are also analysed and the relationship between cake porosity and interparticle force is quantified. The microscopic analysis demonstrates that these variables affect the process and the cake structures through their effects on the gravity or cohesive force, which competes in controlling the formation of a cake.