Created
July 19, 2021 09:18
-
-
Save lihuanshuai/2ad8a5d5f90664ff4ce3853235ee291a to your computer and use it in GitHub Desktop.
Mil Simulation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
def get_mil(d, v0, ds): | |
t = d * 1.0 / v0 | |
mil = (5 * t * t - ds) * 1000 / d | |
return int(mil * 10 + 0.5) / 10.0 | |
cols = [600, 700, 800, 900, 1000, 1100, 1200] | |
header = [''] + cols | |
print(*header, sep='\t') | |
for d in [10, 100, 200, 300, 400, 500, 800, 1000, 1500]: | |
print(d, end='\t') | |
row = [get_mil(d, v0, 0) for v0 in cols] | |
print(*row, sep='\t') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
600 700 800 900 1000 1100 1200 | |
10 0.1 0.1 0.1 0.1 0.1 0.0 0.0 | |
100 1.4 1.0 0.8 0.6 0.5 0.4 0.3 | |
200 2.8 2.0 1.6 1.2 1.0 0.8 0.7 | |
300 4.2 3.1 2.3 1.9 1.5 1.2 1.0 | |
400 5.6 4.1 3.1 2.5 2.0 1.7 1.4 | |
500 6.9 5.1 3.9 3.1 2.5 2.1 1.7 | |
800 11.1 8.2 6.3 4.9 4.0 3.3 2.8 | |
1000 13.9 10.2 7.8 6.2 5.0 4.1 3.5 | |
1500 20.8 15.3 11.7 9.3 7.5 6.2 5.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment