MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557...

44
1 MA557/MA578/CS557 Lecture 3 Spring 2003 Prof. Tim Warburton [email protected]

Transcript of MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557...

Page 1: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

1

MA557/MA578/CS557Lecture 3

Spring 2003Prof. Tim [email protected]

Page 2: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

2

Week 1 (01/22/03, 01/24/03)

• Introduction to partial differential equations and their use.

• Examples of some applications for PDEs (acoustics, electromagnetics, fluid dynamics ….. )

• Review of some basic notation and definitions for multivariatecalculus.

• Inner-products, norms, Sobolev spaces….

Page 3: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

3

PDE’s – Why Do We Care ?

1) Money:a) If you can modify a vehicle’s geometry to significantly reduce turbulent drag (race

car, commercial airplane…) b) Modeling financial instruments (derivatives…)

2) Scientific curiosity:a) Model’s of poorly understood physical phenomena (turbulence…)b) Astrophysical models, solar models…

3) Engineering Applications:a) Structural modelingb) Electromagnetics, acoustics, fluid dynamics…

4) Environment:a) Modeling environmental impact of those pesky greenhouse gasesb) Modeling weather to avoid damage or to predict crop performancec) Predicting earthquakes, volcanic eruptions, tsunami (all belong in the “Money”

section too?.

5) Defense:a) Designing materials and profiles for stealth aircraftb) Nuclear weapon stockpile stewardship

6) Discussion…. what else comes to mind – also how would you rank the relevant importance of the above (and how well do you think each area is funded) ?.

Page 4: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

4

Some Time Dependent PDE

• A typical PDE which is first order in time, and possibly higher order in space will have the general form:

• Example:

• We will see where these come from next lecture.

2

2, , , , , , , , ,...x y z tt x y z x

∂ ∂ ∂ ∂ ∂= ∂ ∂ ∂ ∂ ∂

q q q q qF q

, gives us 0u u uu a ax t x∂ ∂ ∂

= = + =∂ ∂ ∂

q F

Page 5: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

5

Commonly Used Numerical Methods

• Finite difference• Finite volume• Finite element• hp-finite element• Spectral methods

• Boundary elements• Numerical Greens function methods• Fast multipole methods• Meshfree methods

Each has its own practical range of operation….

Page 6: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

6

Industry Solvers

• The state of the art in industrial solvers has evolved PDE solvers into word processor like technology (to some degree).

• It is now possible to apply some of the previous methods to PDEs entered with math formulae (i.e. not computer code).

• A few clicks will now allow an engineer to solve extremely complex problems

• But…..

Page 7: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

7

Your Turn To Solve a PDE

• Download:

– http://www.useme.org/WUM_v5.zip

– Or

– http://www.math.unm.edu/~timwar/WUM_v5.zip

– Or – grab a spare cd-rom and copy the WUM_v5.zip file

– Save it to the desktop and double click on it.

– When you have unzip’d the file indicate that you are done.

– We will now go through an insane sequence to simulate Maxwell’s equations in a two-dimensional domain ☺

Page 8: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

8

2D Transverse Magnetic Mode Maxwell’s Equations

• We are going to solve the following equations to obtain Hx,Hy,Ez as coupled functions of time and space.

• We will specify that:

Hx(t=0,x,y)=Hy(t=0,x,y)=Ez(t=0,x,y)=0

• We also specify that no electric or magnetic fields travel inwards from the limit of large (x,y)

• All boundaries we create will be perfectly electrically conducting (superconducting) where Ez=0 and (Hx,Hy) is tangential to the boundary.

• We will specify epsilon (whereas mu=1 by default)

• We have now specified the PDEs, the initial conditions and sufficient boundary conditions to allow us to solve for {Hx(t,x,y),Hy(t,x,y),Ez(t,x,y), t>=0}

( )

( )

( )

( ) ( )

0

x z

y z

yz x

yx

H Et y

H Et x

HE Ht x y

HHx y

µ

µ

ε

µµ

∂ ∂= −

∂ ∂

∂ ∂=

∂ ∂∂∂ ∂

= −∂ ∂ ∂

∂∂+ =

∂ ∂

Page 9: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

9

Windows USEMe

USEMe solvers by Tim WarburtonUSEMe gui by Nigel Nunn

Page 10: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

10

Starting Up• Click on the WinUSEMe application

Page 11: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

11

First screen

Page 12: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

12

Click on Ellipse

Page 13: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

13

First we build a circular far field(must be unit radius for the Hagstromboundary conditions – current implementation)

Page 14: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

14

Note the 32 node circle

Page 15: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

15

Zoom in using right mouseand moving mouse

Page 16: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

16

Next make a rectangle

1) Click on Rect

2) Fill in rectangle details3) Press Apply

4) Here it is

Page 17: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

17

Make the rectangle a hole-- press Hole

Page 18: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

18

Left mouse click inside the Rect

Page 19: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

19

Now build a rectanglewhich has no associatedboundary conditions

Page 20: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

20

Maxwell’s Hagstrom Module• This module is able to simulate variable

epsilon Maxwell’s…• We need to click on each region and

specify the epsilon for that region• The region including the far field should

be set to material parameter=1

Page 21: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

21

Next click on regionso we can set the regionmaterial properties

Page 22: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

22

1) Pin the regions dialogue2) Click in each material region

Page 23: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

23

Edit the first region selected toset epsilon=9

Page 24: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

24

Save the geometry by clicking “save as poly”

Page 25: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

25

Click on Generate to make mesh

Page 26: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

26

Save mesh by clicking on “write as neu”

Page 27: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

27

Click on the “Solve” tab

Page 28: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

28

Set the run directory by clicking on “Find”

Page 29: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

29

Locate a .neu file in the run directory and click on it

Page 30: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

30

Locate .neu file saved previouslyon pull-down menu and click on “Load”

Page 31: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

31

Ready to set simulation parameters

Page 32: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

32

Choose simulation type

Page 33: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

33

Choose order of scheme

Page 34: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

34

Click “Run” to start simulation

Page 35: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

35

Field 0 (Hx) after a few time steps

Page 36: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

36

Click on “Viz” tab

Page 37: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

37

Change the number of nodesused for plotting

Page 38: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

38

Click “Apply” to set resolution

Page 39: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

39

Note nice and smooth fields

Page 40: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

40

Choose “Colormap” tochange contour ranges

Page 41: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

41

Using left mouse can change viewpoint

1) Click on “Auto Z-scale”2) Increasing Surface scale raises surface

Page 42: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

42

Click on Window/Tile Vertical

Note RCS in right window

Page 43: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

43

Homework. Due on 01/27/03

1) Master the WUM code – so that you are able to build a mesh with:

a) a plus sign shaped PEC holeb) far field is far type unit circle (see next slide)c) Make sure the Region is set to one

2) Run the code for 15 units and print out a snap shot of the results (use alt-print scrn and paste into Powerpoint). Repeat this for different orders. Generally experiment.

3) Read chapters 1 and 2 of Leveque

4) In a few weeks you will be able to code up the Maxwell’s solver yourself and prove it converges ☺

Page 44: MA557/MA578/CS557 Lecture 3 - Rice Utimwar/MA578S03/MA578S03Lecture3.pdf · MA557/MA578/CS557 Lecture 3 Spring 2003 ... 8 2D Transverse Magnetic ... Homework. Due on 01/27/03 1) Master

44