@author: jakem """ from swellpy import Monodisperse import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # initialize the parameters in the class of methods (N,B,seed) # The code in the monodisperse module lays out how each method works N = 1000 #number of particles B = 40 #box side length seed = 125 #inital particle placement randomization m = Monodisperse(N, B, seed) #Define: important variables that you need. Natasha goes over these in her paper. area_frac = 0.7 # area fraction swell = m.equiv_swell(area_frac) kick = .035 swell = m.equiv_swell(area_frac) cycle_number = 5 #This is the number of shears that you do to your system. pairs = m._tag(swell) theta = m.find_angle2(pairs) # rounded_theta = [ '%.1f' % elem for elem in theta ] #print(rounded_theta) x = pd.Series(theta, name="Theta") sns.set_style('darkgrid')
# -*- coding: utf-8 -*- """ Created on Wed Jun 24 13:15:21 2020 @author: jakem """ from swellpy import Monodisperse import numpy as np # initialize the parameters in the class of methods (N,B,seed) # The code in the monodisperse module lays out how each method works N = 1000 #number of particles B = 40 #box side length seed = 125 #inital particle placement randomization m = Monodisperse(N, B, seed) #Define: important variables that you need. Natasha goes over these in her paper. area_frac = 0.7 # area fraction swell = m.equiv_swell(area_frac) kick = 1 swell = m.equiv_swell(area_frac) cycle_number = 50 #This is the number of shears that you do to your system. # Transform 'Box' in one direction # Tag particles that would interact # Transform 'Box' back to original magnitude(starting scale) # Apply kicks to particles that are tagged # Question: Is a particle tagged multiple times in varying directions if tagged # by multiple particles in varying directions? m.particle_plot(area_frac,
Created on Thu Jun 25 13:10:41 2020 @author: jakem """ from swellpy import Monodisperse import numpy as np ''' Normal Training Cycle: No transformations applied. ''' # initialize the parameters in the class of methods (N,B,seed) # The code in the monodisperse module lays out how each method works N = 1000 #number of particles B = 40 #box side length seed = 125 #inital particle placement randomization m = Monodisperse(N, B, seed) #Define: important variables that you need. Natasha goes over these in her paper. area_frac = 0.7 # area fraction swell = m.equiv_swell(area_frac) kick = .035 swell = m.equiv_swell(area_frac) cycle_number = 500 #This is the number of shears that you do to your system. m.particle_plot(area_frac, show=True, extend=True, figsize=(7, 7), filename=None) m.train(area_frac, kick, cycle_number, noise=0) m.particle_plot(area_frac,
""" Created on Tue May 19 11:53:30 2020 @author: jkwak """ from swellpy import Monodisperse import numpy as np #import matplotlib.pyplot as plt #from matplotlib.patches import Ellipse #initialize the parameters in the class of methods (N,B,seed) # The code in the monoddisperse module lays out how each method works N = 1000 #number of particles B = 40 #box side length m = Monodisperse(N, B, 125) #np.size ndim=1 #define important variables that you need. Natasha goes over these in her paper. area_frac = 0.7 # area fraction swell = m.equiv_swell(area_frac) kick = 0.05 #gives the initial plot of a particle system m.particle_plot(area_frac, show=True, extend=True, figsize=(7, 7), filename=None)
# -*- coding: utf-8 -*- """ Created on Tue Jun 30 11:14:14 2020 @author: jakem """ from swellpy import Monodisperse import numpy as np # initialize the parameters in the class of methods (N,B,seed) # The code in the monodisperse module lays out how each method works N = 1000 #number of particles B = 40 #box side length seed = 125 #inital particle placement randomization m = Monodisperse(N, B, seed) #Define: important variables that you need. Natasha goes over these in her paper. area_frac = 0.5 # area fraction swell = m.equiv_swell(area_frac) kick = .035 swell = m.equiv_swell(area_frac) cycle_number = 1 #This is the number of shears that you do to your system. # Actual Area Fraction: .78125 # Transform 'Box' in one direction # Tag particles that would interact # Transform 'Box' back to original magnitude(starting scale) # Apply kicks to particles that are tagged #m.particle_plot(area_frac, show=True, extend = True, figsize = (7,7), filename=None)
for i in self.centers: [i[0], i[1]] = np.dot(r, [i[0], i[1]]) # def gen_scale(self, scale, theta): # for i in self.centers: # Transform # i[0] = i[0]*(1-(scale*np.cos(theta*np.pi/180))) # for i in self.centers: # i[1] = i[1]*(1-(scale*np.sin(theta*np.pi/180))) # initialize the parameters in the class of methods (N,B,seed) # The code in the monodisperse module lays out how each method works N = 1000 #number of particles B = 40 #box side length seed = 125 #inital particle placement randomization m = Monodisperse(N, B, seed) #Define: important variables that you need. Natasha goes over these in her paper. area_frac = 0.7 # area fraction swell = m.equiv_swell(area_frac) kick = .035 swell = m.equiv_swell(area_frac) cycle_number = 1 #This is the number of shears that you do to your system. m.particle_plot(area_frac, show=True, extend=True, figsize=(7, 7), filename=None) rot_xform(m, 45, .8)