Engineering - Fluid Dynamics - Shallow Liquid Simulation Usi

Engineering - Fluid Dynamics - Shallow Liquid Simulation...

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

View Full Document Right Arrow Icon
AMATH 581 Homework 2 Shallow Liquid Simulation Erik Neumann 610 N. 65th St., Seattle, WA 98103 [email protected] November 19, 2001 Abstract A model of shallow fluid behavior is evaluated using a variety of nu- merical solving techniques. The model is defined by a pair of partial dif- ferential equations which have two dimensions in space and one dimension of time. The equations concern the vorticity ω and the stream function ψ which are related to the velocity field of the fluid. The equations are first discretized in time and space. The time behavior is evaluated using a Runge-Kutta ordinary differential equation solver. The spatial behavior is solved using either Fast Fourier Transform, Gaussian Elimination, LU Decomposition, or iterative solvers. The performance of these techniques is compared in regards to execution time and accuracy. Contents 1 Introduction and Overview 2 2 Theoretical Background 4 2.1 Solving for ψ - Matrix Method . . . . . . . . . . . . . . . . . . . 5 2.2 Solving for ψ - FFT Method . . . . . . . . . . . . . . . . . . . . . 6 2.3 Discretize the Advection-Diffusion Equation . . . . . . . . . . . . 6 3 Algorithm Implementation and Development 7 3.1 Construction of Matrix A . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Construction of Matrix B . . . . . . . . . . . . . . . . . . . . . . 9 3.3 Pinning the Value of ψ (1 , 1) . . . . . . . . . . . . . . . . . . . . . 10 1
Image of page 1

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

View Full Document Right Arrow Icon
3.4 Comparing Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5 An FFT problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4 Computational Results 11 4.1 Results for various initial conditions . . . . . . . . . . . . . . . . 11 4.2 Running times . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Accuracy of solvers . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.4 Symmetry of Solution . . . . . . . . . . . . . . . . . . . . . . . . 18 4.5 Time Resolution Needed . . . . . . . . . . . . . . . . . . . . . . . 18 4.6 Mesh Drift Instability . . . . . . . . . . . . . . . . . . . . . . . . 18 5 Summary and Conclusions 21 A MATLAB functions used 22 B MATLAB code 23 B.1 evhump.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 B.2 evrhs.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 B.3 wh.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 B.4 fr.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 B.5 ev2.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 C Calculations 34 1 Introduction and Overview We consider the governing equations associated with shallow fluid modeling. The intended application is the flow of the earth’s atmosphere or ocean circu- lation. The model assumes a 2-dimensional flow, with not much movement up or down. Another assumption is that the fluid is shallow, ie. that the vertical dimension is much smaller than the horizontal dimensions. The velocity field is given by the set of vectors v at each point with components v = u v w (1) 2
Image of page 2
where u is the x component of the velocity, v is the y component of the velocity and so on. The height of the fluid is given by h ( x, y, t ). From conservation of mass we can derive the following h t + ( hu ) x + ( hv ) y = 0 (2) Conservation of momentum leads to the following two equations ( hu ) t + ( hu 2 + 1 2 gh 2 ) x + ( huv ) y = fhv (3) ( hv ) t + ( hv 2 + 1 2 gh 2 ) y + ( huv ) x = - fhu (4) Next, assume that h is constant (to leading order). Then equation (2) becomes u x + v y = 0 (5) which expresses that this is an incompressible flow. We can define the stream function ψ by u = - ψ y v = ψ x (6) which automatically satisfies the incompressibility of equation (5). The remain- ing two equations become u t + 2 uu x + ( uv ) y = fv (7) v t + 2 vv y + ( uv ) x = - fu (8) Define the vorticity ω by ω = v x - u y . (9) We can simplify these equations as follows. Subtract the y -derivative of (7) from the x -derivative of (8) and use equations (5) and (9) to simplify (see appendix C for details). The result is ω t + x + y = 0 (10)
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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