I was trying to implement the algorithm from the paper "Adapting a Fourier pseudospectral method to Dirichlet boundary conditions for Rayleigh–Benard convection".

I am having a hard time to understand the way the boundary conditions are imposed.

The author rewrites the no-slip (on upper and lower boundaries) boundary conditions as

$$ \sum_{q} \tilde f_{\bot,pq} = 0 \forall p$$

where $p$ and $q$ are horizontal and vertical wavenumbers.

How do we impose that?


I am not an expert in the field but using DCT's (or DST's) is the standard way to impose Dirichlet (or Neumann) boundary conditions using FFT's.

It is nicely explained in the documentation of the FFTW package


I hope it helps.

  • $\begingroup$ Thanks Mr. Gillis for answering. I am aware of those methods that you mentioned. But my question was specific to the paper that I mentioned. The author in the paper gave an algorithm for applying fourier method to RBC but the way he reformulated the no-slip boundary condition in fourier domain (i.e $\sum_{q} \tilde{f}_{\bot,pq} = 0 \forall p$ ) even though makes sense, but I could not understand how would it be imposed in the code. $\endgroup$ – user162281 Apr 15 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.