Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import *
- t_f = 1913.87
- I_sp = 178444.0
- m_dot = -651.71
- m_0 = 2166828.0
- g_0 = -9.80665
- c = 299792458.0
- def v(t,v_0=0.0):
- return -g_0*I_sp*log(1.0+m_dot/m_0*t) + v_0
- def x(t,v_0=0.0):
- a = 1.0 + (m_dot/m_0)*t
- def fn(u):
- return u*log(u) - u
- return (m_0/m_dot) * ( -g_0*I_sp*(fn(a)-fn(1.0)) + v_0*(a-1.0) )
- print("Velocity:")
- print(" v(0 ) = %f"%v(0.0))
- print(" v(t_f) = %f"%v(t_f))
- print()
- print("Displacement:")
- print(" x(0 ) = %f, %f"%( x(0.0 ), x(0.0 )/c ))
- print(" x(t_f ) = %f, %f"%( x(t_f ), x(t_f )/c ))
- print(" x(0, -1500000.0) = %f, %f"%( x(0.0,-1500000.0), x(0.0,-1500000.0)/c ))
- print(" x(t_f,-1500000.0) = %f, %f"%( x(t_f,-1500000.0), x(t_f,-1500000.0)/c ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement