Force on surface with quantification

I would like to calculate the force on the black surface (cut view) where the black volume (undeformable) is put on pressure with a lot of red ball undeformable. The pressure is give for example with a weight. Like in the slope we can put 5 balls and only 1.5 balls in vertical side I think the pressure give a force to the right. Is there a method for calculate the force ?

Change red balls for atoms (atoms of gas for example). Even a surface like I draw it's not possible to build. The temperature move atoms everywhere and like that the black volume can move (it's not block by mechanic balls). The vertical line can only put 1.5 contact (even it's statistical), this compensate the other force ? The quantification don't interact here ?

with mechanicals balls the black volume is blocking, it can't move even a force exist. With gas and temperature, the volume can move (can, I don't say it move). Is a force exist when the slope can accept 5 atoms and other side 1.5 atoms ? I would like to calculate this force but maybe someone has already do that ?