Skip to main content
Post Closed as "off topic" by dmckee --- ex-moderator kitten
very minor grammar
Source Link

II'm currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth / sun / moon data).

iI succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when iI place the moon around the earth and launch the simulation  , the moon is a kind of ignore the earth:ignoring Earth.

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video if you want an idea of what happen)

I currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth / sun / moon data).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation  , the moon kind of ignore the earth:

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video if you want an idea of what happen)

I'm currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth / sun / moon data).

I succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when I place the moon around the earth and launch the simulation, the moon is a kind of ignoring Earth.

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video if you want an idea of what happen)

Tweeted twitter.com/#!/StackPhysics/status/295834541963231233
edited body
Source Link
eephyne
  • 213
  • 1
  • 3
  • 8

I currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth / sun / moon data).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation , the moon kind of ignore the earth:

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video ofif you want an idea of what happen)

I currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth / sun / moon data).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation , the moon kind of ignore the earth:

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video of you want an idea of what happen)

I currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth / sun / moon data).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation , the moon kind of ignore the earth:

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video if you want an idea of what happen)

deleted 15 characters in body; edited tags
Source Link

I currently writing a code to generate solar system and N$N$ number of plantetsplanets /moons moons.

I use real data to test (earth  /sun sun /moon datas moon data).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation , the moon kind of ignore the earth:

at start x,y:
-sun : 0,0
-earth : 1.4959826e8
-moon : 1.4959826e8-384400;

using F =At start (G * a.mass * b$(x,y)$:
Sun : 0,0
Earth : 1.mass)4959826e8
Moon /: 1.4959826e8-384400

using (dist * dist)$F = (G \times a.mass \times b.mass) / (dist \times dist)$

at start F :
-sun & earth : 3.5855635298968626E22
-earth & moon : 1.9817101152925866E20
-moon & sun: 4.379973928784021E20

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

since iSince I placed them on y=0 $y=0$, moon havehas an fy$f_y$ of 0$0$ and fx$f_x$ of -2.39826381349143456E17 (because she'esshe's placed between sun and earth

atAt start, the moon havehas a velocity of 0.001022 km/sec

after  velocity update ( v = v + dt * F / mass)
v = 0.28200845732138924 
vx = -0.28200660544886147 
vy = 0.001022

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result  , it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why  ? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(here's a videoHere's a video of you want an idea of what happen :video)

I currently writing a code to generate solar system and N number of plantets/moons.

I use real data to test (earth/sun/moon datas).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation , the moon kind of ignore the earth:

at start x,y:
-sun : 0,0
-earth : 1.4959826e8
-moon : 1.4959826e8-384400;

using F = (G * a.mass * b.mass) / (dist * dist)

at start F :
-sun & earth : 3.5855635298968626E22
-earth & moon : 1.9817101152925866E20
-moon & sun: 4.379973928784021E20

since i placed them on y=0 , moon have an fy of 0 and fx of -2.39826381349143456E17 (because she'es placed between sun and earth

at start the moon have a velocity of 0.001022 km/sec

after  velocity update ( v = v + dt * F / mass)
v = 0.28200845732138924 
vx = -0.28200660544886147 
vy = 0.001022

So regarding the result  , it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why  ? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(here's a video of you want an idea of what happen :video)

I currently writing a code to generate solar system and $N$ number of planets / moons.

I use real data to test (earth  / sun / moon data).

i succeeded in placing the earth and make it orbit around the sun using the correct mass and velocity. But when i place the moon around the earth and launch the simulation , the moon kind of ignore the earth:

At start $(x,y)$:
Sun : 0,0
Earth : 1.4959826e8
Moon : 1.4959826e8-384400

using $F = (G \times a.mass \times b.mass) / (dist \times dist)$

At start $F$:
Sun & Earth: 3.5855635298968626E22
Earth & moon : 1.9817101152925866E20
Moon & Sun: 4.379973928784021E20

Since I placed them on $y=0$, moon has an $f_y$ of $0$ and $f_x$ of -2.39826381349143456E17 (because she's placed between sun and earth

At start, the moon has a velocity of 0.001022 km/sec

After velocity update ($v = v + dt \times F / mass$) $v =$ 0.28200845732138924
$v_x =$ -0.28200660544886147
$v_y =$ 0.001022

So regarding the result, it make sense that the moon is attracted more by the sun than the earth (since vx is negative), but why? Where in my formulas I make a mistake ? I tested also to start the simulation with the velocity of moon = 29.783 + 0.001022 , (earth velocity) but then the moon just turn around the sun like the earth

(I surely forgot to put some info, don't hesitate to tell me to add things , I'm not really used to ask physics questions)

(Here's a video of you want an idea of what happen)

Source Link
eephyne
  • 213
  • 1
  • 3
  • 8
Loading