Skip to content

Commit

Permalink
256 cpu cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnonaka committed Dec 20, 2024
1 parent 5a3eee6 commit da42dc1
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 0 deletions.
130 changes: 130 additions & 0 deletions run_plasma/inputs.2d_256cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
amrex.use_gpu_aware_mpi = 1

mlmg.setPreSmooth = 2
mlmg.setPostSmooth = 2

mlmg.setFinalSmooth = 8
mlmg.setBottomSmooth = 0

mlmg.bottomSolver = 0
mlmg.setBottomTolerance = 1.e-4

lpinfo.setMaxCoarseningLevel = 30

# Argon
# We want to simulate Figs. 4 (b), 5 (a) and (b), and 7 (a) in Rauf et al. 2020.

my_constants.Ngas = 3.22e20 # 100 mTorr # (m^-3)
my_constants.Tgas = 300. # (K)
my_constants.Te = 23212. # (K) see Chen et al. 2024
my_constants.Nplasma = 5.e16 # (m^-3) see Chen et al. 2024
my_constants.freq = 13.56e6 # (Hz)
my_constants.Mion = 6.63e-26 # (kg)
my_constants.voltage = 100. # (V)
my_constants.clight = 3.e8 # speed of light in vacuum
my_constants.m_e = 9.11e-31 # (kg)
my_constants.kb = 1.38e-23 # (J/K)

# amr.restart = ./diags/chk01450000
max_step = 100 # 2000000 # 5000 RF cycles
warpx.verbose = 1
warpx.const_dt = 1.0/(400*freq)
warpx.do_electrostatic = labframe
warpx.self_fields_required_precision = 1.e-7 #
warpx.use_filter = 0
warpx.sort_intervals = -1

amr.n_cell = 2048 1024
amr.max_grid_size_x = 128
amr.max_grid_size_y = 64
amr.blocking_factor = 8
amr.max_level = 0

geometry.dims = 2
geometry.prob_lo = -0.1035 -0.0527 # x z # cover complete chamber (do not exploit symmetry)
geometry.prob_hi = 0.1035 0.0527
boundary.field_lo = pec pec
boundary.field_hi = pec pec
boundary.potential_hi_x = 0.
boundary.potential_lo_z = 0.
boundary.potential_lo_x = 0.
boundary.potential_hi_z = 0.
boundary.particle_lo = reflecting reflecting
boundary.particle_hi = reflecting reflecting

# Order of particle shape factors
algo.particle_shape = 1

# EB
my_constants.te_xmax = 0.0488
my_constants.dx_thick = 0.0032 # dielectric thickness
my_constants.be_xmax = 0.052
my_constants.zhi = 0.0128
my_constants.zlo = -0.0128
warpx.eb_implicit_function = "min(max((zlo-z),(z-zhi)),-max((x+(-be_xmax)),-(x+be_xmax)))" # "if( ((z>zhi) or (z<zlo)) and (x<be_xmax) and (x>-be_xmax) , 1,-1 )" # ??
warpx.eb_potential(x,y,z,t) = " sin(2*pi*freq*t)*(voltage*(z>zhi)*(x<te_xmax)*(x>-te_xmax) + voltage*(z>zhi)*(x>te_xmax)*(x<be_xmax)*(be_xmax-x)/dx_thick + voltage*(z>zhi)*(x<-te_xmax)*(x>-be_xmax)*(x+be_xmax)/dx_thick + 0.*(z<zlo)*(x<be_xmax)*(x>-be_xmax)) "

particles.species_names = electrons ar_ions

electrons.species_type = electron
electrons.injection_style = nuniformpercell
electrons.initialize_self_fields = 0
electrons.num_particles_per_cell_each_dim = 8 8
electrons.profile = constant
electrons.density = Nplasma
electrons.momentum_distribution_type = maxwell_boltzmann
electrons.theta = (kb*Te/(m_e*clight^2))

ar_ions.species_type = argon
ar_ions.charge = q_e
ar_ions.injection_style = nuniformpercell
ar_ions.initialize_self_fields = 0
ar_ions.num_particles_per_cell_each_dim = 8 8
ar_ions.profile = constant
ar_ions.density = Nplasma
ar_ions.momentum_distribution_type = maxwell_boltzmann
ar_ions.theta = (kb*Tgas/(Mion*clight^2))
ar_ions.save_particles_at_eb = 1

#collisions.collision_names = coll_elec coll_ion
coll_ion.type = background_mcc
coll_ion.species = ar_ions
coll_ion.background_density = Ngas
coll_ion.background_temperature = Tgas
coll_ion.scattering_processes = elastic back charge_exchange
coll_ion.elastic_cross_section = /global/cfs/cdirs/mp111/warpx-data/MCC_cross_sections/Ar/ion_scattering.dat
coll_ion.back_cross_section = /global/cfs/cdirs/mp111/warpx-data/MCC_cross_sections/Ar/ion_back_scatter.dat
coll_ion.charge_exchange_cross_section = /global/cfs/cdirs/mp111/warpx-data/MCC_cross_sections/Ar/charge_exchange.dat

coll_elec.type = background_mcc
coll_elec.species = electrons
coll_elec.background_density = Ngas
coll_elec.background_temperature = Tgas
coll_elec.scattering_processes = elastic excitation1 ionization
coll_elec.elastic_cross_section = /global/cfs/cdirs/mp111/warpx-data/MCC_cross_sections/Ar/electron_scattering.dat
coll_elec.excitation1_energy = 11.5
coll_elec.excitation1_cross_section = /global/cfs/cdirs/mp111/warpx-data/MCC_cross_sections/Ar/excitation_1.dat
coll_elec.ionization_energy = 15.7596112
coll_elec.ionization_cross_section = /global/cfs/cdirs/mp111/warpx-data/MCC_cross_sections/Ar/ionization.dat
coll_elec.ionization_species = ar_ions

#diagnostics.diags_names = plt chk #plt_eb
#plt.diag_type = Full
#plt.intervals = 1
#plt.fields_to_plot = phi
#plt.file_min_digits = 8

#plt_eb.diag_type = BoundaryScraping
#plt_eb.format = openpmd
#plt_eb.fields_to_plot = phi
#plt_eb.particle_field_species = ar_ions
#plt_eb.intervals = 190000:200000:1000

#chk.diag_type = Full
#chk.format = checkpoint
#chk.intervals = 1000
#chk.file_min_digits = 8

#warpx.reduced_diags_names = partnum
#partnum.type = ParticleNumber
#partnum.intervals = 1
15 changes: 15 additions & 0 deletions run_plasma/run_256cpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
#SBATCH -N 2
#SBATCH -C cpu
#SBATCH -q debug
#SBATCH -J 256cpu
#SBATCH -t 00:30:00

#OpenMP settings:
export OMP_NUM_THREADS=1
export OMP_PLACES=threads
export OMP_PROC_BIND=spread

#run the application:
srun -n 256 -c 2 --cpu_bind=cores ./warpx.2d.MPI.OMP.DP.PDP.OPMD.EB inputs.2d_256cpu

0 comments on commit da42dc1

Please sign in to comment.