-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added few examples and mp4 for 2d version of double and triple slit
- Loading branch information
Showing
22 changed files
with
492 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
p2 = SimpleNamespace( | ||
# low resolution | ||
Nx_lr=200, # number of grid points in x direction | ||
Ny_lr=200, # number of grid points in y direction | ||
dt_lr=0.01, # time step for the simulation | ||
# high resolution | ||
Nx_hr=400, # number of grid points in x direction | ||
Ny_hr=400, # number of grid points in y direction | ||
dt_hr=0.0033333, # time step for the simulation | ||
x_min=-30, # minimum x value | ||
x_max=30, # maximum x value | ||
y_min=-20, # minimum y value | ||
y_max=20, # maximum y value | ||
x0=-15, # initial position of the wave packet in x | ||
y0=0, # initial position of the wave packet in y | ||
sigma_x=3.7, # width of the wave packet in x direction | ||
sigma_y=3.7, # width of the wave packet in y direction | ||
kx=-4e6, # initial wave vector in x direction | ||
ky=0.0, # initial wave vector in y direction | ||
t_max=6.0, # maximum simulation time | ||
total_duration=15, # total duration of the animation | ||
fps=30, # frames per second for the animation | ||
infinite_barrier=False, # reflecting or absorbing boundary | ||
middle_barrier=True, # set a finite barrier at barrier_center | ||
slits=True, # allow horizontal holes in the barrier (slits) | ||
barrier_height=1e8, # potential of the finite barrier | ||
barrier_center=0.0, # center of the finite barrier | ||
barrier_width=0.15, # half width in the x direction | ||
barriers_start=[20, 1, -1.5], # start of middle barriers | ||
barriers_end=[1.5, -1, -20], # end of middle barriers | ||
periodic_boundary=False, # periodic boundary | ||
absorbing_method=1, # 0 (tanh), 1 CAP | ||
cap_type=0, # 0 polynomial 1 optimal | ||
cap_poly=2, # cap polynomial (e.g. 2 quadratic) | ||
cap_opt_a=2.62, # a value for adaptive CAP | ||
absorbing_strength=20, # absorbing strength | ||
absorbing_width_x=0.1, # absorbing width x boundary | ||
absorbing_width_y=0.1, # absorbing width y boundary | ||
absorbing_xmin=True, # absorbing on left border | ||
absorbing_xmax=True, # absorbing on right border | ||
absorbing_ymin=True, # absorbing on lower border | ||
absorbing_ymax=True # absorbing on upper border | ||
) | ||
|
||
cfg = SimpleNamespace( | ||
plot_prob=True, # plot probability or wavefunction | ||
dev_simul=False, # align the number of steps to number of frames | ||
plot_all_frames=False, # plot all frames while computing | ||
display_all_d=False, # display all domain if absorbing boundary | ||
show_smooth_d=False, # show the absorbing smooth domain | ||
high_res_grid=True, # enable high resolution simulation grid | ||
high_res_dt=True, # enable high resolution simulation timestep | ||
high_res_plot=True, # enable high resolution simulation plot | ||
fix_min_max=True, # fix the min max in the z direction | ||
z_xmax_scale=0.3, # scale the max | ||
z_xmin_scale=1, # scale the min | ||
add_screen=False, # add a screen for show particles collection | ||
screen_data=[[10, -7], [10, 7], [10.5, 7], [10.5, -7]], # screen location | ||
compute=True, # enable computation | ||
plot=False, # save one frame | ||
frame_id=0, # frame to save | ||
animate=True, # enable animation | ||
save_anim=True, # save animation | ||
plot_anim=False, # plot animation | ||
load_data=False, # load data from a file | ||
save_data=True, # save data to a file | ||
data_folder='data/simul_double_slit_hr_v5', # folder for data files | ||
output_file='double_slit_hr_v5.png', # output file name | ||
animation_format='mp4', # animation format (mp4 or gif) | ||
verbose=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
p2 = SimpleNamespace( | ||
# low resolution | ||
Nx_lr=200, # number of grid points in x direction | ||
Ny_lr=200, # number of grid points in y direction | ||
dt_lr=0.01, # time step for the simulation | ||
# high resolution | ||
Nx_hr=400, # number of grid points in x direction | ||
Ny_hr=400, # number of grid points in y direction | ||
dt_hr=0.005, # time step for the simulation | ||
x_min=-20, # minimum x value | ||
x_max=20, # maximum x value | ||
y_min=-15, # minimum y value | ||
y_max=15, # maximum y value | ||
x0=-15, # initial position of the wave packet in x | ||
y0=0, # initial position of the wave packet in y | ||
sigma_x=2, # width of the wave packet in x direction | ||
sigma_y=2, # width of the wave packet in y direction | ||
kx=50, # initial wave vector in x direction | ||
ky=0.0, # initial wave vector in y direction | ||
t_max=3, # maximum simulation time | ||
total_duration=10, # total duration of the animation | ||
fps=30, # frames per second for the animation | ||
infinite_barrier=False, # reflecting or absorbing boundary | ||
middle_barrier=True, # set a finite barrier at barrier_center | ||
slits=True, # allow horizontal holes in the barrier (slits) | ||
barrier_height=1e5, # potential of the finite barrier | ||
barrier_center=0.0, # center of the finite barrier | ||
barrier_width=0.1, # half width in the x direction | ||
barriers_start=[15, 1, -2], # start of middle barriers | ||
barriers_end=[2, -1, -15], # end of middle barriers | ||
periodic_boundary=False, # periodic boundary | ||
absorbing_method=1, # 0 (tanh), 1 CAP | ||
cap_type=0, # 0 polynomial 1 optimal | ||
cap_poly=2, # cap polynomial (e.g. 2 quadratic) | ||
cap_opt_a=2.62, # a value for adaptive CAP | ||
absorbing_strength=20, # absorbing strength | ||
absorbing_width_x=0.1, # absorbing width x boundary | ||
absorbing_width_y=0.1, # absorbing width y boundary | ||
absorbing_xmin=True, # absorbing on left border | ||
absorbing_xmax=True, # absorbing on right border | ||
absorbing_ymin=True, # absorbing on lower border | ||
absorbing_ymax=True # absorbing on upper border | ||
) | ||
|
||
cfg = SimpleNamespace( | ||
plot_prob=True, # plot probability or wavefunction | ||
dev_simul=False, # align the number of steps to number of frames | ||
plot_all_frames=False, # plot all frames while computing | ||
display_all_d=False, # display all domain if absorbing boundary | ||
show_smooth_d=False, # show the absorbing smooth domain | ||
high_res_grid=True, # enable high resolution simulation grid | ||
high_res_dt=False, # enable high resolution simulation timestep | ||
high_res_plot=True, # enable high resolution simulation plot | ||
fix_min_max=True, # fix the min max in the z direction | ||
z_xmax_scale=0.3, # scale the max | ||
z_xmin_scale=1, # scale the min | ||
add_screen=False, # add a screen for show particles collection | ||
screen_data=[[10, -7], [10, 7], [10.5, 7], [10.5, -7]], # screen location | ||
compute=True, # enable computation | ||
plot=False, # save one frame | ||
frame_id=0, # frame to save | ||
animate=True, # enable animation | ||
save_anim=True, # save animation | ||
plot_anim=False, # plot animation | ||
load_data=False, # load data from a file | ||
save_data=True, # save data to a file | ||
data_folder='data/simul_double_slit_hr_v1', # folder for data files | ||
output_file='double_slit_hr_v1.png', # output file name | ||
animation_format='mp4', # animation format (mp4 or gif) | ||
verbose=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
p2 = SimpleNamespace( | ||
# low resolution | ||
Nx_lr=200, # number of grid points in x direction | ||
Ny_lr=200, # number of grid points in y direction | ||
dt_lr=0.01, # time step for the simulation | ||
# high resolution | ||
Nx_hr=400, # number of grid points in x direction | ||
Ny_hr=400, # number of grid points in y direction | ||
dt_hr=0.005, # time step for the simulation | ||
x_min=-20, # minimum x value | ||
x_max=20, # maximum x value | ||
y_min=-15, # minimum y value | ||
y_max=15, # maximum y value | ||
x0=-15, # initial position of the wave packet in x | ||
y0=0, # initial position of the wave packet in y | ||
sigma_x=2, # width of the wave packet in x direction | ||
sigma_y=2, # width of the wave packet in y direction | ||
kx=50, # initial wave vector in x direction | ||
ky=0.0, # initial wave vector in y direction | ||
t_max=3, # maximum simulation time | ||
total_duration=10, # total duration of the animation | ||
fps=30, # frames per second for the animation | ||
infinite_barrier=False, # reflecting or absorbing boundary | ||
middle_barrier=True, # set a finite barrier at barrier_center | ||
slits=True, # allow horizontal holes in the barrier (slits) | ||
barrier_height=1e5, # potential of the finite barrier | ||
barrier_center=0.0, # center of the finite barrier | ||
barrier_width=0.1, # half width in the x direction | ||
barriers_start=[15, 1.5, -2], # start of middle barriers | ||
barriers_end=[2, -1.5, -15], # end of middle barriers | ||
periodic_boundary=False, # periodic boundary | ||
absorbing_method=1, # 0 (tanh), 1 CAP | ||
cap_type=0, # 0 polynomial 1 optimal | ||
cap_poly=2, # cap polynomial (e.g. 2 quadratic) | ||
cap_opt_a=2.62, # a value for adaptive CAP | ||
absorbing_strength=20, # absorbing strength | ||
absorbing_width_x=0.1, # absorbing width x boundary | ||
absorbing_width_y=0.1, # absorbing width y boundary | ||
absorbing_xmin=True, # absorbing on left border | ||
absorbing_xmax=True, # absorbing on right border | ||
absorbing_ymin=True, # absorbing on lower border | ||
absorbing_ymax=True # absorbing on upper border | ||
) | ||
|
||
cfg = SimpleNamespace( | ||
plot_prob=True, # plot probability or wavefunction | ||
dev_simul=False, # align the number of steps to number of frames | ||
plot_all_frames=False, # plot all frames while computing | ||
display_all_d=False, # display all domain if absorbing boundary | ||
show_smooth_d=False, # show the absorbing smooth domain | ||
high_res_grid=True, # enable high resolution simulation grid | ||
high_res_dt=False, # enable high resolution simulation timestep | ||
high_res_plot=True, # enable high resolution simulation plot | ||
fix_min_max=True, # fix the min max in the z direction | ||
z_xmax_scale=0.3, # scale the max | ||
z_xmin_scale=1, # scale the min | ||
add_screen=False, # add a screen for show particles collection | ||
screen_data=[[10, -7], [10, 7], [10.5, 7], [10.5, -7]], # screen location | ||
compute=True, # enable computation | ||
plot=False, # save one frame | ||
frame_id=0, # frame to save | ||
animate=True, # enable animation | ||
save_anim=True, # save animation | ||
plot_anim=False, # plot animation | ||
load_data=False, # load data from a file | ||
save_data=True, # save data to a file | ||
data_folder='data/simul_double_slit_hr_v2', # folder for data files | ||
output_file='double_slit_hr_v2.png', # output file name | ||
animation_format='mp4', # animation format (mp4 or gif) | ||
verbose=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
p2 = SimpleNamespace( | ||
# low resolution | ||
Nx_lr=200, # number of grid points in x direction | ||
Ny_lr=200, # number of grid points in y direction | ||
dt_lr=0.01, # time step for the simulation | ||
# high resolution | ||
Nx_hr=400, # number of grid points in x direction | ||
Ny_hr=400, # number of grid points in y direction | ||
dt_hr=0.005, # time step for the simulation | ||
x_min=-30, # minimum x value | ||
x_max=30, # maximum x value | ||
y_min=-20, # minimum y value | ||
y_max=20, # maximum y value | ||
x0=-15, # initial position of the wave packet in x | ||
y0=0, # initial position of the wave packet in y | ||
sigma_x=3.7, # width of the wave packet in x direction | ||
sigma_y=3.7, # width of the wave packet in y direction | ||
kx=-4e6, # initial wave vector in x direction | ||
ky=0.0, # initial wave vector in y direction | ||
t_max=3.0, # maximum simulation time | ||
total_duration=10, # total duration of the animation | ||
fps=30, # frames per second for the animation | ||
infinite_barrier=False, # reflecting or absorbing boundary | ||
middle_barrier=True, # set a finite barrier at barrier_center | ||
slits=True, # allow horizontal holes in the barrier (slits) | ||
barrier_height=1e8, # potential of the finite barrier | ||
barrier_center=0.0, # center of the finite barrier | ||
barrier_width=0.15, # half width in the x direction | ||
barriers_start=[20, 1, -3.5], # start of middle barriers | ||
barriers_end=[3.5, -1, -20], # end of middle barriers | ||
periodic_boundary=False, # periodic boundary | ||
absorbing_method=1, # 0 (tanh), 1 CAP | ||
cap_type=0, # 0 polynomial 1 optimal | ||
cap_poly=2, # cap polynomial (e.g. 2 quadratic) | ||
cap_opt_a=2.62, # a value for adaptive CAP | ||
absorbing_strength=20, # absorbing strength | ||
absorbing_width_x=0.1, # absorbing width x boundary | ||
absorbing_width_y=0.1, # absorbing width y boundary | ||
absorbing_xmin=True, # absorbing on left border | ||
absorbing_xmax=True, # absorbing on right border | ||
absorbing_ymin=True, # absorbing on lower border | ||
absorbing_ymax=True # absorbing on upper border | ||
) | ||
|
||
cfg = SimpleNamespace( | ||
plot_prob=True, # plot probability or wavefunction | ||
dev_simul=False, # align the number of steps to number of frames | ||
plot_all_frames=False, # plot all frames while computing | ||
display_all_d=False, # display all domain if absorbing boundary | ||
show_smooth_d=False, # show the absorbing smooth domain | ||
high_res_grid=True, # enable high resolution simulation grid | ||
high_res_dt=False, # enable high resolution simulation timestep | ||
high_res_plot=True, # enable high resolution simulation plot | ||
fix_min_max=True, # fix the min max in the z direction | ||
z_xmax_scale=0.3, # scale the max | ||
z_xmin_scale=1, # scale the min | ||
add_screen=False, # add a screen for show particles collection | ||
screen_data=[[10, -7], [10, 7], [10.5, 7], [10.5, -7]], # screen location | ||
compute=True, # enable computation | ||
plot=False, # save one frame | ||
frame_id=0, # frame to save | ||
animate=True, # enable animation | ||
save_anim=True, # save animation | ||
plot_anim=False, # plot animation | ||
load_data=False, # load data from a file | ||
save_data=True, # save data to a file | ||
data_folder='data/simul_double_slit_hr_v3', # folder for data files | ||
output_file='double_slit_hr_v3.png', # output file name | ||
animation_format='mp4', # animation format (mp4 or gif) | ||
verbose=True | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
p2 = SimpleNamespace( | ||
# low resolution | ||
Nx_lr=200, # number of grid points in x direction | ||
Ny_lr=200, # number of grid points in y direction | ||
dt_lr=0.01, # time step for the simulation | ||
# high resolution | ||
Nx_hr=400, # number of grid points in x direction | ||
Ny_hr=400, # number of grid points in y direction | ||
dt_hr=0.005, # time step for the simulation | ||
x_min=-30, # minimum x value | ||
x_max=30, # maximum x value | ||
y_min=-20, # minimum y value | ||
y_max=20, # maximum y value | ||
x0=-15, # initial position of the wave packet in x | ||
y0=0, # initial position of the wave packet in y | ||
sigma_x=3.7, # width of the wave packet in x direction | ||
sigma_y=3.7, # width of the wave packet in y direction | ||
kx=-4e6, # initial wave vector in x direction | ||
ky=0.0, # initial wave vector in y direction | ||
t_max=3.0, # maximum simulation time | ||
total_duration=10, # total duration of the animation | ||
fps=30, # frames per second for the animation | ||
infinite_barrier=False, # reflecting or absorbing boundary | ||
middle_barrier=True, # set a finite barrier at barrier_center | ||
slits=True, # allow horizontal holes in the barrier (slits) | ||
barrier_height=1e8, # potential of the finite barrier | ||
barrier_center=0.0, # center of the finite barrier | ||
barrier_width=0.15, # half width in the x direction | ||
barriers_start=[20, 1, -2.3], # start of middle barriers | ||
barriers_end=[2.3, -1, -20], # end of middle barriers | ||
periodic_boundary=False, # periodic boundary | ||
absorbing_method=1, # 0 (tanh), 1 CAP | ||
cap_type=0, # 0 polynomial 1 optimal | ||
cap_poly=2, # cap polynomial (e.g. 2 quadratic) | ||
cap_opt_a=2.62, # a value for adaptive CAP | ||
absorbing_strength=20, # absorbing strength | ||
absorbing_width_x=0.1, # absorbing width x boundary | ||
absorbing_width_y=0.1, # absorbing width y boundary | ||
absorbing_xmin=True, # absorbing on left border | ||
absorbing_xmax=True, # absorbing on right border | ||
absorbing_ymin=True, # absorbing on lower border | ||
absorbing_ymax=True # absorbing on upper border | ||
) | ||
|
||
cfg = SimpleNamespace( | ||
plot_prob=True, # plot probability or wavefunction | ||
dev_simul=False, # align the number of steps to number of frames | ||
plot_all_frames=False, # plot all frames while computing | ||
display_all_d=False, # display all domain if absorbing boundary | ||
show_smooth_d=False, # show the absorbing smooth domain | ||
high_res_grid=True, # enable high resolution simulation grid | ||
high_res_dt=False, # enable high resolution simulation timestep | ||
high_res_plot=True, # enable high resolution simulation plot | ||
fix_min_max=True, # fix the min max in the z direction | ||
z_xmax_scale=0.3, # scale the max | ||
z_xmin_scale=1, # scale the min | ||
add_screen=False, # add a screen for show particles collection | ||
screen_data=[[10, -7], [10, 7], [10.5, 7], [10.5, -7]], # screen location | ||
compute=True, # enable computation | ||
plot=False, # save one frame | ||
frame_id=0, # frame to save | ||
animate=True, # enable animation | ||
save_anim=True, # save animation | ||
plot_anim=False, # plot animation | ||
load_data=False, # load data from a file | ||
save_data=True, # save data to a file | ||
data_folder='data/simul_double_slit_hr_v4', # folder for data files | ||
output_file='double_slit_hr_v4.png', # output file name | ||
animation_format='mp4', # animation format (mp4 or gif) | ||
verbose=True | ||
) |
Oops, something went wrong.