计算物理与教学教改_第1页
计算物理与教学教改_第2页
计算物理与教学教改_第3页
计算物理与教学教改_第4页
计算物理与教学教改_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 北京师范大学物理系北京师范大学物理系 彭芳麟彭芳麟 计算物理与教学教改 1221/211( )22( )2112( )2rrp r drnpEV rmm EV rdrnu=2.6:0.001:4;x=0.6;for j=1:150,x=u.*(x-x.2);endfor i=1:100 x=u.*(x-x.2);plot(u,x,r.)hold on;EndPhysics 197. Computational Physics Methods and Applications The methods to be covered include: numerical differentiatio

2、n and integration, solution of ordinary and partial differential equation, eigensystems, and stochastic approaches like Monte Carlo and genetic algorithms for statistical sampling and optimization of multi-variable systems. The emphasis is on developing the ability to handle both simple and complex

3、physical systems which are analytically intractable.For Undergraduates and Graduates 113. Computational PhysicsIntroduction to numerical methods for solving problems in mechanics, electromagnetism, quantum mechanics, and statistical mechanics. Methods include numerical integration; solutions of ordi

4、nary and partial differential equations; solutions of the diffusion equation, Laplaces equation and Poissons equation with relaxation methods; statistical methods including Monte Carlo techniques; matrix methods and eigenvalue problems. Short introduction to MatLab, used for class examples; class pr

5、ojects may be programmed in any language, e.g., C. Prerequisites: 110, 121, and Mathematics 53 or 130. Previous programming experience not required. 3 units, Stanford UniversityUndergraduate DegreesPrograms n计算物理基础是结合数值计算方法,利用计算机对物理计算物理基础是结合数值计算方法,利用计算机对物理问题进行数值计算、模拟和仿真的一门基础性学科。通问题进行数值计算、模拟和仿真的一门基础性

6、学科。通过本课程的学习,使学生学会用计算机来描述物理图像、过本课程的学习,使学生学会用计算机来描述物理图像、模拟物理问题,掌握用计算机处理物理问题的基本计算模拟物理问题,掌握用计算机处理物理问题的基本计算原理和必要的计算机知识。原理和必要的计算机知识。数值微分、积分和拟合数值微分、积分和拟合, ,常微分方程与偏微分方程数值解常微分方程与偏微分方程数值解, ,矩阵运算矩阵运算, , 随机数和随机行走随机数和随机行走计算物理 解题步骤计算物理是综合训练,包括建模,算法,编程,计算物理是综合训练,包括建模,算法,编程,物理解释。基础课要有基础性,实用性。物理解释。基础课要有基础性,实用性。x=0.6

7、; u=2.6:0.001:4;for j=1:150, x=u.*(x-x.2);endfor i=1:100 x=u.*(x-x.2); plot(u,x,r.,markersize,1) hold on;end21()nnnxxx周期分岔,混沌,Feigenbaum常数Logistic模型n浮点数运算与计算误差n为什么有:为什么有:0.1+0.1+0.1+0.1+0.1+0.1+ 0.1+0.1+0.1+0.1+0.1+0.1 =9.999999999999999e-001浮点数的表示浮点数的表示 n f 的取值限制的取值限制数的精度数的精度,e的取值限制了的取值限制了数的范围数的范围n

8、例:例:n在每个二进制区间,在每个二进制区间, ,数按间隔,数按间隔 等距离排列等距离排列n eps= 是两个浮点数的最大相对间距,是两个浮点数的最大相对间距, eps/2是计算结果的最大相对误差。是计算结果的最大相对误差。 注意:注意: 计算机不是使用全部实数作计算,计算工具有缺陷!计算机不是使用全部实数作计算,计算工具有缺陷!(1) 2exf 5252022f10221023e minmax3,4,3tee 122eex522e521622.2204 10u=0,i; subplot(3,3,1); plot(u)for k=2:8 m=u/3; uu=m, i/3+m*(sqrt(3)*

9、0.5+0.5i),m+i/3, . 2i/3+m*(sqrt(3)*0.5-0.5i), m+2i/3; a x i s ( - 0 . 5 0 . 5 0 1 ) ; subplot(3,3,k); plot(uu) u=uu;endtheta=pi/6; u =0,0;0,1; subplot(3,3,1) plot(u(:,1),u(:,2)axis(-0.5,0.5,0,1) for n=1:7uuu=;for I=0:(length(u)/2-1)p1=(u(2*I+1,:)*2+u(2*I+2,:)/3 ;p2=(u(2*I+1,:)+u(2*I+2,:)*2)/3;lp=cos

10、(theta),-sin(theta);sin(theta),cos(theta)*.(u(2*I+2,1)-u(2*I+1,1);u(2*I+2,2)-u(2*I+1,2)/3 ;lp=p1+lp;rp=cos(theta),sin(theta);-sin(theta),cos(theta)*.(u(2*I+2,1)-u(2*I+1,1);u(2*I+2,2)-u(2*I+1,2)/3;rp=p2+rp;uu=u(2*I+1,:);p1;p1;lp;p1;p2;p2;rp;p2;u(2*I+2,:);uuu=uuu;uu;endu=uuu;subplot(3,3,n+1)plot(u(:,1),u(:,2)axis(-0.5,0.5,0,1)end两程序画相同图形两程序画相同图形, ,时间相差约时间相差约600600倍倍运行120秒运行0.20秒秒2222222(1)sin cossin(2)cotsinsin(2)cot cos cotddd daabgdtdtdt dtdd da d dadtdt dtdt dtdd dd daadtdt dtdt dt 实验实验 数值积分数值积分(用毕-沙定律,清华学生做)cos(322tdtdxxxdtxd为数字化教学服务,活学活用,立竿见影为数字化教学

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论