Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Finite Element Solver for Stationary and Incompressible Navier-Stokes Equations

Finite Element Solver for Stationary and Incompressible Navier-Stokes Equations

Ratings: (0)|Views: 9|Likes:
Published by ratchagar a

More info:

Published by: ratchagar a on Jul 25, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





EnginSoft SpA - Via della Stazione, 27 - 38123 Mattarello di Trento | P.I. e C.F. IT00599320223
Massimiliano Margonari 
Scilab; Open source software; Navier-Stokes equations
In this paper we show how Scilab can be used to solve Navier-stokesequations, for the incompressible and stationary planar flow. Threeexamples have been presented and some comparisons withreference solutions are provided.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License .
Navier-Stokes finite element solver 
page 2/15
Scilab is an open source software package for scientific and numerical computingdeveloped and freely distributed by the Scilab Consortium (see [1]).Scilab offers a high level programming language which allows the user to quicklyimplement his/her own applications in a smart way, without strong programming skills.Many toolboxes, developed by the users all over the world and made available through theinternet, represent a real opportunity to create complex, efficient and multiplatformapplications.Scilab is regarded almost as a clone of the well-known MATLAB
. The two technologieshave many points in common: the programming languages are very similar, they both usea compiled version of numerical libraries to make basic computations more efficient, theyoffer nice graphical tools. In brief, they both adopt the same philosophy, but Scilab has theadvantage of being completely free.Unfortunately, Scilab is not yet widely used in industrial area where, on the contrary,MATLAB
are the most known and frequently used. This isprobably due to the historical advantage that MATLAB
has over all the competitors.Launched
to the markets in the late 70’s, it was the
first software of its kind. However, wehave to recall that MATLAB
has many built-in functions that Scilab does not yet provide.In some cases, this could be determinant. While the number of Scilab users, their experiences and investments have grown steadily, the author of this article thinks that theneed to satisfy a larger and more diverse market, also led to faster software developmentsin recent years. As in many other cases, also the marketing played a fundamental role inthe diffusion of the product.Scilab is mainly used for teaching purposes and, probably for this reason, it is oftenconsidered inadequate for the solution of real engineering problems. This is absolutelyfalse, and in this article, we will demonstrate that it is possible to develop efficient andreliable solvers using Scilab also for non trivial problems.To this aim, we choose the Navier-Stokes equations to model a planar stationary andincompressible fluid motion. The numerical solution of such equations is actuallyconsidered a difficult and challenging task, as it can be seen reading [3] and [4] just toprovide two references. If the user has a strong background in fluid dynamics he/she canobviously implement more complex models than the one proposed in this document usingthe same Scilab platform. Anyway, there are some industrial problems that can be adequately modeled throughthese equations: heat exchangers, boilers and more just to name a few possibleapplications.
Figure 1: The Scilab logo (on the left) and the puffin logo (on the right). Dr. Hu Baogang, ContributorMember of Scilab Scientific Board, chose a puffin
because “The image of puffin reflects a spirit of 
freedom with proud, as carried in the endeavor of developing open-
source software [...]”.
Navier-Stokes finite element solver 
page 3/15
The Navier-Stokes equations for the incompressible fluid
Navier-Stokes equations can be derived applying the basic laws of mechanics, such as theconservation and the continuity principles, to a reference volume of fluid (see [2] for moredetails). After some mathematical manipulation, the user usually reaches the followingsystem of equations:(1)which are known as the continuity, the momentum and the energy equation respectively.They have to be solved in the domain , taking into account appropriate boundarycondition
s. The symbols “” and “” are used to indicate the divergence and the gradient
 operator respectively, while , and are the unknown velocity vector, the pressure andthe temperature fields. The fluid properties are the density , the viscosity , the thermalconductivity and the specific heat which could depend on temperature.We have to remember that in the most general equations (1), other terms we haveneglected in this case (e.g. heat sources, body forces) could be involved. For sake of simplicity we imagine all the fluid properties as constant and we will consider, asmentioned above, only two dimensional domains. The former hypothesis represents a veryimportant simplification because the energy equations completely decouple and therefore,it can be solved separately once the velocity field has been computed using the first twoequations. The latter one can be easily removed, with some additional effort inprogramming.It is fundamental to note that the momentum equation is non-linear, because of thepresence of the advection term . Moreover, the correct treatment of this termrequires a special attention, as it will be briefly discussed in the following paragraphs,especially when its contribution becomes predominant with respect to the diffusive term. Another source of difficulty is given by the first equation, which represents theincompressibility condition: in the followings we will discuss also this aspect, even if theinterested reader is addressed to the literature (see [2], [3]) for a more detailed discussionon these topics.For the solution of the equations reported in (1) we decide to use a traditional Galerkinweighted residual approach. As explained above, the energy equation can be solvedseparately and, for this reason, only the first two equations will be considered in thefollowing. The same procedure identically applies also for the third one.It is necessary to introduce two virtual fields, and , which multiply the first and thesecond equation respectively and integrate them in the domain:(2)the divergence theorem can be invoked to rewrite the second equation in a more treatableway. It is possible to write:(3)The integral over the boundary vanishes, in view of the incompressibility constraint, and

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->