That's really cool. I know nothing about coding so I can't help you. I'm just wondering if you've compared your result with the known exact result via the image charge method. It would be cool to see the quality of this lattice method.
I'm assuming you know what to do without the absorbing wall (i.e. how to derive the appropriate diffusion equation and show that the solution is Gaussian of some particular width in the continuum limit etc. etc. etc.) The diffusion equation is linear and has a unique solution given complete and...
Almost a year later
Isothermal: d(PV)=PdV+VdP= NRdT= 0 since dT= 0. Thus, -dV/V= dP/P and plugging this into the definition of the bulk modulus B=dp/(-dV/V)= P.
Adiabatic: d(PV^x)= xPV^(x-1) dV+ V^x dP= 0 since PV^x is constant. Thus, -dV/V= dP/xP and plugging this in as above gives B= xP.