Applied Numerical Mathematics 33 (2000) 161–166
Numerical modeling in Chebyshev collocation methods applied to stability analysis of convection problems H. Herrero a,∗ , A.M. Mancho b a Departamento de Matemáticas, Facultad de CC. Químicas, Universidad de Castilla-La Mancha, 13071 Ciudad Real, Spain b Departamento de Física y Matemática Aplicada, Facultad de Ciencias, Universidad de Navarra, 31080 Pamplona, Spain
Abstract An example of a high order method (Chebyshev collocation) applied to the study of a bifurcation problem in three dimensions is presented. The non-linear basic equations are solved by an iterative technique. The first contribution to the solution is obtained using a low-order finite difference scheme while corrective terms are obtained through collocation. The bifurcation thresholds are calculated through the perturbation equations. We study the convergence of the collocation method comparing different expansions. The polynomials and their derivatives have been evaluated a priori at the collocation points instead of using the differentiation operators on those points. This procedure simplifies the implementation. 2000 IMACS. Published by Elsevier Science B.V. All rights reserved. Keywords: Spectral methods; Bérnard–Marangoni convections; Lateral heating
1. Introduction We present a Chebyshev collocation method [1–3,6] applied to the linear stability analysis of solutions describing a realistic convection problem. The physical situation consists of a fluid filling up a container with the upper surface open to the air; the fluid is heated laterally by two opposite walls at different temperatures. The container is finite in this direction but infinite in the perpendicular one. As soon as a slight difference of temperature is imposed between the lateral walls, a stationary solution of the velocity and temperature fields appears. This solution is called basic state and it is invariant under translations in the infinite coordinate. To calculate it we solve a set of nonlinear equations whereby the first contribution is obtained using a low order finite difference scheme. To improve the solution we expand the corrections of the unknown fields in Chebyshev polynomials, and we pose the equations at the Gauss–Lobatto collocation points. When the difference of temperature between the walls is increased the basic state becomes unstable and it bifurcates to a 3D structure consisting of rolls in the infinite coordinate (longitudinal rolls). ∗ Corresponding author. E-mail:
[email protected]
0168-9274/00/$20.00 2000 IMACS. Published by Elsevier Science B.V. All rights reserved. PII: S 0 1 6 8 - 9 2 7 4 ( 9 9 ) 0 0 0 7 9 - 3
162
H. Herrero, A.M. Mancho / Applied Numerical Mathematics 33 (2000) 161–166
The bifurcation thresholds are obtained through a generalized eigenvalue problem which is solved by expanding the unknown growing fields in Chebyshev polynomials. We study the convergence of the collocation method comparing different expansions. The Chebyshev polynomials and their derivatives are accurately evaluated a priori instead of using the differentiation operators on the Gauss–Lobatto points [4,6,7]. This method simplifies the implementation.
2. Formulation of the problem The physical situation corresponds to a rectangular box with free top surface filled with a fluid. The corresponding domain is
= (x, y, z) ∈ R3 | 0 < x < Γ, y ∈ R, 0 < z < 1 .
(1)
The ambient temperature is Ta . In the vertical walls bounding the x direction different temperatures are imposed. One of them, which we call the hot wall, is at temperature Th where Th > Ta and the opposite one, which we will designate cold, is at temperature Tc where Th > Tc . We define the differences of temperature δTc = Tc − Ta and 1T = Th − Tc . With the usual approximations the equations that govern the phenomenon in adimensional form are the equations of continuity ∇ · u = 0 and of Navier–Stokes and energy balance:
∂t u + (u · ∇)u = Pr −∇p + 1u + ∂t θ + u · ∇θ = 1θ,
Rρ ez , αρ0 1T
(2) (3)
where u is the velocity field of the fluid, θ is the temperature, p the pressure, ∇ = (∂x , ∂y , ∂z ), 1 = (∂2x 2 + ∂2y 2 + ∂2z2 ), α is the thermal expansion coefficient, ρ the density, ρ0 is the mean density and ez is the unit vector in the z direction. We have introduced the Prandtl number Pr, which is considered infinite and the Rayleigh number R, which is proportional to 1T (R = 3481T ). The boundary conditions are x (∂z θ + Bθ)|z=1 = 0, u|z=0 = 0, θ|z=0 = C − , (4) Γ (∂z ux + M∂x θ)|z=1 = 0, (∂z uy + M∂y θ)|z=1 = 0, (5) δTc uz |z=1 = 0, u|x=0 = 0, θ|x=0 = C, u|x=Γ = 0, θ|x=Γ = , (6) 1T where C = δTc /1T +1, B is the Biot number and M is the Marangoni number, which is also proportional to 1T (M = 81T ). The bifurcation parameter is 1T , δTc is also varied and the rest of the parameters are fixed (see [5]).
3. Basic state As soon as different temperatures are imposed in the lateral walls and a horizontal temperature gradient is assumed at the lower plate, a stationary solution of the physical fields appears, which has translational invariance in the y direction. Taking the potential expression for the velocity u = (∂z ψ, 0, −∂x ψ) and
H. Herrero, A.M. Mancho / Applied Numerical Mathematics 33 (2000) 161–166
163
performing an additional normalization [5], the momentum and energy equations projected in the x–z plane for the steady state are: 2 2 ∂z ψ∂x θ − 0 ∂x ψ∂z θ = 1θ, 0 Γ Γ 1 2 1 ψ − 0 R∂x θ = 0, Γ 0 where Γ = Γ /2 and 1 = (1/Γ 02 )∂2x 2 + 4∂2z2 , with the corresponding boundary conditions.
(7) (8)
3.1. The numerical method for the basic state Expressions (7)–(8) are a set of non-linear equations which have been solved numerically. First we need a good approximation, (ψ0 , θ0 ), to the solution, in order to avoid convergence problems. We have achieved it by using a finite difference scheme which is Euler in time and with the spatial derivatives approximated with a low order finite difference scheme. The convergence criterion used is the equality of maximum and minimum of successive solutions. Secondly the approximation at a given order (ψi , θi ) is improved with small corrections (ψi0 , θi0 ), so we find new solutions in the form (ψi+1 = ψi + ψi0 , θi+1 = θi + θi0 ). The corrections fulfill the following linear system:
Γ0 Γ0 + ∂z ψi ∂x − 1 − ∂x ψi ∂z θi0 = −∂z ψi ∂x θi + ∂x ψi ∂z θi + 1θi , 2 2 −R∂x θi0 + 12 ψi0 = R∂x θi − 12 ψi ,
(∂x θi ∂z + ∂z θi ∂x )ψi0
(9) (10)
with the boundary conditions Bθi0 + 2∂z θi0 = Bθi + 2∂z θi |z=1 ,
(11a)
θi0
(11b)
=
ψi0 ψi0
− 12 (x
− 1) + C − 1|z=−1 ,
= −ψi |z=1 , = −ψi |z=−1 , 2∂z ψi0 = −2∂z ψi |z=−1 ,
(11c) (11d) (11e)
−4∂2z2 ψi0 − M∂x θi0 /Γ 0 = 4∂2z2 ψi + M∂x θi /Γ 0 |z=1 ,
(11f)
= −ψi |x=−1 , = −ψi |x=1 , δTc θ1i = − θi |x=1 , 1T ∂x ψi0 = −∂x ψi |x=1 , ∂x ψi0 = −∂x ψi |x=−1 , θi0 = C − θi |x=−1
(11g) (11h)
ψi0 ψi0
(11i) (11j) (11k) (11l)
The correction fields in Eqs. (9)–(11) are approximated by Chebyshev expansions ψi0 =
N−1 X M−1 X l=0 n=0
i aln Tl (x)Tn (z),
θi0 =
N−1 X M−1 X l=0 n=0
i bln Tl (x)Tn (z)
164
H. Herrero, A.M. Mancho / Applied Numerical Mathematics 33 (2000) 161–166
Fig. 1. Streamlines and isotherms for the basic state A2 ; the remaining parameters are 1Tc = 6.79 ◦C, B = 1.25, Γ = 10.
which are introduced into the equations. The system and boundary conditions are evaluated at the following collocation points: • Eq. (9) at the nodes i = 2, N − 1, j = 2, M − 1; • Eq. (10) at i = 3, N − 2, j = 3, M − 2; • the first boundary condition (11a) at i = N , j = 2, M − 1; • (11b) at i = 1, j = 2, M − 1; • (11c) at i = N , j = 3, M − 2; • (11d) at i = 1; • (11e) at i = 1, j = 3, M − 2; • (11f) at i = N , j = 3, M − 2; • (11g) at i = 1, N , j = M; • (11h) at i = 1, N , j = 1; • (11i) at i = 1, N , j = M; • (11j) at i = 1, N , j = 1; • (11k) at i = 1, N , j = 1; and
H. Herrero, A.M. Mancho / Applied Numerical Mathematics 33 (2000) 161–166
165
• (11l) at i = 1, N , j = M. We obtain 2 × N × M unknowns and 2 × N × M equations. The resulting linear system has been solved with a Gauss method. We have iterated this procedure until k(ψi+1 , θi+1 ) − (ψi , θi )k∞ < 10−11 . In Fig. 1 isotherms and streamlines for a basic state are shown.
4. Linear stability of the basic state To study the linear stability of the basic state we perturb it with a vector field that depends on the spatial variables x, y and z in a thoroughly three-dimensional analysis: u(x, z) + ue(x, z) eλt +iky , θ(x, z) + e z) eλt +iky . Where we denote the basic state by the fields u(x, z) and θ(x, z) and the perturbations θ(x, e z). Then, we introduce the perturbed fields into the basic equations and boundary by ue(x, z) and θ(x, conditions (7)–(8) and linearize the resulting equations to obtain a generalized eigenvalue problem. 4.1. The numerical method for the stability analysis e z), u e(x, z) and thresholds of the generalized problem are numerically The eigenfunctions θ(x, calculated. As there are no boundary conditions in the y direction, which is considered infinite, and the basic state is invariant under translations in that direction it is possible to take the Fourier modes in that coordinate. The cell is finite in x and z directions and therefore the eigenfunctions are approximated by Chebyshev polynomial expansions in those directions as in the previous section. The equations are posed at the collocation points with similar rules so we obtain a total of 2 × N × M algebraic equations with the same number of unknowns. If the coefficients of the unknowns which form the matrices A and B satisfy det(A − λB) = 0, a nontrivial solution of the linear homogeneous system exists. This condition generates a dispersion relation λ ≡ λ(k, R, M, B, u, T ), equivalent to calculate directly the eigenvalues from the system AX = λBX, where X is the vector which contains the unknowns. When λ becomes positive the basic state is unstable.
5. Modeling and convergence of the numerical method To pose the numerical collocation method we have evaluated the polynomials and their derivatives a priori at the Gauss–Lobatto points with Maple V using an accuracy of 40 digits instead of using the differentiation and transform operators on those points. This procedure needs O((N × M)2 ) operations as the differentiation process by matrix multiplication [1] and it has a very simple implementation. To carry out a test on the convergence of the method we compare the differences in the thresholds of the differences of temperature (1T ) to different orders of expansions for three states with different δTc . In Table 1 the thresholds for these states are shown for four consecutive expansions varying the number of polynomials taken in the x direction (M) and in the z direction (N ). These results allow us to conclude that convergence has been tested because the differences between the thresholds calculated with consecutive expansions decrease when N and M increase.
166
H. Herrero, A.M. Mancho / Applied Numerical Mathematics 33 (2000) 161–166
Table 1 Critical temperature gradient (◦ C) for three different states at consecutive orders in the development in Chebyshev polynomials. The remaining parameters are B = 1.25 and Γ = 10 State
6 × 22
6 × 27
9 × 22
11 × 23
A1 (δTc = −1 ◦ C)
9.48
9.46
9.32
9.32
= 0 ◦ C)
6.91
6.90
6.79
6.79
A3 (δTc = 1 ◦ C)
4.90
4.90
4.81
4.81
A2 (δTc
6. Conclusion An example of a high order method (Chebyshev collocation) applied to the study of a problem of bifurcation in three dimensions has been solved. The difficulty of the three dimensions has been overcome taking into account that the basic state has no dependence on the y variable and not considering any boundaries in this direction. The nonlinearity has been treated solving an iterative technique whereby the main contribution to the solution is obtained using a low-order finite difference scheme while corrective terms are obtained through collocation. The bifurcation problem of the basic solution has been solved. The test of convergence for the method shows very good results. With respect to the numerical modeling, the Chebyshev polynomials and their derivatives have been evaluated a priori at the collocation points instead of using the differentiation operators on those points. This procedure simplifies the implementation while maintaining the computing cost.
Acknowledgements This work was partially supported by two DGICYT (Spanish Government) Grants Nos. PB95-0578A, PB96-0534 and by the University of Castilla-La Mancha. References [1] C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang, Spectral Methods in Fluid Dynamics, Springer, Berlin, 1988. [2] B. Fornberg, A Practical Guide to Pseudospectral Methods, Cambridge University Press, Cambridge, 1996. [3] D. Gottlieb, S.A. Orszag, Numerical Analysis of Spectral Methods: Theory and Applications, SIAM–CBMS, Philadelphia, 1977. [4] P. Le Quéré, An improved Chebyshev collocation algorithm for direct simulation of 2D turbulent convection in differentially heated cavities, Finite Elements in Analysis and Design 16 (1994) 271–283. [5] A.M. Mancho, H. Herrero, Instabilities in a laterally heated liquid layer, Phys. Fluids, to appear. [6] J.M. Sanz-Serna, Fourier techniques in numerical methods for evolutionary problems, in: P.L. Garrido, J. Marro (Eds.), Third Granada Lectures in Computational Physics, Springer, 1994. [7] S. Xin, P. Le Quéré, O. Daube, Natural convection in a differentially heated horizontal cylinder: Effects of Prandtl number on flow structure and instability, Phys. Fluids 9 (4) (1996) 1014–1033.