]> permondes.de Git - Analog_Engine.git/blob - scripts/TP1 04.11 TwoRaindrops.AESL
2f67350077e9b116c594d2c19851c36348bb9d5c
[Analog_Engine.git] / scripts / TP1 04.11 TwoRaindrops.AESL
1 IDENTIFICATION DIVISION
2 PROGRAM-ID TwoRaindrops
3 VERSION 20240201
4 COMMENT Two raindrops of same size and altitude are falling from a cloud.
5 COMMENT How long does it take until the touch?
6 COMMENT s'' = -2*gamma*m/s^2
7
8 ENVIRONMENT DIVISION
9 ENGINE Anabrid-THAT
10 TIMEBASE 1ms
11 REQUIRES COEFFICIENT 3, INVERTER 1, INTEGRATOR 2, COMPARATOR 1, MULTIPLIER 2, OPEN-AMP 1
12
13 DATA DIVISION
14 OUTPUT OUTPUT.X s_limited
15 COEFFICIENT.1 MIN_DISTANCE # 2*radius of the raindrop
16 COEFFICIENT.2 INIT_DISTANCE # initial distance -s0
17 COEFFICIENT.3 FACTOR # 2*gamma*m
18
19 PROGRAM DIVISION
20 +1 -> COEFFICIENT.MIN_DISTANCE -> 2r
21 2r -> INVERTER -> -2r
22 -1 -> COEFFICIENT.INIT_DISTANCE -> -s0
23 +1 -> COEFFICIENT.FACTOR -> 2gamma*m
24 s'' -> INTEGRATOR -> -s'
25 -s', IC:-s0 -> INTEGRATOR -> s
26
27 # The raindrops may only approach until they touch. Our model does not include their unification
28 A:s, B:-2r, GT0:s, LT0:2r -> COMPARATOR -> s_limited
29
30 s_limited,s_limited -> MULTIPLIER -> s^2
31
32 # division 2gamma*m / s^2
33 # Open amplifier is realized on THAT by FB:SUMMER.GND -> SUMMER
34 2gamma*m, inp2 -> OPEN-AMP -> -2gamma*m/s^2=s''
35 2gamma*m^2, s^2 -> MULTIPLIER -> inp2
36
37 OPERATION DIVISION
38 MODE REPEAT
39 OP-TIME 12ms