# 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")