@Guoguo0605
2016-06-22T00:21:23.000000Z
字数 2987
阅读 2028
作业L1 2.19题
建议:可以使用argparse和ConfigParser两个包设置程序初始参数
作业L2 使用vpython可视化炮弹发射或者棒球运动
建议:可参考一些例子
ComputationalPhysics_HW
岳绍圣2013301020033
In this homework the trajectory of a battled ball is considered. The most imopotant ingredient in our model will be the effect of atmospheric drag, the flow becomes turbulent at high speed and shows strange effct on drag coefficient of baseball. Another significant effect is the spin
Key Words: Projectile Motion; Euler Method; Air Drag; Air Density
In the Western Hemisphere, baseball is also one of the leading sports in Canada, Colombia, Mexico etc. In Asia, it is among the most popular sports in Japan, South Korea and Taiwan.[1] Many skills are employeed in real competition, such as knuckleballs, which is thrown at relatively low speed and with very little spin. It is difficult to hit since the ball tends to change direction in flight as a result of the fluctuating aerodynamic side force on the ball. Even a monograph "The Physics of Baseball" is written to study the baseball.
So there have been a lot of researches on baseball, such as Baseball is one of the most popular sport In baseball sport, In realistic projectile motion, we will fail to to obtain a realistic description if we do not include Air resistance must be included if we are to obtain a realistic description of the problem.
First of all, we need to figure out the structure of the configuration file. It consists of sections, led by a [section]
header and followed by name = value
entries.
ConfigParser
is an module in python, and as its name means, it can be imported in our python code to configure and parse configuration file easily.
To use the module, add import ConfigParser
in the beginning of you python code.
Several commonly used commands of this module is listed below:
Basic commands of writing configuration files:
Click here for more details of HOWTOs and simple examples of this module.
With this module, we can add new argument with specific function while executing command in our terminal on python file.
To use this module, add import argparse
in the beginning of you python code.
Click here for more details of HOTOs and simple examples of this
ATTENTION: Python is case-sensitive, so note which letters you capitalize.
[]: 陈锋:https://www.zybuluo.com/355073677/note/339666