@@ -115,10 +115,10 @@ def main():
115115 run_sim = True
116116 track_trajectories = False
117117 a = 1000
118- num_samples = 100000
118+ num_samples = 10000
119119 num_angles = 10
120- energy = 100
121- angles = np .linspace (0.01 , 89.9 , num_angles )
120+ energy = 200
121+ angles = np .linspace (0.0 , 89.9 , num_angles )
122122
123123 sputtering_yields_x = np .zeros (num_angles )
124124 sputtering_yields_z = np .zeros (num_angles )
@@ -138,43 +138,48 @@ def main():
138138
139139 sim_index = 0
140140 impl_index = num_angles * 3 // 4
141+ bins = np .linspace (0 , 500 , 100 )
142+
141143 for angle_index , angle in enumerate (angles ):
142144
143145 R , Y , reflected , sputtered , implanted = run (energy , sim_index , num_samples , track_trajectories = track_trajectories , run_sim = run_sim , ux = np .cos (angle * np .pi / 180. ), uy = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uz = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ))
144146 sim_index += 1
145147 plt .figure (1 )
146- if angle_index == impl_index : plt .hist (implanted [:, 2 ], histtype = 'step' , bins = 100 , density = False , label = 'x' )
147-
148+ if angle_index == impl_index : plt .hist (implanted [:, 2 ], histtype = 'step' , bins = bins , density = False , label = 'x' )
148149 sputtering_yields_x [angle_index ] = Y
149150 R_x [angle_index ] = R
150151
151152 R , Y , reflected , sputtered , implanted = run (energy , sim_index , num_samples , track_trajectories = track_trajectories , run_sim = run_sim , x0 = a , ux = - np .cos (angle * np .pi / 180. ), uy = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uz = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ))
152153 sim_index += 1
153- if angle_index == impl_index : plt .hist (a - implanted [:, 2 ], histtype = 'step' , bins = 100 , density = False , label = '-x' )
154+ if angle_index == impl_index : plt .hist (a - implanted [:, 2 ], histtype = 'step' , bins = bins , density = False , label = '-x' )
154155 sputtering_yields_x_minus [angle_index ] = Y
155156 R_x_minus [angle_index ] = R
156157
157158 R , Y , reflected , sputtered , implanted = run (energy , sim_index , num_samples , track_trajectories = track_trajectories , run_sim = run_sim , x0 = a / 2. , y0 = a / 2. , z0 = a , ux = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uy = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uz = - np .cos (angle * np .pi / 180. ))
158159 sim_index += 1
159- if angle_index == impl_index : plt .hist (a - implanted [:, 4 ], histtype = 'step' , bins = 100 , density = False , label = '-z' )
160+ if angle_index == impl_index : plt .hist (a - implanted [:, 4 ], histtype = 'step' , bins = bins , density = False , label = '-z' )
161+
160162 sputtering_yields_z_minus [angle_index ] = Y
161163 R_z_minus [angle_index ] = R
162164
163165 R , Y , reflected , sputtered , implanted = run (energy , sim_index , num_samples , track_trajectories = track_trajectories , run_sim = run_sim , x0 = a / 2. , y0 = a / 2. , z0 = 0.0 , ux = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uy = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uz = np .cos (angle * np .pi / 180. ))
164166 sim_index += 1
165- if angle_index == impl_index : plt .hist (implanted [:, 4 ], histtype = 'step' , bins = 100 , density = False , label = 'z' )
167+ if angle_index == impl_index : plt .hist (implanted [:, 4 ], histtype = 'step' , bins = bins , density = False , label = 'z' )
168+
166169 sputtering_yields_z [angle_index ] = Y
167170 R_z [angle_index ] = R
168171
169172 R , Y , reflected , sputtered , implanted = run (energy , sim_index , num_samples , track_trajectories = track_trajectories , run_sim = run_sim , x0 = a / 2. , y0 = 0.0 , z0 = a / 2. , ux = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uz = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uy = np .cos (angle * np .pi / 180. ))
170173 sim_index += 1
171- if angle_index == impl_index : plt .hist (implanted [:, 3 ], histtype = 'step' , bins = 100 , density = False , label = 'y' )
174+ if angle_index == impl_index : plt .hist (implanted [:, 3 ], histtype = 'step' , bins = bins , density = False , label = 'y' )
175+
172176 sputtering_yields_y [angle_index ] = Y
173177 R_y [angle_index ] = R
174178
175179 R , Y , reflected , sputtered , implanted = run (energy , sim_index , num_samples , track_trajectories = track_trajectories , run_sim = run_sim , x0 = a / 2. , y0 = a , z0 = a / 2. , ux = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uz = np .sin (angle * np .pi / 180. )/ np .sqrt (2 ), uy = - np .cos (angle * np .pi / 180. ))
176180 sim_index += 1
177- if angle_index == impl_index : plt .hist (a - implanted [:, 3 ], histtype = 'step' , bins = 100 , density = False , label = '-y' )
181+ if angle_index == impl_index : plt .hist (a - implanted [:, 3 ], histtype = 'step' , bins = bins , density = False , label = '-y' )
182+
178183 sputtering_yields_y_minus [angle_index ] = Y
179184 R_y_minus [angle_index ] = R
180185
@@ -206,7 +211,6 @@ def main():
206211 plt .show ()
207212
208213 if track_trajectories and do_plots :
209-
210214 do_trajectory_plot ('cube_19' , boundary = [[0.0 , 0.0 ], [0.0 , a ], [a , a ], [a , 0.0 ], [0.0 , 0.0 ]])
211215
212216 do_trajectory_plot ('cube_20' , boundary = [[0.0 , 0.0 ], [0.0 , a ], [a , a ], [a , 0.0 ], [0.0 , 0.0 ]])
0 commit comments