讲解:Math104 C 1、c/c++,Python、Java、analytic calculationsR|

Final Projects Math104 C 1Prof. Hector CenicerosInstructions: Choose one of the problems and write a jupyter notebook to integrate allthe parts of the problem solution; this includes any analytic calculations and theory, code,results and analysis of the results.1. The cellar. Neglecting the curvature of the Earth and the diurnal (daily) variation oftemperature, the distribution of temperature T(x, t) at a depth x and a time t is givenby the Heat equation:Here κ is thermometric diffusivity of soil whose value is approximately κ = 2 ×103cm2/sec (the fundamental time scale is a year, 3.15 × 107sec). Assume that thetemperature f(t) at the surface of the Earth (x = 0) has only two values, a “summer”value for half of the year and a “winter” value for the other half, and that this patternis repeated every year (i.e. at x = 0 the temperature is periodic with a period of ayear). The temperature T should decay to zero as x → ∞.a) Show that the backward (implicit Euler) difference scheme for (1) is consistentand unconditionally stable. What is the order of the scheme?b) Implement the backward difference scheme to find a numerical approximation to(1). Consider the initial condition u0(x) = f(t)eyour computational spatial domain take a sufficiently long interval so that theright-end boundary condition u = 0 can be used. Select k and h small enough toresolve well the numerical solution. Plot the numerical solution at several times.c) From your numerical solution, find the depth xc at which the temperature isopposite in phase to the surface temperature, i.e, it is summer at xc when iswinter at the surface. Note that the temperature variation at xc is much smallerthan that at the surface. This makes the depth xc ideal for a wine cellar orvegetable storage.2. A simple model for air quality control. An air pollutant gets advected by the windand at the same time diffuses as it travels. The time evolution of the concentrationu(x, y, t) of the pollutant at position (x, y) and at time t can be modelled by theadvection diffusion equationut + Uwux + Vwuy = D(uxx + uyy), (2)1All course materials (class lectures and discussions, handouts, homework assignments, examinations, webmaterials) and the intellectual content of the course itself are protected by United States Federal CopyrightLaw, the California Civil Code. The UC Policy 102.23 expre代写Math104 C 1作业、代写c/c++,Python实验作业、代做Java程序作业、代写analytic calssly prohibits students (and all other persons)from recording lectures or discussions and from distributing or selling lectures notes and all other coursematerials without the prior written permission of the instructor.1where (Uw, Vw) are the components of the wind velocity and D > 0 is the diffusivitycoefficient (assumed small) of the pollutant in the air.a) The one-dimensional case of (2) isut + Uwux = Duxx. (3)(If D = 0, this is the simple one-way wave equation (also called advection equation)we have seen in class). Assuming Uw condition for the schemeb) If D = 0, one gets an “upwind” scheme for the one-way way equation. Find themodified (model) equation for the “upwind” scheme and show that the schemeis dissipative. How do you have to take your numerical parameters to guaranteethat your numerical diffusion is much less than the “real” diffusion when D 6= 0.Explainc) Write a code to implement (4) with homogeneous boundary conditions (u = 0 atthe boundary) and use it to solve (3) in [5, 1] with initial conditionu0(x) = (1 for 0 ≤ x ≤ 1/20 otherwise(5)Take Uw = 1 and D = 0.1 and select k and h small enough to resolve well thenumerical solution. Plot the solution at t = 1, 2, 3.3. Acoustic waves. The air pressure p(x, t) in an organ pipe is governed by the wave equation.(6)where l is the length of the pipe and c is a constant. If the pipe is open, the boundarycinditions are given byp(0, t) = p0 and p(l, t) = p0. (7)If the pipe is closed at the end x = l the boundary conditions arep(0, t) = p0 and px(l, t) = 0. (8)Assume that c = 1, l = 1, and the initial conditions arep(x, 0) = p0 cos 2πx, and pt(x, 0) = 0 0 ≤ x ≤ 1. (9)a) Write down an explicit finite difference method for (5) and give stability conditionsand the order of the method.2b) Implement your method given in a) for the open pipe with p0 = 0.9, and withstep sizes k = h = 0.05. Plot your numerical solution at t = 0.5 and t = 1.0.c) Implement your method given in a) for the closed pipe at x = l with p0 = 0.9,and with step sizes k = h = 0.05. Plot your numerical solution at t = 0.5 andt = 1.0.d) Repeat b) for k = h = 0.025. Construct a higher order approximation by extrapolatingyour numerical solutions corresponding to k = h = 0.05 and k = h = 0.025.What’s the order of the new approximation.3转自:http://www.3daixie.com/contents/11/3444.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,142评论 6 498
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,298评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,068评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,081评论 1 291
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,099评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,071评论 1 295
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,990评论 3 417
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,832评论 0 273
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,274评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,488评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,649评论 1 347
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,378评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,979评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,625评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,796评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,643评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,545评论 2 352

推荐阅读更多精彩内容

  • 萌萌姐《精力管理手册》读书总结和绘制思维导图规则《精力管理手册》读书总结模版姓名: 沧海 时间: ...
    0335a2b0903d阅读 220评论 1 0
  • 小小年纪志未小,誓将青春不蹉跎。目里红黄皆为景,日日泼墨绘丹青!
    状元大人阅读 73评论 0 1
  • 最近在看《伪装者》,虽然本人对很悬的年代戏不太感冒,但春节瞟过一眼后,又追加了两遍。看完后一直想写点儿什么,刚刚的...
    二姐的小难得阅读 918评论 0 1
  • 有的时候,总是会喜欢呆在“舒适圈”,不想努力,不想去付出!有的时候,心中会突然生出恐惧不安!一个人的时候,会在心里...
    少夨阅读 181评论 0 0