Warwick-Plasma / epoch

Particle-in-cell code for plasma physics simulations
https://epochpic.github.io
GNU General Public License v3.0
184 stars 58 forks source link

Error in laser oblique incidence code at high incidence angle #729

Closed bear-maker closed 4 weeks ago

bear-maker commented 1 month ago

Dear Professor I want to set up an oblique incidence laser, and I ran a laser with a 30 ° incidence angle using the original code in the manual, which is normal. But when I wanted a larger incident angle (45 °), there was a problem, as shown in the following picture

Dear professor, you can clearly see that this is not a 45 ° angle 1729694111030

Original code (I only changed the perspective from the official code)

begin:control  
  nx = 2000          
  ny = 2000             
  t_end = 50.e-15      
  x_min = -10.0e-6    
  x_max = 10.0e-6      
  y_min = -10.0e-6
  y_max = 10.0e-6  
end:control  

begin:boundaries  
  bc_x_min = simple_laser  
  bc_x_max = simple_outflow  
  bc_y_min = simple_outflow  
  bc_y_max = simple_outflow
end:boundaries  

begin:constant  
  laser_angle = pi / 4      # Set angle of laser w.r.t positive x unit vector
  laser_fwhm = 2.0e-6       # Size of gaussian profile for laser electric field
  laser_wavelength = 1.0e-6
  laser_k = 2 * pi / laser_wavelength
end:constant  

begin:laser 
  boundary = x_min 
  intensity_w_cm2 = 1.0e15 
  profile = gauss(y, 0, laser_fwhm / (2.0 * sqrt(loge(2.0))))
  t_profile = 1
  phase = -y * laser_k * sin(laser_angle) # Vary wave-front position in space
  lambda = laser_wavelength * cos(laser_angle) # Space wave-fronts apart 
                                               # correctly along k
end:laser    

begin:output
  dt_snapshot = 10.e-15   
  grid = always 
  ey = always  
end:output  

I am looking forward to your answer and wish you a smooth work

TomGoffrey commented 4 weeks ago

The pi/6 set up isn't correct either. It's just the error is more obvious for the pi/4 case.

This is a well known issue. See for example #45.

bear-maker commented 4 weeks ago

The pi/6 set up isn't correct either. It's just the error is more obvious for the pi/4 case.

This is a well known issue. See for example #45.

Thank you very much for your answer, Professor. Perhaps I am not very smart and have not found a specific solution. Can you provide specific oblique input code? I am looking forward to your answer and wish you a happy life.

bear-maker commented 4 weeks ago

The pi/6 set up isn't correct either. It's just the error is more obvious for the pi/4 case.

This is a well known issue. See for example #45.

Dear Professor Your reply helped me understand the error in the code, but I still don't know how to set the input to make the laser obliquely incident

Status-Mirror commented 4 weeks ago

Hi @bear-maker,

I've had a chat with Tom, and we think it's better to take down the oblique incidence example. Our boundaries aren't really capable of simulating this kind of laser.

If you only have one laser-pulse, it's far easier to rotate the target than it is to rotate the laser. See our rotated target demo for more information.

Cheers, Stuart