# Boundary conditions in the time evolution of Spectral Method in PDE

• A
In summary, the conversation discusses the struggle with using spectral methods to solve a heat equation in 2D. The individual is having trouble with implementing boundary conditions in the time-stepping process and is seeking advice and resources on how to do so. They mention using Chebyshev polynomials and suggest using homogenous spatial boundary conditions, but are unsure how to implement them. They also mention issues with the LaTeX formatting.

TL;DR Summary
I need some help to implement a boundary condition to a 1D heat equation when dealing with it using spectral expansion.
Hi everyone!

I am studying spectral methods to solve PDEs having in mind to solve a heat equation in 2D, but now i am struggling with the time evolution with boundary conditions even in 1D. For example,

$$u_t=k u_{xx},$$
$$u(t,-1)=\alpha,$$
$$u(t,1)=\beta,$$
$$u(0,x)=f(x),$$
$$u(t,x)=\sum^{N-1}_{n=0} a_n(t) T_{n}(x).$$

T(x) is for Chebyshev polynomials.

I can easily create through MMT or FFT the spectral expansion for u(0,x), including the boundaries, to initiate the time-stepping via the first equation as,

$$\sum^{N-1}_{n=0} \frac{da_n(t)}{dt} T_n(x)=\sum^{N-1}_{n=0} a^{(2)}_n(t) T_n(x).$$

which implies in

$$a_n(t+ \delta t)=k a_n(t)+a^{(2)}_n \delta t.$$

But the point is.. how do i use the boundary conditions in the time-step? I can't find it in the bibliography.

I think that the usual thing to do would be use the boundary conditions as

$$\sum^{N-1}_{n=0} a_n(t+\delta t) T_n(-1)=\sum^{N-1}_{n=0} a_n(t+\delta t)=\alpha,$$

$$\sum^{N-1}_{n=0} a_n(t+\delta t) T_n(1)=\sum^{N-1}_{n=0} a_n(t+\delta t)=\beta,$$

but I'm not sure how to implement it in the time-stepping... Any suggestions? I would love to know a book that deals with it!

PS: I had problems using the caption in the LaTeX, the idex runs for n instead of N and t_N should be T_n! I don't know why it became like this.

• Delta2
Summary:: I need some help to implement a boundary condition to a 1D heat equation when dealing with it using spectral expansion.

Hi everyone!

I am studying spectral methods to solve PDEs having in mind to solve a heat equation in 2D, but now i am struggling with the time evolution with boundary conditions even in 1D. For example,

$$u_t=k u_{xx},$$
$$u(t,-1)=\alpha,$$
$$u(t,1)=\beta,$$
$$u(0,x)=f(x),$$
$$u(t,x)=\sum^{N-1}_{n=0} a_n(t) T_{n}(x).$$

T(x) is for Chebyshev polynomials.

I can easily create through MMT or FFT the spectral expansion for u(0,x), including the boundaries, to initiate the time-stepping via the first equation as,

$$\sum^{N-1}_{n=0} \frac{da_n(t)}{dt} T_n(x)=\sum^{N-1}_{n=0} a^{(2)}_n(t) T_n(x).$$

which implies in

$$a_n(t+ \delta t)=k a_n(t)+a^{(2)}_n \delta t.$$

But the point is.. how do i use the boundary conditions in the time-step? I can't find it in the bibliography.

I think that the usual thing to do would be use the boundary conditions as

$$\sum^{N-1}_{n=0} a_n(t+\delta t) T_n(-1)=\sum^{N-1}_{n=0} a_n(t+\delta t)=\alpha,$$

$$\sum^{N-1}_{n=0} a_n(t+\delta t) T_n(1)=\sum^{N-1}_{n=0} a_n(t+\delta t)=\beta,$$

but I'm not sure how to implement it in the time-stepping... Any suggestions? I would love to know a book that deals with it!

PS: I had problems using the caption in the LaTeX, the idex runs for n instead of N and t_N should be T_n! I don't know why it became like this.
Just a thought, but typically you'd want to make the spatial BCs homogenous, such as adding a linear solution to your guess. Know what I'm talking about?