The simsflanagan module

The sims_flanagan module contains our implementation of the low-thrust interplanetary trajectory optimization model first described in a paper by Sims and Flanagan in 1997 and later improved to include high-fidelity propagations and easy mesh refinement by the pykep development team. The key papers containing most details are:

  • Sims, Jon A., and Steve N. Flanagan. “Preliminary design of low-thrust interplanetary missions.” (1997).

  • Izzo, Dario. “pygmo and pykep: open source tools for massively parallel optimization in astrodynamics (the case of interplanetary trajectory optimization).” Proceed. Fifth International Conf. Astrodynam. Tools and Techniques, ICATT. 2012.

The list of classes and the detailed documentation follows.

Name

Type

Description

pykep.sims_flanagan.spacecraft

class

represents a nuclear electric propelled spacecraft

pykep.sims_flanagan.sc_state

class

represent the spacecraft state (r,v,m)

pykep.sims_flanagan.leg

class

represents one leg in the Sims-Flanagan model

Detailed Documentation

class pykep.sims_flanagan.spacecraft(*args)

Contains design parameters of a NEP spacecraft

__init__(*args)

pykep.sims_flanagan.spacecraft(mass,thrust,isp)

  • mass: the spacecraft mass

  • thrust: the maximum thrust of the spacecraft propulsion system

  • isp: the specific impulse of the spacecarft propulsion system

Examples:

sc = sims_flanagan.spacecraft(4500,0.05,2500)

pykep.sims_flanagan.spacecraft(mass,thrust,isp)

  • mass: the spacecraft mass

  • thrust: the maximum thrust of the spacecraft propulsion system

  • isp: the specific impulse of the spacecarft propulsion system

Examples:

sc = sims_flanagan.spacecraft(4500,0.05,2500)

class pykep.sims_flanagan.sc_state(*args)

Represents the state of a spacecraft as position, velocity and mass

__init__(*args)

pykep.sims_flanagan.sc_state(r,v,m)

  • r: triplet containing the position vector in cartesian coordiantes

  • v: triplet containing the velocity vector in cartesian coordiantes

  • m: mass

Examples:

x0 = sims_flanagan.sc_state((1,0,0),(0,1,0),1000)

pykep.sims_flanagan.sc_state(r,v,m)

  • r: triplet containing the position vector in cartesian coordiantes

  • v: triplet containing the velocity vector in cartesian coordiantes

  • m: mass

Examples:

x0 = sims_flanagan.sc_state((1,0,0),(0,1,0),1000)
set(*args)

Sets the whole spacecraft state at once using a 7 dimensional tuple

Example:

x0.set((1,0,0,0,1,0,1000))
get(*args)

Gets the whole spacecraft state at once putting it into a 7 dimensional tuple

Example:

state = x0.get()

class pykep.sims_flanagan.leg(*args)

represents one low-thrust trajectory leg in the sims-flanagan model

__init__(*args)

pykep.sims_flanagan.leg(start,x0,throttles,end,xe,spacecraft,mu)

  • start: starting epoch

  • x0: starting sc_state

  • throttles: tuple containing the 3N cartesian components of the throttles

  • end: final epoch

  • xe: final sc_state

  • spacecarft: spacecraft

  • mu: central body gravity parameter

Example:

import pykep as pk start = pk.epoch(0)
end = pk.epoch(340)
earth = pk.planet.jpl_lp('earth')
mars = pk.planet.jpl_lp('mars')
sc = pk.sims_flanagan.spacecraft(4500,0.05,2500)
r,v = earth.eph(start)
x0 = pk.sims_flanagan.sc_state(r,v,sc.mass)
r,v = mars.eph(start)
xe = pk.sims_flanagan.sc_state(r, v ,sc.mass)
mu = pk.MU_SUN
l = pk.sims_flanagan.leg(start,x0,(1,0,0,0,0,1,0,0,0,0,1,0),end,xe,sc,mu)

pykep.sims_flanagan.leg(start,x0,throttles,end,xe,spacecraft,mu)

  • start: starting epoch

  • x0: starting sc_state

  • throttles: tuple containing the 3N cartesian components of the throttles

  • end: final epoch

  • xe: final sc_state

  • spacecarft: spacecraft

  • mu: central body gravity parameter

Example:

import pykep as pk start = pk.epoch(0)
end = pk.epoch(340)
earth = pk.planet.jpl_lp('earth')
mars = pk.planet.jpl_lp('mars')
sc = pk.sims_flanagan.spacecraft(4500,0.05,2500)
r,v = earth.eph(start)
x0 = pk.sims_flanagan.sc_state(r,v,sc.mass)
r,v = mars.eph(start)
xe = pk.sims_flanagan.sc_state(r, v ,sc.mass)
mu = pk.MU_SUN
l = pk.sims_flanagan.leg(start,x0,(1,0,0,0,0,1,0,0,0,0,1,0),end,xe,sc,mu)
set(*args)

Sets leg’s data, leaving the spacecraft and the central body gravitational parameter unchanged

Example:

l.set(start,x0,(0,0,0,1,0,0,1,0,0,0,0,0),end,xe)
high_fidelity(*args)

If True propagation is not impulsive, but continuous

Example:

l.high_fidelity = True
mismatch_constraints(*args)

Returns a tuple containing the state mismatch of the leg x,y,z,vx,vy,vz,m (needs to be all zeros for the leg to be feasible)

Example:

ceq = l.mismatch_constraints()
throttles_constraints(*args)

Returns a tuple containing the throttle magnitudes minus one

Example:

c = l.throttles_constraints()
set_mu(*args)

Sets the leg central body gravitational parameter

Example:

l.set_mu(pykep.MU_SUN)
set_spacecraft(*args)

Sets the leg spacecraft

Example:

sc = pykep.sims_flanagan.spacecraft(4500,0.05,2500)
l = pykep.sims_flanagan.leg() l.set_spacecraft(sc)
get_states()

Returns the spacecraft states (t,r,v,m) at the leg grid points

Examples:

times,r,v,m = pykep.sims_flanagan.leg.get_states()