讲解: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

你可能感兴趣的:(讲解:PythonMathematical Modelling of Natural SystemsPython)