# Day08-slides - Program 2 - in C The following approach...

This preview shows pages 1–3. Sign up to view the full content.

1 Atms 502 Numerical Fluid Dynamics Tue., Sep. 19, 2006 9/29/06 Atms 502 - Fall 2006 - Jewett 2 Program 2 -- in C The following approach seems to work: #deﬁne NX 25 #deﬁne BC_WIDTH 1 #deﬁne I1 BC_WIDTH #deﬁne I2 I1+NX-1 #deﬁne NXDIM NX+2*BC_WIDTH update(u1,i1,i2,nx) ﬂoat u1[ ]; int i1,i2,nx; { int i; for (i=i1; i<=i2; i++) u1[i]=u2[i]; } update(u1,nx) ﬂoat u1[ ]; int nx; { int i; for (i=1; i<=nx; i++) u1[i]=u2[i]; } OLD NEW 9/29/06 Atms 502 - Fall 2006 - Jewett 3 Discrete-Dispersion Relation Physical root behavior: 2 x speed is … Lagging phase error (decelerating) how do we know this? c phys = " phys k = 1 k # t arcsin μ sin k # x ( ) c phys \$ c 1 % k 2 # x 2 6 1 % 2 ( ) ( ) * + For small k x - Durran calls “in limit of good spatial resolution” 9/29/06 Atms 502 - Fall 2006 - Jewett 4 Takacs (1985) Considerations : Odd-order schemes generally dissipative (upstream) Even-order schemes generally dispersive (leapfrog) Constructs scheme with “some of improved phase characteristics associated w/third-order scheme” Second-order schemes : 4th-order amplification errors 3rd-order phase errors Extra point => 3rd-order accuracy, reducing phase error Takacs pp. 1051-1052

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 9/29/06 Atms 502 - Fall 2006 - Jewett 5 Takacs (1985) Amplitude error (Fig. 1) θ is k x ; μ is Courant number Odd-order schemes most dissipative Even-order schemes least dissipative
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/06/2009 for the course ATMOSPHERI 502 taught by Professor Jewett during the Spring '09 term at University of Illinois at Urbana–Champaign.

### Page1 / 5

Day08-slides - Program 2 - in C The following approach...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online