]> permondes.de Git - Analog_Engine.git/blame - scripts/TP1 03.08 Charge in em field.AESL
Further examples of harmonic oscillation
[Analog_Engine.git] / scripts / TP1 03.08 Charge in em field.AESL
CommitLineData
54bf965f
P
1IDENTIFICATION DIVISION
2PROGRAM-ID ChargeInEMfield
3VERSION 20240116
4COMMENT A mass m with charge q>0 is located in a static electro-magnetic field [0,0,E], [0,-B,0].
5COMMENT Find the trajetory
6COMMENT Differential equation (Lorentz force): x'' = omega*z', z'' = a*omega^2 - omega*x'
7COMMENT good start settings are omega=0,92, a*omega^2=0,05
8
9ENVIRONMENT DIVISION
10ENGINE Anabrid-THAT
f25252dd 11TIMEBASE 1ms # corresponds to 1s
6e8a1392 12REQUIRES INTEGRATOR 4, INVERTER 1, COEFFICIENT 3
54bf965f
P
13
14DATA DIVISION
15OUTPUT OUTPUT.X x
16OUTPUT OUTPUT.Z z
6e8a1392
P
17COEFFICIENT.1 OMEGA_X # -omega for x'
18COEFFICIENT.2 A*OMEGA^2
19COEFFICIENT.3 OMEGA_z # omega for z'
54bf965f
P
20
21PROGRAM DIVISION
6e8a1392
P
22x'' -> INTEGRATOR -> -x'
23-x' -> INTEGRATOR -> x
24-x' -> COEFFICIENT.OMEGA_X -> -omega*x'
25+1 -> COEFFICIENT.A*OMEGA^2 -> a*omega^2
26a*omega^2, -omega*x' -> INTEGRATOR -> -z' # input is z''
27-z' -> INTEGRATOR -> z
28-z' -> INVERTER -> z'
29z' -> COEFFICIENT.OMEGA_Z -> omega*z' = x''
54bf965f
P
30
31OPERATION DIVISION
32MODE REPEAT
ae9d78b7 33OP-TIME 21ms