====== Numerical solutions of PDE ====== In general, the numerical solutions of partial differential equations are obtained by standard methods developped and implemented in specialized softwares : * Finite element method * Finite volume method * Boundary element method * Spectral method * Multigrid methods * ... These methods often make use of variational principles. * [[wp>Numerical_partial_differential_equations|Numerical partial differential equations]] However, the [[wp>Finite_difference_method|finite difference method]] can be more easliy applied to a lot of classical PDE. In this method, functions are represented by their values at certain grid points and derivatives are approximated through differences in these values. One of the most usual problems concern the chemical and thermal diffusion problem, in either steady and unsteady conditions, for which same equations apply. The [[wp>Heat_equation|heat equation]] is a parabolic partial differential equation that describes the distribution of heat (or variation in temperature) in a given region over time : $$\frac{\partial T}{\partial t} = \kappa\left(\frac{\partial^2T}{\partial x^2}+\frac{\partial^2T}{\partial y^2}+\frac{\partial^2T}{\partial z^2}\right)$$ * Dimensional analysis, dimensionless numbers,... * Space discretization * second-order central finite differences, first and second derivatives * Time discretization, Euler approximation, explicit and implicit schemes * Laplace equation (elliptic partial differential equation) * Heat equation (parabolic partial differential equation) * Error propagation, explicit //vs// implicit schemes, semi-implicit methods,and their correspondant time complexity ===== Applications ===== * Heat diffusion, in stationary, unsteady conditions, with heat source (or sink), and various geometry * Chemical diffusion * Heat and chemical diffusion in heterogeneous media * ion exchange chromatography ===== References ===== * Finite Volume Method (another numerical method) * [[https://levelup.gitconnected.com/create-your-own-finite-volume-fluid-simulation-with-python-8f9eab0b8305|Create Your Own Finite Volume Fluid Simulation (With Python)]] Philip Mocz, Medium, 01/10/2020 * [[https://rjallain.medium.com/modeling-a-wave-on-a-string-with-the-finite-difference-method-in-python-75acad3228a5|Modeling a Wave on a String With the Finite Difference Method in Python]] Allain Rhett, 16/03/2022