Scientific Computing with Fortran 95 (4EV04) dr.ir. Martien A. - - PowerPoint PPT Presentation

scientific computing with fortran 95 4ev04
SMART_READER_LITE
LIVE PREVIEW

Scientific Computing with Fortran 95 (4EV04) dr.ir. Martien A. - - PowerPoint PPT Presentation

Scientific Computing with Fortran 95 (4EV04) dr.ir. Martien A. Hulsen m.a.hulsen@tue.nl dr.ir. Patrick D. Anderson p.d.anderson@tue.nl Website: http://www.mate.tue.nl/~hulsen under link Scientific Computing with Fortran 95.


slide-1
SLIDE 1

Scientific Computing with Fortran 95 (4EV04)

dr.ir. Martien A. Hulsen m.a.hulsen@tue.nl dr.ir. Patrick D. Anderson p.d.anderson@tue.nl Website: http://www.mate.tue.nl/~hulsen under link ‘Scientific Computing with Fortran 95’.

– Scientific Computing with Fortran 95 (4EV04) / Section Materials Technology (MaTe) –

slide-2
SLIDE 2

Goals

⊲ to learn the basic elements of Fortran 95. ⊲ to enter the fascinating world of scientific computing by solving a scientific problem: find the critical parameters where the fiber spinning process becomes linearly unstable. NOTE: this is project B.

slide-3
SLIDE 3

Why Fortran in the 21st century?

Walt Brainerd (2003): “Fortran is still the best programming language for numerical/scientific computing”. Reasons include: ⊲ designed for speed ⊲ portability (Windows laptop ⇔ 1024-processor supercomputer) ⊲ millions of lines of existing and well tested codes ⊲ more straightforward to learn and use than most “modern” languages ⊲ designed for and by numerical/scientific professionals

slide-4
SLIDE 4

Fortran programming language

⊲ First version developed in the period 1954-1957 at IBM ⊲ First standard: Fortran 66 ⊲ ‘Old style’ standard: Fortran 77 ⊲ New modern standards: Fortran 90, Fortran 95 – array syntax (whole array operations, dynamic memory allocation, ...) – modules (modular programming, data hiding and abstract data types, module procedures, interfaces and operators, global data)

slide-5
SLIDE 5

Fortran programming language: new developments

⊲ Latest revision, approved by ISO in 2004: Fortran 2003 – object oriented programming – handling of floating point exceptions – interoperability with C ⊲ Draft standard: Fortran 2008 – coarrays

slide-6
SLIDE 6

Learning Fortran 95

⊲ Book: S.J. Chapman: “Fortran 90/95 for Scientists and Engineers” (2004) ⊲ Study guide for the book on our website (first nine chapters). ⊲ Sources of all examples in the book available online (see website) ⊲ Compiler for Windows: Silverfrost FTN95 with Plato IDE (campus licence, see

  • ur website).

⊲ FAQ on website

slide-7
SLIDE 7

Fiber spinning

✁✁✁✁ ✂✁✂✁✂✁✂✁✂ ✄✁✄✁✄✁✄✁✄ ✄✁✄✁✄✁✄✁✄ ☎✁☎✁☎✁☎✁☎ ☎✁☎✁☎✁☎✁☎

A L v(z) z v0 v D

r

A(z)

⊲ include inertia Re = 0 ⊲ steady state A = ¯ A(z), vz = ¯ vz(z): analytical solution

slide-8
SLIDE 8

Draw resonance

slide-9
SLIDE 9

Linear stability analysis

Decompose with A′ and v′

z small:

A(z, t) = ¯ A(z) + A′(z, t) vz(z, t) = ¯ vz(z) + v′

z(z, t)

Assume: A′ =

  • j=1

eλjt ˆ Aj(z) v′

z = ∞

  • j=1

eλjtˆ vj(z) Unstable: Re(λj) > 0 for some j.

slide-10
SLIDE 10

Numerical solution: matrix eigenvalue problem

Finite difference approximation leads to λu ˜ = S ¯u ˜

  • r

(S ¯ − λI ¯)u ˜ = 0 ˜ Notes: ⊲ Can be solved with LAPACK or NAG library routines. ⊲ Study dependance on the Reynolds number of the critical Dr. ⊲ Special case Re = 0.

slide-11
SLIDE 11

Work plan and finalization

⊲ Suggested work plan on website. ⊲ Theoretical background (with all equations) on website. ⊲ Finalization: a working, nicely structured Fortran 95 code + a short presentation. ⊲ Everything should be finished on Tuesday 9/6.

slide-12
SLIDE 12

Final advise

Have fun