Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Camilo_P_
Beginner
112 Views

Problems with 2D poisson solver and periodic conditions

Hello, 

I am coding a fluid solver in the Vorticity-Potential formulation. I need to solve a poisson equation for the stream function. I was trying to use MKL's. In my problem, I have Dirichlet BCs in the y walls and periodic in the x walls. When I solve the poisson equation with the MKL solver I get wrong results at the corners, but when I solve it using SOR I get the correct results.

 I know that I am using the solver appropiately because I have tested it with other functions and I have gotten correct results.

I can see  from the results that the periodicity is not being enforced when MKL is used. 

I am using Intel Visual Fortran XE 2011 Update 10. I have attached the code, I use the variable useMKL to switch between MKL solver and SOR. It would be great if I can use MKL's as I need to move to a 3D implementation and the SOR method will be very slow then. 

If more information is needed let me know. Thanks in advance,

Camilo

 

 

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
112 Views

Will the s_Helmholtz_2D_f.f90 help you to understand how to solve 2d Helmholtz problem with BC properly by using MKL Poisson? You may find out this example from s_Helmholtz_2D_f.f90  <mklroot>/examples/pdepoissonf/source directory.

Camilo_P_
Beginner
112 Views

I found my error, in line 205 it read:

do ix=2,nx

it should have read

do ix=1,nx+1

It works perfect now. 

 

112 Views

Hello Sir,

  Can you please explain me how to solve a diffusion equation using the mkl poisson solver with periodic in X and Y and neumann in Z ? i am very new in this field and the exact algorithm is not clear to me.

Thanks,

Swagnik

Reply