Osmotic Pressure Simulation

Dear all,

I want to calculate osmotic pressure by using below model. But I have no idea how to do it and it seems will take a long time calculating...
Could anyone give me some advising? Thank you so much.

User-added image