INTERACTIVE 1D PARTICLE SIMULATION OF PLASMA

Viktor K. Decyk, UCLA

INSTRUCTIONS FOR STUDENTS USING SUN UNIX AT SUNSPOT



USEFUL POINTERS:

  • DESCRIPTION OF SIMULATION MODEL

    Input Parameters

    Main Parameters (page 1)
    Diagnostic Parameters (page 2)
    Extra Parameters (page 3)

    Flow Chart for BEPS1

  • DESCRIPTION OF POTENTIAL POST-PROCESSOR
    Input Parameters

  • DESCRIPTION OF DEBYE CLOUD POST-PROCESSOR
    Input Parameters

  • DESCRIPTION OF SPATIAL PROFILE POST-PROCESSOR
    Input Parameters

  • INSTRUCTIONS FOR INSTALLATION WITH UNIX
    Installation of Diagnostic Post-Processors

  • SAMPLE INPUTS (ASSIGNMENTS FROM 1990)


  • The preferred terminal for this program is the GraphOn 407HR, which emulates the Tektronix 4105 color terminal. There is one of them in Knudsen 1-129. The other GraphOn terminals in the various student of- fices emulate the Tektronix 4014 monochrome terminals. The Sun terminal itself can also be used for monochrome graphics. The AT&T terminals in Knudsen 1-129 are not graphic terminals, and are capable of producing only crude printer plots. SUNSPOT can be accessed through Internet (sunspot.physics.ucla.edu), or by telephone dial-up line (213 ???-????). Telephone access is limited to 1200 baud, and is therefore rather slow. It requires the terminal to be set to full duplex, no parity, 8 bit data.

    When one has successfully logged onto the SUN 3/60, one should change to the beps1 directory with the following command:

    cd /usr/data/beps1

    the documentation for this program is contained in a file called beps1.doc. To view it on the terminal, type the command:

    cat doc

    and to print it, type:

    lpr doc

    The output will appear on the Laser printer in Knudsen 1-130.

    To start executing the simulation program one issues the command:

    g.sh

    One should then get a message identifying the BEPS1 program. After hit- ting carriage return, one gets the input parameter menu, and the follow- ing message prompting you to enter a command:

    enter menu choice a,b,c, or type quit or run

    The menu choices a, b, and c select the main, diagnostic, and extras input parameters, respectively. After choosing one of these, a list of the appropriate parameters will appear, followed by the message:

    enter parameter, or type help,brief,full,quit,or menu

    The various commands which are possible are explained if you type HELP:



    Once the parameters are satisfactory, type run. The program will then be compiled. You will then be asked which output device you wish to use for the graphics. There are currently three possible graphics terminals which can be used, the Tektronix 4014 and Tektronix 4105 or compatibles, or the Sun terminal. A line terminal means a non-graphic, ascii terminal, which produces only crude printer plots. The output can also be sent directly to the Laser printer, or to a graphics metafile, which can be used for later viewing or for making printed copies, or no graphics at all can be generated.

    After you choose your graphics device, the program will be linked with the appropriate graphics library, and it will ask you if it is ok to reuse all diagnostic datasets. The datasets being referred to are for the output of various diagnostics which the user had selected, and which can be examined by various post-processing programs. If you do not intend to keep around the output of more than one run at a time, then answer ok.

    The simulation will then execute, producing plots on the terminal or printer or in the metafile. On the Tektronix color terminal, curves labeled A will be blue and those labeled B will be red. When the out- put is coming to the terminal, the program will halt when the requested number of plots per page has appeared. A number of commands can be en- tered at this point. Type ? to list the possible commands. These are:



    If a metafile was chosen, the name of the metafile will be printed on the screen at the end of the simulation (and will be called agraph.m unless you gave it a different name), and the user will be asked if the metafile should be plotted or viewed. If plotting was chosen, the out- put will be sent to the Laser printer in Knudsen 1-130. If viewing was chosen, the user can display the graphics on the Tektronix graphics de- vices, the Sun terminal, or on an ascii (non-graphics) terminal. After viewing, the user will be asked again if the output should be plotted. It is also possible to submit jobs to be plotted independently of the main simulation by typing in UNIX:

    m.sh filename

    where filename is the name of the metafile to be plotted. Similarly, the metafiles can be viewed independently of the main simulation by typing:

    l.sh filename

    After the simulation is finished, the user is then invited to run a post-processor, or quit. Running the post-processors is similar to run- ning the simulation program.

    When the user is done with the simulation, he or she should sign off SUNSPOT with the following command:

    logout

    It is also possible to execute the post-processors independently of the main simulation. For example, to execute the potential post- processor, type:

    p.sh filename

    where filename is the name of the file containing the potential data. If you haven't given it a name, it is called pot1.d. If the output of the potential post-processor is sent to a metafile, it will be called pgraph.m, unless you give it a different name, and the user can then plot or view it if he or she wished.

    To execute the debye cloud profile post-processor, type:

    c.sh sfilename rfilename

    where sfilename is the name of the file containing the current potential data and rfilename is the name of the file containing the reference pot- tial. One of these files must have been given a name, and the other one one might be called pot1.d. If the output of the debye cloud post- processor is sent to a metafile, it will be called cgraph.m, unless you give it a different name.

    To execute the spatial profile post-processor, type:

    f.sh filename

    where filename is the name of the file containing the profile data. If you haven't given it a name, it is called pro1.d. If the output of the profile post-processor is sent to a metafile, it will be called fgraph.m, unless you give it a different name.



    DESCRIPTION OF SIMULATION MODEL



    1. INTRODUCTION

    The plasma simulation program BEPS1 integrates in time the trajectories of a large number of charged particles in their self-consistent coulomb fields. In BEPS1, all spatial variation occurs in the x direc- tion only, with all field quantities calculated on a fixed grid (i.e, at fixed points x).

    The basic loop of the program is quite simple. From the known ini- tial positions of the particles, x(i), one calculates the charge den- sity q(x), at the grid locations x, by interpolation using quadratic spline functions. Schematically,

    q(x) = SUM ?q(i)*S(x - x(i))?,

    where S is the particle shape function, and the sum is over particles i. The electric field E(x) is then calculated at the grid points x by solv- ing Poisson's equation,

    dE(x)/dx = 4*pi*q(x),

    using an FFT algorithm. The force on each particle, at its location x(i), is found by interpolating back from the known electric field. Finally, the particle trajectories are updated by integrating Newton's second law,

    dv(i)/dt = (q(i)/m(i))*E(x(i))

    dx(i)/dt = v(i),

    using a time-centered leap-frog scheme. The cycle then repeats.

    From the particle co-ordinates, a number of useful macroscopic (i.e., average) quantities, such as potential or velocity distribution func- tions, are calculated as diagnostics along the way to tell us about the behavior of the computer plasma.

    In this code, all lengths are normalized to the grid space d, which will be related to a physical length later. The physical size of the simulation is then given by Lx = d*NX, where NX is the number of grid points used (NX = 2**INDX). All times are normalized to the inverse electron plasma frequency Wpe**-1, where Wpe**2 = 4*pi*n0*e**2/Me and n0 is the total density of electrons, background electrons plus beam. The velocities are normalized to the combination d*Wpe. Thus in one unit of computer time, a particle with one unit of velocity moves one grid point. In dimensionless units, the electron debye length Ld/d = Vt/d*Wpe, is equal to the dimensionless electron thermal velocity VTX, which is one of the input parameters to the simulation. The grid space d is thus related to the electron debye length through the relation d = Ld/VTX.

    The physical electric field E is normalized by the expression, e*E/Me*(Wpe**2)*d. In these units, a unit electric field will increase an electron's velocity by one velocity unit in one unit of computer time. The physical potential V is similarly normalized by the expres- sion e*V/Me*(Wpe**2)*d**2. In these units one can show that the dimen- sionless potential is the same as (e*V/k*Te)*VTX**2.

    Physical energies W are normalized to W/Me*(Wpe**2)*d**2. Thus one unit of computer energy is twice the kinetic energy of an electron moving with unit velocity.

    The program can also be run relativistically if the parameter CI > 0. In that case, all quantities which previously referred to velocity, such as VTX, now refer to the momentum divided by the rest mass. The equations of motion are then:

    dv(i)/dt = (q(i)/m(i))*E(x(i))

    dx(i)/dt = v(i)/sqrt(1 + (v(i)/c)**2).

    2. MAIN PART OF SIMULATION

    Each of the three parts of the main iteration loop can be described in a little more detail.

    1. The charge deposition is performed as follows:

    q(x) = q(x) + q(i)*(.75 - dx(i)**2)

    q(x+1) = q(x+1) + .5*q(i)*(.5 + dx(i))**2

    q(x-1) = q(x-1) + .5*q(i)*(.5 - dx(i))**2,

    where x is the gridpoint nearest to x(i), and dx(i) = x(i) - x.

    2. The electric field is solved in two steps. First a periodic solu- tion is found, which satisfies the inhomogeneous equation, but the wrong boundary conditions. To this is added a solution of Laplace's equation to give the correct boundary conditions. The periodic solution is found by first taking the Fast Fourier Trans- form (FFT) of the charge density:

    q(k) = SUM ?q(i)*S(k)*exp(-sqrt(-1)*k*x(i))?,

    where k = 2*pi*n/NX, n integer, S(k) is the Fourier Transform of the particle shape function, and the sum is over particles i. The periodic electric field Ep(x) can then be found from the ex- pression:

    Ep(x) = -SUM ?(4*pi*sqrt(-1)*q(k)/k)*exp(sqrt(-1)*k*x)?,

    where the sum is over positive and negative values of n (zero ex- cluded). In one dimension the general solution of Laplace's equa- tion is just a linear function, so the final solution (allowing for non-neutral plasmas) is:

    E(x) = Ep(x) + 4*pi*q(k=0)*(x - NX/2) + A,

    where the constant A must be determined by the boundary condi- tions.

    3. The new particle co-ordinates are found from the expressions:

    v(i,t+dt/2) = v(i,t-dt/2) + q(i)*E(x(i))*dt/m(i)

    x(i,t+dt) = x(i,t) + v(t+dt/2)*dt,

    where the electric field at the particle's location is given by:

    E(x(i)) = (.75 - dx(i)**2)*E(x)
    + .5*?E(x+1)*(.5+dx(i))**2 + E(x-1)*(.5-dx(i))**2?,

    and x is the gridpoint nearest to x(i), and dx(i) = x(i) - x. If the program is relativistic, then the new co-ordinates are found from:

    v(i,t+dt/2) = v(i,t-dt/2) + q(i)*E(x(i))*dt/m(i)

    gamma = sqrt(1 + (v(i,t+dt/2)/c)**2)

    x(i,t+dt) = x(i,t) + v(t+dt/2)*dt/gamma.

    3. DIAGNOSTIC PART OF SIMULATION

    There are five main types of diagnostics performed in the simulation. These will be stored in files and/or displayed on the screen. They are:

    1. The trajectory diagnostic stores the co-ordinates of a selected group of test charges and displays a subset of these at the end of the run. Either ions or electrons can be chosen as test charges.

    2. The velocity-space diagnostic is actually three separate diagnos- tics. First it calculates and displays the velocity distribution function, in separate regions of space, if desired. This is cal- culated like the charge distribution, by accumulating number den- sity on a velocity-space grid. Second this diagnostic calculates and displays spatial profiles of density, kinetic energy, current, and/or kinetic energy flux. Third a scatter plot of particle phase space (v versus x for all particles) is displayed. This diagnostic is performed for both ions and electrons.

    3. The ion density diagnostic stores and displays the ion density, which is useful for looking at ion waves.

    4. The potential diagnostic stores and displays the potential, which is useful for looking at plasma waves.

    5. The energy diagnostic displays the electric field energy, the ki- netic energy of each species, the net energy of the system (total field and particle energy minus any work done by time-varying boundary conditions), the momentum of each species and the total momentum of the system.

    4. INPUT VARIABLES

    There are 59 input variables to the simulation code, divided into three subgroupings. The meanings of the variables in the first (main) subgrouping are as follows:


    Identification Parameter

    RUNID:
    This is a character label used to identify the run. It is printed in the heading of diagnostic files and hardcopy output.
    Plasma Parameters

    INDX:
    Since the Fast Fourier Transform (FFT) requires that the grid dimensions be a power of 2, INDX is the exponent which determines the length, NX = 2**INDX.

    NPX:
    The number of background electrons in the simulation.

    VTX:
    The initial thermal velocity of background electrons, used by the random number generator to give initial particle velocities.

    CI:
    The reciprocal of the velocity of light, in units Wpe/d. If CI = 0, then the code is not relativistic (speed of light is infinite).
    QME:
    The charge on an electron, in units of e. A typical value is -1.
    Boundary Parameters

    IBCS:
    The boundary conditions for the fields. There are seven possible choices:

    BVL:
    The boundary value for the field at x = 0. BVL can mean either the potential V(x=0), the normal electric field EX(x=0), or 4*pi times an external surface charge density SIG(x=0), depending on the boundary conditions specified by the parameter IBCS. Speci- fically, for

    IBCS = 1, BVL = V(x=0).
    IBCS = 2, BVL = 4*pi*SIG(X=0).
    IBCS = 3, BVL = 4*pi*(SIG(X=0) - SIG(X=NX)).
    IBCS = 4, BVL = V(X=0).
    IBCS = 5, BVL is not used.
    IBCS = 6, BVL is not used.
    IBCS = 7, BVL is an external electric field.

    Note that a special case occurs when IBCS = 7, and BVL is not zero. Namely, an external pump field is added to the self- consistent periodic electric field, of the form:

    Ext(x) = E0*SIN(K0*x + FREQ*TIME),

    where K0 = 2*PI*AMODEX/NX, and E0 is determined by:

    E0 = BVL*(TIME/TRMP), if TIME < TRMP,
    E0 = BVL, if TRMP < TIME < TOFF,
    E0 = 0, if TIME > TOFF.

    BVR: The boundary value for the field at x = NX. BVR can mean either the potential V(x=NX), the normal electric field EX(x=NX), or 4*pi times an external surface charge density SIG(x=NX), depend- ing on the boundary conditions specified by the parameter IBCS. Specifically, for

    IBCS = 1, BVR = V(x=NX).
    IBCS = 2, BVR = 4*pi*SIG(X=NX).
    IBCS = 3, BVR = V(NX).
    IBCS = 4, BVR = EX(NX).
    IBCS = 5, BVR = EX(NX).
    IBCS = 6, BVR = EX(NX).
    IBCS = 7, BVR is an external electric field.

    Note that a special case occurs when IBCS = 7, and BVR is not zero. Namely, an external pump field is added to the self- consistent periodic electric field, of the form:

    Ext(x) = E0*COS(K0*x - FREQ*TIME),

    where K0 = 2*PI*AMODEX/NX, and E0 is determined by:

    E0 = BVR*(TIME/TRMP), if TIME < TRMP,
    E0 = BVR, if TRMP < TIME < TOFF,
    E0 = 0, if TIME > TOFF.

    Time Parameters
    T0 : The time at the beginning of the simulation. Usually set to zero, unless an old run is being continued.

    TEND: The time at the end of the simulation, in units of Wpe**-1.

    DT: The integration time step, which should satisfy the condition Wmax*DT<<1, where Wmax is the maximum frequency one expects. For plasma oscillations, DT = .2 is a typical value.


    Ion Parameters

    MOVION: The simulation can be run either with moving ions (MOVION=1), or with a uniform neutralizing background (MOVION=0).

    RMASS: If ions are moving, RMASS is the ion/electron mass ratio.

    RTEMP: If ions are moving, RTEMP is the electron/ion initial temper- ature ratio. This ratio is used to fix the initial ion ther- mal velocity.

    QMI: The charge on an ion, in units of e. A typical value is 1.


    Beam Parameters

    NPXB: The number of electrons in a secondary subgroup, such as beam electrons. The total number of electrons in the simulation is then given by NP = NPX + NPXB.

    VDX: The drift (average) velocity for the secondary subgroup of elec- trons.

    VTDX: The initial thermal velocity for the secondary subgroup of electrons.

    QMB: The charge on a beam electron, in units of e. A typical value is -1.


    Numerical Parameters

    NPP: The number of electrons processed "simultaneously" by the vector processor. A number of 128 is usually about right.

    NTI: The simulation can push ions with a larger time step than elec- trons since the ions do not respond to high frequency fields. NTI is the number of electron time steps between ion time steps. Values larger than about 10 should be avoided. (NTI = 0 means the two time step scheme is not used.)

    AX: Each particle in the simulation has a finite shape, determined by the convolution of a gaussian filter,

    S(x) = exp(-.5*x**2/AX**2)/AX*sqrt(2*pi),

    with the interpolation function, where AX is the width of the filter in normalized units. If one uses quadratic spline inter- polation and has AX > .5, then this convolution is a wider gaus- sian with an effective width given by sqrt(.25 + AX*AX). To give reasonable suppression of grid errors while maintaining accurate physics, a typical choice is AX = .5*sqrt(3), which gives an ef- fective particle size of one grid space.

    EDGE: For non-periodic boundary conditions, particles are specularly reflected when their spatial co-ordinate x(i) is less than EDGE or greater than NX - EDGE. This parameter is also used to initially distribute the particles in space.


    Restart Parameters

    NUSTRT: Depending on the value of this constant, the initial particle co-ordinates and charge density are either initialized by the initialization subroutine (NUSTRT=1), or read from a restart file (NUSTRT=0,2). Furthermore, the accumulated time histo- ries of various diagnostics are either read from the restart file (NUSTRT=2), or contain data only from the current run (NUSTRT=0,1).

    NTR: The number of electron time steps between the writing of restart data on an external file, for use in either continuing a run at a later time, or restarting a run which has abnormally terminat- ed. (NTR = 0 means a restart file is not created.)



    The meanings of the variables in the second (diagnostic) subgrouping are as follows:



    Energy Diagnostic Parameter

    NTW: The number of electron time steps between energy diagnostic. (NTW = 0 means this diagnostic is omitted.) This diagnostic displays the values of electric field energy, kinetic energy of each species, and the net energy as functions of time at the end of the simulation.


    Trajectory Diagnostic Parameters

    NTT: The number of electron time steps between trajectory diagnostic. (NTT = 0 means this diagnostic is omitted.) This diagnostic stores the trajectories of NPROBT test particles, whose number (label) is previously stored by the user in a file. The values of the labels must range from 1 <= label <= NP for electrons, and NP+1 <= label <= 2*NP for ions.

    NPROBT: The number of test charges whose trajectories will be stored.

    NDIST: The number of test charges (out of NPROBT) whose x co- ordinates as a function of time will be displayed at the end of the simulation. The first NDIST particles out of NPROBT will be displayed.


    Potential Diagnostic Parameters

    NTP: The number of electron time steps between potential diagnostic. (NTP = 0 means this diagnostic is not performed.) This diagnos- tic calculates the potential. If IBCS = 7, the first n Fourier modes are written to disk, where n is given by the variable MODES. If IBCS is not 7, then the potential in real space is written to disk. In addition, this diagnostic calculates the energy of the first n Fourier modes (for all values of IBCS), and displays the time history of each mode at the end of the simulation. Note, however, that if periodic boundary conditions are not used, the Fourier modes are not the eigenmodes of the simulation. Depending on the value of NDP, the potential in real space is also displayed.

    MODES: The number of Fourier modes calculated by the potential diag- nostic.

    NDP: The number of times the potential diagnostic is performed before the potential in real space is displayed. In other words, the potential is displayed every NTP*NDP electron time steps. If NDP = 0, the potential is never displayed, but is still calcula- ted and stored to disk.


    Velocity-Space Diagnostic Parameters

    NTV: The number of electron time steps between velocity-space diag- nostics. (NTV = 0 means this diagnostic is not performed.) This diagnostic actually consists of three separate calcula- tions. First the velocity distribution as a function of veloci- ty is calculated and stored to disk. The velocity distribution can be calculated separately in NXB different regions of space. Depending on the values of JNMV and NDV, the velocity distribu- tions are also displayed. Second, NPRO spatial profiles from the possible choices of density, energy, current, and energy flux, are calculated and stored to disk. These profiles are re- lated to the first four velocity momemts as functions of space:

    PN(x) = SUM ?S(x - x(i))*v(i)**N?,

    where N is an integer < 5, S(x) is the particle shape function, and the sum is over particles. Thus density = P0(x), current = P1(x), energy = .5*Mass*P2(x), and energy flux = .5*Mass*P3(x). Depending on the values of JPRO and NDV, these profiles are also displayed. Finally, a phase space plot of the particle co- ordinates (v versus x) is displayed, depending on the values of JPS and NDV.

    NMV: The number of segments into which the positive velocity range is divided when calculating the velocity distribution function. The positive velocity range is given by (0,VM), where VM is the power of 2 which is greater than or equal to the velocity magni- tude of the fastest particle. The negative velocity range is given by (0,-VM). Thus the size of the velocity bin is given by VM/NMV. NMV = 40 is a typical value.

    NXB: The number of regions into which space is divided for the pur- pose of calculating velocity distribution functions. Velocity distributions are calculated separately in each spatial region, given by NX*IX/NXB < x < NX*(IX+1)/NXB, where IX is an integer < NXB.

    NPRS: The starting index for spatial profiles. NPRO profiles are calculated, starting with the profile corresponding to index N = NPRS, and ending with the profile corresponding to index N = NPRO - NPRS + 1. The profile index N = 1 corresponds to density, N = 2 to energy, N = 3 to current, and N = 4 to energy flux.

    NPRO: The number of spatial profiles to be calculated.


    Display Parameters

    JNMV: Flag which determines whether the velocity distributions are ever displayed (JNMV = 1), or not (JNMV = 0). They are still calculated and stored to disk, however, if NTV > 0.

    JPRO: Flag which determines whether the spatial profiles are ever displayed (JPRO = 1), or not (JPRO = 0). They are still calcu- lated and stored to disk, however, if NTV > 0.

    JPS: Flag which determines whether phase space plots of the particles are ever displayed (JPS = 1), or not (JPS = 0).

    NDV: The number of times the velocity-space diagnostics (velocity distributions, spatial profiles, and phase space plots) are per- formed before they are displayed. In other words, these diag- nostics are displayed every NTV*NDV electron time steps. If NDV = 0, they are never displayed, but the velocity distribu- tions and spatial profiles are still calculated and stored to disk.

    NPLOT: The number of plots which appear on the terminal at one time. This is useful for displaying multiple diagnostics simultane- ously. A value of NPLOT = 4 is reasonable.


    Density Diagnostic Parameters

    NTD: The number of electron time steps between ion density diagnos- tic. (NTD = 0 means this diagnostic is not performed.) This diagnostic calculates the ion density. If IBCS = 7, the first n Fourier modes are written to disk, where n is given by the variable MODED. If IBCS is not 7, then the ion density in real space is written to disk. Depending on the value of NDD, the ion density in real space is also displayed.

    MODED: The number of Fourier modes calculated by the ion density diagnostic.

    NDD: The number of times the ion density diagnostic is performed be- fore the ion density in real space is displayed. In other words, the ion density is displayed every NTD*NDD electron time steps. If NDD = 0, the ion density is never displayed, but is still calculated and stored to disk.



    The meanings of the variables in the third (extras) subgrouping are as follows:



    Initial Electron Density Parameters

    ANLE: The weight given the linear part of the following initial elec- tron density distribution:

    n(x) = N0*(1. + ANLE*(x/NX - .5) + ANSE*SIN(K0*x - PHASE)),

    where N0 is determined by the condition that NPX particles are are distributed in the region between EDGE < x < NX - EDGE, K0 = 2*PI*AMODEN/NX, and PHASE = FREQN*T0.

    ANSE: The weight given the sinusoidal part of the preceding initial electron distribution.


    Initial Sinusoidal Density Parameters

    AMODEN: The mode number which determines K0 in the sinusoidal part of the following density distribution used by either electrons or ions:

    n(x) = N0*(1. + ANL*(x/NX - .5) + ANS*SIN(K0*x - PHASE)),

    where N0 is determined by the condition that NPX particles are are distributed in the region between EDGE < x < NX - EDGE, K0 = 2*PI*AMODEN/NX, and PHASE = FREQN*T0.

    FREQN: The frequency which determines PHASE in the sinusoidal part of the preceding initial density distribution.


    Initial Ion Density Parameters

    ANLI: The weight given the linear part of the following initial ion density distribution:

    n(x) = N0*(1. + ANLI*(x/NX - .5) + ANSI*SIN(K0*x - PHASE)),

    where N0 is determined by the condition that NPX particles are are distributed in the region between EDGE < x < NX - EDGE, K0 = 2*PI*AMODEN/NX, and PHASE = FREQN*T0.

    ANSI: The weight given the sinusoidal part of the preceding initial ion distribution.


    External Field Parameters

    AMODEX: The mode number which determines K0 in the following expres- ision for an external pump field which is activated if IBCS=7, and BVL or BVR is not zero:

    Ext(x) = E1*SIN(K0*x + FREQ*TIME) + E2*COS(K0*x - FREQ*TIME)

    where K0 = 2*PI*AMODEX/NX.

    FREQ: The frequency of the external pump field in the expression for for Ext(x) given above.

    TRMP: The ramp-up time for the amplitude E1 and E2 of the external pump field in the expression for Ext(x) given above. The amp- litude E1 is determined by:

    E1 = BVL*(TIME/TRMP), if TIME < TRMP,
    E1 = BVL, if TRMP < TIME < TOFF,

    and the amplitude E2 is determined by:

    E2 = BVR*(TIME/TRMP), if TIME < TRMP,
    E2 = BVR, if TRMP < TIME < TOFF.

    TOFF: The shut-off time for the amplitude E1 and E2 of the external pump field in the expression for Ext(x) given above. The amp- tude E1 = E2 = 0, if TIME > TOFF.


    Test Charge Parameters

    QTEST: Charge on external test particle, in units of e. The plasma responds to the test particle, but the test particle does not respond to the plasma.

    VTEST: Velocity of test particle, which is not allowed to change.

    X0: Initial position of test particle.



    DESCRIPTION OF POTENTIAL POST-PROCESSOR



    1. INTRODUCTION

    The potential postprocessor analyzes, for periodic systems, various Fourier modes of potential or ion density data, which had been previous- ly recorded to disk by the main simulation program. The time history and frequency spectrum of each mode can be displayed. In addition, the autocorrelation function and its frequency spectrum can be calculated and displayed. Thus the frequency, wavelength, and growth rates of of the waves in the plasma can be identified.

    2. MAIN PART OF POST-PROCESSOR

    The post-processor allows one to extract only part of the data which had been recorded to disk. This is useful if the waves in the plasma are changing during the course of the simulation. In addition, a subset of the Fourier modes recorded to disk can be chosen for analysis.

    The frequency spectrum P(w) of a complex function F(t) is defined to be:

    P(w) = |(1/NT)*SUM?F(t)*exp(sqrt(-1)*w*(t-t0))?|**2,

    where the sum is over the NT time points selected, and the user can choose the frequency values w over some range. The spectrum of the raw data is always calculated and displayed. As an option, the time history of the real and imaginary parts of each elected Fourier mode F(k,t), the evolution of the real and imaginary parts in the complex plane, and the time history of the logarithm of the modulus of each Fourier mode can be displayed.

    Another option is to calculate the autocorrelation function C(tau) of each Fourier mode F(t), defined to be:

    C(tau) = SUM?conjg(G(t))*G(t+tau)?/(NT - tau),

    where G(t) = F(t) - F0, F0 = SUM?F(t)?/NT, and the sums are over the NT values of t. The frequency spectrum of the C(tau) will always be dis- played if this option is chosen. Furthermore, if the user had also cho- sen to display the time histories of the Fourier modes, then the time histories of the autocorrelation function will be similarly displayed.



    DESCRIPTION OF DEBYE CLOUD POST-PROCESSOR



    1. INTRODUCTION

    The Debye cloud post-processor reads the potential in space which had been previously recorded to disk by two different runs of the main simu- lation program, and displays their difference. Both the time history and time-averaged plots can be generated. In addition, the potential can be viewed in either a lab (stationary) or particle (moving) frame of reference. It is also possible to display the potential in a limited region of space (i.e., through a window).

    2. MAIN PART OF POST-PROCESSOR

    The post-processor allows one to extract only part of the data which had been recorded to disk, for example, to examine only the early time history. A time-average of the potential can be optionally calculated, where

    = (1/NT)*SUM?Pot(x,t)?,

    and the sum is over the NT time points selected, and x is the co-ordi- nate in the chosen frame of reference. The data can be viewed either in the lab frame or in a frame moving with a test charge. In the lab frame Pot(x) is displayed as a function of the spatial co-ordinate x, and in the moving frame Pot(x') is displayed as a function of the moving co- ordinate x' = x - x0 - v*t, where x0 is the initial test particle co- ordinate, and v is the test particle velocity.

    Finally, the scales of the plots can either be fixed (i.e., the same for all plots), or variable (i.e., allowing each plot to find its own best scale).

    3. INPUT VARIABLES

    There are 9 input variables to the post-processor. The meanings of the variables are as follows:


    Time Input Parameters

    LTS: Initial data point in the file to be used. This allows one to examine only part of the data file produced by the main simula- tion program. The time corresponding to the initial point is Ti = T0 + DTC*LTS, where DTC = NTP*DT for potential, and DTC = NTD*DT for ion density.

    ITS: Increment between data points in the file to be used. This al- lows one to use only every other data point, for example. The time between data points is then DTI = DTC*ITS.

    NTS: Total number of data points in the file to be used. The time corresponding to the last data point is Tf = Ti + DTI*(NTS - 1).

    MTS: Number of data points used in time-average. The length of time the data is averaged over is then DTI*MTS. (MTS = 0 means that the time-average is not calculated.)


    Space Parameters

    LAB: Parameter which determines whether lab (LAB = 1) or particle (LAB = 0) frame of reference is used.

    NXD: Half range of display in x direction. In the lab frame Pot(x) is displayed in the range NXH - NXD - NXS < x < NXH + NXD - NXS, where NXH = NX/2, whereas in the moving frame, Pot(x') is dis- layed in the range -NXD - NXS < x' < NXD - NXS, where

    x' = x - x0 - v*t.

    NXS: Forward shift of display in x direction.


    Display Parameters

    ISC: Power of two scale for plots. The function being plotted is displayed within the maximum and minimum values given by 2**ISC and -2**ISC, respectively. If ABS(ISC) > 115, the program finds the minimum value of ISC which will contain the function.

    NPLOT: The number of plots per page.



    DESCRIPTION OF SPATIAL PROFILE POST-PROCESSOR



    1. INTRODUCTION

    The Spatial profile post-processor reads and displays the profiles in space of velocity moments which had been previously recorded to disk by the main simulation program. Optionally, fluid quantities derived from the stored velocity moments can be calculated and displayed. Both in- stantaneous and time-averaged plots can be generated, either for ions or electrons.

    2. MAIN PART OF POST-PROCESSOR

    The post-processor allows one to extract only part of the data which had been recorded to disk, for example, to examine only the early time history. The following velocity moments could have been selected when the main simulation program was run:

    Density n(x) = SUM ?S(x - x(i))?
    Kinetic Energy U(x) = SUM ?.5*Mass*(v(i)**2)*S(x - x(i))?
    Current J(x) = SUM ?v(i)*S(x - x(i))?
    Kinetic Energy Flux K(x) = SUM ?.5*Mass*(v(i)**3)*S(x - x(i))?

    where S(x) is the particle shape function, and the sum is over parti- cles. Of these, only the NPRO subset which was selected when the main simulation was run, was stored to disk and can be displayed. If at least the first three of these was chosen (i.e., if NPRS = 1 and NPRO was greater than or equal to 3), then it is also possible to display the following fluid quantities:

    Density n(x) = SUM ?S(x - x(i))?
    Pressure P(x) = SUM ?Mass*((v(i) - u(x))**2)*S(x - x(i))?
    Fluid Velocity u(x) = SUM ?v(i)*S(x - x(i))?/n(x)
    Heat Flux Q(x) = SUM ?Mass*((v(i) - u(x))**3)*S(x - x(i))?

    One can show that the fluid quantities are related to the velocity mo- ments according to the relations:

    u(x) = J(x)/n(x), P(x) = 2U(x) - Mass*J(x)*u(x), and
    Q(x) = K(x) - 3U(x)*u(x) + Mass*J(x)*u(x)**2.

    A time-average of the profiles can be optionally calculated, where

    <F(x)> = (1/NT)*SUM?F(x,t)?,

    and the sum is over the NT time points selected, and x is the coordinate.

    Finally, the scales of the plots can either be fixed (i.e., the same for all plots), or variable (i.e., allowing each plot to find its own best scale).

    3. INPUT VARIABLES

    There are 10 input variables to the post-processor. The meanings of the variables are as follows:


    Time Input Parameters

    LTS: Initial data point in the file to be used. This allows one to examine only part of the data file produced by the main simula- tion program. The time corresponding to the initial point is

    Ti = T0 + DTC*LTS, where DTC = NTV*DT.

    ITS: Increment between data points in the file to be used. This al- lows one to use only every other data point, for example. The time between data points is then DTI = DTC*ITS.

    NTS: Total number of data points in the file to be used. The time corresponding to the last data point is Tf = Ti + DTI*(NTS - 1).

    MTS: Number of data points used in time-average. The length of time the data is averaged over is then DTI*MTS. (MTS = 0 means that the time-average is not calculated.)


    Profile Parameters

    IDS: The starting index for displaying spatial profiles. NDS profiles are displayed, starting with the profile corresponding to index N = IDS, and ending with the profile corresponding to index N = NDS - IDS + 1. IDS must be greater than or equal to NPRS. If IFL = 0, the profile index N = 1 corresponds to density, N = 2 to kinetic energy, N = 3 to current, and N = 4 to kinetic energy flux. If IFL = 1, the profile index N = 1 corresponds to density, N = 2 to pressure, N = 3 to fluid velocity, and N = 4 to heat flux.

    NDS: The number of spatial profiles to be displayed. NDS must be less than or equal to NPRO.

    ION: Parameter which determines whether ion (ION = 1) or electron (ION = 0) quantities will be displayed. ION can be set to 1 only if MOVION was equal to 1.

    IFL: Parameter which determines fluid variables (IFL = 1) or velocity moments (IFL = 0) will be displayed. IFL can be set to 1 only if NPRS = 1 and NPRO = 3 or 4.


    Display Parameters

    ISC: Power of two scale for plots. The function being plotted is displayed within the maximum and minimum values given by 2**ISC and -2**ISC, respectively. If ABS(ISC) > 115, the program finds the minimum value of ISC which will contain the function.

    NPLOT: The number of plots per page.



    INSTRUCTIONS FOR INSTALLATION WITH UNIX



    This section contains documentation for installing the interactive version of BEPS1, the 1D Bounded Electrostatic Particle Simulation Code. This version is for the SUN UNIX operating system. Thirty one files are necessary to install the complete system, including this one. They are:

    bldanls.sh
    bldcldp.sh
    bldcorp.sh
    bldgrmc.sh
    bldgrmp.sh
    bldgrms.sh
    bldgrmt.sh
    bldlibc.sh
    bldlibm.sh
    bldlibn.sh
    bldlibp.sh
    bldlibs.sh
    bldlibt.sh
    bldparm.sh
    bldpflp.sh
    bldsiml.sh
    c.sh
    i.sh
    f.sh
    g.sh
    l.sh
    m.sh
    p.sh
    corre.f
    dcloud.f
    doc
    beps1.f
    input
    nbldgrmt.sh
    nbldlibt.sh
    profile.f

    From these, nine executables and nine libraries must be created. They are:

    cldprm.out
    corrprm.out
    gramgs.out
    gramtk.out
    gramtx.out
    gramvc.out
    ngramtk.out
    param.out
    pflprm.out
    analysis.o
    libc.o
    libm.o
    libn.o
    libp.o
    libs.o
    libt.o
    nlibt.o
    simulib.o

    There are, in addition, six alternative files:

    bldgrmd.sh
    bldgrmr.f
    bldgrmv.f
    bldlibd.sh
    bldlibr.sh
    bldlibv.sh

    from which one can create three executables and three libraries:

    gramgr.out
    gramgt.out
    gramvr.out
    libd.o
    libr.o
    libv.o

    The command file contained in i.sh installs the complete system. To use it, type:

    i.sh

    Eighteen jobs will be submitted to create the nine executables and nine libraries. Specific details regarding each of these files are in the sections following.



    INSTALLATION OF MAIN SIMULATION



    In order to run the main simulation, one first needs the command file contained in g.sh, the main simulation code in beps1.f, and the input file input. Then one must create the executable

    param.out

    by executing the command file bldparm.sh This executable reads the simulation input file, input, allows the user to interactively update it, and then writes the updated file. More importantly, it also writes an include file, includa, and a namelist file, nlistf. The include file contains PARAMETER statements needed to dimension arrays in beps1.f, and the namelist file contains the remaining simulation input. These two files are the only way that data is passed to the simulation program.

    Next, one must create seven graphics libraries. These are:

    1. libn.o for no graphics output (dummy library),

    created by executing bldlibn.sh,

    2. libs.o for Sun terminals,

    created by executing bldlibs.sh (which requires SunCore graphics),

    3. libt.o for Tektronix 4014 terminals,

    created by executing bldlibt.sh,

    4. nlibt.o for Tektronix 4105 terminals,

    created by executing nbldlibt.sh,

    5. libp.o for ascii (non-graphic) terminals,

    created by executing bldlibp.sh,

    6. libm.o for graphics metafiles (hardcopy),

    created by executing bldlibm.sh,

    7. libc.o for Laser printers,

    created by executing bldlibc.sh (which requires Ncargraphics).

    In addition, one must create the simulation subroutine library

    simulib.o,

    by executing bldsiml.sh.

    Finally, one must create five executables for plotting or viewing graphics metafiles. These are:

    1. gramgs.out for Sun terminals,

    created by executing bldgrms.sh (which requires SunCore graphics),

    2. gramtk.out for Tektronix 4014 series terminals,

    created by executing bldgrmt.sh,

    3. ngramtk.out for Tektronix 4105 series terminals,

    created by executing nbldgrmt.sh,

    4. gramtx.out for ascii (non-graphic) terminals,

    created by executing bldgrmp.sh,

    5. gramvc.out for Laser printers,

    created by executing bldgrmc.sh (which requires Ncargraphics).

    Alternative drivers for the Tektronix 4105 terminals exist using the commercial graphics packages DISSPLA and DI-3000. Specifically, if DISSPLA is available, the library nlibt.o can be replaced by libd.o, which is created by executing bldlibd.sh, and the executable ngramtk.out can be replaced by gramgt.out, which is created by executing bldgrmd.sh. Alternatively, if DI-3000 Graphics is available, then the graphics lib- rary nlibt.o can be replaced by libr.o, which is created by executing bldlibr.sh, and the executable ngramtk.out can be replaced by gramgr.out, which is created by executing bldgrmr.sh.

    When all this is done, one executes the simulation program by typing:

    g.sh

    This command file will compile beps1.f, using the include file includa. It will ask the user what graphics device to send the output to, and then will link with the appropriate graphics library as well as the simulation library simulib.o. If a metafile was selected, a dataset will be allocated for it, and defaults to agraph.m. The command file will then allocate the output datasets used by those diagnostics which the user had selected in the simulation input. The default names for the datasets are:

    trj1.d for the trajectory diagnostic

    fv1.d for the velocity distribution diagnostic

    pro1.d for the profile diagnostic

    pot1.d for the potential diagnostic

    den1.d for the ion density diagnostic

    rstrt1.d for the restart file

    The simulation will then be executed, reading the namelist file for fur- ther input. If a metafile had been selected as the output device, the user is asked at the end of the simulation if the metafile should be plotted or viewed. If plotting was selected, the graphics is plotted by the command file contained in m.sh. If viewing was chosen, the graphics can be displayed on Tektronix or ascii terminals by executing the com- mand file contained in l.sh. It is also possible to plot metafiles independently of the main simulation program by typing:

    m.sh filename

    where filename is the name of the metafile to be plotted. Similarly, the metafiles can be viewed independently of the main simulation by typing:

    l.sh filename



    INSTALLATION OF DIAGNOSTIC POST-PROCESSORS



    When the simulation is done, it will inquire if the user wants to run any diagnostic post-processing programs. These programs can also be run independently of the main simulation. All the diagnostic post- processors require the post-processing subroutine library,

    analysis.o,

    which is created by executing the command file bldanls.sh.

    1. POTENTIAL DIAGNOSTIC

    In order to run the potential diagnostic, one first needs the command file contained in p.sh, and the main correlation program in corre.f. Then one must create the executable

    corrprm.out,

    by executing the file bldcorp.sh. This executable reads the header of a file containing the potential data, and writes an include file, includa, which contains PARAMETER statements needed to dimension arrays in corre.f, according to the data in the header.

    To execute this post-processor independently of the main simulation program, type:

    p.sh filename

    where filename is the name of the file containing the potential data. This command file will compile corre.f using the include file includa, and link with the appropriate graphics library, as well as the post- processor library analysis.o. If a graphics metafile was selected, a dataset is allocated to contain it, which defaults to pgraph.m, and the user will be asked if it should be plotted or viewed.

    2. DEBYE CLOUD DIAGNOSTIC

    In order to run the Debye cloud diagnostic, one first needs the com- mand file contained in c.sh, and the display program in dcloud.f. Then one must create the executable

    cldprm.out

    by executing the file bldcldp.sh. This executable reads the header of a file containing the potential data, and writes an include file, includa, which contains PARAMETER statements needed to dimension arrays in dcloud.f, according to the data in the header.

    To execute this post-processor independently of the main simulation program, type:

    c.sh filesname filername

    where filesname is the name of the file containing the potential data and filername is the name of the file containing the potential data without the test charge (the reference run). This command file will compile dcloud.f using the include file includa, and link with the appropriate graphics library, as well as the post-processor library analysis.o. If a graphics metafile was selected, a dataset is alloca- ted to contain it, which defaults to cgraph.m, and the user will be asked if it should be plotted or viewed.

    3. SPATIAL PROFILE DIAGNOSTIC

    In order to run the spatial profile diagnostic, one first needs the command file contained in f.sh, and the display program in profile.f. Then one must create the executable

    pflprm.out,

    by executing the file bldpflp.sh. This executable reads the header of a file containing the profile data, and writes an include file, includa, which contains PARAMETER statements needed to dimension arrays in profile.f, according to the data in the header.

    To execute this post-processor independently of the main simulation program, type:

    f.sh filename

    where filename is the name of the file containing the profile data. This command file will compile profile.f using the include file includa, and link with the appropriate graphics library, as well as the post- processor library analysis.o. If a graphics metafile was selected, a dataset is allocated to contain it, which defaults to fgraph.m, and the user will be asked if it should be plotted or viewed.


    ASSIGNMENT 1: TWO STREAM INSTABILITY


    A. Run the two stream instability as discussed in class. Sample parame- ters are:

    RUNID= RUN01
    INDX= 7 NPX= 5120 VTX= 1.0000000 CI= 0.0000 QME= -1.0000
    IBCS= 7 BVL= 0.0000000 BVR= 0.0000000
    T0= 0.0 TEND= 60.0 DT= 0.20000
    MOVION= 0 RMASS= 100.0000000 RTEMP= 10.0000000 QMI= 1.0000
    NPXB= 512 VDX= 5.0000000 VTDX= 0.5000000 QMB= -1.0000
    NPP= 128 NTI= 0 AX= 0.86667 EDGE= 2.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 1 MODES= 11 NDP= 15
    NTV= 15 NMV= 40 NXB= 1 NPRS= 1 NPRO= 1 NDV= 1
    JNMV= 1 JPRO= 0 JPS= 1 NPLOT= 3
    NTD= 0 MODED= 11 NDD= 100
    ANLE= 0.0000000 ANSE= 0.0000000
    AMODEN= 10.000 FREQN= 1.2173395
    ANLI= 0.0000000 ANSI= 0.0000000
    AMODEX= 4.000 FREQ= 1.0519991 TRMP= 0.0 TOFF= 25.0
    QTEST= 0.00000 VTEST= 3.00 X0= 48.0

    These are just a guide, and you should explore at least one other set of parameters on your own. Note whether the agreement between simu- lation and theory gets better if the parameters you chose in the si- mulation more accurately reflect the approximations made in class.

    B. Observe the results of the simulation. Here are few suggestions to to get you started. Feel free to watch other diagnostics as well.

    a. Observe the evolution of phase space as the instability grows. Explain as many features as you can in terms of what you know from the Vlasov equation. Note the features that you cannot ex- plain or do not understand.

    b. Describe the evolution of the potential. Can you correlate what happens to the potential plot with what is happening in phase space?

    c. Examine the plots of total electric field, total kinetic energy, and net energy. Compare exchange of energy. How well is energy conserved?

    d. Examine the plots of mode energy versus mode number. What is the fastest growing mode?

    C. Run the potential post-processor. Set NTC=0 to turn off the auto- correlation calculation, since the instablity is not a stationary process in time. Can you estimate the frequency, growth rate, and wavenumber of the fastest growing instability (in physical units, i.e., in terms of plasma frequency, debye length, etc.)?

    D. Write up a lab report which adequately addresses these questions. Include supporting evidence (plots, etc.). Due Feb. 24.


    ASSIGNMENT 2: LANDAU DAMPING


    A. Run a simulation of a plasma in thermal equilibrium. Sample parame- ters are:

    RUNID= RUN02
    INDX= 8 NPX= 10240 IBCS= 7 VTX= 1.0000000
    T0= 0.0 TEND= 300.0 DT= 0.20000
    MOVION= 0 NTI= 0 RMASS= 9.0000000 RTEMP= 10.0000000
    NPXB= 0 VDX= 5.0000000 VTDX= 0.5000000
    NPP= 128 AX= 0.86667 EDGE= 2.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 1 MODES= 21 NDP= 300
    NTV= 300 NMV= 40 NXB= 1 NPRO= 2 NDV= 1
    JNMV= 1 JPRO= 0 JPS= 1 NPLOT= 3
    NTD= 0 NDD= 25

    These are just a guide, and you could explore a different set of parameters, e.g., by using a different number of particles or system length.

    B. Run the potential post-processor with the autocorrelation calcula- lation turned on (by using the default value of NTC). Observe both the correlated and uncorrelated potential as functions of time. What happens to the oscillations as the mode number increases? Can you estimate the frequency and damping rate? How well do they agree with the predictions for the Bohm-Gross waves?

    C. Write up a brief lab report, and include supporting evidence. Due Mar. 11.


    Field Energy History for mode 12

    ASSIGNMENT 3: PLASMA DRIVER


    A. Turn on the external traveling wave field,

    E(x,t) = E0*sin(k0*x - w0*t),

    where w0**2 = wpe**2 + 3*(k0*vth)**2, and w0/k0 = 5*vth. Calculate the work done by the source and compare this with the expression (Ew**2/4*pi)*(Vph/(Vph - Vgr)), where Ew**2/8*pi is the wave energy, Vph is the phase velocity, and Vgr is the group velocity of the pump wave. Calculate the momentum given to the plasma and compare it with the expression (Ew**2/4*pi)/(Vph - Vgr). The following set of para- meters should get you started:

    RUNID= RUN03
    INDX= 8 NPX= 10240 VTX= 3.0000000
    IBCS= 7 BVL= 0.0500000 BVR= 0.0000000
    T0= 0.0 TEND= 60.0 DT= 0.20000
    MOVION= 0 NTI= 0 RMASS= 100.0000000 RTEMP= 10.0000000
    NPXB= 0 VDX=29.0000000 VTDX= 3.0000000
    NPP= 128 AX= 0.86667 EDGE= 2.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 1 MODES= 9 NDP= 30
    NTV= 30 NMV= 40 NXB= 1 NPRS= 1 NPRO= 1 NDV= 1
    JNMV= 1 JPRO= 1 JPS= 1 NPLOT= 4
    NTD= 0 MODED= 9 NDD= 15
    ANLE= 0.0000000 ANSE= 0.0000000
    AMODEN= 0.000 FREQN= 0.0000000
    ANLI= 0.0000000 ANSI= 0.0000000
    AMODEX= 3.000 FREQ= -1.0679998 TRMP= 0.0 TOFF= 60.0

    B. Repeat part A, where w0 and k0 are the same, but have the plasma moving with velocity v0 = 2*Vph. Verify that Ew**2/4*pi is the same as in part A. Show that the beam slows down and loses energy. Cal- culate the wave energy and momentum as in part A, and show that they satify the same relations as in part A. You can use the same para- meters as before, except let NPX = 0 and NPXB = 10240.


    ASSIGNMENT 4: PARAMETRIC INSTABILITY


    A. Consider a uniform plasma of hot electrons and cold ions. Apply an external pump at mode 4,

    E(x,t) = E0*sin(k0*x - w0*t),

    where w0**2 = wpe**2 + 3*(k0*vth)**2, and w0/k0 = 5*vth, but turn off the pump after 4 wave periods. Continue running the simulation for about 32 wave periods. Look for the parametric decay of this wave into back-scattered plasma waves and forward-going ion acoustic waves. Detect this by obtaining the power spectrum of the potential and ion density, using the appropriate post-processor, and distin- guishing between positive frequency (blue curve) and negative fre- quency (read curve) waves. (Hint: find the forward scattered ion wave first, then find the corresponding backscattered plasma wave.) Does k0 = ki + kr and w0 = wr + wi, where r and i refer to back- scattered and forward scattered waves, respectively? How does it agree with the dispersion relation? Find the growth rate of the ion acoustic wave. Below are some sample parameters to get you started:

    RUNID= RUN04
    INDX= 8 NPX= 10240 VTX= 2.0000000
    IBCS= 7 BVL= 0.1000000 BVR= 0.0000000
    T0= 0.0 TEND= 200.0 DT= 0.20000
    MOVION= 1 NTI= 0 RMASS= 100.0000000 RTEMP= 10.0000000
    NPXB= 0 VDX=29.0000000 VTDX= 3.0000000
    NPP= 128 AX= 0.86667 EDGE= 2.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 1 MODES= 9 NDP= 100
    NTV= 100 NMV= 40 NXB= 1 NPRS= 1 NPRO= 1 NDV= 1
    JNMV= 1 JPRO= 0 JPS= 1 NPLOT= 4
    NTD= 1 MODED= 9 NDD= 100
    ANLE= 0.0000000 ANSE= 0.0000000
    AMODEN= 0.000 FREQN= 0.0000000
    ANLI= 0.0000000 ANSI= 0.0000000
    AMODEX= 4.000 FREQ= -1.0519991 TRMP= 0.0 TOFF= 25.0

    B. Consider the same problem as in part A, but with fixed ions and look for Stimulated Compton Scattering by look at the power spectrum of the potential with the potential post-processor. Calculate the velo- city of the resonant particles from:

    Vr = (w0 - wr)/(k0 - kr).

    Remember kr is negative, check that this is true from your results. You may have to use the dispersion relation to find wr. Can you see any resonant particles in the phase space plots? You can use the same parameters as before, except that MOVION = 0.


    ASSIGNMENT 5: PLASMA LASER


    A. Take the ion density fixed and of the form ni = n0*(1 + .1*sin(k0x), and let the electrons drift with a velocity v0, such that:

    k0*v0 = 2*Wpe and v0 = 8*vth.

    Find the modes that grow from the power spectrum. Find the growth rate. Explain your result. Here are some sample parameters:

    RUNID= RUN05
    INDX= 8 NPX= 0 VTX= 2.0000000
    IBCS= 7 BVL= 0.0000000 BVR= 0.0000000
    T0= 0.0 TEND= 200.0 DT= 0.20000
    MOVION= 0 NTI= 0 RMASS= 100.0000000 RTEMP= 10.0000000
    NPXB= 10240 VDX=17.5999908 VTDX= 2.0000000
    NPP= 128 AX= 0.86667 EDGE= 2.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 1 MODES= 9 NDP= 100
    NTV= 100 NMV= 40 NXB= 1 NPRS= 1 NPRO= 1 NDV= 1
    JNMV= 1 JPRO= 0 JPS= 1 NPLOT= 4
    NTD= 1 MODED= 9 NDD= 100
    ANLE= 0.0000000 ANSE= 0.0000000
    AMODEN= 5.000 FREQN= 1.0799999
    ANLI= 0.0000000 ANSI= 0.1000000
    AMODEX= 4.000 FREQ= 1.0519991 TRMP= 0.0 TOFF= 25.0

    B. Consider the same problem as in part A, but with k0*v0 = 2*Wpe and v0 = 4*vth.


    PROBLEM OF RELAXATION OF A DENSITY PROFILE

    RUNID= RUN01
    INDX= 8 NPX= 20480 VTX= 1.0000000 QME= -1.0000
    IBCS= 7 BVL= 0.0000000 BVR= 0.0000000
    T0= 0.0 TEND= 1000.0 DT= 0.20000
    MOVION= 1 RMASS= 1837.0000000 RTEMP= 10.0000000 QMI= 1.0000
    NPXB= 0 VDX= 5.0000000 VTDX= 0.5000000 QMB= -1.0000
    NPP= 128 NTI= 0 AX= 0.86667 EDGE= 0.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 2 MODES= 9 NDP= 15
    NTV= 1 NMV= 40 NXB= 1 NPRS= 1 NPRO= 1 NDV= 15
    JNMV= 1 JPRO= 1 JPS= 0 NPLOT= 4
    NTD= 2 MODED= 9 NDD= 15
    ANLE= 64.0000000 ANSE= 0.5000000
    AMODEN= 4.000 FREQN= 1.0519991
    ANLI= 64.0000000 ANSI= 0.5000000
    AMODEX= 4.000 FREQ= 1.0519991 TRMP= 0.0 TOFF= 25.0
    QTEST= 0.00000 VTEST= 3.00 X0= 48.0


    PROBLEM OF LAUNCHING TEST WAVES

    RUNID= RUN01
    INDX= 7 NPX= 256000 VTX= 1.0000000 QME= -1.0000
    IBCS= 7 BVL= 0.0000000 BVR= 0.0000000
    T0= 0.0 TEND= 100.0 DT= 0.20000
    MOVION= 0 RMASS= 100.0000000 RTEMP= 10.0000000 QMI= 1.0000
    NPXB= 0 VDX= 5.0000000 VTDX= 0.5000000 QMB= -1.0000
    NPP= 128 NTI= 0 AX= 0.86667 EDGE= 2.00000
    NUSTRT= 1 NTR= 0
    NTW= 5
    NTT= 0 NPROBT= 2 NDIST= 2
    NTP= 1 MODES= 9 NDP= 100
    NTV= 100 NMV= 40 NXB= 1 NPRS= 1 NPRO= 1 NDV= 1
    JNMV= 1 JPRO= 0 JPS= 1 NPLOT= 3
    NTD= 0 MODED= 9 NDD= 100
    ANLE= 0.0000000 ANSE= 0.0000000
    AMODEN= 4.000 FREQN= 1.0377998
    ANLI= 0.0000000 ANSI= 0.0000000
    AMODEX= 4.000 FREQ= 1.0519991 TRMP= 0.0 TOFF= 25.0
    QTEST= 0.00000 VTEST= 3.00 X0= 48.0

    COPYRIGHT 1988, REGENTS OF THE UNIVERSITY OF CALIFORNIA

    Update: March 13, 1990


    Netscape Page Prepared by F. S. Tsung, 4/22/1995