versión impresa ISSN 0016-7169
Geofís. Intl v.47 n.3 México jul./sep. 2008
XFTRISTAN: A program to visualize the interaction between solar wind and Earth's magnetosphere
J. M. BlancoBenavides1,* and F. FrutosAlfaro2
1 Department of Physics 11322 89 Avenue, University of Alberta, Edmonton Alberta, Canadá. *Corresponding author: firstname.lastname@example.org
2 Space Research Center and School of Physics, University of Costa Rica, San José, Costa Rica. Email: email@example.com
Received: October 29, 2007
Accepted: April 29, 2008
XFTRISTAN es una interfaz gráfica para el programa TRISTAN, un código basado en el método PIC (particle in cell) tridimensional. Este código ha sido ampliamente usado para investigar la naturaleza cinética de los procesos de plasmas espaciales que van desde aplicaciones relacionadas con la interacción de viento solar con la tierra hasta la topología de la reconexión magnética. La primera versión del XFTRISTAN provee un camino fácil para la introducción de parámetros de entrada, visualizaciones de campos y partículas, varias herramientas de diagnóstico y generación automática de imágenes. En este artículo presentamos las ventajas y virtudes de nuestra interfaz gráfica y los primeros resultados de las simulaciones.
Palabras clave: Física espacial, plasmas, magnetosferas, simulaciones.
XFTRISTAN is a graphical user interface (GUI) for the tridimensional particle in cell (PIC) code called TRISTAN. The TRISTAN code has been widely used to investigate the kinetic nature of space plasma processes applied to problems ranging from solar windearth interaction to magnetic reconnection topology. This first XFTRISTAN version provides an easy way to enter input parameters, visualization of fields and particles, several diagnostic tools and automatic image generation. In this paper, we present the advantages and capabilities of our GUI and first simulation results.
Key words: Spaces physics, plasmas, magnetospheres, simulations.
Nowadays, computer visualization is very important in physics, because, one can not only simulate complex phenomena, but also understand them better. Moreover, the technology improves very quickly so that complex phenomena can be visualized sometimes in real time.
The TRISTAN code is intended mainly to study the interaction of solar wind with a planetary magnetosphere. Many papers have been written using TRISTAN results (see Cai and Nishikawa references). This code can be downloaded freely from the Internet. In our program, we use a translation into C of the original Fortran version of TRISTAN.
XFTRISTAN is an interactive program devoted to the visualization of the results that TRISTAN produces. It has a GUI built with the XFORMS software and runs under the Linux or Unix computer system. We will describe how it works and some of its applications.
TRISTAN (Tridimensional Stanford) code was written originally by Oscar Buneman in Fortran. Improvements have been made mainly by Nishikawa and others (see references). Parallelized versions HPFTRISTAN made by Cai et al. (2003), and PART by Peter Messmer (2001), contributed to increase the amount of simulated particles and spatial domain. Visualization using OpenGL has also been carried out (Cai et al., 2001). TRISTAN code uses the Maxwell equations (Faraday and Ampère) to update fields which are defined on a discrete grid according to the Yee lattice scheme, and the relativistic Lorentz force is used to update particle position and velocities (Matsumoto, 1993). The physical properties of particles take continuous values. Interpolation between gridded and continuous variables is performed by means of the PIC method. Positions and velocities are leapfrogged in time, as well as the electric and magnetic fields. Instead of solving the GaussMaxwell equations, a rigorous charge conserving algorithm (Villasenor and Buneman, 1992) is applied. The only disadvantage is that, due to the fact that Tristan is a particle code, plasma simulations cannot be performed with the same number of particles as in nature, so physical quantities must be rescaled to avoid depletion of computational resources.
TRISTAN interfaced: XFTRISTAN
A simulation code is a mixture of science principles translated by means of discretized formulae of a mathematical model and an author's creativity in implementing this model to the computational environment. These ideas are nonphysical and their interpretation by other users is never easy at this level. Usually, proven numerical methods are involved in the treatment of plasma physics problems and an advanced knowledge in computational physics is required.
So even science professionals can have some trouble in using simulation codes if they are not used to work in a computational environment. The creation and use of a GUI is the way of avoiding this difficulty and let the user take care of the part he or she knows.
XFTRISTAN works as GUI for the TRISTAN code. A translation of TRISTAN into C was made to ensure compatibility between the code and the XFORMS library used to design the interface program, and with the MESA library (open version of the OpenGL libraries) which is used to generate and display the visualizations. The advantages of XFTRISTAN are
• The user does not need to know the fully numerical detailed performance of TRISTAN.
• Input data is provided easily by the user. Default input data is included.
• New input data and options can be included without need of recompilate the code.
• Several plasma visualization options have been included.
• Some diagnostic tools are also available.
• Image generation and visualization is possible in real time. Few millions of particles can be simulated in PC computers. A 1500 steps simulation can take approximately 12 hours.
The incorporation of input parameters to the model can be performed whether by calling the Simulation Setup window and setting the data manually, or by executing the XFTRISTAN program with the path and name of a configuration file. Executing XFTRISTAN without any arguments would load a default configuration file, whose values are shown and can be changed in the Simulation Setup window. Initialization of particle positions and velocities, and initial fields is performed when the user asks the program to do so in the same window or when the user advances directly to the visualization or the diagnostics windows; whose options depend on the initial parameters.
Interplanetary magnetic fields (IMF) must be programmed by the user.
A technique used by other authors implies the sufficiently slow magnetization of the plasma to diminish the false acceleration of particles, and several iterations (depending on the strength of the field) to let the plasma reach a stable state.
Among the applications of XFTRISTAN, there are:
• Representation of electron and/or ion density. Particle densities can be visualized as contours in one or several planes of the domain, or can be coded according to a color scale.
• Display of electromagnetic fields. Vector fields are represented at the grid points by arrows. Magnitude of fields are displayed as contours or/and color intensities.
• Visualization of particle motion and velocity vector field in the spatial volume.
For any of them, the user is asked to provide some of the initial conditions prior to the beginning of the simulation, such as to choose the specie(s) of particles to be considered in the calculation of visualization data, to decide the range of values to be represented for each physical variable, and to determine the spatial region to be visualized.
Besides the visualization of plasma, XFTRISTAN can apply several diagnostic tools to a previously defined region of the spatial volume. Available tools at this time are:
• PhaseSpace, PhasePhase diagrams.
• Distribution on velocity space.
• Histograms, and
• A Particle Trajectory Tracker. In this case the program identifies the particles into the volume selected and keeps track of their trajectories.
A test simulation
Initial attempts to use the program were based on simulations performed with the HPFTRISTAN code (Cai et al., 2003). The simulation was not successfully finished because of the high computational requirements on memory and hard disk space.
A less expensive XFTRISTAN run has been done to test the resulting performance of the translated and incorporated TRISTAN code. The input parameters are listed in Table 1, and are the same used in Nishikawa (1997).
The simulation consists on plasma drifting in the +x direction, a circular current loop is loaded to simulate the earth dipole field. We will compare some simulation's results with the ones obtained by the author in that publication.
Fig. 1 shows the ion density at the plane z=48Δx once the simulation reaches a stationary state. Electron densities were reported in Nishikawa et al. (1995). The dipole field is oriented out of the page and the solar wind is incoming from the left. Ions are strongly slowed down and deflected at the bow shock before they reach the earth; the bow shock causes this region to have the highest particle concentration. At the left of the magnetopause another region of particle concentration can be observed, but it is most likely the result of the proximity to the boundary of the computational domain. In order to prove this it would be necessary to perform numerical experiments using larger domains and a different number of particles, another possible line of research would be the implementation of spatiotemporal filters in TRISTAN.
The ion density profile of the y=47Δx plane is presented in Fig. 2. The algorithm followed by the program has automatically switched the orientation of the image; solar wind is propagating from the right side and the dipole is vertically oriented. Particle entries can be seen at the top and bottom of the dipole field. Also, right after the earth, a higher than zero concentration is visible; ions seem to be trapped by the magnetic field as in a radiation belt. Similar structures are seen by Nishikawa et al. (1995). Images from Cai et al. (2003) suggest that using a bigger number of particles gets rid of the asymmetry of the radiation belts found here.
Finally, the magnetic field configuration is depicted in Fig. 3. The magnetic dipole is very well defined. The Solar wind coming from the right compresses the earth magnetic field in the dayside of the magnetosphere, meanwhile at the nightside lines are extended. Magnetic induction at the white region corresponds to a bigger magnitude than the preconfigured range of values for visualization.
A program intended to interface a C version of the TRISTAN code has been created: XFTRISTAN manages input data, plasma visualizations and tools related to particle trajectories, phasespace analysis and histograms were included. A first diagnostic simulation based on publications from other authors has been performed to test our program, the recorded images of particle densities and magnetic field configuration show good agreement with the ones from previous works.
As future work we pretend to further check TRISTAN by numerically integrating an IMF to simulate magnetic storms and compare the results with previously published papers (Nishikawa, 1998). Further modifications of the code, intending to reproduce the two stream instabilities in 3D are being performed. Additional useful visualizations and diagnostics to study this instabilities would be developed.
Cai, D., Y. Li, K. I. Nishikawa, C. Xiao, X. Yan and P. Zuying, 2003. Parallel 3D Electromagnetic Particle code using High Performance Fortran: Parallel TRISTAN, Lecture Notes in Physics, Springer, 615, 25. [ Links ]
Cai, D., Y. Li, T. Ichikawai, C. Xiao and K. I. Nishikawa, 2001. Visualization and criticality of threedimensional magnetic field topology in the magnetotail, Earth Planets Space, 53, 1011. [ Links ]
Matsumoto, H. and Y. Omura, 1993. Computer Space Plasma Physics: Simulation Techniques and Software, Terra Scientific Publishing Company, Tokyo. [ Links ]
Messmer, P., 2001. ParT: A Parallel Relativistic Fully 3D Electromagnetic ParticleinCell Code, Lecture Notes in Computer Science, Springer, 1947, 350. [ Links ]
Nishikawa, K. I., 1997. Particle entry into the magnetosphere with a southward interplanetary magnetic field studied by a threedimensional particle code, Jour. of Geophys. R., 102, 17, 631. [ Links ]
Nishikawa, K. I., 1998. Reconnections at NearEarth magnetotail and substorms studied by a 3D EM Particle Code, Geospace Mass and Energy Flow: Results From the International SolarTerrestrial Physics Program, Geophysics Monograph Series, 104, edited by J. L. Horwitz, W. K. Peterson, and D. L. Gallagher, p. 175, AGU, Washington D.C. [ Links ]
Nishikawa, K. I., 1995. Neubert, T., Buneman, O., Solar WindMagnetosphere Interaction as Simulated by a 3D EM Particle Code, Astrophys. Space Sc., 227, 265276. [ Links ]
Nishikawa, K. I., 2001. TRISTAN code and its applications, Proceedings of ISSS6. [ Links ]
Nishikawa, K. I., 2001. TRISTAN code and its application for global solar windmagnetosphere interaction, Proceedings of ISSS6. [ Links ]
Villasenor, J. and O. Buneman, 1992. Rigorous charge conservation for local electromagnetic field solvers, Computer Phys. Commun., 69, 306316. [ Links ]