A. CONTEXTO DE DESCUBRIMIENTO
2. MARCO TEÓRICO
2.3. a.3. CLASIFICACIÓN DE LA AFASIA
The finite volume method provides for a definitive method of expressing the conservation equations of fluid flow in a discretised form that can easily be implemented within a computer code. The flow field is divided into a finite number of control volumes (CV), hence the name finite volume method. The intention of this project is to model fluid flow in small diameter refrigerator tubes, therefore a one-dimensional (1-D) model would suffice. A simple derivation of the necessary discretised equations is to follow; for a more detailed discussion refer to Patankar (1980), and Versteeg and Malalasekera (2007). The three equations of change that governs 1-D fluid flow and heat transfer of a compressible fluid are (as derived from Versteeg and Malalasekera (2007:24)):
conservation of mass: ( ) (2.4a) conservation of momentum: ( ) ( ) (2.4b)
18 ( ) ( ) ̅ ( ) (2.4c)
where is the density, is time, is axial direction, is radial direction, is the velocity, is the pressure, is the shear stress on the fluid due to friction on the tube walls, is the specific internal energy, ̅ is the average friction shear
stress, and finally the source term is used to incorporate external radial heat transfer.
It can be seen that the three conservation equations all have a similar form and can therefore be written for a general variable, , as:
( )
( )
(2.5)
where , and for the three conservation equations respectively. This equation is referred to as the transport equation for property .
Figure 6 shows the control volume used in the control volume method for the transportation of the general variable . The finite volume method involves the integration of the conservation equations over a control volume. This leads to:
∫ ( ) ∫ ( ) ∫ (2.6)
Using Gauss’s divergence theorem the second integral can be represented by a surface integral as:
∫ ( )
∫( ) (2.7)
This states that the volume integral is equal to the surface integral over the entire bounding surface of the control volume. The direction of is normal to the surface which bounds the control volume integrated, this is the application of Gauss’s divergence theorem. In this case only flow in the z direction is
𝜃 𝑧
𝜌𝜙𝑣𝑧
𝑟
19
encountered therefore the area over which this integral is calculated would be the inlet and outlet control volume cross-sectional areas.
Since a transient time-dependent simulation model is developed, it is first necessary to decide which temporal discretisation scheme to use. There are three well known schemes that exist, namely: fully explicit, Crank-Nicolson, and fully implicit. The fully explicit scheme uses only old time step values to calculate the new time step value. This allows for easy computation; however there is a stringent limitation to time step size due to the Scarborough criterion which states that all coefficients of the discretised equation must be of the same sign, normally all positive, to ensure bounded and physically realistic results (Versteeg & Malalasekera, 2007: 247). The fully explicit scheme also possesses no intrinsic means for correcting or ensuring that the conservation equations remain conserved as time progresses. In the fully implicit scheme the old time value is treated as a source term and new time values are used to calculate the new values. This scheme is therefore iterative in nature; also it is unconditionally stable for any time step size since all discretisation equation coefficients are positive. However since the accuracy of the scheme is first-order in time, small time steps are needed to ensure the accuracy of the results (Versteeg & Malalasekera, 2007: 249). The Crank-Nicolson scheme uses a weighting of half the new - and half the old time step values to compute the new values. This method is more robust than the fully explicit method, in that it has a less restrictive time step size limit. Other schemes with a different weighting between new – and old time step values also exist but are of no interest to this study.
The robustness and unconditional stability of the fully implicit scheme are the reasons for it being the method of choice for transient simulation purposes. Furthermore the iterative nature of this scheme ensures that the conservation equations remain conserved as time progresses. Therefore, all subsequent derivations will focus on the implementation of the fully implicit scheme.
Integration of a conservation equation over a control volume, as shown in Figure 7, yields a discretised equation at the node, P, of the control volume (usually at its center). The discretised equation contains neighbouring node values depending on the discretisation scheme used to represent face values of the current control volume. To illustrate how a differential conservation equation is transformed into a usable discretised equation, the discretised form of the
Figure 7: Notation used in the control volume discretisation
P E W w e ( 𝑧)𝑒− ( 𝑧)𝑤+ ( 𝑧)𝑒 ( 𝑧)𝑤 ( 𝑧)𝑤− ( 𝑧)𝑒+
20
general transport equation (2.5) for will be developed. The method also applies to the transformation of the different conservation equations (2.4a-c).
Rewriting integral equation (2.6) using equation (2.7) and integrating yields the discretised equation (2.9) in its most elementary form:
( ∫ ) ∫( ) ∫ (2.8) [( ) ( ) ] [ ] [ ] ̅ (2.9)
The values with superscript, o, refers to the previous time step’s values, and the values without superscript refers to the new time step’s values. is the volume, is the time step size, is the cross-sectional area of the control volume face, and ̅ is the average value of the source term, , over the control volume. The source term, , may be a function of the dependent variable ; in such cases Patankar (1980: 48) suggests that the source term be approximated by a linearised form:
̅ (2.10)
where has a negative value to ensure that the Scarborough criterion is satisfied and is a constant source.
A variable is defined to more compactly represent the convective mass flux at control volume faces, as:
(2.11)
Thus the face convective mass fluxes are:
( ) and ( ) (2.12)
Substitution of the above gives:
[( ) ( ) ]
( )
(2.13)
To derive useful forms of the discretised equation it is necessary to find appropriate representation of the face values of the control volume in terms of the surrounding/neighbouring nodal values. All scalar quantities such as , , , and are defined at control volume nodes and not at the faces; therefore a suitable
21
interpolation or other consistent discretisation scheme has to be used to represent face values in terms of the nodal values.
For example for face values of linear interpolation (also called central differencing), with reference to Figure 7, yields the following:
+(1- ) and +(1- ) (2.14)
where ( )
( ) and
( )
( )
According to Patankar (1980: 34) it is not necessary to use the same discretisation scheme for every variable; the discretisation scheme chosen for a variable depends on how well it describes the physical behaviour of that variable. Versteeg and Malalasekera (2007: 141) state that the most fundamental properties that a discretisation method requires are conservativeness, boundedness and transportiveness. Conservativeness entails using a consistent expression for the flux of a property through a common face in adjacent control volumes. This means that leaving one control volume through a face must enter the adjacent control volume through the same face, thus ensuring conservation of through the whole simulation domain. Boundedness ensures that the results are physically realistic in the sense that the values of internal nodes are bounded by its boundary values in the absence of internal sources. For the boundedness requirement all coefficients of the nodal values in the discretised equation must satisfy the Scarborough condition in that they are all of the same sign (usually all positive). This ensures that an increase in at one node would result in an increase in in the neighbouring nodes. Transportiveness in a discretisation scheme ensures that the flow direction is taken into account by ensuring that the value of node P is predominantly influenced by the upstream neighbouring node, as is physically occurring, and not the downstream neighbour.
The central differencing scheme requires small control volumes, hence a large number of control volumes, and does not recognize the direction of flow, i.e. does not possess the transportiveness property. The simulation model developed will make use of the minimum amount of control volumes possible, to keep computation time to a minimum, therefore it was decided to use the upwind differencing scheme. This scheme is relatively robust in the sense that it can produce physically realistic results with the minimum amount of control volumes and it possesses all three fundamental properties of a discretisation scheme.
A development of the discretised equation of the general variable using the upwind differencing scheme is to follow.
22
and (2.15)
Substitution of the upwind differencing values into the discretised equation yields:
[( ) ( ) ] ( ) (2.16) Rearranging gives: [ ] [ ] (2.17)
If the flow is in the negative direction ( ) < 0, ( ) < 0 ( < 0, < 0):
and (2.18)
Substitution of the upwind differencing values into the discretised equation yields:
[( ) ( ) ] ( ) (2.19) Rearranging gives: [ ] [ ] (2.20)
Identifying the coefficients of , , and as , , and respectively, equations (2.17) and (2.20) can be written in general form as:
(2.21) where: ( ) ( ) ( ) ( )
Discretised equations of the form (2.21) must be set up at each node in the simulation domain. The discretised equation is modified for boundary control volumes to incorporate boundary conditions.
23
(2.22)
where is the variable being solved.
The set of equations for the simulation nodes are all written in a matrix starting with the first node’s equation in the first row and continuing till the last node’s equation in the last row. The resulting matrix has a tri-diagonal form and can then be solved by forward elimination and back-substitution. This algorithm, called the tri-diagonal matrix algorithm (TDMA), can be implemented in a for-loop and is less computationally expensive than direct methods. It requires a number of computations in the order of versus for direct methods, where is the number of variables being solved. A detailed description of the TDMA algorithm can be obtained in Versteeg and Malalasekera (2007: 213).