jueves, 24 de febrero de 2011

ADCP processing and the homogeneous flow assumption


This problem is designed to illustrate some of the difficulties that can arise if fundamental assumptions of instrument operation are violated.

The transformation equations developed in class (and shown in the handout) to convert horizontal flow to radial velocities (as measured by an ADCP) are given as:

Here, r1 and r2 are the radial velocities along each beam (at a given depth), Q is the angle of the beam relative to the vertical axis, and u and w are the horizontal and vertical velocities of the flow, respectively. The subscripts 1 and 2 refer to the velocities seen in each of the two beams. (In the questions below let u1 = 50 cm/s.)

a. For a given u1, w1 = w2 = 0.1·u1 and Q = 20, plot r1 and r2 versus u1u2 letting u2 range between +u1 to – u1.

b. For a given u1, w1 = w2 = 0.1·u1 and Q, plot u versus u1u2 letting u2 range between +u1 to – u1. Plot w versus u1u2 on a separate graph.

import numpy as np

import matplotlib.pyplot as plt

from matplotlib.font_manager import FontProperties

from pylab import *

#Definition of variable

#r1, r2, are the radial velocities along each beam(at a given depth)

#THETA, is the angle of the beam relative to the vertical axis

#u and v are the horizontal and vertical velocities of the flow

Data=[]

THETA=20*np.pi/180

u1=50

w1=w2=0.1*u1

#creating the loop

for u2 in range(u1,-u1,-2):

r1=(-u1*np.sin(THETA))+(w1*np.cos(THETA))

r2=(u2*np.sin(THETA))+(w2*np.cos(THETA))

U=(0.5*(u1+u2))+((0.5*(w1-w2))/np.tan(THETA))

W=(0.5*(w1+w2))+((0.5*(u1-u2))*np.tan(THETA))

ur=u1-u2

mat=[r1,r2,u1,u2,ur,U,W]

Data.append(mat)

Datos=np.array(Data)

r1=Datos[0:,0]

r2=Datos[0:,1]

ur=Datos[0:,4]

U=Datos[0:,5]

W=Datos[0:,6]

subplot(221)

plot(ur, r1, 'b-', ur, r2, 'r-')

ylabel('r1 and r2')

xlabel('u1-u2')

suptitle('ADCP processing', fontsize=16)

legend( ('r1', 'r2'), loc='upper right')

subplot(223)

plot(ur,U,'r-')

xlabel('u1-u2')

ylabel('U')

subplot(224)

plot(ur,W,'r-')

xlabel('u1-u2')

ylabel('W')

show()


a. For a given u1, w1 = w2 = 0.1·u1,and u2 = u1/2, plot u versus Q, letting Q range from 0 to pi/2. Plot w versus Q on a separate graph.

import numpy as np

import matplotlib

import matplotlib.pyplot as plt

from pylab import *

#Definition of variable

Data=[]

u1=50

w1=w2=0.1*u1

u2=u1/2

#create the loop

for T in range(0,60,2):

r1=(-u1*np.sin(T*np.pi/180))+(w1*np.cos(T*np.pi/180))

r2=(u2*np.sin(T*np.pi/180))+(w2*np.cos(T*np.pi/180))

U=(0.5*(u1+u2))+((0.5*(w1-w2))/np.tan(T*np.pi/180))

W=(0.5*(w1+w2))+((0.5*(u1-u2))*np.tan(T*np.pi/180))

ur=u1-u2

theta=T*np.pi/180

mat=[r1,r2,u1,u2,ur,U,W,T,theta]

Data.append(mat)

Datos=np.array(Data)

r1=Datos[0:,0]

r2=Datos[0:,1]

ur=Datos[0:,4]

U=Datos[0:,5]

W=Datos[0:,6]

T=Datos[0:,7]

theta=Datos[0:,8]

plt.plot(T,W,'r')

subplot(121)

plot(T,U, 'b-')

ylabel('U')

xlabel('Theta')

suptitle('ADCP processing', fontsize=16)

subplot(122)

plot(T,W,'r-')

xlabel('Theta')

ylabel('W')

plt.show()



No hay comentarios:

Publicar un comentario