[关闭]
@Guoguo0605 2016-06-22T00:21:23.000000Z 字数 2987 阅读 1985
  • 作业L1 2.19题

    建议:可以使用argparse和ConfigParser两个包设置程序初始参数

  • 作业L2 使用vpython可视化炮弹发射或者棒球运动

    建议:可参考一些例子

Homework 07 - BASEBALL: MOTION OF A BATTLED BALL

ComputationalPhysics_HW 岳绍圣2013301020033


Abstract

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

Background

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.

knuckleball

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.

Level 1 - Battled ball with backspin

backspin

ConfigParser —— Configuration file parser

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:

argparse —— the command-line parsing 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.

Comparison between with spin & no spin

the hit angle is set as .
92653da3f256ada69327091a2a46b0c3.png

Visual of baseball motion

95b68e82a96b24f6772df21fb0f97e29.gif

Codes

Github

Reference

[]: 陈锋:https://www.zybuluo.com/355073677/note/339666


[1] Wikipedia contributors, "Baseball," Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Baseball&oldid=714641800 (accessed April 12, 2016).
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注