Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Seite - 162 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 162 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Bild der Seite - 162 -

Bild der Seite - 162 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text der Seite - 162 -

162 5 SolvingPartialDifferentialEquations Weshouldalsomentionthat thediffusionequationmayappearafter simplifying morecomplicatedpartialdifferentialequations. Forexample,flowofaviscousfluid between two flat and parallel plates is described by a one-dimensional diffusion equation,whereu then is thefluidvelocity. A partial differential equation is solved in some domain ˝ in space and for a time interval Œ0;T . The solution of the equation is not unique unless we also prescribe initialandboundaryconditions. The typeandnumberof suchconditions dependonthe typeofequation. For thediffusionequation,weneedone initialcon- dition,u.x;0/, statingwhatu iswhen theprocess starts. In addition, thediffusion equation needs one boundary condition at each point of the boundary @˝ of˝. Thisconditioncaneitherbe thatu isknownor thatweknowthenormalderivative, ru nD@u=@n (ndenotesanoutwardunit normal to@˝). Let us look at a specific application andhow the diffusion equationwith initial andboundaryconditions thenappears.Weconsider theevolutionof temperature in aone-dimensionalmedium,morepreciselya longrod,where thesurfaceof therod iscoveredbyan insulatingmaterial. Theheatcan thennotescape fromthesurface, which means that the temperature distribution will only depend on a coordinate along the rod,x, and time t. Atoneendof the rod,xDL,wealsoassume that the surface is insulated, but at theother end,x D 0,we assume thatwehave somede- vice forcontrolling the temperatureof themedium.Here, a functions.t/ tellswhat the temperature is in time.We thereforehaveaboundaryconditionu.0;t/D s.t/. At the other insulated end,x D L, heat cannot escape,which is expressed by the boundary condition@u.L;t/=@x D 0. The surface along the rod is also insulated andhencesubject to the sameboundarycondition (heregeneralized to@u=@nD 0 at thecurvedsurface). However, sincewehave reduced theproblemtoonedimen- sion,wedonot need this physical boundarycondition in ourmathematicalmodel. Inonedimension,wecanset˝ D Œ0;L . To summarize, thepartial differential equationwith initial andboundarycondi- tions reads @u.x;t/ @t Dˇ@ 2u.x;t/ @x2 Cg.x;t/; x2 .0;L/;t 2 .0;T ; (5.1) u.0;t/D s.t/; t 2 .0;T ; (5.2) @ @x u.L;t/D0; t 2 .0;T ; (5.3) u.x;0/DI.x/; x2 Œ0;L : (5.4) Mathematically,we assume that at t D 0, the initial condition (5.4) holds and that thepartialdifferentialequation(5.1)comesintoplayfor t >0. Similarly,at theend points, theboundaryconditions (5.2)and (5.3)governuand theequation therefore isvalid forx2 .0;L/. Boundaryandinitialconditionsareneeded! The initial and boundary conditions are extremely important. Without them, the solution is not unique, and nonumericalmethodwillwork. Unfortunately, many physical applications have one ormore initial or boundary conditions as unknowns. Such situationscanbedealtwith ifwehavemeasurementsofu, but themathematical framework ismuchmorecomplicated.
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2016
Sprache
englisch
Lizenz
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
248
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python