Solving Differential Equations on 2-D Geometries with Matlab

Similar documents
through any three given points if and only if these points are not collinear.

1 Solution of Electrostatics Problems with COM- SOL

Electric Fields and Equipotentials

Finite Element Modules for Enhancing Undergraduate Transport Courses: Application to Fuel Cell Fundamentals

August 7, 2007 NUMERICAL SOLUTION OF LAPLACE'S EQUATION

LAB 1: MATLAB - Introduction to Programming. Objective:

The Hückel Approximation Consider a conjugated molecule i.e. a molecule with alternating double and single bonds, as shown in Figure 1.

Boyle s Law and Charles Law Activity

Tutorial for PhET Sim Quantum Bound States

Boyle s Law: A Multivariable Model and Interactive Animated Simulation

Create Satellite Image, Draw Maps

11.3 MATLAB for Partial Differential Equations

Relative Photometry with data from the Peter van de Kamp Observatory D. Cohen and E. Jensen (v.1.0 October 19, 2014)

Unit: Planetary Science

LAB 2 - ONE DIMENSIONAL MOTION

ME scope Application Note 28

Electromagnetic Forces on Parallel Current-

Making an H-R diagram Earth & Sky

Finite Element Modelling of Finite Single and Double Quantum Wells

How to Make or Plot a Graph or Chart in Excel

Module 2A Turning Multivariable Models into Interactive Animated Simulations

Safety: BE SURE TO KEEP YOUR SMART CART UPSIDE-DOWN WHEN YOU RE NOT ACTIVELY USING IT TO RECORD DATA.

ELEC 1908 The Electric Potential (V) March 28, 2013

Tutorial 23 Back Analysis of Material Properties

Two problems to be solved. Example Use of SITATION. Here is the main menu. First step. Now. To load the data.

Worksheet for Exploration 6.1: An Operational Definition of Work

Figure 2.1 The Inclined Plane

Math 2940: Prelim 1 Practice Solutions

Magnetic Fields. Experiment 1. Magnetic Field of a Straight Current-Carrying Conductor

Lab 1: Dynamic Simulation Using Simulink and Matlab

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3)

Spatial Data Analysis in Archaeology Anthropology 589b. Kriging Artifact Density Surfaces in ArcGIS

M61 1 M61.1 PC COMPUTER ASSISTED DETERMINATION OF ANGULAR ACCELERATION USING TORQUE AND MOMENT OF INERTIA

2: SIMPLE HARMONIC MOTION

Lab 1: Numerical Solution of Laplace s Equation

DUE: WEDS MARCH 26TH 2018

Electric Field PHYS 296

Introduction to Computer Tools and Uncertainties

Exercises for Windows

Newton's 2 nd Law. . Your end results should only be interms of m

Lab Partner(s) TA Initials (on completion) EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE

LAB Exercise #4 - Answers The Traction Vector and Stress Tensor. Introduction. Format of lab. Preparation reading

Using web-based Java pplane applet to graph solutions of systems of differential equations

Using Tables and Graphing Calculators in Math 11

-ASTR 204 Application of Astroimaging Techniques

Designing a Quilt with GIMP 2011

The Hückel Approximation

Multiple Representations: Equations to Tables and Graphs Transcript

Space Objects. Section. When you finish this section, you should understand the following:

Technologies for Learning - Velocity and Acceleration

Revision of the thermal chip simulation, J.E. Akin, Rice University

A SHORT INTRODUCTION TO ADAMS

Harmonic Motion. Mass on a Spring. Physics 231: General Physics I Lab 6 Mar. 11, Goals:

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department. Experiment 03: Work and Energy

OCEAN/ESS 410 Lab 4. Earthquake location

Cerno Application Note Extending the Limits of Mass Spectrometry

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Size Determination of Gold Nanoparticles using Mie Theory and Extinction Spectra

Section 20: Arrow Diagrams on the Integers

The Revolution of the Moons of Jupiter

Workshop 8. Lateral Buckling

Plane and axisymmetric models in Mentat & MARC. Tutorial with some Background

Experiment: Oscillations of a Mass on a Spring

Exp. #2-4 : Measurement of Characteristics of Magnetic Fields by Using Single Coils and a Computer Interface

Name Date Class. Figure 1. The Google Earth Pro drop-down menu.

You will return this handout to the instructor at the end of the lab period. Experimental verification of Ampere s Law.

Arctic Climate Connections Activity 3 Exploring Arctic Climate Data

How can you test the effect of different chemicals on the color change of a n Acid-Base indicator.

VECTORS AND MATRICES

McIDAS-V Tutorial Displaying Point Observations from ADDE Datasets updated July 2016 (software version 1.6)

2: SIMPLE HARMONIC MOTION

CC Algebra 2H Transforming the parent function

Experiment 0 ~ Introduction to Statistics and Excel Tutorial. Introduction to Statistics, Error and Measurement

RT3D Rate-Limited Sorption Reaction

CLEA/VIREO PHOTOMETRY OF THE PLEIADES

Mass Transfer in a Stirred Batch Reactor

Math 1241, Spring 2014 Section 3.3. Rates of Change Average vs. Instantaneous Rates

The Geodatabase Working with Spatial Analyst. Calculating Elevation and Slope Values for Forested Roads, Streams, and Stands.

The Continuous Droste Effect

Elements of Matlab and Simulink Lecture 7

Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework

Chapter 9: Roots and Irrational Numbers

How many states. Record high temperature

I. Introduction. II. An Introduction to Starry Night NAME: ORBITAL MOTION

Application Note. Capillary Zone Electrophoresis

The purpose of this lecture is to present a few applications of conformal mappings in problems which arise in physics and engineering.

1 M62 M62.1 CONSERVATION OF ANGULAR MOMENTUM FOR AN INELASTIC COLLISION

The Rain in Spain - Tableau Public Workbook

Partial Differential Equation Toolbox User s Guide. R2013a

Dynamics Track Momentum, Energy, and Collisions

Computer simulation of radioactive decay

Moving into the information age: From records to Google Earth

Tutorial 8 Raster Data Analysis

Zeeman Effect Physics 481

Lab 1: Earthquake Resources & Plotting Epicenters

Chem 1 Kinetics. Objectives. Concepts

Using Microsoft Excel

Star Cluster Photometry and the H-R Diagram

Experiment 1: Linear Regression

Simulating Future Climate Change Using A Global Climate Model

Transcription:

Solving Differential Equations on 2-D Geometries with Matlab Joshua Wall Drexel University Philadelphia, PA 19104 (Dated: April 28, 2014) I. INTRODUCTION Here we introduce the reader to solving partial differential equations (PDEs) on 2 dimensional geometries using the Matlab package PDE Tool. This robust package solves PDE s using a finite element method. For more information on the finite element method, I refer you to Allyson or Dr. Gilmore 1. If you want a cock-a-maymie explanation, you re welcome to come find me 2. II. SOLVING THE EIGENVALUES AND EIGENVECTORS ON A WASHER A. Getting PDE Tool Ready to Go Okay, so lets look at solving the actual problem given, which is solving the diffusion equation on a circular washer: (c u) + a u = λ d u where c, a and d are constants and u is the solution. a is generally called k 2 and d is often called ρ, the weighting function. We wish to solve the Schrodinger equation specifically on the washer, so we have: h 2 2m 2 ψ(r, θ) = Eψ(r, θ) with the boundary conditions that ψ = 0 at the radial edges of the washer. We will let our problem have natural units, so h = m = 1. So for us c = 0.5, a = d = 1.0. We ll need this later. Start Matlab, then start the PDE tool by either finding in under the Apps tab or typing pdetool into the command window. You will be greeted with a blank screen under a row of buttons. The screen is where we will draw our geometry, but first lets make it easier with a few settings. Click on Options, and turn on the Grid and Snap. Snap makes our joshua.e.wall@gmail.com 1 Added to the list of people that know more than I do. 2 Bring alcohol. drawings pop onto the grid lines you now see. Next select grid spacing and set it to draw grid lines at every integer in x and y. Also define the grid to go from [ 12 12] for both axes. Then click on Axes Equal to get the proper shape of the grid. Finally, click on Solve, then Parameters and set the Eigenvalue range to go from [0 1]. If this range is too large it will time out while trying to solve for the eigenvalues. B. Drawing the Geometry Now that we have set the proper parameters, we can draw our geometry. Matlab uses a union/subtraction method to make complex geometries on the space. For instance, you can draw a disk, then draw a rectangle through it. To draw a circle/ellipse, you pick either button that has an ellipse on it. The button with the + in the center means it draws starting the center at the point you click, while the other starts an edge of the shape where you click. The same goes for the rectangles. You will see in the Set formula box that a combination of letters and numbers appears for each shape as you draw them, like for an ellipse E1 or for a rectangle R2. If these label your disk and rectangle, you can define your problem on both surfaces with E1+R2 or just in the area of the disk outside of the rectangle with E1 R2. Here we want a washer. So first draw a circle with radius 12 by clicking on the button of an ellipse with the + in it, then clicking at the origin and dragging the circle out to a radius of 12. Then do this again for a circle of radius of 5. You should see in the Set formula box C1 + C2. Change this to C1 C2, and you have defined the geometry of a washer. C. Setting the Boundary Conditions and the Equation Next we click on the Ω button. This gives the boundary conditions, and you now see the washer shape outlined in red. If you double click any red line, it gives you the option to select Dirichlet or Neumann boundary conditions. The red is Dirichlet, Neumann would be blue. So this is already set to what we want, and no values need to be changed here.

2 FIG. 1 The Matlab PDE Tool Next click the PDE button, and the choices for the four different types of PDEs appear. Here Eigenvalue is the diffusion equation, which is what we want. You will see settings for the constants we defined before. Simply set c = 0.5, a = 0.0, and d = 1.0 and your done here. D. Creating the Mesh and the Solution Next click on the button. This makes a mesh on the washer surface. This mesh is the FEM part of solving the problem. The initial mesh is fairly coarse, and will result in a rather coarse solution. Clicking the button with three s stacked will refine the mesh for a more accurate solution, but takes longer to calculate. I recommend 3 times to make sure you get the proper degeneracy of the eignvalues. After this, click on the Mesh in the menu bar, followed by Jiggle Mesh. This wiggles the mesh elements to better fit at the edges and bends in the geometry. Finally, click the = button to solve the problem. E. Solutions and Plots After you click the solve button, Matlab will calculate the solution and then the window will change to a color plot of the first solution. You can then click the button that looks like a 3-D plot to explore the solutions. This will present you with the Plot Selection window. Here you can pick which eigenvector to plot by selecting the corresponding eigenvalue from the drop down menu on the bottom right, then checking which type of plot you want (color, contour, arrows, deformed mesh, or 3-D height plot). You can pick to plot the solution u, u, u, or some user defined function of u just as you would define any Matlab function. If you simply click the different eigenvalues and then plot the color plots of u, you will be able to see all of the normal modes of the problem, including those that have degenerate eigenvalues. You can then save the plots or click on Solve in the menu and then Export Solution to export the eigenvalues and eigenvectors to the main Matlab window for further plotting or work. You can also click on File then Save as to save an m-file of the problem and the solutions. III. MY RESULTS Having explained how to do the calculation, I now present my findings using PDE Tool. Note that I present the unitless eigenvalues λ, for the energies multiply these by h 2 /m. Here are the first 20 eigenvalues:

3 n λ m/ h 2 1 0.0989 2 0.1063 3 0.1063 4 0.1283 5 0.1283 6 0.1644 7 0.1644 8 0.2136 9 0.2136 10 0.2748 11 0.2748 12 0.3470 13 0.3470 14 0.4012 15 0.4092 16 0.4092 17 0.4291 18 0.4291 19 0.4334 20 0.4334 The degeneracy in the eigenvalues relates to the axial symmetry of the washer shape. It doesn t matter if I travel the washer in the positive or negative θ direction, I still see the same infinite potentials at the same radii. So I get an energy for travel clockwise exp(+inθ) and counterclockwise exp( inθ). There are two singular eigenvalues here though, the ground state (n=1) and the fourteenth state (n=14). These are states that don t have nodes in the theta direction, instead they have nodes in the radial r direction. We anticipate these would continue to appear as n gets higher, with each singular eigenvalue corresponding to an eigenfunction with an additional radial node. The plots of the degenerate wave functions show that they are just rotations about the central axis of the washer, representing the fact that they come from the symmetry in this coordinate. The nodes are highlighted by the contour lines which are plotted on the graphs and show where the barriers are in the wave function. IV. CONCLUSION So there you have it, we have solved the problem. This general method is the method for solving all 2-D PDEs with the PDE tool in Matlab. Hopefully this has been of some help in how to do this! Happy Matlabbing! REFERENCES Wikipedia, (2014), Finite element method Wikipedia, the free encyclopedia, [Online; accessed 22-April-2014].

FIG. 2 The wave function for n=1 (ground state). 4

FIG. 3 The wave function for n=2. 5

FIG. 4 The wave function for n=3. 6

FIG. 5 The wave function for n=4. 7

FIG. 6 The wave function for n=5. 8

FIG. 7 The wave function for n=5. 9

FIG. 8 The wave function for n=6. 10

FIG. 9 The wave function for n=7. 11

FIG. 10 The wave function for n=14. Note the radial node that appears. 12