讲解:PythonMathematical Modelling of Natural SystemsPython

Introduction需求分析:主题I:混沌动力学介绍分配。在本作业中,您将调查地图和流的属性。 特别是,您的目标是找出展示的不同类型的解,以及它们随参数变化而出现的方式。下面概述了几个动态系统和一些基本属性。您不应该认为自己仅限于报告这些提示的技术答案。有些标记将分配给模型的解释。大约70%将分配给技术内容,30%分配给解释和演示。 这些部分价值约35 + 30 + 35%。 轮廓标记方案可以在MOLE页面的Assignments文件夹中找到。你应该瞄准包括数字在内的大约6页的LATEX报告。 您认为任何图表都应该直接包含在您的报告中。 (右键单击保存Jupyter的图像。)PDF通过MOLE页中的文件夹提交作业名称:123456789 mas414 topic1.pdf其中123456789是你的学号。你的学生编号也应该出现在你的文件的开头;你的名字不应该出现。请提交一个Jupiter ipython-notebook导出为一个HTML文件。这个HTML应该包括报告中的大部分图,并且命名123456789_mas316_topic1.html。你可能从MOLE网页上找到很多答案可以采用的代码,下面链接也有很多有用的例子。提交截止日期为3月9日星期五下午4点。1 一维地图分支通过地图建立一群旅鼠的模型: 找出地图的所有不动点和它们的稳定性作为参数r的函数。混沌是可能的吗? 看附录A的代码,画几个时间序列来证明你的结果。 假设下列电子元件中的模型电流。描述如何随着r动态变化,实验用不同的x0和r来确保您捕捉到感兴趣的主要特点。2小叮当地图叮当地图定位为: 见附录B的代码。对于c1 = -0.3,c2 = -0.6,c3 = 2,c4 = 0.5的情况,从初始状态(x,y)=(0.1,0.1)开始。 描述结果。 为什么代码只在第一次1000次迭代之后进行绘图? 描述c4增加或减小会发生什么 对于c1=0.9,c2=-0.6013,c3=2,c4=0.5,通过图表显示该系统具有分形结构的吸引子。 计算地图展开或收缩小区域的因子作为x和y。3 剪切流体流动模型有关剪切流的示意图,请参阅注释的15(a)部分。 随着流量的增加,大多数流体从“层流”流动(平滑,所有流动方向与U相同)到紊流(混乱)流动发生“转变”。下面的模型(Trefethen et al.1993)被设计用来表明关于平衡点的线性化,特别是特征值的计算在预测动力学系统的行为中并不总是有用。二维Trefethen模型被定义:其中u=(u1,u2),||u||=(u12+u22)1/2,R>0. 再次看到笔记15(a)。 我们假设u1代表主流方向上的扰动,方向与U相同,u2表示垂直于壁面的运动。(3.1)的一个不动点是u=0,,它代表了“层流”流动。 任何非线性的非零解我们都会认为是“动荡”。关于解u = 0的线性化给出u = Au,并且A具有特征值-1 / R和-2 / R。因为两者都是负的,所以u = 0的层流点是稳定的,但这不是全部。阅读Trefethen等人的以下部分。 (1993),可以在MOLE的评估文件夹中找到:p578,p579的第一列和p582。Bagget等人迅速跟踪了上述模型。 (1994),除其他情况外, 是什么促使了扩展到三维系统? 用chaos_lab2_rossler.ipynb作为代码整合(3.2)的出发点。 从案例初始条件开始, 试验更大更小涵盖几个数量级的 , 从过渡到动荡的角度描述你的结果? 尝试其他R来获得对系统更多的理解。RequirementUniversity of SheffieldSchool of Mathematics and StatisticsMAS414/MAS6446 Mathematical Modelling of Natural SystemsAshley Willis - H12 - Topic I: An introduction to chaotic dynamicsAssignment.In this assignment you will be investigating the properties of maps and flows. In particular, youraim is to find an describe the different types of solutions they exhibit, and how they arise withparameter changes.The following outlines several dynamical systems and some fundamental properties to condider.You should not consider yourself limited to reporting just technical answers to these prompts.Some marks will be assigned to interpretation of the models. Roughly 70% will be assigned totechnical content and 30% assigned to interpretation and presentation. The sections are worthapprox. 35+30+35%. An outline mark scheme can be found in the Assignments folder of theMOLE page.You should aim for a LA T E Xreport of approximately 6 pages including figures. Any plots thatyou consider illustrative should be included directly in your report. (Right-click to save imagefrom Jupyter.) A pdf must be submitted via the Assignments folder of the MOLE pagewith name 123456789 mas414 topic1.pdf where 123456789 is your student number. Yourstudent number should also appear at the beginning of your documents; your name should notappear. Please supply a Jupiter ipython-notebook exported to html (File – Download as– HTML). This html file should include most of the plots included in your report and havematching name 123456789_mas316_topic1.html. You may adapt as much code as youlike from the worksheet solutions available on MOLE, and there are many useful examples at.The submission deadline is 4pm Friday 9th March.1 Bifurcations of 1-d mapsSuppose that a population of lemmings is modelled by the mapx t+1 = rx t /(1 + x 2t ),x,r ∈ [0,∞).• Find all the fixed points of the map and their stability as a function of parameter r. Ischaos possible?• See code at Appendix A. Plot a few time series to confirm your results.1• Suppose the following model electrical currents in an electronic component. Describe howthe dynamics vary with r. Experiment with different x 0 and r to ensure that you capturethe main features of interest.– : x t+1 = e −r x t– : x t+1 = r cosx t2 The Tinkerbell mapTinkerbell map is dPython代写混沌动力学Mathematical Modelling of Natural Systems代写Pythefinedf(x,y) = (x 2 − y 2 + c 1 x + c 2 y, 2xy + c 3 x + c 4 y).• See code at Appendix B. For the case c 1 = −0.3, c 2 = −0.6, c 3 = 2, c 4 = 0.5, startingfrom initial state (x,y) = (0.1,0.1). Describe the result. Why does the code only plotafter the first 1000 iterations?• Describe what happens as the c 4 is increased or decreased.• For the case c 1 = 0.9,c 2 = −0.6013,c 3 = 2,c 4 = 0.5, show by means of plots that thesystem has an attractor with fractal structure.• Calculate the factor by which the map expands or contracts small areas as a function ofx and y.3 A model of a sheared fluid flowSee figure 15(a) of the notes for a schematic of a sheared flow. As flow rates are increased,most flows undergo a ‘transition’ from ‘laminar’ flow (smooth, all flow in the same direction asU) to ‘turbulent (chaotic) flow.The following model (Trefethen et al. 1993) was designed to show that linearisation aboutan equilibrium point, and in particular the calculation of eigenvalues, is not always useful inpredicting behaviour of a dynamical system.The 2-d Trefethen model is defined˙ u = Au + ||u||B u, A =“−1/R 10 −2/R#, B =“0 −11 0#, (3.1)where u = (u 1 ,u 2 ) and ||u|| =p u 21 + u 2 2 , R > 0. See figure 15(a) of the notes again. Wesuppose that u 1 is representative of disturbances to the main streamwise flow, in the samedirection as U, and that u 2 represents motions going perpendicular to the wall.2One fixed point of (3.1) is u = 0, which represents the ‘laminar’ flow. Any nonlinear, non-zero,solution we will consider to be ‘turbulence’.Linearisation about the solution u = 0 gives u = Au, and A has eigenvalues −1/R and −2/R.Since both are negative so that the laminar point u = 0 is stable, but this is not the wholestory.• Read the following sections of Trefethen et al. (1993), which can be found in the Assess-ment folder on MOLE: p578, first column of p579, and p582.The model above was quickly followed by Bagget et al. (1994), who considered, among othercases,,with R > 0 and β(R) = 0.386 p (R + 1)/R 2 .• What might have motivated the extension to a 3-dimensional system?• Use e.g. chaos lab2 rossler.ipynb as a starting point for code to integrate (3.2) intime.• Start with the case initial condition u = (0,0,?), ? = 10 −5 , R = 100.• Experiment with larger and smaller ?, covering several orders of magnitude. Describe yourresults from the point of view of transition to turbulence?• Try other R to gain more understanding of the system.ReferencesTrefethen et al. (1993) Hydrodynamic stability without eigenvalues. Science 261, 578-584.Baggett, Driscoll and Trefethen (1994) A mostly linear model of transition to turbulence.Physics of Fluids 7, 1070-6631.Appendix Aimport numpy as npimport matplotlib.pyplot as plt%matplotlib inline———————————def invmap(x,r):return rx/(1.+xx)———————————Np = 100xp = np.linspace(0,10,Np)fp = np.empty(Np)for i in range(Np):fp[i] = invmap(xp[i],15.)plt.plot(xp,xp,’b-’)plt.plot(xp,fp,’r-’)———————————Np = 20tp = np.arange(Np)xp = np.empty(Np)xp[0] = 2.for i in range(Np-1):xp[i+1] = invmap(xp[i],2.1)plt.plot(tp,xp, ’r.’)Appendix Bdef tinkerbell(x,p):x1 = np.empty(2)x1[0] = x[0]2 - x[1]2 + p[0]x[0] +p[1]x[1]x1[1] = 2.x[0]x[1] + p[2]x[0] + p[3]x[1]return x1Np = 5000p = np.array([-0.3,-0.6,2.,0.5])x = np.empty((Np,2))x[0,:] = np.array([0.1,0.1])for i in range(Np-1):x[i+1,:] = tinkerbell(x[i,:],p)plt.plot(x[1000:,0],x[1000:,1], ’r.’)转自:http://ass.3daixie.com/2018052610002471.html

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

推荐阅读更多精彩内容