Elements of Matlab Simulink
Elements of Matlab Simulink
Copyright 2009,Emanuele Ruffaldi. This work is licensed under the Creative Commons Attribution-ShareAlike License.
Introducing PDE
Ordinary Differential Equation Derivatives respect a single independent variable Solution is a function with arbitrary constants Partial Differential Equation Differential relationship of multiple variables Solution is an arbitrary function Solution determined by fixing boundary conditions Notation
Elements of a PDE
Equation
Domain
Boundary Conditions
Heat Equation
Heat (or diffusion) equation: models the diffusion of temperature from an initially concentrated distribution u_t = u_xx Example of solution is: u(x,t) = 1/sqrt(t) exp(-x^2/4*t)
Boundary Problem
The Dirichlet problem is the general problem of finding a function u which solves a PDE for which the values are known on the boundary of a given region Given a PDE over RN Given a function f that has values over a boundary region of Find a function u solving PDE that is differentiable twice in the interior and once on the boundary and assumes the values of f on the boundary The Neumann problem involves a boundary condition relative to a derivative of the target function Expressed as u_n
Heat Equation 2D
Heat Equation 2D: diffusion of a quantity along the space and time u_t = u_xx + u_yy The general formulation is u_t = div grad u Example Metal block with a rectangular crack. The left side is heated at 100 degrees, the right side heat is flowing to air at constant rate. The others sides are insulated u = 100 (Dirichlet condition) u_n = -10 on the right side (Neumann condition) u_n = 0 on the other boundaries (Neumann condition)
Wave Equation
Linear Wave u_tt = c^2 u_xx A typical solution is u(x,t)=sin(x+ct) Spherical Wave u_tt = c^2 (u_rr + 2/r u_r) If we put in evidence (ur) the solution is the same as above u(t,r) = 1/r [F(r-ct)+G(r+ct)]
Laplace Equation
Laplace Equation u_xx + u_yy = 0 Poisson Equation u_xx + u_yy = g(x,y,z) Helmholts Equation u_xx + u_yy + f(x,y) u = g(x,y,z) Require boundary conditions for resolution
Basics of FEM
How we can solve PDE numerically when no analytical solution is available?
FEM 1D
Space discretization
FEM 2D
Air
Silicon
Hyperbolic
Eigenvalue
Steps 1. Define the Domain 2. Define the Boundary function 3. Solve 4. Plot results
Geometry as Mesh
The FEM resolution uses a triangular mesh for the spatial discretization of the problem The Constructive Geometry produces a closed surface that is later transformed in Mesh Refine mesh for improving details on borders or surface features (number of triangles increases) Jiggle mesh (quality improves)
Resolution of PDE
Solver function depend on the type of problem u1=parabolic(u0,tlist,b,p,e,t,c,a,f,d) u0 is the initial condition (sized as size(p,2)) tlist is the time in which let system evolve b boundary p,e,t geometry [c,a,f,d] parameters of Automatic Refinement of problem [u,p,e,t]=adaptmesh(g,b,c,a,f,options) The parabolic equation can be solved keeping time fixed and starting at given condition Time Discretization (stages) Method of lines Allows PDEs in Simulink
Heat Equation 2D
Example Metal block with a rectangular crack. The left side is heated at 100 degrees, the right side heat is flowing to air at constant rate. The others sides are insulated u = 100 (left side) u_n = -10 on the right side u_n = 0 on the other boundaries u_t = u_xx + u_yy Create Domain Set Boundary conditions Set PDE Solve Test
PDE Problem
Simulink Block
Input Outputs
Dirichlet
Neumann
Integrated Equation
PDE is Parabolic
References
Books An Introduction to Partial Differential Equations with MATLAB,Coleman M., CRC Press, 2005 Introduction to Partial Differential Equations with MATLAB, Cooper J.M., Birkhause, 1998 Beginners Guide to Simulation for Physical Engineering: Practical Usage of MATLAB and PDEase, Yutaka Abe, 1999 Courses Introduction to Partial Differential Equations, Doug Moore, 2003 Introduction to Partial Differential Equations, Showalter, Oregon State University MAE502 Partial Differential Equations in Engineering, ASU,2009