Skip to content

Instantly share code, notes, and snippets.

@adituv
Last active December 28, 2015 06:49
Show Gist options
  • Save adituv/7460108 to your computer and use it in GitHub Desktop.
Save adituv/7460108 to your computer and use it in GitHub Desktop.
More comparison data for pendulum.
Please enter the following parameters:
Timestep /s: 0.1
Simulation length /timesteps: 100
Pendulum length /m: 1
Pendulum mass /kg: 0.25
Gravitational acceleration /m s^-2: 9.81
Damping constant /?: 0
Initial pendulum angle /rad: 1
Initial pendulum angular velocity /rad s^-1: -0.8
# No damping, small angle approximation
0.821900
0.563172
0.249196
-0.089226
-0.418894
-0.707469
-0.926642
-1.054911
-1.079693
-0.998557
-0.819463
-0.559979
-0.245562
0.092945
0.422334
0.710292
0.928571
1.055756
1.079372
0.997102
0.817016
0.556780
0.241925
-0.096664
-0.425769
-0.713107
-0.930489
-1.056590
-1.079039
-0.995635
-0.814559
-0.553575
-0.238285
0.100381
0.429200
0.715913
0.932396
1.057411
1.078694
0.994156
0.812093
0.550362
0.234642
-0.104097
-0.432625
-0.718711
-0.934292
-1.058219
-1.078335
-0.992666
-0.809616
-0.547144
-0.230996
0.107812
0.436044
0.721500
0.936177
1.059015
1.077964
0.991164
0.807131
0.543918
0.227348
-0.111526
-0.439459
-0.724281
-0.938051
-1.059798
-1.077579
-0.989650
-0.804636
-0.540687
-0.223696
0.115238
0.442868
0.727053
0.939914
1.060569
1.077182
0.988124
0.802131
0.537449
0.220043
-0.118950
-0.446273
-0.729817
-0.941765
-1.061327
-1.076772
-0.986587
-0.799617
-0.534204
-0.216386
0.122659
0.449672
0.732571
0.943606
1.062072
1.076350
0.985037
# No damping, no angle approximation
0.837452
0.602021
0.311035
-0.009973
-0.330003
-0.618245
-0.849627
-1.007332
-1.082103
-1.070257
-0.972345
-0.793382
-0.544501
-0.244804
0.078669
0.394432
0.672497
0.889451
1.030209
1.086855
1.056666
0.941059
0.746170
0.484687
0.177497
-0.147015
-0.457157
-0.723997
-0.925857
-1.049322
-1.087726
-1.039256
-0.906220
-0.695962
-0.422810
-0.109405
0.214711
0.517925
0.772573
0.958748
1.064631
1.084715
1.018062
0.867917
0.642923
0.359114
0.040829
-0.281461
-0.576502
-0.818070
-0.988041
-1.076104
-1.077828
-0.993132
-0.826254
-0.587234
-0.293860
0.027929
0.346978
0.632667
0.860350
1.013667
1.083718
1.067078
0.964523
0.781351
0.529093
0.227320
-0.096562
-0.410986
-0.686218
-0.899292
-1.035565
-1.087457
-1.052487
-0.932301
-0.733342
-0.468719
-0.159779
0.164768
0.473224
0.736970
0.934789
1.053689
1.087315
1.034085
0.896548
0.682378
0.406342
0.091532
-0.232245
-0.533442
-0.784756
-0.966748
-1.067999
-1.083291
-1.011911
-0.857357
-0.628629
-0.342214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment