20 REM BASSOON.BAS CALCULATES look-in ADMITTANCE AND PRESSURE FOR Conical 21 ' bore at points 50 mm apart. 22 F = 140: REM INSERT FREQUENCY HERE. 24 SCREEN 12 25 CLS 30 DEFINT N: PI = 3.14159 40 NS = 52: REM NO. OF SECTIONS, EACH SECTION 100 mm. LONG 50 DIM D(NS): REM D(N) IS THE DIAMETER OF THE Nth SECTION, BEGIN 4 mm START 55 D(0) = 5.148: REM BEGINS WITH CYLINDER 50 MM LONG FOR REED, THEN 4mm diam 56 ' expanding as cone to 40 mm. 60 DIM P(NS), PWR(NS) 80 FOR N = 1 TO 52 85 D(N) = 4 + .6923 * (N - .5): REM AFTER 52 SECTIONS, 40 MM DIAMETER LARGE END 90 NEXT N 102 PRINT "FREQUENCY ="; F 108 PRINT "DIST r ANGLE G B R eff PRESS PWR" 109 T$ = "#### .##### ##.#### ###.#### ###.#### .#### #.#### ##.###" 120 G = O: REM BEGINNING G, CLOSED END 130 B = 0: REM BEGINNING B CLOSED END 135 P = .5: PREL1 = 1: REM STARTING PRESSURE IN REED CAVITY 150 FOR N = O TO NS 170 K = F / 55704! / (1 - 3.34 / D(N) / SQR(F)): REM PROPAGATION CONSTANT 180 LF = 1 - .00556 * SQR(F) / D(N): REM LOSS IN REFLECTION VECTOR FOR 50 mm LENGTH 190 R = SQR((B ^ 2 + (1 - G) ^ 2) / (B ^ 2 + (1 + G) ^ 2)) 200 DET = 1 - G ^ 2 - B ^ 2 210 AN = ATN(2 * B / DET): IF DET > 0 THEN AN = AN + PI 220 AN = AN + 100 * K: REM ADDS SECTION ANGLE FOR 50 MM MOVEMENT 230 R = LF * R: REM REDUCES REFLECTION VECTOR 240 DEN = 1 + R ^ 2 - 2 * R * COS(AN) 250 G = (1 - R ^ 2) / DEN 260 B = -2 * R * SIN(AN) / DEN 265 PREL = 2 / SQR((G + 1) ^ 2 + B ^ 2): REM PRESSURE RELATIVE TO INCIDENT 267 P = P * PREL / PREL1: P(N) = P 268 PWR(N) = P * P * G * D(N) ^ 2: REM PRESSURE SQUARED * ABSOLUTE ADMITTANCE 270 PRINT USING T$; 50 * N; R; AN; G; B; (1 - R) / (1 + R); P; PWR(N) 273 IF N = 25 THEN GOSUB 610 275 IF N = 52 THEN GOTO 400 280 G = G * D(N) ^ 2 / D(N + 1) ^ 2 300 B = B * D(N) ^ 2 / D(N + 1) ^ 2 302 PREL1 = 2 / SQR((G + 1) ^ 2 + B ^ 2) 305 NEXT N 400 GOSUB 610 500 CLS : WINDOW (0, 0)-(NS, 1.1): LINE (0, 0)-(NS, 0) 505 LOCATE 2, 15: PRINT "PRESSURE DISTRIBUTION AT FREQUENCY = "; F; " Hz" 508 PSET (9, 1.01), 3: LOCATE 3, 16: PRINT "LOSS DISTRIBUTION" 510 FOR N = 0 TO NS: PSET (N, P(N)): NEXT N 515 FOR N = 1 TO NS: PSET (N, 5 * (PWR(N) - PWR(N - 1))), 3: NEXT N 520 WHILE INKEY$ = "": WEND 530 END 610 PRINT "PRESS ANY KEY FOR MORE" 620 IF INKEY$ = "" THEN GOTO 620 630 PRINT "DIST r ANGLE G B R eff PRESS" 640 RETURN