Pseudospectral method using FFT to solve diff equation

In summary, the pseudospectral method is a numerical technique for solving differential equations by representing the solution as a sum of basis functions and using the FFT to compute their coefficients. It works by discretizing the domain, using basis functions to approximate the solution, and then interpolating for a continuous solution. The method is advantageous for its high accuracy and efficiency, and can be applied to various types of differential equations. However, it may struggle with problems that have discontinuities or require a large number of grid points for high accuracy.
  • #1
John_Blacktower
1
0
Hello everyone, I'm trying to solve by FFT a convection diffusion eqaution on a 3 D box with an slit condition on z-axix and periodic conditions on x and y axis.
∂C/∂t=D∇[2]C-v⋅∇C (1)
v=vx + vy + vz
i have solved the velocity of fluid, i mean a really know what is the velocity of flow field.
But when i try to solve the eq. (1) i don't see the effect of the convection therm on my solution, this mean in the solution i only get a result like a pure diffusion problem. probably i have a wrong discretization scheme for convective term. but i don't nkow.
Please help me¡¡

now i show you what its my procedure:

1.
i perform a cranck nicholson scheme for eq. (1):
C[k+1]-1/2*DΔt(∇[2]C)[k +1]=C[k] +(1/2*DΔt(∇[2]C)-v⋅∇C)[2] (2)

2. Then i transform the convective term (a nonlinear term)
v⋅∇C=∇⋅(Cv)-C∇⋅v; ∇⋅v=0
∇⋅(Cv)→∇.ff=Cv

3. i apply FFT for the terms on x and y-axis on eq. (2)
C'[k+1]-1/2*DΔt(-k[2]C'+d[2]C'/dz[2])[k +1]=C'[k] +(1/2*DΔt(-k[2]+d[2]C'/dx[2])-(-ik*f' + df'z/dz))[2] (3)
where; k=norm(k); k=k1 +k2; f'= f'x + f'y; C'=∫C(x,y,z)exp(-i*(k)⋅(r))dxdy; r=x + y.
f'x=∫C(x,y,z)vx(x,y,z)exp(-i*(k)⋅(r))dxdy
f'y=∫C(x,y,z)vy(x,y,z)exp(-i*(k)⋅(r))dxdy
f'z=∫C(x,y,z)vz(x,y,z)exp(-i*(k)⋅(r))dxdy

4. then i apply a finite difference discretization on z axis
Ci'[k+1]-1/2*DΔt(-k[2]C'i+(C'i+1-2C'i+C'i-1)/(Δz*Δz))[k +1]=C'[k] +(1/2*DΔt((-k[2]C'i+(C'i+1-2C'i+C'i-1)/(Δz*Δz))-(-ik1*f'xi -ik2*f'yi + (f'zi-f'zi-1)/Δz))[2] (5)

5. then on matriz notation i have:
A[k+1]⋅b[k+1]=A[k]⋅b0[k] - bfx[k] - bfy[k]- C[k]⋅bfz[k] (6)

i have been solved but the solution is very similar to pure diffusion problem.

Thanks for your time and sorry for my bad english
 
Physics news on Phys.org
  • #2
.Hello,

Thank you for sharing your problem with us. It seems like you have a good understanding of the equations and have taken a rigorous approach in your solution procedure. However, there are a few things that I would like to point out which may help you in solving this problem.

Firstly, when you say that you have solved the velocity of the fluid, do you mean that you have obtained a numerical solution for the velocity field? If yes, then have you validated your solution with any experimental or analytical data? It is important to make sure that your velocity field is accurate before proceeding with the solution of the convection-diffusion equation.

Secondly, in your equation (2), you have a term (1/2*DΔt(∇[2]C)-v⋅∇C)[2] which is dependent on the concentration field C. This means that you are solving for C at two different time levels, which could lead to numerical instability. It would be better to use the same time level for both terms in this equation.

Thirdly, in equation (3), you have a term (-ik*f' + df'z/dz)[2] which is a Fourier transform of the convective term. This term should be multiplied by the concentration field C' and not just the velocity field f'. This could be one reason why you are not seeing the effect of the convection term in your solution.

Lastly, in equation (5), you are using a finite difference discretization in the z-direction. Have you considered using a spectral method in the z-direction as well? This could improve the accuracy of your solution.

I hope these suggestions will help you in solving your problem. Good luck!
 

1. What is the pseudospectral method?

The pseudospectral method is a numerical technique used to solve differential equations. It involves representing the solution to a differential equation as a sum of basis functions, and then using the Fast Fourier Transform (FFT) to compute the coefficients of these basis functions. This method is particularly useful for solving partial differential equations.

2. How does the pseudospectral method work?

The pseudospectral method works by first discretizing the domain into a set of grid points. These grid points are then used to approximate the solution using basis functions such as polynomials or trigonometric functions. The coefficients of these basis functions are then determined using the FFT, which allows for efficient computation of the solution at each grid point. The resulting solution is then interpolated to obtain a continuous solution over the entire domain.

3. What are the advantages of using the pseudospectral method?

One of the main advantages of the pseudospectral method is its high accuracy. By using a large number of grid points and high-order basis functions, the solution can be approximated with very small errors. Additionally, this method is also computationally efficient, as the FFT allows for fast computation of the solution at each grid point. It is also well-suited for problems with periodic boundary conditions.

4. What types of differential equations can the pseudospectral method solve?

The pseudospectral method is a general technique and can be applied to a wide range of differential equations, including ordinary differential equations (ODEs), partial differential equations (PDEs), and integro-differential equations. It is particularly effective for solving problems with smooth solutions and periodic boundary conditions.

5. Are there any limitations to the pseudospectral method?

While the pseudospectral method is a powerful technique, it does have some limitations. It is most effective for problems with smooth solutions, and may struggle with problems that have discontinuities or singularities. Additionally, the method requires a large number of grid points to achieve high accuracy, which can make it computationally expensive for certain problems.

Similar threads

  • Differential Equations
Replies
4
Views
2K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
11
Views
2K
  • Differential Equations
Replies
2
Views
2K
Replies
8
Views
2K
  • Differential Equations
Replies
1
Views
775
  • Differential Equations
Replies
2
Views
994
  • Differential Equations
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
497
  • Differential Equations
Replies
3
Views
2K
Back
Top