T1: units and acceleration; first program
Before the tutorials:
Think about and work out the following:
- How do you re-define natural constants when you choose a different unit system?
Example: the gravitational constant is
6.674 × 10−8 cm3 g−1 s−2
in the cgs system and
6.674 × 10−11 m3 kg−1 s−2
in the SI system.
What is its value in the FFF system?
(See Wikipedia for details on this unit system.)
 - What is the minimum set of units you need to define?
 - How can you calculate the acceleration of a particle?
 - What are the steps required to write, compile, and run a C++ (or C or Fortran) program in a Linux environment?
 - Check how accurately Newton’s law of gravity can currently be measured on Earth.
 
During the tutorials:
Program it!
- Make yourself familiar with the shell,
create a project directory, and write a program
that just outputs a string of characters
(e.g., “Hello, World!”).
Compile and run the program.
 - In your program, create variables to define a unit system and
calculate the value for the gravitational constant G in these units.
Define different useful systems of natural units for the solar system and for galaxies.
 - Calculate the different contributions of the gravitational acceleration
at the Earth’s surface by the Earth itself, the Moon, the Sun, the Galaxy, and the Virgo cluster.
What is the gravitational acceleration on the surface of a neutron star?
What is the acceleration Pluto feels from the Sun?
What is the acceleration the Voyager spacecraft feels from the Sun?
What is the acceleration a galaxy feels at the border of a massive galaxy cluster?
 
Sample code
Discussion of the results:
Compare the results for the different accelerations and discuss this
in the light of precision measurements on earth and
in the light of modified theories of gravity.
Programming goals for T1:
Goal of this tutorial is that you learn how to use commands in a unix shell,
how to compile and execute a program,
how to write a simple program (concept of “main”),
how to perform output from a program,
and how to define variables and calculate values in a program.