Skip to content

Commit

Permalink
Modified silo_open app
Browse files Browse the repository at this point in the history
  • Loading branch information
jviquerat committed Aug 30, 2023
1 parent 956d444 commit e076bf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dem/app/silo_open.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class silo_open(base_app):
### Constructor
def __init__(self,
name = 'silo_open',
t_max = 3.5,
t_max = 5.0,
dt = 2.5e-5,
angle = 0.0,
plot_freq = 500,
Expand All @@ -34,9 +34,10 @@ def __init__(self,
self.plot_it = 0

self.rmv_freq = 100 # check particles removal every 10 iterations
self.add_freq = 8000 # add new particles every 10 iterations
self.add_freq = 10000 # add new particles every 10 iterations

self.radius = 0.025
self.radii = np.array([0.025, 0.075])

self.p = particles(np = 0,
nt = self.nt,
Expand Down Expand Up @@ -112,9 +113,10 @@ def forces(self):

# Add new particles at the top
if (self.it%self.add_freq == 0):
n = 30
n = 10
m = np.ones((n))*self.p.mass
r = np.ones((n))*self.p.radius
r = self.radii[np.random.randint(0,len(self.radii),size=n)]
x = np.zeros((n,2))
c = self.colors[np.random.randint(0,len(self.colors),size=n)]

Expand Down
Binary file modified dem/save/silo_open.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e076bf3

Please sign in to comment.