The fountain that math built 221 The Fountain that math Built lex Mccauley Josh michener Adrian Miles North Carolina School of Science and Mathematics Durham, NC Advisor: Daniel J. Teague Introduction We are presented with a fountain in the of a large plaza, which we wish to be as attractive as possible but not to passersby on windy day Dur task is to design an algorithm that controls the flow rate of the fountain given input from a nearby anemometer. During calm, the fountain sprays out water at a steady rate. When the wind picks up, the flow should be attenuated so as to keep the water within the fountains pool; in this way, we strike a balance between esthetics and comfort We consider the water stream from the fountain as a collection of different sized droplets that initially leave the fountain nozzle in the shape of a perfect cylinder. This cylinder is broken into its component droplets by the wind, with smaller droplets carried farther. In the reference frame of the air, a droplet is moving through stationary air and experiencing a drag force as a result; since the air is moving with a constant velocity relative to the fountain, the force on the droplet is the same in either frame of reference Modeling this interaction as laminar flow, we arrive at equations for the drag forces. From these equations, we derive the acceleration of the droplet, which we integrate to find the equations of motion for the droplet. These allow us to find the time when the droplet hits the ground and-assuming that it lands at the very edge of the pool-the time when it reaches its maximum range from the horizontal position equation. Equating these and solving the initial flow rate, we arrive at an equation for the optimal flow rate at a given constant wind speed. Since the wind speeds are not constant, the algorithm must make its best prediction of wind speed and use current and previous wind speed measurements to damp out transient variations The UMAP Journal23(3)(2002)221-234. Copyright 2002 by COMAP, Inc. All rights reserved Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial dvantage and that copies bear this notice. Abstracting with credit is permitted but copyrights for components of this work owned by others than COMAP must be honored. To copy otherwise, republish, to post on servers, or to redistribute to lists requires prior permission from COMAP
The Fountain That Math Built 221 The Fountain That Math Built Alex McCauley Josh Michener Jadrian Miles North Carolina School of Science and Mathematics Durham, NC Advisor: Daniel J. Teague Introduction We are presented with a fountain in the center of a large plaza, which we wish to be as attractive as possible but not to splash passersby on windy days. Our task is to design an algorithm that controls the flow rate of the fountain, given input from a nearby anemometer. During calm, the fountain sprays out water at a steady rate. When the wind picks up, the flow should be attenuated so as to keep the water within the fountain’s pool; in this way, we strike a balance between esthetics and comfort. We consider the water stream from the fountain as a collection of differentsized droplets that initially leave the fountain nozzle in the shape of a perfect cylinder. This cylinder is broken into its component droplets by the wind, with smaller droplets carried farther. In the reference frame of the air, a droplet is moving through stationary air and experiencing a drag force as a result; since the air is moving with a constant velocity relative to the fountain, the force on the droplet is the same in either frame of reference. Modeling this interaction as laminar flow, we arrive at equations for the drag forces. From these equations, we derive the acceleration of the droplet, which we integrate to find the equations of motion for the droplet. These allow us to find the time when the droplet hits the ground and—assuming that it lands at the very edge of the pool—the time when it reaches its maximum range from the horizontal position equation. Equating these and solving the initial flow rate, we arrive at an equation for the optimal flow rate at a given constant wind speed. Since the wind speeds are not constant, the algorithm must make its best prediction of wind speed and use current and previous wind speed measurements to damp out transient variations. The UMAP Journal 23 (3) (2002) 221–234. c Copyright 2002 by COMAP, Inc. All rights reserved. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice. Abstracting with credit is permitted, but copyrights for components of this work owned by others than COMAP must be honored. To copy otherwise, to republish, to post on servers, or to redistribute to lists requires prior permission from COMAP
222 The UMAP Journal 23.3(2002) Our final solution is an algorithm that takes as its input a series of wind speed measurements and determines in real time the optimal flow rate to max imize the attractiveness of the fountain while avoiding splashing passers excessively. Each iteration, it adds an inputted wind speed to a buffer of pre- vious measurements. If the wind speed is increasing sufficiently, the last 0.5 s of the buffer are considered; otherwise, the last l s is. The algorithm computes a weighted average of these wind speeds, weighting the most recent value slightly more than the oldest value considered. It uses this weighted veloc ity average in the equation that predicts the optimal flow rate under constant wind. The result is the optimal flow rate under variable wind knowing only current and previous wind speeds A list of relevant variables constants and parameters is in Table 1 Table 1 Relevant constants, variables, and parameters Physical constants Description Value Viscosity of air 1849×10-5kg/ms e1999] Density of wate 1000kg/m3 Density of air 12×10-6kg/m3 Situational constants Cross-sectional area of fountain nozzle fm Maximum flow rate of fountains pump m3/s R Radius of fountain pool Radius of smallest uncomfortable water dt Sampling interval of anemometer k Situational variables Instantaneous wind speed m/s Instantaneous flow rate of water n=g/k+f/A Dynamic variables r(t),y(t) Droplet's horizontal and vertical positions vr(t), Uy(t) Droplet's horizontal and vertical speeds ar(t), ay(t) Droplet's horizontal and vertical accelerations m/s2 Situational parameters Default sample wind velocity buffer time Buffer time for quickly increasing sample wind velocities Weight constant dimensionless
222 The UMAP Journal 23.3 (2002) Our final solution is an algorithm that takes as its input a series of wind speed measurements and determines in real time the optimal flow rate to maximize the attractiveness of the fountain while avoiding splashing passersby excessively. Each iteration, it adds an inputted wind speed to a buffer of previous measurements. If the wind speed is increasing sufficiently, the last 0.5 s of the buffer are considered; otherwise, the last 1 s is. The algorithm computes a weighted average of these wind speeds, weighting the most recent value slightly more than the oldest value considered. It uses this weighted velocity average in the equation that predicts the optimal flow rate under constant wind. The result is the optimal flow rate under variable wind, knowing only current and previous wind speeds. A list of relevant variables, constants, and parameters is in Table 1. Table 1. Relevant constants, variables, and parameters. Physical constants Description Value ηa Viscosity of air 1.849 × 10−5 kg/m·s [Lide 1999] ρw Density of water 1000 kg/m3 ρa Density of air 1.2 × 10−6 kg/m3 Situational constants Units A Cross-sectional area of fountain nozzle m2 fmax Maximum flow rate of fountain’s pump m3/s Rp Radius of fountain pool m r Radius of smallest uncomfortable water m droplet dt Sampling interval of anemometer s k k = 9ηa/2ρwr2 Situational variables va Instantaneous wind speed m/s f Instantaneous flow rate of water m3/s from the fountain n n = g/k + f/A m/s Dynamic variables x(t), y(t) Droplet’s horizontal and vertical positions m vx(t), vy(t) Droplet’s horizontal and vertical speeds m/s ax(t), ay(t) Droplet’s horizontal and vertical accelerations m/s2 Situational parameters τd Default sample wind velocity buffer time s τi Buffer time for quickly increasing sample s wind velocities K Weight constant dimensionless
The Fountain That Math Built 223 Assumptions Passersby find a higher spray more attractive Avoiding discomfort is more important to passersby than the attractiveness of the fountain The water stream can be considered a collection of spherical droplets, each of which has no initial horizontal component of velocity Every possible size of sufficiently small water droplet is represented in the water stream in significant numbers Water droplets remain spherical The interaction between the water droplets and wind can be described as non-turbulent, or "laminar, "flow. There exists a minimum uncomfortable water droplet size; passersby find it acceptable to be hit by any droplets below this size but by none above When the wind enters the plaza, its velocity is entirely horizontal. The wind speed is the same throughout the plaza at any given time The pool and the area around it are radially symmetric, so there is no pre- ferred radial direction We can neglect any buoyant force on the water due to the air, since the error fluids involved, on the order of 10-3, which is negligible of densities of the introduced by this approximation is equal to the ratio The anemometer reports wind speeds at discrete time intervals dt Analysis of the problem For a water stream viewed as a collection of small water droplets blown from a core stream, the interaction between the droplets and the air moving past them can best be described in the inertial reference frame of the moving air. In this frame, the air is stationary while the droplet moves horizontally through the air with a speed equal to the relative speed of the droplet and wind, Ur= va -vr. In the vertical direction, Ur Wu since the wind blows horizontally In the air's frame of reference, the water droplet experiences a drag force opposing ur. Assuming that the air moves at a constant velocity, this force is the same in both frames of reference. In the frame of the fountain then the droplet is being blown in the direction of the wind. The smaller water droplets are carried farther, so we need only consider the motion of the smallest
The Fountain That Math Built 223 Assumptions • Passersby find a higher spray more attractive. • Avoiding discomfort is more important to passersby than the attractiveness of the fountain. • The water stream can be considered a collection of spherical droplets, each of which has no initial horizontal component of velocity. • Every possible size of sufficiently small water droplet is represented in the water stream in significant numbers. • Water droplets remain spherical. • The interaction between the water droplets and wind can be described as non-turbulent, or “laminar,” flow. • There exists a minimum uncomfortable water droplet size; passersby find it acceptable to be hit by any droplets below this size but by none above. • When the wind enters the plaza, its velocity is entirely horizontal. • The wind speed is the same throughout the plaza at any given time. • The pool and the area around it are radially symmetric, so there is no preferred radial direction. • We can neglect any buoyant force on the water due to the air, since the error introduced by this approximation is equal to the ratio of densities of the fluids involved, on the order of 10−3, which is negligible. • The anemometer reports wind speeds at discrete time intervals dt. Analysis of the Problem For a water stream viewed as a collection of small water droplets blown from a core stream, the interaction between the droplets and the air moving past them can best be described in the inertial reference frame of the moving air. In this frame, the air is stationary while the droplet moves horizontally through the air with a speed equal to the relative speed of the droplet and wind, vr = va − vx. In the vertical direction, vr = vy, since the wind blows horizontally. In the air’s frame of reference, the water droplet experiences a drag force opposing vr. Assuming that the air moves at a constant velocity, this force is the same in both frames of reference. In the frame of the fountain, then, the droplet is being blown in the direction of the wind. The smaller water droplets are carried farther, so we need only consider the motion of the smallest
224 The UMAP Journal 23.3 (2002) uncomfortable water droplets, knowing that bigger droplets do not travel as rar The water droplet initially has a vertical velocity uy(O) that is directly related to the flow rate of water through the nozzle of the fountain This initial vertical velocity component can be controlled by changing the flow rate. The droplets motion causes vertical air resistance, slowing the droplet and affecting how long(tu) the droplet is in the air Since the vertical and horizontal components of a water droplet's motion are independent, tu is determined solely by the vertical motion. Knowing this time allows us to find the horizontal distance traveled which we wish to constrain to the radius of the pool When the wind is variable, however, we cannot determine exactly the ideal flow rate for any given time. We must instead act on the current reading but also rely on previous measurements of wind speed in order to restrain the model from reacting too severely to wind fluctuations. We need to react fast to increases in wind speed, since they result in splashing which is weighted more Design of the model For our initial model, we assume that va is constant for time intervals on the order of tw, so that any given droplet experiences a constant wind speed We model the water stream as a collection of droplets that are initially co- esive but are carried away at varying velocities by the wind. The distances that they travel depend on the wind speed va and the initial vertical velocity of the water stream through the nozzle, uy(O). Since the amount of water flowing through the nozzle per unit time is f=vy,(0)A, we have vy(0)=f/A. The dynamics of the system, then, is fully determined by f and va. First, we find the equations of motion for the droplet Equations of Motion for a droplet For laminar flow, a spherical particle of radius r traveling with through a fluid medium of viscosity n experiences a drag force Fp such that (6丌mr) Winters 2002 Since a spherical water droplet has a mass given by m=p(r3), the acceleration felt by the droplet is given by Newtons Second Law as the total force over mass. Since there are no other forces acting in the horizontal
224 The UMAP Journal 23.3 (2002) uncomfortable water droplets, knowing that bigger droplets do not travel as far. The water droplet initially has a vertical velocity vy(0)that is directly related to the flow rate of water through the nozzle of the fountain. This initial vertical velocity component can be controlled by changing the flow rate. The droplet’s motion causes vertical air resistance, slowing the droplet and affecting how long (tw) the droplet is in the air. Since the vertical and horizontal components of a water droplet’s motion are independent, tw is determined solely by the vertical motion. Knowing this time allows us to find the horizontal distance traveled, which we wish to constrain to the radius of the pool. When the wind is variable, however, we cannot determine exactly the ideal flow rate for any given time. We must instead act on the current reading but also rely on previous measurements of wind speed in order to restrain the model from reacting too severely to wind fluctuations. We need to react fast to increases in wind speed, since they result in splashing which is weighted more heavily. Design of the Model For our initial model, we assume that va is constant for time intervals on the order of tw, so that any given droplet experiences a constant wind speed. We model the water stream as a collection of droplets that are initially cohesive but are carried away at varying velocities by the wind. The distances that they travel depend on the wind speed va and the initial vertical velocity of the water stream through the nozzle, vy(0). Since the amount of water flowing through the nozzle per unit time is f = vy(0)A, we have vy(0) = f/A. The dynamics of the system, then, is fully determined by f and va. First, we find the equations of motion for the droplet. Equations of Motion for a Droplet For laminar flow, a spherical particle of radius r traveling with speed v through a fluid medium of viscosity η experiences a drag force FD such that FD = (6πηr)v [Winters 2002]. Since a spherical water droplet has a mass given by m = ρw 4 3 πr3 , the acceleration felt by the droplet is given by Newton’s Second Law as the total force over mass. Since there are no other forces acting in the horizontal
The Fountain That Math Built 225 direction, the horizontal acceleration ar is given by d 2r ar(t) 9na where k=9na/2puur2 The droplet experiences both air drag and gravity in the vertical direction, so the vertical acceleration is t + g With constant va, we use separation of variables and integrate to find vz(t)and vy(t), using the facts that vz(0)=0 and vy(0)=f/A. The results are 1()=t(1-c-k),()=ne-k-8 where n=g/k+f/A Integrating again, and using a(0)=y(0)=0, we have 2()=k(kt+e--1) (1 Determining the Flow Rate Because f is the only parameter that the algorithm modifies, we wish to find the flow rate that would restrict the smallest uncomfortable water droplets to ranges within Rp, so that they would land in the fountains pool After a time tu, the droplet has fallen back to the ground. Thus, y(tu)=0 This equation is too difficult to solve exactly, so we use the series expansion for e-kt and truncate after the quadratic term: e-kt a 1-a+x2/2. Solving y(tu)=0, we find We know that the maximum horizontal distance r(tu)must be less than or equal to Rp, with equality holding for the smallest uncomfortable droplet. For that case, using the same expansion for e-kt as above, k Rp=a(tu)21ktw-1+l-ktw+ Solving for tu and equating it to the earlier expression for tw, we get 2R
The Fountain That Math Built 225 direction, the horizontal acceleration ax is given by: ax(t) = d2x dt2 = 9ηa 2ρwr2 vr = k(va − vx), (1) where k = 9ηa/2ρwr2. The droplet experiences both air drag and gravity in the vertical direction, so the vertical acceleration is ay(t) = − 9ηa 2ρwr2 vy + g = −k vy + g k . With constant va, we use separation of variables and integrate to find vx(t) and vy(t), using the facts that vx(0) = 0 and vy(0) = f/A. The results are vx(t) = va 1 − e−kt , vy(t) = ne−kt − g k , where n = g/k + f/A. Integrating again, and using x(0) = y(0) = 0, we have vx(t) = va k kt + e−kt − 1 , vy(t) = 1 k n 1 − e−kt − gt. Determining the Flow Rate Because f is the only parameter that the algorithm modifies, we wish to find the flow rate that would restrict the smallest uncomfortable water droplets to ranges within Rp, so that they would land in the fountain’s pool. After a time tw, the droplet has fallen back to the ground. Thus, y(tw)=0. This equation is too difficult to solve exactly, so we use the series expansion for e−kt and truncate after the quadratic term: e−kt ≈ 1 − x + x2/2. Solving y(tw)=0, we find tw ≈ 2 k 1 − g nk . We know that the maximum horizontal distance x(tw) must be less than or equal to Rp, with equality holding for the smallest uncomfortable droplet. For that case, using the same expansion for e−kt as above, Rp = x(tw) ≈ va k ktw − 1+1 − ktw + (ktw) 2 2 = vak 2 t 2 w. Solving for tw and equating it to the earlier expression for tw, we get 2Rp vak = tw = 2 k 1 − g nk .