def main(): runner = Runner() runner.EB = EB runner.U0 = co.c runner.list_clear() runner.particle_weight(1e9) runner.init_list(100, 110, 10000 * co.kilo * co.eV, 1000) runner.set_emfield_func('selfcons') counter = Counter(runner) runner.save_to(sys.argv[1]) runner.inner_hooks.append(counter) runner.prepare_data(tfraction=0.0) plotter.phases(runner) plotter.selfcons_field(runner) runner.output_n = 4000 runner.max_particles = 20000 n = 250 for i in range(n): runner(10 * co.nano) tfraction = float(i + 1) / n runner.prepare_data(tfraction) runner.save()
def main(): runner = Runner() runner.EB = EB runner.U0 = co.c runner.list_clear() runner.particle_weight(1e9); runner.init_list(100, 110, 10000 * co.kilo * co.eV, 1000) runner.set_emfield_func('selfcons') counter = Counter(runner) runner.save_to(sys.argv[1]) runner.inner_hooks.append(counter) runner.prepare_data(tfraction=0.0) plotter.phases(runner) plotter.selfcons_field(runner) runner.output_n = 4000 runner.max_particles = 20000 n = 250 for i in range(n): runner(10 * co.nano) tfraction = float(i + 1) / n runner.prepare_data(tfraction) runner.save()
def main(): runner = Runner() runner.E0 = E0 runner.EB = EB runner.B0 = 20 * co.micro runner.L = 30 runner.U0 = BETA * co.c runner.THETA = 0.0 runner.list_clear() runner.init_list(0, 10, 10000 * co.kilo * co.eV, 2500) runner.set_emfield_func('front') init_front(runner) counter = Counter(runner) runner.inner_hooks.append(counter) n = 10 runner.prepare_data(tfraction=0.0) plotter.phases(runner) plotter.front(runner) plotter.field(runner) runner.output_n = 1000 runner.max_particles = 5000 for i in range(n): runner(10 * co.nano) growth, b = simple_regression(counter.t[-10:], log(counter.n[-10:])) logging.info("growth rate = {:g} /ns".format(growth * co.nano)) update_front(runner, growth) tfraction = float(i + 1) / n runner.prepare_data(tfraction) plotter.phases(runner) plotter.histogram(runner) plotter.front(runner) plotter.field(runner) plotter.save_all() pylab.show()
def main(): runner = Runner() runner.B0 = B0 runner.E0 = E0 runner.EB = EB runner.U0 = co.c runner.L = L runner.list_clear() runner.particle_weight(1e9) runner.init_list(0, 10, 10000 * co.kilo * co.eV, 1000) runner.set_emfield_func('const') counter = Counter(runner) runner.save_to(sys.argv[1]) runner.inner_hooks.append(counter) runner.prepare_data(tfraction=0.0) plotter.phases(runner) runner.output_n = 4000 runner.max_particles = 5000 n = 250 for i in range(n): runner(50 * co.nano) tfraction = float(i + 1) / n runner.prepare_data(tfraction) runner.save() plotter.phases(runner) plotter.histogram(runner) plotter.save_all() pylab.show()
def main(): runner = Runner() runner.B0 = B0 runner.E0 = E0 runner.EB = EB runner.U0 = co.c runner.L = L runner.list_clear() runner.particle_weight(1e9); runner.init_list(0, 10, 10000 * co.kilo * co.eV, 1000) runner.set_emfield_func('const') counter = Counter(runner) runner.save_to(sys.argv[1]) runner.inner_hooks.append(counter) runner.prepare_data(tfraction=0.0) plotter.phases(runner) runner.output_n = 4000 runner.max_particles = 5000 n = 250 for i in range(n): runner(50 * co.nano) tfraction = float(i + 1) / n runner.prepare_data(tfraction) runner.save() plotter.phases(runner) plotter.histogram(runner) plotter.save_all() pylab.show()