]> permondes.de Git - Analog_Engine.git/blob - AESL/TP1 06.18 Mass in Tube.AESL
e85e7c77b8ba539426b0b0953e42e9ad1ca97d2d
[Analog_Engine.git] / AESL / TP1 06.18 Mass in Tube.AESL
1 IDENTIFICATION DIVISION
2 PROGRAM-ID MassInTube
3 VERSION 20240214
4 COMMENT A thin tube rotates at a constant angular velocity perpendicular to gravity
5 COMMENT A mass point moves frictionless in this tube. The differential equation gives the position of this mass point.
6 COMMENT r''=omega^2*r -g*sin(omega*t+phi0)
7
8 ENVIRONMENT DIVISION
9 ENGINE Anabrid-THAT
10 TIMEBASE 1ms
11 REQUIRES COEFFICIENT 8, INTEGRATOR 4, INVERTER 1, MULTIPLIER 2
12
13 DATA DIVISION
14 OUTPUT OUTPUT.X x
15 OUTPUT OUTPUT.Y y
16 COEFFICIENT.1 ICw'
17 COEFFICIENT.2 ICw
18 COEFFICIENT.3 OMEGAC
19 COEFFICIENT.4 OMEGAS # same as OMEGAC
20 COEFFICIENT.5 G
21 COEFFICIENT.6 R0 # r(0)
22 COEFFICIENT.7 V0 # r'(0)
23 COEFFICIENT.8 OMEGA^2 # = OMEGAC*OMEGAS
24
25 PROGRAM DIVISION
26 ### Generating sin(omega*t+phi0) ###
27 +1 -> COEFFICIENT.ICw’ -> icw’
28 -1 -> COEFFICIENT.ICw -> -icw
29 w’’, IC:icw’ -> INTEGRATOR -> -w’=-cos
30 -w' -> COEFFICIENT.OMEGAC -> -omega*w'
31 -omega*w', IC:-icw -> INTEGRATOR -> w=sin
32 w -> INVERTER -> -w=-sin
33 -w -> COEFFICIENT.OMEGAS -> -omega^2*w=w’’
34
35 ### the actual problem ###
36 -sin -> COEFFICIENT.G -> -g*sin
37 -1 -> COEFFICIENT.R0 -> -r0
38 +1 -> COEFFICIENT.V0 -> v0
39 omega^2*r, -g*sin,IC:v0 -> INTEGRATOR -> -r' # input is r''
40 -r',IC:-r0 -> INTEGRATOR -> r
41 r -> COEFFICIENT.OMEGA^2 -> omega^2*r
42
43 ### Converting r, phi to x,y coordinates for display ###
44 r, sin -> MULTIPLIER -> x
45 r, -cos -> MULTIPLIER -> y # y-axis shall go down according to gravity, thus negativ input
46
47 OPERATION DIVISION
48 MODE REPEAT
49 OP-TIME 17,5ms