Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# -*- coding: utf-8 -*-
"""
Created on Sun May 12 19:51:18 2019
@author: MAC
"""
import Engineering_tools as et
class Rocket():
"""
"""
def __init__(self,stage1,stage2,payload,launch_coordinates):
"""
stage1 and stage2 are instances of the class Stage,
payload is an instance of the class Payload,
launch_coordiantes = {latitude(deg),logitude(deg)}
"""
self.stage1 = stage1
self.stage2 = stage2
self.payload = payload
self.injection_velocity = et.final_target_vel(self.payload.perigee_altitude,
self.payload.target_orbit['a'])
self.launch_coordinates = launch_coordinates
if self.payload.target_orbit['i'] > 90: # retrograade orbit
self.initial_velocity = et.initial_vel(self.launch_coordinates['latitude'],retrograde=True)
else:
self.initial_velocity = et.initial_vel(self.launch_coordinates['latitude'])
def target_Vc(self,losses):
"""
Compute the target critical velocity
losses : velocity losses approximation (m.s-1)
"""
self.target_Vc = self.injection_velocity-self.initial_velocity+losses
class Stage():
"""
"""
def __init__(self,stage_number,number_of_engines):
"""
stage_number : 1 or 2
"""
self.stage_number = stage_number
avionics_mass = 0
number_of_engines = 9
def tank_mass(self,)
class Payload():
"""
"""
def __init__(self,mass,target_orbit):
"""
mass in kg
target_orbit = {'a','e','i','capital_omega','small_omega','nu'}
where:
a : semi_major axis (m)
e : eccentricity (adimentional)
i : inclination (deg)
capital_omega : argument of the ascending node (deg)
small_omega : argument of the perigee (deg)
nu : true anomaly (deg)
"""
self.mass = mass
self.target_orbit = target_orbit
self.perigee_altitude = target_orbit['a']*(1-target_orbit['e'])
# def propagate_orbit():
# """
# """
class Engine():
"""
"""
cycle_type=''
def __init__(self,oxidiser,fuel,thermo_cycle,exit_section_area):
"""
"""
self.oxidiser = oxidiser
self.fuel = fuel
self.thermo_cycle = thermo_cycle
self.exit_section_area = exit_section_area