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