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