From: Permondes Date: Mon, 23 Sep 2024 17:37:32 +0000 (+0200) Subject: Throwing a stone on earth, starting a rocket from earth X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/commitdiff_plain/68fb174e84f38b2d72c7a0325cbfc6dc4fe486cc?ds=inline;hp=6d26a6bd8b30ad893da0315655d2f68aee787515 Throwing a stone on earth, starting a rocket from earth Some rearrangements of the application examples Application: Throwing a stone on earth Application: Starting a rocket from earth --- diff --git a/Analog Engine Example Applications.odt b/Analog Engine Example Applications.odt index c59148e..4f83903 100644 Binary files a/Analog Engine Example Applications.odt and b/Analog Engine Example Applications.odt differ diff --git a/scripts/EP1 04.02 Starting a Rocket_a.LACE b/scripts/EP1 04.02 Starting a Rocket_a.LACE new file mode 100644 index 0000000..25b0546 --- /dev/null +++ b/scripts/EP1 04.02 Starting a Rocket_a.LACE @@ -0,0 +1,33 @@ +# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption. +# Approximation of gravity of earth by g +# Equation of motion +# r'' = alpha / (m0 - alpha*t) * v0 - g +# alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s +# m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg +# v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s +# g: acceleration of earth = 9,81 m/s^2 + +include CompoundFunctions.LACE # include idivide + +coefficient.1 -> alpha1 +coefficient.2(+1) -> alpha2 # == alpha1 +coefficient.3(-1) -> -m0 +coefficient.4 -> v0 +coefficient.5(+1) -> g + +# generate t-ramp +iintegrate (-1) -> t + +cmultiply (alpha1, t) -> alpha*t +isum (-m0, alpha*t) -> m0-alpha*t +idivide (alpha2, m0-alpha*t) -> -alpha/(m0-alpha*t) +cmultiply (-alpha/(m0-alpha*t), v0) -> -alpha/(m0-alpha*t)*v0 +isum(-alpha/(m0-alpha*t)*v0, g) -> alpha/(m0-alpha*t)*v0-g + +iintegrate (alpha/(m0-alpha*t)*v0-g) -> -v +invert (-v) -> v +iintegrate (-v) -> z + +output (t) -> out.x +output (v) -> out.y +output (z) -> out.z diff --git a/scripts/EP1 04.02 Starting a Rocket_b.LACE b/scripts/EP1 04.02 Starting a Rocket_b.LACE new file mode 100644 index 0000000..85a5177 --- /dev/null +++ b/scripts/EP1 04.02 Starting a Rocket_b.LACE @@ -0,0 +1,44 @@ +# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption. +# Approximation of acceleration with Taylor series +# Equation of motion +# r'' = (alpha / m0)*v0 + (alpha/m0)²*v0*t - gamma * ME / r² +# alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s +# m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg +# v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s +# gamma: gravitational constant: 6,6743E-11 m³/(kg*s²) +# ME: mass of earth: 5,97E+24 kg + +# include idivide +include CompoundFunctions.LACE + +coefficient.1(+1) -> alpha/m0*v0 +coefficient.2(+1) -> (alpha/m0)^2*v0 +coefficient.3 -> scale +coefficient.4(-1) -> -RE +coefficient.5(+1) -> 10*gamma*ME + +# generate t-ramp +iintegrate (-1) -> t + +# calculating altitude +iintegrate (alpha/m0*v0, (alpha/m0)^2*v0*t, -gamma*ME/r^2) -> -v # input is a ### 3. Term fehlen noch ### +cmultiply (scale, -v) -> -v.scaled +iintegrate (-v) -> r + IC: -RE + +# calculating acceleration +multiply (r,r) -> r^2 +idivide (10*gamma*ME, r^2) -> -10*gamma*ME/r^2 + +cmultiply ((alpha/m0)^2*v0, t) -> (alpha/m0)^2*v0*t + +# inverting velocity for display +invert (-v.scaled) -> v.scaled + +# subtracting the radius of earth in order to get altitude above ground for display +isum (-RE, r) -> -z +invert (-z) -> z + +output (t) -> out.x +output (v) -> out.y +output (z) -> out.z diff --git a/scripts/EP1 871102 Throwing a stone.LACE b/scripts/EP1 871102 Throwing a stone.LACE new file mode 100644 index 0000000..5fd5852 --- /dev/null +++ b/scripts/EP1 871102 Throwing a stone.LACE @@ -0,0 +1,22 @@ +# Throwing a stone on earth +# +# z'' = -g, with g=0,981 da*m/s^2 +# Initial speeds: v.z0 (vertical) and v.x0 (horizontal) + +coefficient.1(-1) -> -g # set to 0,981 +coefficient.2(+1) -> v.z0 # initial vertical speed +coefficient.3(+1) -> v.x0 # initial horizontal speed +coefficient.4(-1) -> -z0 # initial altitude + +iintegrate (-g) -> -v + IC: v.z0 +iintegrate (-v) -> z + IC: -z0 + +iintegrate (v.x0) -> x + +invert (-v) -> v + +output (x) -> out.x +output (z) -> out.y +output (v) -> out.z