Skip to content

Commit

Permalink
analysis_multiple_particles.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aeriforme committed Aug 7, 2023
2 parents 6b760f4 + 6ae795f commit 23516c9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
import sys
import re
import numpy as np
import matplotlib.pyplot as plt
from scipy.constants import m_e, c, hbar, e
import openpmd_api as io
import matplotlib.colors
import pandas as pd

E_crit = m_e**2*c**3/(e*hbar)
Expand Down
44 changes: 22 additions & 22 deletions Examples/Tests/collider_relevant_diags/inputs_3d_multiple_particles
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ my_constants.dt = cfl/clight/sqrt((1./dx)^2+(1./dy)^2+(1./dz)^2)

# DIAGS
my_constants.every_ps = floor(ps/dt)
my_constants.out_freq_red = 10
my_constants.out_freq_red = 10
my_constants.out_freq_full = 10 #0.01*every_ps

#################################
Expand All @@ -32,22 +32,22 @@ max_step = 3
amr.n_cell = nx ny nz
#amr.max_grid_size = 64
#amr.blocking_factor = 2
warpx.numprocs = 1 1 1
warpx.numprocs = 1 1 1
amr.max_level = 0
geometry.dims = 3
geometry.prob_lo = 0 0 0
geometry.prob_hi = 8 8 8
particles.do_tiling = 0
warpx.use_filter = 0
geometry.prob_lo = 0 0 0
geometry.prob_hi = 8 8 8
particles.do_tiling = 0
warpx.use_filter = 0


#################################
######## BOUNDARY CONDITION #####
#################################
boundary.field_lo = periodic periodic periodic
boundary.field_hi = periodic periodic periodic
boundary.particle_lo = periodic periodic periodic
boundary.particle_hi = periodic periodic periodic
boundary.field_hi = periodic periodic periodic
boundary.particle_lo = periodic periodic periodic
boundary.particle_hi = periodic periodic periodic

#################################
############ NUMERICS ###########
Expand All @@ -63,7 +63,7 @@ algo.load_balance_intervals=100
particles.E_ext_particle_init_style = constant
particles.B_ext_particle_init_style = constant
particles.E_external_particle = 10000. 0. 0.
particles.B_external_particle = 0. 5000. 0.
particles.B_external_particle = 0. 5000. 0.

#################################
########### PARTICLES ###########
Expand All @@ -75,11 +75,11 @@ beam_e.species_type = electron
beam_e.injection_style = MultipleParticles
beam_e.multiple_particles_pos_x = 4.5 3.5 0.5
beam_e.multiple_particles_pos_y = 4.5 2.5 1.5
beam_e.multiple_particles_pos_z = 4.5 1.5 1.5
beam_e.multiple_particles_pos_z = 4.5 1.5 1.5
beam_e.multiple_particles_ux = 0.3 0.2 0.1
beam_e.multiple_particles_uy = 0.4 -0.3 -0.1
beam_e.multiple_particles_uy = 0.4 -0.3 -0.1
beam_e.multiple_particles_uz = 0.3 0.1 -10.
beam_e.multiple_particles_weight = 1. 2 3
beam_e.multiple_particles_weight = 1. 2 3
beam_e.initialize_self_fields = 0
beam_e.self_fields_required_precision = 5e-10
beam_e.do_qed_quantum_sync = 1
Expand All @@ -90,21 +90,21 @@ beam_e.do_not_deposit = 1
beam_p.species_type = positron
beam_p.injection_style = MultipleParticles
beam_p.multiple_particles_pos_x = 4.5 3.5 0.5
beam_p.multiple_particles_pos_y = 4.5 2.5 1.5
beam_p.multiple_particles_pos_z = 4.5 1.5 1.5
beam_p.multiple_particles_pos_y = 4.5 2.5 1.5
beam_p.multiple_particles_pos_z = 4.5 1.5 1.5
beam_p.multiple_particles_ux = 0.3 0.2 0.1
beam_p.multiple_particles_uy = 0.4 -0.3 -0.1
beam_p.multiple_particles_uy = 0.4 -0.3 -0.1
beam_p.multiple_particles_uz = 0.3 0.1 -10.
beam_p.multiple_particles_weight = 1. 2 3
beam_p.multiple_particles_weight = 1. 2 3
beam_p.initialize_self_fields = 0
beam_p.self_fields_required_precision = 5e-10
beam_p.do_qed_quantum_sync = 1
beam_p.qed_quantum_sync_phot_product_species = pho
beam_p.qed_quantum_sync_phot_product_species = pho
beam_p.do_not_push = 1
beam_p.do_not_deposit = 1

pho.species_type = photon
pho.injection_style = none
pho.species_type = photon
pho.injection_style = none

#################################
############# QED ###############
Expand All @@ -116,7 +116,7 @@ qed_qs.chi_min = 1.e-3
qed_bw.lookup_table_mode = builtin
qed_bw.chi_min = 1.e-2

warpx.do_qed_schwinger = 0
warpx.do_qed_schwinger = 0

#################################
######### DIAGNOSTICS ###########
Expand Down Expand Up @@ -145,7 +145,7 @@ warpx.reduced_diags_names = FieldEnergy FieldMomentum FieldMaximum ParticleExtre

ColliderRelevant_beam_e_beam_p.type = ColliderRelevant
ColliderRelevant_beam_e_beam_p.intervals = 1
ColliderRelevant_beam_e_beam_p.species =beam_e beam_p
ColliderRelevant_beam_e_beam_p.species =beam_e beam_p

FieldEnergy.type = FieldEnergy
FieldEnergy.intervals = out_freq_red
Expand Down

0 comments on commit 23516c9

Please sign in to comment.