1 / 13

ITM_FLUSH progress report An access layer for Equilibrium Data

ITM_FLUSH progress report An access layer for Equilibrium Data. Huw Leggate. Overview. Background Recap on Flush Where has ITM_FLUSH got to? How can it be used? Future work. Background.

kirkb
Télécharger la présentation

ITM_FLUSH progress report An access layer for Equilibrium Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ITM_FLUSH progress reportAn access layer for Equilibrium Data Huw Leggate Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  2. Overview • Background • Recap on Flush • Where has ITM_FLUSH got to? • How can it be used? • Future work. Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  3. Background • ITM requirement for an easily installable machine and platform independent library to provide equilibrium related quantities and co-ordinate mapping. A black box interface for IMP#1. • The existing JET FLUSH library seemed an ideal starting point. • Initialised with one call • Provides a large number of geometric functions • Uses NAG routines to fit bicubic splines to equilibira • Detailed documentation available • Well used • Needed to be rewritten to make it platform and machine independent – some routines can be retained temporarily Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  4. What is ITM_FLUSH? • ITM FLUx Surface Handling • Shared or static library written in C with the goal of providing equilibrium quantities; derivatives, integrals, tangents. • ANSII C – platform independent… • Uses NAG routines to calculate Bi-cubic splines on a regular grid, input can be irregular. • Callable from C and Fortran • Entire project under source control on the ITM server - Garching Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  5. FLUSH structure • Flushinit reads data • Spline fitting and calculations are done in calculateFlushParameters • Data stored in structures that are accessed via get and set routines • User can pass data directly to Flush routines or to calculateFlushParameters. Ensures thread safety. Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  6. Flush – state of play • The “Engine” is complete – libITMflush.so • Used by JETTO at JET • Data Access routines • PPF • Eqdsk • MDSplus ITM database – phase3 • Directly as ITM structure in Fortran90 • Fixed Boundary data as ITM structure (F90) • Directly as Flux map • Some routines ported – libflush_routines.so • Units, FlushState Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  7. Current ITM_FLUSH tools (1) • First flushInit must be called, as in original flush • Flupn – provides Flux, Br and Bz components • Not that much really… • Also 1st and 2nd derivatives of flux • Values of F and q Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  8. Current ITM_FLUSH tools (2) • First flushInit must be called, as in original flush • Flusur – Flux surfaces and Br, Bz components • Flul – Tangents • Flusin – Equilibrium Integrals • Full range of get routines Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  9. Documentation, Installation and Testing • Manual is being written at present • Doxygen provides detailed information on each procedure • Installation must be done by hand but is simple. gcc and a Fortran compilier required. NAG is preferred. • Precompiler switches allow PPF, MDSplus and NAG to be removed • Basic test script uses an eqdsk file • In Garching SVN project • ITM_FLUSHhttp://solps-mdsplus.aug.ipp.mpg.de/wsvn/ITM_FLUSH/ Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  10. Doxygen Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  11. Using ITM_FLUSH • Initialise • flushInit(&igo,&ishot,&itime,&lunget,&iseq,uid,dda,&lunmsg,&ier, uidlen, ddalen); • Call initITMfixedboundary(equ,ierr) • ts_initProfiles(&rawData, &fittedData, tokData,npsi… • retVal = setFlushState(fs); • Call the routines /* Get coordinates on the midplane */ retVal = getMagAxis(&rMagAxis,&zMagAxis,&fluxMagAxis,&ierr); if(retVal > 0 ) return retVal; retVal = findMidPlaneLCFSIntersection(&rOuter, &rInner, &ierr); if(retVal > 0 ) return retVal; } /* Store r z and a values */ for(i=0;i<npoints;i++) { r[i] = rMagAxis + (i * (rOuter - rMagAxis) / (double)(npoints-1)); z[i] = zMagAxis; a[i] = (r[i] - rMagAxis)/(rOuter - rMagAxis); } retVal = flupn3(&npoints, r, z, flux, br, bz, bt, &ier); if(retVal > 0 ) return retVal; for(i=0;i<npoints;i++) { bpol[i] = (br[i] + bz[i]); printf("r = %f, flux = %f, Br = %f, Bz = %f, Bt = %f\n",r[i],flux[i],br[i],bz[i],bt[i]); } Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  12. Future • NAG problem still to be resolved – dierckx routines available – pspline? • Divertor/Limiter data format/access – defaults exist at JET • Addition of extra routines • Inverse and other coordinate systems – Inverse not a problem • C++ object wrappers • Extra language support (matlab, IDL, java… Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

  13. FLUSH tools • Return Flux - Flupn … • Mappings, tangents and intersections - Flul, Flups… • Projections onto midplane - Flupax, Fluqax… • Reconstructing surfaces - Flusur, Flusu2, Flusul • Reconstructing open flux lines - Flouter, Flseparatrix • Equilibrium and geometry integrals - Flugeo, Flusin, Flinte • Local derivatives - Flusht, Flut • Volume elements - Flushv, Fluvol, Flblow, Flul2b • Divertor data routines - First wall, List_div_designs Huw Leggate – ITM_FLUSH ITM, Garching, Sept 2007 (remote)

More Related