Available online at www.sciencedirect.com
ScienceDirect Procedia Engineering 177 (2017) 78 – 85
XXI Polish-Slovak Scientific Conference “Machine Modeling and Simulations 2016”
Numerical problems related to solving the Navier-Stokes equations in connection with the heat transfer with the use of FEM Robert Dyja∗, Elzbieta Gawronska, Andrzej Grosser Czestochowa University of Technology, Faculty of Mechanical Engineering and Computer Science, Dabrowskiego 73, Czestochowa, Poland
Abstract The paper presents a numerical solution to the unsteady form of the Navier-Stokes (N-S) equations along with the heat transfer equation. The problem of mass transfer with the energy transfer is very common in engineering, for instance, in designing ventilation systems or in founding. Solving the Navier-Stokes equations causes many numerical problems regardless of the chosen discretization method. What is more, numerical methods of solving the N-S equations are characterized by the significant time of calculations. The finite element method is often used when solving heat transfer equations. However, problems arise when it is used for solving the Navier-Stokes equations. They are related, for example, to the LBB condition (LadyzhenskayaBabuska-Breezi). In the paper, we have used the stabilized finite element method (FEM) form to solve the N-S equations. It is characterized by the ease of implementation and it does not have a negative influence on the efficiency of calculations. It also makes it possible to bypass the LBB condition. Integration over the time has been done with the help of widely known one-step theta scheme. The paper presents the result, which allows for the quality assessment of the obtained solution with the use of the aforementioned methods. To find the solution, a computer implementation of the presented mathematical problems has been created. On the basis of the obtained results, it is possible to state that the application of stabilization for FEM in the relation to the Navier-Stokes equations is an effective way to find the numerical solution. The authors of this paper are planning to further develop the software to apply it to simulations connected with the problems in the foundry process.
© 2017 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license c 2017 Published by Elsevier Ltd. (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-reviewunder underresponsibility responsibilityofofthe theorganizing organizingcommittee committeeofofMMS MMS 2016 Peer-review 2016 Keywords: Navier-Stokes equation; heat transfer; Finite Element Method; Petrov-Galerkin
1. Introduction The paper presents a numerical solution to the unsteady form of the Navier-Stokes equations along with the heat transfer equation. Problems connected with the motion of fluid occur in many engineering ∗ Corresponding
author. Tel.: +48 34 3250589; fax: +48 34 3250589 Email address:
[email protected] (Robert Dyja)
1877-7058 © 2017 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the organizing committee of MMS 2016
doi:10.1016/j.proeng.2017.02.187
79
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85
areas. The problem of mass transfer with energy transfer is very common and the Navier-Stokes equations are useful because they describe the physics of many scientific phenomena and problems, and in their full and/or simplified forms help with the design of aircraft and cars [1], the study of blood flow [2], the analysis of pollution [3], and many other things. Solidification is not an exception [4, 5, 6]. Causes many numerical problems regardless of the chosen discretization method. What is more, numerical methods of solving the Navier-Stokes equations are characterized by the significant time of calculations. Simulation tools become indispensable for engineers who are interested in tackling increasingly larger problems or the ones who are interested in searching larger phase space of process and system variables to find the optimal design. Advances in hardware allow not only to solve the larger tasks (using more detailed grids), but also to describe the problem more accurately. Increasing capacity of computer memory makes it possible to consider growing problem sizes. At the same time, increased precision of simulations triggers even greater load. There are several ways to tackle these kinds of problems. For instance, one can use parallel computing [7], someone else may use accelerated architectures such as GPUs [8], while another person can use special organization of computations [9]. We have used parallel processing to assure efective time duration for simulations. During the implementation we used TalyFem and PETSc libraries, which allowed us to split structures, such as matrices and vectors, into many computing nodes [10, 11]. The Navier-Stokes equations depend on the simulated phenomenon, there may be a need to include a wide range of fluid motion speeds. Whether the focus is on the very convention or on the flow of metal in the gating system, due to the high density of the metal it is not possible to overlook fluid inertia effects. If the assumption above was true, it would be possible to solve the Stokes equation only, which is a linear equation. In this paper, we propose the use of the stabilized finite element method (FEM) form to solve the Navier-Stokes equations without considering the classic Ladyzhenkaya-Babuska-Brezzi (LBB) consistency condition which can impede obtaining solution of these equation [12]. First, we have presented used mathematical formulas for the Navier-Stokes equations. Then, the stabilized finite element method (FEM) was presented. It is characterized by the ease of implementation and it does not have a negative influence on the efficiency of calculations. It also makes it possible to bypass the LBB condition. Subsequently, we have presented the integration over the time scheme, which is a widely known one-step theta scheme. Finally, the numerical results obtained by our own software were presented in the concluding section. 2. Mathematical derivations We solve the in-compressible Navier-Stokes and the heat transfer equations: ˙ + ρc(u · ∇)T = λ∇2 T ρcT ρu˙ + ρ((u · ∇)u) + ∇ · σ(u, p) = 0 ∇·u=0 where:
(1)
σ(u, p) = −pI + 2μe (2) 1 (∇u) + (∇u)T e= 2 T is temperature, u is velocity vector, I is identity matrix, ρ is density, c is specific heat, λ is thermal conductivity coefficient, p is pressure, μ is dynamic viscosity and dot over the letter is a time derivative. After spatial discretization using the finite element method [13], it can be written as: M T˙ + N (u) + K T = 0 Mu˙ + (N(u) + K) u − Gp = 0 (3) GT u = 0
80
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85
where terms written in bold are matrices which coefficients are obtained with following formulas: S α uk S β,k dΩ Mαβ = cρ N (u)αβ = cρ S α S β dΩ e Ωe Ω =λ S α, j S β,i dΩ Mαβ = ρ S α S β dΩ Kαβ e e Ω Ω Gα = S α,k S β,k δi j dΩ + μ S α, j S β,i dΩ S α,i S β dΩ Kαβ = μ e Ωe Ωe Ω S α uk S β,k δi j dΩ GTβ = S β, j S α dΩ N(u)αβ = ρ Ωe
(4)
Ωe
where S are the basis functions of the finite element. 2.1. Stabilization The equations in form (3) are difficult to solve directly, because of the lack of pressure in the continuity equation. This leads to the Ladyzhenskaya-Babuska-Breezi condition [14], which states that it is impossible to obtain a stable solution using the same order of approximation for velocity and pressure. One of the possible ways to avoid the LBB condition is to use a stabilized form of Eq. (3). Stabilization adds additional terms, which have the form:: nel τP(w)R(·)dΩ (5) ... + e=1
Ωe
where τ is parameter, P is stabilization term and R(·) is residuum, to the equation (3). Stabilization terms are added on the Finite Element level (semidiscretization). Occurrence of residuum in stabilization terms ensures that the solution of problem (1) is also the solution of the stabilized problem. In this work two forms of stabilization have been used: the PSPG – Pressure Stabilized Petrov Galerkin [15, 16] and the SUPG – Streamline Upwind Petrov Galerkin [17]. The PSPG is added to the continuity equation: h# z(Re#U ) 2||U|| 1 P = ∇wh ρ
τ=
⎧ ⎪ ⎪ ⎨Re/3, 0 < Re < 3 z(Re) = ⎪ ⎪ ⎩1, 3 < Re
(6) (7) (8)
and Re is Reynolds number, U is local velocity without disturbances, h# is a diameter of a circle that has the same area as the finite element, wh are weight functions (the same as shape functions in this case). While the SUPG is added to the momentum and heat transfer equations: τ=
h z(Reu ) 2||u||
P = uh ∇wh ⎛ n ⎞−1 ⎜⎜⎜ ⎟⎟ ⎜ h = 2 ⎜⎝ |s · ∇S α |⎟⎟⎟⎠
(9) (10) (11)
α=1
where s is the unit vector in a direction of velocity field inside the finite element and n is the number of nodes in the element, u is local velocity in the element and S is the basis function of the finite elements. Equations with the PSPG and SUPG stabilization are given by: ˙ + N (u) + NS UPG (u) + K T = 0 (M + MS UPG )T (M + MS UPG )u˙ + (N(u) + NS UPG (u) + K) u − (G + GS UPG )p = 0 MPS PG u˙ + GT u + NPS PG u + GPS PG p = 0
(12)
81
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85
2.2. Time integration The Θ scheme was used for time integration and the following forms of equations were obtained: The heat transfer equation: M + MS UPG + ΔtΘ N (ut+1 ) + NS UPG (ut+1 ) + K Tt+1 = = M + MS UPG + ΔtΘ N (ut ) + NS UPG (ut ) + K Tt
(13)
The momentum equation:
M + MS UPG + ΔtΘ N(ut+1 ) + NS UPG (ut+1 ) + K ut+1 − − ΔtGpt+1 +
+ M + MS UPG + Δt(1 − Θ) N(ut ) + NS UPG (ut ) + K ut = 0
(14)
MPS PG + ΔtΘ GT + NPS PG (ut+1 ) ut+1 − ΔtGPS PG pt+1 + + MS UPG + Δt(1 − Θ) GT + NPS PG (ut ) + K ut = 0
(15)
And the continuity equation:
In order to solve the above equations the Newton-Raphson method has to be used, because of nolinearity introduced by the N term. ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎢⎢⎢J11 0 0 ⎥⎥⎥ ⎢⎢⎢δTt+1 ⎥⎥⎥ ⎢⎢⎢−F1 ⎥⎥⎥ ⎥⎥⎥ ⎢⎢⎢ t+1 ⎥⎥⎥ ⎢⎢⎢ ⎥ ⎢⎢⎢ (16) ⎢⎢⎣ 0 J22 J23 ⎥⎥⎦ ⎢⎢⎣ δu ⎥⎥⎦ = ⎢⎢⎣−F2 ⎥⎥⎥⎥⎦ t+1 0 J32 J33 δp −F3 where coefficients of the Jacobian can be calculated using the formulas: J11 = M + MS UPG + ΔtΘ N (ut+1 ) + NS UPG (ut+1 ) + K
(17)
dN dNS UPG + NS UPG (ut+1 ) + +K du du dNPS PG = MPS PG + ΔtΘ GT (ut+1 ) + NPS PG (ut+1 ) + du
J22 = M + MS UPG + ΔtΘ N(ut+1 ) + J32
(18) (19)
J23 = ΔtG
(20)
J33 = ΔtGPS PG
(21)
and right hand side of the equation (16) is calculated by: F1 = M + MS UPG Tt+1 − Tt + + ΔtΘ N (ut+1 ) + NS UPG (ut+1 ) + K Tt+1 + Δt (1 − Θ) N (ut ) + NS UPG (ut ) + K Tt
(22)
F2 = (M + MS UPG ) ut+1 − ut + + ΔtΘ N(ut+1 ) + NS UPG (ut+1 ) + K ut+1 + Δt (1 − Θ) N(ut ) + NS UPG (ut ) + K ut − ΔtGpt+1
(23)
F3 = MPS PG ut+1 − ut + ΔtΘ GT + NPS PG (ut+1 ) ut+1 +
+ Δt (1 − Θ) GT + NPS PG (ut+1 ) ut + ΔtGPS PG pt+1
(24)
82
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85
With some assumptions, the heat equation can be solved independently. If coefficients in the momentum and continuity equations do not depend on temperature, then it is possible to solve those equations first and then the heat transfer equation can be written as: M + MS UPG + ΔtΘ N (ut+1 ) + NS UPG (ut+1 ) + K Tt+1 = = M + MS UPG Tt − ΔtΘ N (ut ) + NS UPG (ut ) + K Tt
(25)
While SUPG should repel oscillations in solutions that occur due to high velocities, it is still possible to obtain a solution with oscillations (especially temperature) because of high gradients. In the heat transfer simulations,it is popular to use a diagonal mass matrix to avoid oscillations caused by high gradients: ⎤ ⎡ ⎤ ⎡ ⎥⎥⎥ ⎢⎢⎢M11 M12 M13 ⎥⎥⎥ ⎢⎢⎢M11 + M12 + M13 0 0 ⎥⎥ ⎥ ⎥⎥⎥⎥ ⎢⎢⎢⎢M ⎢⎢⎢⎢ + M + M 0 0 M M M =⇒ ⎥ 21 22 23 21 22 23 ⎢⎣ ⎥⎦ ⎥⎦ ⎢⎣ 0 0 M31 + M32 + M33 M31 M32 M33 The main question, which is answered in this work is whether it is possible to use the SUPG and the diagonal mass matrix in one model and how well do they work together. 3. Results for flow past cylinder As a test problem, it is uses the standard benchmark of flow over cylinder, as pictured in figure 1. This is a part of a set of benchmark problems discussed in [18].
Fig. 1: Schematic view of test problem setup.
kg J W Material properties used in this problem are: μ = 0.001 m·s , ρ = 1000 mkg3 , c = 4000 kg·K , λ = 0.5 m·K . m m The inlet velocity was equal to 0.005 s or 0.05 s in the direction of the x-axis. This results in the Reynolds numbers for problems equal to 50 or 500, respectively. The initial temperature of the liquid was equal T 0 = 300K, the temperature of incoming liquid was also equal to 300K, while the cylinder had the temperature, which was equal to 400K. These temperatures were used as the initial and boundary conditions. The boundary conditions for the heat transfer were of the Dirichlet type. Figures 2 and 3 show temperature, pressure and velocity distribution in moments for time 0.05s, 2.5s, and 12.5s for the flows with the Reynolds number equal to 50 and 500, accordingly. Flow with Re = 500 shows vortex shedding, as is expected in flows with Reynolds number over 100. Figures 4 and 5 show the details of temperature distribution in a cross section of a tunnel for four different solution methods. These four different solution methods differ when it comes to how the solution for the
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85
Fig. 2: Flow past cylinder, Ui = 0.005 ms (Re=50). First row shows temperature, pressure, and velocity for time 0.05s, second row – 2.5s, and third row – 12.5s.
Fig. 3: Flow past cylinder, Ui = 0.05 ms (Re=500). First row shows temperature, pressure, and velocity for time 0.05s, second row – 2.5s, and third row – 12.5s.
heat transfer was obtained and use the Newton-Raphson formulation with the diagonal mass matrix (NR), the Newton-Raphson formulation without the diagonal mass matrix (NR no diagonal), a linear formulation with the diagonal mass matrix (block), and the linear formulation without the diagonal mass matrix (block no diagonal). Coordinate 0.0 in the figures 4 and 5 corresponds to the wall of the cylinder, while coordinate 0.045 is tunnel wall. As can be seen, without using the diagonal mass matrix, the solution has very similar oscillations for the Newton-Raphson and linear formulations. Using diagonal mass matrix is very effective in the linear formulation, where oscillations almost completely disappear. For the Newton-Raphson formulation the use of the diagonal mass matrix has a limited effect. It slightly limits oscillations at the time 0.05s, but has no positive effect later.
83
84
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85
Fig. 4: Profile of temperature change between cylinder and wall for flow Re = 50 at time 0.05s (left) and 2.5s (right).
Fig. 5: Profile of temperature change between cylinder and wall for flow Re = 500 at time 0.05s (left) and 2.5s (right).
4. Summary The analysis of the numerical results obtained from calculation carried out with the help of our own computer program made it possible to draw the following remarks and conclusions: • The Diagonal mass matrix is still useful in the heat transfer problems, where convection is significant. • Unfortunately, the diagonal mass matrix works better with the linear formulation. When dealing with the Newton-Raphson linearization, its effectiveness is limited. • High temperature gradients may cause some numerical problems in the simulations. Future work plan assumes an addition of solid fraction evolution in casting. References [1] Z. Qian, Y. Wang, W. Huai, Y. Lee, Numerical simulation of water flow in an axial flow pump with adjustable guide vanes, Journal Of Mechanical Science And Technology 24 (4) (2010) 971–976. doi:10.1007/s12206-010-0212-z. [2] H. Suito, T. Ueda, D. Sze, Numerical simulation of blood flow in the thoracic aorta using a centerline-fitted finite difference approach, Japan Journal Of Industrial And Applied Mathematics 30 (3, SI) (2013) 701–710, 4th China-Japan-Korea Conference on Numerical Mathematics, Otsu, JAPAN, AUG 25-28, 2012. doi:10.1007/s13160-013-0123-3. [3] H. Suito, H. Kawarada, Numerical simulation of spilled oil by fictitious domain method, Japan Journal Of Industrial And Applied Mathematics 21 (2) (2004) 219–236.
Robert Dyja et al. / Procedia Engineering 177 (2017) 78 – 85 [4] T. Skrzypczak, E. Wegrzyn-Skrzypczak, J. Winczek, Effect of natural convection on directional solidification of pure metal, Archives of Metallurgy and Materials 60 (2) (2015) 835–841. doi:10.1515/amm-2015-0215. [5] E. Majchrzak, B. Mochnacki, Application of the shape sensitivity analysis in numerical modelling of solidification process, in: THERMEC 2006, Vol. 539 of Materials Science Forum, Trans Tech Publications, 2007, pp. 2524–2529. doi:10.4028/www.scientific.net/MSF.539-543.2524. [6] A. Bokota, S. Iskierka, Finite element method for solving diffusion-convection problems in the presence of a moving heat point source, Finite Elements in Analysis and Design 17 (2) (1994) 89–99. doi:10.1016/0168-874X(94)90008-6. [7] W. Feng, Q. Xu, B. Liu, Microstructure simulation of aluminum alloy using parallel computing technique, ISIJ International 42 (7) (2002) 702–707. doi:10.2355/isijinternational.42.702. [8] L. Klimes, J. Stetina, A rapid GPU-based heat transfer and solidification model for dynamic computer simulations of continuous steel casting, Journal of Materials Processing Technology 226 (2015) 1–14. doi:10.1016/j.jmatprotec.2015.06.016. [9] E. Gawronska, N. Sczygiol, Application of mixed time partitioning methods to raise the efficiency of solidification modeling, in: Ida, T and Negru, V and Jebelean, T and Petcu, D and Watt, S and Zaharie, D (Ed.), 12th Internaitonal Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC 2010), Johannes Kepler Univ Linz, Res Inst Symbol Computat; Res Inst e-Austria, 2011, pp. 99–103, 12th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), W Univ Timisoara, Timisoara, ROMANIA, SEP 23-26, 2010. doi:10.1109/SYNASC.2010.24. [10] S. Balay, S. Abhyankar, M. F. Adams, J. Brown, P. Brune, K. Buschelman, L. Dalcin, V. Eijkhout, W. D. Gropp, D. Kaushik, M. G. Knepley, L. C. McInnes, K. Rupp, B. F. Smith, S. Zampini, H. Zhang, H. Zhang, PETSc users manual, Tech. Rep. ANL95/11 - Revision 3.7, Argonne National Laboratory (2016). URL http://www.mcs.anl.gov/petsc [11] H. K. Kodali, B. Ganapathysubramanian, A computational framework to investigate charge transport in heterogeneous organic photovoltaic devices, Computer Methods In Applied Mechanics And Engineering 247 (2012) 113–129. doi:10.1016/j.cma.2012.08.012. [12] H. Fu, H. Guo, J. Hou, J. Zhao, A stabilized mixed finite element method for steady and unsteady reaction-diffusion equations, Computer Methods in Applied Mechanics and Engineering 304 (2016) 102–117. doi:10.1016/j.cma.2016.01.010. [13] O. Zienkiewicz, R. Taylor, The Finite Element Method: The basis, Referex Engineering, Butterworth-Heinemann, 2000. [14] F. Brezzi, On the existence, uniqueness and approximation of saddle-point problems arising from lagrangian multipliers, ESAIM: Mathematical Modelling and Numerical Analysis - Modelisation Mathematique et Analyse Numerique 8 (R2) (1974) 129–151. [15] T. Tezduyar, Stabilized finite element formulations for incompressible flow computations, Vol. 28 of Advances in Applied Mechanics, Elsevier, 1991, pp. 1 – 44. doi:http://dx.doi.org/10.1016/S0065-2156(08)70153-4. URL http://www.sciencedirect.com/science/article/pii/S0065215608701534 [16] T. Tezduyar, S. Mittal, S. Ray, R. Shih, Incompressible flow computations with stabilized bilinear and linear equal-orderinterpolation velocity-pressure elements, Computer Methods in Applied Mechanics and Engineering 95 (2) (1992) 221 – 242. [17] A. N. Brooks, T. J. R. Hughes, Streamline upwind/petrov-galerkin formulations for convection dominated flows with particular emphasis on the incompressible navier-stokes equations, Computer Methods in Applied Mechanics and Engineering (1990) 199– 259. [18] M. Sch¨afer, S. Turek, F. Durst, E. Krause, R. Rannacher, Flow Simulation with High-Performance Computers II: DFG Priority Research Programme Results 1993–1995, Vieweg+Teubner Verlag, Wiesbaden, 1996, Ch. Benchmark Computations of Laminar Flow Around a Cylinder, pp. 547–566.
85