# Questions tagged [spectral-method]

The tag has no usage guidance.

62 questions
Filter by
Sorted by
Tagged with
625 views

### Difficulty with Spectral Method using Chebyshev Polynomials

I am having a bit of difficulty in trying to understand a paper. The paper uses spectral method to solve for an eigenvalue that comes from a system of coupled ODEs. I will write out only one equation ...
640 views

### Why can ill-conditioned linear systems be solved precisely?

According to the answer here, large condition number (for linear system solving) decreases the guaranteed number of correct digits in the floating point solution. Higher order differentiation matrices ...
612 views

### Boundary conditions Chebyshev differentiation

I was wondering if anyone has any experience dealing with boundaries when implementing chebyshev differentiation. I am currently trying to implement a no slip boundary condition to solve the ...
283 views

### Spectral Methods in time

I was reading up on Spectral Methods for PDEs. In all the descriptions I read, while the position component is approximated via a Fourier series or other methods, the time component is still ...
852 views

### Conforming mesh refinement for quads/hex elements

The context - I'm working with a spectral FE (higher order interpolation at GLL nodes) code on conforming hexahedral meshes, and our PI is interested in improving mesh quality, possibly with adaptive ...
208 views

### Enforcing non-negative constraint in fourier-spectral method

I have a PDE optimization problem, and a scalar field (which I am optimizing over) is supposed to be nonnegative everywhere in the domain. Since I am working in Fourier space for solving this problem ...
617 views

### Stochastic Galerkin projection approach for using generalized polynomial chaos expansion (GPCE) in solving PDE

I want to know if there is any way to define the test and trial function in the way that I want instead of using the default functions. So if I want define the polynomial and basis and coefficient, ...
2k views

198 views

### Choosing good basis functions to approximate a Lipschitz function

Let $D = \left\{0, t_1, t_2, \ldots, t_n\right\} \times [0,1]$ and $$f: D\to [0,1],$$ be a function of time and a one-dimensional space. There is no analytical formula for $f$, but $f(t_i, \cdot)$ ...
711 views

### Numerically computing the advection equation

I am trying to write a program to compute the advection equation. $$u_t +u_x = 0$$ I use the spectral method for the spatial derivative $u_x$ and the leapfrog method for the time derivative $u_t$. ...
747 views

### How can i get gauss-lobatto points on a quadrilateral?

How can I get Gauss-Lobatto points on a quadrilateral or a triangle in $x$-$y$ plane? I am only getting abscissa coordinates and weights by solving Lobatto polynomials using Lobatto quadrature. ...
581 views

### Spectral methods, Spectral Volume methods, Spectral Difference methods

Could someone explain the link (if any) between the spectral methods (SM), as presented for example here and the so called spectral volume methods (SV) and spectral difference methods (SD) for CFD ? ...
120 views

### build a simple incompressible solver with spectral method

I am trying to build a simple solver for the incompressible fluid in a periodic box to learn the spectral method. I am following the textbook (Peyret R. Spectral methods for incompressible viscous ...
125 views

Let's say I am solving a simple Poisson problem using a Mixed (DG) finite element method. If we use orthogonal polynomials as basis functions we can write the finite-dimensional linear system as $$... 1answer 418 views ### 2d pseudo-spectral turbulence simulation with random initial velocities I am trying to write a 2d pseudo-spectral DNS code with random initial velocities. This is kind of a classic simulation where the very tiny vortices group together forming larger and larger vortices ... 1answer 121 views ### Trignometric/Fourier spectral collocation with zero Dirichlet BC in 2D I am concerned with numerical solution to the following problem on [0,1]\times[0,1]. \dfrac{\partial\theta}{\partial t}+u(x,t).\nabla \theta(x,t)=\kappa \nabla^2\theta(t,x) with Dirichlet ... 1answer 813 views ### Partial derivatives of a 3D array in Matlab I'm interested in taking some partial derivatives of a 3 dimensional array in Matlab - say A(i,j,k) approximates f(x_i,y_j,z_k). I need to approximate things like \partial_{xy}f, \partial_{yz}... 1answer 86 views ### How to compute all the eigenvalues of a large sparse matrix using matlab? In matlab, there are 2 commands named "eig" for full matrices and "eigs" for sparse matrices to compute eigenvalues of a matrix. And eig(A) computes all the eigenvalues of a full matrix and eigs(A) ... 3answers 582 views ### Solve diffusion equation with linear source term I would like to solve numerically the diffusion equation, where the sink term depends linearly on the field, and there is field-independent sink: \frac{\partial^2 u(x)}{\partial x^2} =f(x)u(x) - \... 1answer 69 views ### How to choose between compact finite differences and spectral methods For a project in my advanced numerical method class I have to solve the 1D Kuramoto-Sivashinsky equation.$$ u_t + u u_x + \lambda u_{xx} + \eta u_{xxxx} = 0. $$As explained here I will solve it ... 1answer 312 views ### Solve steady state reaction-diffusion/Helmholtz equation numerically I am solving a problem of the form: \dfrac{\partial u(x,y,t)}{\partial t} = \nabla^2 u(x,y,t) - f(x,y,t)u(x,y,t) - \kappa(x,y,t) At the moment, I am solving this at each time step by assuming a ... 2answers 1k views ### Computing Kolmogorov/Energy spectrum for turbulent boundary layer Previously, I have calculated energy spectrum for 3D DNS data obtained for isotropic turbulence which is equally spaced in all three directions and then to compute the energy spectrum, one performs ... 1answer 46 views ### Dealing with boundary conditions using Fourier spectral methods I am currently working on a project where I need to use Fourier spectral methods to solve the KS equation. I found this code which is using the Fourier spectral methods to solve the classic 1D heat ... 2answers 133 views ### How is the dense system usually dealt with in spectral method? Unlike finite element (FEM) or finite difference methods (FDM), where the original PDE is transformed into a sparse linear system, spectral methods return a dense linear system. For a large system, it'... 1answer 372 views ### Chebyshev spectral differentiation matrix for mapped domain This is a follow up to this question. I have mapped from Chebyshev space to the physical space using the mapping x = ((1-w)\xi^3 - x_p\xi^2 + w\xi + x_p + 1 )*(L/2). When in Chebyshev space I have ... 1answer 88 views ### Average value divergence in spectral method for Poisson equation I'd like to know how to deal with a divergence when trying to solve the Poisson equation for electrostatics with a simple spectral method. I'm not sure how to best state my problem, so I'll explain ... 0answers 77 views ### Solve a PDE BVP with Spectral methods in time and space? I have a PDE (coming from a Bellman equation with z under brownian motion). Let z \in [0,\infty) and t \in [0,T]. To sketch the equation:$$ (r - g(t)) v(t,z) = \pi(t,z) + (\gamma - g(t))v_z(...
I'm trying to solve the following equation $$u_t = u_{xx} + u(1-u^2), u_x(\pm 1) = 0,$$ using the Fourier cosine transform. The nonlinear term gives a convolution which I would rather avoid, which is ...