diff options
Diffstat (limited to 'Examples/Modules')
15 files changed, 3 insertions, 507 deletions
diff --git a/Examples/Modules/boosted_diags/inputs.2d b/Examples/Modules/boosted_diags/inputs.2d deleted file mode 100644 index 6afe6977d..000000000 --- a/Examples/Modules/boosted_diags/inputs.2d +++ /dev/null @@ -1,95 +0,0 @@ -# Maximum number of time steps -max_step = 260 - -# number of grid points -amr.n_cell = 64 64 512 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. - -amr.max_grid_size = 32 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 -amr.plot_int = 10 # How often to write plotfiles. "<= 0" means no plotfiles. -amr.check_int = 10 - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 0 # Is periodic? -geometry.prob_lo = -150.e-6 -150.e-6 -0.6e-3 # physical domain -geometry.prob_hi = 150.e-6 150.e-6 0. - -# Verbosity -warpx.verbose = 1 - -# Algorithms -algo.current_deposition = direct - -# Numerics -interpolation.nox = 3 -interpolation.noy = 3 -interpolation.noz = 3 -warpx.use_filter = 1 -warpx.cfl = 1.0 -warpx.do_pml = 0 - -# Moving window -warpx.do_moving_window = 1 -warpx.moving_window_dir = z -warpx.moving_window_v = 1.0 # in units of the speed of light - -# Boosted frame -warpx.gamma_boost = 15. -warpx.boost_direction = z - -# Diagnostics -warpx.do_boosted_frame_diagnostic = 1 -warpx.num_snapshots_lab = 20 -warpx.dt_snapshots_lab = 7.0e-14 - -# Species -particles.nspecies = 2 -particles.species_names = electrons ions - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "NUniformPerCell" -electrons.xmin = -150.e-6 -electrons.xmax = 150.e-6 -electrons.ymin = -150.e-6 -electrons.ymax = 150.e-6 -electrons.zmin = 0.e-6 -electrons.num_particles_per_cell_each_dim = 1 1 2 -electrons.profile = constant -electrons.density = 1. -electrons.momentum_distribution_type = "constant" -electrons.do_continuous_injection = 1 - -ions.charge = q_e -ions.mass = m_p -ions.injection_style = "NUniformPerCell" -ions.xmin = -150.e-6 -ions.xmax = 150.e-6 -ions.ymin = -150.e-6 -ions.ymax = 150.e-6 -ions.zmin = 0.e-6 -ions.num_particles_per_cell_each_dim = 1 1 2 -ions.profile = constant -ions.density = 1. -ions.momentum_distribution_type = "constant" -ions.do_continuous_injection = 1 - -# Laser -lasers.nlasers = 1 -lasers.names = laser1 -laser1.profile = Gaussian -laser1.position = 0. 0. -1.e-6 # This point is on the laser plane -laser1.direction = 0. 0. 1. # The plane normal direction -laser1.polarization = 1. 0. 0. # The main polarization vector -laser1.e_max = 8.e12 # Maximum amplitude of the laser field (in V/m) -laser1.profile_waist = 5.e-5 # The waist of the laser (in meters) -laser1.profile_duration = 16.7e-15 # The duration of the laser (in seconds) -laser1.profile_t_peak = 33.4e-15 # The time at which the laser reaches its peak (in seconds) -laser1.profile_focal_distance = 0.e-6 # Focal distance from the antenna (in meters) -laser1.wavelength = 0.8e-6 # The wavelength of the laser (in meters) diff --git a/Examples/Modules/boosted_diags/inputs.3d b/Examples/Modules/boosted_diags/inputs.3d deleted file mode 100644 index 528eb6cd9..000000000 --- a/Examples/Modules/boosted_diags/inputs.3d +++ /dev/null @@ -1,95 +0,0 @@ -# Maximum number of time steps -max_step = 260 - -# number of grid points -amr.n_cell = 64 64 512 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. - -amr.max_grid_size = 32 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 -amr.plot_int = 10 # How often to write plotfiles. "<= 0" means no plotfiles. -amr.check_int = 10 - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 0 # Is periodic? -geometry.prob_lo = -150.e-6 -150.e-6 -0.6e-3 # physical domain -geometry.prob_hi = 150.e-6 150.e-6 0. - -# Verbosity -warpx.verbose = 1 - -# Algorithms -algo.current_deposition = direct - -# Numerics -interpolation.nox = 3 -interpolation.noy = 3 -interpolation.noz = 3 -warpx.use_filter = 1 -warpx.cfl = 1.0 -warpx.do_pml = 0 - -# Moving window -warpx.do_moving_window = 1 -warpx.moving_window_dir = z -warpx.moving_window_v = 1.0 # in units of the speed of light - -# Boosted frame -warpx.gamma_boost = 15. -warpx.boost_direction = z - -# Diagnostics -warpx.do_boosted_frame_diagnostic = 1 -warpx.num_snapshots_lab = 20; -warpx.dt_snapshots_lab = 7.0e-14; - -# Species -particles.nspecies = 2 -particles.species_names = electrons ions - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "NUniformPerCell" -electrons.xmin = -150.e-6 -electrons.xmax = 150.e-6 -electrons.ymin = -150.e-6 -electrons.ymax = 150.e-6 -electrons.zmin = 0.e-6 -electrons.num_particles_per_cell_each_dim = 1 1 2 -electrons.profile = constant -electrons.density = 1. -electrons.momentum_distribution_type = "constant" -electrons.do_continuous_injection = 1 - -ions.charge = q_e -ions.mass = m_p -ions.injection_style = "NUniformPerCell" -ions.xmin = -150.e-6 -ions.xmax = 150.e-6 -ions.ymin = -150.e-6 -ions.ymax = 150.e-6 -ions.zmin = 0.e-6 -ions.num_particles_per_cell_each_dim = 1 1 2 -ions.profile = constant -ions.density = 1. -ions.momentum_distribution_type = "constant" -ions.do_continuous_injection = 1 - -# Laser -lasers.nlasers = 1 -lasers.names = laser1 -laser1.profile = Gaussian -laser1.position = 0. 0. -1.e-6 # This point is on the laser plane -laser1.direction = 0. 0. 1. # The plane normal direction -laser1.polarization = 1. 0. 0. # The main polarization vector -laser1.e_max = 8.e12 # Maximum amplitude of the laser field (in V/m) -laser1.profile_waist = 5.e-5 # The waist of the laser (in meters) -laser1.profile_duration = 16.7e-15 # The duration of the laser (in seconds) -laser1.profile_t_peak = 33.4e-15 # The time at which the laser reaches its peak (in seconds) -laser1.profile_focal_distance = 0.e-6 # Focal distance from the antenna (in meters) -laser1.wavelength = 0.8e-6 # The wavelength of the laser (in meters) diff --git a/Examples/Modules/charged_beam/inputs b/Examples/Modules/charged_beam/inputs deleted file mode 100644 index 18b645281..000000000 --- a/Examples/Modules/charged_beam/inputs +++ /dev/null @@ -1,50 +0,0 @@ -# Maximum number of time steps -max_step = 40 - -# number of grid points -amr.n_cell = 63 63 63 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 32 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 - -amr.plot_int = 1 # How often to write plotfiles. "<= 0" means no plotfiles. - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 1 # Is periodic? -geometry.prob_lo = -20.e-6 -20.e-6 -20.e-6 # physical domain -geometry.prob_hi = 20.e-6 20.e-6 20.e-6 - -# Verbosity -warpx.verbose = 1 - -# Algorithms -algo.current_deposition = direct - -# CFL -warpx.cfl = 1.0 - -particles.nspecies = 1 -particles.species_names = electrons - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "NUniformPerCell" -electrons.num_particles_per_cell_each_dim = 2 2 2 - -electrons.xmin = -20.e-6 -electrons.xmax = 0.e-6 -electrons.ymin = -20.e-6 -electrons.ymax = 20.e-6 -electrons.zmin = -20.e-6 -electrons.zmax = 20.e-6 - -electrons.profile = constant -electrons.density = 1.e25 # number of electrons per m^3 - -electrons.momentum_distribution_type = "constant" -electrons.ux = 0.01 # ux = gamma*beta_x diff --git a/Examples/Modules/gaussian_beam/gaussian_beam_PICMI.py b/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py index a22e83794..ecc8f5a65 100644 --- a/Examples/Modules/gaussian_beam/gaussian_beam_PICMI.py +++ b/Examples/Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py @@ -45,9 +45,9 @@ electrons = picmi.Species(particle_type='electron', name='electrons', initial_di protons = picmi.Species(particle_type='proton', name='protons', initial_distribution=proton_beam) sim = picmi.Simulation(solver = solver, - max_steps = 1000, + max_steps = 10, verbose = 1, - warpx_plot_int = 8, + warpx_plot_int = 10, warpx_current_deposition_algo = 'direct') sim.add_species(electrons, layout=picmi.PseudoRandomLayout(n_macroparticles=number_sim_particles)) diff --git a/Examples/Modules/gaussian_beam/inputs b/Examples/Modules/gaussian_beam/inputs deleted file mode 100644 index 46cd785f2..000000000 --- a/Examples/Modules/gaussian_beam/inputs +++ /dev/null @@ -1,100 +0,0 @@ -# Maximum number of time steps -max_step = 1000 - -# number of grid points -amr.n_cell = 32 32 32 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 16 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 - -amr.plot_int = 8 # How often to write plotfiles. "<= 0" means no plotfiles. - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 0 # Is periodic? -geometry.prob_lo = -2. -2. -2. # physical domain -geometry.prob_hi = 2. 2. 2. - -# Verbosity -warpx.verbose = 1 - -# Algorithms - -# interpolation -interpolation.nox = 3 -interpolation.noy = 3 -interpolation.noz = 3 - -# CFL -warpx.cfl = 1.0 - -# Information about the particle species -particles.nspecies = 2 -particles.species_names = electrons protons - -# -# The electron species information -# - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "gaussian_beam" -electrons.x_rms = 0.25 -electrons.y_rms = 0.25 -electrons.z_rms = 0.25 -electrons.x_m = 0. -electrons.y_m = 0. -electrons.z_m = 0. -electrons.npart = 32768 -electrons.q_tot = -8.010883097437485e-07 - -electrons.profile = "constant" -electrons.density = 1 -electrons.momentum_distribution_type = "radial_expansion" -electrons.u_over_r = -0.04 - -electrons.xmin = -2 -electrons.xmax = 2 -electrons.ymin = -2 -electrons.ymax = 2 -electrons.zmin = -2 -electrons.zmax = 2 - -# -# The proton species information -# - -protons.charge = q_e -protons.mass = m_p -protons.injection_style = "gaussian_beam" -protons.x_rms = 0.25 -protons.y_rms = 0.25 -protons.z_rms = 0.25 -protons.x_m = 0. -protons.y_m = 0. -protons.z_m = 0. -protons.npart = 32768 -protons.q_tot = 8.010883097437485e-07 - -protons.profile = "constant" -protons.density = 1 -protons.momentum_distribution_type = "radial_expansion" -protons.u_over_r = 0. - -protons.xmin = -2 -protons.xmax = 2 -protons.ymin = -2 -protons.ymax = 2 -protons.zmin = -2 -protons.zmax = 2 - -warpx.do_pml = 0 - -# Moving window -warpx.do_moving_window = 0 -warpx.moving_window_dir = z -warpx.moving_window_v = 1.0 # in units of the speed of light diff --git a/Examples/Modules/ionization/ionization_analysis.py b/Examples/Modules/ionization/analysis_ionization.py index f512eac6e..f512eac6e 100755 --- a/Examples/Modules/ionization/ionization_analysis.py +++ b/Examples/Modules/ionization/analysis_ionization.py diff --git a/Examples/Modules/laser_injection/Visualization.ipynb b/Examples/Modules/laser_injection/Visualization.ipynb deleted file mode 100644 index 68dd53ac7..000000000 --- a/Examples/Modules/laser_injection/Visualization.ipynb +++ /dev/null @@ -1,137 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Overview\n", - "\n", - "This a notebook that inspects the results of a WarpX simulation.\n", - "\n", - "# Instructions\n", - "\n", - "Execute the cells below one by one, by selecting them with your mouse and typing `Shift + Enter`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Import statements\n", - "import sys\n", - "from tqdm import tqdm\n", - "import yt, glob\n", - "yt.funcs.mylog.setLevel(50)\n", - "from IPython.display import clear_output\n", - "import numpy as np\n", - "from ipywidgets import interact, RadioButtons, IntSlider\n", - "import matplotlib.pyplot as plt\n", - "%matplotlib\n", - "\n", - "# Find iterations\n", - "file_list = glob.glob('plt?????')\n", - "iterations = [ int(file_name[3:]) for file_name in file_list ]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Functions to plot the fields" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def plot_field( iteration, field, slicing_direction='y', plotter='matplotlib' ):\n", - " ds = yt.load( './plt%05d/' %iteration )\n", - " all_data_level_0 = ds.covering_grid(level=0, \n", - " left_edge=ds.domain_left_edge, dims=ds.domain_dimensions)\n", - " \n", - " if plotter == 'yt':\n", - " sl = yt.SlicePlot(ds, slicing_direction, field)\n", - " sl.set_log( field, False)\n", - " sl.annotate_grids()\n", - " # Show the new plot\n", - " clear_output()\n", - " sl.show()\n", - "\n", - " elif plotter == 'matplotlib':\n", - "\n", - " left_edge = ds.domain_left_edge.convert_to_mks()*1.e6\n", - " right_edge = ds.domain_right_edge.convert_to_mks()*1.e6\n", - " \n", - " if slicing_direction == 'x':\n", - " n = int( ds.domain_dimensions[0]//2 )\n", - " data2d = all_data_level_0[field][n, :, :]\n", - " extent = [ left_edge[2], right_edge[2], left_edge[1], right_edge[1] ]\n", - " elif slicing_direction == 'y':\n", - " n = int( ds.domain_dimensions[1]//2 )\n", - " data2d = all_data_level_0[field][:, n, :]\n", - " extent = [ left_edge[2], right_edge[2], left_edge[0], right_edge[0] ]\n", - " elif slicing_direction == 'z':\n", - " n = int( ds.domain_dimensions[2]//2 )\n", - " data2d = all_data_level_0[field][:, :, n]\n", - " extent = [ left_edge[1], right_edge[1], left_edge[0], right_edge[0] ]\n", - " plt.clf()\n", - " plt.title(\"%s at iteration %d\" %(field, iteration) )\n", - " plt.imshow( data2d, interpolation='nearest', cmap='viridis',\n", - " origin='lower', extent=extent, aspect='auto' )\n", - " plt.colorbar()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Interactive viewer" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "interact(plot_field, \n", - " iteration = IntSlider(min=min(iterations), max=max(iterations), step=iterations[1]-iterations[0]),\n", - " field = RadioButtons( options=['jx', 'jy', 'jz', 'Ex', 'Ey', 'Ez'], value='jz'),\n", - " slicing_direction = RadioButtons( options=[ 'x', 'y', 'z'], value='y'),\n", - " plotter = RadioButtons( options=['matplotlib', 'yt'] ) )" - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python [default]", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.5.2" - } - }, - "nbformat": 4, - "nbformat_minor": 1 -} diff --git a/Examples/Modules/laser_injection/laser_analysis.py b/Examples/Modules/laser_injection/analysis_laser.py index 1951bb29a..1951bb29a 100755 --- a/Examples/Modules/laser_injection/laser_analysis.py +++ b/Examples/Modules/laser_injection/analysis_laser.py diff --git a/Examples/Modules/nci_corrector/ncicorr_analysis.py b/Examples/Modules/nci_corrector/analysis_ncicorr.py index 94dd2f838..94dd2f838 100755 --- a/Examples/Modules/nci_corrector/ncicorr_analysis.py +++ b/Examples/Modules/nci_corrector/analysis_ncicorr.py diff --git a/Examples/Modules/nci_corrector/inputs2d b/Examples/Modules/nci_corrector/inputs.2d index 0bcffbe85..61278a8e6 100644 --- a/Examples/Modules/nci_corrector/inputs2d +++ b/Examples/Modules/nci_corrector/inputs.2d @@ -14,8 +14,6 @@ amr.blocking_factor = 8 # Maximum level in hierarchy (for now must be 0, i.e., one level in total) amr.max_level = 0 -warpx.fine_tag_lo = -20.e-6 -20.e-6 -warpx.fine_tag_hi = 20.e-6 20.e-6 # Geometry geometry.coord_sys = 0 # 0: Cartesian diff --git a/Examples/Modules/qed/breit_wheeler/check_2d_tau_init.py b/Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py index 850ecc0fe..850ecc0fe 100755 --- a/Examples/Modules/qed/breit_wheeler/check_2d_tau_init.py +++ b/Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py diff --git a/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init b/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init index 780e958b1..98bebc015 100644 --- a/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init +++ b/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init @@ -11,8 +11,6 @@ geometry.is_periodic = 0 0 # Is periodic? geometry.prob_lo = -32.e-6 -32.e-6 # physical domain geometry.prob_hi = 32.e-6 32.e-6 amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported) -warpx.fine_tag_lo = -5.e-6 -35.e-6 -warpx.fine_tag_hi = 5.e-6 -25.e-6 ################################# ############ NUMERICS ########### @@ -28,8 +26,6 @@ warpx.verbose = 1 warpx.do_dive_cleaning = 0 warpx.plot_raw_fields = 0 warpx.plot_raw_fields_guards = 0 -warpx.plot_finepatch = 0 -warpx.plot_crsepatch = 0 warpx.use_filter = 1 warpx.cfl = 1. # if 1., the time step is set to its CFL limit warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition @@ -63,6 +59,7 @@ photons.uz_m = 0.0 photons.ux_th = 100. photons.uy_th = 100. photons.uz_th = 100. + ##########QED#################### photons.do_qed = 1 photons.do_qed_breit_wheeler = 1 diff --git a/Examples/Modules/qed/quantum_synchrotron/check_2d_tau_init.py b/Examples/Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py index 05b313ee6..05b313ee6 100755 --- a/Examples/Modules/qed/quantum_synchrotron/check_2d_tau_init.py +++ b/Examples/Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py diff --git a/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init b/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init index 0de4169be..8baedbf52 100644 --- a/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init +++ b/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init @@ -11,8 +11,6 @@ geometry.is_periodic = 0 0 # Is periodic? geometry.prob_lo = -32.e-6 -32.e-6 # physical domain geometry.prob_hi = 32.e-6 32.e-6 amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported) -warpx.fine_tag_lo = -5.e-6 -35.e-6 -warpx.fine_tag_hi = 5.e-6 -25.e-6 ################################# ############ NUMERICS ########### @@ -28,8 +26,6 @@ warpx.verbose = 1 warpx.do_dive_cleaning = 0 warpx.plot_raw_fields = 0 warpx.plot_raw_fields_guards = 0 -warpx.plot_finepatch = 0 -warpx.plot_crsepatch = 0 warpx.use_filter = 1 warpx.cfl = 1. # if 1., the time step is set to its CFL limit warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition diff --git a/Examples/Modules/restart/inputs b/Examples/Modules/restart/inputs deleted file mode 100644 index 175c714b2..000000000 --- a/Examples/Modules/restart/inputs +++ /dev/null @@ -1,18 +0,0 @@ -# Basic simulation parameters -max_step = 500 -amr.n_cell = 256 256 -amr.max_grid_size = 32 -amr.max_level = 0 -particles.nspecies = 0 - -# Geometry parameters -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 0 0 0 # Is periodic? -geometry.prob_lo = -50.e-6 0. # physical domain -geometry.prob_hi = 50.e-6 30.e-6 - -# Number of iterations between consecutive checkpoint dumps -amr.check_int = 200 - -# Checkpoint file from which to restart the simulation. -# amr.restart = chk00400 |