Top Banner
Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity University David Kaufmann, SwRI
40

Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Jan 19, 2018

Download

Documents

Raymond Dalton

What is Swift? (1 of 2) 1.S/W package (subroutine library + drivers) 2.Integrates a set of gravitationally interacting bodies together with a set of test particles 3.Written in ANSI standard Fortran 77 4.Industry standard for the planetary science community
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Improving Swift

Hal Levison (PI), SwRIMartin Duncan (CoI), Queen’s University

Mark Lewis (CoI), Trinity UniversityDavid Kaufmann, SwRI

Page 2: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Outline of Talk

1. Project Background and Goals• What is Swift, why improve it, and how?

2. Project Status• Swifter, the redesigned Swift• A new algorithm for SyMBA• SWIFTVis, a Java-based analysis tool

3. Future Plans

Page 3: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is Swift?(1 of 2)

1. S/W package (subroutine library + drivers)2. Integrates a set of gravitationally interacting bodies

together with a set of test particles3. Written in ANSI standard Fortran 774. Industry standard for the planetary science community

Page 4: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is Swift?(2 of 2)

1. Wisdom-Holman Mapping (WHM)

2. Regularized Mixed Variable Symplectic method (RMVS)

3. Fourth-order T+U Symplectic method (TU4)

4. Symplectic Massive Body Algorithm (SyMBA)

1. Bulirsch-Stoer method

Symplectic Integrators Non-symplectic Integrators

Page 5: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Why Improve Swift?

1. SyMBA has not yet been released as part of Swift because…

• a single, stable version has not yet been finalized,• the efficiency of the SyMBA code needs to be improved, and• SyMBA is very complex and not very user-friendly

2. The Swift I/O can be made more user-friendly3. Faster methods of calculating interparticle forces can be

employed4. Swift is currently a serial code, not parallelized

Page 6: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

How to ImproveSwift?

1. Reorganize the data for SyMBA and other Swift integrators into arrays of structures to

• improve efficiency and• clarify the code to make it more user-friendly

2. Make these structure arrays dynamically allocated to avoid fixed-size limitations

3. Modify the integration parameter input facility to allow for more user-friendly input files

4. Utilize tree or Fast Multipole methods for interparticle force calculations

5. Write a parallelized version of Swift

Page 7: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Swifter Overview1. Written in ANSI standard Fortran 90 because…

• it is well-suited for number-crunching applications, • it supports dynamic memory allocation• it supports data structures• it supports pointers• it facilitates the transition to Swifter for current Swift users

2. Program data reorganized into dynamically allocated arrays of nested structures

3. Structures are accessed primarily by means of pointers4. New keyword-driven parameter input file format5. Widely used RADAU15 integrator has been added

Page 8: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SwiftMemory Layout

BASIC DATA

INTEGRATOR-SPECIFIC DATA

MAIN PROGRAM

STEPPER SUBROUTINE

Page 9: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SwifterMemory Layout

NEXT

PREVIOUS

NEXT

PREVIOUS

BASIC DATA

INTEGRATOR-SPECIFICDATA

MASSPOSITIONVELOCITY

etc.

BODY 1 BODY 2 BODY 3

BODY 6 BODY 5 BODY 4

Page 10: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Parameter FileSwift vs. Swifter

0.0e0 3.65249999999e9 36.525e03.6525e7 3.6525e7F T F T T F-1.0 1000.0 -1.0 -1.0 Fbin.datunknown

!! start the run at time = 0!T0 0.0E0TSTOP 3.65249999999E9DT 36.525E0PL_IN pl.inTP_IN tp.inIN_TYPE ASCIIISTEP_OUT 1000000BIN_OUT bin.datOUT_TYPE REAL4OUT_FORM ELOUT_STAT UNKNOWNISTEP_DUMP 1000000CHK_RMIN -1.0CHK_RMAX 1000.0CHK_EJECT -1.0CHK_QMIN -1.0CHK_QMIN_COORD HELIOCHK_QMIN_RANGE 0.5 100.0ENC_OUT enc.datBIG_DISCARD yes

Page 11: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is SyMBA?• First symplectic integrator for planet formation and evolution.• An example of terrestrial planet formation

Page 12: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is SyMBA?• An example of planetary system stability:

Page 13: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is SyMBA?The Hamiltonian for the gravitational N-body problem,expressed in inertial frame coordinates, is

,2

),(1

0 10

2

n

i

n

ij ij

jin

i i

iii r

mGmm

Hp

pq

where pi is the momentum of particle i and rij = |qi – qj| is thedistance between particles i and j. The equations of motionare derived in the usual way from the Hamiltonian:

ii

Hp

q

i

iHq

p

Page 14: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is SyMBA?

SyMBA makes use of this Hamiltonian expressed in “democratic heliocentric” coordinates (heliocentricpositions and barycentric momenta). It can be written

,),( ninteractioSunKepler HHHH ii PQ

where

,21

0

2

Kepler

n

i i

i

i

i mGmm

HQ

P,

21

2

10Sun

n

iim

H P

1

1 1ninteractio

n

i

n

ij ji

jimGmH

QQ

Second-order time step is

SunintKepintSun EEEEE

Unfortunately this scheme fails during close solar encounters.

Page 15: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is SyMBA?

The following splitting of the Hamiltonian solved theproblem of close encounters with the Sun:

,),( ninteractioSunKepler HHHH ii PQ

where

),,...,(2

12 1

2

101

0

2

Kepler n

n

ii

n

i i

i

i

i rrFm

mGmm

H

P

QP

,),...,(12

11

2

10Sun n

n

ii rrF

mH

P

1

1 1ninteractio

n

i

n

ij ji

jimGmH

QQand

Page 16: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

What is SyMBA?

iQP

QP

),...,(2

1 12

10

SunSun,

nn

ii

ii

rrFm

H

The time rate of change of the momentum due to H’Sun is

Because the right-hand side of this equation is independent ofmi, there is a singularity in the calculation of the accelerationfor zero-mass test particles, and bad numerical behavior forbodies of sufficiently low mass, in the transition region whereF is changing.

Page 17: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

New SyMBAAlgorithm

The solution to this problem may lie in the use of “Yosemite”coordinates, developed by John Chambers.

11

0

1

m

mn

jjj

ii

rrR ,

11

0

1

m

mn

jjj

ii

vvVand

n

iim

m 10

Using these coordinates the Hamiltonian reads

1

1 110

1

0

211

2

n

i

n

ij ji

jin

i iii

n

i i

i

i

i mGmmGmmGm

mH

RRSRRRP

Page 18: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis

1. Java-based graphical data analysis utility2. Customized for Swift and Swift users3. Freely available and platform independent4. Graphical display of analysis session, which can be

saved and reused with new input data5. Raw data source Filter Plot6. Supported filters include: select, thinning, function, sort,

merge, binned, and movie

Page 19: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(1 of 21)

Page 20: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(2 of 21)

Page 21: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(3 of 21)

Page 22: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(4 of 21)

Page 23: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(5 of 21)

Page 24: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(6 of 21)

Page 25: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(7 of 21)

Page 26: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(8 of 21)

Page 27: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo(9 of 21)

Page 28: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (10 of 21)

Page 29: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (11 of 21)

Page 30: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (12 of 21)

Page 31: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (13 of 21)

Page 32: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (14 of 21)

Page 33: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (15 of 21)

Page 34: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (16 of 21)

Page 35: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (17 of 21)

Page 36: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (18 of 21)

Page 37: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (19 of 21)

Page 38: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (20 of 21)

Page 39: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

SWIFTVis Demo (21 of 21)

Page 40: Improving Swift Hal Levison (PI), SwRI Martin Duncan (CoI), Queen’s University Mark Lewis (CoI), Trinity…

Future Plans

1. Complete the rewrite of SyMBA2. Complete the SWIFTVis utility3. Package and release the serial version of Swifter4. Establish a support web site for Swifter5. Continue development of alternative force calculation

methods (symplectic tree algorithm, FMM)6. Purchase the parallel computer cluster7. Begin development of the parallel version of Swifter