@@ -271,7 +271,7 @@ def test_two_embedded_cylinders_scraping():
271271 np .random .seed (42147820 )
272272
273273 # Specific numbers match older run for consistency
274- D_CA = 1 # m
274+ D_CA = 0.025 # m
275275 NX = 64
276276 NZ = 64
277277 run = diode_setup .DiodeRun_V1 (
@@ -282,10 +282,12 @@ def test_two_embedded_cylinders_scraping():
282282 NZ = NZ ,
283283 # This gives equal spacing in x & z
284284 PERIOD = D_CA * NX / NZ ,
285- DT = 1e-9 ,
286- TOTAL_TIMESTEPS = 4 ,
287- DIAG_STEPS = 4 ,
285+ DT = 1e-10 ,
286+ TOTAL_TIMESTEPS = 15 ,
287+ DIAG_STEPS = 15 ,
288288 FIELD_DIAG_DATA_LIST = ['phi' ],
289+ # FIELD_DIAG_PLOT=True,
290+ INERT_GAS_TYPE = 'positron'
289291 )
290292 # Only the functions we change from defaults are listed here
291293 run .setup_run (
@@ -302,12 +304,12 @@ def test_two_embedded_cylinders_scraping():
302304
303305 # Install the embedded boundaries
304306 cylinder1 = assemblies .Cylinder (
305- center_x = - 0.25 , center_z = 0.5 , radius = 0.1 ,
306- V = - 2.0 , T = 300 , WF = 4.7 , name = "Cylinder1"
307+ center_x = - 0.25 * D_CA , center_z = 0.5 * D_CA , radius = 0.1 * D_CA ,
308+ V = - 0.5 , T = 300 , WF = 4.7 , name = "Cylinder1"
307309 )
308310 cylinder2 = assemblies .Cylinder (
309- center_x = 0.25 , center_z = 0.5 , radius = 0.1 ,
310- V = 5.0 , T = 300 , WF = 4.7 , name = "Cylinder2"
311+ center_x = 0.25 * D_CA , center_z = 0.5 * D_CA , radius = 0.1 * D_CA ,
312+ V = 0.2 , T = 300 , WF = 4.7 , name = "Cylinder2"
311313 )
312314
313315 # Initialize solver
@@ -318,11 +320,11 @@ def test_two_embedded_cylinders_scraping():
318320
319321 # Inject particles in the simulation
320322 volemitter = emission .ZSinDistributionVolumeEmitter (
321- T = 1550 , zmin = 0 , zmax = run .D_CA ,
323+ T = 3000 , zmin = 0 , zmax = run .D_CA ,
322324 )
323325 emission .PlasmaInjector (
324326 emitter = volemitter , species1 = run .electrons , species2 = run .ions ,
325- npart = 2000 , plasma_density = 1e19 ,
327+ npart = 4000 , plasma_density = 1e14 ,
326328 )
327329
328330 # Initialize the simulation
@@ -341,12 +343,12 @@ def test_two_embedded_cylinders_scraping():
341343 cylinder1 .record_scrapedparticles ()
342344 cyl1_scraped = cylinder1 .get_scrapedparticles ()
343345
344- cylinder2 .init_scrapedparticles (cylinder1 .fields )
346+ cylinder2 .init_scrapedparticles (cylinder2 .fields )
345347 cylinder2 .record_scrapedparticles ()
346348 cyl2_scraped = cylinder2 .get_scrapedparticles ()
347349
348- assert np .allclose (cyl1_scraped ['n' ], np .array ([2 , 40 ]))
349- assert np .allclose (cyl2_scraped ['n' ], np .array ([5 , 46 ]))
350+ assert np .allclose (cyl1_scraped ['n' ], np .array ([3 , 0 ]))
351+ assert np .allclose (cyl2_scraped ['n' ], np .array ([1 , 2 ]))
350352
351353 #######################################################################
352354 # Check rho results against reference data #
0 commit comments