@@ -0,0 +1,658 @@
+import ucilib.Sim as Sim%0Aimport ucilib.BorisUpdater as BorisUpdater%0Aimport numpy as np%0A%0A%0A# Some helpful constants.%0Afund_charge = 1.602176565e-19%0A%0A%0A# Mass of Be%5E+ ions.%0Aion_mass = 8.9465 * 1.673e-27%0A%0A%0A# Create a simulation with n particles.%0An = 10000%0As = Sim.Sim()%0As.ptcls.set_nptcls(n)%0A%0A%0A# 1/e radius of cloud.%0As.ptcls.rmax = 2.0e-4%0As.ptcls.init_ptcls(charge = fund_charge, mass = ion_mass)%0A%0A%0A# Turn the first n/2 particles into electrons by setting their mass and%0A# charge.%0As.ptcls.q()%5B:(n/2)%5D = -fund_charge * np.ones(n/2)%0As.ptcls.m()%5B:(n/2)%5D = 9.1e-31 * np.ones(n/2)%0A%0A%0A# Finally we set the updater.%0As.updater = BorisUpdater.BorisUpdater(s.ctx, s.queue)%0A%0A%0A

Add an example simulation setup for an ultracold neutral plasma.