{-# LANGUAGE TypeOperators #-}
From units:
import Data.Metrology
import Data.Metrology.Show
import Data.Metrology.SI
import Data.Units.US
د² = sTwo
د³ = sThree
g = 9.81 % Metre:/Second:^د² :: Acceleration
The frequency $\nu$ of a vibrating string can be calculated as $$ \nu = \frac{v_\mathrm{wave}}{2\cdot l} = \frac{\sqrt{\frac{T}\rho}}{2\cdot l} $$ where $l$ the string length, $v_\mathrm{wave}$ the wave velocity and $\rho = \frac{M}l$ the linear density (aka unit weight).
Thus $$ T = \rho \cdot (2\cdot l \cdot \nu)^2 $$
stringTension :: Length -> Mass%/Length -> Frequency -> Force
stringTension l ρ ν = ρ |*| (2 *| l |*| ν)|^د²
stringTension (327 % Milli:@Metre) (0.7 % Gram:/Metre) (440 % Hertz) -- Violin a-string
57.96407231999999 (kg * m)/s^2
stringTension (0.7 % Metre) (5.7 % Gram:/Metre) (98 % Hertz) -- Cello G string
107.29588799999999 (kg * m)/s^2
stringTension (25.5 % Inch) (0.00032 % Pound:/Inch) (110 % Hertz) -- Electric guitar A string
116.03129998978426 (kg * m)/s^2
type Gauge = Length -- thickness, i.e. diameter
steelstring :: Gauge -> Mass%/Length
steelstring d = (7.859 % Gram:/(Centi:@Metre):^د³ :: Density) |*| (pi *| (0.5*|d)|^د²)
-- http://www.wolframalpha.com/input/?i=steel+density
stringTension (25.5 % Inch) (steelstring $ 0.010 % Inch) (330 % Hertz) -- Electric guitar e string
72.77132266495893 (kg * m)/s^2
it |/|g#Pound -- same string, tension in pound-force
16.354057509584607