From 6c221d3a67d74354a7cf456f54fa1efdcdc0e50e Mon Sep 17 00:00:00 2001 From: Paddy Milner Date: Thu, 2 Oct 2025 14:58:27 +0100 Subject: [PATCH] First commit --- cube.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 cube.py diff --git a/cube.py b/cube.py new file mode 100644 index 0000000..85dccad --- /dev/null +++ b/cube.py @@ -0,0 +1,24 @@ +from math import * + +## Exp W. Modes of long cyclinder (1D) ## +u = 343 #speed of sound +a = 0.2 #length of tube +b = 0.2 +c = 0.2 +fqn = [] #frequencies +f = [] + +for l in range (0,4): + for m in range (0,4): + for n in range (0,4): + qn = [l,m,n] + frequency = (u/2)*(sqrt((l/a)**2+(m/b)**2+(n/c)**2)) + if frequency in f: + continue + else: + f.append(frequency) + fqn.append([frequency,qn]) + +for i in range(len(fqn)): + print(sorted(fqn)[i]) +