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