Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
1 result

EoMs.jl

Blame
  • EoMs.jl 690 B
    __precompile__()
    module EoMs
    
        # This module contains the Equations of motion
        # of PPN two-body problem
        # Note: I assume G = c = 1
    
        export EoM_massless
    
        function EoM_massless(u, p, t)
    
            x, y, vx, vy = u
            M, β, γ = p
    
            r = √(x^2 + y^2)
            φ = -M / r
            v² = vx^2 + vy^2
            rv = x * vx + y * vy
    
            A = - (1 + 2 * (β + γ) * φ + γ * v²) * M / r^3
            B = M * (2 * γ + 2) * rv / r^3
    
            acc_x = A * x + B * vx
            acc_y = A * y + B * vy
    
            return [vx, vy, acc_x, acc_y]
    
        end
    
        function EoM_general(u, p, t)
    
            x1, y1, vx1, vy1, x2, y2, vx2, vy2 = u
            M1, M2, β, γ = p
    
        end
    
    end