I have 300x300 gridded field with thickness values of a rock layer, and the field has a spatial resolution of dx = 25m and dy = 25m. In a next time step, the the thickness changes to the addition of a "inrock" value in the scheme. I calculate the weight of the rock layer in kg after 20 time steps. How can I express this in a mathematical expression involving integrals (rho = rock density)?
new_mass_rock(x,y) = 0
total_mass_rock(x,y) = 0
for time = 1:20
new_mass_rock(x,y) = rho_rock*(deltax*deltay*(inrock(x,y)));
total_mass_rock(x,y) = total_mass_rock(x,y) + new_mass_rock(x,y);
end