# How one can simulate a system given by differential equation?

I want to simulate a diffusion environment given by the differential equation $$\frac{\partial u(x,y,t)}{\partial t}=D\left(\frac{\partial^2 u(x,y,t)}{\partial x^2}+\frac{\partial^2 u(x,y,t)}{\partial y^2}\right),$$ in a constrained environment with reflecting and absorbing boundaries and certain initial conditions. I know it may be done with the help of particle simulation method. But I want to know is there a way, in general, to obtain numerically the concentration profile $$u(x,y,t)$$ by using directly the differential equations?

I am actually trying to verify some of the ambiguities. I have used the particle simulation method to verify obtained PDF (normalized concentration profile for my case) but it gives me different results and I am not sure whether particle simulation method is correct to validate the obtained result?

• Yes, there are several methods to obtain the solution numerically. – nicoguaro Aug 17 at 16:32
• @nicoguaro Can you suggest a reference where I can get these methods? – Userhanu Aug 17 at 18:33
• What have you already tried? You are trying to numerically solve a partial differential equation. Googling for this expression would be a good start :-) – Wolfgang Bangerth Aug 17 at 23:10
• I would suggest: Langtangen, Hans Petter, and Svein Linge. Finite difference computing with PDEs: a modern software approach. Vol. 16. Springer, 2017. – nicoguaro Aug 30 at 12:42