Electromagnetic Computation Methods for Lightning Surge Protection Studies
by Yoshihiro Baba, Vladimir A. Rakov
Appendix 3D-FDTD Program in C++
This appendix contains an example of a 3D-FDTD (finite-difference time domain) program written in C++ programming language for computing vertical electric and azimuthal magnetic fields on flat, perfectly conducting ground at a distance of 100 m from a vertical lightning channel. The lightning channel is represented by the modified transmission line model with linear current decay with height, which is simulated by a phased-current-source array. The channel-base current has a peak of 10.95 kA and a 10–90% risetime of 1 μs. The current wave propagates upward at 100 or 300 m/μs. The working volume has a size of 3000 × 3000 × 2000 m and is divided uniformly into cubic cells of 10 × 10 × 10 m. The time increment is set to 19.05 ns. The maximum observation time is set to 10 µs.
There are five modules. The first one is the main program: “main.cpp.” The second one is “set.h,” which specifies values of input parameters and constants. The third and the fourth ones are “efield.h” and “hfield.h,” which compute electric fields and magnetic fields, respectively, at each time step in the working volume. The last one is “liao2abc.h,” which computes tangential electric fields on the absorbing boundaries.
Figure A.1 shows the waveform of channel-base current. Figure A.2a shows FDTD-computed waveforms of vertical electric field on flat, perfectly conducting ground at a distance of 100 m from the vertical lightning channel for two different return-state wavefront ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access