SlideShare a Scribd company logo
1 of 28
How to solve PDEs using  MATHEMATIA and MATLAB G. Y. Park, S. H. Lee and J.K. Lee Department of Electronic and Electrical Engineering, POSTECH 2006. 5. 17 Plasma Application Modeling POSTECH
Contents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Plasma Application Modeling POSTECH
References ,[object Object],[object Object],[object Object],Plasma Application Modeling POSTECH
PDE (Partial Differential Equation) ,[object Object],[object Object],Plasma Application Modeling POSTECH - Three Types of PDEs: 1) Elliptic:     Steady heat transfer, flow and diffusion 2) Parabolic:    Transient heat transfer, flow and diffusion 3) Hyperbolic:    Transient wave equation
FTCS method for the heat equation FTCS ( Forward Euler in Time and Central difference in Space ) Heat equation in a slab Plasma Application Modeling POSTECH
FTCS method for the heat equation Initial  conditions Plot FTCS
Stability of FTCS and CTCS FTCS is first-order accuracy in time and second-order accuracy in space. So small time steps are required to achieve reasonable accuracy. CTCS method  for heat equation (Both the time and space derivatives are center-differenced.) However, CTCS method is   unstable   for  any  time step size. ( unstable ) Plasma Application Modeling POSTECH Courant condition  for FTCS
Lax method Simple modification to the CTCS method In the differenced time derivative, The resulting difference equation is ( Second-order accuracy in both time and space ) Plasma Application Modeling POSTECH Replacement by average value from surrounding grid points Courant condition  for Lax method
Crank Nicolson Algorithm ( Implicit Method ) BTCS ( Backward time, centered space ) method for heat equation ( This is stable for any choice of time steps, however it is first-order accurate in time. ) Crank-Nicolson scheme for heat equation taking the average between time steps n-1 and n, ( This is stable for any choice of time steps and second-order accurate in time. ) Plasma Application Modeling POSTECH a set of coupled linear equations for
Crank Nicolson Algorithm Initial  conditions Plot Crank-Nicolson scheme Exact solution
Crank Nicolson Algorithm Plasma Application Modeling POSTECH
Multiple Spatial Dimensions FTCS for 2D heat equation Courant condition for this scheme ( Other schemes such as CTCS and Lax can be easily extended to multiple dimensions. ) Plasma Application Modeling POSTECH
Wave equation with nonuniform wave speed 2D wave equation Initial condition : Boundary condition : Wave speed : CTCS method for the wave equation : Courant condition : Plasma Application Modeling POSTECH
Wave equation with nonuniform wave speed Since evaluation of the nth timestep refers back to the n-2nd step,  for the first step, a trick is employed. Since initial velocity and value, Plasma Application Modeling POSTECH
Wave equation with nonuniform wave speed Plasma Application Modeling POSTECH
Wave equation with nonuniform wave speed Plasma Application Modeling POSTECH
2D Poisson’s equation Poisson’s equation Direct Solution for Poisson’s equation Centered-difference the spatial derivatives
Jacobi’s  method ( Relaxation method ) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],FTCS (Maximum time step satisfying Courant condition)
Jacobi method
Simultaneous OverRelaxation (SOR) The convergence of the Jacobi method is quite slow.  Furthermore, the larger the system, the slower the convergence. Simultaneous OverRelaxation (SOR) : the Jacobi method is modified in two ways, ,[object Object],[object Object],[object Object],Plasma Application Modeling POSTECH
Simultaneous OverRelaxation (SOR)
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  dftcs.m >> dftcs dftcs - Program to solve the diffusion equation using the Forward Time Centered Space scheme. Enter time step: 0.0001 Enter the number of grid points: 51 Solution is expected to be stable Plasma Application Modeling Group POSTECH
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  dftcs.m >> dftcs dftcs - Program to solve the diffusion equation using the Forward Time Centered Space scheme. Enter time step: 0.00015 Enter the number of grid points: 61 WARNING:   Solution is expected to be unstable Plasma Application Modeling Group POSTECH
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  neutrn.m >>  neutrn Program to solve the neutron diffusion equation using the FTCS. Enter time step: 0.0005 Enter the number of grid points: 61 Enter system length: 2 =>  System length is subcritical Solution is expected to be stable Enter number of time steps: 12000 Plasma Application Modeling Group POSTECH
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  neutrn.m >>  neutrn Program to solve the neutron diffusion equation using the FTCS. Enter time step: 0.0005 Enter the number of grid points: 61 Enter system length: 4 =>  System length is supercritical Solution is expected to be stable Enter number of time steps: 12000 Plasma Application Modeling Group POSTECH
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  advect.m >> advect advect - Program to solve the advection equation using the various hyperbolic PDE schemes: FTCS, Lax, Lax-Wendorf Enter number of grid points: 50 Time for wave to move one grid spacing is 0.02 Enter time step: 0.002 Wave circles system in 500 steps Enter number of steps: 500 FTCS FTCS Plasma Application Modeling Group POSTECH
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  advect.m >> advect advect - Program to solve the advection equation using the various hyperbolic PDE schemes: FTCS, Lax, Lax-Wendorf Enter number of grid points: 50 Time for wave to move one grid spacing is 0.02 Enter time step: 0.02 Wave circles system in 50 steps Enter number of steps: 50 Lax Lax Plasma Application Modeling Group POSTECH
O.V. Manuilenko MATLAB   The Language of Technical Computing MATLAB PDE Run:  relax.m >> relax relax - Program to solve the Laplace equation using Jacobi, Gauss-Seidel and SOR methods on a square grid Enter number of grid points on a side: 50 Theoretical optimum omega = 1.88184  Enter desired omega: 1.8 Potential at y=L equals 1  Potential is zero on all other boundaries Desired fractional change = 0.0001 Plasma Application Modeling Group POSTECH

More Related Content

What's hot

Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsMeenakshisundaram N
 
Adomian Decomposition Method for Solving the Nonlinear Heat Equation
Adomian Decomposition Method for Solving the Nonlinear Heat EquationAdomian Decomposition Method for Solving the Nonlinear Heat Equation
Adomian Decomposition Method for Solving the Nonlinear Heat EquationIJERA Editor
 
numericalmethod.ppt
numericalmethod.pptnumericalmethod.ppt
numericalmethod.pptSundar S.K
 
Application of Differential Equation
Application of Differential EquationApplication of Differential Equation
Application of Differential EquationSalim Hosen
 
Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Muhammad Waqas
 
MATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationMATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationAinul Islam
 
shooting method with Range kutta method
shooting method with Range kutta methodshooting method with Range kutta method
shooting method with Range kutta methodSetuThacker
 
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
 
Numerical Solutions of Burgers' Equation Project Report
Numerical Solutions of Burgers' Equation Project ReportNumerical Solutions of Burgers' Equation Project Report
Numerical Solutions of Burgers' Equation Project ReportShikhar Agarwal
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical AnalysisMohammad Tawfik
 
Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)anil7nayak
 
Numerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference MethodNumerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference Methodiosrjce
 
Computational Method to Solve the Partial Differential Equations (PDEs)
Computational Method to Solve the Partial Differential  Equations (PDEs)Computational Method to Solve the Partial Differential  Equations (PDEs)
Computational Method to Solve the Partial Differential Equations (PDEs)Dr. Khurram Mehboob
 
Controllability of Linear Dynamical System
Controllability of  Linear Dynamical SystemControllability of  Linear Dynamical System
Controllability of Linear Dynamical SystemPurnima Pandit
 

What's hot (20)

Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential Equations
 
Adomian Decomposition Method for Solving the Nonlinear Heat Equation
Adomian Decomposition Method for Solving the Nonlinear Heat EquationAdomian Decomposition Method for Solving the Nonlinear Heat Equation
Adomian Decomposition Method for Solving the Nonlinear Heat Equation
 
numericalmethod.ppt
numericalmethod.pptnumericalmethod.ppt
numericalmethod.ppt
 
Application of Differential Equation
Application of Differential EquationApplication of Differential Equation
Application of Differential Equation
 
Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1
 
1 d wave equation
1 d wave equation1 d wave equation
1 d wave equation
 
Relaxation method
Relaxation methodRelaxation method
Relaxation method
 
MATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationMATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and Integration
 
shooting method with Range kutta method
shooting method with Range kutta methodshooting method with Range kutta method
shooting method with Range kutta method
 
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 05 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
 
Numerical Solutions of Burgers' Equation Project Report
Numerical Solutions of Burgers' Equation Project ReportNumerical Solutions of Burgers' Equation Project Report
Numerical Solutions of Burgers' Equation Project Report
 
Numerical Methods 1
Numerical Methods 1Numerical Methods 1
Numerical Methods 1
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
 
FPDE presentation
FPDE presentationFPDE presentation
FPDE presentation
 
Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)Applications of differential equations(by Anil.S.Nayak)
Applications of differential equations(by Anil.S.Nayak)
 
Numerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference MethodNumerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference Method
 
Computational Method to Solve the Partial Differential Equations (PDEs)
Computational Method to Solve the Partial Differential  Equations (PDEs)Computational Method to Solve the Partial Differential  Equations (PDEs)
Computational Method to Solve the Partial Differential Equations (PDEs)
 
Initial Value Problems
Initial Value ProblemsInitial Value Problems
Initial Value Problems
 
Controllability of Linear Dynamical System
Controllability of  Linear Dynamical SystemControllability of  Linear Dynamical System
Controllability of Linear Dynamical System
 
Finite difference Matlab Code
Finite difference Matlab CodeFinite difference Matlab Code
Finite difference Matlab Code
 

Similar to Finite DIfference Methods Mathematica

Secrets of supercomputing
Secrets of supercomputingSecrets of supercomputing
Secrets of supercomputingfikrul islamy
 
Secrets of supercomputing
Secrets of supercomputingSecrets of supercomputing
Secrets of supercomputingfikrul islamy
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Aritra Sarkar
 
MOLECULAR SIMULATION TECHNIQUES
MOLECULAR SIMULATION TECHNIQUESMOLECULAR SIMULATION TECHNIQUES
MOLECULAR SIMULATION TECHNIQUESMysha Malar M
 
DESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORM
DESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORMDESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORM
DESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORMsipij
 
Current Research on Quantum Algorithms.ppt
Current Research on Quantum Algorithms.pptCurrent Research on Quantum Algorithms.ppt
Current Research on Quantum Algorithms.pptDefiantTones
 
Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...
Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...
Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...Power System Operation
 
Quantum Computation for Predicting Electron and Phonon Properties of Solids
Quantum Computation for Predicting Electron and Phonon Properties of SolidsQuantum Computation for Predicting Electron and Phonon Properties of Solids
Quantum Computation for Predicting Electron and Phonon Properties of SolidsKAMAL CHOUDHARY
 
EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13Paul Brodbeck
 
ECET 345 Entire Course NEW
ECET 345 Entire Course NEWECET 345 Entire Course NEW
ECET 345 Entire Course NEWshyamuopfive
 
Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...
Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...
Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...Piero Belforte
 
DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)
DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)
DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)Piero Belforte
 
introduction-to-numerical-methods-in-chemical-engineering
 introduction-to-numerical-methods-in-chemical-engineering introduction-to-numerical-methods-in-chemical-engineering
introduction-to-numerical-methods-in-chemical-engineeringTalal Ashraf
 
Parallel Left Ventricle Simulation Using the FEniCS Framework
Parallel Left Ventricle Simulation Using the FEniCS FrameworkParallel Left Ventricle Simulation Using the FEniCS Framework
Parallel Left Ventricle Simulation Using the FEniCS FrameworkUral-PDC
 
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)Malik Abdul Wahab
 
Slides TSALBP ACO 2008
Slides TSALBP ACO 2008Slides TSALBP ACO 2008
Slides TSALBP ACO 2008Manuel ChiSe
 
Optimal control of electrodynamic tether orbit transfers
Optimal control of electrodynamic tether orbit transfersOptimal control of electrodynamic tether orbit transfers
Optimal control of electrodynamic tether orbit transfersFrancisco Carvalho
 

Similar to Finite DIfference Methods Mathematica (20)

DFT.docx
DFT.docxDFT.docx
DFT.docx
 
DFT.docx
DFT.docxDFT.docx
DFT.docx
 
Secrets of supercomputing
Secrets of supercomputingSecrets of supercomputing
Secrets of supercomputing
 
Secrets of supercomputing
Secrets of supercomputingSecrets of supercomputing
Secrets of supercomputing
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
 
MOLECULAR SIMULATION TECHNIQUES
MOLECULAR SIMULATION TECHNIQUESMOLECULAR SIMULATION TECHNIQUES
MOLECULAR SIMULATION TECHNIQUES
 
DESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORM
DESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORMDESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORM
DESIGN OF DELAY COMPUTATION METHOD FOR CYCLOTOMIC FAST FOURIER TRANSFORM
 
Current Research on Quantum Algorithms.ppt
Current Research on Quantum Algorithms.pptCurrent Research on Quantum Algorithms.ppt
Current Research on Quantum Algorithms.ppt
 
Advanced Molecular Dynamics 2016
Advanced Molecular Dynamics 2016Advanced Molecular Dynamics 2016
Advanced Molecular Dynamics 2016
 
Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...
Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...
Parallel-in-Time Object-Oriented Electromagnetic Transient Simulation of Powe...
 
Quantum Computation for Predicting Electron and Phonon Properties of Solids
Quantum Computation for Predicting Electron and Phonon Properties of SolidsQuantum Computation for Predicting Electron and Phonon Properties of Solids
Quantum Computation for Predicting Electron and Phonon Properties of Solids
 
EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13
 
ECET 345 Entire Course NEW
ECET 345 Entire Course NEWECET 345 Entire Course NEW
ECET 345 Entire Course NEW
 
Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...
Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...
Digital Wave Formulation of Quasi-Static Partial Element Equivalent Circuit M...
 
DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)
DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)
DIGITAL WAVE FORMULATION OF PEEC METHOD (SLIDES)
 
introduction-to-numerical-methods-in-chemical-engineering
 introduction-to-numerical-methods-in-chemical-engineering introduction-to-numerical-methods-in-chemical-engineering
introduction-to-numerical-methods-in-chemical-engineering
 
Parallel Left Ventricle Simulation Using the FEniCS Framework
Parallel Left Ventricle Simulation Using the FEniCS FrameworkParallel Left Ventricle Simulation Using the FEniCS Framework
Parallel Left Ventricle Simulation Using the FEniCS Framework
 
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)
WHAT IS COMPUTATIONAL FLUID DYNAMICS (CFD)
 
Slides TSALBP ACO 2008
Slides TSALBP ACO 2008Slides TSALBP ACO 2008
Slides TSALBP ACO 2008
 
Optimal control of electrodynamic tether orbit transfers
Optimal control of electrodynamic tether orbit transfersOptimal control of electrodynamic tether orbit transfers
Optimal control of electrodynamic tether orbit transfers
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Finite DIfference Methods Mathematica

  • 1. How to solve PDEs using MATHEMATIA and MATLAB G. Y. Park, S. H. Lee and J.K. Lee Department of Electronic and Electrical Engineering, POSTECH 2006. 5. 17 Plasma Application Modeling POSTECH
  • 2.
  • 3.
  • 4.
  • 5. FTCS method for the heat equation FTCS ( Forward Euler in Time and Central difference in Space ) Heat equation in a slab Plasma Application Modeling POSTECH
  • 6. FTCS method for the heat equation Initial conditions Plot FTCS
  • 7. Stability of FTCS and CTCS FTCS is first-order accuracy in time and second-order accuracy in space. So small time steps are required to achieve reasonable accuracy. CTCS method for heat equation (Both the time and space derivatives are center-differenced.) However, CTCS method is unstable for any time step size. ( unstable ) Plasma Application Modeling POSTECH Courant condition for FTCS
  • 8. Lax method Simple modification to the CTCS method In the differenced time derivative, The resulting difference equation is ( Second-order accuracy in both time and space ) Plasma Application Modeling POSTECH Replacement by average value from surrounding grid points Courant condition for Lax method
  • 9. Crank Nicolson Algorithm ( Implicit Method ) BTCS ( Backward time, centered space ) method for heat equation ( This is stable for any choice of time steps, however it is first-order accurate in time. ) Crank-Nicolson scheme for heat equation taking the average between time steps n-1 and n, ( This is stable for any choice of time steps and second-order accurate in time. ) Plasma Application Modeling POSTECH a set of coupled linear equations for
  • 10. Crank Nicolson Algorithm Initial conditions Plot Crank-Nicolson scheme Exact solution
  • 11. Crank Nicolson Algorithm Plasma Application Modeling POSTECH
  • 12. Multiple Spatial Dimensions FTCS for 2D heat equation Courant condition for this scheme ( Other schemes such as CTCS and Lax can be easily extended to multiple dimensions. ) Plasma Application Modeling POSTECH
  • 13. Wave equation with nonuniform wave speed 2D wave equation Initial condition : Boundary condition : Wave speed : CTCS method for the wave equation : Courant condition : Plasma Application Modeling POSTECH
  • 14. Wave equation with nonuniform wave speed Since evaluation of the nth timestep refers back to the n-2nd step, for the first step, a trick is employed. Since initial velocity and value, Plasma Application Modeling POSTECH
  • 15. Wave equation with nonuniform wave speed Plasma Application Modeling POSTECH
  • 16. Wave equation with nonuniform wave speed Plasma Application Modeling POSTECH
  • 17. 2D Poisson’s equation Poisson’s equation Direct Solution for Poisson’s equation Centered-difference the spatial derivatives
  • 18.
  • 20.
  • 22. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: dftcs.m >> dftcs dftcs - Program to solve the diffusion equation using the Forward Time Centered Space scheme. Enter time step: 0.0001 Enter the number of grid points: 51 Solution is expected to be stable Plasma Application Modeling Group POSTECH
  • 23. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: dftcs.m >> dftcs dftcs - Program to solve the diffusion equation using the Forward Time Centered Space scheme. Enter time step: 0.00015 Enter the number of grid points: 61 WARNING: Solution is expected to be unstable Plasma Application Modeling Group POSTECH
  • 24. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: neutrn.m >> neutrn Program to solve the neutron diffusion equation using the FTCS. Enter time step: 0.0005 Enter the number of grid points: 61 Enter system length: 2 => System length is subcritical Solution is expected to be stable Enter number of time steps: 12000 Plasma Application Modeling Group POSTECH
  • 25. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: neutrn.m >> neutrn Program to solve the neutron diffusion equation using the FTCS. Enter time step: 0.0005 Enter the number of grid points: 61 Enter system length: 4 => System length is supercritical Solution is expected to be stable Enter number of time steps: 12000 Plasma Application Modeling Group POSTECH
  • 26. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: advect.m >> advect advect - Program to solve the advection equation using the various hyperbolic PDE schemes: FTCS, Lax, Lax-Wendorf Enter number of grid points: 50 Time for wave to move one grid spacing is 0.02 Enter time step: 0.002 Wave circles system in 500 steps Enter number of steps: 500 FTCS FTCS Plasma Application Modeling Group POSTECH
  • 27. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: advect.m >> advect advect - Program to solve the advection equation using the various hyperbolic PDE schemes: FTCS, Lax, Lax-Wendorf Enter number of grid points: 50 Time for wave to move one grid spacing is 0.02 Enter time step: 0.02 Wave circles system in 50 steps Enter number of steps: 50 Lax Lax Plasma Application Modeling Group POSTECH
  • 28. O.V. Manuilenko MATLAB The Language of Technical Computing MATLAB PDE Run: relax.m >> relax relax - Program to solve the Laplace equation using Jacobi, Gauss-Seidel and SOR methods on a square grid Enter number of grid points on a side: 50 Theoretical optimum omega = 1.88184 Enter desired omega: 1.8 Potential at y=L equals 1 Potential is zero on all other boundaries Desired fractional change = 0.0001 Plasma Application Modeling Group POSTECH