/* invoke with either: echo 'batch("bob-mag-damping.max") $' | maxima maxima -b bob-mag-damping.max Output can be found in ./bob-mag-damping.max.out */ ""$ omega: sqrt(g / L) $""$ theta: theta_max * sin(omega * t) $""$ /* in the small-angle approximation */ v: L * derivative(theta, t) $""$ /* tangential velocity */ E: v * B $""$ sigma: eps0 * E $""$ /* surface charge density */ /* ignoring fringing fields */ q: sigma * d^2 $""$ /* total charge */ I: derivative(q, t) $""$ /* current */ R: rho/d $""$ /* resistance */ P: I^2 * R $""$ /* instantaneous power */ "..... check dimensions ....." $ theta_max: 1$ /* radians */ rho: ohm * m $ C: amp * sec $ L : m $ d: m $""$ B: (V/m) / (m/sec) $""$ g: m/sec/sec $""$ eps0: (C / V) / m $""$ ohm: V / amp $""$ ev(P);""$ "..... numerical value ....." $""$ theta_max: float(%pi)/2$""$ /* FIXME: abusing the small-angle approximation */ rho: 28.2e-9 $ /* ohm.m (aluminum) */ d: .01 $ /* m */ L: .05 $ /* m */ g: 9.8 $ /* m/s/s */ B: .01 $ /* tesla */ eps0: 8.85418782e-12 $""$ /* farad/m */ avg_P: P/2/sin(omega*t)^2 $""$ "... instantaneous power ..." $ P;""$ ev(P);""$ "... average power ..." $""$ avg_P;""$ ev(avg_P);