# Solving a generalized eigenvalue problem with Chebyshev spectral method: How to impose boundary conditions into the matrices?

I'm solving a local instability problem for a pipe Poiseuille flow. The coordinate system is columnar, i.e., ($$r,\theta,x$$) (radial, tangential and axial). The basic flow is $$\bar{u_r}=0, \bar{u_\theta}=0$$ and $$\bar{u_x}=1-r^2, r\in[0,1]$$. After putting the perturbation function into the N-S equation, the generalized EVP is obtained (Eq. (3-20) in Fig. 1). The eigenvalue needed to be solved is $$\omega$$. The matrices $$\boldsymbol{A}$$ and $$\boldsymbol{B}$$ are generated by Chebyshev collocation points. The spatial position is $$r$$ and mapped by the standard Chebyshev points. Now I need to use the boundary conditions in Eq. (3-28) to modify the matrices $$\boldsymbol{A}$$ and $$\boldsymbol{B}$$ ($$m=1$$), how do I operate this process?

I think it is easy to operate Dirichlet BC, but Neumann and Robin BCs are difficult for me to operate.

Consider first the situation in 1D: You have N points for with conditions from the eigenvalue equation and two boundary conditions, which makes N+2 conditions in total. Yet, there are only N degrees of freedom, which are given by the expansion coefficents of the collocation functions. This makes an overdetermined system which can't be solved in general.

In order to make the system solvable, there are basically two strategies: either drop two conditions completely (--usually not the BCs), or use some kind of weighting scheme such as least squares. The former satisfies the N selected constraints exactly, while the latter tries to satisfy all constraints in an approximate fashion.

You asked for the former scheme. For this, one faces the problem how to distribute the N constraints to the N points. Dirichlet condition at a given collocation point are handled quite naturally by simply fixing the value at this point, even more so for zero Dirichlet conditions (which allow to completely remove the corresponding collocation function from the basis expansion).

For more general conditions, e.g. Dirichlet between points, Neumann or Robin conditions, The selection of the degree of freedom which should handle the BC is not that straightforward. Thus, you can either choose aby point (usually the boundary point), or you apply a more clever scheme such as rectangular spectral collocation by Driscoll and Hale. The latter basically applies a projection down to the space of polynomial function of degree N-2, wgich gives the freedom to add the two BCs without runnimg into an overdetermined system. Rectangular spectral collocation also was shown to behave more consistently and better conditioned. I'd suggest you have a look at the original paper and try to apply it to your problem. Nothing more concrete, sorry, as it will be a bit of fiddling.

EDIT: the problem will then boil down to mapping the cartesian product grid of total size N down to a grid of N-2. That's conceptually easy in 1D, but in 3D it's again a cpmplex step...

• For me now that it is not very complicated to address the 1D problem (local flow linear instability analysis, specifically) by Chebyshev spectral method. It should be noted that on the boundary the process is complicated because only a part of the function values can be obtained, such as only the streamwise velocity (the whole function has all velocity directions and pressure item). With Chebyshev derivative matrix (1st and 2nd order), I can solve the 1D EVP easily and the process is clear. But it is really difficult to operate the matrices $A$ and $B$ in 2D BiGlobal LSA problem.
– Jack
Apr 4, 2022 at 5:09

What @davidhigh is referring to is the Chebyshev--Tau method (as far as I can tell). The idea is easy to state in plain words: "Drop interior degrees of freedom to make room for enforcing boundary conditions". In practice, some care must be taken. A Google search pops up all kinds of resources. In particular, I am fond of this paper.

• I have solved some simple examples in the paper of ntrs.nasa.gov/citations/19890047287. Now I am trying to address a 2D problem in the paper of doi.org/10.1017/S002211200400850X. The main processing method is referred that in the paper of dx.doi.org/10.2514/1.42714. Dirichlet BCs are easy to be implemented in the whole matrices A and B, but the complicated BC of the pressure gradient item is difficult to operate. In the 1D problem it might be easy. But I donot understand how to implement it in a 2D or even 3D problem.
– Jack
Apr 4, 2022 at 5:15
• @Jack form the appropriate matrix in each of the coordinate directions, then assemble the global matrix as the tensor product of the direction-specific matrices.
– user20857
Apr 4, 2022 at 13:14