CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   analytic solution 2D only diffusion (https://www.cfd-online.com/Forums/main/98031-analytic-solution-2d-only-diffusion.html)

 diedro March 1, 2012 13:08

analytic solution 2D only diffusion

hi every one,

I have 2D diffusion equation.

Are there any analitic solution for bidimensional diffusion equation?

The initial intial conditon has not to be puntual

thanks a lot

 mazhar March 2, 2012 19:15

You got to explain it a litle more. You can find series solution.

 praveen March 2, 2012 22:09

You can cook up many examples by separation of variables. Here is one in the unit square (0,1) x (0,1)

u_t = u_xx + u_yy

Code:

```function ue = exact_solution(t) global X Y ue = exp(-2*4*pi^2*t)  * sin(2*pi*X) .* sin(2*pi*Y) ...   + exp(-2*16*pi^2*t) * sin(4*pi*X) .* sin(4*pi*Y);```
Put t=0 to get initial condition. Boundary condition is zero.

 naffrancois March 3, 2012 08:40

Hello !

If you have the possibility to add source terms to you discretized equations, then you can generate infinite exact solutions.

You choose an arbitrary solution that you inject into the PDE, then you add the extra terms to balance the equations into you solver. Choose analytic functions infinitely differentiable and which derivatives do not vanish (to maintain all terms in the truncation error) like trigo functions. Then put Dirichlet conditions from the exact solution and you'll be able to test your code (except the BC of course)

Tou can look for the Method of Manufactured Solutions for more details.

Good luck !
François

 All times are GMT -4. The time now is 07:55.