I'm trying to simulate moon orbit around earth, my moon is broken.

Click For Summary

Homework Help Overview

The original poster is attempting to simulate the moon's orbit around the Earth in a 2D environment for a school project. The simulation is designed to model the gravitational effects of the Earth on the moon, while simplifying the scenario by not considering the moon's influence on the Earth or the complexities of a three-body problem.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the implementation of gravitational calculations and the integration of time steps in the simulation. There are questions about the placement of the timestep in the calculations and whether it is being applied correctly to both acceleration and position updates.

Discussion Status

Some participants have provided observations regarding the need for a second timestep in the position calculations. Others have raised concerns about potential limitations of the spreadsheet software being used for the simulation. The discussion is ongoing, with participants exploring various aspects of the simulation's setup and calculations.

Contextual Notes

The original poster mentions that the simulation is intended to be a back-of-the-envelope calculation rather than a precise model, and they express uncertainty about the correctness of their approach to orbital physics.

  • #31
BvU said:
Enjoyed playing with this, even though I just noticed I was a little too late !:frown:

Ah well, no worries! Thanks anyway :D

I toyed around with my moon and set the initial position and speed to the moon's perigee and max velocity: http://nssdc.gsfc.nasa.gov/planetary/factsheet/moonfact.html

Ran it like that and I got a very neat eclipse orbit with it's apogee nearly exactly at where our moon's actual apogee is.

Now to start coding my moon ship so I can get a Hohmann transfer underway!


adjacent said:
Is excel this powerful? I though it's something accountants use for their work. -_-

It's got a whole programming language under the hood that can be utilized. Of course, it's not the best qua performance to run an astrophysics simulation, but Excel's all we have at school, and it works perfectly fine!
 
Physics news on Phys.org
  • #32
BvU said:
You want to update the vx and vy using the * timestep too !

He did, read the code again.
 
  • #33
Borek said:
He did, read the code again.
You're right. I had moved the *timestep down to the vx, vy expression to keep dimension of a in lline with naming and also to get the right values for ax, ay, am in the table. In fact, now I start wondering if the expression for px, py improves if 0.5 * timestep is used instead of *timestep...
 
  • #34
adjacent said:
Is excel this powerful? I though it's something accountants use for their work. -_-
Excel on its own is already extremely powerful. With VBA as programming language with quite some object orientation is powerful squared.

Biggest drawback is that in practice it is the epitome of unstructured programming, so re-use and knowledge transfer are disaster areas.

Having said that, there's an awful lot of science and technology it can be (and is) used for.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 38 ·
2
Replies
38
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
3
Views
2K
Replies
5
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K