Boundary Conditions / Hard Walls #272
Replies: 3 comments
-
Yes, you can set-up the problem with Dirichlet/Neumann boundary conditions, but you need to use the sine or cosine transform to maintain a O(N log N) complexity. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tip @astanziola but I can't access the reference behind the paywall. Do you have a copy? |
Beta Was this translation helpful? Give feedback.
-
Just to add to @astanziola's comment: if your problem is symmetric / anti-symmetric about the boundary you can use a sin/cos transform with spectral accuracy. If not, you can still solve the problem but only with second-order accuracy. It depends on the PDE you're trying to solve. We don't plan the appropriate cosine transform when building our grids so you've got to figure out the appropriate FFTW transform type and its wave numbers to use it. So there's a bit of bookkeeping to figure out, but it's definitely possible and the functionality is there in FFTW. It could be nice to either automatically or selectively plan the correct cosine transform when building grids so people don't have to re-figure this out in the future. But we'd have to design a sensible interface as well. As for references, I think Boyd might have what you need: https://depts.washington.edu/ph506/Boyd.pdf Though it's a giant tome and I'm not sure the right page to point you to. |
Beta Was this translation helpful? Give feedback.
-
Hi! I know that FourierFlows.jl right now is mostly set up for periodic boundary conditions. Is it possible that something in a similar vein could be set-up for Dirichlet boundary conditions? Or are the periodic boundary conditions a necessary result of using FFTW?
Just wanted to know, haha.
Beta Was this translation helpful? Give feedback.
All reactions