# Applied Partial Differential Equations[](https://www.mathworks.com/matlabcentral/fileexchange/172650-applied-partial-differential-equations) or [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=README.mlx)[](https://MathWorks-Teaching-Resources.github.io/Applied-PDEs)**Curriculum Module**_Created with R2024a. Compatible with R2024a and later releases._ Chemical engineering# InformationThis curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) that teach various topics suitable for a first class in partial differential equations.## BackgroundYou can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module covers classification of second\-order PDEs, solving first order wave equations analytically, solving second order wave equations numerically, systems of partial differential equations, and implementing both explicit and implicit finite difference methods. It also includes examples of shocks and rarefaction waves in traffic, diffusion of carbon through iron, a chemical morphogenesis model, a thermal model of a battery, and an approach to modeling an ultrasound.The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.## Contact UsContact the [MathWorks teaching resources team](mailto:onlineteaching@mathworks.com) if you would like to provide feedback or have a question.## PrerequisitesThis module assumes fluent knowledge of single\-variable calculus. If you would like to brush up on these topics, you could review with the calculus courseware:- [**Calculus: Integrals** ](https://www.mathworks.com/matlabcentral/fileexchange/105740-calculus-integrals)is available on [](https://www.mathworks.com/matlabcentral/fileexchange/105740-calculus-integrals) or [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Calculus-Integrals&project=Integrals.prj&file=README.mlx) or [GitHub](https://github.com/MathWorks-Teaching-Resources/Calculus-Integrals) - [**Calculus: Derivatives**](https://www.mathworks.com/matlabcentral/fileexchange/99249-calculus-derivatives) is available on [](https://www.mathworks.com/matlabcentral/fileexchange/99249-calculus-derivatives) or [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Calculus-Derivatives&project=Derivatives.prj&file=README.mlx) or [GitHub](https://github.com/MathWorks-Teaching-Resources/Calculus-Derivatives) ## Getting Started### Accessing the Module### **On MATLAB Online:**Use the [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=README.mlx) link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.### **On Desktop:**Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\-click [AppliedPDEs.prj](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=README.mlx). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start. Ensure you have all the required products (listed below) installed. If you need to include a product, add it using the Add\-On Explorer. To install an add\-on, go to the **Home** tab and select **Add-Ons** > **Get Add-Ons**. ## ProductsMATLAB is used throughout. Tools from the Symbolic Math Toolbox™ are also frequently used. The function range from the Statistics and Machine Learning Toolbox™ is used in Diffusion.mlx and the Partial Differential Equation Toolbox™ is used in ReactionDiffusion.mlx, in an extension example.# Scripts## [**Classification.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/Classification.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Review the terminology of classifying differential equations including homogeneity, order, and linearity. $\bullet$ Classify second\-order PDEs as elliptic, parabolic, or hyperbolic. | **Academic disciplines** $\bullet$ Mathematics || | | |## [**MethodOfCharacteristics.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/MethodOfCharacteristics.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Solve a transport equation using the method of characteristic lines. $\bullet$ Investigate applying the method of characteristics to first\-order 1\-D PDEs with nonconstant coefficients. | **Academic disciplines** $\bullet$ Mathematics || | | |## [**TrafficModelReal.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/TrafficModel.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Calculate a simple traffic model involving a nonlinear transport equation. $\bullet$ Identify and resolve rarefaction regions in a characteristic plot. $\bullet$ Identify and resolve shocks in a characteristic plot. | **Academic disciplines** $\bullet$ Mathematics || | | |## [**FiniteDifference.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/FiniteDifference.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Implement an explicit method. $\bullet$ Implement an implicit method $\bullet$ Implement a Crank\-Nicolson solver | **Academic disciplines** $\bullet$ Mathematics || | | |## [**Diffusion.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/Diffusion.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Explore the basic theory of diffusion and the diffusion equation. $\bullet$ Implement a finite difference solution for the diffusion equation. $\bullet$ Visualize the results of diffusion simulations. | **Academic disciplines** $\bullet$ Mathematics $\bullet$ Materials science $\bullet$ Chemical engineering || | | |## [**ReactionDiffusion.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/ReactionDiffusion.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Explore diffusion equation. $\bullet$ Implement a finite difference solution for the diffusion equation. $\bullet$ Visualize the results of diffusion simulations. | **Academic disciplines** $\bullet$ Mathematics $\bullet$ Chemical engineering || | | |## [**Ultrasound.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/Ultrasound.mlx) | | | || :-: | :-- | :-- || Credit: [Terry J. DuBose](https://en.wikipedia.org/w/index.php?curid=19500021) | **In this script, students will...** $\bullet$ Identify the necessary initial and boundary value knowledge required to numerically approximate a second\-order wave equation. $\bullet$ Explore the basic theory of solving differential equations with boundary conditions. $\bullet$ Identify challenges involved in numerically solving a simple\-looking PDE. | **Academic disciplines** $\bullet$ Mathematics $\bullet$ Medical technology $\bullet$ Acoustics || | | |## [**BatteryThermalModel.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Applied-PDEs&project=AppliedPDEs.prj&file=Scripts/BatteryThermalModel.mlx) | | | || :-- | :-- | :-- || | **In this script, students will...** $\bullet$ Explore the basic theory of the heat equation. $\bullet$ Use cylindrical coordinates to model a battery cell. $\bullet$ Implement a variety of initial conditions and visualize the results. | **Academic disciplines** $\bullet$ Mathematics $\bullet$ Electrical engineering $\bullet$ Chemical engineering || | | |# LicenseThe license for this module is available in [LICENSE.md](https://github.com/MathWorks-Teaching-Resources/AppliedPDEs/blob/release/LICENSE.md).# Related Courseware Modules| | | || :-- | :-- | :-- || **Courseware Module** | **Sample Content** | **Available on:** || [**Numerical Methods with Applications**](https://www.mathworks.com/matlabcentral/fileexchange/111490-numerical-methods-with-applications) | | [](https://www.mathworks.com/matlabcentral/fileexchange/111490-numerical-methods-with-applications) [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Numerical-Methods-with-Applications&project=NumericalMethods.prj) [GitHub](https://github.com/MathWorks-Teaching-Resources/Numerical-Methods-with-Applications) || [**Fourier Analysis**](https://www.mathworks.com/matlabcentral/fileexchange/106725-fourier-analysis) | | [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=FourierAnalysis.prj) [GitHub](https://github.com/MathWorks-Teaching-Resources/Fourier-Analysis) || | | |Or feel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22&sort=downloads_desc_30d).# Educator Resources- [Educator Page](https://www.mathworks.com/academia/educators.html) # Contribute Looking for more? Found an issue? Have a suggestion? Please contact the [MathWorks teaching resources team](mailto:%20onlineteaching@mathworks.com). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/AppliedPDEs/blob/release/CONTRIBUTING.md) page on GitHub.*©* Copyright 2024 The MathWorks™, Inc
↧