Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ffpressure(m=0, col=0):
- """
- Calculates the far field pressure based on a chosen radiation mode (m,j), and directivity pattern
- and then calculates the total far field pressure for all the radial mode n's in a, per
- azimuthal mode m.
- """
- directivities = D_Pcsv()[1] # Dmn(phi) directivity list of length Ph
- thetarr = np.linspace(0, 2*np.pi, D_Pcsv()[0].shape[0])
- R = Rglob
- a = Radiationproperties(m,col)[0] # radiation mode shape (column vector of radiation mode amplitudes)
- N = Wn1n2(m)[0].shape[0]
- Phis = directivities.shape[2] # total number of polar angles Ph
- pressarr = np.zeros((N,Phis),'complex')
- for n in range(N):
- pressarr[n] = (a[n]/R)*directivities[m][n]*np.exp((1j*omegaglob*R/c0)+(1j*m*thetarr))
- return np.sum(pressarr, axis=0) # sum over the n rows in pressarr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement