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

FPDE presentation
FPDE presentationFPDE presentation
FPDE presentationDivyansh Verma
 
Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsMeenakshisundaram N
 
Secant method
Secant methodSecant method
Secant methodZahra Saman
 
Numerical differentiation integration
Numerical differentiation integrationNumerical differentiation integration
Numerical differentiation integrationTarun Gehlot
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12Yasser Ahmed
 
Bisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysisBisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysisHamza Nawaz
 
Quadratic programming (Tool of optimization)
Quadratic programming (Tool of optimization)Quadratic programming (Tool of optimization)
Quadratic programming (Tool of optimization)VARUN KUMAR
 
Fourier series 1
Fourier series 1Fourier series 1
Fourier series 1Dr. Nirav Vyas
 
Interpolation with Finite differences
Interpolation with Finite differencesInterpolation with Finite differences
Interpolation with Finite differencesDr. Nirav Vyas
 
1575 numerical differentiation and integration
1575 numerical differentiation and integration1575 numerical differentiation and integration
1575 numerical differentiation and integrationDr Fereidoun Dejahang
 
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJAPPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJZuhair Bin Jawaid
 
numerical methods
numerical methodsnumerical methods
numerical methodsHaiderParekh1
 
Numerical
NumericalNumerical
Numerical1821986
 
Euler and improved euler method
Euler and improved euler methodEuler and improved euler method
Euler and improved euler methodSohaib Butt
 
Secant Method
Secant MethodSecant Method
Secant MethodAfraz Khan
 

What's hot (20)

FPDE presentation
FPDE presentationFPDE presentation
FPDE presentation
 
Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential Equations
 
Secant method
Secant methodSecant method
Secant method
 
Numerical differentiation integration
Numerical differentiation integrationNumerical differentiation integration
Numerical differentiation integration
 
Finite difference Matlab Code
Finite difference Matlab CodeFinite difference Matlab Code
Finite difference Matlab Code
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12
 
Bisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysisBisection theorem proof and convergence analysis
Bisection theorem proof and convergence analysis
 
Laplace Transform
Laplace TransformLaplace Transform
Laplace Transform
 
Quadratic programming (Tool of optimization)
Quadratic programming (Tool of optimization)Quadratic programming (Tool of optimization)
Quadratic programming (Tool of optimization)
 
Fourier series 1
Fourier series 1Fourier series 1
Fourier series 1
 
Interpolation with Finite differences
Interpolation with Finite differencesInterpolation with Finite differences
Interpolation with Finite differences
 
Interpolation
InterpolationInterpolation
Interpolation
 
The wave equation
The wave equationThe wave equation
The wave equation
 
Finite Difference Method
Finite Difference MethodFinite Difference Method
Finite Difference Method
 
1575 numerical differentiation and integration
1575 numerical differentiation and integration1575 numerical differentiation and integration
1575 numerical differentiation and integration
 
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJAPPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
 
numerical methods
numerical methodsnumerical methods
numerical methods
 
Numerical
NumericalNumerical
Numerical
 
Euler and improved euler method
Euler and improved euler methodEuler and improved euler method
Euler and improved euler method
 
Secant Method
Secant MethodSecant Method
Secant Method
 

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

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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 ...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

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