Solving the Navier-Stokes! Equations in Primitive Variables!



Similar documents
What is Computational Fluid Dynamics (CFD)?!

Soving Recurrence Relations

Systems Design Project: Indoor Location of Wireless Devices

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

Sequences and Series

Heat (or Diffusion) equation in 1D*

Modified Line Search Method for Global Optimization

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized?

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

Chapter 5 Unit 1. IET 350 Engineering Economics. Learning Objectives Chapter 5. Learning Objectives Unit 1. Annual Amount and Gradient Functions

LECTURE 13: Cross-validation

Lesson 15 ANOVA (analysis of variance)

How To Solve The Phemean Problem Of Polar And Polar Coordiates

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth


CHAPTER 3 THE TIME VALUE OF MONEY

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

BENEFIT-COST ANALYSIS Financial and Economic Appraisal using Spreadsheets

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

S. Tanny MAT 344 Spring be the minimum number of moves required.

Department of Computer Science, University of Otago

INVESTMENT PERFORMANCE COUNCIL (IPC)

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

2-3 The Remainder and Factor Theorems

. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2

A probabilistic proof of a binomial identity

Solutions to Selected Problems In: Pattern Classification by Duda, Hart, Stork

Basic Elements of Arithmetic Sequences and Series

Building Blocks Problem Related to Harmonic Series

NEW HIGH PERFORMANCE COMPUTATIONAL METHODS FOR MORTGAGES AND ANNUITIES. Yuri Shestopaloff,

Domain 1: Designing a SQL Server Instance and a Database Solution

Original Research Comparison of Analytical and Numerical Solutions for Steady, Gradually Varied Open-Channel Flow

Partial Di erential Equations

Confidence Intervals for One Mean

Learning objectives. Duc K. Nguyen - Corporate Finance 21/10/2014

Lesson 17 Pearson s Correlation Coefficient

Chapter 5: Inner Product Spaces

The Binomial Multi- Section Transformer

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 8

Chapter 7 Methods of Finding Estimators

Present Value Factor To bring one dollar in the future back to present, one uses the Present Value Factor (PVF): Concept 9: Present Value

CS103X: Discrete Structures Homework 4 Solutions

AP Calculus AB 2006 Scoring Guidelines Form B

5: Introduction to Estimation

Research Article Sign Data Derivative Recovery

The Fundamental Forces of Nature

Infinite Sequences and Series

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

Intelligent Sensor Placement for Hot Server Detection in Data Centers - Supplementary File

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

Domain 1: Identifying Cause of and Resolving Desktop Application Issues Identifying and Resolving New Software Installation Issues

The EOQ Inventory Formula

Chapter System of Equations

(VCP-310)

Smooth Surface Extraction from Unstructured Point-based Volume Data Using PDEs

1. C. The formula for the confidence interval for a population mean is: x t, which was

Cooley-Tukey. Tukey FFT Algorithms. FFT Algorithms. Cooley

Solving Logarithms and Exponential Equations

Time Value of Money, NPV and IRR equation solving with the TI-86

Finding the circle that best fits a set of points

Understanding Financial Management: A Practical Guide Guideline Answers to the Concept Check Questions

Domain 1: Configuring Domain Name System (DNS) for Active Directory

SPE Copyright 2001, Society of Petroleum Engineers Inc.

Escola Federal de Engenharia de Itajubá

Lecture 3. denote the orthogonal complement of S k. Then. 1 x S k. n. 2 x T Ax = ( ) λ x. with x = 1, we have. i = λ k x 2 = λ k.

Properties of MLE: consistency, asymptotic normality. Fisher information.

When the rate of heat transfer remains constant during a process

3 Energy Non-Flow Energy Equation (NFEE) Internal Energy. MECH 225 Engineering Science 2

Theorems About Power Series

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number.

Evaluating Model for B2C E- commerce Enterprise Development Based on DEA

Chapter 10 Computer Design Basics

An Area Computation Based Method for RAIM Holes Assessment

Our aim is to show that under reasonable assumptions a given 2π-periodic function f can be represented as convergent series

I. Why is there a time value to money (TVM)?

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n

Entropy of bi-capacities

Find the inverse Laplace transform of the function F (p) = Evaluating the residues at the four simple poles, we find. residue at z = 1 is 4te t

THE HEIGHT OF q-binary SEARCH TREES

Using Four Types Of Notches For Comparison Between Chezy s Constant(C) And Manning s Constant (N)

Determining the sample size

INFINITE SERIES KEITH CONRAD

Incremental calculation of weighted mean and variance

The analysis of the Cournot oligopoly model considering the subjective motive in the strategy selection

Verifying Numerical Convergence Rates

Notes on exponential generating functions and structures.

Numerical Methods for the Solution of Partial Differential Equations

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Part II: Finite Difference/Volume Discretisation for CFD

I. Chi-squared Distributions

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Security Functions and Purposes of Network Devices and Technologies (SY0-301) Firewalls. Audiobooks

CHAPTER 11 Financial mathematics

FINITE DIFFERENCE METHODS

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

1 Computing the Standard Deviation of Sample Means

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Class Meeting # 16: The Fourier Transform on R n

Integer Factorization Algorithms

Solving equations. Pre-test. Warm-up

Transcription:

ttp://www.d.edu/~gtryggva/cfd-course/ Outlie Solvig te Navier-Stokes Equatios i Primitive Variables Te projectio metod review Metods for te Navier-Stokes Equatios Moi ad Kim Bell, et al Colocated grids Boudary coditios Grétar Tryggvaso Sprig 011 u +1 i, j "u +1 = 0 Discretizatio i time Summary of discrete vector equatios = A i, j # + D i, j Costrait o velocity No explicit equatio for te pressure Evolutio of te velocity Split t u Discretizatio i time u +1 i, j = A i, j # + D i, j ito ad = A i, j + D i, j t # u +1 t u = # P u +1 t by itroducig te temporary velocity u t Projectio Metod + A i, j # ( + D i, j ) +1 t # "u +1 = 0 Discretizatio i time To derive a equatio for te pressure we take te divergece of ad use te mass coservatio equatio Te result is 0 "u +1 t = " # t " = 1 # u t i, j t u Discretizatio i time 1. Fid a temporary velocity usig te advectio ad te diffusio terms oly: ( + D i, j ) + t "A. Fid te pressure eeded to make te velocity field icompressible = 1 # u t i, j 3. Correct te velocity by addig te pressure gradiet: u +1 t = u #

Algoritm Iitial field give Determie u, v boudary coditios Poisso equatio for t=t+δt ( A ) Advect u + t i, j = ui, j + " t i, j Di, j P i, (iteratio) Projectio u +1 t = u # j Forward i time, cetered i space (summary): u * u p = 1 u* u +1 = u * p Time step limitatios = A ( u ) + # u t " # & t " 1 U 4 # were U = max(u + v ) Forward i time, cetered i space: t adv " # & t U diff " 1 4 # Defie = L U Terefore te odimesioal time step is: t' = t " # U U L = Re t' = t " # 1 U 4 L = 1 ( ad ' * Re 4 & L) Forward i time, cetered i space: Δt 0 for Re 0 ad Re Wat is te maximum timestep? t' = Re t' = 1 Δt " ' Re 4 # L& Icreasig Re t' max = ad t' max = 1 8 L L Ad Δt 0 for Re 0 ad Re 0 Re Advaced Solvers For low Re, use implicit metods for diffusio term For ig Re, use stable advectio scemes Combie bot for scemes iteded for all Re Fully Implicit u +1 u = 1 A(u ) + A(u +1 ) u +1 = 0 Solve by iteratio [ ( ) +# ( u + u +1 )] p Rarely used due to te complicatios of te oliear system tat must be solved for te advectio terms

Predictor-Corrector A secod order metod ca be developed by first takig a forward step, te a backward step ad average te results: u * u = #u u + # u # p * = 1 # u* u 1 = u * #p * Backward step usig te predicted velocity: u ** u 1 = #u 1 u 1 +# u 1 # p ** = 1 ** # u u = u ** #p ** Te average te results u +1 = 1 ( u + u ) Adam-Basford/Crak-Nicolso u +1 u # = 3 A(u ) 1 A(u1 ) & + ' ( u + ( u +1 ( ) u +1 = 0 Split: u u = # 3 A(u ) 1 A(u1 ) & + ' ( u +1 - u = (p + ' ( u +1 ( ) u +1 = 0 ( ) (p u p = 1 # u Te correctio equatio is implicit ad must be solved by a iteratio i te same way as te pressure equatio Metod of Kim ad Moi (JCP 59 (1985), 8-3) u u = # 3 A(u ) 1 A(u1 ) & + ' ( u + ( u u +1 u = () ( * u +1 = 0 " = 1 #t u ( ) Te first equatio is implicit ad must be solved by a iteratio i te same way as te pressure equatio Notice tat Φ is ot exactly p. Addig te first two equatios gives u +1 u # = 3 A(u ) 1 A(u1 ) & + ' ( u + ( u +1 Were we ave added ad subtracted a implicit diffusio term. Usig u +1 u = # we ca rewrite te last terms as: ( " u #" u +1 ) #" = " #" = "p ( ) + ' ( ( u ( u +1 ) () p Metod of Bell, Colella ad Glaz (JCP 85 (1989), 7-83) u +1 u u +1 = 0 = A(u +1/ ) + # ( u + u +1 ) p A Goduov metod is used for te advectio terms A complete Ruge-Kutta time itegratio (Weia E.) First a alf step: u * u 1 = #u u +# u # p * = # u * u 1 = u * #p * cotiue for te secod step: u ** u 1 = #u 1 u 1 +# u 1 # p ** = ** # u u = u ** ** #p

A complete Ruge-Kutta time itegratio (cotiued) Take a full step usig te predicted velocity Te compute Ad fially u *** u = #u u +# u # p *** = 1 *** # u u 3 = u *** #p *** k = t("#u 3 u 3 +# u 3 ) u + = 1 3 ( u + u 1 + u + u 3 ) + 1 k 6 " p + = 1 #t " u + u +1 = u + #t"p + Simplified Fourt order metod u * u 1 = #u u +# u u ** u * 1 = #u * u * +# u * u *** u = #u * u * +# u * ( ) + ( ) u + = 1 3 u + u * + u ** + u *** # p + = 1 # u+ u +1 = u + #p + 6 #u *** u *** +# u *** Colocated grids Colocated grids Altoug staggered grids ave bee very successful, i some cases it is desirable to use co-located (or colocated) grids were all variables are located at te same pysical poit. Staggered grids vi,j+1/ Colocated grids v * A(u i, j ) u +1 i, j = u * i, j (p e p w ) u +1 e u +1 w + v +1 v +1 s = 0 Split equatios for te u velocity ui-1/,j Pi,j vi,j-1/ ui+1/,j u w P i,j,u i,j,v i,j u e v s First idea: use averagig for te variables o te edges: p e = 1 ( p i+1, j + p i, j ) u e = 1 ( u i+1, j + ) All variables are stored at te same locatio +1 * +1 * # 1 p + i, j ( ) 1 ( p + p i, j i1, j ) ( p i1, j ) & ( '

Substitutig ito yields u e = 1 ( u i+1, j + ) ad u e +1 u w +1 + v +1 v s +1 = 0 u +1 * i, j p i +,j + p i, j + p i, j + + p i, j 4 p i, j = ( p i+1, j p i, j1 ) * * * * ( u i+1, j u i1, j + v i, j +1 v i, j1 ) A straigt forward applicatio discretizatio o colocated grids results i a very wide stecil for te pressure Te pressure poits are also ucoupled ad te pressure field ca develop oscillatios Te remedy is to fid te pressures tat make te edge velocities icompressible Te Rie ad Cow metod Istead of iterpolatig (te fial velocity) u +1 e = 1 u +1 +1 + ) Rie ad Cow. AIAA Joural. 1 (1983), 155-153. iterpolate (te itermediate velocity) u * e = 1 u * * + ) v u w P i,j,u i,j,v i,j u e ad te fid u +1 e = u * e ( p i, j ) I effect, preted we are usig a staggered grid v s Substitute ( ) u +1 e = u * e p i, j ito u e +1 u w +1 + v +1 v s +1 = 0 were givig # u e* ( p i, j ) & # u * w ( p i, j p i1, j ) & u * e = 1 u * * + ) # + v * p p ( i, j +1 i, j )& # v * s p p ( i, j i, j 1 )& = 0 Rearrage: + p i1, j + p i, j +1 + p i, j 1 4 p i, j = u * e u * w + v * * v s ( ) Substitutig for te velocities: + p i1, j + p i, j +1 + p i, j 1 4 p i, j = u * * * * u i1, j + v i, j +1 v i, j 1 ) For te correctio of te mometum equatio we still use te average of te pressures givig +1 * p e = 1 ( p i+1, j + p i, j ) ( p i+1, j p i1, j )

Te boudary coditios for te velocity are ow very simple: Te velocity at odes o te wall is simply te wall velocity. Te pressure boudary is more complex: Fid te pressure gradiet by applyig te Navier- Stokes equatios at a poit at te boudary # "v + u"v "x + v "v & "y ' = ("p "y + µ # " v + " v & ) "x "y ' At te wall, most of te terms are zero p y = µ v p i, = µ " v # y "y Evaluated by oe-sided differeces i, p i, = µ v v i, + v i,3 Defie: We ca write: p i, = µ v v i, + v i,3 p i, = v * ( ) = µt ( ) v * = t p " p i, v " v i, + v i,3 Write te pressure equatio for j= p i +1, + p i1, + p i,3 + p 4 p i, = Ad use p i, = v * For te pressure at j=1 * * * * ( u i +1, u i1, + v i,3 v ) i, Te algoritm is terefore: 1. First fid predicted velocities: A(u ) ad = v i, j A(v ) *. Fid pressure by solvig: + p i1, j + p i, j +1 + p i, j 1 4 p i, j = u * * * * u i1, j + v i, j +1 v i, j 1 ) suitably modified at te boudaries 3. Correct te velocities: +1 * ( ) ad p i+1, j p i1, j * v i, j v i, j +1 * = v i, j ( p i, j +1 p i. j1 ) projectio metod i primitive variables o a colocated mes x=19;y=19;dt=0.005;step=300;mu=0.1;maxit=0;beta=1.;=1/x; time=0; u=zeros(x,y);v=zeros(x,y);p=zeros(x,y); ut=zeros(x,y);vt=zeros(x,y); u(:x-1,y)=1.0; for is=1:step for i=:x-1,for j=:y-1 ut(i,j)=u(i,j)+dt*(-(0.5/)*(u(i,j)*(u(i+1,j)-u(i-1,j))+v(i,j)*(u(i,j+1)-u(i,j-1)))+(mu/^)*(u(i+1,j)+u(i-1,j)+u(i,j+1)+u(i,j-1)-4*u(i,j))); vt(i,j)=v(i,j)+dt*(-(0.5/)*(u(i,j)*(v(i+1,j)-v(i-1,j))+v(i,j)*(v(i,j+1)-v(i,j-1)))+ (mu/^)*(v(i+1,j)+v(i-1,j)+v(i,j+1)+v(i,j-1)-4*v(i,j))); ed,ed vt(:x-1,1)=(mu*dt/^)*(v(:x-1,3)-*v(:x-1,)); vt(:x-1,y)=(mu*dt/^)*(v(:x-1,y-)-*v(:x-1,y-1)); ut(1,:y-1)=(mu*dt/^)*(u(3,:y-1)-*u(,:y-1)); ut(x,:y-1)=(mu*dt/^)*(u(x-,:y-1)-*u(x-1,:y-1)); for it=1:maxit solvig for pressure p(:x-1,1)=p(:x-1,)+(/dt)*vt(:x-1,1); p(:x-1,y)=p(:x-1,y-1)-(/dt)*vt(:x-1,y); p(1,:y-1)=p(,:y-1)+(/dt)*ut(1,:y-1); p(x,:y-1)=p(x-1,:y-1)-(/dt)*ut(x,:y-1); for i=:x-1,for j=:y-1 p(i,j)=beta*0.5*(p(i+1,j)+p(i-1,j)+p(i,j+1)+p(i,j-1)- (0.5*/dt)*(ut(i+1,j)-ut(i-1,j)+vt(i,j+1)-vt(i,j-1)))+(1-beta)*p(i,j); ed,ed p(floor(x/),floor(y/))=0.0; set te pressure i te ceter. Needed sice bc is ot icorporated ito eq ed u(:x-1,:y-1)=ut(:x-1,:y-1)-(0.5*dt/)*(p(3:x,:y-1)-p(1:x-,:y-1)); v(:x-1,:y-1)=vt(:x-1,:y-1)-(0.5*dt/)*(p(:x-1,3:y)-p(:x-1,1:y-)); time=time+dt old off,quiver(flipud(rot90(u)),flipud(rot90(v)),'r'); old o;axis([1 x 1 y]);axis square,pause(0.01) ed plot(*u(floor(y/),1:x)+floor(x/),1:x),old o; plot([1,x],[floor(y/),floor(y/)]),plot([floor(x/),floor(x/)],[1,y]) plot(*v(1:x,floor(y/))+floor(y/));axis square,axis([1,x, 1,y])

Colocated grids 18 16 14 1 Wy colocated grids: Sometimes simpler for body fitted grids Easy to use metods for yperbolic equatios Easier to implemet AMR Some people just do t like staggered grids 8 6 4 4 6 8 1 14 16 18 Boudary coditios Boudary coditios Iflow ad outflow Fully eclosed flow Drive cavity Iteral flow (iflow & outflow) Exteral flow Flow over bodies For fully eclosed domais, suc as i te drive cavity problem, te applicatio of te boudary coditios is relatively straigt forward. Te Backward Facig Step Problem For domais wit iflows it is usually reasoable to specify te velocity profile at te ilet Te major problem is ow to adle outflow boudaries i suc a way tat te fluid leaves i a pysically plausible way u = u(y) v = 0 Velocity give v u

u P v x+1,j u x,j P x,j u x+1,j v u P u u v x+,j v u v u(x+1,j)=u(x,j); v(x+,1:y+1)=v(x+1,1:y+1); Example For te pressure, obtai a equatio by applyig coservatio of mass to te cotrol volume ext to te boudary p(x,j)=(1/)*(p(x,j+1)+p(x,j-1)-(/dt)*(v(x+1,j+1)-v(x+1,j))); Simplified Backward Facig Step Problem 0 18 Velocity 16 u = u(y) v = 0 Velocity give v u Velocity gradiet give 14 1 8 6 4 0 0 5 15 0 5 30 35 Velocity+vorticity Pressure 18 16 0.5 14 0 1-0.5-1 8-1.5-6 4 -.5 40 30 0 5 15 0 5 30 0 0 0 5 15 Iflow

Periodic Boudary coditios I may cases it is possible to use periodic boudary coditios, were wat flows out troug oe boudary reappears flowig i troug te opposite boudary. Suc coditios are particularly suitable for teoretical studies of idealized flows. For suc boudaries it is easiest to specify te pressure drop, but by adjustig te pressure gradiet it is possible to specify te volume flux Exteral flow Free stream (uiform flow, for example) Free outflow Boudary of computatioal domai Oter ways to deal wit free-stream boudaries Iclude potetial flow perturbatio Compute flow from vorticity distributio Map te boudary at ifiity to a fiite distace Te two-dimesioal programs developed i te project ad sow ere ca be exteded to fully tree-dimesioal flows i a relatively straigt forward way, replacig u(i,j) by u(i,j,k), etc. Te time required to ru te code icreases sigificatly ad visualizig te output becomes more callegig. Fudametally, te specificatio of te boudary coditios does ot ave a uique solutio ad is also faced by experimetalists. However, by takig te boudaries far away ad ceckig te solutio for te effect of movig te boudaries, good results ca be obtaied