Algorithms for Real Time Magnetic Field Tracing and Optimisation B.D. Blackwell 1 B. McMillan 2, A.C. Searle 3 and H.J. Gardner 4 1 Plasma Research Laboratory,

Slides:



Advertisements
Similar presentations
Steady-state heat conduction on triangulated planar domain May, 2002
Advertisements

Tuning of Loop Cache Architectures to Programs in Embedded System Design Susan Cotterell and Frank Vahid Department of Computer Science and Engineering.
Lecture Notes #11 Curves and Surfaces II
Isoparametric Elements Element Stiffness Matrices
A Discrete Adjoint-Based Approach for Optimization Problems on 3D Unstructured Meshes Dimitri J. Mavriplis Department of Mechanical Engineering University.
Exploration of bump, parallax, relief and displacement mapping
Dynamic Load Balancing for VORPAL Viktor Przebinda Center for Integrated Plasma Studies.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 10 Ravi Ramamoorthi
EMLAB 1 Numerical Boundary Conditions. EMLAB 2 A Problem at the Boundary of the Grid We must implement the update equations for every point in the grid.
Verbs and Adverbs: Multidimensional Motion Interpolation Using Radial Basis Functions Presented by Sean Jellish Charles Rose Michael F. Cohen Bobby Bodenheimer.
EARS1160 – Numerical Methods notes by G. Houseman
A new class of magnetic confinement device in the shape of a knot Abstract We describe a new class of magnetic confinement device, with the magnetic axis.
Lecture 3 Jack Tanabe Old Dominion University Hampton, VA January 2011 Conformal Mapping.
Instructor: Mircea Nicolescu Lecture 13 CS 485 / 685 Computer Vision.
Realtime visualization and optimization of vacuum surfaces - Boyd Blackwell, ANU Real time tracing code BLINE (Summer Scholar: Antony Searle, ANU) –multi-thread/processor.
Isoparametric Elements Element Stiffness Matrices
Progress in Configuration Development for Compact Stellarator Reactors Long-Poe Ku Princeton Plasma Physics Laboratory Aries Project Meeting, June 16-17,
CSE351/ IT351 Modeling and Simulation
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
Nature’s Algorithms David C. Uhrig Tiffany Sharrard CS 477R – Fall 2007 Dr. George Bebis.
LPK Recent Progress in Configuration Development for Compact Stellarator Reactors L. P. Ku Princeton Plasma Physics Laboratory Aries E-Meeting,
Planning operation start times for the manufacture of capital products with uncertain processing times and resource constraints D.P. Song, Dr. C.Hicks.
8 Feb 99Quasi-symmetry - Boyd Blackwell1 Quasi Symmetric Stellarators Boyd Blackwell, ANU History of Stellarator Optimisation –sigma optimisation, j ||
Identifying Interplanetary Shock Parameters in Heliospheric MHD Simulation Results S. A. Ledvina 1, D. Odstrcil 2 and J. G. Luhmann 1 1.Space Sciences.
Introduction to virtual engineering László Horváth Budapest Tech John von Neumann Faculty of Informatics Institute of Intelligent Engineering.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Curve Modeling Bézier Curves
Fast imaging of global eigenmodes in the H-1 heliac ABSTRACT We report a study of coherent plasma instabilities in the H-1 plasma using a synchronous gated.
TITLE RP1.019 : Eliminating islands in high-pressure free- boundary stellarator magnetohydrodynamic equilibrium solutions. S.R.Hudson, D.A.Monticello,
Modularizing B+-trees: Three-Level B+-trees Work Fine Shigero Sasaki* and Takuya Araki NEC Corporation * currently with 1st Nexpire Inc.
Computer Graphics Group Tobias Weyand Mesh-Based Inverse Kinematics Sumner et al 2005 presented by Tobias Weyand.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
Algorithms for real-time visualization and optimization of vacuum surfaces - Boyd Blackwell, ANU We describe a fast, flexible multi-mesh interpolation.
1 Hybrid methods for solving large-scale parameter estimation problems Carlos A. Quintero 1 Miguel Argáez 1 Hector Klie 2 Leticia Velázquez 1 Mary Wheeler.
Introduction Tracking the corners Camera model and collision detection Keyframes Path Correction Controlling the entire path of a virtual camera In computer.
COMPUTER AIDED DESIGN -(CAD)-3
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
22 July 2008 John Hart Toroid Field Parameterisation 1 Toroid Field Parameterisation An informal report to the RAL ATLAS meeting John Hart 22 July 2008.
An Iterated Method to the Dubins Vehicle Travelling Salesman Problem OBJECTIVES Develop an algorithm to compute near optimal solutions to the Travelling.
The Heavy Ion Fusion Virtual National Laboratory Pulsed Normal Quadrupoles for a Heavy Ion Fusion Driver Final Focus Section D. Shuman, S. S. Yu, LBNL.
Accuracy Based Generation of Thermodynamic Properties for Light Water in RELAP5-3D 2010 IRUG Meeting Cliff Davis.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
A Computationally Efficient Framework for Modeling Soft Body Impact Sarah F. Frisken and Ronald N. Perry Mitsubishi Electric Research Laboratories.
Max-Planck-Institut für Plasmaphysik, EURATOM Association Different numerical approaches to 3D transport modelling of fusion devices Alexander Kalentyev.
112/5/ :54 Graphics II Image Based Rendering Session 11.
Course 8 Contours. Def: edge list ---- ordered set of edge point or fragments. Def: contour ---- an edge list or expression that is used to represent.
Interactive Graphics Lecture 10: Slide 1 Interactive Computer Graphics Lecture 10 Introduction to Surface Construction.
TITLE Stuart R.Hudson, D.A.Monticello, A.H.Reiman, D.J.Strickler, S.P.Hirshman, L-P. Ku, E.Lazarus, A.Brooks, M.C.Zarnstorff, A.H.Boozer, G-Y. Fu and G.H.Neilson.
Local Illumination and Shading
Optimal Path Planning Using the Minimum-Time Criterion by James Bobrow Guha Jayachandran April 29, 2002.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Application: Multiresolution Curves Jyun-Ming Chen Spring 2001.
Smoothed Particle Hydrodynamics Matthew Zhu CSCI 5551 — Fall 2015.
Solution approaches to the marker layout problem. Kath Dowsland Gower Optimal Algorithms Ltd.
Image-Based Rendering Geometry and light interaction may be difficult and expensive to model –Think of how hard radiosity is –Imagine the complexity of.
Ergodic heat transport analysis in non-aligned coordinate systems S. Günter, K. Lackner, Q. Yu IPP Garching Problems with non-aligned coordinates? Description.
UNC Chapel Hill David A. O’Brien Automatic Simplification of Particle System Dynamics David O’Brien Susan Fisher Ming C. Lin Department of Computer Science.
CPU (Central Processing Unit). The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where.
NIMROD Simulations of a DIII-D Plasma Disruption S. Kruger, D. Schnack (SAIC) April 27, 2004 Sherwood Fusion Theory Meeting, Missoula, MT.
Introduction to Parametric Curve and Surface Modeling.
Unstructured Meshing Tools for Fusion Plasma Simulations
Stellarator Divertor Design and Optimization with NCSX Examples
Fitting Curve Models to Edges
Objective of This Course
UMBC Graphics for Games
Introduction to Parametric Curve and Surface Modeling
New Results for Plasma and Coil Configuration Studies
Presentation transcript:

Algorithms for Real Time Magnetic Field Tracing and Optimisation B.D. Blackwell 1 B. McMillan 2, A.C. Searle 3 and H.J. Gardner 4 1 Plasma Research Laboratory, RSPhysSE, 2 present address: Department of Physics, Melbourne University) 3 Department of Physics, Faculty of Science, 4 Department of Theoretical Physics, RSPhysSE and Department of Computer Science FEIT, The Australian National University, Canberra, ACT 0200, Australia , FAX , Abstract We describe a fast, flexible multi-mesh interpolation method for tracing vacuum magnetic field lines in complex geometries, with a post processing perturbation method for computer optimisation of magnetic surface properties. Real-time, interactive tracing (~20,000 steps/second) of advanced magnetic geometries for fusion plasma confinement is possible on an inexpensive personal computer with 3D graphics acceleration. Recent advances in plasma theory and computation allow the design of highly sophisticated new magnetic confinement devices for plasma fusion [1] The methods described here enable detailed optimisation of the magnet coils. Magnetic fields are defined by a set of “systems” of conductors or macro- elements which are made up of finite filament segments or circular filaments. Magnetic field values are calculated directly or interpolated by a cubic tri-spline on regular rectangular cubic meshes for optimum speed of evaluation. A hierarchy of meshes may be employed by associating each system of magnetic macro-elements with any number of meshes to provide the required resolution for the various regions of interest, such as regions very close to conductors. The mesh arrays are populated systematically in idle cycles, or when required by the algorithm if tracing is active in a mesh that is not already populated. In refining a new magnetic configuration, the basic coil set may be conveniently described by a system of ~ 10 3 elements for each coil set, with fully pre-calculated meshes, allowing only variation in the current. The “additional” coil presently under study is represented by a simpler polygon for which the magnetic field is evaluated directly, allowing manipulation of both currents and vertices in real time. The above method results in tracing rates an order slower than a single mesh, accurately defining the magnetic properties of the surface (rotational transform, magnetic well) in much less than a minute. Alternatively these properties may be estimated by a perturbation method in a fraction of a second, allowing construction of computer optimization loops. The perturbation analysis considers small angular deviations from an unperturbed trace produced by the magnetic field of the additional coil system in calculating the change in rotational transform it produces. Associated algorithms described include an efficient single evaluation predictor-corrector integrator, a rapidly converging high precision evaluation of rotational transform, and coil shape optimisation algorithms, implemented in C++. Multi-threading techniques, making efficient use of a shared memory dual processor, have enabled real-time visualisation and interaction in a virtual environment (“Wedge” [2] ) described in detail in that paper. What is the simplest possible magnetic configuration that has the basic properties of, and similar parameters, to realistic plasma configurations? We require: –nested magnetic surfaces that enclose no conductors –the magnetic field can be evaluated very quickly –iota (twist per turn) ~ 1: aspect ratio low ~ 5-10 (“fat” torus) –highly 3D, so that codes and algorithms are tested thoroughly –represent by real conductors to ensure that Maxwell’s Eqns are satisfied “triator” –only 4 simple elements (finite filaments) –iota ~ 0.6, bean shaped, (similar to Tom Todds?) “single loop” toroidal helix: curiosity –slow evaluation Minimal Confinement Geometries The most popular integration methods for magnetic field line tracing are Runge-Kutta (4th order - used by most codes to start up, no previous points requ’d) 4 evals Predictor-Corrector (The HELIAC code uses 3rd order predictor, 4th order corrector 2 evals In magnetic field line tracing applications, the derivative evaluation step is time consuming, so it is desirable to minimize the number of derivative evaluations per step. The BLINE code uses a single evaluation predictor-corrector Predictor: (four step, fourth order Adams-Bashforth) x pred = x i-1 + h/24 (55ƒ(x i-1 ) - 59ƒ(x i-2 ) + 37ƒ(x i-3 ) - 9ƒ(x i-4 ))(no new evaluations) Corrector: (four step, fifth order Adams-Moulton) x i = x i-1 + h/24 (9ƒ(x pred ) + 19ƒ(x i-1 ) - 5ƒ(x i-2 ) + ƒ(x i-3 )) (only one evaluation of B(r)) The resulting speed improvement is a factor of 1.55 (Fujitsu VP2200) - 2x Fast, Single Evaluation Predictor-Corrector Multi-threading is an efficient way to utilize a low cost, multi-processor shared memory machine use windows threads (posix under linux) (Multiple Instruction Single Data) –needs semaphore system (e.g. no tracing while loading a new mesh) multi-threaded code runs fine on single processor (some priority tuning useful on single processor) initial scheme –tracing thread, display thread and mesh-filling threads –large caches on Intel machines favour each thread working in distant memory locations to avoid slowdown by cache overlap conflicts multi-threading  object oriented coding Multi-processing Find a nearby rational surface by iteration ~ middle order –say ~ 30 circuits Store B and derivatives along this closed path For each iteration of the perturbing winding locus, integrate  x   B/B 0 where  B is the perturbing field and B 0 the original field (Alternatively integrate cpt of  B in the surface, normalized to B 0 and the puncture spacing at that point ~ Boozer  ) Perturbation Calculation of iota BB B0B0 Check perturbation calculation of  /  I by direct calculation of  in the initial and slightly perturbed configurations. Ultra high accuracy (<1e-7) calculations of iota necessary to check  /  I when perturbation is small to avoid non- linearity Direct iota measurement uses apodised least-squares fit, converges exponentially once significant Fourier cpts are captured. Correction for area change can be significant Accuracy of perturbation calculation of   /  I Perturbation result: cf Simulated annealing: –virtual temperature T –accept a new configuration even if slightly worse (up to T) –“heat” to explore new configurations –“cool” to “home in” on optimum Annealing more tolerant of occasional anomalies in “goodness” function, e.g. local minima or discontinuities (resonances) Speed is increased by –use of perturbation technique for calculating transform –incremental changes in conductor locus - only two elements change –3 fold and up/down symmetry speed up by a factor of 6x. Minimization by steepest descent less suitable - highly multi-variate - typically variables, similarity to travelling salesman problem. Computer Optimization of Transform Given an existing coil set, what is the most efficient way to add rotational transform (twist-per-turn)? existing conductor set is a “standard heliac” Constraint: additional conductor lies anywhere inside a torus, periodicity N=3 –(actually end-point and middle point fixed in each period) Seek maximum in transform/(length  current) Result is very close to the “flexible heliac” configuration proposed for transform and well control by Harris et al, 1985 Optimization of iota reproduces flexible heliac The optimized winding is shown in pink, and exaggerated in thickness for clarity against the thinner basic (existing) conductor configuration. Comparison of the optimised conductor (blue) with the “flexible heliac” toroidal helix. Differences are mainly due to incomplete annealing. Constrain conductor to lie on a cylinder, periodic (N=3) Seek maximum transform near the axis of a heliac per unit (length  current) Base configuration is heliac Reproduces approximate “sawtooth coil” Optimum conductor outside plasma: R=R 0 constraint  “sawtooth coil” Very useful for following particles out of machine (so far, not a drift calculation) Very fast (50k/sec) configuration evaluation for varying current ratios in existing coil system (e.g. H-1 flexibility studies) Fast evaluation (10k/sec) of new winding (“simple”) in arbitrarily complex existing configuration Iota perturbation calculation works, and is fast. Well perturbation calculation implemented, but not debugged Possibly extend to island width as in Rieman & Boozer 1983 optimization principle demonstrated “standard results” recovered real time operation  possibility of human guidance during optimization Develop/find “Meta-Language” for description of symmetries and constraints Conclusions and Future Work Background: Closed magnetic field lines are the basis of magnetic confinement of plasma, ultimately for the production of fusion energy from the heavy hydrogen in water. It is important that the closed lines twist around each other (rotational transform), and form closed, nested magnetic surfaces, in the shape of a torus. Plasma confinement and stability are related to the rotational transform (twist per turn around the torus). There are many magnetic configurations which confine plasma successfully Theheliac of the H-1 National Facility is shown below in cBline, and rendered to the right To the far right is a modular coil stellarator. Real Confinement Geometries Pre-calculate magnetic field B on hierarchy of rectangular meshes using a cubic tri-spline interpolation method mesh hierarchy(blue) underneath the hierarchy of magnetic macro-elements (“sub-systems”) –e.g. H-1 has 3 meshes for main field, but one coarse mesh for VF (Helmholtz) coils. Additional small, finer grids can be placed in critical areas that are heavily travelled e.g. near helical core –Splitting coils into subsystems allows quick configuration adjustment by varying currents (linear combination I 1 M 1 + I 2 M 2 + I 3 M 3 ) copy of mesh in neighborhood stored as array to fit into CPU cache –subarray of mesh representing the neighbourhood of a point would be spread over a large fraction of memory, and would not fit into the Level 2 (512K) cache on the Pentium II. –keep local copy (4x4x4) of mesh in neighbourhood of present position –only one face has to be updated - usually the next trace step is quite close –3D array derivatives calculated on demand from B and stored only in local mesh –reduces the time penalty for the large mesh “get” method (the local copy is accessed as an array) mesh filled on demand and/or in background –(see also Gourdon code, Zacharov’s code (Hermite polynomials)) Mesh Interpolation H-1 heliac Toroidal coils 3 meshes of 32×128×32 Helmholtz coils 1 mesh 64×64×32 central core 3 meshes of 16×128×16 3x3 submeshes 32×128×32 A magnetic field line is traced by direct and mesh- based calculations. The average and worst case difference of the mesh-based from the direct calculation are shown. Convergence is better than 5th order in  x. Meshes of 10-50MByte are adequate even near edge to allow for regions of high gradient near conductors, the distance to the nearest conductor is recorded in each cell, and Bline automatically reverts to direct calculation if too close to a conductor. Cubic Spline Mesh Convergence 5th order or better in  x This modular stellarator (right) was computer optimized by a much lengthier, more complete process taking into account plasma pressure. The coils have not been optimised from an engineering viewpoint: although they have the inportant propoerty of not linking any other coils (for disassembly, maintenance), their shape could me smoothed. Computational Techniques