摘要
随着计算机相关技术的发展,数值计算已经成为理论研究与实验研究之外的第三个重要研究手段,但它不仅限于科学前沿的研究,同样适合于大学本科生。本文以简单易学的Python语言为主要工具,介绍了利用欧拉法与四阶龙格—库塔法求微分方程的数值解,利用Matplotlib库画函数图像,以及利用VPython库画电场线磁感应线的方法。文中介绍的方法非常简单易懂,可操作性强,适用面广,即使是本科低年级学生也能掌握。在一定程度上有利于大学物理课程的教学,促进学生对学习的兴趣。
With the development of computer technology,numerical calculation has become the third important research method besides theoretical research and experimental research,but it is not limited to scientific frontier research,and is also suitable for undergraduate students.In this paper,the easy-tolearn Python language is used as the main tool.The numerical solution of differential equations using Euler’s method and fourth-order Runge-Kutta method is introduced.The matplotlib library is used to draw the function image,and the VPython library is used to draw the electric field line magnetic induction line.The method described in this article is very simple and easy to understand,operability and wide application,even for undergraduate students.To a certain extent,this paper is conducive to the teaching of university physics courses and promote students’interest in learning.
作者
宋碧雄
胡海云
SONG Bixiong;HU Haiyun(School of Physics,Beijing Institute of Technology,Beijing 100081)
出处
《物理与工程》
2019年第S1期64-68,共5页
Physics and Engineering
关键词
PYTHON
数值计算
大学物理
电磁学
Python
numerical calculation
university physics
electromagnetics