Potential +– Sheath + + Bulk Plas ma Sheath + – – + – – + – + +– +– Substrate Density(cm^-3) : Electron and Ion X direction ~ V0 cos(t ) • 1D Planar RF VoltageDriven System Klystron 3 cm 2 cm Phase space uz Density Kinetic energy Plasma Applicatio Modeling, POSTE PIC Overview Applications of PIC model • Basic plasma physics: waves and instabilities • Magnetic fusion • Gaseous discharges • Electron and ion optics • Microwave-beam devices • Plasma-filled microwave-beam devices Congratulations! It's nice to get emails like this, isn't it. Cheers, Mike Lieberman On Sep 28, 2005, at 5:46 PM, 이재구 wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Subject: Your article has been downloaded 250 times! Dear Professor Lee, I am pleased to tell you that your article, "Particle and fluid simulations of low-temperature plasma discharges: benchmarks and kinetic effects", in Journal of Physics D: Applied Physics, Vol 38, ppR283 (2005), has been downloaded 250 times so far. > This was achieved in 12 days from the date of publication. To put this into context, across all IOP journals 10% of articles were accessed over 250 times this quarter. You can link directly to your article at: http://stacks.iop.org/0022-3727/38/R283 I would like to thank you for supporting Journal of Physics D: Applied Physics and I trust that you have found our publication process to be friendly and efficient. I hope you will consider submitting further papers to the journal and encourage your colleagues to do likewise. Our publication times are highly competitive and we use a fully electronic editorial process from submission to peer review to production. Electronic submission to Institute of Physics journals can be done very simply at the following web page: http://www.iop.org/journals/authorsubs We look forward to working with you again. If you have any queries about the journal, please don't hesitate to contact me. If you would prefer not to receive further updates on the number of times this article has been downloaded, please reply to this email with the word remove in the subject line. Kind regards Sarah Quin , Publisher Journal of Physics D: Applied Physics Institute of Physics Publishing > Dirac House, Temple Back, Bristol BS1 6BE, England PIC Overview PIC Codes Overview • PIC codes simulate plasma behavior of a large number of charges particles using a few representative “super particles”. • These type of codes solve the Newton-Lorentz equation of motion to move particles in conjunction with Maxwell’s equations (or a subset). • Boundary conditions are applied to the particles and the fields to solve the set of equations. • PIC codes are quite successful in simulating kinetic and nonlinear plasma phenomenon like ECR, stochastic heating, etc. PIC-MCC Flow Chart • Particles in continuum space ( x,v)i • Fields at discrete mesh locations in space (E,B ) j • Coupling between particles and fields I II V IV III IV Fig: Flow chart for an explicit PIC-MCC scheme I. Particle Equations of Motion Newton-Lorentz equations of motion d mu F q (E v B) dt u v d xv dt In finite difference form, the leapfrog method Fig: Schematic leapfrog integration I. Particle Equations of Motion ut t / 2 ut t / 2 q t ut t / 2 ut t / 2 t (E B ) t t m 2 xt t xt ut t / 2 t t / 2 t • Second order accurate • Requires minimal storage • Requires few operations • Stable for w p t 2 I. Particle Equations of Motion • Boris algorithm u u t t / 2 qtEt 2m t q t E u u t t / 2 2m u u q t (u u ) Bt t 2 m u u u u u u t q B t ˆ t b tan( ) 2 2 t m t I. Particle Equations of Motion Finally, u' u u t t 2t t u u u' 1 tt tt 2t t u' 1 tt tt u u' u u tt II. Particle Boundary Absorption • Conductor : absorb charge, add to the global σ • Dielectric : deposit charge, weight q locally to mesh Reflection • Physical reflection reverse x bc x x bc x vx vx • Specular reflection 1st order error v t t / 2* v t t / 2 qE t 2 | x t xbc | ( t ) t t / 2 m |v | Thermionic Emission Fowler-Nordheim Field Emission Child’s Law Field Emission Gauss’s Law Field Emission II. Particle Boundary Secondary electron emission + io n p h o to n , ex – electro n – se • Photoemission • Ion impact secondary emission • Electron impact secondary emission Important in processes related to high-power microwave sources III. Electrostatic Field Model Possion’s equation (x, t ) (x, t ), • Finite difference form in 1D planar geometry j 1 2 j j 1 x 2 j , Boundary condition : External circuit Fig: Schematic one-dimensional bounded plasma with external circuit EECE695: Computer Simulation (2005) Particle-in-Cell Techniques HC Kim, SJ Kim, and JK Lee Plasma Application Modeling Group, POSTECH References: • Minicourse by Dr. J. P. Verboncoeur (PTS Group of UC Berkeley) in IEEE International Conference on Plasma Science (2002) • “Plasma Physics via Computer Simulation” by C.K. Birdsall and A.B. Langdon (Adam Hilger, 1991) XPDx1 Flow Chart I II V IV III IV Fig: Flow chart for an explicit PIC-MCC scheme Collisions Electron-neutral collisions • Elastic scattering (e + A → e + A) • Excitation (e + A → e + A*) • Ionization (e + A → e + A+ + e) Ion-neutral collisions • Elastic scattering (A+ + A → A+ + A) • Charge exchange (A+ + A → A + A+) V. Monte-Carlo Collision Model • The MCC model statistically describes the collision processes, using cross sections for each reaction of interest. • Probability of a collision event Pi 1 exp[ ng (x) T ( i )i t ] where T ( i ) j j ( i ) • For a pure Monte Carlo method, the timestep is chosen as the time interval between collisions. ti ln( 1 R) ng (x) T ( i )i where 0< R< 1is a uniformly distributed random number. However, this method can only be applied when space charge and self-field effects can be neglected. V. Monte-Carlo Collision Model • Computing the collision probability for each particle each timestep is computationally expensive. → Null collision method 1. The fraction of particles undergoing a collision each time step is given by PT 1 exp[ max t ]. 2. The particles undergoing collisions are chosen at random from the particle list. 3. The type of collisions for each particle is determined by choosing a random number, 0 R max . Null collision Collision type 3 Collision type 2 Collision type 1 Fig: Summed collision frequencies for the null collision method. Capacitively Coupled Plasma – 1D PIC-MCC dx j (t ) ~ Vhf cos(hf t ) +– Sheath Sheath + – – + – – + – + +– +– j = 1, , N dv j (t ) q j E(t, x j ) dt mj + + Bulk Plas ma dt v j (t ) 1 N E(t , x) q j (x x j (t )) 0 j 1 Substrate ~ Vlf cos(lf t ) • 1D Asymmetric Dual-Freq. VoltageDriven System e (ni ne ) 0 • MCC (Monte-Carlo Collision) Processes - Electron-Neutral Collisions (Ionization, Scattering, Excitation) - Ion-Neutral Collisions (Charge-exchange, Scattering) Plasma Application Modeling POSTECH Capacitively Coupled Plasma – 1D PIC-MCC Vx vs. x for electrons Density vs. x Vx vs. x for ions Potential vs. x Ion Energy Distribution Function 10 mTorr 20 mTorr 30 mTorr 50 mTorr High frequency : 100MHz (100V) Low frequency :1MHz (102V) Symmetric Discharge L = 2.5 cm Plasma Application Modeling POSTECH Electron Energy Distribution Function In the discharge center Plasma Application Modeling POSTECH Comparison Between PIC and Experiment (II) EEPF [A.U ] Single langmuir probe measurement result from KAIST e 2 e 1 e 0 60mT(Te:3.4eV) e -1 e -2 e -3 e e -5 -Electron temperature is comparable to PIC simulation 27 MH z/2 MH z 30 30 60 60 0/3 0/9 0/3 0/9 00 00 00 00 Te 2.7 (eV) 3 80mT(Te:2.5eV) -4 -Electron temperature is decreased as pressure is increased 70mT(Te:3eV) 5 10 Electron Energy [eV] 2.7 7 2.7 Table 1 Electron temperature from PIC simulation RF Power : 200Watt/200Watt 0 2.7 15 (pressure=110mT) Plasma Application Modeling POSTECH PIC-MCC versus Fluid Simulation (I) ~ 4eV Due to Ramsauer minimum • Low-energy electrons -3 : 2.40 eV (1.11e15 cm ) -3 • High-energy electrons : 1.00 eV (7.82e12 cm ) • EEPF obtained from PIC/MCC is totally in disagreement with that of LFA because of nonlocal behavior of electrons. Plasma Application Modeling POSTECH IV. Coupling Fields to Particles Particle and force weighting : connection between grid and particle quantities • Weighting of charge to grid • Weighting of fields to particles grid point a point charge IV. Coupling Fields to Particles • Nearest grid point (NGP) weighting fast, simple bc, noisy • Linear weighting : particle-in-cell (PIC) or cloud-in-cell (CIC) relatively fast, simple bc, less noisy • Higher order weighting schemes slow, complicated bc, low noisy Quadratic spline NGP 1.0 Linear spline Cubic spline 0.5 0.0 xi 2x Position (x) xi x xi xi x xi 2x Fig: Density distribution function of a particle at xi for various weightings in 1D IV. Coupling Fields to Particles Areas are assigned to grid points; i.e., area a to grid point A, b to B, etc Fig: Charge assignment for linear weighting in 2D PDP Structure AC PDP Sustain Electrode Discharge in PDP Bus Electrode Visible Light Sustain Electrode Bus Electro Front Glass Substrate Protection Layer Dielectric LayerMgO Discharge Barrier Rib Dielectric lay Barrier UV Address Elec o Address Electrode Phosphor(R,G,B) Phosphor Rear Glass Substrate 90 rotation Plasma Application Modeling POSTECH Striation Profiles in PDP – 2D PIC/MCC Anode Cathode 100Torr 200Torr 500Torr • Pressure dependence of striations : Number of peaks depend on the pressure and el Plasma Application Modeling POSTECH Input file(II) The direction 1.00 1.00, 1.00 The comparison of like-sign and opposite-sign Likesign Oppositesign • Like-sign : electron – electron two stream case • Opposite-sign : electron – ion two stream case Plasma Application Modeling, POSTECH The comparison of like-sign and opposite-sign Field energy Electron-Ion two stream case Kinetic energy 6.5 Electron-Electronon two stream case 6.0 2.0 5.5 Tot_K.E in El-Ion case El_K.E in El-Ion case Ion_K.E in El-Ion case Tot_K.E in El-El case El_K.E in El-Ion case El_K.E in El-Ion case 5.0 Kinetic Energy Field energy 1.5 1.0 4.5 4.0 3.5 3.0 0.5 2.5 2.0 0.0 0 50 100 150 Time 200 250 0 50 100 150 200 250 Time • Field & Kinetic energy distribution in time is different. The peak field energy value in like-sign case is higher than that of oppositesign case and the time to reach to the peak value longer than that of opposite- sign case. Plasma Application Modeling, POSTECH Simulation Domain of Klystron (SJ Kim) RF input port 10.05 cm RF output port 13.07 cm 9.55 cm E-beam 7.569 cm 6.66 cm Cylindrical Axis 37.2 cm Simulation condition: Beam emitter: I= 12 kA, ud =2.48e8 m/s Input port : Rin=2300 , R=20 , f=7.69 GHz Output port : R=47.124 Plasma Applicatio Modeling, POSTE Example of Klystron Simulation Phase space uz Density Kinetic energy Plasma Applicatio Modeling, POSTE Simulation Results at 10 ns 8 5.0x10 07 8 06 4.5x10 Velocity (m/s) 05 04 03 8 4.0x10 8 3.5x10 02 8 3.0x10 01 00 0.05 0.10 0.15 0.20 0.25 0.300.000.350.05 0.10 0.15 z (m) 0.20 0.25 0.30 z (m) 10 nsec 5 4.0x10 5 3.8x10 KE (eV) 0.00 8 2.5x10 5 3.6x10 5 3.4x10 5 3.2x10 0.0 -9 2.0x10 -9 4.0x10 6.0x10 -9 8.0x10 -9 1.0x10 -8 Time (sec) Plasma Applicatio Modeling, POSTE Simulation Results at 6 us 5 7.0x10 6 usec 14 0 5 total density 6.5x10 14 0 5 6.0x10 14 0 KE (eV) 5 13 0 13 5.5x10 5 5.0x10 5 4.5x10 0 5 13 4.0x10 0 13 3.5x10 0.0 3.0x10 0 0.0 5 5 0.0-6 1.0x10-6-6 2.0x10-6 3.0x10-6 4.0x10-6 5.0x10-6 6.0 -6 -6 -6 -6 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 Time (sec) Time (sec) 9 9 0 5.0x10 output po input port 0.0 .0 9 -5.0x10 9 0 Power (W) 10 10 10 -1.0x10 10 -1.5x10 10 -2.0x10 10 -2.5x10 10 10 -3.0x10 10 10 -3.5x10 10 0.0 10 -6 1.0x10 -6 2.0x10 -6 3.0x10 -4.0x10 -6 -6 -6 -6 -6 -6 -6 0.0-6 6.0x10 4.0x10 5.0x10 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 Time (sec) Time (sec) Plasma Applicatio Modeling, POSTE KE as a Function of Beam Current 5 7.0x10 5 6.5x10 5 6.0x10 5 KE (eV) 5.5x10 5 5.0x10 5 4.5x10 I= 6kA I= 9kA I=12kA I=15kA I=18kA 5 4.0x10 5 3.5x10 5 3.0x10 5 2.5x10 -6 -6 -6 -6 -6 -6 0.0 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 Time (sec) 60 20 ns 6 us 58 KE efficiency (%) 56 54 52 50 48 46 44 6 8 10 12 current (kA) 14 16 18 6 8 10 12 14 16 current (kA) Plasma Applicatio Modeling, POSTE KE as a Function of Beam Energy 5 1.5 M 0.12 MeV 2.2x10 6 0 5 0 6 2.0x10 KE (eV) 4 0 4 0 6 1.8x10 6 1.6x10 4 0 6 1.4x10 4 0 0.0 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 0.0 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 Time (sec) Time (sec) 0 60 6 20 ns 40 0 20 KE efficiency (%) 0 0 0 0 0 0 -20 -40 -60 0 -80 0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Beam energy (MeV) 1.4 0.01.6 0.2 0.4 0.6 0.8 1.0 1.2 1.4 Beam energy (MeV) Plasma Applicatio Modeling, POSTE Klystron 3 cm 2 cm Phase space uz Density Kinetic energy Plasma Applicatio Modeling, POSTE Simulation Results at 0.5 ns and 2.5 ns 5 8 4.0x10 10 0.5 5 8 3.9x10 8 3.8x10 10 KE (eV) 5 10 8 10 5 3.7x10 5 3.6x10 8 10 5 3.5x10 8 10 5 3.4x10 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.00.35 1.0x10-10 2.0x10-10 3.0x10-10 4.0x10-10 5. z (m) Time (sec) 8 10 5 8 4.0x10 10 2.5 n 8 10 5 3.8x10 8 10 5 8 3.6x10 KE (eV) 10 8 10 8 10 5 3.4x10 5 8 3.2x10 10 8 10 5 3.0x10 8 10 5 8 2.8x10 10 0.00 0.05 0.10 0.15 0.20 z (m) 0.25 0.30 0.00.35 5.0x10-10 1.0x10-9 1.5x10-9 2.0x10-9 2. Time (sec) Plasma Applicatio Modeling, POSTE Simulation Results at 10 ns and 20 ns 8 5 0 4.0x10 8 0 10 5 3.8x10 8 0 5 KE (eV) 3.6x10 8 0 8 0 5 3.4x10 5 3.2x10 8 0 5 3.0x10 8 0 5 2.8x10 8 0 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.0 0.35 2.0x10-9 4.0x10-9 6.0x10-9 8.0x10-9 1 z (m) Time (sec) 8 10 5 4.0x10 8 10 8 20 ns 5 10 3.8x10 8 10 5 3.6x10 8 KE (eV) 10 8 10 8 10 5 3.4x10 5 3.2x10 8 10 5 3.0x10 8 10 8 10 5 2.8x10 8 10 0.00 0.05 0.10 0.15 0.20 z (m) 0.25 0.30 0.0 0.35 -9 5.0x10 -8 1.0x10 1.5x10 -8 2.0 Time (sec) Plasma Applicatio Modeling, POSTE Simulation Results at 6 us 6 14 1x10 14 9x10 14 8x10 5 KE (eV) 5 13 13 5 7x10 5 6x10 5 5x10 13 5 4x10 13 5 3x10 5 0 0.0 2x10 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 0.0 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 Time (sec) Time (sec) 9 0 output por input 0.0port 0 9 0 9 Power (W) -5.0x10 10 10 10 10 -1.0x10 10 -1.5x10 10 10 10 -2.0x10 10 0.0 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 0.0 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 Time (sec) Time (sec) Plasma Applicatio Modeling, POSTE Simulation Results at 0.5 ns and 2.5 ns 5 8 4.0x10 10 0.5 5 8 3.9x10 8 3.8x10 10 KE (eV) 5 10 8 10 5 3.7x10 5 3.6x10 8 10 5 3.5x10 8 10 5 3.4x10 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.00.35 1.0x10-10 2.0x10-10 3.0x10-10 4.0x10-10 5. z (m) Time (sec) 8 10 5 8 4.0x10 10 2.5 n 8 10 5 3.8x10 8 10 5 8 3.6x10 KE (eV) 10 8 10 8 10 5 3.4x10 5 8 3.2x10 10 8 10 5 3.0x10 8 10 5 8 2.8x10 10 0.00 0.05 0.10 0.15 0.20 z (m) 0.25 0.30 0.00.35 5.0x10-10 1.0x10-9 1.5x10-9 2.0x10-9 2. Time (sec) Plasma Applicatio Modeling, POSTE Simulation Results at 10 ns and 20 ns 8 5 0 4.0x10 8 0 10 5 3.8x10 8 0 5 KE (eV) 3.6x10 8 0 8 0 5 3.4x10 5 3.2x10 8 0 5 3.0x10 8 0 5 2.8x10 8 0 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.0 0.35 2.0x10-9 4.0x10-9 6.0x10-9 8.0x10-9 1 z (m) Time (sec) 8 10 5 4.0x10 8 10 8 20 ns 5 10 3.8x10 8 10 5 3.6x10 8 KE (eV) 10 8 10 8 10 5 3.4x10 5 3.2x10 8 10 5 3.0x10 8 10 8 10 5 2.8x10 8 10 0.00 0.05 0.10 0.15 0.20 z (m) 0.25 0.30 0.0 0.35 -9 5.0x10 -8 1.0x10 1.5x10 -8 2.0 Time (sec) Plasma Applicatio Modeling, POSTE Simulation Results at 6 us 6 14 1x10 14 9x10 14 8x10 5 KE (eV) 5 13 13 5 7x10 5 6x10 5 5x10 13 5 4x10 13 5 3x10 5 0 0.0 2x10 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 0.0 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 Time (sec) Time (sec) 9 0 output por input 0.0port 0 9 0 9 Power (W) -5.0x10 10 10 10 10 -1.0x10 10 -1.5x10 10 10 10 -2.0x10 10 0.0 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 0.0 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 6.0x10 1.0x10 2.0x10 3.0x10 4.0x10 5.0x10 Time (sec) Time (sec) Plasma Applicatio Modeling, POSTE Charge Conservation Scheme Boris-DADI correction (OOPIC) Langdon-Marder correction (MA ECE586: Advanced E&M Simulation (2004) On PDX1 Program HyunChul Kim and J.K. Lee Plasma Application Modeling, POSTECH 2004. 9. 16 References: • Minicourse by Dr. J. P. Verboncoeur (PTS Group of UC Berkeley) in IEEE International Conference on Plasma Science (2002) • “Plasma Physics via Computer Simulation” by C.K. Birdsall and A.B. Langdon (Adam Hilger, 1991) A Series of XPDX1* XPDx1: X window (using xgrafix library), Plasma Device, 1 Dimensional (1d3v), Bounded (with external circuit drive), Electrostatic Code • XPDP1 (x=P) : Planar Configuration • XPDC1 (x=C) : Cylindrical Configuration • XPDS1 (x=S) : Spherical Configuration r ~ LRC Computation Space * Developed by PTS group, UC Berkeley All are available at http://ptsg.eecs.berkeley.edu PIC Overview PIC Codes Overview • Plasma behavior of a large number of charges particles are simulated by using a few representative “super particles”. • PIC codes solve fundamental equations, the Newton-Lorentz equation of motion to move particles in conjunction with Maxwell’s equations (or a subset) with few approximations. • PIC codes are quite successful in simulating kinetic and nonlinear plasma phenomenon like ECR, stochastic heating, etc. Computer Simulation of Plasma Kinetic Description Vlasov, Fokker-Planck Codes Particle Codes Fluid Description Hybrid Codes Particle codes • The particle-particle model • The particle-mesh model • The particle-particleparticle-mesh model Fluid Codes XPDx1 Flow Chart • Particles in continuum space ( x,v)i • Fields at discrete mesh locations in space (E,B ) j • Coupling between particles and fields I II Subcycling : ti slow kt fast , k 1 IV III IV Fig: Flow chart for an explicit PIC-MCC scheme V II. Particle Boundary Absorption • Conductor : absorb charge, add to the global σ Secondary electron emission + – io n electron – se • Ion impact secondary emission • Electron impact secondary emission III. Electrostatic Field Model Maxwell’s equation in vacuum E B , D , D 0 E t D H J , B 0 , B 0 H t • In electrostatics, E 0 E 2 (Poisson’s equation) 0 Or Gauss’ law D d s S V dV Qenclosed III. Electrostatic Field Model Possion’s equation (x, t ) (x, t ), • Finite difference form in 1D planar geometry j 1 2 j j 1 x 2 j , Boundary condition : External circuit 0 E0 J EJ From Gauss’s law, t0 1t 0t 0t x 2 E1/ 2 x t Q t Q t t t t t 0 0 J plasmadt t t A • Short circuit 0 (t ) is specified, J (t ) 0 • Open circuit t 0 t t 0 t t t J plasmadt III. Electrostatic Field Model • Voltage driven series RLC circuit From Kirchhoff’s voltage law, d 2Q (t ) dQ (t ) Q (t ) L R 2 dt dt C V (t ) J (t ) 0 (t ) ― One second order difference equation where IV. Coupling Fields to Particles Weighting in 1D • For linear weighting in cylindrical coordinates, (0<j<N) XPDx1 Flow Chart I II V IV III IV Fig: Flow chart for an explicit PIC-MCC scheme V. Monte-Carlo Collision Model • There is a finite probability that the i-th particle will undergo more than one collision in the timestep. Thus, the total number of missed collisions (error in single-event codes) 2 P r Pi k i 1 Pi k Hence, traditional PIC-MCC codes are constrained by vmax t 1 for accuracy. where vmax max (ng ( x )) max ( T ( ) ) x Numerical Parameters Choose Δx and Δt to resolve the smallest important physical feature Require Δx < Debye length, sheath length, wave length, Larmor radius, boundary feature, etc. Require t x / max for all species (“particle Courant”) for accurate sampling of fields. Require t 0.2 / w p for accuracy of explicit leap frog mover or for accuracy when space charge forces are important. Require t 1/ when collisions are important. Require # of superparticles per cell > 10. It should be larger in simulations where particles remain trapped for long times. Example of XPDP1 Input File RF DISCHARGE(IN MKS UNITS) Voltage-driven with electron-neutral collisions (Argon atom) -nsp---nc---nc2p---dt[s]---length[m]--area[m^2]--epsilonr---B[Tesla]---PSI[D]-2 400 1.8e6 8e-12 0.03 0.01 1.0 0 .0 0.0 -rhoback[C/m^3]---backj[Amp/m^2]---dde--extR[Ohm]--extL[H]---extC[F]---q0[C]0.0 0.0 0.0 0.0 0.0 1.0 0.0 -dcramped--source--dc[V|Amp]--ramp[(V|Amp)/s]---ac[V|Amp]---f0[Hz]--theta0[D]0 v 0.0 0.0 100 13.56e6 0 --secondary--e_collisional---i_collisional---reflux---nfft--n_ave--nsmoothing--ntimestep-1 1 2 0 0 276549 6 0 --seec(electrons)---seec(ions)---ion_species----Gpressure[Torr]---GTemp[eV]---imp-0.0 0.2 2 100e-3 0.026 0 ---GAS----psource--nstrt-1 0 0 SPECIES 1 ----q[C]-------m[Kg]---j0L[Amp/m^2]---j0R[Amp/m^2]----initn[m^-3]----k--1.602e-19 9.11e-31 0.0 0.0 5e14 1 --vx0L[m/s]---vxtL[m/s]--vxcL[m/s]---vxLloader(0=RNDM,1=QS)-0.0 4.19e5 0.0 1 --vx0R[m/s]---vxtR[m/s]--vxcR[m/s]---vxRloader 0.0 4.19e5 0.0 1 --v0y[m/s]---vty[m/s]---vyloader---v0z[m/s]---vtz[m/s]--vzloader-0.0 4.19e5 1 0.0 4.19e5 1 --nbin----Emin[eV]----Emax[ev]---maxnp— 200 0.0 20.0 300000 -For-Mid-Diagnostic---nbin----Emin[eV]---Emax[eV]----XStart--XFinish— 300 0.0 20.0 0.0 0.03 SPECIES 2 ----q[C] ------m[Kg]---j0L[Amp/m^2]---j0R[Amp/m^2]----initn[m^-3]----k1.602e-19 6.68e-26 0.0 0.0 5e14 1 -vx0L[m/s]---vxtL[m/s]--vxcL[m/s]---vxLloader(0=RNDM,1=QS)-0.0 97.8 0.0 1 --vx0R[m/s]---vxtR[m/s]--vxcR[m/s]---vxRloader 0.0 97.8 0.0 1 --v0y[m/s]---vty[m/s]---vyloader---v0z[m/s]---vtz[m/s]--vzloader-0.0 97.8 0 0.0 97.8 1 --nbin----Emin[eV]----Emax[ev]---maxnp-100 0.0 100.0 300000 -For-Mid-Diagnostic---nbin----Emin[eV]---Emax[eV]----XStart--XFinish-200 0.0 0.3 0.0 0.03 Some Input Parameters nsp : Number of species. nc: The number of spatial cells. Δx=length/nc nc2p: Superparticle to actual particle weight. The initial number of superparticles is N=initn·area·length/nc2p. dt: Timestep for simulation in seconds. length: The length of the system (distance between electrodes) in meters. B: Applied homogeneous magnetic field in Tesla PSI: Angle of the B-field in degrees extC: The external circuit capacitance in Farads. Used in conjuction with extL, extR and the driving source. source: Either a voltage (v) or current (i) source f0: AC frequency of the source. GAS: The type of gas, important when collisions are turned on. Helium = 1, Argon = 2, Neon = 3, Oxygen = 4. Gpressure : Background gas pressure in Torr. q: Charge of the particle in Coulombs. m: Mass of the particle in Kgs. initn: Initial particle number density For details, refer the source code itself or the manual inside the package of source file. Example of Result (driven by RF) Vx vs. x for electrons Density vs. x Ion flux vs. Ion Energy Vx vs. x for ions Potential vs. x Electron Temperature vs. x Semi-conductor Plasma Processing ( Comparison of Plasma Kinetic Properties of Various Equipments ) H.S. Ko and J.K. Lee Department of Electronic and Electrical Engineering, POSTECH CCP (Capacitively Coupled Plasma) Objective of research Recently, dual-frequency capacitively coupled plasma (CCP) has been of much interest as the mainstream plasma source for dielectric etchers. Through the numerical modeling, we understand the characteristics of plasma discharge and optimize the etching process. Silicon Electrodes For this work, one-dimensional electrostatic particle in cell/Monte Carlo (PIC/MC) code is used. Although the particle simulation is rather computationally intensive, it has the advantage of being a self-consistent and fully kinetic method where the electron and ion velocity distribution functions can be obtained. +– Sheath + + E + – –+ – – + – + Sheath E + – + –SEE Exelan DFC Etcher of LAM Corp. M/ F 27 MHz M/ F Cext 2 MHz ~ V cos(t) Outline of Charge-up Simulation Plasma Etching Reactor (CCP, ICP, etc) Ions are accelerated in sheath region Charge-up & etch Plasma source Simulation space simulation space Ion Electron Plasma wafer Plasma Application Modeling Group POSTECH Single Frequency CCP: Effect of pressure (20, 45, 100mTorr) 17 200 100 mTorr Small electrode (LHS) 100 mTorr 17 100 1,0x10 0,012 -3 Concentration (m ) 20 mTorr -100 -200 16 8,0x10 16 6,0x10 IEDF 0 45 mTorr 20 mTorr 0,008 16 4,0x10 0,004 20 mTorr 16 2,0x10 -300 0,0 0,030 0,035 0,040 0,000 0,045 0,030 0,035 z (m) 0,040 0 0,045 200 400 Ion energy (eV) z (m) 600 Plasma potential profiles, plasma density and corresponding ion energy distributions at the smaller (LHS) electrode. The IEDF spread corresponds to the mean potential drop at the left electrode. 2.88 eV 100 mT 2 eV 3 1E14 20 mTorr 1E13 1E12 1.73 eV 1 Power density 45 mT 3 0,6 Electrons, 20 mTorr Ions, 20 mTorr Electons, 100 mTorr Ions, 100 mTorr 6 EEPF in the bulk 45 mTorr 1E15 4 2 100 mTorr 1E16 j E (10 20 mT 5 W/m ) 1E17 6 Te, eV Potential (V) 0,016 1,2x10 100 mTorr 0,4 0,2 0,0 1E11 0,030 0,035 0,040 z (m) 0,045 0 5 10 15 20 Energy (eV) 25 30 35 0,030 0,035 0,040 0,045 z (m) Electron temperature profiles, electron energy probability function and power absorbed by electrons and ions for different values of pressure Plasma Applica ModelingPOSTE EEDF Comparison for a SmallGap CCP Langmuir Probe by Godyak J = 2.65 Thomson Scattering by Elsabbagh, Muraoka J= 3.8 Using PIC-MCC Simulation J = 3.8 mA/cm2 Comparison with Experimental Result Our PIC-MCCN ~ 1.2e5 New combined PIC-MCC N ~ 5000 I.V. Schweigert et al, PSST (2004) PIC-MCC, Vahedi et al, PSST (19 Experiment, Godyak et al.(1992) argon gas current density : 2 2.65 mA / cm gap distance : 2 cm Plasma Application Modeling, POSTEC Low-Freq. Current Effect on EEDF (Summary) • W/O SEEC : from collisional (Ohmic) to Depending on SEEC, collisionles the main mechanism for EEDF s (stochastic) change differs. • With SEEC : γ mode transition HC Kim & JK Lee, PRL (to appear) Plasma Applicatio Modeling POSTE SEEC: ION-ENERGY and ANGLE DEPENDENT SECONDARY EMIS New SEEC for argon is incorporat in XPDC1 code For argon: 0.006 i 4 i 80 i i 1.05 10 1.5 1 i /10 1 i / 8000 1.2 For each variant below SS is reached Electron yield per ion 1 1 i ( i , ) i ( i ) cos For oxygen: i i 7 10 4 i 15 1.5 1 i / 5000 1.3 Old SEEC = 0.2 0,1 New SEEC for argon Low voltage High voltage 0,01 10 Energy 100 1000 Plasma Applica Modeling POST IEDF (RHS) for Xe/Ar mixtures, 27 MHz, 800 V, 50 mTorr Compariso (Natalia B.) Xe 50 W Xe 50 W 1400 1400 CF Ar COF CF2 CHF2 CF3 C3F3 C2F4 C3F5 Xe C3F6 C4F7 1400 1200 1000 800 600 400 200 0 20 40 60 80 600 600 400 200 200 0 0 0 20 40 Ion energy60 (eV) 80 0 100 20 40 60 80 100 Ion energy (eV) 0,06 100 0,06 Ion energy (eV) 800 400 0,05 0,05 Experimental results for IEDF 0,04 The curves for Xe+ and Ar+ ions are clipped from here and shown 0,03 in the same scale a. u. 0 Ar+ 800 Ar+ Simulation Xe+ Simulation 0,04 a. u. 1600 Xe+ 1000 Y Axis Title Y Axis Title 1800 Experiment 1200 1000 2000 Y Axis Title Experiment 1200 Xe 50 W 2200 0,03 0,02 0,02 0,01 0,01 0,00 0,00 0 Ion energy (eV) 200 0 200 Ion energy (eV) Simulations: IEDF for Xe:Ar=20:80 mixture, 27 MHz, 800 V, 50 m Qualitative comparison with experiment Plasma Applica Modeling Grou POSTECH Electron density and temperature: PIC cathode anode 160m 140m 675ns 700ns 810ns Electron Temperature (eV) 1260m 675ns 700ns 2.0 810ns 1.6 1.2 0.8 0.4 1 2 3 4 5 6 Position number Striation density and temperature: out of phase Plasma Applicati Modeling @ POST EECE 586 How to calculate potential and electric field in 3D charge-up simulation S.J. Kim, H.J. Lee, and J.K. Lee Plasma Application Modeling Lab. Department of Electronic and Electrical Engineering Pohang University of Science and Technology What is charge-up effect? Ion: anisotropic Electron: isotropic High charge-up potential Because of the electron shading effect in high aspect ratio etching, most of the ions reach the bottom of trench. High potential is generated at the bottom of trench. Trajectory of ions is changed. Plasma Application Modeling, POSTECH Simulation routine and basic assumptions Ion Electron Move particles (by E-field) All particles arrive at boundary Solve Laplace Equation Update Potential 0.2um Due to the small size of simulation domain( ~ 1um) • Particle flight time is much shorter than the time interval of each entering particle. Number of space charge particle is small in the simulation domain. Ignore space charge effect in the E-field calculation. • Collisions in the simulation domain are neglected. mean free path of ions or electrons(~mm) is much longer than the simulation domain size. • The potential at the top and bottom boundary is the same. Surface current is neglected. Plasma Application Modeling, POSTECH Flow chart Plasma Application Modeling, POSTECH Simulation domain and boundary conditions Plasma Application Modeling, POSTECH Solving electrostatic potential in 3D charge-up simulation(1) Space gradient of dielectric constant being considered, Poisson’s equation is as follows: Surface charges in the dielectric surfaces is only considered in right-hand. For solving PDE numerically, Poisson’s equation is represented as follows: 1 i 1 jk 1 1 ijk 1 i 1 jk i jk i jk i jk 2 2 2 i 2 jk 2 x 1 ij 1k 1 1 ijk 1 ij 1k ij k ij k ij k 2 2 2 ij 2 k 2 y 1ijk1 1 1 ijk 1ijk1 ijk ijk ijk 2 2 2 ijk 2 ijk 2 z Plasma Application Modeling, POSTECH Solving electrostatic potential in 3D charge-up simulation(2) Poisson’s equation is described as Matrix equation aijki 1 jk bijki 1 jk cijkij1k dijkij1k eijkijk1 f ijkijk1 gijkijk ijk aijk x cijk g ijk 1 ij k 2 2 y eijk 1 i jk 2 2 1 2 2 , bijk x , d ijk , f ijk 1 ij k 2 2 y ijk 1 i jk 2 2 1 2 2 ijk z z aijk bijk cijk d ijk eijk f ijk Plasma Application Modeling, POSTECH Successive OverRelaxation (SOR) • Elliptic PDE aCi , j a Li 1, j a Ri 1, j a Bi , j 1 aTi , j 1 Si , j • SOR method for solving PDEs i(,tj) Si , j a Li(t1), j a Ri(t1,1j) a Bi(,tj)1 aTi(,tj11) / aC (1 )i(,tj1) where, = 1 : Gauss-seidel (GS) method 0< < 1 : underrelaxation 1< <2 : overrelaxation How to choose optimal If Jacobi is the spectral radius of the Jacobi iteration, optimal 2 2 1 1 Jacobi Jacobi 2 x cos cos xgrid y ygrid 2 x 1 y where, = : Dirichlet or Neumann boundary conditions. = 2 : Periodic boundary conditions Plasma Application Modeling, POSTECH SOR algorithm for 2nd-order elliptic PDE From 2D finite difference model, ai , j ui 1, j bi , j ui 1, j ci , j ui , j 1 d i , j ui , j 1 ei , j ui , j si , j Iterative procedure: 1 u ( si , j ai , j ui 1, j bi , j ui 1, j ci , j ui , j 1 di , j ui , j 1 ) ei , j * * old uinew u ( 1 ) u ,j i, j i, j Residual is calculated as follows: i , j ai , j ui 1, j bi , j ui 1, j ci , j ui , j 1 d i , j ui , j 1 ei , j ui , j si , j u new i, j u old i, j i, j ei , j Finding optimal in SOR with Chebyshev acceleration ( 0) 1 2 (1/ 2) 1 /(1 Jacobi / 2) 2 ( n 1/ 2) 1 /(1 Jacobi ( n ) / 4), n 1 / 2,1,, ( ) optimal Plasma Application Modeling, POSTECH Solving electric field in 3D charge-up simulation Electric field is calculated by using Gauss’s law. i) Cases without changes in Ex ,ijk E z ,ijk i 1 jk i 1 jk 2x E y ,ijk ij1k ij1k 2y ijk1 ijk1 2z ii) Cases with changes in x-directional electric field in the plane of yz1 : E x ,ijk 1 1 i jk 2 x x E 1 E 1 E E ijk 1 E 1 1 1 i jk x ,ij k y , ij k y , ij k z , ijk z , ijk 2y 2z 2 2 2 2 2 2 where, E E 1 x ,i jk 2 z ,ijk 1 2 i 1 jk ijk x E 1 y ,ij k 2 ij1k ijk y ijk1 ijk z Plasma Application Modeling, POSTECH Main.c /***********************************************************/ /* The main physics loop */ void XGMainLoop() { int isp, phi_flag; it++; phi_flag=0; /* to determine if it is necessary to solve Laplace's Equaton */ for(isp=0; isp<nsp; isp++) { (*move_ptr)(isp); boundary(isp); phi_flag+=sp[isp].np; } if (theRunWithXFlag) history2(); if (phi_flag==0) { /* if no particle is left */ t+=DT; fields(); load(); if (theRunWithXFlag) history1(); } } /***************************************************************/ void display_title() { puts("\nEtch-3d Version 1.0"); puts("Made by Hae June Lee"); puts("Plasma Application Modeling Group"); puts("Pohang University of Science and Technology\n"); } /***************************************************************/ Plasma Application Modeling, POSTECH Motions of electrons and ions Electron Initial Saturated Ion Initial Saturated Plasma Application Modeling, POSTECH Potential profiles BC A Aspect ratio = 7 0.00 0.00 A 0.00 0.00 B 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.000.00 0.00 C 0.00 0.00 0.00 0.00 AR=3 0.00 0.00 0.000.00 300 280 260 240 220 200 180 160 140 120 100 80 60 40 20 0 -20 0.00 0.00 AR=3, long z-direction Plasma Application Modeling, POSTECH 3D Radiation Transport Simulation for Plasma Display Panels HyunChul Kim and J. K. Lee Plasma Application Modeling, POSTECH References: • A.F. Molisch and B.P. Oehry, Radiation Trapping in Atomic Vapours (Oxford, New York, 1998). • H.C. Kim, S.S. Yang, and J.K. Lee, J. Appl. Phys. 93, 9516 (2003). Plasma Application Modeling, POSTEC 1 History of FL3P Simulator 2000/12 : Initial cut of FL3P (FLuid simulator for 3-d Plasma Display Panels) as a generalization of FL2P 2001/09 : Implementation of self-consistent radiation model in FL2P 2001/10 : Its generalization to FL3P The first journal publication on 3D fluid PDP simulation 2002/02 : H.C. Kim et al., IEEE Trans. Plasma Sci. 30, 188. 2002/06 : H.C. Kim et al., J. Appl. Phys. 91, 9513. The journal publication on RT simulation in PDP 2002/06 : 2D self-consistent radiation transport model for Plasma Display Panels H.J. Lee et al., Phys. Plasmas 9, 2822. 2003/06 : 3D self-consistent radiation transport model … H.C. Kim et al., J. Appl. Phys. 93, 9516. Plasma Application Modeling, POSTEC 2 Resonance Radiation Trapping (I) i) Emission of Independent Excited-State Atoms Level 2 * n (r , t) n0 (r ) exp( t / ) A* A h Level 1 Atom 1 * Atom 2 ii) Interaction between ExcitedState Atoms (Radiation trapping: absorption/reemission processes) h A* A h Imprisonment of resonant radiation A A* h A* A h * n (r , t) n0 (r ) exp( t / g0 ) * Plasma Application Modeling, POSTEC 3 Resonance Radiation Trapping (II) Particle diffusion vs. radiation trapping Particle: Flight time >> Scattering time Photon: Scattering time >> Flight time • Spectral Line Broadening i) Natural broadening • Caused by the finite lifetime of the atomic levels and uncertainty principle • Lorentz line shape with FWHM 1 1 1 n 2 1 2 ii) Doppler broadening • Caused by the thermal motion of the atoms and Doppler effect D 2 2 ln( 2)k BT • Doppler line shape with FWHM 0 c M iii) Pressure broadening • Caused by the collisions with other atoms • Lorentz line shape with FWHM Resonance Radiation Trapping (III) 4 k ( ) [Ref] H.J. Lee and J.P. Verboncoeur, Phys. Plasmas 8, 3077 (2001) • Frequency redistribution at absorption/reemission process n* (r , t ) n*j (r ) exp( t / g j ) j Plasma Application Modeling, POSTEC 5 Holstein Equation (I) • Holstein equation (Continuity eqn. with radiation transport) • Kernel function (Prob. that photon emitted • Transmission factor (Freq-avg. prob. of at r’ is reabsorbed at r.) traversing a distance R) where R=|r-r’|. Plasma Application Modeling, POSTEC 6 Holstein Equation (II) • Holstein Equation 1 * 1 * * n (r , t ) S (r , t ) n (r , t ) n (r , t )G(r , r )dr t i) When n* is spatially uniform, it is reduced to 1 * * n (r , t ) S (r , t ) n (r , t ) t (r ) : Effective (r ) (r ) lifetime Escape factor (escape prob. of a photon) : (r ) 1 G(R)dV V eˆR 1 T (R) 2 eˆr dS 4 S R ii) When n* distribution is identical to the lowest-order eigenmode, * * n (r , t) n0 (r ) exp( t / g0 ) t n* (r,t ) g0 : Average time that a photon spends in the vapor before it escapes. g0 : Trapping factor (mean number g0 : Effective of absorption (or emission) lifetime processes that a photon suffers) Plasma Application Modeling, POSTEC 7 Numerical Methods for Holstein Equation 1 * 1 * * n (r , t ) S (r , t ) n (r , t ) n (r , t )G(r , r )dr t : Fredholm integral equation of the 2nd kind • Piecewise-Constant Approximation (PCA) Piecewise-constant approximation of the eigenfunctions Superior to PFM only when subcell # low (i.e.Carlo < 300)Simulation (MC) •isMonte Easy to program but slower than PFM • Propagator Function Method (PFM) Numerical method used for our research Plasma Application Modeling, POSTEC Calculation of Resonant State Density (I) 8 • Escape factor method cannot treat the redistribution of excited state density profile. • In this study, we use Propagator Function Method with full calculation of Holstein equation. 1 * 1 * * n (r , t ) S (r , t ) n (r , t ) n (r , t )G(r , r )dr t Propagator Function Method 1 Cells * Ak,m nm (t ) m eˆR Ak,m T (R) 2 ds Sm 4R From cell rm or( r ( ) ) rtoorcell k r Plasma Application Modeling, POSTEC 9 PDP Structure and Discharge AC PDP Sustain Electrode Discharge in PDP Visible Light Bus Electrode Sustain Electrode Bus Electrode Front Glass Substrate Protection Layer Dielectric Layer MgO Discharge Dielectric laye Barrier Rib Barrier Address Electr UV o Address Electrode Phosphor(R,G,B) Phosphor 90 Rear Glass Substrate rotation • Color AC PDPs operate on the same principle as fluorescent lamps converting UV to visible light by the use of phosphors. Plasma Application Modeling Group POSTECH 2 1 Xe*(3P1) Density Profiles (I) Solution of Holstein Equation Catho de 28 8 u m Escape Factor Method Top View Anod e Barr ier Ribs 0.4 us 10 30 86 4 60 u m 1. 0 2. 0 20 10 0 14 0 1.0 us 0. 2 (Unit: 1010 #/cm ) 5 2 0 40 2 Plasma Application Modeling, POSTEC 2 6 Energy Diagram Stand ard VUV Emission (10.9% of total input power) VUV on Phosphor (5.47 %) Visible on Phosphor (1.43 %) Visible Photon (0.433 %) 147nm 150nm 173nm (50.1 %) (45.9 %) (4.0 %) (35.1 %) (31.7 %) (31.8 %) (5.1 %) (4.7 %) (4.7 %) (59.8 %) (63.6 %) (63.5 %) Plasma Application Modeling, POSTEC Main.c /******************************************/ /* def.h */ #define EPS0 8.8542e-12 /* (F/m) */ #define NperTORR 8.3221e20 #define HISTMAX 2048 #define HISTMAX2 4096 #define NSMAX 2 #define QUIET_START #define RANDOM 0 1 #define GROUNDED #define VOLTAGE_D #define CURRENT_D 0 1 2 #define DIRICHLET #define NEUMANN #define PERIODIC #define SYMMETRIC 0 1 2 1 #define LEFT #define RIGHT #define UP #define DOWN 0 1 2 3 #define SIDES 2 /* ---- PNO means positive, negative, and ordinary in each directions, and C and V means concave and convex. --*/ #define NO_FACE #define FACE_X_UP #define FACE_X_DOWN #define FACE_Y_UP #define FACE_Y_DOWN #define FACE_Z_UP #define FACE_Z_DOWN #define SIDE_PPO_C #define SIDE_PNO_C #define SIDE_NPO_C #define SIDE_NNO_C #define SIDE_OPP_C #define SIDE_OPN_C #define SIDE_ONP_C 0 1 2 3 4 5 6 7 8 9 10 11 12 13 #define SIDE_ONN_C 14 #define SIDE_POP_C 15 #define SIDE_PON_C 16 #define SIDE_NOP_C 17 #define SIDE_NON_C 18 #define CORN_PPP_C 19 #define CORN_PNP_C 20 #define CORN_NPP_C 21 #define CORN_NNP_C 22 #define CORN_PPN_C 23 #define CORN_PNN_C 24 #define CORN_NPN_C 25 #define CORN_NNN_C 26 #define SIDE_PPO_V 27 #define SIDE_PNO_V 28 #define SIDE_NPO_V 29 #define SIDE_NNO_V 30 #define SIDE_OPP_V 31 #define SIDE_OPN_V 32 #define SIDE_ONP_V 33 #define SIDE_ONN_V 34 #define SIDE_POP_V 35 #define SIDE_PON_V 36 #define SIDE_NOP_V 37 #define SIDE_NON_V 38 #define CORN_PPP_V 39 #define CORN_PNP_V 40 #define CORN_NPP_V 41 #define CORN_NNP_V 42 #define CORN_PPN_V 43 #define CORN_PNN_V 44 #define CORN_NPN_V 45 #define CORN_NNN_V 46 // F means flat in xz surface #define CORN_PPP_F 47 #define CORN_NPP_F 48 #define CORN_PPN_F 49 #define CORN_NPN_F 50 // U means there is a side in up-direction #define CORN_PPP_U 51 #define CORN_NPP_U 52 #define CORN_PPN_U 53 #define CORN_NPN_U 54 /**************************************/ /* defining internal structures */ #define ACCUMULATION 0 #define INJECTION 1 #define OPEN 3 field.c (1) #include "et3d.h" #define my_div(x, y) ((fabs(y) <= 1e-25) ? 0 : x/y) void set_voltage(); float hdx, hdy, hdz; /***************************************************************/ void fields() { register int isp, i, j, k, n, ip1, im1, jp1, jm1, kp1, km1; float ex_mag, ey_mag, ez_mag, e_mag, temp, epsi1, epsi2; static int init_field_flag=1, stat_counter=0; static float ***epsx, ***epsy, ***epsz; if(init_field_flag) { hdx = 0.5*idx; hdy = 0.5*idy; hdz = 0.5*idz; epsx = tensor3(ngx, ngy, ngz); epsy = tensor3(ngx, ngy, ngz); epsz = tensor3(ngx, ngy, ngz); for(i=0; i<ngx; i++) for(j=0; j<ngy; j++) for (k=0; k<ngz; k++) eps_array[i][j][k] *= EPS0; for(i=0; i<ngx; i++) for(j=0; j<ngy; j++) for (k=0; k<ngz; k++) { if (bc_x==PERIODIC) im1= (i)?i-1:ncx-1; else im1= (i)?i-1:0; Symmetric jm1= (j)?j-1:0; Symmetric (y-direction) km1= (k)?k-1:ncz-1; Periodic (z-direction) epsx[i][j][k]=0.25*(eps_array[i][j][k] + eps_array[i][jm1][k] + eps_array[i][j][km1] + eps_array[i][jm1][km1]); epsy[i][j][k]=0.25*(eps_array[i][j][k] + eps_array[im1][j][k] + eps_array[i][j][km1] + eps_array[im1][j][km1]); epsz[i][j][k]=0.25*(eps_array[i][j][k] + eps_array[im1][j][k] + eps_array[i][jm1][k] + eps_array[im1][jm1][k]); } set_poisson_coefficient(); init_field_flag=0; } Setting initial values Call function which sets coefficients for solving poisson’s eq. Plasma Application Modeling, POSTECH field.c (2) /**************************************************/ /*** Get the charge densities.. ****/ for (i=0; i<= ncx; i++) for (j=0; j<= ncy; j++) for (k=0; k<ngz; k++) { sigma[i][j][k] = 0.0; source[i][j][k]= 0; } for (isp=0; isp< nsp; isp++) { for (i=0; i< ngx; i++) for (j=0; j< ngy; j++) for (k=0; k<ngz; k++) { source[i][j][k]-= sp[isp].q_per_cell*sp[isp].sigma[i][j][k]; sigma[i][j][k]+= sp[isp].q*sp[isp].sigma[i][j][k]; /* 아직 area로 나눠지지 않았음. */ } } /*******************************************/ /*** Solve Poisson's eqn with SOR method */ set_voltage(); Set =0 at the xzs plane. sor_num=sor_cheb(aa, bb, cc, dd, ee, ff, gg, source, phi, 1.0); Plasma Application Modeling, POSTECH field.c (3) /**********************************************/ /* Calculation of surface charge of conductor */ /* Divergence theorem 을 이용해서 (i,j,k) grid를 둘러싼 Cell에서의 Note Q = epsilon* \int E ds - \int rho dV 로 여분의 charge를 구할 수 Q E ds dv 있다. 이것을 area로 나누면 균일한 surface charge를 갖게 된다. */ for (i=0; i<ngx; i++) Note for (j=1; j<ngy; j++) ngx=ncx+1 for (k=0; k<ngz; k++) { ngy=ncy+1 if(grid_mask[i][j][k]==3 && face[i][j][k]) { ngz=ncz+1 if (bc_x==PERIODIC) { Note ip1= (i==ncx)?1:i+1; ip1(i+1)=1, 2, 3, …, ncx, 1 Grid mask = im1= (i)?i-1:ncx-1; im1(i-1)=ncx-1, 0, 1, …, ncx-1 } 0 : empty else { (symmetic boundary) 1 : inside dielectric ip1(i+1)=1, 2, 3, …, ncx, ncx ip1= (i==ncx)?ncx:i+1; 2 : dielectric surface im1= (i)?i-1:0; im1(i-1)=0, 0, 1, …, ncx-1 3 : conductor } 4 : simulation boundary jp1= (j==ncy)?ncy:j+1; kp1= (k==ncz)?1:k+1; jm1= (j)?j-1:0; km1= (k)?k-1:ncz-1; sigma[i][j][k] = dz*dy*(phi[i][j][k]-phi[ip1][j][k])*idx* 0.25*(eps_array[i][j][k]+eps_array[i][jm1][k]+ eps_array[i][j][km1]+eps_array[i][jm1][km1]); sigma[i][j][k]+= dz*dy*(phi[i][j][k]-phi[im1][j][k])*idx* 0.25*(eps_array[im1][j][k]+eps_array[im1][jm1][k]+ eps_array[im1][j][km1]+eps_array[im1][jm1][km1]); sigma[i][j][k]+= dz*dx*(phi[i][j][k]-phi[i][jp1][k])*idy* 0.25*(eps_array[i][j][k]+eps_array[im1][j][k]+ eps_array[i][j][km1]+eps_array[im1][j][km1]); sigma[i][j][k]+= dz*dx*(phi[i][j][k]-phi[i][jm1][k])*idy* 0.25*(eps_array[i][jm1][k]+eps_array[im1][jm1][k]+ eps_array[i][jm1][km1]+eps_array[im1][jm1][km1]); sigma[i][j][k]+= dx*dy*(phi[i][j][k]-phi[i][j][kp1])*idz* 0.25*(eps_array[i][j][k]+eps_array[i][jm1][k]+ eps_array[im1][j][k]+eps_array[im1][jm1][k]); sigma[i][j][k]+= dx*dy*(phi[i][j][k]-phi[i][j][km1])*idz* 0.25*(eps_array[i][j][km1]+eps_array[i][jm1][km1]+ eps_array[im1][j][km1]+eps_array[im1][jm1][km1]); } if (sigma[i][j][k]) sigma[i][j][k] = my_div(sigma[i][j][k], area[i][j][k]); Q E ds dv } Plasma Application Modeling, POSTECH field.c (4) /*******************************************/ /*** calculate the E field... ***/ for(i=0; i<=ncx; i++) for(j=0; j<=ncy; j++) for(k=0; k<=ncz; k++) { if (bc_x==PERIODIC) { ip1=(i==ncx) ? 1:i+1; im1=(i) ? i-1:ncx-1; } else { ip1=(i==ncx) ? ncx:i+1; im1=(i) ? i-1:0; } jp1= (j==ncy)?ncy:j+1; kp1= (k==ncz)?1:k+1; jm1= (j)?j-1:0; km1= (k)?k-1:ncz-1; if (j==0) { ex[i][j][k]=ez[i][j][k]=0; ey[i][j][k] = (phi[i][0][k]-phi[i][1][k])*idy ; } Note Ex ,ijk E y ,ijk E z ,ijk i 1 jk i 1 jk 2x ij1k ij1k 2y ijk1 ijk1 2z else if (j==ncy) { ex[i][j][k]=ez[i][j][k]=0; ey[i][j][k] = (phi[i][jm1][k]-phi[i][j][k])*idy; } else if (grid_mask[i][j][k]==3) { /* biased conductor의 경우, surface charge가 외부 회로에 의해 영향을 받기 때문에 이 방법을 쓸 수 없다. */ ex[i][j][k] = ey[i][j][k] = ez[i][j][k] = 0; if (face[i][j][k] ==FACE_Z_UP) ez[i][j][k] = sigma[i][j][k] /epsz[i][j][k]; else if (face[i][j][k]==FACE_Z_DOWN) ez[i][j][k] = -sigma[i][j][k] /epsz[i][j][km1]; Plasma Application Modeling, POSTECH field.c (5) else if (face[i][j][k]==FACE_Y_UP) ey[i][j][k] = sigma[i][j][k] /epsy[i][j][k]; else if (face[i][j][k]==FACE_Y_DOWN) ey[i][j][k] = -sigma[i][j][k] /epsy[i][jm1][k]; else if (face[i][j][k]==FACE_X_UP) ex[i][j][k] = sigma[i][j][k] /epsx[i][j][k]; else if (face[i][j][k]==FACE_X_DOWN) ex[i][j][k] = -sigma[i][j][k] /epsx[im1][j][k]; else if (face[i][j][k]==CORN_PPP_F || face[i][j][k]==CORN_NPP_F || face[i][j][k]==CORN_PPN_F || face[i][j][k]==CORN_NPN_F) ey[i][j][k] = sigma[i][j][k] /epsy[i][j][k]; else if (face[i][j][k]==SIDE_PPO_V) { epsi2=(eps_array[im1][j][km1]+eps_array[im1][j][k]+ eps_array[i][jm1][km1]+eps_array[i][jm1][k]+ eps_array[i][j][km1]+eps_array[i][j][k])/6.0; ex_mag = (phi[i][j][k] -phi[ip1][j][k])*idx; ey_mag = (phi[i][j][k] -phi[i][jp1][k])*idy; e_mag = sqrt(ex_mag*ex_mag + ey_mag*ey_mag); ex[i][j][k] = fabs(sigma[i][j][k])*my_div(ex_mag, e_mag)/epsi2; ey[i][j][k] = fabs(sigma[i][j][k])*my_div(ey_mag, e_mag)/epsi2; } else if (face[i][j][k]==SIDE_NPO_V) { epsi2=(eps_array[im1][jm1][km1]+eps_array[im1][jm1][k]+ eps_array[im1][j][km1]+eps_array[im1][j][k]+ eps_array[i][j][km1]+eps_array[i][j][k])/6.0; ex_mag = (phi[im1][j][k] -phi[i][j][k])*idx; ey_mag = (phi[i][j][k] -phi[i][jp1][k])*idy; e_mag = sqrt(ex_mag*ex_mag + ey_mag*ey_mag); ex[i][j][k] = fabs(sigma[i][j][k])*my_div(ex_mag, e_mag)/epsi2; ey[i][j][k] = fabs(sigma[i][j][k])*my_div(ey_mag, e_mag)/epsi2; } else if (face[i][j][k]==SIDE_OPP_V) { epsi2=(eps_array[i][j][km1]+eps_array[im1][j][km1]+ eps_array[i][j][k]+eps_array[im1][j][k]+ eps_array[i][jm1][k]+eps_array[im1][jm1][k])/6.0; ez_mag = (phi[i][j][k] -phi[i][j][kp1])*idz; ey_mag = (phi[i][j][k] -phi[i][jp1][k])*idy; e_mag = sqrt(ez_mag*ez_mag + ey_mag*ey_mag); ez[i][j][k] = fabs(sigma[i][j][k])*my_div(ez_mag, e_mag)/epsi2; ey[i][j][k] = fabs(sigma[i][j][k])*my_div(ey_mag, e_mag)/epsi2; } Plasma Application Modeling, POSTECH field.c (6) else if (face[i][j][k]==SIDE_OPN_V) { epsi2=(eps_array[i][j][km1]+eps_array[im1][j][km1]+ eps_array[i][j][k]+eps_array[im1][j][k]+ eps_array[i][jm1][km1]+eps_array[im1][jm1][km1])/6.0; ez_mag = (phi[i][j][km1] -phi[i][j][k])*idz; ey_mag = (phi[i][j][k] -phi[i][jp1][k])*idy; e_mag = sqrt(ez_mag*ez_mag + ey_mag*ey_mag); ez[i][j][k] = fabs(sigma[i][j][k])*my_div(ez_mag, e_mag)/epsi2; ey[i][j][k] = fabs(sigma[i][j][k])*my_div(ey_mag, e_mag)/epsi2; } } /* end of conductor surface */ else if (grid_mask[i][j][k]==2) { ex[i][j][k] = hdx*(phi[im1][j][k] - phi[ip1][j][k]); ey[i][j][k] = hdy*(phi[i][jm1][k] - phi[i][jp1][k]); ez[i][j][k] = hdz*(phi[i][j][km1] - phi[i][j][kp1]); if (face[i][j][k]==FACE_X_UP) { /* For the case that epsilon doesn't change in y,z directions */ epsi1=epsx[im1][j][k]; epsi2=epsx[i][j][k]; ex[i][j][k]=sigma[i][j][k] + epsi1*( (phi[im1][j][k]-phi[i][j][k])*idx - 0.5*dx* ( idy*(2*phi[i][j][k]-phi[i][jp1][k]-phi[i][jm1][k])*idy +idz*(2*phi[i][j][k]-phi[i][j][kp1]-phi[i][j][km1])*idz) ); ex[i][j][k]/=epsi2; } Note else if (face[i][j][k]==FACE_X_DOWN) { epsi2=epsx[im1][j][k]; ijk 1 i jk epsi1=epsx[i][j][k]; 2 ex[i][j][k]=sigma[i][j][k] + 1 E 1 x E 1 E 1 epsi1*( (phi[ip1][j][k]-phi[i][j][k])*idx - 0.5*dx* E x ,ijk x ,ij 2 k 2y y ,ij 2 k y ,ij k 2 ( idy*(2*phi[i][j][k]-phi[i][jp1][k]-phi[i][jm1][k])*idy 1 i jk +idz*(2*phi[i][j][k]-phi[i][j][kp1]-phi[i][j][km1])*idz) ); 2 x E 1 E 1 ex[i][j][k]/=-epsi2; z ,ijk 2z z ,ijk 2 2 } else if (face[i][j][k]==FACE_Y_UP) { i 1 jk ijk E 1 epsi1=epsy[i][jm1][k]; x ,i jk x 2 epsi2=epsy[i][j][k]; ij1k ijk E 1 ey[i][j][k]=sigma[i][j][k] + y ,ij k y 2 epsi1*( (phi[i][jm1][k]-phi[i][j][k])*idy - 0.5*dy* ijk1 ijk ( idx*(2*phi[i][j][k]-phi[ip1][j][k]-phi[im1][j][k])*idx E 1 +idz*(2*phi[i][j][k]-phi[i][j][kp1]-phi[i][j][km1])*idz) ); z ,ijk z 2 ey[i][j][k]/=epsi2; } else if (face[i][j][k]==FACE_Y_DOWN) { Plasma Application epsi2=epsy[i][jm1][k]; Modeling, POSTECH field.c (7) epsi1=epsy[i][j][k]; ey[i][j][k]=sigma[i][j][k] + epsi1*( (phi[i][jp1][k]-phi[i][j][k])*idy - 0.5*dy* ( idx*(2*phi[i][j][k]-phi[ip1][j][k]-phi[im1][j][k])*idx +idz*(2*phi[i][j][k]-phi[i][j][kp1]-phi[i][j][km1])*idz) ); ey[i][j][k]/=-epsi2; } else if (face[i][j][k]==FACE_Z_UP) { epsi1=epsz[i][j][km1]; epsi2=epsz[i][j][k]; ez[i][j][k]=sigma[i][j][k] + epsi1*( (phi[i][j][km1]-phi[i][j][k])*idz - 0.5*dz* ( idx*(2*phi[i][j][k]-phi[ip1][j][k]-phi[im1][j][k])*idx +idy*(2*phi[i][j][k]-phi[i][jp1][k]-phi[i][jm1][k])*idy) ); ez[i][j][k]/=epsi2; } else if (face[i][j][k]==FACE_Z_DOWN) { epsi2=epsz[i][j][km1]; epsi1=epsz[i][j][k]; ez[i][j][k]=sigma[i][j][k] + epsi1*( (phi[i][j][kp1]-phi[i][j][k])*idz - 0.5*dz* ( idx*(2*phi[i][j][k]-phi[ip1][j][k]-phi[im1][j][k])*idx +idy*(2*phi[i][j][k]-phi[i][jp1][k]-phi[i][jm1][k])*idy) ); ez[i][j][k]/=-epsi2; } } else { ex[i][j][k] = hdx*(phi[im1][j][k] - phi[ip1][j][k]); ey[i][j][k] = hdy*(phi[i][jm1][k] - phi[i][jp1][k]); ez[i][j][k] = hdz*(phi[i][j][km1] - phi[i][j][kp1]); } } } /***************************************************************/ void set_voltage() { register int i, k; for (i=0;i<ngx;i++) for (k=0;k<ngz;k++) { phi[i][0][k]= 0; phi[i][ncy][k]=0; } } Plasma Application Modeling, POSTECH SOR3d.c(1) #include "et3d.h" /* Successive Overrelaxation (SOR) with Chebyshev acceleration */ int sor_cheb(float ***a, float ***b, float ***c, float ***d, float ***e, float ***f, float ***g, float ***s, float ***u, double omega) { register int i,j,k; int im1,ip1,jm1,jp1,km1,kp1; int iterations; float residue, change, max_change; int i_order,j_order,k_order; int i_max2, j_max2, k_max2; float anorm, old_anorm=0.0; /* rjac is input as the spectral radius of the Jacobi iteration, or an estimate of it */ if (bc_x == SYMMETRIC) i_max2 = ncx; else if (bc_x == PERIODIC) i_max2 = ncx-1; if (bc_y == SYMMETRIC) j_max2 = ncy; else if (bc_y == PERIODIC) j_max2 = ncy-1; if (bc_z == SYMMETRIC) k_max2 = ncz; else if (bc_z == PERIODIC) k_max2 = ncz-1; for(iterations=1;iterations<=SOR_MAX;iterations++) { anorm = 0.0; max_change = 0; for (i_order = 0; i_order < 2; i_order++) { k_order = i_order; for (i=0;i<=i_max2;i++) { j_order = k_order; for(k=0;k<=k_max2;k++) { /* if i_order = 0, i is even => j_order = 0, even j is swept i is odd => j_order = 1, odd j is swept if i_order = 1, i is even => j_order = 1, odd j is swept i is odd => j_order = 0, even j is swept */ Plasma Application Modeling, POSTECH SOR3d.c(2) for(j=j_order;j<=j_max2;j+=2) { if(grid_mask[i][j][k] !=3 && j>0 && j<ncy) { im1 = i - 1; ip1 = i + 1; jm1 = j - 1; jp1 = j + 1; km1 = k - 1; kp1 = k + 1; if (bc_x == SYMMETRIC) { if(im1 == -1) im1 = 1; if(ip1 == ncx+1) ip1 = ncx-1; } else if (bc_x == PERIODIC) { if(im1 == -1) im1 = ncx-1; if(ip1 == ncx) ip1 = 0; } if (bc_y == SYMMETRIC) { if(jm1 == -1) jm1 = 1; if(jp1 == ncy+1) jp1 =ncy-1; } else if (bc_y == PERIODIC) { if(jm1 == -1) jm1 = ncy-1; if(jp1 == ncy) jp1 = 0; } if (bc_z == SYMMETRIC) { if(km1 == -1) km1 = 1; if(kp1 == ncz+1) kp1 =ncz-1; } else if (bc_z == PERIODIC) { if(km1 == -1) km1 = ncz- 1; if(kp1 == ncz) kp1 = 0; } Note Residual (2D): i , j ai , j ui 1, j bi , j ui 1, j ci , j ui , j 1 di , j ui , j 1 ei , j ui , j si , j /* residual */ residue = a[i][j][k]*u[im1][j][k] + b[i][j][k]*u[ip1][j][k] + c[i][j][k]*u[i][jm1][k] + d[i][j][k]*u[i][jp1][k] + e[i][j][k]*u[i][j][km1] + f[i][j][k]*u[i][j][kp1] + g[i][j][k]*u[i][j][k] - s[i][j][k]; Note change = omega*residue/g[i][j][k]; if (i_order == 0) anorm += change*change; u[i][j][k] -= change; In 2D case, old uinew , j ui , j i, j ei , j Plasma Application Modeling, POSTECH SOR3d.c(3) if (bc_x == PERIODIC && i == 0) u[ncx][j][k] = u[0][j][k]; if (bc_y == PERIODIC && j == 0) u[i][ncy][k] = u[i][0][k]; if (bc_z == PERIODIC && k == 0) u[i][j][ncz] = u[i][j][0]; max_change = max(max_change, fabs(change)); } } /* 0 , 1 swap */ j_order = 1 - j_order; } /* 0 , 1 swap */ k_order = 1 - k_order; } if (iterations==1 && k_order==0) omega=1.0/(1.0-0.5*rjac_square); else omega=1.0/(1.0-0.25*rjac_square*omega); Note Finding optimal in SOR with Chebyshev acceleration ( 0) 1 2 (1/ 2) 1 /(1 Jacobi / 2) 2 ( n 1/ 2) 1 /(1 Jacobi ( n ) / 4), n 1 / 2,1,, ( ) optimal } if (bc_x == PERIODIC && bc_z == PERIODIC) for (j=0;j<ngy;j++) u[ncx][j][ncz]=u[0][j][0]; if (max_change < tol_pois) return iterations; #if 0 if (!cheb_flag) { if (iterations > 1) { opt_omega=obtain_opt_omega(anorm, old_anorm, omega); } old_anorm = anorm; } #endif } /* End of Iteration Loop */ fprintf(stderr, " Max. # of Iteration exceeded in SOR\n"); return -1; } Plasma Application Modeling, POSTECH SOR3d.c(4) /* rjac is input as the spectral radius of the Jacobi iteration, or an * estimate of it */ void set_rjac_square() { double rjac,factor; factor = dx*dx/dy/dy; Note 2 x cos cos xgrid y ygrid Jacobi 2 x 1 y where, = : Dirichlet or Neumann boundary conditions. = 2 : Periodic boundary conditions if (bc_x == SYMMETRIC && bc_y == SYMMETRIC) rjac = (cos(M_PI/ncx)+factor*cos(M_PI/ncy)); else if (bc_x == PERIODIC && bc_y == PERIODIC) rjac = (cos(2.*M_PI/ncx)+factor*cos(2.*M_PI/ncy)); else if (bc_x == PERIODIC && bc_y == SYMMETRIC) rjac = (cos(2.*M_PI/ncx)+factor*cos(M_PI/ncy)); else if (bc_x == SYMMETRIC && bc_y == PERIODIC) rjac = (cos(M_PI/ncx)+factor*cos(2.*M_PI/ncy)); rjac /= (1.+factor); rjac_square = rjac*rjac; } double obtain_opt_omega(double anorm, double old_anorm, double omega) { double mu_W, mu_J, opt_omega; mu_W = sqrt(anorm/old_anorm); mu_J = (mu_W+omega-1.0)/(omega*sqrt(mu_W)); Note opt_omega = 2.0/(1.0+sqrt(1.0-mu_J*mu_J)); return opt_omega; aijki 1 jk bijki 1 jk } void set_poisson_coefficient() { register int i, j, k; int ii, im1, jm1, jj, km1, kk, isp; for (i=0;i<ngx;i++) for (j=0;j<ngy;j++) for (k=0;k<ngz;k++) { if (grid_mask[i][j][k] !=3) { ii = adjust_x(i); jj = adjust_y(j); kk = adjust_z(k); im1 = adjust_x(i-1); jm1 = adjust_y(j-1); km1 = adjust_z(k-1); cijkij1k dijkij1k eijkijk1 f ijkijk1 gijkijk ijk aijk x cijk g ijk 1 ij k 2 2 y eijk 1 i jk 2 2 1 2 2 ijk , bijk x , d ijk 1 i jk 2 2 1 ij k 2 2 y 1 2 2 ijk , f ijk z z aijk bijk cijk d ijk eijk f ijk Plasma Application Modeling, POSTECH SOR3d.c(5) aa[i][j][k]= eps_array[im1][jj][kk] + eps_array[im1][jm1][kk] + eps_array[im1][jj][km1]+ eps_array[im1][jm1][km1]; bb[i][j][k]= eps_array[ii][jj][kk] + eps_array[ii][jm1][kk] + eps_array[ii][jj][km1]+ eps_array[ii][jm1][km1]; cc[i][j][k]= eps_array[ii][jm1][kk] + eps_array[im1][jm1][kk] + eps_array[ii][jm1][km1]+ eps_array[im1][jm1][km1]; dd[i][j][k]= eps_array[ii][jj][kk] + eps_array[im1][jj][kk] + eps_array[ii][jj][km1]+ eps_array[im1][jj][km1]; ee[i][j][k]= eps_array[ii][jj][km1] + eps_array[im1][jj][km1] + eps_array[ii][jm1][km1]+ eps_array[im1][jm1][km1]; ff[i][j][k]= eps_array[ii][jj][kk] + eps_array[im1][jj][kk] + eps_array[ii][jm1][kk]+ eps_array[im1][jm1][kk]; } Note aa[i][j][k]*=idx2; bb[i][j][k]*=idx2; idx2=0.25*idx*idx cc[i][j][k]*=idy2; dd[i][j][k]*=idy2; ee[i][j][k]*=idz2; ff[i][j][k]*=idz2; gg[i][j][k]= -(aa[i][j][k] + bb[i][j][k] + cc[i][j][k] + dd[i][j][k] + ee[i][j][k] + ff[i][j][k]); } } int adjust_x(int i) { if (bc_x == SYMMETRIC) { /* not valid for all integer range */ if (i < 0) i = (-i-1) % ncx; else if (i >= ncx) i = ncx - 1 - i % ncx; } else if (bc_x == PERIODIC) { if (i < 0) i = ncx - 1 - (-i-1) % ncx; else if (i >= ncx) i = i % ncx; } return i; } Plasma Application Modeling, POSTECH SOR3d.c(6) int adjust_y(int j) { if (bc_y == SYMMETRIC) { if (j < 0) j = (-j-1) % ncy; else if (j >= ncy) j = ncy - 1 - j % ncy; } else if (bc_y == PERIODIC) { if (j < 0) j = ncy - 1 - (-j-1) % ncy; else if (j >= ncy) j = j % ncy; } return j; } int adjust_z(int k) { if (bc_z == SYMMETRIC) { if (k < 0) k = (-k-1) % ncz; else if (k >= ncz) k = ncz - 1 - k % ncz; } else if (bc_z == PERIODIC) { if (k < 0) k = ncz - 1 - (-k-1) % ncz; else if (k >= ncz) k = k % ncz; } return k; } Plasma Application Modeling, POSTECH