]> permondes.de Git - Analog_Engine.git/blob - scripts/EP1 10.01 Damped Harmonic Oscillator.LACE
0f03c01effa86cd2f5ce107a4365b1c94c4d04f2
[Analog_Engine.git] / scripts / EP1 10.01 Damped Harmonic Oscillator.LACE
1 # Damped_Oscillator
2 # phi'' = -(S*phi + D/m*phi')
3
4 coefficient.1(-1) -> -phi0 # Initial Amplitude
5 coefficient.3 -> S # SpringForce
6 coefficient.4 -> D/m # Damping linear to speed
7
8 iintegrate phi'' -> -phi'
9 invert -phi' -> phi'
10 cmultiply phi', D/m -> D/m*phi'
11
12 iintegrate -phi' -> phi
13 IC: -phi0
14 cmultiply S, phi -> S*phi
15
16 isum 10:S*phi, D/m*phi' -> -(Sphi+D/mphi')
17 assign -(Sphi+D/mphi') -> phi''
18
19 output(y) -> out.y