ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
309 stars 195 forks source link

Yee+RZ laser in vacuum propagation - different results for differently polarised laser beams #4436

Open SchroederSa opened 12 months ago

SchroederSa commented 12 months ago

When simulating the laser propagation in vacuum using the Yee solver in RZ geometry, I observe:

By using different a0 retrieval methods, I intended to rule out a diagnostic-related problem to the best of my knowledge.

Best Sarah

input script

max_step = 300000.0

stop_time = 1.5e-11

warpx.n_rz_azimuthal_modes = 2.0

amr.n_cell = 700    4000
amr.blocking_factor = 32

warpx.numprocs = 2.0    2.0

amr.max_level = 0

warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 0
warpx.filter_npass_each_dir = 0.0    1.0
warpx.cfl = 1.0
warpx.do_moving_window = 1
warpx.moving_window_dir = z
warpx.moving_window_v = 1.0
warpx.start_moving_window_step = 1600.0

algo.particle_shape = 3
algo.maxwell_solver = Yee

geometry.dims = RZ
geometry.prob_lo = 0.0    -8e-05
geometry.prob_hi = 0.000115    0.0

boundary.field_lo = none    pec
boundary.field_hi = absorbing_silver_mueller    pec
boundary.particle_lo = absorbing    absorbing
boundary.particle_hi = absorbing    absorbing

lasers.names = laser
laser.do_continuous_injection = 0
laser.profile = Gaussian
laser.direction = 0.0    0.0    1.0
laser.polarization = 1.0    0.0    0.0
laser.position = 0.0    0.0    -1e-06
laser.a0 = 1.36
laser.profile_focal_distance = 0.0022
laser.profile_t_peak = 2e-13
laser.wavelength = 8e-07
laser.profile_waist = 3.3e-05
laser.profile_duration = 3.4e-14

diagnostics.diags_names = diag1
diag1.intervals = 5000
diag1.diag_type = Full
diag1.dump_rz_modes = 1.0
diag1.fields_to_plot = Er    Et    Ez    rho
diag1.file_prefix = diag_vacuum_x_nom/openPMD
diag1.format = openpmd
diag1.openpmd_backend = h5
diag1.electrons.plot_filter_function(t,x,y,z,ux,uy,uz) = "((x*x+y*y)<20e-6)"

VacuumSimulations-compressed.pdf

ax3l commented 12 months ago

cc @dpgrote @RemiLehe

oshapoval commented 10 months ago

Thanks a lot @SchroederSa for reporting the issue! I have just rerun your script with the latest dev branch and I do not observe discrepancy between x and y polarizations with RZ Yee solver. As @RemiLehe suggested this has been fixed by the following PR: https://github.com/ECP-WarpX/WarpX/pull/4464. Please see attached below the corresponding plots of a and the waist:

Screenshot 2024-01-16 at 6 28 22 AM
RemiLehe commented 10 months ago

@SchroederSa Could you confirm that this issues is resolved? If so, you can click the Close button on this page.

SchroederSa commented 9 months ago

Thank you, @oshapoval, for looking into it. Unfortunately, with WarpX version 24.01-16-g4ab88c5909ac (which I pulled after your comment 3 weeks ago), I still have the same issue. How do you extract a?

VacuumSimulation_polarisation_V24 01

oshapoval commented 9 months ago

Hi @SchroederSa

I ran two simulations using dev branch with x- and y-polarized lasers. For example,

1)
laser.polarization = 1 0 0
diag1.file_prefix = pol_x/openPMD
2)
laser.polarization = 0 1 0
diag1.file_prefix = pol_y/openPMD

Then, I used .get_a0() (or .get_laser_waist()) with pol='x' or pol=‘y’ to extract the data, respectively.

from openpmd_viewer.addons import LpaDiagnostics

ts_x = LpaDiagnostics(path + '/pol_x/openPMD/')
ts_y = LpaDiagnostics(path + '/pol_y/openPMD/')

a0_x = ts_x.iterate(ts_x.get_a0, pol='x') 
a0_y = ts_y.iterate(ts_y.get_a0, pol='y')