Development of the Numerical Schemes and Iteration Procedures Nielsen, Peter Vilhelm

Similar documents
Developing Excel Macros for Solving Heat Diffusion Problems

IMPEDANCE EFFECTS OF LEFT TURNERS FROM THE MAJOR STREET AT A TWSC INTERSECTION

DIGITAL DISTANCE RELAYING SCHEME FOR PARALLEL TRANSMISSION LINES DURING INTER-CIRCUIT FAULTS

Development of a user element in ABAQUS for modelling of cohesive laws in composite structures

Millennium Relativity Acceleration Composition. The Relativistic Relationship between Acceleration and Uniform Motion

Stochastic boundary conditions to the convection-diffusion equation including chemical reactions at solid surfaces.

Analysis of discretization in the direct simulation Monte Carlo

Natural Convection Experiment Measurements from a Vertical Surface

A model for measurement of the states in a coupled-dot qubit

Subject: Introduction to Component Matching and Off-Design Operation % % ( (1) R T % (

Control Theory association of mathematics and engineering

Improvements in the Modeling of the Self-ignition of Tetrafluoroethylene

Advances in Radio Science

Where as discussed previously we interpret solutions to this partial differential equation in the weak sense: b

23.1 Tuning controllers, in the large view Quoting from Section 16.7:

Theory. Coupled Rooms

3 Tidal systems modelling: ASMITA model

The gravitational phenomena without the curved spacetime

Three-dimensional morphological modelling in Delft3D-FLOW

Friction factor correlations for laminar, transition and turbulent flow in smooth pipes

UTC. Engineering 329. Proportional Controller Design. Speed System. John Beverly. Green Team. John Beverly Keith Skiles John Barker.

Heat exchangers: Heat exchanger types:

Bottom Shear Stress Formulations to Compute Sediment Fluxes in Accelerated Skewed Waves

Document Version Publisher s PDF, also known as Version of Record (includes final page, issue and volume numbers)

Cavity flow with surface tension past a flat plate

What are the locations of excess energy in open channels?

THEORETICAL PROBLEM No. 3 WHY ARE STARS SO LARGE?

10.2 The Occurrence of Critical Flow; Controls

CALCULATION OF NONLINEAR TUNE SHIFT USING BEAM POSITION MEASUREMENT RESULTS

Scalable Positivity Preserving Model Reduction Using Linear Energy Functions

THE DISCHARGE COEFFICIENT OF A CENTRE- PIVOT ROOF WINDOW

UPPER-TRUNCATED POWER LAW DISTRIBUTIONS

div v(x) = 0, n terr = 0, v terr = v t,

Mass Transfer 2. Diffusion in Dilute Solutions

EFFECTS OF COUPLE STRESSES ON PURE SQUEEZE EHL MOTION OF CIRCULAR CONTACTS

The Hanging Chain. John McCuan. January 19, 2006

A simple expression for radial distribution functions of pure fluids and mixtures

NUMERICAL SIMULATION OF ATOMIZATION WITH ADAPTIVE JET REFINEMENT

Wave Propagation through Random Media

Controller Design Based on Transient Response Criteria. Chapter 12 1

Four-dimensional equation of motion for viscous compressible substance with regard to the acceleration field, pressure field and dissipation field

COMBINED PROBE FOR MACH NUMBER, TEMPERATURE AND INCIDENCE INDICATION

A Spatiotemporal Approach to Passive Sound Source Localization

Process engineers are often faced with the task of

Optimization of replica exchange molecular dynamics by fast mimicking

Advanced Computational Fluid Dynamics AA215A Lecture 4

Complexity of Regularization RBF Networks

Part G-4: Sample Exams

Wavetech, LLC. Ultrafast Pulses and GVD. John O Hara Created: Dec. 6, 2013

Improving the worthiness of the Elder problem as a benchmark for buoyancy driven convection models

BINARY RANKINE CYCLE OPTIMIZATION Golub, M., Koscak-Kolin, S., Kurevija, T.

Critical Reflections on the Hafele and Keating Experiment

Laplace-Transform Finite Element Solution of Nonlocal and Localized Stochastic Moment Equations of Transport

A NETWORK SIMPLEX ALGORITHM FOR THE MINIMUM COST-BENEFIT NETWORK FLOW PROBLEM

Optimization of Statistical Decisions for Age Replacement Problems via a New Pivotal Quantity Averaging Approach

LATTICE BOLTZMANN METHOD FOR MICRO CHANNEL AND MICRO ORIFICE FLOWS TAIHO YEOM. Bachelor of Science in Mechanical Engineering.

Measuring & Inducing Neural Activity Using Extracellular Fields I: Inverse systems approach

Dr G. I. Ogilvie Lent Term 2005

UNCERTAINTY RELATIONS AS A CONSEQUENCE OF THE LORENTZ TRANSFORMATIONS. V. N. Matveev and O. V. Matvejev

Contact Block Reduction Method for Ballistic Quantum Transport with Semi-empirical sp3d5s* Tight Binding band models

IMPACT MODELLING OF THE COEFFICIENT OF RESTITUTION OF POTATOES BASED ON THE KELVIN- VOIGHT PAIR

EXPERIMENTAL STUDY ON BOTTOM BOUNDARY LAYER BENEATH SOLITARY WAVE

The Second Postulate of Euclid and the Hyperbolic Geometry

Frequency Domain Analysis of Concrete Gravity Dam-Reservoir Systems by Wavenumber Approach

A Queueing Model for Call Blending in Call Centers

Shrinking core model for the reaction-diffusion problem in thermo-chemical heat storage Lan, S.; Zondag, H.A.; Rindt, C.C.M.

Chapter 2: One-dimensional Steady State Conduction

Aalborg Universitet. CFD in Ventilation Design Nielsen, Peter Vilhelm. Publication date: 2009

A Differential Equation for Specific Catchment Area

Assessing the Performance of a BCI: A Task-Oriented Approach

Numerical simulation of a one-dimensional shock tube problem at supercritical fluid conditions

Lecture 3 - Lorentz Transformations

ON-LINE ESTIMATION OF THE VENTILATION RATE OF GREENHOUSES

Simplified Buckling Analysis of Skeletal Structures

The Impact of Roof Pitch and Ceiling Insulation on Cooling Load of Naturally-Ventilated Attics

The universal model of error of active power measuring channel

University of Bristol - Explore Bristol Research

Likelihood-confidence intervals for quantiles in Extreme Value Distributions

Determination of the reaction order

Chapter 2 Lecture 5 Longitudinal stick fixed static stability and control 2 Topics

2. Mass transfer takes place in the two contacting phases as in extraction and absorption.

Singular Event Detection

Effects of Vane Sweep on Fan-Wake/Outlet-Guide-Vane Interaction Broadband Noise

THE EFFECT OF CONSOLIDATION RATIOS ON DYNAMIC SHEAR MODULUS OF SOIL

max min z i i=1 x j k s.t. j=1 x j j:i T j

The Laws of Acceleration

Variation Based Online Travel Time Prediction Using Clustered Neural Networks

Available online at ScienceDirect. Energy Procedia 54 (2014 )

Chapter 3 Lecture 7. Drag polar 2. Topics. Chapter-3

Numerical modeling approaches for multiphase flow and

INFLUENCE OF OPERATING AND CONSTRUCTION PARAMETERS ON THE BEHAVIOR OF HYDRAULIC CYLINDER SUBJECTED TO JERKY MOTION

Speed-feedback Direct-drive Control of a Low-speed Transverse Flux-type Motor with Large Number of Poles for Ship Propulsion

General Closed-form Analytical Expressions of Air-gap Inductances for Surfacemounted Permanent Magnet and Induction Machines

22.54 Neutron Interactions and Applications (Spring 2004) Chapter 6 (2/24/04) Energy Transfer Kernel F(E E')

Directional Coupler. 4-port Network

THE EQUATION CONSIDERING CONCRETE STRENGTH AND STIRRUPS FOR DIAGONAL COMPRESSIVE CAPACITY OF RC BEAM

Chapter 2 Linear Elastic Fracture Mechanics

Chapter 2 Lecture 8 Longitudinal stick fixed static stability and control 5 Topics

Hankel Optimal Model Order Reduction 1

QCLAS Sensor for Purity Monitoring in Medical Gas Supply Lines

Transcription:

Aalborg Universitet Development of the Numerial Shemes and Iteration Proedures Nielsen, Peter Vilhelm Published in: Euroaademy on Ventilation and Indoor Climate Publiation date: 2008 Doument Version Publisher's PDF, also known as Version of reord Link to publiation from Aalborg University Citation for published version (APA): Nielsen, P. V. (2008). Development of the Numerial Shemes and Iteration Proedures. In P. Stankov (Ed.), Euroaademy on Ventilation and Indoor Climate: Course 5: CFD Based Design of Indoor Environment (pp. 18-29). The Center for Researh and Design in Human Comfort, Energy and Environment, CERDECEN, Tehnial University of Sofia. General rights Copyright and moral rights for the publiations made aessible in the publi portal are retained by the authors and/or other opyright owners and it is a ondition of aessing publiations that users reognise and abide by the legal requirements assoiated with these rights.? Users may download and print one opy of any publiation from the publi portal for the purpose of private study or researh.? You may not further distribute the material or use it for any profit-making ativity or ommerial gain? You may freely distribute the URL identifying the publiation in the publi portal? Take down poliy If you believe that this doument breahes opyright please ontat us at vbn@aub.aau.dk providing details, and we will remove aess to the work immediately and investigate your laim. Downloaded from vbn.aau.dk on: april 17, 2018

Development of the numerial shemes and iteration proedures Peter V. Nielsen, Aalborg University Introdution This leture presents the basi theory behind the numerial method as well as the historial development. Some of the problems behind quality ontrol are also illustrated. Main items in this hapter are: One-dimensional ase False diffusion Iteration proedure One-dimensional ase It is not possible to make a diret analyti solution of the differential equation system whih an be established for room air distribution. Therefore, it is neessary to reformulate the differential equations into differene equations for whih solutions an be found by a numerial method. Most of this setion is based on a simple one-dimensional ase. This assumption should failitate the understanding. Although the ase is one-dimensional it an also be onsidered as a small part of a ompliated flow whih is one-dimensional in ertain areas, parallel with grid lines and steady, see figure 1. As a further simplifiation only the transport equation for mass fration per unit of mass miture (e.g. ontaminant distribution) will be addressed in this hapter. This equation an be solved independently of the other flow equations assuming that the veloity and distribution of turbulene are known. The disritization of the Navier Stokes equations and the energy equation are further disussed in Awbi (2003) and in Versteeg and Malalasekera (1995). Figure 1. Four grid points, with neighbouring points, in a flow domain where the flow is one-dimensional, parallel with the grid lines and steady.

The three-dimensional steady state version of this equation is given as ρu + ρv ρw y z = Γ + Γ + Γ + S (1) y y z z And the one-dimensional equation is given as 2 d d ρ u = Γ + S 2 (2) d d where, t and ρ are position, time and density respetively. Γ is the turbulent diffusion oeffiient and S is the speifi soure term. Finite volume epression The flow domain is divided into ells of the size Δ Δy Δz, see Figure 2. Figure 2. Five grid points, WW, W, P, E and EE, and a ell around P with two surfaes, w and e. The finite volume equation for a grid point, P, an either be developed from the transport equation, (Eq. 2), or it an be established diret from the ell shown in Figure 2, see Patankar (1980). The onvetive mass transport to the volume is the differene between the onvetive mass transport through the two surfaes, e and w. ρ ( u u e ) ΔyΔz e e w w The total diffusion over the two surfaes is equal to d Γ d e d d w Δ yδz The soure term is equal to S Δ ΔyΔz The steady state one-dimensional transport equation for ontaminant distribution (mass fration per unit of mass miture) is therefore given by

d d ρ ( uee uww ) = Γ + SΔ (3) d e d w Equation (3) is alled a ontrol volume formulation beause it an be onsidered to be an integration of the transport equation (differential equation (2)) over the length Δ. An important feature is the integral onservation of quantities suh as mass, momentum and energy. This feature is valid not only for eah ontrol volume but also for the total flow domain, and it is independent of the grid distribution. Even a oarse-grid solution ehibits eat integral balanes, Patankar (1980). It is neessary to replae values at the ell surfaes, e and w, with values at the grid points, WW, W, P, E and EE, to obtain the final version of the disretization equation. Differing assumptions are made over the years. The eamples in solution of the transport equation show the onsequenes of different shemes and the development of new shemes used in CFD software today. An original strategy was to let values on ell surfaes and the gradient d/d be replaed by the values obtained from a pieewise linear profile between grid points, as for eample and e ( )/ 2 = + d d e E P E = Δ P The two assumptions for onvetion and diffusion are both of seond order auray. In the following setion the veloity, u, is onsidered to be onstant and the soure term is equal to zero in the flow regime. The finite volume equation will therefore have the form P ( 2Γ + ρδu) W + ( 2Γ ρδu) E 4 Γ = (4) The equation shows the onnetion between the onentration, P, in the grid point, P, and the onentration in the neighbouring points, W and E. Finite differene equation The disretization equation an also be developed as a finite differene equation. The first and the seond derivatives in equation (2) are replaed with the epressions developed from Taylor Series d E W = d Δ 2 d = 2 d W 2 Δ P 2 + E The obtained equation will epress a diret onnetion between the neighbouring grid points. Solution of the transport equation

The finite volume transport equation (4) is often epressed in the general form a P P = a W W + a E E + b (5) As an eample the flow is studied in a ase for whih the length,, is equal to 4, see Figure 3. The veloity, u, is equal to 0.1, and Γ and ρ are both 1.0. The boundary values, o and 3, are equal to 1.0 and 0.0, respetively. u 0 1 2 3 0 1.333 2.667 4 Figure 3. Grid point distribution with four internal grid points. Points 0 and 3 are temporary boundaries for the onedimensional preditions. Figure 4 shows the preditions of the one-dimensional onentration distribution at a low veloity of u = 0.1. The preditions are lose to the straight line between the two boundary values 1.0 and 0.0. The straight line is the solution when the veloity is zero and transport ours only as diffusion. 1.2 1.0 0.8 Central differene, u = 0.1 Diffusion 0.6 0.4 0.2 0.0 0 2 4 Figure 4. Numerial solution of the onentration distribution in a one-dimensional flow field at low veloity (u = 0.1). Eperiene shows that unstable (osillatory or wiggly) solutions are obtained for high veloity, u, or for an inreased grid point distane, Δ. It is shown that the Pelet number u Pe = ρδ Γ (6)

must be smaller than 2 to ensure onvergene and stable solutions. This is a very disadvantageous situation beause most engineering appliations have a high Reynolds number or a high onvetive flu and a small diffusion. Figure 5 shows the solution of Equation (4) for a veloity of u = 3.0. The numerially unstable solution is typial of a ontrol volume formulation with a entral differene in the onvetion term and a large Pelet number (Pe = 4 in this ase). The inrease in onentration,, between the o-ordinations 1 and 2 an not be a physial effet beause the transport equation is without any soure term, but it is a numerial error whih is obtained by the entral differene sheme and a high Pelet number. This was a typial situation in the 1950s and in the 1960s. Solutions with inreasing Reynolds numbers were therefore obtained by reduing the distane between the grid points to get a small Pelet number. On the other hand, this remedy often led to a number of grid points far too high for omputers of that time. It is reognized that onvetion is an asymmetri phenomenon, i.e. the upstream onditions have a greater influene than the downstream onditions. Therefore, it is essential that the disretization sheme reflets this in one way or another, otherwise physially unrealisti solutions might our. 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 Central differene, u = 3.0 Diffusion 0 2 4 Figure 5. Numerial solution of the onentration distribution in a one-dimensional flow at high veloity (u = 3.0). Convetion term with entral differene. A large step forward was therefore taken when Courant et al. (1952) suggested the upwind sheme whih has almost unonditional stability. The upwind sheme defines the values, for eample on the ontrolvolume surfae, w, in the onvetion term by w = W u 0 = u < 0 w P The upwind sheme is of first order of auray. Instead of the mean value given in equation (4) the following disretization equation will be obtained when the upwind sheme is introdued in equation (3) ( Γ + ρδu) P = ( Γ + ρδu) W = Γ E 2 (7)

A solution of a transport equation with an upwind sheme in the onvetion term and high Pelet number (Pe = 4) is shown in Figure 5.6 for both ρ and Γ equal to 1.0. The solution is physially orret with a ontinuously dereasing value as a funtion of the distane,. 1.2 1.0 0.8 0.6 0.4 0.2 0.0 nd 2 order upwind, u = 3.0 st 1 order upwind, u = 3.0 0 2 4 Figure 6. Numerial solution of the onentration distribution in a one-dimensional flow field at high veloity (u = 3.0). First or seond order sheme is used in the onvetion term. In equation (7) the onvetion term is of first order of auray and the diffusion term is of seond order of auray. This means that the whole equation is a first order equation (the lowest order will ount). False diffusion In the early 1970s, it seemed that the use of an upwind sheme had opened the way to make numerial simulations of flow phenomena at indefinitely high Reynolds numbers. However, before the end of the deade it had beome lear that there were errors in the preditions, although high stability was obtained. The error is onneted with a flow whih has an angle to the grid lines, and the error has a maimum at 45. A false or numerial diffusion is the result and it is proportional to the veloity and to the distane between the grid points. Huang et al. (1985) onlude that many studies at the end of the 1970s had a false diffusion whih ould be larger than the atual physial diffusion. An improvement was obtained by introduing an upwind sheme with a seond order of auray. The value on the ell surfae, w, is in this ase based on values in two upstream notes instead of one upstream note 3 1 w = W WW 2 2 u 0 3 1 w = P E 2 2 u 0 The seond order upwind sheme introdued in equation (3) gives the following disretization equation ( 4 Γ + 3ρΔu) P = ρuδww + ( Γ + 4ρΔu) W 2 Γ E + 2 (8) A solution of this transport equation for ρ = 1.0 and Γ = 1.0 is also shown in Figure 6.

The QUICK sheme by Leonard (1979) is another improved sheme for the onvetion term, whih has a small false diffusion and a high auray. The sheme is addressed here, beause it has some of the qualities whih are typial for new shemes in ommerial programs. The sheme an be interpreted as a entral differene sheme with a stabilizing upstream weighted urvature orretion arising from the seond order polynomial fit. The value, w, on the ontrol volume surfae of equation (3) has the following formulation w w 3 3 1 = W + P WW u 0 4 8 8 3 3 1 = P + W E u < 0 4 8 8 The van Leer sheme is a sheme whih also takes into aount the fat that the upstream onditions have a greater influene on the variable in point, P, than the downstream onditions. The treatment of the onvetion in the different shemes is illustrated in Figures 7 and 8. The blak urve shows the analytial solution = f () of mass fration distribution per unit of mass miture. The seond order entral differene is shown in blue for the ell surfae, w, in Figure 7. It indiates that, w, is the mean value of W and P, or in other terms, that a pieewise linear profile is used for the desription of the onvetion term. WW W w P Figure 7. Central differene desription of the ell surfae value w. Figure 8 shows that in a first order upwind sheme the ell surfae value is simply given as the upstream value, W. In the seond order upwind sheme the ell surfae obtains the value etrapolated from the assumption of a straight line through WW and W. In the QUICK sheme three points are used for the formulation of the ell surfae value and it is given from a polynomial fit of the grid points. An inreasing auray is indiated in the Figures 8 A, B and C. It is also obvious that the ell surfae value, w, is unbounded in figures B and C, whih means that, w, might have a value above or below WW, W and P if the urve = f() has a large variation between the grid points. This is a soure of nonphysial wiggles in the predition.

WW W w P WW W w P WW W w P Figure 8. First order upwind sheme (A), seond order upwind sheme (B) and QUICK sheme for ell surfae value, w. The diretion of flow is positive. The seond order upwind sheme and the QUICK sheme were introdued to minimize the false diffusion and Figure 9 illustrates the effet. Figure 9A shows the predition of flow from a wall-mounted opening of the size 6.8 m 52 m loated in a wall 0.5 m below the eiling in a room. The flow is direted upward from the opening (u, v = 3.1, 2.6 m/s) and the preditions are using a grid with 30000 ells. The grid is retangular and the flow lose to the opening has therefore an angle to the grid lines. Figure 9B shows the predited profile below the eiling 1 m from the wall. The two profiles show the large hange whih is obtained by the use of a seond order upwind sheme instead of a first order sheme. Preditions made by a seond order upwind sheme indiate non-physial wiggles whih in this ase are the result of an insuffiient number of grid points. This is also an indiation of the fat that onvergene problems may arise when the seond order upwind sheme is used. Figure 9. Predition of isothermal flow lose to an opening whih is loated in the wall 0.5 m below the eiling. The lower graph shows the veloity distribution below the eiling 1 m from the wall. Svidt (1999). Figure 9B illustrates two different types of error. The first order upwind solution shows a diffusive error and the seond order upwind solution shows a dispersive error.

Figure 10. The Smith and Hutton problem at the top (A), and typial flow in a room with miing ventilation and slot inlet at the bottom (B). The seletion of a numerial sheme with a high order of auray improves the results if it is diffiult to obtain a grid-independent solution. Sørensen and Nielsen (2003) have shown the influene of false diffusion in a ase alled the Smith and Hutton problem (1982). Figure 10A shows the ase. The air is defined as a two-dimensional flow in a death end hannel and the veloities are given by an analytial desription. The situation is typial of room air movement (in ertain areas) with miing ventilation as indiated on the right side of Figure 10B. A transport equation, e.g. the ontaminant transport equation, is solved in the flow field in Figure 10A. This transport equation is without physial diffusion terms. The onentration will therefore be transported along with the flow, preserving the inlet values all the way to the outlet. Consequently, at the outlet any deviations between the eat and the omputed onentration fields are due to inauraies in the numerial solution of the transport equation (false diffusion). Figure 11. Conentration distributions predited by three different disretization shemes. (A): first order upwind sheme, (B): seond order sheme, (C): third order QUICK sheme. Grid size is 80 40 ells. Contours are shown for onentration levels of 0.01, 0.05, 0.5, 1.0, 1.5, 1.95 and 1.99. The omputational grids are made with 80 40 ells in the and y diretions, respetively. Steady alulations are made with three different disretization shemes. Figure 11 shows the onentration distributions for a first order upwind sheme (Figure 11 (A)), a seond order sheme (B) and a third order QUICK sheme (C). Realling that the distribution at the outlet should equal the distribution at the inlet,

the false diffusion is evidened by the large smearing of the distribution. The seond order sheme transports the onentration with less smearing. Finally, the third order sheme transports the onentration almost without hange. Thus, the eample shows that higher order shemes perform signifiantly better than lower order shemes for a given grid size. The preditions in Figure 11 are made by 3200 grid points whih are a small number. An equivalent grid density in the whole room in Figure 10 (with three-dimensional flow) demands about one million grid points whih in pratie is typial of many preditions. Other preditions with a lower and a higher number of grid points are also given by Sørensen and Nielsen (2003). It is shown that an inreased number of grid points improve the first and seond order shemes. The seletion of the numerial sheme has some influene on the results when it is diffiult to obtain grid independent solutions. It is always reommended to use a sheme of seond order auray if it is available and if onvergene an be obtained, see Casey and Wintergerste (2000) and Sørensen and Nielsen (2003). Iteration proedure The one-dimensional ase is finalized by the following disussion of the iteration proedure. Older methods are mentioned beause they ehibit, in an illustrative way, the typial problems in numerial methods. A Gauss-Seidel proedure was used earlier in the 1960s, while a Tri-Diagonal-Matri has been used together with a line-by-line up to now. The Gauss-Seidel iteration is a very simple method in whih the values of the variable are alulated by visiting eah grid point in a ertain order. The disretization equation (Eq. 5) an be rearranged in the form P = C W W + C E E + D (9) where C w = a W /a P, C E = a E /a P and D = b/a P Figure 12. Temporary boundaries and grid distribution for the one-dimensional test ase in setion 5.2. Figure 12 shows the grid distribution for the one-dimensional test ase. o and m+1 are temporary boundaries for the one-dimensional preditions. The figure shows how P is alulated from the neighbour points. One of the points has been updated ( W ) and the other point has the value from the earlier iteration. All m grid points are visited during iterations n + 1 aording to the disretization equation for the test ase = C + C n+ 1 n+ 1 n+ 1 P W W n E n E The value of a point P will onverge towards the level whih is the solution of all the algebrai equations during the iteration.

A grid distribution as shown in Figure 3 gives the following disretization equation in the grid points 1 and 2 in the ase of a low veloity and a entral differene assumption in the onvetive terms. = 1.333 1 = 0.4667 2 + 0.5333 = 2.667 2 = 0.5333 1 Table 1 shows the onverged Gauss-Seidel iteration of the equation with 0.0 as the internal starting values. Table 1. Gauss-Seidel iteration of the equation system based on the grid in Figure 3. n 0 1 2 3 o 1.000 1.000 1.000 1.000 1 0.000 0.5333 0.6660 0.6991 2 0.000 0.2844 0.3552 0.3728 3 0.000 0.000 0.000 0.000 n 4 5 6 7 o 1.000 1.000 1.000 1.000 1 0.7073 0.7093 0.7098 0.7100 2 0.3772 0.3783 0.3786 0.3786 3 0.000 0.000 0.000 0.000 The disretization equation an also be rearranged in the Tri-Diagonal-Matri Algorithm (TDMA) = 1.333 BV + a P 1 + a E 2 = 0 = 2.667 a W 1 + a P 2 + BV = 0 The TDMA method is a diret solution of the above equation system. 1 in the seond equation is substituted by 1 = fun ( 2 ) from the first equation whereby 2 known. 1 is then found by baksubstitution. The proess an be made for any number m of equations in the -diretion. The solution of the disretization equations for the one-dimensional test ase an thus be obtained diret by the TDMA method. This method is also alled the Thomas algorithm or the Gaussian-elimination method. The designation TDMA refers to the three diagonals in the matri formed by the oeffiients of the disretization equation.

Boundary values Known values Unknown values Figure 13. Two-dimensional representation of the line-by-line method. The line-by-line method is a onvenient ombination of the TDMA method for one-dimensional situations and the Gauss-Seidel method. Figure 13 shows how the line-by-line method an be used for the twodimensional situation. The neighbour points to a line with unknown values are assumed to be known from the latest iteration. The TDMA method is used at the line with unknown values with the effet that the boundary onditions are transmitted into the inner field in an effiient way. The net line is now treated as a line with unknown values, while the neighbour points have the known values, and the TDMA method is repeated at this line. Figure 13 indiates how this proess sweeps over all the grid points during one iteration. The sweep diretion an be hanged. It is always effiient to onsider the sweep diretion in onnetion with the flow field whih has to be predited. Sweeps in the flow diretion should e.g. be used when onvetion ours in the flow field. The oupling between pressure and veloity is handled by a SIMPLE proedure. This proedure uses the staggered grid for the veloities in order to avoid non-physial osillations in the pressure field. Furthermore, the ontinuity equation is rewritten as an equation for pressure orretion. A detailed desription is given by Patankar (1980) and Versteeg and Malalasekera (1995). The proedures desribed here are the lassial ones and serve as an easily understandable starting point for more sophistiated numerial solution tehniques. Modern algorithms handle more omple ell forms too and usually apply multi-grid aeleration tehniques. The multi-grid method is based on the observation that numerial wiggling are espeially damped for wiggling patterns whih have a periodiity of the same length as the grid distane. Larger wavelength wiggling patterns are muh less affeted by suessive iterations. Therefore a oarser grid is onstruted (typially a oarsening fator of 2 is used), and the values are interpolated from the original grid and some iterations are performed on this grid. Sometimes an even oarser grid is formed and the same proedure is applied. After that the intermediate solution is transferred bak to the less oarse grid, and iterations are done. This solution is then transferred to the original grid and further iterations are performed. In total the proedure aelerates the onvergene onsiderably. Figure 14 shows an eample of an iteration proedure on grids of different oarsenesses. The eat proedure is adjusted to the properties of the speifi ode. All the steps desribed are performed automatially without need of a user interation. The method is used in most modern odes.

Original grid Coarse grid1 Coarse grid 2 Figure 14. Multi-grid method. Above: 2 oarser grids formed from original grid. Below: Shemati drawing of suessive iterations on different grids. Literature Awbi, H. B. 2003. Ventilation of Buildings, 2 nd edition, Taylor and Franis, London. Casey, M. and Wintergerste, T. (Editors). 2000. Best Pratie Guidelines. ERCOFTAC Speial Interest Group on Quality and Trust in Industrial CFD. Courant, R., Isaason, E. and Ress, M. 1952. On the Solution of Non-Linear Hyperboli Differential Equations by Finite Differenes. Comm. Pure Appl. Math. Vol. 5, 243. Huang, P. G., Launder, B. E. and Leshziner, M. A. 1985. Disretization of Nonlinear Convetion Proesses: A Broad-Range Comparison of Four Shemes. Comp. Methods. In App. Meh. and Eng., Vol. 48, 1. Leonard, B. P. 1979. A Stable and Aurate Convetive Modelling Proedure Based on Quadrati Upstream Interpolation. Comp. Methods in App. Meh. and Eng., Vol. 19, 59. Patankar, S. V. 1980. Numerial Heat Transfer and Fluid Flow. Hemisphere Publishing Corporation. Smith, R.M. and Hutton, A.G. (1982) The numerial treatment of advetion: a performane omparison of urrent methods, Numerial Heat Transfer, 5(4), 439-461 Sørensen, D. N. and Nielsen, P. V. 2003. Quality Control of Computational Fluid Dynamis in Indoor Environments. International Journal of Indoor Environment and Health, Indoor Air 2003, Vol. 13, no. 1, pp. 2-17. Svidt, K. 1999. Private ommuniation. Aalborg University.

Versteeg, H. K. and Malalasekera, W. 1995. An Introdution to Computational Fluid Dynamis The Finite Volume Method, Longman Sientifi & Tehnial, Longman Ltd, England.