姚天昉是上海交大一位非常有名的计算机老师,期末大作业非常难,给弟弟妹妹们透露下。ps:这是大作业一,另有大作业二即将公布,敬请关注!

Project A

Simulating a Physical System

Introduction

You have already seen a number of examples using randomization to solve problems and to generate experimental results. In the percolation project, grids were generated according to a specified probability distribution to experimentally determine the percolation probability. This approach is an example of a Monte Carlo method, an algorithm that relies on repeated random sampling to compute results. Monte Carlo methods are often used for simulating physical and mathematical systems when other methods are impossible or computationally infeasible. Objective and Background

The objective of this project is to use the Monte Carlo “demon algorithm” to estimate parameters (for example, temperature) in a physical system, specifically an ideal gas with moving molecules. We could simulate such a system by computing the pairwise interactions among all molecules at every time step in the simulation, but that approach would be computationally intractable. Moreover, in these systems we're not typically interested in the specific behavior of each individual molecule, but rather in the overall system behavior. For example, we want to know the expected distribution of molecule velocities in a gas (e.g., to understand its temperature), not which molecules have collided with which other molecules.

The key concept behind the demon algorithm is that any simulation must both preserve the total energy of the system (energy is conserved) and insure that no particle winds up with negative kinetic energy. The algorithm proceeds by choosing a molecule at random and proposing to make a small random change to its energy (e.g., to simulate the effect of a collision). To compensate for the change in energy of the molecule / particle, the opposite change is made to a special “demon” molecule, thus conserving the total energy of the system. Note that the demon molecule is never chosen at random for this change; it only acts to store the difference between the system energy and the total energy.

Before describing the demon algorithm in detail, we give a brief description of the system to be simulated. In the ideal gas, we want to study the velocity of molecules in the gas. This average velocity gives a measure of the temperature of the gas. Consider the state of the gas in an insulated container at an instant of time. Each of its molecules has some velocity that remains constant until the next collision involving the molecules. Because the molecules move quickly, on average, many of them will have experienced collisions during a short time span. Consequently, most of the molecules will have substantially different velocities than they originally did. This process can, in principle, be simulated directly. In practice, doing so is computationally too expensive or is infeasible (e.g., one step of the situation could mean solving n differential equations, with each equation having n² terms).

python期末大作业_上海交通大学python期末大作业题目(姚天昉)相关推荐

  1. 上海交通大学python期末考试样题加解析_上海交通大学python期末考试样题加解析...

    <上海交通大学python期末考试样题加解析>由会员分享,可在线阅读,更多相关<上海交通大学python期末考试样题加解析(7页珍藏版)>请在人人文库网上搜索. 1.升够上伙归 ...

  2. python程序设计教程上海交通大学_上海交通大学 python程序设计课程PPT Ch2.ppt

    上海交通大学 python程序设计课程PPT Ch2.ppt 列表操作(1) 索引 通过在序列中的位置编号来访问成员 <列表>[<位置编号>] 例如 >>> ...

  3. python编程设计大学ppt_上海交通大学-python程序设计课程PPT-Ch7-(1)...ppt

    上海交通大学-python程序设计课程PPT-Ch7-(1)...ppt 面向对象思想和编程,2,2,2,回顾,程序包括 数据 数据类型,数据结构 处理过程 算法 两种程序设计思想 面向过程:以操作为 ...

  4. 少儿python课程多少钱_上海长宁Python编程课程一般多少钱,C++编程课程

    上海长宁Python编程课程一般多少钱,C++编程课程 更新日期:2020-10-14 18:17:37 上海长宁Python编程课程一般多少钱 上海森孚企业管理咨询有限公司(SIMFU)成立于201 ...

  5. 上海交大python答案_上海交通大学python期末考试样题加解析

    . - 可编辑修改 - 一.选择题 : 将唯一正确的选项写在题前括号中 . 每题 2 分 . [ ] (1) 本课程的目标定位是什么 ? [A] 学习 Python 语言 [B] 学习计算机的工作原理 ...

  6. matlab用lism求零输入响应,信号与系统matlab课后作业_北京交通大学讲解.docx

    信号与系统matlab课后作业_北京交通大学讲解.docx 信号与系统MATLAB平时作业 学院 电子信息工程学院 班级 姓名 学号 教师 钱满义 MATLAB习题 M3-1 一个连续时间LTI系统满 ...

  7. python上海交通大学赵璐_上海交通大学

    研究方向: 1. 纳米/微米材料的第一性原理计算和机器学习结构/特性预测. 2. 纳米储能材料的制备和结构设计:高性能锂电池结构设计/自修复锂电池技术 3. 多晶型结构预测和可控的晶体生长形貌预测. ...

  8. 上海交通大学出版社python教材答案_上海交通大学出版社python答案

    上海交通大学出版社python答案 python中布尔变量的值为 对负数取平方根,即使用函数math.sqrt(x),其中x为负数,将产生 python函数定义中没有对参数指定类型,这说明,参数在函数 ...

  9. python上海交通大学出版社答案网_上海交通大学出版社python答案

    上海交通大学出版社python答案 用 for 和______关键词可以组成循环遍历字符串中的每个字符. 表达式 not (a or b) == (not a) or (not b)的值为true p ...

最新文章

  1. Solidity基础入门知识(十)函数的访问权限和可见性
  2. 冬眠动物克服肌肉萎缩,靠的居然是“肠子”|Science
  3. Python3学习笔记:使用代理访问url地址
  4. linux 怎么配置apache,在Linux下配置Apache Web服务
  5. 网页中二维码识别规则
  6. 快速搭建论坛系统看这里,社交系统ThinkSNS助你快人一步!!!
  7. weblogic 12 开启debug端口配置
  8. 手把手教你写网站:Python WEB开发技术实战
  9. web myeclipse为什么连接不上css_Web技巧 (03)
  10. Digilent提供的PmodOLEDrgb驱动程序
  11. java读取文件(按字符或字节读取)
  12. Nikto漏洞扫描工具简介
  13. steam+linux+64+fedora,在fedora中安装steam游戏平台
  14. creo绘图属性模板_creo完整制作工程图模板.docx
  15. 32 usb电路_【干货】快速创建基于热敏电阻的精确温度检测电路
  16. Java人事管理系统设计
  17. Excel技巧 一秒取消合并单元格,让你的取消合并操作简单快捷
  18. JumpServer登录提示连接WebSocket失败
  19. MP3音频解码详细过程(二)
  20. 【java-JDK的下载-安装-配置】

热门文章

  1. Angularjs DataTable表格自动刷新
  2. LAYUI表格自动渲染
  3. 等待时间 single-task message
  4. 2019-详细Android Studio开发百度地图(4)—百度地图_路线规划的实现
  5. 整数、长整型、浮点型、字符串
  6. MoverScore: Text Generation Evaluating with Contextualized Embeddings and Earth Mover Distance
  7. RLS,LMS以及NLMS三种自适应均衡matlab仿真
  8. python网络游戏开发教程_python 网游开发教程 | python做的游戏有哪些
  9. 程序员找工作经历,一个人在上海工作的艰辛
  10. Unity3d 周分享(13期 2019.3.23 )