1 / 22

The Universal Accelerator Parser

The Universal Accelerator Parser. David Sagan Dan Bates Andy Wolski. Overview. Project motivation Accelerator Markup Language (AML) Overview Example Universal Accelerator Parser (UAP) Overview Internal Structure Example Language Module Superposition of elements Control elements

ryann
Download Presentation

The Universal Accelerator Parser

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. The Universal Accelerator Parser David Sagan Dan Bates Andy Wolski

  2. Overview • Project motivation • Accelerator Markup Language (AML) • Overview • Example • Universal Accelerator Parser (UAP) • Overview • Internal Structure • Example • Language Module • Superposition of elements • Control elements • Project status • Conclusion 2006 ICAP

  3. Project Motivation Fred designs a complicated beamline using MAD Format: SIF A Tower of Babel: Eric wants to simulate this using PLACET Format: SIF doesn’t work Need to translate deck to PLACET’s native dialect! Algernon wants to do some BDSIM work Brian wants cross-check the result using ELEGANT Different accelerator analysis programs use different input formats to describe a lattice 2006 ICAP

  4. Solution Common Lattice Description Format MAD • Wish List: • Comprehensive set of machine elements. • Ability to describe control room knobs, support girders, klystrons, etc. • Describe complex machine layouts. • Describe spatially overlapping elements • Ability to use arithmetic expressions. • Flexible - Easily upgradeable to meet changing requirements. ELEGANT PLACET BDSIM 2006 ICAP

  5. Accelerator Markup Language • Accelerator Markup Language (AML) • AML is standardized lattice description format based upon the eXtensible Markup Language (XML). • Why base AML on XML? • XML is a standard (HTML is based upon XML). • The flexibility of XML gives AML the ability to be easily extended when desired. • The flexibility of XML gives AML the ability to be easily used as the basis for a database describing an entire accelerator complex. 2006 ICAP

  6. XML Example XML represents data as a node tree: • <root> • <child1> • … etc … • </child1> • <child2 attrib = "val"> • … etc … • </child2> • <child3 /> • … etc … • </root> root child1 child2 attrib = "val" child3 2006 ICAP

  7. AML Example <laboratory> <doc>Hello World!</doc> <element name = "q01"> <length design = "0.6" /> … etc … </element> <sector name = "fodo"> <element ref = "q01" /> … etc .. </sector> … etc … </laboratory> laboratory doc element sector 2006 ICAP

  8. AML in Brief • Accelerator Markup Language: • Full set of machine elements including: • wigglers, linac accelerating cavities, etc. • Can describe physically overlapping elements. • Can describe "control room knobs", power supplies,klystrons and other control elements. • Can define multiple "machines" linked together. AML can serve as the starting point for a database for an accelerator complex. 2006 ICAP

  9. Universal Accelerator Parser Problem: Implementing software that can read in an AML lattice file can be a time consuming process. To do this for each analysis program represents a great duplication of effort. Solution: An open source collaborative effort to implement a software library for reading AML files. The Result:The Universal Accelerator Parser project. 2006 ICAP

  10. UAP Overview Input Representation Subtree Translation Mad Input File AML Representation Subtree Evaluation & Expansion AML Flat Lattice Subtree UAP Internal Structure: Parsing AML Input File Analysis Program 2006 ICAP

  11. UAP Internal Structure UAP uses a node tree to store information: Basic node: Node: Name Parent Node Attribute List Ptr to Parent Node Ptr to Children Child Node • Attribute: • Name = “Value” 2006 ICAP

  12. UAP Tree When the UAP software reads a lattice file it creates a tree. The root node has three children: • <UAPRoot> • <Input_Representation> - Mirrors the input lattice file. • <AML_Representation> - AML equivalent lattice. • <AML_Flat_Lattice> - Expanded lattice with all expressions evaluated 2006 ICAP

  13. Example • Mad input file: • ! MAD input file • q1: quad, l = 2*A • s2: sextupole • l1: line = (q1, 2*s2) • use, l1 • beam, energy = 5.2 • <Input_Representation> • <doc> • "! MAD input file" • </doc> • <element name = "q1" • key = "quadrupole" l = "2*A" /> • <element name = ”s2" • key = "sextupole" /> • <line name = "l1"> • <element name = "q1" /> • <element name = "s2" repeat = "2" /> • <use line = "l1" /> • <beam energy = "5.2" /> • </Input_Representation> 2006 ICAP

  14. Example Con’t <AML_Representation> <laboratory> <doc>"MAD input file"</doc> <element name = "q1" /> <quadrupole /> <length design = "2*A" /> </element> <element name = "s2" /> <sextupole /> </element> <machine> <sector name = "l1"> <element ref = "q1" /> <sector repeat = "2"> <element ref = "s2" /> </sector> </sector> <root_sector ref = "l1" /> <beam> <energy design = "(5.2) * 1e9" /> </beam> </machine> … <AML_Flat_Lattice> <machine> <tracking_lattice> <element name = "q1"> <quadrupole /> <length design = "6" /> </element> <element name = "s2"> <sextupole /> </element> <element name = "s2"> <sextupole /> </element> </tracking_lattice> <beam> <energy design = "5.2e9" /> </beam> </machine> </AML_Flat_Lattice> 2006 ICAP

  15. Adding a Language Module To add a language module one needs to add parsing and translation routines: UAP Internal Structure: Parsing Input File Lang A Input Representation Subtree Translation AML Representation Subtree “Easy” Evaluation & Expansion “Hard” AML Flat Lattice Subtree 2006 ICAP

  16. Language Translation Parsing Input File Lang 1 Input Representation Lang 1 Translation AML Representation Translation Parsing Input File Lang 2 Input Representation Lang 2 2006 ICAP

  17. Superposition In AML machine elements may spatially overlap other elements: <element name = "sol"> <solenoid /> <length = "2" /> </element> <element name = "drft"> <drift /> <length = "2" /> </element> <element name = "q2"> <quadrupole /> <length = "1" /> </element> <sector name = "this_sect"> <element ref = "sol" /> <element ref = "drft" /> <element ref = "q2" superimpose_at = "1.2" ref_element = "sol" /> </element> </sector> Sol q2 2006 ICAP

  18. Superposition Con't Sol q2 AML File: AML_Flat_Lattice Subtree: Sol|1 Sol|q2 q2|1 Tracking lattice: Sol q2 Master List: 2006 ICAP

  19. Controllers AML provides a meechanism for defining "control room knobs: AML Flat Lattice Subtree: <controller name = "ps1" variation = "ABSOLUTE" > <control element = "q1" attribute = "multipole:k1" coef = "2.3 * sin(ps1)" /> <control element = "sol" attribute = "multipole:ks" coef = "-5.7 * ps1" /> </controller> Tracking lattice: q1 sol ps1 Control list: 2006 ICAP

  20. Project Status • Accelerator Markup Language: • The basic specification exists. • Lots of room for development. • Universal Accelerator Parser: • Currently under development. • Expect usable software in 3 - 6 months. • MAD-8 andMAD-X Language modules will be implemented. • Open source (GNU Lesser General Public License). • Source is available at SouceForge.com. • Written in C++. • Java version. • Fortran90 interface. • Anyone who is interested in invited to participate. • Project home page: • http://www.lns.cornell.edu/~dcs/aml 2006 ICAP

  21. Conclusion • The Universal Accelerator Parser software is currently under development for lattice parsing of AML, MAD-8, MAD-X, ... • Its use holds the promise of greatly improving the interoperability between different programs. • The UAP library contains bookkeeping routines to simplify the task of simulating the control system, and defining and manipulating complex beamline features such as physically overlapping elements, etc. 2006 ICAP

  22. Thanks Yves Roblin Mike Forster Theo Larrieu Tom Pelaia Frank Schmidt Peter Tenenbaum Nick Walker Mark Woodley Nikolay Malitsky Richard Talman 2006 ICAP

More Related