Port length calculator


Thanks Wayne. I'm getting more comfortable using PiAlign
and BoxPlot. Here is an attempt at a port length calculator.

From Loudspeaker Design by Vance Dickason

For a tubular vent flush-mounted on a speaker,
calculate the length by:

Lv = ((1.463*(10**7)*(R**2)) / ((fB**2)*VB)) - (1.463*R)

Lv = length in inches
fB = tuning frequency in Hz
VB = box volume in cubic inches
R = radius of the vent in inches


My favorite calculator is the Python interpreter. A
Windows version is available at:
http://www.activestate.com/Products/Download/Get.plex?id=ActivePython

I wrote a function to calculate port length for me:

def portlen(diamInches,tuningFreq,boxVolCubFt):
radiusInches = diamInches / 2.0
cubInchConv = 12.0 * 12.0 * 12.0
boxVolCubInch = boxVolCubFt * cubInchConv
num = 1.463 * (radiusInches * radiusInches) * (10000000.0)
denom = (tuningFreq * tuningFreq) * boxVolCubInch
term1 = num / denom
term2 = 1.463 * radiusInches
len = term1 - term2
print 'calc port len diam.=',diamInches,'freq=',tuningFreq,'vol=',boxVolCubFt,'len=',len
return len


Example output:
calc port len diam.= 0.5 freq= 54.0 vol= 0.23 len= 0.423228647155
calc port len diam.= 0.75 freq= 54.0 vol= 0.23 len= 1.2265769561
calc port len diam.= 1.0 freq= 54.0 vol= 0.23 len= 2.42441458862
calc port len diam.= 1.5 freq= 54.0 vol= 0.23 len= 6.0035578244

calc port len diam.= 2.0 freq= 46.0 vol= 1.0 len= 2.53815084366
calc port len diam.= 3.0 freq= 46.0 vol= 1.0 len= 6.80808939824
calc port len diam.= 4.0 freq= 46.0 vol= 1.0 len= 13.0786033746





Follow Ups: