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

Seite - 298 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 298 -

Bild der Seite - 298 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 298 -

298 9 SolvingPartialDifferentialEquations thecase with aΔt equal toΔx2/(2β), indeedshowsa smoothevolutionofu(x,t). Find the programrod_FE.pyand run it to see an animationof theu(x,t) function on the screen. Scalinganddimensionless quantities Our setting of parameters required finding three physical properties of a certain material. The time interval for simulation and the time step depend cruciallyon thevalues forβ andL, whichcanvarysignificantly fromcase to case.Often,wearemore interested inhowtheshapeofu(x,t)develops, than in the actualu, x, and t values for a specific material. We can then simplify thesettingofphysicalparametersby scaling theproblem. Scalingmeansthatweintroducedimensionlessindependentanddependent variables,heredenotedbyabar: u¯= u−u ∗ uc−u∗, x¯= x xc , t¯= t tc , where uc is a characteristic size of the temperature, u∗ is some reference temperature, while xc and tc are characteristic time and space scales. Here, it is natural to chooseu∗ as the initial condition, and setuc to the stationary (end) temperature. Then u¯∈ [0,1], starting at 0 and ending at 1 as t →∞. The lengthL isxc, while choosing tc is more challenging, but one can argue for tc =L2/β. Theresultingequationfor u¯ reads ∂u¯ ∂t¯ = ∂ 2u¯ ∂x¯2 , x¯∈ (0,1). Note that in this equation, there are no physical parameters! In other words, we have found a model that is independent of the length of the rod and the material it ismadeof (!). We can easily solve this equation with our program by setting β = 1, L= 1, I(x)= 0, and s(t)= 1. It turns out that the total simulation time (to “infinity”)canbetakenas1.2.Whenwehavethesolution u¯(x¯, t¯), thesolution withdimensionKelvin,reflectingthetruetemperatureinourmedium,isgiven by u(x,t)=u∗+(uc−u∗)u¯(x/L,tβ/L2). Through this formula we can quickly generate the solutions for a rod made of aluminum, wood, or rubber—it is just a matter of plugging in the rightβ value. The power of scaling is to reduce the number of physical parameters in a problem, and in the present case, we found one single problem that is independentof thematerial (β) and the geometry(L).
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
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