Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BK question #144

Open
gacarita opened this issue Mar 12, 2024 · 8 comments
Open

BK question #144

gacarita opened this issue Mar 12, 2024 · 8 comments

Comments

@gacarita
Copy link

Hi there,

I would like to ask if it is possible to use this library to find periodic orbits based on a set of initial conditions for fixed parameters. My problem is quite simple ... planar dynamics of the restricted circular 3body problem (4 odes). I have found a few examples, but not exactly what I want. In my case, instead of obtaining those solutions for a given parameter, I want to fix this parameter and vary the initial conditions such as x, y, vx, vy in order to obtain those families. is it possible by BK ?

@rveltz
Copy link
Member

rveltz commented Mar 12, 2024

I am not sure I understand your problem. If you have a dynamical systems du/dt = F(u,p), the periodic orbits are not functions of initial conditions. Translating your questions to equilibria, your questions is a bit like "how the zeros of F(u,p) depend on initial conditions of the ODE?" : they do not.

@gacarita
Copy link
Author

Hi,

I apologize for any confusion. I am new to the field of bifurcation analyses. Let me attempt to explain this in another way.

Suppose I have four ordinary differential equations that, when numerically solved, provide the position and velocity of my particle (x, y, vx, vy). In this scenario, I aim to compute the periodic orbits of this system in terms of position and velocity. My specific question is whether the BifurcationKit can address the following inquiry: For a given position x, which velocity vy results in a periodic orbit?

@rveltz
Copy link
Member

rveltz commented Mar 12, 2024

Yes, if you give a velocity vy close to the solution, BK will be able to find the locally unique vy which gives a periodic solution. You can use shooting or collocation for this. You will then be able to continue the periodic orbit as function of x

@gacarita
Copy link
Author

Ok. Thank you.

I couldn't find any examples similar to this. Could you assist me in creating a relatively simple case just to understand how this works for this case?

@inline @inbounds function cr3bp_rhs(du,u,p,t)

μ = p

x = u[1]
y = u[2]
vx = u[3]
vy = u[4]

r1 = ((x + μ)^2 + y^2)^(1/2)
  r2 = ((-1 + x + μ)^2 + y^2)^(1/2)

du[1] = vx
  du[2] = vy
  du[3] =  2*vy  + x - (1 - μ)*(μ + x)/(r1^3) - μ*(-1 + μ + x)/(r2^3) 
  du[4] = -2*vx  + y - (1 - μ)*y/(r1^3)       - μ*y/(r2^3)
end

# parameter values
par_tm = (μ=0.01,)


Do I need to create BifurcationProblem for collocation ? For shooting just the flow ?

@rveltz
Copy link
Member

rveltz commented Mar 12, 2024

Your problem is a bit specific (you have energy conservation, etc). Do you have a paper where your method is explained?

@gacarita
Copy link
Author

The paper on the link below is a recent one which describe some of the methods used. In general they are based on the monodromy matrix. In this case we can compute the velocity vy in function of one of the integrals of motion of the problem which is the jacobi cte.

https://link.springer.com/article/10.1007/s10569-021-10020-0

@rveltz
Copy link
Member

rveltz commented Apr 2, 2024

Did you find a way to use BifurcationKit?

@gacarita
Copy link
Author

gacarita commented Apr 2, 2024

Hi there,

I'm giving some attention to it but not so much progress yet. That might be possible to use it ... but at first glance I thought it could be easier, I'm not a JULIA expert so sometimes the language sounds a little bit too complex to me.

I'll keep trying a few hours every week to see if I can do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants