You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all,
I am using the function pseudo gravity to simulate a box filled with spheres. I have noticed that by changing the clearance but using the same number of spheres, I get different integral densities (i.e. sum up among the gravity axis). This should not be true since the integral density should be independent of the clearance (and only depend on the number of particles) ... Do you have any idea why this is the case?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I am using the function pseudo gravity to simulate a box filled with spheres. I have noticed that by changing the clearance but using the same number of spheres, I get different integral densities (i.e. sum up among the gravity axis). This should not be true since the integral density should be independent of the clearance (and only depend on the number of particles) ... Do you have any idea why this is the case?
Code
box_shape = [150, 340, 390]
image = np.ones(box_shape, dtype=bool)
Call the function with different clearances
result1 = ps.generators.pseudo_gravity_packing(im=image, r=r_copper, clearance=0, axis=0, maxiter=2146)
result2 = ps.generators.pseudo_gravity_packing(im=image, r=r_copper, clearance=-2, axis=0, maxiter=2146)
result3 = ps.generators.pseudo_gravity_packing(im=image, r=r_copper, clearance=2, axis=0, maxiter=2146)
Sum along the gravity axis (axis=0)
density1 = np.sum(result1, axis=(1, 2))
density2 = np.sum(result2, axis=(1, 2))
density3 = np.sum(result3, axis=(1, 2))
Plot the densities
plt.plot(density1, label='Clearance = 0')
plt.plot(density2, label='Clearance = -2')
plt.plot(density3, label='Clearance = +2')
plt.xlabel('Position along gravity axis')
plt.ylabel('Integral Density')
plt.legend()
plt.show()
Beta Was this translation helpful? Give feedback.
All reactions