|
[Sponsors] |
January 19, 2005, 17:50 |
Derivation by spectral method
|
#1 |
Guest
Posts: n/a
|
I want to evaluate the derivative of a function f=f(x) periodical, by a spectral method. Let's say
(1) f(j)=1/N*SUM(with k=from 1 to N) ( Ck*exp(-i*2pi*(k-1)*(j-1)/N ) where j= index of point N= number of points k is the wave number f is the fundamental frequency N is the number of points Ck are the spectral coefficients The (1) is the Discrete Fourier decomposition. Now, I calculate the Ck coefficients by the inverse trasformation and I can use the (1) to re-build my function. At the same time I can use the Ck to calculate the derivative of the expression (1), which should be: (2) df(j)=1/N*SUM(with k=from 1 to N) (-i*2*pi*(k-1)*Ck/(N*DX))*exp(-i*2pi*(k-1)*(j-1)/N ) where DX is the sample. What happens to me is that The re-built function is correct, but not the derivative! Do you have any hint? |
|
February 1, 2005, 23:39 |
Re: Derivation by spectral method
|
#2 |
Guest
Posts: n/a
|
Looks like you're trying to take the derivative with respect to x, where x_j = (j-1)/N. So, you are adding an unneeded factor 1/N*DX in your derivative.
Also, shouldn't you be using negative k values as well, like k=-N/2,...,N/2-1 ? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Vortex method vs Spectral synthesizer for LES | HS | FLUENT | 1 | February 14, 2017 03:46 |
Spectral (finite) volume method | Max | Main CFD Forum | 1 | April 13, 2006 12:11 |
some thing about the spectral method | ztdep | Main CFD Forum | 3 | February 16, 2006 15:44 |
comments on FDM, FEM, FVM, SM, SEM, DSEM, BEM | kenn | Main CFD Forum | 2 | July 18, 2004 19:28 |
Spectral Method Boundary condition | Deepak | Main CFD Forum | 1 | February 25, 2004 10:48 |