1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# This script computes the initial circle of solutions for mu=0
# as well as the bifurcating branches which give us the
# Lagrange points.
# Load 3d.c and c.3d into the AUTO CLUI
# Add a stopping condition so we only compute the loop once
# We tell AUTO to stop when parameter 16 is 0.991, parameter 1 is -0.1,
# or parameter 1 is 1.1. If parameter1 is 0.5 we just report
# a point.
# We also want to compute branches for the first 3 bifurcation
# points.
# IPS=0 tells AUTO to compute a family of equilibria.
# Compute the circle.
circle = run('3d',UZR={-16:0.991, -1:[-0.1,1.1], 1:0.5}, MXBF=-3, IPS=0)
# Extract the 5 Lagrange points for each of the branches
# which we will use in later calculations.
# This command parses the solution file fort.8 and returns
# a Python object which contains all of the data in the
# file in an easy to use format.
i=0
# For every solution in the fort.8 file...
# If the solution is a user defined point...
for u in circle('UZ'):
# We look at the value of one of the components
# to determine which Lagrange point it is.
# The solution is a Pointset. In this case there is only
# one point, at t=0, accessible via u(0), u[0], or via the
# u['U(1)'] and u['U(2)'] arrays.
[x]=u['U(1)']
[y]=u['U(2)']
if y > 0.01:
# When we determine which Lagrange point we have we save it.
u.writeFilename("s.l4")
elif y < -0.01:
u.writeFilename("s.l5")
elif x > 0.01:
u.writeFilename("s.l2")
elif x < -0.01:
u.writeFilename("s.l3")
else:
u.writeFilename("s.l1")
|