SimPIMF v2.0 code in JAVA for simulation and optimization of coils    

  

 

Abstract : The new unified SimPIMF is described. Several codes in different languages are combined in a single object oriented code in JAVA language. New features are implemented like the parametric generation of coils and a decision algorithm to choose the best structure of coils.

 


                       General description

    The present version of the code is v2.0. It compiles  the explanations in references [1].

 

  The code is totally a JAVA application. The object oriented code easily allows the implementation of new definitions of coils and new modules for the calculation of the behaviour of the particles for each configuration of coils

 

  It was tried to use NESCOIL code or one similar but at the moment it is not possible, so the present improvement and compilation was developed.

   The method used here is very old and consists in the generation of a series of coils and to try to obtain the best structure. The space of parameters is usually too big so the processing time is high. However it is acceptable as a starting point for further developments.

 

 

   The objective is to define a set of coils for UST_1 with some degree of optimization and to learn about the physics of  confinement of particles. Some future applications are planed.

 

  



Main Classes in the code

 

   Version 1.4 of JAVA is used at this moment.

 

 

  Alfabetically the main classes are :

 

Coil : (Coil.java) It generates coils in the 3D space as a series of vertices. Each coil has other properties such as current, precision in the definition ... . Only toroidal and helical coils on a circular toroidal surface are generated.

 

CoilSystem : Generates a series of objects Coil depending on the definition. The system of coils is defined as number of TF coils, HF coils ; L , m parameters, geometrical major and minor radius, and other elements.

 

D. : Universal constants

 

GraphicRepresentation : One method to convert trajectories of particles and configurations of coils in files that can be displayed.

 

 

MagneticGrid :  The class that calculate, create, export and import an object Grid. In essence the grid  is a 3D array which store 3D vectors that define a grid of magnetic field to speed up the calculations. It is calculated from the definition of coils by mean of Biot-Savart. Some methods to interpolate the nodes and to calculate the gradient in one point are available.

 

MathFunction : Some functions to change coordinates, and generate distributions of particles, like a Maxwellian distribution (not implemented yet)

 

Particle : Class that stores the information of each particle. At the same time it acts as a trajectory object because it saves the trajectory of each particle if the option is activated. Besides it stores accumulative results like the ripple of the particle, poloidal and toroidal turns, rotational transform of each particle...

 

Plasma  : Object that defines a plasma as a group of "Particles" in a "MagneticGrid". Presently if is only a "low quality" plasma because it only simulates trajectories. Other modules will be added if necessary.

    The main methods are:

'P' : Poincare simulation for the calculation of magnetic ripple, rotational transform, magnetic surfaces, study the magnetic field, etc.

'D' : Simulation which includes drift effects, energy conservation and dynamic movement of the particles on the field lines to obtain trapped particles. The magnetic moment is conserved as a consequence of the system.

'L' : It includes Larmour trajectories but it is not yet tested in JAVA. However it was well tested and commonly used in the previous codes. This simulation  is the slowest.

    These methods include the calculation of averaged characteristics of the life of the particles, like averaged vectorial drift, number of bounces in the magnetic field and others.

 

SpaceParam : Class to define some inputs of the code. Now 4 parameters are available : Pitch One and 2 of the coils , HF current and point of the birth of a reference particle (to maximize the last closed surface)

 

SpaceResults :  It compiles and saves the results and obtains the optimum configuration of parameters. Rotational transform, magnetic ripple, averaged drift and proportion of trapped particles are the only present results. Each series of results are weighted to obtain a best choice with respect the required results. Usually a value of rotational transform at some surface (really it is the trajectory of the particle that travels on such a surface), a small value of ripple, drift and proportion of trapped particles.

 

The main class : This class is continuously evolving and includes the definition of the system of coils, the grid, size of the device, number of particles to simulate, the space of parameters to use. A series of loops for the optimization of each parameter. Some elements to gather information and switches to allow certain calculations or not. It uses all the other classes. In each loop the coil system is recalculated, and so the Grid. A new Plasma is created and the particles evolve. The results are stored and another loop begins.

   After the series of loops a reduction of the space of parameters is done to speed up the optimization but currently it is better to choose manually the new space of parameters.

 

   The particles  are randomly thrown in a toroidal volume similar to the enclosed volume in the last closed surface.

 

 

 

  Results      

 


  Some results and the search of optimum coils for L=2 , m=3,4,5 and even L=1 (with no stable orbits for planar axis) have been tryed.

   In some cases the simulation lasts 6 hours. In this case 600 particles in 'D' simulation and 36 coils configurations are tested.

 

   More information about particular results will appear in the next page.

 

 

 

 

Further developments

 

   The code should be tested against experimental data. The graphical representation and input of data is poor and need improvement. Trapped particles with whole freedom could be tested.

 

 References

[1]  "Magnetic surfaces from de improved SimPIMF v1.2 . Calculation of rotational transforms"

"Simulation of trapped particles for the optimization of UST_1 coils"

"Simulation of magnetic surfaces in a classical stellarator using SimPIMF v1.0"

"Development of a basic code for Monte Carlo simulation of trajectories of plasma particles"

Vicente M. Queral . See  All Past R&D" in this web

 

 

 


 

Last Update 31-12-2005