]> permondes.de Git - Analog_Engine.git/blob - scripts/TP1 04.10 MassOnSphere.AESL
b6dfbbe246f12111a559812d0394ce6216eda5ad
[Analog_Engine.git] / scripts / TP1 04.10 MassOnSphere.AESL
1 IDENTIFICATION DIVISION
2 PROGRAM-ID MassOnSphere
3 VERSION 20240124
4 COMMENT A mass m rests at the apex on a fixed sphere with radius a.
5 COMMENT With a slight displacement, it slides down the sphere without friction
6 COMMENT x'' = C1*x*y - C3*x
7 COMMENT y'' = C2*y*y - C4*y - g
8 COMMENT Scaling: measuring distances in da-m (10¹ m)
9 COMMENT Initial condition: slightly off the top of the sphere to get the mass rolling.
10 COMMENT Note: x0 is a function of y0 with x0² + y0² = a²
11 COMMENT Note: ICs have to be negative as the integrator is inverting
12
13 ENVIRONMENT DIVISION
14 ENGINE Anabrid-THAT
15 TIMEBASE 1ms
16 REQUIRES COEFFICIENT 7
17 REQUIRES INTEGRATOR 4
18 REQUIRES MULTIPLIER 2
19 REQUIRES INVERTER 4
20 REQUIRES SUMMER 2
21
22 DATA DIVISION
23 OUTPUT OUTPUT.X x
24 OUTPUT OUTPUT.Y y
25 # Example values based on a=1
26 COEFFICIENT.1 3g/a² for xy e.g. 2,943
27 COEFFICIENT.2 3g/a² for y²
28 COEFFICIENT.3 2g/a for x e.g. 1,962
29 COEFFICIENT.4 2g/a for y
30 COEFFICIENT.5 g e.g. 0,981
31 COEFFICIENT.6 a initial condition y e.g. 0,957
32 COEFFICIENT.7 0 initial condition x, slightly above 0 to start motion, e.g. 0,290
33
34 PROGRAM DIVISION
35 -1 -> COEFFICIENT.5 -> -g
36 -1 -> COEFFICIENT.6 -> -y0
37 -1 -> COEFFICIENT.7 -> -x0
38
39 x'' -> INTEGRATOR -> -x'
40 -x', IC:-x0 -> INTEGRATOR -> x
41 y'' -> INTEGRATOR -> -y'
42 -y', IC:-y0 -> INTEGRATOR -> y
43 x,y -> MULTIPLIER -> x*y
44 y,y -> MULTIPLIER -> y^2
45 x*y -> COEFFICIENT.1 -> 3g/a²*x*y/10
46 y^2 -> COEFFICIENT.2 -> 3g/a²*y^2/10
47 x -> COEFFICIENT.3 -> 2g/a*x/10
48 y -> COEFFICIENT.4 -> 2g/a*y/10
49 2g/a*x/10 -> INVERTER -> -2g/a*x/10
50 2g/a*y/10 -> INVERTER -> -2g/a*y/10
51 10:3g/a²*x*y/10, 10:-2g/a*x/10 -> SUMMER -> -x''
52 -x'' -> INVERTER -> x''
53 10:3g/a²*y^2/10, 10:-2g/a*y/10, 1:-g -> SUMMER -> -y''
54 -y'' -> INVERTER -> y''
55
56 OPERATION DIVISION
57 MODE REPEAT
58 OP-TIME 24ms # after that, the mass would jump off the sphere, which is not included in this model