MAKS_Enjoyer

My life's work

Jul 21st, 2022 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 31.92 KB | Source Code | 0 0
  1. import random
  2.  
  3. while True:
  4.     print("Welcome to the Random Engine Generator!!!")
  5.     print("  ")
  6.     print("  ")
  7.     print("You can Choose between:")
  8.     print("  ")
  9.     print("1. Chemical Solid (SLD)(still WIP)")
  10.     print("2. Chemical Liquid (LQD)")
  11.     print("3. Nuclear Thermal (NTR)")
  12.     print("4. Electric / Plasma (PLSM)")
  13.     print("  ")
  14.     print("Or type quit to leave")
  15.     print("  ")
  16.     print("  ")
  17.     print("  ")
  18.     print("Notice to users:")
  19.     print("BE CAREFUL TO PROPERLY ENTER ONE OF THE KEYWORDS ABOVE!!!")
  20.     print("  ")
  21.     thrust_Type = str(input(">")).upper()
  22.  
  23.     engine_Name = ["Olympia", "Destiny", "Valiant", "Obsidian", "Leviathan","Aurora", "Crusader","Merlin", "Python", "Hypnos", "Juniper", "Dawn",
  24.                    "Kepler","Parom", "Elektron", "Aeonian", "Ceres", "Chasovoy", "Copernicus", "Quaoar", "Athena", "Minotaur", "Agena", "Thor",
  25.                    "Vega", "Athena", "Coeus", "Minerva", "Kratos", "Odin"]
  26.     random.shuffle(engine_Name)
  27.  
  28.     if "LIQUID" in thrust_Type or "LQD" in thrust_Type:
  29.         engine_Cycle = ["Gas Generator", "Staged Combustion (Oxidiser Rich)", "Staged Combustion (Fuel Rich)", "Expander (Open)",
  30.                         "Expander (Closed)", "Dual Expander (Open)","Dual Expander (Closed)", "Pressure-Fed", "Full Flow Staged",
  31.                         "Electric Pump Fed", "Combustion Tap Off", "Monopropellant (Cold Gas)", "Monopropellant (Decomposition)"]
  32.  
  33.         oxidiser_List1 = ['O2 (Oxygen)', 'F2 (Fluorine)', 'F2 (Fluorine) + O2 (Oxygen)', 'N2O4 (Nitrogen Tetroxide)', 'N2H4 (Hydrazine)',
  34.                           'H2O2 (Hydrogen Peroxide) 95%', 'H2O2 (Hydrogen Peroxide) 85%', 'NOX (Nitrous Oxide)', 'O3 (Ozone)',
  35.                           'AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)', 'AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)',
  36.                           'AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)', 'AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)',
  37.                           'AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)', 'OF2 (Oxygen Difluoride)', 'N2F4 (Tetrafluorohydrazine)',
  38.                           'ClF3 (Chlorine Trifluoride)', 'ClF5 (Chlorine Pentafluoride)']
  39.  
  40.         fuel_List1 = ['H2 (Hydrogen)', 'CH4 (Methane)', 'C2H5OH(Ethanol) 85%', 'C2H5OH(Ethanol) 75%', 'C6H5NH2 (Aniline)',
  41.                       'NH3 (Ammonia)', '75% CH6N2 + 25% N2H4 (UH-25)', '50% CH6N2 + 50% N2H4 (Aerosine-50)',
  42.                       'C2H8N2 (UnsymetricalDimethylHydrazine)', 'CH6N2 (MonomethylHydrazine)', 'N2H4 (Hydrazine)',
  43.                       'CH3OH (Methanol)', 'C12H24 (Kerosene)', 'B2H6 (Diborane)', 'B5H9 (Pentaborane)', 'C2H6 (Ethane)']
  44.  
  45.         propellant_List1 = ['H2O2 (Hydrogen Peroxide)', 'N2H4 (Hydrazine)',
  46.                             'NH2OH+NO3 (Hydroxyl ammonium nitrate)']
  47.  
  48.         propellant_List2 = ['Nitrogen (N2)', 'Helium (He)', 'Carbon Dioxide (CO2)',
  49.                             'Ammonia (NH3)', 'Hydrogen (H2)', 'Methane (CH4)']
  50.  
  51.         altitude_Of_Operation = ["0-10 km (Sea Level)", "20-30 km (Medium Atmosphere)", "30-80 km (High Atmosphere)",
  52.                                  "80 km+ (Vacuum)", "Any Altitude (0-80 km+)"]
  53.  
  54.         tank_Repressurisation = ['Autogenous', 'Inert gas']
  55.  
  56.         nozzle_Type_List = ["Linear Aerospike", "Toroidal Aerospike",
  57.                             "Converging Diverging Cone (Without Nozzle Extension)",
  58.                             "Converging Diverging Cone (With Nozzle Extension)",
  59.                             "Converging Diverging Bell (With Nozzle Extension)",
  60.                             "Converging Diverging Bell (Without Nozzle Extension)"]
  61.         random.shuffle(engine_Cycle)
  62.         engine_Cycle_Chosen = random.choice(engine_Cycle)
  63.         if 'Monopropellant (Decomposition)' in engine_Cycle_Chosen:
  64.             random.shuffle(propellant_List1)
  65.             propellant_List1_Chosen = random.choice(propellant_List1)
  66.             altitude_Of_Operation_Chosen = '80 km+ (Vacuum)'
  67.             tank_Repressurisation_Chosen = 'Inert Gas'
  68.             random.shuffle(nozzle_Type_List)
  69.             nozzle_Type_List.remove("Linear Aerospike")
  70.             nozzle_Type_List.remove("Toroidal Aerospike")
  71.             nozzle_Type_List.remove("Converging Diverging Cone (With Nozzle Extension)")
  72.             nozzle_Type_List.remove("Converging Diverging Bell (With Nozzle Extension)")
  73.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List)
  74.             engine_Name_Chosen = random.choice(engine_Name)
  75.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  76.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  77.             print(f"Your Engine is called: {engine_Name_Chosen}")
  78.             print(" ")
  79.             print(f"Your Engine Cycle is: {engine_Cycle_Chosen}")
  80.             print(f"Your Propellant is: {propellant_List1_Chosen}")
  81.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  82.             print(f"Your engine's nozzle type should be : {nozzle_Type_List_Chosen}")
  83.             print(
  84.                 f"Tank repressurisation would use an {tank_Repressurisation_Chosen} system, as an Autogenous one would be impossible")
  85.             print("")
  86.             print("Done!")
  87.         elif 'Monopropellant (Cold Gas)' in engine_Cycle_Chosen:
  88.             random.shuffle(propellant_List2)
  89.             propellant_List2_Chosen = random.choice(propellant_List2)
  90.             altitude_Of_Operation_Chosen = '80 km+ (Vacuum)'
  91.             tank_Repressurisation_Chosen = 'Inert Gas'
  92.             random.shuffle(nozzle_Type_List)
  93.             nozzle_Type_List.remove("Linear Aerospike")
  94.             nozzle_Type_List.remove("Toroidal Aerospike")
  95.             nozzle_Type_List.remove("Converging Diverging Cone (With Nozzle Extension)")
  96.             nozzle_Type_List.remove("Converging Diverging Bell (With Nozzle Extension)")
  97.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List)
  98.             engine_Name_Chosen = random.choice(engine_Name)
  99.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  100.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  101.             print(f"Your Engine is called: {engine_Name_Chosen}")
  102.             print(" ")
  103.             print(f"Your Engine Cycle is: {engine_Cycle_Chosen}")
  104.             print(f"Your Propellant is: {propellant_List2_Chosen}")
  105.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  106.             print(f"Your engine's nozzle type should be : {nozzle_Type_List_Chosen}")
  107.             print(f"Tank repressurisation would be impractical and unnesesary")
  108.             print("")
  109.             print("Done!")
  110.         elif engine_Cycle_Chosen == 'Expander (Closed)' or engine_Cycle_Chosen == 'Expander (Open)':
  111.             oxidiser_List1.remove('N2O4 (Nitrogen Tetroxide)')
  112.             oxidiser_List1.remove('N2H4 (Hydrazine)')
  113.             oxidiser_List1.remove('H2O2 (Hydrogen Peroxide) 95%')
  114.             oxidiser_List1.remove('H2O2 (Hydrogen Peroxide) 85%')
  115.             oxidiser_List1.remove('NOX (Nitrous Oxide)')
  116.             oxidiser_List1.remove('AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  117.             oxidiser_List1.remove('AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  118.             oxidiser_List1.remove('AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  119.             oxidiser_List1.remove('AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)')
  120.             oxidiser_List1.remove('AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)')
  121.             oxidiser_List1.remove('OF2 (Oxygen Difluoride)')
  122.             oxidiser_List1.remove('N2F4 (Tetrafluorohydrazine)')
  123.             oxidiser_List1.remove('ClF3 (Chlorine Trifluoride)')
  124.             oxidiser_List1.remove('ClF5 (Chlorine Pentafluoride)')
  125.             random.shuffle(oxidiser_List1)
  126.             oxidiser_Chosen = random.choice(oxidiser_List1)
  127.             if 'O2 (Oxygen)' in oxidiser_Chosen:
  128.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  129.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  130.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  131.             elif "F2 (Fluorine)" in oxidiser_Chosen:
  132.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  133.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  134.             elif "F2 (Fluorine) + O2 (Oxygen)" in oxidiser_Chosen or "O3 (Ozone)" in oxidiser_Chosen:
  135.                 fuel_List1.remove('CH4 (Methane)')
  136.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  137.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  138.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  139.                 fuel_List1.remove('NH3 (Ammonia)')
  140.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  141.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  142.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  143.                 fuel_List1.remove('N2H4 (Hydrazine)')
  144.             random.shuffle(fuel_List1)
  145.             fuel_Chosen = random.choice(fuel_List1)
  146.             random.shuffle(altitude_Of_Operation)
  147.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  148.             if altitude_Of_Operation_Chosen != "0-10 km (Sea Level)":
  149.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  150.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  151.             elif altitude_Of_Operation_Chosen == "Any Altitude of operation":
  152.                 nozzle_Type_List.remove("Converging Diverging Cone (With Nozzle Extension)")
  153.                 nozzle_Type_List.remove("Converging Diverging Bell (With Nozzle Extension)")
  154.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  155.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  156.             random.shuffle(tank_Repressurisation)
  157.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  158.             random.shuffle(nozzle_Type_List)
  159.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List)
  160.             engine_Name_Chosen = random.choice(engine_Name)
  161.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  162.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  163.             print(f"Your Engine is called: {engine_Name_Chosen}")
  164.             print(" ")
  165.             print(f"Your Engine Cycle is: {engine_Cycle_Chosen}")
  166.             print(f"Your Oxidiser is: {oxidiser_Chosen}")
  167.             print(f"Your Fuel is: {fuel_Chosen}")
  168.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  169.             print(f"Your engine's nozzle type should be : {nozzle_Type_List_Chosen}")
  170.             print(f"Tank repressurisation would be done through an {tank_Repressurisation_Chosen} repressurisation system")
  171.             print("")
  172.             print("Done!")
  173.         elif engine_Cycle_Chosen == 'Dual Expander (Closed)' or engine_Cycle_Chosen == 'Dual Expander (Open)':
  174.             oxidiser_List1.remove('N2O4 (Nitrogen Tetroxide)')
  175.             oxidiser_List1.remove('N2H4 (Hydrazine)')
  176.             oxidiser_List1.remove('H2O2 (Hydrogen Peroxide) 95%')
  177.             oxidiser_List1.remove('H2O2 (Hydrogen Peroxide) 85%')
  178.             oxidiser_List1.remove('NOX (Nitrous Oxide)')
  179.             oxidiser_List1.remove('AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  180.             oxidiser_List1.remove('AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  181.             oxidiser_List1.remove('AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  182.             oxidiser_List1.remove('AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)')
  183.             oxidiser_List1.remove('AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)')
  184.             oxidiser_List1.remove('OF2 (Oxygen Difluoride)')
  185.             oxidiser_List1.remove('N2F4 (Tetrafluorohydrazine)')
  186.             oxidiser_List1.remove('ClF3 (Chlorine Trifluoride)')
  187.             oxidiser_List1.remove('ClF5 (Chlorine Pentafluoride)')
  188.             random.shuffle(oxidiser_List1)
  189.             oxidiser_Chosen = random.choice(oxidiser_List1)
  190.             if 'O2 (Oxygen)' in oxidiser_Chosen:
  191.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  192.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  193.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  194.                 fuel_List1.remove('NH3 (Ammonia)')
  195.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  196.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  197.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  198.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  199.                 fuel_List1.remove('N2H4 (Hydrazine)')
  200.                 fuel_List1.remove('CH3OH (Methanol)')
  201.                 fuel_List1.remove('C12H24 (Kerosene)')
  202.                 fuel_List1.remove('B2H6 (Diborane)')
  203.                 fuel_List1.remove('B5H9 (Pentaborane)')
  204.                 fuel_List1.remove('C2H6 (Ethane)')
  205.             elif "F2 (Fluorine)" in oxidiser_Chosen:
  206.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  207.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  208.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  209.                 fuel_List1.remove('NH3 (Ammonia)')
  210.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  211.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  212.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  213.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  214.                 fuel_List1.remove('N2H4 (Hydrazine)')
  215.                 fuel_List1.remove('CH3OH (Methanol)')
  216.                 fuel_List1.remove('C12H24 (Kerosene)')
  217.                 fuel_List1.remove('B2H6 (Diborane)')
  218.                 fuel_List1.remove('B5H9 (Pentaborane)')
  219.                 fuel_List1.remove('C2H6 (Ethane)')
  220.             elif "F2 (Fluorine) + O2 (Oxygen)" in oxidiser_Chosen or "O3 (Ozone)" in oxidiser_Chosen:
  221.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  222.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  223.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  224.                 fuel_List1.remove('NH3 (Ammonia)')
  225.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  226.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  227.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  228.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  229.                 fuel_List1.remove('N2H4 (Hydrazine)')
  230.                 fuel_List1.remove('CH3OH (Methanol)')
  231.                 fuel_List1.remove('C12H24 (Kerosene)')
  232.                 fuel_List1.remove('B2H6 (Diborane)')
  233.                 fuel_List1.remove('B5H9 (Pentaborane)')
  234.                 fuel_List1.remove('C2H6 (Ethane)')
  235.             random.shuffle(fuel_List1)
  236.             fuel_Chosen = random.choice(fuel_List1)
  237.             random.shuffle(altitude_Of_Operation)
  238.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  239.             if altitude_Of_Operation_Chosen != "0-10 km (Sea Level)":
  240.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  241.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  242.             elif altitude_Of_Operation_Chosen == "Any Altitude of operation":
  243.                 nozzle_Type_List.remove("Converging Diverging Cone (With Nozzle Extension)")
  244.                 nozzle_Type_List.remove("Converging Diverging Bell (With Nozzle Extension)")
  245.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  246.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  247.             random.shuffle(tank_Repressurisation)
  248.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  249.             random.shuffle(nozzle_Type_List)
  250.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List)
  251.             engine_Name_Chosen = random.choice(engine_Name)
  252.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  253.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  254.             print(f"Your Engine is called: {engine_Name_Chosen}")
  255.             print(" ")
  256.             print(f"Your Engine Cycle is: {engine_Cycle_Chosen}")
  257.             print(f"Your Oxidiser is: {oxidiser_Chosen}")
  258.             print(f"Your Fuel is: {fuel_Chosen}")
  259.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  260.             print(f"Your engine's nozzle type should be : {nozzle_Type_List_Chosen}")
  261.             print(f"Tank repressurisation would be done through an {tank_Repressurisation_Chosen} repressurisation system")
  262.             print("")
  263.             print("Done!")
  264.         elif engine_Cycle_Chosen == 'Staged Combustion (Fuel Rich)' or engine_Cycle_Chosen == 'Full Flow Staged Combustion' or engine_Cycle_Chosen == 'Combustion Tap Off':
  265.             oxidiser_List1.remove('N2O4 (Nitrogen Tetroxide)')
  266.             oxidiser_List1.remove('H2O2 (Hydrogen Peroxide) 95%')
  267.             oxidiser_List1.remove('H2O2 (Hydrogen Peroxide) 85%')
  268.             oxidiser_List1.remove('NOX (Nitrous Oxide)')
  269.             oxidiser_List1.remove('AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  270.             oxidiser_List1.remove('AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  271.             oxidiser_List1.remove('AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)')
  272.             oxidiser_List1.remove('AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)')
  273.             oxidiser_List1.remove('AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)')
  274.             oxidiser_List1.remove('OF2 (Oxygen Difluoride)')
  275.             oxidiser_List1.remove('N2F4 (Tetrafluorohydrazine)')
  276.             oxidiser_List1.remove('ClF3 (Chlorine Trifluoride)')
  277.             oxidiser_List1.remove('ClF5 (Chlorine Pentafluoride)')
  278.             random.shuffle(oxidiser_List1)
  279.             oxidiser_Chosen = random.choice(oxidiser_List1)
  280.             fuel_List1.remove('CH4 (Methane)')
  281.             fuel_List1.remove('C2H5OH(Ethanol) 85%')
  282.             fuel_List1.remove('C2H5OH(Ethanol) 75%')
  283.             fuel_List1.remove('C6H5NH2 (Aniline)')
  284.             fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  285.             fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  286.             fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  287.             fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  288.             fuel_List1.remove('CH3OH (Methanol)')
  289.             fuel_List1.remove('C12H24 (Kerosene)')
  290.             fuel_List1.remove('C2H6 (Ethane)')
  291.             if 'O2 (Oxygen)' in oxidiser_Chosen:
  292.                 #fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  293.                 #fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  294.                 #fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  295.                 x=x+1
  296.             elif "F2 (Fluorine)" in oxidiser_Chosen:
  297.                 #fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  298.                 #fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  299.                 x=x+1
  300.             elif "F2 (Fluorine) + O2 (Oxygen)" in oxidiser_Chosen or "O3 (Ozone)" in oxidiser_Chosen:
  301.                 #fuel_List1.remove('CH4 (Methane)')
  302.                 #fuel_List1.remove('C2H5OH(Ethanol) 85%')
  303.                 #fuel_List1.remove('C2H5OH(Ethanol) 75%')
  304.                 #fuel_List1.remove('C6H5NH2 (Aniline)')
  305.                 fuel_List1.remove('NH3 (Ammonia)')
  306.                 #fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  307.                 #fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  308.                 #fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  309.                 fuel_List1.remove('N2H4 (Hydrazine)')
  310.             elif 'N2H4' in oxidiser_Chosen:
  311.                 #fuel_List1.remove('CH4 (Methane)')
  312.                 fuel_List1.remove('NH3 (Ammonia)')
  313.                 #fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  314.                 fuel_List1.remove('N2H4 (Hydrazine)')
  315.                 fuel_List1.remove('B5H9 (Pentaborane)')
  316.                 #fuel_List1.remove('C2H6 (Ethane)')
  317.             random.shuffle(fuel_List1)
  318.             fuel_Chosen = random.choice(fuel_List1)
  319.             random.shuffle(altitude_Of_Operation)
  320.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  321.             if altitude_Of_Operation_Chosen != "0-10 km (Sea Level)":
  322.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  323.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  324.             elif altitude_Of_Operation_Chosen == "Any Altitude of operation":
  325.                 nozzle_Type_List.remove("Converging Diverging Cone (With Nozzle Extension)")
  326.                 nozzle_Type_List.remove("Converging Diverging Bell (With Nozzle Extension)")
  327.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  328.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  329.             random.shuffle(tank_Repressurisation)
  330.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  331.             random.shuffle(nozzle_Type_List)
  332.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List)
  333.             engine_Name_Chosen = random.choice(engine_Name)
  334.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  335.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  336.             print(f"Your Engine is called: {engine_Name_Chosen}")
  337.             print(" ")
  338.             print(f"Your Engine Cycle is: {engine_Cycle_Chosen}")
  339.             print(f"Your Oxidiser is: {oxidiser_Chosen}")
  340.             print(f"Your Fuel is: {fuel_Chosen}")
  341.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  342.             print(f"Your engine's nozzle type should be : {nozzle_Type_List_Chosen}")
  343.             print(f"Tank repressurisation would be done through an {tank_Repressurisation_Chosen} repressurisation system")
  344.             print("")
  345.             print("Done!")
  346.         else:
  347.             random.shuffle(oxidiser_List1)
  348.             oxidiser_Chosen = random.choice(oxidiser_List1)
  349.             if 'O2 (Oxygen)' in oxidiser_Chosen:
  350.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  351.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  352.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  353.             elif "F2 (Fluorine)" in oxidiser_Chosen:
  354.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  355.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  356.             elif "F2 (Fluorine) + O2 (Oxygen)" in oxidiser_Chosen or "O3 (Ozone)" in oxidiser_Chosen:
  357.                 fuel_List1.remove('CH4 (Methane)')
  358.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  359.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  360.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  361.                 fuel_List1.remove('NH3 (Ammonia)')
  362.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  363.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  364.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  365.                 fuel_List1.remove('N2H4 (Hydrazine)')
  366.             elif 'AK2' in oxidiser_Chosen or 'ClF' in oxidiser_Chosen:
  367.                 fuel_List1.remove('H2 (Hydrogen)')
  368.                 fuel_List1.remove('CH4 (Methane)')
  369.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  370.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  371.                 fuel_List1.remove('NH3 (Ammonia)')
  372.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  373.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  374.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  375.                 fuel_List1.remove('C12H24 (Kerosene)')
  376.                 fuel_List1.remove('B2H6 (Diborane)')
  377.                 fuel_List1.remove('B5H9 (Pentaborane)')
  378.                 fuel_List1.remove('C2H6 (Ethane)')
  379.             elif 'N2H4' in oxidiser_Chosen:
  380.                 fuel_List1.remove('CH4 (Methane)')
  381.                 fuel_List1.remove('NH3 (Ammonia)')
  382.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  383.                 fuel_List1.remove('N2H4 (Hydrazine)')
  384.                 fuel_List1.remove('B5H9 (Pentaborane)')
  385.                 fuel_List1.remove('C2H6 (Ethane)')
  386.             elif 'N2O4' in oxidiser_Chosen or 'H2O2' in oxidiser_Chosen:
  387.                 fuel_List1.remove('H2 (Hydrogen)')
  388.                 fuel_List1.remove('CH4 (Methane)')
  389.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  390.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  391.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  392.                 fuel_List1.remove('NH3 (Ammonia)')
  393.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  394.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  395.                 fuel_List1.remove('CH3OH (Methanol)')
  396.                 fuel_List1.remove('C12H24 (Kerosene)')
  397.                 fuel_List1.remove('B2H6 (Diborane)')
  398.                 fuel_List1.remove('C2H6 (Ethane)')
  399.             elif 'N2H4' in oxidiser_Chosen:
  400.                 fuel_List1.remove('H2 (Hydrogen)')
  401.                 fuel_List1.remove('CH4 (Methane)')
  402.                 fuel_List1.remove('C2H5OH(Ethanol) 85%')
  403.                 fuel_List1.remove('C2H5OH(Ethanol) 75%')
  404.                 fuel_List1.remove('C6H5NH2 (Aniline)')
  405.                 fuel_List1.remove('NH3 (Ammonia)')
  406.                 fuel_List1.remove('75% CH6N2 + 25% N2H4 (UH-25)')
  407.                 fuel_List1.remove('50% CH6N2 + 50% N2H4 (Aerosine-50)')
  408.                 fuel_List1.remove('C2H8N2 (UnsymetricalDimethylHydrazine)')
  409.                 fuel_List1.remove('CH6N2 (MonomethylHydrazine)')
  410.                 fuel_List1.remove('N2H4 (Hydrazine)')
  411.                 fuel_List1.remove('CH3OH (Methanol)')
  412.                 fuel_List1.remove('C12H24 (Kerosene)')
  413.                 fuel_List1.remove('C2H6 (Ethane)')
  414.             random.shuffle(fuel_List1)
  415.             fuel_Chosen = random.choice(fuel_List1)
  416.             random.shuffle(altitude_Of_Operation)
  417.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  418.             if altitude_Of_Operation_Chosen != "0-10 km (Sea Level)":
  419.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  420.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  421.             elif altitude_Of_Operation_Chosen == "Any Altitude of operation":
  422.                 nozzle_Type_List.remove("Converging Diverging Cone (With Nozzle Extension)")
  423.                 nozzle_Type_List.remove("Converging Diverging Bell (With Nozzle Extension)")
  424.                 nozzle_Type_List.remove("Converging Diverging Cone (Without Nozzle Extension)")
  425.                 nozzle_Type_List.remove("Converging Diverging Bell (Without Nozzle Extension)")
  426.             random.shuffle(tank_Repressurisation)
  427.             tank_Repressurisation_Chosen = random.choice(tank_Repressurisation)
  428.             random.shuffle(nozzle_Type_List)
  429.             nozzle_Type_List_Chosen = random.choice(nozzle_Type_List)
  430.             engine_Name_Chosen = random.choice(engine_Name)
  431.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  432.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  433.             print(f"Your Engine is called: {engine_Name_Chosen}")
  434.             print(" ")
  435.             print(f"Your Engine Cycle is: {engine_Cycle_Chosen}")
  436.             print(f"Your Oxidiser is: {oxidiser_Chosen}")
  437.             print(f"Your Fuel is: {fuel_Chosen}")
  438.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  439.             print(f"Your engine's nozzle type should be : {nozzle_Type_List_Chosen}")
  440.             print(f"Tank repressurisation would be done through an {tank_Repressurisation_Chosen} repressurisation system")
  441.             print("")
  442.             print("Done!")
  443.         print(" ")
  444.         print(" ")
  445.         print("Do you wanna make another engine? [Y/N]")
  446.         repeatCommand = str(input(">")).upper()
  447.         if repeatCommand != "Y":
  448.             raise SystemExit
  449.  
  450.     elif thrust_Type == "NUCLEAR THERMAL" or thrust_Type == "NUCLEAR" or thrust_Type == "NTR":
  451.         engine_Types_2 = ["Gas Core", "Liquid Core", "Solid Core"]
  452.         propellantList_3 = ["Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)", "Water (H2O)", "Oxygen (O2)",
  453.                           "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)", "Uranium TetraBromide (UBr4)"]
  454.         nozzle_Type_List_2 = ["Converging Diverging Cone (With Nozzle Extension)",
  455.                             "Converging Diverging Bell (With Nozzle Extension)",]
  456.         altitude_Of_Operation = ["80 km+ (Vacuum)"]
  457.         if engine_Types_2 == "Gas Core":
  458.             propellantList_3.remove("Helium")
  459.             random.shuffle(propellantList_3)
  460.             random.shuffle(nozzle_Type_List)
  461.             random.shuffle(engine_Cycle)
  462.             random.shuffle(altitude_Of_Operation)
  463.             random.shuffle(engine_Types_2)
  464.             propellant_Chosen = random.choice(propellantList_3)
  465.             nozzle_Type_Chosen = random.choice(nozzle_Type_List)
  466.             engine_Cycle_Chosen = random.choice(engine_Cycle)
  467.             engine_Name_Chosen = random.choice(engine_Name)
  468.             altitude_Of_Operation_Chosen = random.choice(altitude_Of_Operation)
  469.             engine_Types_Chosen = random.choice(engine_Types_2)
  470.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  471.             print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  472.             print(f"Your Engine is called: {engine_Name_Chosen}")
  473.             print(" ")
  474.             print(f"Your Engine Type is: {engine_Types_Chosen}")
  475.             print(f"Your Thrust Director Type is: {nozzle_Type_Chosen}")
  476.             print(f"Your Propellant is: {propellant_Chosen}")
  477.             print(f"Your Altitude of operation is: {altitude_Of_Operation_Chosen}")
  478.             print("")
  479.             print("Done!")
  480.         print(" ")
  481.         print(" ")
  482.         print("Do you wanna make another engine? [Y/N]")
  483.         repeatCommand = str(input(">")).upper()
  484.         if repeatCommand != "Y":
  485.             raise SystemExit
  486.  
  487.     elif thrust_Type == "ELECTRIC / PLASMA" or thrust_Type == "ELECTRIC" or thrust_Type == "PLASMA" or thrust_Type == "PLSM":
  488.         propellant_List_4 = ["Xenon", "Argon", "Krypton", "Mercury"]
  489.         engine_Types_3 = ["ElectroMagnetic", "ElectroStatic", "ElectroThermal"]
  490.         random.shuffle(propellant_List_4)
  491.         random.shuffle(engine_Types_3)
  492.         propellant_Chosen = random.choice(propellant_List_4)
  493.         engine_Types_Chosen = random.choice(engine_Types_3)
  494.         engine_Name_Chosen = random.choice(engine_Name)
  495.         print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  496.         print("///////////////////////////////////////////////////////////////////////////////////////////////////////")
  497.         print(f"Your Engine is called: {engine_Name_Chosen}")
  498.         print(" ")
  499.         print(f"Your Engine Type is: {engine_Types_Chosen}")
  500.         print(f"Your Propellant is: {propellant_Chosen}")
  501.         print("")
  502.         print("Done!")
  503.     print(" ")
  504.     print(" ")
  505.     print("Do you wanna make another engine? [Y/N]")
  506.     repeatCommand = str(input(">")).upper()
  507.     if repeatCommand != "Y":
  508.         raise SystemExit
Advertisement
Add Comment
Please, Sign In to add comment