Partial Differential Equation Toolbox User's Guide

Download Partial Differential Equation Toolbox User's Guide

Post on 10-Dec-2016

217 views

Category:

Documents

5 download

Embed Size (px)

TRANSCRIPT

<ul><li><p>Computation</p><p>Visualization</p><p>Programming</p><p>Partial Differential EquationToolbox</p><p>For Use with MATLAB</p><p>Users Guide</p><p>Computer Solutions Europe AB</p></li><li><p>How to Contact The MathWorks:</p><p>508-647-7000 Phone</p><p>508-647-7001 Fax</p><p>The MathWorks, Inc. Mail24 Prime Park WayNatick, MA 01760-1500</p><p>http://www.mathworks.com Webftp.mathworks.com Anonymous FTP servercomp.soft-sys.matlab Newsgroup</p><p>support@mathworks.com Technical supportsuggest@mathworks.com Product enhancement suggestionsbugs@mathworks.com Bug reportsdoc@mathworks.com Documentation error reportssubscribe@mathworks.com Subscribing user registrationservice@mathworks.com Order status, license renewals, passcodesinfo@mathworks.com Sales, pricing, and general information</p><p>Partial Differential Equation Toolbox Users Guide COPYRIGHT 1984 - 1997 by The MathWorks, Inc. All Rights Reserved.The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or repro-duced in any form without prior written consent from The MathWorks, Inc.</p><p>U.S. GOVERNMENT: If Licensee is acquiring the Programs on behalf of any unit or agency of the U.S. Government, the following shall apply: (a) For units of the Department of Defense: the Government shall have only the rights specified in the license under which the commercial computer software or commercial software documentation was obtained, as set forth in subparagraph (a) of the Rights in Commercial Computer Software or Commercial Software Documentation Clause at DFARS 227.7202-3, therefore the rights set forth herein shall apply; and (b) For any other unit or agency: NOTICE: Notwithstanding any other lease or license agreement that may pertain to, or accompany the delivery of, the computer software and accompanying documentation, the rights of the Government regarding its use, reproduction, and disclo-sure are as set forth in Clause 52.227-19 (c)(2) of the FAR.</p><p>MATLAB, Simulink, Handle Graphics, and Real-Time Workshop are registered trademarks and Stateflow and Target Language Compiler are trademarks of The MathWorks, Inc.</p><p>Other product or brand names are trademarks or registered trademarks of their respective holders.</p><p>Printing History: August 1995 First printingFebruary 1996 Reprint</p><p>FAX</p><p>@</p></li><li><p>Contents</p><p>1Tutorial</p><p>Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2What Does this Toolbox Do? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2Can I Use the PDE Toolbox? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What Problems Can I Solve? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3In Which Areas Can the Toolbox Be Used? . . . . . . . . . . . . . . . . .1-5How Do I Define a PDE Problem? . . . . . . . . . . . . . . . . . . . . . . . .1-5How Can I Solve a PDE Problem? . . . . . . . . . . . . . . . . . . . . . . . .1-6Can I Use the Toolbox for Nonstandard Problems? . . . . . . . . . .1-6How Can I Visualize My Results? . . . . . . . . . . . . . . . . . . . . . . . .1-6Are There Any Applications Already Implemented? . . . . . . . . . .1-7Can I Extend the Functionality of the Toolbox? . . . . . . . . . . . . .1-7How Can I Solve 3-D Problems by 2-D Models? . . . . . . . . . . . . .1-8</p><p>Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-9</p><p>Basics of The Finite Element Method . . . . . . . . . . . . . . . . . . .1-18</p><p>Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . . .1-23The PDE Toolbox Graphical User Interface . . . . . . . . . . . . . . .1-23The Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-24The Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-25The GUI Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-26The CSG Model and the Set Formula . . . . . . . . . . . . . . . . . . . .1-27Creating Rounded Corners . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-28Suggested Modeling Method . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-31Object Selection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-35Display Additional Information . . . . . . . . . . . . . . . . . . . . . . . . .1-35Entering Parameter Values as MATLAB Expressions . . . . . . .1-36Using PDE Toolbox version 1.0 Model M-files . . . . . . . . . . . . . .1-36</p><p>i</p></li><li><p>ii Contents</p><p>Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . . . 1-37Data Structures and Utility Functions . . . . . . . . . . . . . . . . . . . 1-37</p><p>Constructive Solid Geometry Model . . . . . . . . . . . . . . . . . . . 1-38Decomposed Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39Equation Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40Post Processing and Presentation . . . . . . . . . . . . . . . . . . . . . 1-40</p><p>Hints and Suggestions for Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40</p><p>2Examples</p><p>Examples of Elliptic Problems . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Poissons Equation on Unit Disk . . . . . . . . . . . . . . . . . . . . . . . . . 2-2</p><p>Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . . 2-2Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . . 2-4</p><p>A Scattering Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . . 2-8</p><p>A Minimal Surface Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-10Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . 2-11</p><p>Domain Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12</p><p>Examples of Parabolic Problems . . . . . . . . . . . . . . . . . . . . . . . 2-16The Heat Equation: A Heated Metal Block . . . . . . . . . . . . . . . . 2-16</p><p>Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-17Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . 2-19</p><p>Heat Distribution in Radioactive Rod . . . . . . . . . . . . . . . . . . . . 2-21Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-22</p><p>Examples of Hyperbolic Problems . . . . . . . . . . . . . . . . . . . . . 2-23The Wave Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23</p><p>Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-23Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . 2-25</p></li><li><p>Examples of Eigenvalue Problems . . . . . . . . . . . . . . . . . . . . . 2-27Eigenvalues and Eigenfunctions for the L-Shaped Membrane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27</p><p>Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-27Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . 2-28</p><p>L-Shaped Membrane with Rounded Corner . . . . . . . . . . . . . . . 2-31Eigenvalues and Eigenmodes of a Square . . . . . . . . . . . . . . . . 2-32</p><p>Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-33Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . 2-33</p><p>Application Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35The Application Modes and the GUI . . . . . . . . . . . . . . . . . . . . . 2-35Structural Mechanics - Plane Stress . . . . . . . . . . . . . . . . . . . . . 2-36</p><p>Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-39</p><p>Structural Mechanics - Plane Strain . . . . . . . . . . . . . . . . . . . . 2-41Electrostatics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43</p><p>Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-44</p><p>Magnetostatics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-46Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-47Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-48</p><p>AC Power Electromagnetics . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-51Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-52Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-53</p><p>Conductive Media DC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-55Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-55Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-56</p><p>Heat Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-57Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-58Using the Graphical User Interface . . . . . . . . . . . . . . . . . . . 2-59</p><p>Diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-61</p><p>iii</p></li><li><p>iv Contents</p><p>3The Graphical User Interface</p><p>PDE Toolbox Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3</p><p>New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4Save As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6</p><p>Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8</p><p>Options Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9Grid Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10Axes Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11</p><p>Draw Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14Boundary Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15</p><p>Specify Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 3-16PDE Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18</p><p>PDE Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19Mesh Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22</p><p>Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23Solve Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25</p><p>Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25Plot Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30</p><p>Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30Additional Plot Control Options . . . . . . . . . . . . . . . . . . . . . . 3-34</p><p>Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37</p><p>The Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38</p></li><li><p>4The Finite Element Method</p><p>The Elliptic Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3</p><p>The Elliptic System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10</p><p>The Parabolic Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13</p><p>The Hyperbolic Equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16</p><p>The Eigenvalue Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17</p><p>Nonlinear Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21</p><p>Adaptive Mesh Refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26The Error Indicator Function . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26The Mesh Refiner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27The Termination Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28</p><p>Fast Solution of Poissons Equation . . . . . . . . . . . . . . . . . . . . 4-29</p><p>v</p></li><li><p>vi Contents</p><p>5Reference</p><p>Commands Grouped by Function . . . . . . . . . . . . . . . . . . . . . . . 5-3PDE Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3User Interface Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3Geometry Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4Plot Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4Utility Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5User Defined Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7Demonstration Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7</p><p>PDE Coefficients for Scalar Case . . . . . . . . . . . . . . . . . . . . . 5-20PDE Coefficients for System Case . . . . . . . . . . . . . . . . . . . . 5-21Boundary Condition Dialog Box . . . . . . . . . . . . . . . . . . . . . . 5-80Model M-file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-81</p><p>Index</p></li><li><p>Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What Does this Toolbox Do? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2Can I Use the PDE Toolbox? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What Problems Can I Solve? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3In Which Areas Can the Toolbox Be Used? . . . . . . . . . . . . . . . . . 1-5How Do I Define a PDE Problem? . . . . . . . . . . . . . . . ....</p></li></ul>

Recommended

View more >