1

I want to solve Navier-Stokes eq with Dirichlet boundaries using a pseudospectral method.

All of the references I encountered used Chebychev transform to do this. But why can’t you use sine transform?

user1048419
  • 41
  • 1
  • 3

1 Answers1

1

You can use the sine transform, but you should note that the two are different things.

One uses the Chebyshev pseudospectral method for general boundary conditions, and the Fourier pseudospectral method for periodic boundary conditions. The Chebyshev basically works on a "line segment", while the Fourier works on a "ring".

When you're using the sine transform, you're basically doing a more efficient Fourier transformation (by a factor of two) by restricting the Fourier basis only to sine basis functions. And by this, yes, you'll get the value of zero at the boundaries.

However, the Dirichlet boundary conditions will lead to a reflection of the outgoing waves, whereas the sine basis functions will pass thru the boundary (the momentum is conserved).

Which one is better suited depends on your application, but you can do both.

davidhigh
  • 3,127
  • 14
  • 15
  • 1
    Thanks for your answer! Good to know that sine transform does work.

    But why doesn't a sine transform accommodate a reflection? The exact solution of a wave equation with Dirichlet boundary conditions is a combination of sine functions. Shouldn't there be a reflection with a sine transform?

    – user1048419 Mar 11 '22 at 03:03
  • 1
    That's a good question, but again, let's not confuse things. in your case, the PBC with zero condition on the endpoint happens to coincide with the Dirichlet condition "zero at both endpoints", so they'll lead to the same "exact solution" -- which is usually a time-independent consideration. But the Fourier/Sine transform doesn't even know a "boundary" -- it's just that you impose the solution to be zero at one point on a ring. In consequence, it also evaluates derivatives differently, and connects information from the "left and right boundary points" -- but again, there is no boundary at all. – davidhigh Mar 11 '22 at 09:20
  • Ah! This makes perfect sense! – user1048419 Mar 12 '22 at 05:37
  • Moreover, the two approaches are only identical because the physical problem supports it. In your case it's because of parity symmetry, which leads to the fact that the solution at the "left boundary" is the same as the one at the "right boundary". But one can easily come up with non-symmetric problems, and then the two approaches will differ. – davidhigh Mar 12 '22 at 12:39