Codes


My project required me to design numerous small codes to set up initial conditions and manipulate data in to a readily consumable form using IDL. The most important examples are given here, along with a brief explanation of their usage and purpose. Reference is made to a code named 'PREFT' designed by Dana Longcope among others, with simulates a retracting magnetic field line.


Generate_multitube - this code constructs the "zig-zag" shape of a field line retracting following simultaneous reconnection. Various parameters can be changed, including bend angle (this can be different for each bend), spacing between bends, and number of bends (in theory any number of bends in the line can be placed by in practice only two were used throughout my project).


Quick_vid - this code was made to produce movies of how properties change in time. It plots several plasma variables given via output files from the PREFT code, such as density, pressure and velocity, up to some time, forming a video. This was to make it easier to see what was happening immediately after running some numerical experiments. The video can be looped using an optional variable.


Get_momentum - this code takes data files output from PREFT and calculates the net force and momentum pointwise on the fieldline.


Spiking - this code is quite incomplete. Its purpose was to investigate why an angle of 120 degrees produced an optimal density decrease for a temperature of 3MK (see results for more info). I'd noticed that the behaviour of the velocity changed depending on the angle and wanted to quantify the 'spiking' seen in the velocity profile. This proved challenging and while I meant to complete this code to analyse the results, I was unable to do so before the end of my project.


Single_density - this code calculates, for some file output by PREFT, the minimum density along the field line as a function of time. That is, at each time-step the minimum density throughout the field line is calculated.


All_density - this code, which uses single_density as a subroutine, calculates the overall minimum density achieved along a field line as a function of the bend angle - up to some fixed time t. It accepts a range of files output from PREFT.


Find_beta - calculates the plasma beta throughout a field line.


Max_beta - finds and plots the maximum plasma beta against time. These beta functions were made to ensure that the plasma beta did not approach too closely or even exceed 1 in any of the experiments, as this would have violated the approximations made when deriving the relevent equations.


Get_energies - calculated the kinetic, magnetic, thermal and total energy for a field line retracting in time.

About Me

Project

Weekly Log

Home

Codes

Other Links

Misc

Results