SusiePHaltmann commited on
Commit
33a3dac
·
1 Parent(s): 9b44ae3

Request to upload 5.31.22

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -11,9 +11,12 @@ N = st.slider("Number of particles", 1, L**2/2, 10) #number of particles -> can
11
 
12
  #initialize the system: create a list of 'particle' objects, each with random position and velocity vectors:
13
 
14
- particles = [Particle(np.random.randint(0, L), np.random.randint(0, L), np.random.uniform(-1., 1.), np.random.uniform(-1., 1.)) for i in range(N)]
15
-
16
- #set up the plot:
17
 
18
- fig = plt.figure() #create a figure object
19
- ax = fig
 
 
 
 
 
11
 
12
  #initialize the system: create a list of 'particle' objects, each with random position and velocity vectors:
13
 
14
+ import streamlit as st
15
+ import numpy as np
 
16
 
17
+ L = 10 #lattice size
18
+ N = st.slider("Number of particles", 1, L**2/2, 10) #number of particles
19
+ st.write("Particle configuration:")
20
+ particles = np.random.randint(0, L, (N, 2)) #particle positions
21
+ st.write(particles)
22
+ st.title("Haltmannn Diffusion [C] 20XX")