# ---------------------------------------------------------------------------------------- # SIMULATION PARAMETERS FOR THE PIC-CODE SMILEI # ---------------------------------------------------------------------------------------- import math patchesx = 2**(patchx_int-1) patchesy = 2**(patchy_int-1) #l0 = 2.0*math.pi # laser wavelength #t0 = l0 # optical cicle ncell = 160 dx = 0.2 Lsim = [ncell*dx,ncell*dx] #length of the simulation #Tsim = 30.*t0 # duration of the simulation #resx = 50. # nb of cells in on laser wavelength #rest = 75. # time of timestep in one optical cycle # Lr = c / wr # for Lr = 1e-6; wr = 3e14, Tr = 3.333e-15 (three femtoseconds per 'unit time') # nr = (0.0003149*wr*wr) = 2.8344e25 # so to get ne = 1e24 we need a faction of the ref density. # ne = 1e24 / 2.8344e25 = 0.03528 ne = 0.03528 ppc = 4 ppc_core = 128 def circleJ(max, radius=0, centerx=0, centery=0): global Main if len(Main)==0: raise Exception("circleJ profile has been defined before `Main()`") def fxy(x,y): if ((x-centerx)**2+(y-centery)**2)>radius**2: return 0.0 elif ((x-centerx)**2+(y-centery)**2)radius**2: return max elif ((x-centerx)**2+(y-centery)**2)