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

application of differential equations
application of differential equationsapplication of differential equations
application of differential equationsVenkata.Manish Reddy
 
Fourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 lFourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 lPepa Vidosa Serradilla
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference methodPrateek Jha
 
Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...
Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...
Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...IOSR Journals
 
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJAPPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJZuhair Bin Jawaid
 
Transmission Lines Part 2 (TL Formulas).pptx
Transmission Lines Part 2 (TL Formulas).pptxTransmission Lines Part 2 (TL Formulas).pptx
Transmission Lines Part 2 (TL Formulas).pptxPawanKumar391848
 
A Review Article on Fixed Point Theory and Its Application
A Review Article on Fixed Point Theory and Its ApplicationA Review Article on Fixed Point Theory and Its Application
A Review Article on Fixed Point Theory and Its Applicationijtsrd
 
Euler's Method
Euler's MethodEuler's Method
Euler's Methoddmidgette
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve Mukuldev Khunte
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12Yasser Ahmed
 

What's hot (20)

application of differential equations
application of differential equationsapplication of differential equations
application of differential equations
 
Bisection method
Bisection methodBisection method
Bisection method
 
Fourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 lFourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 l
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
 
Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...
Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...
Numerical Solution for Two Dimensional Laplace Equation with Dirichlet Bounda...
 
Euler and runge kutta method
Euler and runge kutta methodEuler and runge kutta method
Euler and runge kutta method
 
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJAPPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
APPLICATIONS OF DIFFERENTIAL EQUATIONS-ZBJ
 
Transmission Lines Part 2 (TL Formulas).pptx
Transmission Lines Part 2 (TL Formulas).pptxTransmission Lines Part 2 (TL Formulas).pptx
Transmission Lines Part 2 (TL Formulas).pptx
 
The wave equation
The wave equationThe wave equation
The wave equation
 
VECTOR ANALYSIS-1
VECTOR ANALYSIS-1VECTOR ANALYSIS-1
VECTOR ANALYSIS-1
 
Numerical Methods 1
Numerical Methods 1Numerical Methods 1
Numerical Methods 1
 
A Review Article on Fixed Point Theory and Its Application
A Review Article on Fixed Point Theory and Its ApplicationA Review Article on Fixed Point Theory and Its Application
A Review Article on Fixed Point Theory and Its Application
 
Intro
IntroIntro
Intro
 
landau-zener-tunneling
landau-zener-tunnelinglandau-zener-tunneling
landau-zener-tunneling
 
Numerical method
Numerical methodNumerical method
Numerical method
 
Euler's Method
Euler's MethodEuler's Method
Euler's Method
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Inverse laplace transforms
Inverse laplace transformsInverse laplace transforms
Inverse laplace transforms
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12
 

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

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

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