|
Variable name |
Symbol |
Unit |
Maximum range graphed |
|
Mass of counterweight |
Mc |
kg |
0 to 1000 |
|
Mass of projectile |
Mp |
kg |
0 to 15 |
|
Length of counterweight arm |
Lc |
m |
0 to .5 |
|
Length of projectile arm |
Lp |
m |
0 to 2.5 |
|
Starting angle |
Sa |
deg |
-90 to 90 |
|
Angular acceleration |
a |
deg/s2 |
- (always derived) |
|
Angular speed |
w |
deg/s |
- |
This program was then adapted to be able to repeat itself many times incrementing a certain variable (such as mass of counterweight) each time through. The program was then set to write some of the end results to a data file. The data was afterwards analysed and graphed giving some very interesting results. The program worked on a time step increment, that is analysing the position, speed and acceleration of the trebuchet every n seconds, most often one millisecond but in some cases as low as ten microseconds. This permitted the simplification of the program used and allowed some very nice graphs in function of time but unfortunately posed some minor complications. In some cases the trebuchet moved with such speed that it jumped three or more degrees in one millisecond, never passing by the two values in between as far as the computer was concerned. When the program wrote data to the data files, it calculated the ‘best throwing angle’, i.e. the angle at which the greatest range was achieved. Often at greater speeds, the calculated ‘best angle’ was not really the best: The computer didn’t try all the angles but only the ones at which the trebuchet found itself every timestep. When graphed, this showed on some graphs with the trebuchet giving a best angle which is slightly off. Worse, since every shot was different, the trebuchet did go by some of the angles it skipped the last shot and gave a ‘best angle’ varying by two or more degrees between shots with very minor differences, such as a counterweight of 25.5 kg instead of 25.4 kg. When many shots are graphed, this gives the graph a zigzag appearance with the best angle not quite the way it should appear. This is portrayed on the diagram above. Apart from that minor problem the program, once perfected, worked without a hitch for about 18 hours of computer time to give the results analysed below.