# Tag Info

10

The reason is that with the exception of linear problems, if you do a Fourier (or other) decomposition in time, you end up with a significant number of problems that are coupled globally in time. In other words, you have to solve lots of problems on the entire time interval concurrently. That will typically bust your computational or memory budget. The ...

10

I would not insist on demanding a geometrical meaning from Galerkin methods in general. There is a connection, but it becomes less meaningful as you extend it further and further. (In a sense, it would be better to call Galerkin methods "generalized projection methods".) To really understand the connection between collocation and Galerkin methods requires ...

8

I see several issues: The DFT computed with fft puts the zero mode at the beginning of the array, and if you want to compute the derivative, it is necessary to apply fftshift/ifftshift to the array N to make sure the derivative is correct. It is easy to see for yourself what the correct expression is by working it out with pen and paper, and see also the ...

7

Added after my initial answer: It appears to me now that the author of the referenced paper is giving condition numbers (apparently 2-norm condition numbers but possibly infinity-norm condition numbers) in the table while giving maximum absolute errors rather than norm relative errors or maximum elementwise relative errors (these are all different ...

6

For the how part referred to in the previous answer, conforming Quad or Hex mesh refinement is most likely going to use an algorithm based on the work of R. Schneiders' 2- and 3- refinement algorithms. These methods are used in mesh generation. Two papers that I happen to have that do adaptive conforming quad refinement are: "A new fast hybrid adaptive grid ...

6

For domains that are logically square or cubic (like your quadrilateral), you can use the tensor product (dimension-by-dimension) approach. That is, generate the 2D Gauss-Lobatto point matrix as the tensor product of your 1D Gauss-Lobatto point vectors. An example: if your 1D Gauss-Lobatto points are $(x_1,x_2)$, then in 2D you get the following four points:...

5

Let $w_k$ be the k-th column of W (the kth eigen-vector) and $v_k$ be the k-th element of v (the kth eigen-value). Then we can write: $$G = \sum_k w_k v_k w_k^T$$ which, element-wise, is equivalent to: $$G_{i,j} = \sum_k v_k w_{i,k} w_{j,k}$$ where the indices are column-major. Since we always get $w_k$ twice, an overall sign on a column of $W$ cancels. ...

5

I hope I understood the question correctly. They try to compute exactly the same thing, so they really are equivalent. I'll use Chebyshev polynomials because they are easy to analyze. Given a function $f(x)$ on $[-1,1]$, the spectral interpolant is the truncation of \begin{aligned} f(x) &= \sum_{n\geq0} \bar a_n T_n(x), \\ \bar a_n &= \frac{1+[n&... 5 "Spectral methods" usually means methods which make use of global basis functions. Fourier spectral methods use sine and cosine, and are used when you have periodic boundary conditions. Chebyshev methods use Chebyshev polynomials and are useful in non-periodic cases. These two methods are used in DNS, see e.g., hit3d which uses fourier and periodic bc, and ... 4 First, some notation for clarity. We're talking about solving u_{xx}=f(x). So u is the solution and f is the right hand side. What makes you think either of your solutions is or is not correct? To check your results, just compute two derivatives of your solution (using finite differences or FFT, either one) and compare with f. In your example, f ... 4 For something with a spectral flavor in time, look at deferred correction methods, starting with this paper. I would argue that they're not spectral in the usual sense of the word, but they give you a family of arbitrary-order Runge-Kutta methods, so if you think of "refining" by increasing the order (by adding more nodes), then the convergence can be ... 4 Chebyshev are orthogonal wrt to a weight function which is singular at the end-points. When you approximate a function f(x) with Chebyshev, the convergence of the approximations is not affected by the values of f or its derivatives at the end points. The convergence rate depends only on the smoothness of the function f and not on its boundary values. This is ... 4 "Get more RAM" may be one of your best options. :) Prices are reasonably low right now, and it's one of the best upgrades you can gift your computer anyway. 10k x 10k is borderline but still doable on modern computers: that matrix takes 10^4 \times 10^4 \times 8 bytes, that is, 760 MiB. On my laptop that code runs without problems. Another option is ... 3 The key steps are to consider the advection equation u_t + au_x = 0 where a=\omega/k is the advection speed. Exact solutions to this equation is of the form u(x,t) = f(x-at), where f(y) is an arbitrary function. For example, discretize using a standard Galerkin method we derive the weak form \int_\Omega v u_t dx + \int_\Omega a u_x = 0 Assuming ... 3 One approach to acceleration would go as follows: Assume that A^t=A(u^t) is the matrix you try to solve with, i.e., you are looking to solve the linear systems A^t x^t = b^t. $$Let me assume for a moment that f^t \ge 0, then A^t is a symmetric and positive definite matrix. (If my assumption should be wrong, then it is still symmetric but may no ... 3 1) One usually chooses one or two representative wall-normal distances and presents the spectra for <u'u'>, <v'v'>, etc. over the homogeneous directions. For example, see Figure 11 within Spalart 1988 (http://dx.doi.org/10.1017/s0022112088000345). 2) By "scale" do you mean a lengthscale? If so, a lengthscale quantifying what aspect of the flow?... 3 The paper [1] gives an explicit construction of the Bernstein form of a set of orthogonal polynomials on simplices based on Legendre polynomials. [1] Farouki, R.T., Goodman, T.N.T and Sauer, T: Construction of orthogonal bases for polynomials in Bernstein form on triangular and simplex domains, Computer Aided Geometric Design 20 (2003), 209-230, DOI: 10.... 3 Ah, I have realized the answer to my own question: It is important to recognize that the initial data v_0,...,v_N is not stored on a uniform grid, but rather at the Chebyshev points$$ x_j = \cos\frac{\pi j}{N},\qquad j=0,...,N.Now as long as the initial data has a decent polynomial interpolation, then \begin{align} v_j = p(x_j) &= a_0 + a_1x_j + \... 3 For incompressible spectral DNS, often you'll see reference to John Kim, Parviz Moin and Robert Moser (1987): Turbulence statistics in fully developed channel flow at low Reynolds number, Journal of Fluid Mechanics, 177, pp 133-166, which includes details on how continuity is enforced. You might also find the book Spectral Methods in Fluid Dynamics by ... 3 I'm assuming that you know how Chebyshev collocation methods work (but if not, let me know and I'll explain a bit more); a good introduction is Nick Trefethen's Spectral Methods in Matlab as well as his Approximation Theory and Approximation Practice (in particular Chapter 21). (But note that this code does Legendre collocation, not Chebyshev collocation!) ... 3 This is probably too late to help you, but here is a compact code that will do points, weights and first derivatives for Gauss, Lobatto or either Radau. function [x,w,A] = OCnonsymGLReig(n,meth) % code for nonsymmetric orthogonal collocation applications on 0 < x < 1 % n - interior points % meth = 1,2,3,4 for Gauss, Lobatto, Radau (right), ... 3 It's hard to tell from your phrasing and because your link is broken, but are your boundary conditions periodic or not? If the problem is periodic, then spectral methods are the way to go since Fourier series (and their discrete coutnerparts) converge much faster for periodic functions than for more general functions. For a 1-D problem like this, a ... 2 I think Rob Kirby told me once that he had written something on using Bernstein polynomials for FEM. Take a look at his web site at Texas Tech (or now at Baylor). 2 Goofy question, are you dealiasing in some fashion or is it unnecessary in your setup? The issue sounds convective in some sense otherwise I'd expect your diffusion dominated limit to misbehave. If not, you might see if using the skew-adjoint form of the convective operator improves things somewhat (see https://github.com/RhysU/suzerain/blob/master/... 2 In the comments you mentioned that f has a very special form. Let u:[a,b]\rightarrow \mathbb{R}. Then f:[a,b]\rightarrow\{0,1\} is defined for some set S \subset [a,b] as follows:f(x) = \begin{cases} 1 & \text{if $x \in S$,} \\ 0 & \text{otherwise.} \end{cases}$$As Bill Barth mentioned, you can now split the matrix A into two parts as$$...

2

You are correct that the $k=0$ mode corresponds to the mean (volume averaged) velocity in the domain. Because the equations for Stokes flow are Galilean invariant they are undetermined up to a constant (the mean flow). Usually this ambiguity is resolved by the boundary conditions, but purely periodic boundary conditions offer no such resolution. Instead, you ...

2

If you want to use nonperiodic boundary conditions, you could change the Fourier basis in the $y$-direction for your spectral method to a Chebyshev basis. Fast Chebyshev Transforms make use of Fast Fourier Transforms; both are linear transformations on function spaces, so switching between the two amounts to a change of basis, and you can reuse significant ...

2

This is more of a comment, but I believe the more common name for this is "positive trigonometric polynomial", so this book might be helpful. One approach (http://www.mit.edu/~parrilo/cdc03_workshop/Vandenberghe.pdf) is to use the result that the polynomial $$x(t) = r_0 + 2r_1\cos t + \cdots + 2r_n \cos nt$$ is nonnegative if and only if there is an $(n+1)... 2 Frequently some sort of velocity-pressure splitting is employed which gives a step in the method where the velocity and pressure are coupled directly. 2 What you are thinking of is something that uses the structure of the augmented matrix to make solution of the system simpler. For example, one could be tempted to think of forming the Schur complement with regard to the bottom right$2\times 2\$ block of the rewritten system. But I don't think anything like this exists. If it would, then you would have ...

Only top voted, non community-wiki answers of a minimum length are eligible