Пример #1
0
def main():
	n, iterations = 300, 1000
	params = {'rate': 0.01, 's': 0.5}
	folder = 'data/run tumble n={} iter={}'.format(n, iterations)
	boundary = hardboundary.Circle(10.0)
	data = particlesim.simulate(iterations, n, moveParticles, folder, boundary, params)
	particlesim.motionAnimation(data, 100, boundary)
Пример #2
0
def main():
    n, iterations = 50, 3000
    params = {'rate': 0.1, 's': 0.25, 'sNoise': 0.02, 'm': 0.1, 'gamma': 0.05}
    folder = 'data/run tumble n={} iter={}'.format(n, iterations)
    boundary = hardboundary.Circle(10.0)
    data = particlesim.simulate(iterations, n, moveParticles, folder, boundary,
                                params)
    particlesim.motionAnimation(data, 20, boundary)
Пример #3
0
def main():
    params = {'m': 0.1, 'gamma': 0.02, 's': 0.35}
    n, iterations = 300, 1000
    folder = 'data/langevin n={} iter={}'.format(n, iterations)
    boundary = hardboundary.Circle(10.0)
    data = particlesim.simulate(iterations, n, moveParticles, folder, boundary,
                                params)
    # averageSpeed(data)
    particlesim.motionAnimation(data, 100, boundary)
Пример #4
0
def main():
    n, iterations = 50, 1000
    folder = 'data/repulsion n={} iter={}'.format(n, iterations)
    boundary = hardboundary.Circle(10.0)
    data = particlesim.simulate(iterations, n, moveParticles, folder, boundary)
    particlesim.motionAnimation(data, 15, boundary)
Пример #5
0
	def __init__(self, r):
		self.rMax = float(r)
		self.circle = geom.Point(0,0).buffer(float(r)).boundary
		self.hardedge = hardboundary.Circle(r)
Пример #6
0
                                (9.0, 0.0)]
RECTANGLE_VERTICES = [(-15.71, -3.93), (-15.71, 3.93), (15.71, 3.93),
                      (15.71, -3.93)]
SQUARE_VERTICES = [(-7.86, -7.86), (-7.86, 7.86), (7.86, 7.86), (7.86, -7.86)]
R_MAX = 10.0
H = np.sqrt(2 * np.pi / (3 * np.sqrt(3)))

ITERATIONS = 1000
N = 200

CONFIG = {
    'SHAPE_COMPARISON': [{
        'name': 'Run and Tumble Circle',
        'filePath': 'data/run tumble circle',
        'moveFn': runtumble.moveParticles,
        'boundary': hardboundary.Circle(R_MAX)
    }, {
        'name':
        'Run and Tumble Rectangle',
        'filePath':
        'data/run tumble Rectangle',
        'moveFn':
        runtumble.moveParticles,
        'boundary':
        hardboundary.CompactPolygon(RECTANGLE_VERTICES)
    }, {
        'name': 'Langevin Circle',
        'filePath': 'data/langevin circle',
        'moveFn': langevin.moveParticles,
        'boundary': hardboundary.Circle(R_MAX),
        'params': {
Пример #7
0
def main():
    iterations, n = 20000, 200
    folder = 'data/brownian n={} iter={}'.format(n, iterations)
    boundary = hardboundary.Circle(10)
    data = particlesim.simulate(iterations, n, moveParticles, folder, boundary)
    particlesim.motionAnimation(data, 200, boundary)