{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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: #define NX 25 #define BC_WIDTH 1 #define I1 BC_WIDTH #define I2 I1+NX-1 #define NXDIM NX+2*BC_WIDTH update(u1,i1,i2,nx) float u1[ ]; int i1,i2,nx; { int i; for (i=i1; i<=i2; i++) u1[i]=u2[i]; } update(u1,nx) float 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
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern