MAKS_Enjoyer

ITAR is a pain in my side (Whyy US government?????)

Nov 9th, 2022 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 93.61 KB | Source Code | 0 0
  1. import java.io.*;
  2. import java.time.*;
  3. import java.util.*;
  4. import java.nio.file.*;
  5. import org.apache.poi.xwpf.usermodel.*;
  6. import java.time.format.DateTimeFormatter;
  7.  
  8. class AutoEngineGen {
  9.     public static boolean MStringS(String[] strings, String tbc) {
  10.         boolean IsThere = false;
  11.         for (String s : strings) {
  12.             if (tbc.contains(s)) {
  13.                 IsThere = true;
  14.                 break;
  15.             }
  16.         }
  17.         return IsThere;
  18.     }
  19.     public static int rN (double add, int maxV){
  20.         return (int)(add + (Math.random() * maxV));
  21.     }
  22.     public static String rand(String[] array){
  23.         Collections.shuffle(Arrays.asList(array));
  24.         Random arrayChosen = new Random();
  25.         int arrayChosen_index = arrayChosen.nextInt(array.length);
  26.         return array[arrayChosen_index];
  27.     }
  28.     public static int findex(String[] array, String searched){
  29.         ArrayList<String> clist = new ArrayList<>();
  30.         Collections.addAll(clist, array);
  31.         return clist.indexOf(searched);
  32.     }
  33.     public static String[] split(String string, String Separator) {
  34.         return string.split(Separator);
  35.     }
  36.     public static void StndrdDet(String engine_Name, String engine_Cycle_Chosen, String oxidizer_Chosen, String fuel_Chosen,
  37.                                 String[] tank_Repressurisation, String[] altitude_Of_Operation) throws IOException {
  38.         String tank_Repressurisation_Chosen = rand(tank_Repressurisation);
  39.         String altitude_Of_Operation_Chosen = rand(altitude_Of_Operation);
  40.         String NzlReturnP = NzlParameters(altitude_Of_Operation_Chosen);
  41.         String[] parts = split(NzlReturnP, ", ");
  42.         String nozzle_Type_Chosen = parts[0];
  43.         String AreaRatio = parts[1];
  44.         boolean isHypergolic = isHypergolic(oxidizer_Chosen, fuel_Chosen);
  45.         boolean isCryogenic = isCryogenic(oxidizer_Chosen, fuel_Chosen);
  46.         String purpose = uses(isHypergolic, isCryogenic, altitude_Of_Operation_Chosen, engine_Cycle_Chosen);
  47.         String[] search_for = {"Upper", "Payload", "Space"}, cooling_mechanism;
  48.         boolean longDur = MStringS(search_for, purpose);
  49.         if (longDur) {
  50.             cooling_mechanism = new String[]{"Radiative Cooling", "Dump Cooling", "Film Cooling", "Regenerative Cooling",
  51.                     "Transpiration Cooling"};
  52.         } else {
  53.             cooling_mechanism = new String[]{"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
  54.                     "Regenerative Cooling", "Transpiration Cooling"};
  55.         }
  56.         String cooling_Mechanism_Chosen = rand(cooling_mechanism);
  57.         String f_regen = "";
  58.         if (cooling_Mechanism_Chosen.equals("Regenerative Cooling")) {
  59.             int choice = (rN(4, 63))/2;
  60.             if (Math.ceil(choice) == Math.floor(choice)) {
  61.                 f_regen = "Fuel ";
  62.             } else {
  63.                 f_regen = "Oxidizer ";
  64.             }
  65.         }
  66.         String cooling_Mechanism_C = f_regen + cooling_Mechanism_Chosen;
  67.         String injector = Injector(cooling_Mechanism_C, engine_Cycle_Chosen);
  68.         output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
  69.                 nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_C, isHypergolic, isCryogenic,
  70.                 purpose, injector, AreaRatio);
  71.     }
  72.     public static boolean isCryogenic(String oxidizer_chosen, String fuel_chosen) {
  73.         boolean isCryo = false;
  74.         switch (oxidizer_chosen) {
  75.             case "O3 (Ozone)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  76.                     "ClF5 (Chlorine Pentafluoride)", "O2 (Oxygen)" -> {
  77.                 isCryo = true;
  78.             }
  79.         }
  80.         switch (fuel_chosen) {
  81.             case "CH3OH (Methanol)", "C12H26 (n-Dodecane)", "H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  82.                     "B2H6 (Diborane)", "B5H9 (Pentaborane)", "NH3 (Ammonia)", "CH4 (Methane)" -> {
  83.                 isCryo = true;
  84.             }
  85.         }
  86.         return isCryo;
  87.     }
  88.     public static String uses(boolean isHypergolic, boolean isCryogenic, String alt, String En_Cycle) {
  89.         String use = "";
  90.         String[] pot_uses;
  91.         boolean complex = En_Cycle.contains("Combustion Tap") || En_Cycle.contains("Staged") || En_Cycle.contains("Full Flow");
  92.         if ((alt.equals("0-10 km (Sea Level)")) || (alt.equals("20-30 km (Medium Atmosphere)"))) {
  93.             if (complex) {
  94.                 pot_uses = new String[]{"Lower Stage (Main Propulsion)"};
  95.             } else {
  96.                 pot_uses = new String[]{"Lower Stage (Main Propulsion)", "Lower Stage (Course Correction)", "Lower Stage (Vernier)"};
  97.             }
  98.             use = rand(pot_uses);
  99.         } else if ((alt.equals("30-80 km (High Atmosphere)")) || (alt.equals("80 km+ (Vacuum)"))) {
  100.             if (isHypergolic && isCryogenic) {
  101.                 if (complex) {
  102.                     pot_uses = new String[]{"Upper Stage (Main Propulsion)"};
  103.                 } else {
  104.                     pot_uses = new String[]{"Upper Stage(Main Propulsion)", "Upper Stage(Course Correction)",
  105.                             "Upper Stage(Vernier)", "Upper Stage (Ullage)", "Payload (Main Propulsion)", "Payload (ACS)"};
  106.                 }
  107.                 use = rand(pot_uses);
  108.             } else if (!isHypergolic && isCryogenic) {
  109.                 if (complex) {
  110.                     pot_uses = new String[]{"Upper Stage (Main Propulsion)"};
  111.                 } else {
  112.                     pot_uses = new String[]{"Upper Stage (Main Propulsion)", "Upper Stage (Vernier)"};
  113.                 }
  114.                 use = rand(pot_uses);
  115.             } else if (isHypergolic && !isCryogenic) {
  116.                 if (complex) {
  117.                     pot_uses = new String[]{"Upper Stage(Main Propulsion)", "Payload (Main Propulsion)",
  118.                             "Space Tug (Main Propulsion)"};
  119.                 } else {
  120.                     pot_uses = new String[]{"Upper Stage(Main Propulsion)", "Upper Stage(Course Correction)",
  121.                             "Upper Stage(Vernier)", "Upper Stage (Ullage)", "Payload (Main Propulsion)",
  122.                             "Payload (ACS)", "Payload (Course Correction)", "Payload (Vernier)",
  123.                             "Space Tug (Main Propulsion)", "Space Tug (Course Correction)", "Space Tug (Vernier)",
  124.                             "Space Tug (Ullage)"};
  125.                 }
  126.                 use = rand(pot_uses);
  127.             }
  128.         } else {
  129.             pot_uses = new String[]{"Lower Stage (Main Propulsion)", "Upper Stage(Main Propulsion)", "Payload (Main Propulsion)"};
  130.             use = rand(pot_uses);
  131.         }
  132.         return use;
  133.     }
  134.     public static String Injector(String cooling_Mechanism, String engine_Cycle_Chosen) {
  135.         String fuel_state = "Liquid";
  136.         if (cooling_Mechanism.contains("Regenerative Cooling") || engine_Cycle_Chosen.contains("Expander")) {
  137.             fuel_state = "Gas";
  138.         }
  139.         String[] injector = {"Showerhead Injector", "Self-impinging Injector", "Cross-impinging Injector",
  140.                 "Swirl Injector", "Pintle Injector"};
  141.         return fuel_state + " " + rand(injector);
  142.     }
  143.     public static String NzlParameters (String altitude_Of_Operation_Chosen) {
  144.         String nozzle_Type_Chosen = "", OExpansionRatio = "";
  145.         switch (altitude_Of_Operation_Chosen) {
  146.             case "0-20 km (Sea Level)" -> {
  147.                 String[] nozzle_Type_List_SL = {"Contour Bell Nozzle", "Parabolic Bell Nozzle", "Conical Nozzle",
  148.                         "Stepped Dual Bell Nozzle"};
  149.                 nozzle_Type_Chosen = rand(nozzle_Type_List_SL);
  150.                 if (nozzle_Type_Chosen.equalsIgnoreCase("Conical Nozzle")) {
  151.                     OExpansionRatio = rN(10, 9) + ":1";
  152.                 } else {
  153.                     OExpansionRatio = rN(10, 12) + ":1";
  154.                 }
  155.             } case "20-30 km (Medium Atmosphere)" -> {
  156.                 String[] nozzle_Type_List_HA = {"Contour Bell Nozzle", "Parabolic Bell Nozzle", "Stepped Dual Bell Nozzle"};
  157.                 nozzle_Type_Chosen = rand(nozzle_Type_List_HA);
  158.                 OExpansionRatio = rN(32, 14) + ":1";
  159.             } case "30-80 km (High Atmosphere)" -> {
  160.                 String[] nozzle_Type_List_HAi = {"Contour Bell Nozzle", "Parabolic Bell Nozzle", "Stepped Dual Bell Nozzle"};
  161.                 nozzle_Type_Chosen = rand(nozzle_Type_List_HAi);
  162.                 OExpansionRatio = rN(47, 43) + ":1";
  163.             } case "80 km+ (Vacuum)" -> {
  164.                 String[] nozzle_Type_List_VA = {"Contour Bell Nozzle", "Parabolic Bell Nozzle", "Expanding Nozzle"};
  165.                 nozzle_Type_Chosen = rand(nozzle_Type_List_VA);
  166.                 OExpansionRatio = rN(90, 110) + ":1";
  167.             } case "Any Altitude (0-80 km+)" -> {
  168.                 String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle",
  169.                                                   "Stepped Dual Bell Nozzle"};
  170.                 nozzle_Type_Chosen = rand(nozzle_Type_List_Aero);
  171.                 if (nozzle_Type_Chosen.equalsIgnoreCase("Stepped Dual Bell Nozzle")) {
  172.                     OExpansionRatio = rN(10, 9) + ":1";
  173.                 } else {
  174.                     OExpansionRatio = "";
  175.                 }
  176.             }
  177.         }
  178.         return nozzle_Type_Chosen + ", " + OExpansionRatio;
  179.     }
  180.     public static String nameGen(String[] engine_Name1, String[] firstPart) {
  181.         String engine_Name;
  182.         Collections.shuffle(Arrays.asList(engine_Name1));
  183.         Collections.shuffle(Arrays.asList(firstPart));
  184.         Random engineNameChosen = new Random();
  185.         Random firstPartC = new Random();
  186.         int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
  187.         int firstPart_index = firstPartC.nextInt(firstPart.length);
  188.         String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
  189.         String firstPart_f = firstPart[firstPart_index] + "-";
  190.         int finalNumber = rN(12, 999);
  191.         if (finalNumber % 8 == 0) {
  192.             engine_Name = firstPart_f + finalNumber + engNameFinalf;
  193.         } else {
  194.             char randomizedCharacter;
  195.             int uio93 = rN(1, 999);
  196.             int uio94 = rN(1, 11);
  197.             Random randomLetter = new Random();
  198.             if (uio93 % uio94 == 0) {
  199.                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  200.                 while (randomizedCharacter != 'l' || randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
  201.                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
  202.                     if (randomizedCharacter != 'l' && randomizedCharacter != 'o' && randomizedCharacter != 'i' && randomizedCharacter != 'q' && randomizedCharacter != 'e' && randomizedCharacter != 'h' && randomizedCharacter != 'g' && randomizedCharacter != 'c' && randomizedCharacter != 'j') {
  203.                         break;
  204.                     }
  205.                 }
  206.             } else {
  207.                 randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  208.                 while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  209.                     randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
  210.                     if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
  211.                         break;
  212.                     }
  213.                 }
  214.             }
  215.             engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
  216.         }
  217.         return engine_Name;
  218.     }
  219.     public static void output_monod(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC, String CCC, String purpose) throws IOException {
  220.         String lbrk = "======================================================================================================================";
  221.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/ofb_rex.docx");
  222.         System.out.println(lbrk + '\n' + "Engine Designation: " + ENN + '\n');
  223.         System.out.println("Fuel Flow Cycle: " + ECC);
  224.         System.out.println("Propellant: " + PLC);
  225.         System.out.println("Altitude Of Operation: " + AOOC);
  226.         System.out.println("Exhaust Nozzle Geometry: " + NTLC);
  227.         System.out.println("Engine Use Case: " + purpose);
  228.         System.out.println("Nozzle Cooling Mechanism: " + CMC);
  229.         System.out.println("Propellant catalyst: " + CCC + '\n');
  230.         XWPFDocument docx = new XWPFDocument();
  231.         if (new File(String.valueOf(pathn1)).exists()) {
  232.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  233.             docx = new XWPFDocument(jesus);
  234.         }
  235.         XWPFParagraph par = docx.createParagraph();
  236.         XWPFRun run = par.createRun();
  237.         run.setFontSize(12);
  238.         run.setBold(true);
  239.         run.setFontFamily("Arial");
  240.         run.setText("Engine Designation: ");
  241.         run.setTextPosition(15);
  242.         XWPFRun run2 = par.createRun();
  243.         run2.setFontSize(12);
  244.         run2.setBold(true);
  245.         run2.setFontFamily("Arial");
  246.         run2.setText(ENN);
  247.         run2.setTextPosition(15);
  248.         run2.addBreak();
  249.         // -----------------------------------------------------------
  250.         XWPFRun run3 = par.createRun();
  251.         run3.setFontSize(10);
  252.         run3.setBold(true);
  253.         run3.setFontFamily("Arial");
  254.         run3.setText("Fuel Flow Cycle: ");
  255.         XWPFRun run4 = par.createRun();
  256.         run4.setFontSize(10);
  257.         run4.setFontFamily("Arial");
  258.         run4.setText(ECC);
  259.         run4.addBreak();
  260.         // -----------------------------------------------------------
  261.         XWPFRun run5 = par.createRun();
  262.         run5.setFontSize(10);
  263.         run5.setBold(true);
  264.         run5.setFontFamily("Arial");
  265.         run5.setText("Propellant(Remass): ");
  266.         XWPFRun run6 = par.createRun();
  267.         run6.setFontSize(10);
  268.         run6.setFontFamily("Arial");
  269.         run6.setText(PLC);
  270.         run6.addBreak();
  271.         // -----------------------------------------------------------
  272.         XWPFRun run9 = par.createRun();
  273.         run9.setFontSize(10);
  274.         run9.setBold(true);
  275.         run9.setFontFamily("Arial");
  276.         run9.setText("Exhaust Nozzle Geometry: ");
  277.         XWPFRun run0 = par.createRun();
  278.         run0.setFontSize(10);
  279.         run0.setFontFamily("Arial");
  280.         run0.setText(NTLC);
  281.         run0.addBreak();
  282.         // -----------------------------------------------------------
  283.         XWPFRun run104 = par.createRun();
  284.         run104.setFontSize(10);
  285.         run104.setBold(true);
  286.         run104.setFontFamily("Arial");
  287.         run104.setText("Engine Use Case: ");
  288.         XWPFRun run105 = par.createRun();
  289.         run105.setFontSize(10);
  290.         run105.setFontFamily("Arial");
  291.         run105.setText(purpose);
  292.         run105.addBreak();
  293.         // -----------------------------------------------------------
  294.         XWPFRun run10 = par.createRun();
  295.         run10.setFontSize(10);
  296.         run10.setBold(true);
  297.         run10.setFontFamily("Arial");
  298.         run10.setText("Altitude Of Operation: ");
  299.         XWPFRun run23 = par.createRun();
  300.         run23.setFontSize(10);
  301.         run23.setFontFamily("Arial");
  302.         run23.setText(AOOC);
  303.         run23.addBreak();
  304.         // -----------------------------------------------------------
  305.         XWPFRun run13 = par.createRun();
  306.         run13.setFontSize(10);
  307.         run13.setBold(true);
  308.         run13.setFontFamily("Arial");
  309.         run13.setText("Nozzle Cooling Mechanism: ");
  310.         XWPFRun run14 = par.createRun();
  311.         run14.setFontSize(10);
  312.         run14.setFontFamily("Arial");
  313.         run14.setText(CMC);
  314.         run14.addBreak();
  315.         // -----------------------------------------------------------
  316.         XWPFRun run15 = par.createRun();
  317.         run15.setFontSize(10);
  318.         run15.setBold(true);
  319.         run15.setFontFamily("Arial");
  320.         run15.setText("Engine catalyst: ");
  321.         XWPFRun run16 = par.createRun();
  322.         run16.setFontSize(10);
  323.         run16.setFontFamily("Arial");
  324.         run16.setText(CCC);
  325.         run16.addBreak();
  326.         run16.addBreak();
  327.         // -----------------------------------------------------------
  328.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  329.             docx.write(out);
  330.         }
  331.     }
  332.     public static void output_mono(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC, String purpose) throws IOException {
  333.         String lbrk = "======================================================================================================================";
  334.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/ofb_rex.docx");
  335.         System.out.println(lbrk + '\n' + "Engine Designation: " + ENN + '\n');
  336.         System.out.println("Fuel Flow Cycle: " + ECC);
  337.         System.out.println("Propellant: " + PLC);
  338.         System.out.println("Altitude Of Operation: " + AOOC);
  339.         System.out.println("Exhaust Nozzle Geometry: " + NTLC);
  340.         System.out.println("Engine Use Case: " + purpose);
  341.         System.out.println("Nozzle Cooling Mechanism: " + CMC + '\n');
  342.         XWPFDocument docx = new XWPFDocument();
  343.         if (new File(String.valueOf(pathn1)).exists()) {
  344.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  345.             docx = new XWPFDocument(jesus);
  346.         }
  347.         XWPFParagraph par = docx.createParagraph();
  348.         XWPFRun run = par.createRun();
  349.         run.setFontSize(12);
  350.         run.setBold(true);
  351.         run.setFontFamily("Arial");
  352.         run.setText("Engine Designation: ");
  353.         run.setTextPosition(15);
  354.         XWPFRun run2 = par.createRun();
  355.         run2.setFontSize(12);
  356.         run2.setBold(true);
  357.         run2.setFontFamily("Arial");
  358.         run2.setText(ENN);
  359.         run2.setTextPosition(15);
  360.         run2.addBreak();
  361.         // -----------------------------------------------------------
  362.         XWPFRun run3 = par.createRun();
  363.         run3.setFontSize(10);
  364.         run3.setBold(true);
  365.         run3.setFontFamily("Arial");
  366.         run3.setText("Fuel Flow Cycle: ");
  367.         XWPFRun run4 = par.createRun();
  368.         run4.setFontSize(10);
  369.         run4.setFontFamily("Arial");
  370.         run4.setText(ECC);
  371.         run4.addBreak();
  372.         // -----------------------------------------------------------
  373.         XWPFRun run5 = par.createRun();
  374.         run5.setFontSize(10);
  375.         run5.setBold(true);
  376.         run5.setFontFamily("Arial");
  377.         run5.setText("Propellant(Remass): ");
  378.         XWPFRun run6 = par.createRun();
  379.         run6.setFontSize(10);
  380.         run6.setFontFamily("Arial");
  381.         run6.setText(PLC);
  382.         run6.addBreak();
  383.         // -----------------------------------------------------------
  384.         XWPFRun run9 = par.createRun();
  385.         run9.setFontSize(10);
  386.         run9.setBold(true);
  387.         run9.setFontFamily("Arial");
  388.         run9.setText("Exhaust Nozzle Geometry: ");
  389.         XWPFRun run0 = par.createRun();
  390.         run0.setFontSize(10);
  391.         run0.setFontFamily("Arial");
  392.         run0.setText(NTLC);
  393.         run0.addBreak();
  394.         // -----------------------------------------------------------
  395.         XWPFRun run104 = par.createRun();
  396.         run104.setFontSize(10);
  397.         run104.setBold(true);
  398.         run104.setFontFamily("Arial");
  399.         run104.setText("Engine Use Case: ");
  400.         XWPFRun run105 = par.createRun();
  401.         run105.setFontSize(10);
  402.         run105.setFontFamily("Arial");
  403.         run105.setText(purpose);
  404.         run105.addBreak();
  405.         // -----------------------------------------------------------
  406.         XWPFRun run10 = par.createRun();
  407.         run10.setFontSize(10);
  408.         run10.setBold(true);
  409.         run10.setFontFamily("Arial");
  410.         run10.setText("Altitude Of Operation: ");
  411.         XWPFRun run23 = par.createRun();
  412.         run23.setFontSize(10);
  413.         run23.setFontFamily("Arial");
  414.         run23.setText(AOOC);
  415.         run23.addBreak();
  416.         // -----------------------------------------------------------
  417.         XWPFRun run13 = par.createRun();
  418.         run13.setFontSize(10);
  419.         run13.setBold(true);
  420.         run13.setFontFamily("Arial");
  421.         run13.setText("Nozzle Cooling Mechanism: ");
  422.         XWPFRun run14 = par.createRun();
  423.         run14.setFontSize(10);
  424.         run14.setFontFamily("Arial");
  425.         run14.setText(CMC);
  426.         run14.addBreak();
  427.         run14.addBreak();
  428.         // -----------------------------------------------------------
  429.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  430.             docx.write(out);
  431.         }
  432.     }
  433.     public static void output_nt(String ENN, String ECC, String AOOC, String NCC, String PLC, String RFC, String NTLC,
  434.                                  String TRC, String CMC, String purpose, String react_gen, boolean bimodal, String ERC,
  435.                                  String PRS, String ARR) throws IOException {
  436.         String lbrk = "======================================================================================================================";
  437.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/ofb_rex.docx");
  438.         System.out.println(lbrk + '\n' + "Engine Designation: " + ENN + '\n');
  439.         if (ECC.equals("Nuclear SaltWater")) {
  440.             System.out.println("Fuel Flow Cycle: " + NCC + " " + ECC);
  441.         } else {
  442.             System.out.println("Fuel Flow Cycle: " + ECC);
  443.         }
  444.         System.out.println("Propellant (Remass): " + PLC);
  445.         System.out.println("Propellant State: " + PRS);
  446.         System.out.println("Reactor Fuel: " + RFC);
  447.         System.out.println("Reactor Generation: " + react_gen);
  448.         System.out.println("Reactor Coolant: " + ERC + " - Xenon (Xe)");
  449.         String bimm1, bimm2, oo1, oo2;
  450.         if (!bimodal || ECC.equals("Nuclear SaltWater")) {
  451.             bimm1 = "Engine Bimodality: ";
  452.             oo1 = "Engine isn't bimodal";
  453.             bimm2 = "Engine Electrical Output: ";
  454.             oo2 = "None";
  455.         } else {
  456.             bimm1 = "Engine Bimodality: ";
  457.             oo1 = "Engine is bimodal";
  458.             bimm2 = "Engine Electrical Output: ";
  459.             double ops = rN(1.5, 100);
  460.             oo2 = String.format("%.1f", ops);
  461.             oo2 = oo2  + " MW";
  462.         }
  463.         System.out.println(bimm1 + oo1);
  464.         System.out.println(bimm2 + oo2);
  465.         System.out.println("Altitude Of Operation: " + AOOC);
  466.         System.out.println("Exhaust Nozzle Geometry: " + NTLC);
  467.         System.out.println("Engine Use Case: " + purpose);
  468.         System.out.println("Tank repressurisation Method: " + TRC);
  469.         System.out.println("Nozzle Cooling Mechanism: " + CMC + '\n');
  470.  
  471.         XWPFDocument docx = new XWPFDocument();
  472.         if (new File(String.valueOf(pathn1)).exists()) {
  473.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  474.             docx = new XWPFDocument(jesus);
  475.         }
  476.         XWPFParagraph par = docx.createParagraph();
  477.         XWPFRun run = par.createRun();
  478.         run.setFontSize(12);
  479.         run.setBold(true);
  480.         run.setFontFamily("Arial");
  481.         run.setText("Engine Designation: ");
  482.         run.setTextPosition(15);
  483.         XWPFRun run2 = par.createRun();
  484.         run2.setFontSize(12);
  485.         run2.setBold(true);
  486.         run2.setFontFamily("Arial");
  487.         run2.setText(ENN);
  488.         run2.setTextPosition(15);
  489.         run2.addBreak();
  490.         // -----------------------------------------------------------
  491.         XWPFRun run3 = par.createRun();
  492.         run3.setFontSize(10);
  493.         run3.setBold(true);
  494.         run3.setFontFamily("Arial");
  495.         run3.setText("Fuel Flow Cycle: ");
  496.         XWPFRun run4 = par.createRun();
  497.         run4.setFontSize(10);
  498.         run4.setFontFamily("Arial");
  499.         if (ECC.equals("Nuclear SaltWater")) {
  500.             run4.setText(ECC);
  501.         } else {
  502.             run4.setText(NCC + " " + ECC);
  503.         }
  504.         run4.addBreak();
  505.         // -----------------------------------------------------------
  506.         XWPFRun run5 = par.createRun();
  507.         run5.setFontSize(10);
  508.         run5.setBold(true);
  509.         run5.setFontFamily("Arial");
  510.         run5.setText("Propellant(Remass): ");
  511.         XWPFRun run6 = par.createRun();
  512.         run6.setFontSize(10);
  513.         run6.setFontFamily("Arial");
  514.         run6.setText(PLC);
  515.         run6.addBreak();
  516.         // -----------------------------------------------------------
  517.         XWPFRun run65 = par.createRun();
  518.         run65.setFontSize(10);
  519.         run65.setBold(true);
  520.         run65.setFontFamily("Arial");
  521.         run65.setText("Propellant State: ");
  522.         XWPFRun run66 = par.createRun();
  523.         run66.setFontSize(10);
  524.         run66.setFontFamily("Arial");
  525.         run66.setText(PRS);
  526.         run66.addBreak();
  527.         // -----------------------------------------------------------
  528.         XWPFRun run7 = par.createRun();
  529.         run7.setFontSize(10);
  530.         run7.setBold(true);
  531.         run7.setFontFamily("Arial");
  532.         run7.setText("Reactor Fuel: ");
  533.         XWPFRun run8 = par.createRun();
  534.         run8.setFontSize(10);
  535.         run8.setFontFamily("Arial");
  536.         run8.setText(RFC);
  537.         run8.addBreak();
  538.         // -----------------------------------------------------------
  539.         XWPFRun run767 = par.createRun();
  540.         run767.setFontSize(10);
  541.         run767.setBold(true);
  542.         run767.setFontFamily("Arial");
  543.         run767.setText("Reactor Generation: ");
  544.         XWPFRun run768 = par.createRun();
  545.         run768.setFontSize(10);
  546.         run768.setFontFamily("Arial");
  547.         run768.setText(react_gen);
  548.         run768.addBreak();
  549.         // -----------------------------------------------------------
  550.         XWPFRun run566 = par.createRun();
  551.         run566.setFontSize(10);
  552.         run566.setBold(true);
  553.         run566.setFontFamily("Arial");
  554.         run566.setText("Engine Coolant: ");
  555.         XWPFRun run567 = par.createRun();
  556.         run567.setFontSize(10);
  557.         run567.setFontFamily("Arial");
  558.         run567.setText(ERC + " - Xe (Xenon)");
  559.         run567.addBreak();
  560.         // -----------------------------------------------------------
  561.         XWPFRun run769 = par.createRun();
  562.         run769.setFontSize(10);
  563.         run769.setBold(true);
  564.         run769.setFontFamily("Arial");
  565.         run769.setText(bimm1);
  566.         XWPFRun run770 = par.createRun();
  567.         run770.setFontSize(10);
  568.         run770.setFontFamily("Arial");
  569.         run770.setText(oo1);
  570.         run770.addBreak();
  571.         // -----------------------------------------------------------
  572.         XWPFRun run771 = par.createRun();
  573.         run771.setFontSize(10);
  574.         run771.setBold(true);
  575.         run771.setFontFamily("Arial");
  576.         run771.setText(bimm2);
  577.         XWPFRun run772 = par.createRun();
  578.         run772.setFontSize(10);
  579.         run772.setFontFamily("Arial");
  580.         run772.setText(oo2);
  581.         run772.addBreak();
  582.         // -----------------------------------------------------------
  583.         XWPFRun run9 = par.createRun();
  584.         run9.setFontSize(10);
  585.         run9.setBold(true);
  586.         run9.setFontFamily("Arial");
  587.         run9.setText("Exhaust Nozzle Geometry: ");
  588.         XWPFRun run0 = par.createRun();
  589.         run0.setFontSize(10);
  590.         run0.setFontFamily("Arial");
  591.         run0.setText(NTLC);
  592.         run0.addBreak();
  593.         // -----------------------------------------------------------
  594.         XWPFRun run69 = par.createRun();
  595.         run69.setFontSize(10);
  596.         run69.setBold(true);
  597.         run69.setFontFamily("Arial");
  598.         run69.setText("Exhaust Nozzle Area Ratio: ");
  599.         XWPFRun run60 = par.createRun();
  600.         run60.setFontSize(10);
  601.         run60.setFontFamily("Arial");
  602.         run60.setText(ARR);
  603.         run60.addBreak();
  604.         // -----------------------------------------------------------
  605.         XWPFRun run104 = par.createRun();
  606.         run104.setFontSize(10);
  607.         run104.setBold(true);
  608.         run104.setFontFamily("Arial");
  609.         run104.setText("Engine Use Case: ");
  610.         XWPFRun run105 = par.createRun();
  611.         run105.setFontSize(10);
  612.         run105.setFontFamily("Arial");
  613.         run105.setText(purpose);
  614.         run105.addBreak();
  615.         // -----------------------------------------------------------
  616.         XWPFRun run10 = par.createRun();
  617.         run10.setFontSize(10);
  618.         run10.setBold(true);
  619.         run10.setFontFamily("Arial");
  620.         run10.setText("Altitude Of Operation: ");
  621.         XWPFRun run23 = par.createRun();
  622.         run23.setFontSize(10);
  623.         run23.setFontFamily("Arial");
  624.         run23.setText(AOOC);
  625.         run23.addBreak();
  626.         // ------------------------------------------------------------
  627.         XWPFRun run11 = par.createRun();
  628.         run11.setFontSize(10);
  629.         run11.setBold(true);
  630.         run11.setFontFamily("Arial");
  631.         run11.setText("Tank repressurisation Method: ");
  632.         XWPFRun run12 = par.createRun();
  633.         run12.setFontSize(10);
  634.         run12.setFontFamily("Arial");
  635.         run12.setText(TRC);
  636.         run12.addBreak();
  637.         // -----------------------------------------------------------
  638.         XWPFRun run13 = par.createRun();
  639.         run13.setFontSize(10);
  640.         run13.setBold(true);
  641.         run13.setFontFamily("Arial");
  642.         run13.setText("Nozzle Cooling Mechanism: ");
  643.         XWPFRun run14 = par.createRun();
  644.         run14.setFontSize(10);
  645.         run14.setFontFamily("Arial");
  646.         run14.setText(CMC);
  647.         run14.addBreak();
  648.         run14.addBreak();
  649.         // -----------------------------------------------------------
  650.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  651.             docx.write(out);
  652.         }
  653.     }
  654.     public static void output_et(String ENN, String ECC, String AOOC, String PLC, String NTLC, String PGLC, String purpose) throws IOException {
  655.         String lbrk = "======================================================================================================================";
  656.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/ofb_rex.docx");
  657.         System.out.println(lbrk + '\n' + "Engine Designation: " + ENN + '\n');
  658.         System.out.println("Fuel Flow Cycle: " + ECC);
  659.         System.out.println("Propellant(Remass): " + PLC);
  660.         System.out.println("Altitude Of Operation: " + AOOC);
  661.         System.out.println("Exhaust Nozzle Geometry: " + NTLC);
  662.         System.out.println("Engine Use Case: " + purpose);
  663.         System.out.println("Engine Power Source: " + PGLC);
  664.         String pwr = (Math.round((float)rN(20, 980)/10))*10 + " kW" + '\n';
  665.         System.out.println("Rated Power Level: " + pwr);
  666.  
  667.         XWPFDocument docx = new XWPFDocument();
  668.         if (new File(String.valueOf(pathn1)).exists()) {
  669.             FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
  670.             docx = new XWPFDocument(jesus);
  671.         }
  672.         XWPFParagraph par = docx.createParagraph();
  673.         XWPFRun run = par.createRun();
  674.         run.setFontSize(12);
  675.         run.setBold(true);
  676.         run.setFontFamily("Arial");
  677.         run.setText("Engine Designation: ");
  678.         run.setTextPosition(15);
  679.         XWPFRun run2 = par.createRun();
  680.         run2.setFontSize(12);
  681.         run2.setBold(true);
  682.         run2.setFontFamily("Arial");
  683.         run2.setText(ENN);
  684.         run2.setTextPosition(15);
  685.         run2.addBreak();
  686.         // -----------------------------------------------------------
  687.         XWPFRun run3 = par.createRun();
  688.         run3.setFontSize(10);
  689.         run3.setBold(true);
  690.         run3.setFontFamily("Arial");
  691.         run3.setText("Fuel Flow Cycle: ");
  692.         XWPFRun run4 = par.createRun();
  693.         run4.setFontSize(10);
  694.         run4.setFontFamily("Arial");
  695.         run4.setText(ECC);
  696.         run4.addBreak();
  697.         // -----------------------------------------------------------
  698.         XWPFRun run5 = par.createRun();
  699.         run5.setFontSize(10);
  700.         run5.setBold(true);
  701.         run5.setFontFamily("Arial");
  702.         run5.setText("Propellant(Remass): ");
  703.         XWPFRun run6 = par.createRun();
  704.         run6.setFontSize(10);
  705.         run6.setFontFamily("Arial");
  706.         run6.setText(PLC);
  707.         run6.addBreak();
  708.         // -----------------------------------------------------------
  709.         XWPFRun run9 = par.createRun();
  710.         run9.setFontSize(10);
  711.         run9.setBold(true);
  712.         run9.setFontFamily("Arial");
  713.         run9.setText("Exhaust Nozzle Geometry: ");
  714.         XWPFRun run0 = par.createRun();
  715.         run0.setFontSize(10);
  716.         run0.setFontFamily("Arial");
  717.         run0.setText(NTLC);
  718.         run0.addBreak();
  719.         // -----------------------------------------------------------
  720.         XWPFRun run104 = par.createRun();
  721.         run104.setFontSize(10);
  722.         run104.setBold(true);
  723.         run104.setFontFamily("Arial");
  724.         run104.setText("Engine Use Case: ");
  725.         XWPFRun run105 = par.createRun();
  726.         run105.setFontSize(10);
  727.         run105.setFontFamily("Arial");
  728.         run105.setText(purpose);
  729.         run105.addBreak();
  730.         // -----------------------------------------------------------
  731.         XWPFRun run10 = par.createRun();
  732.         run10.setFontSize(10);
  733.         run10.setBold(true);
  734.         run10.setFontFamily("Arial");
  735.         run10.setText("Altitude Of Operation: ");
  736.         XWPFRun run23 = par.createRun();
  737.         run23.setFontSize(10);
  738.         run23.setFontFamily("Arial");
  739.         run23.setText(AOOC);
  740.         run23.addBreak();
  741.         // -----------------------------------------------------------
  742.         XWPFRun run11 = par.createRun();
  743.         run11.setFontSize(10);
  744.         run11.setBold(true);
  745.         run11.setFontFamily("Arial");
  746.         run11.setText("Engine Power Source: ");
  747.         XWPFRun run12 = par.createRun();
  748.         run12.setFontSize(10);
  749.         run12.setFontFamily("Arial");
  750.         run12.setText(PGLC);
  751.         run12.addBreak();
  752.         // -----------------------------------------------------------
  753.         XWPFRun run13 = par.createRun();
  754.         run13.setFontSize(10);
  755.         run13.setBold(true);
  756.         run13.setFontFamily("Arial");
  757.         run13.setText("Rated Power Level: ");
  758.         XWPFRun run14 = par.createRun();
  759.         run14.setFontSize(10);
  760.         run14.setFontFamily("Arial");
  761.         run14.setText(pwr);
  762.         run14.addBreak();
  763.         run14.addBreak();
  764.         // -----------------------------------------------------------
  765.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  766.             docx.write(out);
  767.         }
  768.     }
  769.     public static void output_def(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRC, String CMC,
  770.                                   boolean isHyp, boolean isCryo, String purpose, String injector, String ARR) throws IOException {
  771.         String lbrk = "======================================================================================================================";
  772.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/ofb_rex.docx");
  773.         System.out.println(lbrk + '\n' + "Engine Designation: " + ENN + '\n');
  774.         System.out.println("Fuel Flow Cycle: " + ECC);
  775.         System.out.println("Engine Oxidizer: " + OCC);
  776.         System.out.println("Engine Fuel: " + FCC);
  777.         String message1 = "Propellant properties: ", message2, ThrottleRange, piss;
  778.  
  779.         if ((isCryo) && (isHyp)) {
  780.             message2 = "Hypergolic and cryogenic";
  781.             System.out.println(message1 + message2);
  782.         } else if ((isCryo) && (!isHyp)) {
  783.             message2 = "Not Hypergolic but cryogenic";
  784.             System.out.println(message1 + message2);
  785.         } else if ((!isCryo) && (isHyp)) {
  786.             message2 = "Hypergolic but not cryogenic";
  787.             System.out.println(message1 + message2);
  788.         } else {
  789.             message2 = "Neither Hypergolic nor cryogenic";
  790.             System.out.println(message1 + message2);
  791.         }
  792.        
  793.         int uio96 = rN(1, 999);
  794.         int uio97 = rN(1, 11);
  795.         if (uio96 % uio97 == 0) {
  796.             int Throttle_MinV = rN(1, 99);
  797.             int Throttle_MaxV = rN(100, 15);
  798.             ThrottleRange = Throttle_MinV + "-" + Throttle_MaxV + "%";
  799.         } else {
  800.             ThrottleRange = "Not Throttleable";
  801.         }
  802.        
  803.         if (purpose.contains("Vernier")) {
  804.             int gimbalangle = rN(0, 30);
  805.             if ((!(gimbalangle >= 1)) || AOOC.equals("80 km+ (Vacuum)")) {
  806.                 piss = "None";
  807.             } else {
  808.                 piss = gimbalangle + "°";
  809.             }
  810.         } else if (purpose.contains("Course Correction") && !purpose.contains("Lower Stage")) {
  811.             piss = "None";
  812.         } else {
  813.             int gimbalangle = rN(0, 10);
  814.             if ((!(gimbalangle >= 1)) || AOOC.equals("80 km+ (Vacuum)")) {
  815.                 piss = "None";
  816.             } else {
  817.                 piss = gimbalangle + "°";
  818.             }
  819.         }
  820.         int chambers = rN(1, 2);
  821.         String chamberN = "", cmbrM = "Engine chamber configuration: ";
  822.         if (chambers == 1 || NTC.contains("Aerospike")) {
  823.             chamberN = "Single Chamber";
  824.         } else if (chambers == 2) {
  825.             chamberN = "Dual Chamber";
  826.         } else if (chambers == 3) {
  827.             chamberN = "Quadruple Chamber";
  828.         }
  829.         System.out.println("Altitude Of Operation: " + AOOC);
  830.         System.out.println("Exhaust Nozzle Geometry: " + NTC);
  831.         System.out.println("Exhaust Nozzle Area Ratio: " + ARR);
  832.         System.out.println("Engine Gimbal Range: " + piss);
  833.         System.out.println("Engine Injector Design: " + injector);
  834.         System.out.println(cmbrM + chamberN);
  835.         System.out.println("Engine Use Case: " + purpose);
  836.         System.out.println("Tank repressurisation Method: " + TRC);
  837.         System.out.println("Nozzle Cooling Mechanism: " + CMC);
  838.         System.out.println("Engine Throttle Range: " + ThrottleRange + '\n');
  839.  
  840.         XWPFDocument docx = new XWPFDocument();
  841.         if (new File(String.valueOf(pathn1)).exists()) {
  842.             docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
  843.         }
  844.         XWPFParagraph par = docx.createParagraph();
  845.         XWPFRun run = par.createRun();
  846.         run.setFontSize(12);
  847.         run.setBold(true);
  848.         run.setFontFamily("Arial");
  849.         run.setText("Engine Designation: ");
  850.         run.setTextPosition(15);
  851.         XWPFRun run2 = par.createRun();
  852.         run2.setFontSize(12);
  853.         run2.setBold(true);
  854.         run2.setFontFamily("Arial");
  855.         run2.setText(ENN);
  856.         run2.setTextPosition(15);
  857.         run2.addBreak();
  858.         // -----------------------------------------------------------
  859.         XWPFRun run3 = par.createRun();
  860.         run3.setFontSize(10);
  861.         run3.setBold(true);
  862.         run3.setFontFamily("Arial");
  863.         run3.setText("Fuel Flow Cycle: ");
  864.         XWPFRun run4 = par.createRun();
  865.         run4.setFontSize(10);
  866.         run4.setFontFamily("Arial");
  867.         run4.setText(ECC);
  868.         run4.addBreak();
  869.         // -----------------------------------------------------------
  870.         XWPFRun run5 = par.createRun();
  871.         run5.setFontSize(10);
  872.         run5.setBold(true);
  873.         run5.setFontFamily("Arial");
  874.         run5.setText("Engine Oxidizer: ");
  875.         XWPFRun run6 = par.createRun();
  876.         run6.setFontSize(10);
  877.         run6.setFontFamily("Arial");
  878.         run6.setText(OCC);
  879.         run6.addBreak();
  880.         // -----------------------------------------------------------
  881.         XWPFRun run8 = par.createRun();
  882.         run8.setFontSize(10);
  883.         run8.setBold(true);
  884.         run8.setFontFamily("Arial");
  885.         run8.setText("Engine Fuel: ");
  886.         XWPFRun run7 = par.createRun();
  887.         run7.setFontSize(10);
  888.         run7.setFontFamily("Arial");
  889.         run7.setText(FCC);
  890.         run7.addBreak();
  891.         // -----------------------------------------------------------
  892.         XWPFRun run100 = par.createRun();
  893.         run100.setFontSize(10);
  894.         run100.setBold(true);
  895.         run100.setFontFamily("Arial");
  896.         run100.setText(message1);
  897.         XWPFRun run107 = par.createRun();
  898.         run107.setFontSize(10);
  899.         run107.setBold(false);
  900.         run107.setFontFamily("Arial");
  901.         run107.setText(message2);
  902.         run107.addBreak();
  903.         // -----------------------------------------------------------
  904.         XWPFRun run9 = par.createRun();
  905.         run9.setFontSize(10);
  906.         run9.setBold(true);
  907.         run9.setFontFamily("Arial");
  908.         run9.setText("Exhaust Nozzle Geometry: ");
  909.         XWPFRun run0 = par.createRun();
  910.         run0.setFontSize(10);
  911.         run0.setFontFamily("Arial");
  912.         run0.setText(NTC);
  913.         run0.addBreak();
  914.         // -----------------------------------------------------------
  915.         XWPFRun run69 = par.createRun();
  916.         run69.setFontSize(10);
  917.         run69.setBold(true);
  918.         run69.setFontFamily("Arial");
  919.         run69.setText("Exhaust Nozzle Area Ratio: ");
  920.         XWPFRun run60 = par.createRun();
  921.         run60.setFontSize(10);
  922.         run60.setFontFamily("Arial");
  923.         run60.setText(ARR);
  924.         run60.addBreak();
  925.         // -----------------------------------------------------------
  926.         XWPFRun run101 = par.createRun();
  927.         run101.setFontSize(10);
  928.         run101.setBold(true);
  929.         run101.setFontFamily("Arial");
  930.         run101.setText("Engine Gimbal Range: ");
  931.         XWPFRun run27 = par.createRun();
  932.         run27.setFontSize(10);
  933.         run27.setFontFamily("Arial");
  934.         run27.setText(piss);
  935.         run27.addBreak();
  936.         // -----------------------------------------------------------
  937.         XWPFRun run102 = par.createRun();
  938.         run102.setFontSize(10);
  939.         run102.setBold(true);
  940.         run102.setFontFamily("Arial");
  941.         run102.setText("Engine Injector Design: ");
  942.         XWPFRun run103 = par.createRun();
  943.         run103.setFontSize(10);
  944.         run103.setFontFamily("Arial");
  945.         run103.setText(injector);
  946.         run103.addBreak();
  947.         // -----------------------------------------------------------
  948.         XWPFRun run167 = par.createRun();
  949.         run167.setFontSize(10);
  950.         run167.setBold(true);
  951.         run167.setFontFamily("Arial");
  952.         run167.setText(cmbrM);
  953.         XWPFRun run168 = par.createRun();
  954.         run168.setFontSize(10);
  955.         run168.setFontFamily("Arial");
  956.         run168.setText(chamberN);
  957.         run168.addBreak();
  958.         // -----------------------------------------------------------
  959.         XWPFRun run104 = par.createRun();
  960.         run104.setFontSize(10);
  961.         run104.setBold(true);
  962.         run104.setFontFamily("Arial");
  963.         run104.setText("Engine Use Case: ");
  964.         XWPFRun run105 = par.createRun();
  965.         run105.setFontSize(10);
  966.         run105.setFontFamily("Arial");
  967.         run105.setText(purpose);
  968.         run105.addBreak();
  969.         // -----------------------------------------------------------
  970.         XWPFRun run10 = par.createRun();
  971.         run10.setFontSize(10);
  972.         run10.setBold(true);
  973.         run10.setFontFamily("Arial");
  974.         run10.setText("Altitude Of Operation: ");
  975.         XWPFRun run23 = par.createRun();
  976.         run23.setFontSize(10);
  977.         run23.setFontFamily("Arial");
  978.         run23.setText(AOOC);
  979.         run23.addBreak();
  980.         // -----------------------------------------------------------
  981.         XWPFRun run11 = par.createRun();
  982.         run11.setFontSize(10);
  983.         run11.setBold(true);
  984.         run11.setFontFamily("Arial");
  985.         run11.setText("Tank repressurisation Method: ");
  986.         XWPFRun run12 = par.createRun();
  987.         run12.setFontSize(10);
  988.         run12.setFontFamily("Arial");
  989.         run12.setText(TRC);
  990.         run12.addBreak();
  991.         // -----------------------------------------------------------
  992.         XWPFRun run13 = par.createRun();
  993.         run13.setFontSize(10);
  994.         run13.setBold(true);
  995.         run13.setFontFamily("Arial");
  996.         run13.setText("Nozzle Cooling Mechanism: ");
  997.         XWPFRun run14 = par.createRun();
  998.         run14.setFontSize(10);
  999.         run14.setFontFamily("Arial");
  1000.         run14.setText(CMC);
  1001.         run14.addBreak();
  1002.         // -----------------------------------------------------------
  1003.         XWPFRun run15 = par.createRun();
  1004.         run15.setFontSize(10);
  1005.         run15.setBold(true);
  1006.         run15.setFontFamily("Arial");
  1007.         run15.setText("Engine Throttle Range: ");
  1008.         XWPFRun run16 = par.createRun();
  1009.         run16.setFontSize(10);
  1010.         run16.setFontFamily("Arial");
  1011.         run16.setText(ThrottleRange);
  1012.         run16.addBreak();
  1013.         run16.addBreak();
  1014.         // -----------------------------------------------------------
  1015.         try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
  1016.             docx.write(out);
  1017.         }
  1018.     }
  1019.     public static boolean isHypergolic (String OCC, String FCC) {
  1020.         boolean isHypergolic = false;
  1021.         switch (OCC) {
  1022.             case "N2O4 (Nitrogen Tetroxide)" -> {
  1023.                 switch (FCC) {
  1024.                     case "50% CH6N2 + 50% N2H4 (Aerosine-50)", "75% CH6N2 + 25% N2H4 (UH-25)", "C6H5NH2 (Aniline)" ,
  1025.                             "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)" ->{
  1026.                         isHypergolic = true;
  1027.                     } default -> {
  1028.                         isHypergolic = false;
  1029.                     }
  1030.                 }
  1031.             } case "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%",
  1032.                     "H2O2 (Hydrogen Peroxide) 75%", "O2 (Oxygen)" -> {
  1033.                 isHypergolic = false;
  1034.             } case "O3 (Ozone)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "ClF5 (Chlorine Pentafluoride)" -> {
  1035.                 isHypergolic = true;
  1036.             } case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1037.                     "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1038.                     "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)" -> {
  1039.                 switch (FCC) {
  1040.                     case "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)" ->{
  1041.                         isHypergolic = true;
  1042.                     } default -> {
  1043.                         isHypergolic = false;
  1044.                     }
  1045.                 }
  1046.             }
  1047.         }
  1048.         return isHypergolic;
  1049.     }
  1050.     public static void main(String[] args) throws IOException {
  1051.         long start = System.currentTimeMillis();
  1052.         File org = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles");
  1053.         org.mkdir();
  1054.         File org1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/DevData");
  1055.         org1.mkdir();
  1056.         File org2 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData");
  1057.         org2.mkdir();
  1058.         // -------------------------------------
  1059.         File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/ofb_rex.docx");
  1060.         if (!(new File(String.valueOf(pathn1)).exists())) {
  1061.             XWPFDocument docx1 = new XWPFDocument();
  1062.             XWPFParagraph par1 = docx1.createParagraph();
  1063.             par1.setAlignment(ParagraphAlignment.CENTER);
  1064.             XWPFRun run1 = par1.createRun();
  1065.             run1.setText("Rocket Engine Registry");
  1066.             run1.setFontFamily("Arial");
  1067.             run1.setBold(true);
  1068.             run1.setFontSize(33);
  1069.             run1.setTextPosition(60);
  1070.             // -----------------------------------------------------------------------------
  1071.             XWPFParagraph par2 = docx1.createParagraph();
  1072.             par2.setAlignment(ParagraphAlignment.RIGHT);
  1073.             XWPFRun run2 = par2.createRun();
  1074.             LocalDateTime date = LocalDateTime.now();
  1075.             DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  1076.             String dt = date.format(formatter);
  1077.             run2.setText("Created on: " + dt);
  1078.             run2.setFontFamily("Arial");
  1079.             run2.setBold(true);
  1080.             run2.setFontSize(10);
  1081.             run2.setTextPosition(75);
  1082.             // ----------------------------------------------------------------------------------------------------
  1083.             try (FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1))) {
  1084.                 docx1.write(out1);
  1085.                 out1.close();
  1086.                 docx1.close();
  1087.             }
  1088.         }
  1089.         File ops = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData");
  1090.         ops.mkdir();
  1091.         System.out.println("Welcome to the Advanced Rocket Engine Generator!" + '\n');
  1092.         Scanner scanner = new Scanner(System.in);
  1093.         String repeatCommand = "y";
  1094.         int y = 0, h = 0;
  1095.         ArrayList<Double> yi = new ArrayList<>(100);
  1096.         while (!repeatCommand.equals("N")) {
  1097.             int am = 25;
  1098.             boolean test = true;
  1099.             if (test) {
  1100.                 if ((new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/FullFolders/ofb_rex[Full]" + am + ".docx")).exists()) repeatCommand = "N";
  1101.             } else{
  1102.                 System.out.println("Do you want to generate a new engine? [Y/N]");
  1103.                 System.out.print("> ");
  1104.                 repeatCommand = scanner.next();
  1105.             }
  1106.             Path onlyfans = Path.of(String.valueOf(pathn1));
  1107.             if (repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("NO")) {
  1108.                 float sum = 0;
  1109.                 for (int u = 0; u < (yi.size() - 1); u++) sum = (float) (sum + yi.get(u));
  1110.                 long end = System.currentTimeMillis();
  1111.                 float timen = (float)(end - start)/1000;
  1112.                 int r = yi.size();
  1113.                 String fugg = "Number of files created: " + am;
  1114.                 String piss;
  1115.                 if (r <= 1) {
  1116.                     piss = '\n' + "Average amount of bytes per engine: " + (pathn1.length()/y) + " bytes";
  1117.                 } else {
  1118.                     piss = '\n' + "Average amount of bytes per engine: " + (sum / yi.size()) + " bytes";
  1119.                 }
  1120.                 String pussay = "Average amount of engines per file: " + sum + " engines";
  1121.                 String hamstrings;
  1122.                 if (timen < 60) {
  1123.                     hamstrings = "Total run time: " + timen + " secs";
  1124.                 } else if (timen/60 < 2) {
  1125.                     hamstrings = "Total run time: " + (int)Math.floor(timen/60) + " min " + Math.round(timen%60) + " secs";
  1126.                 } else {
  1127.                     hamstrings = "Total run time: " + (int)Math.floor(timen/60) + " mins " + Math.round(timen%60) + " secs";
  1128.                 }
  1129.                 String shoe = "Rate of engine generation: " + h/timen + " engines/second";
  1130.                 String back = "Number of engines in files: " + h;
  1131.                 try {
  1132.                     FileWriter fwrite = new FileWriter("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/DevData/dev.txt", true);
  1133.                     BufferedWriter fwriteFinal = new BufferedWriter(fwrite);
  1134.                     fwriteFinal.write("===========================================================================");
  1135.                     fwriteFinal.write('\n');
  1136.                     fwriteFinal.write(fugg);
  1137.                     fwriteFinal.write('\n');
  1138.                     fwriteFinal.write(piss);
  1139.                     fwriteFinal.write('\n');
  1140.                     fwriteFinal.write(pussay);
  1141.                     fwriteFinal.write('\n');
  1142.                     fwriteFinal.write(hamstrings);
  1143.                     fwriteFinal.write('\n');
  1144.                     fwriteFinal.write(shoe);
  1145.                     fwriteFinal.write('\n');
  1146.                     fwriteFinal.write(back);
  1147.                     fwriteFinal.write('\n' + '\n');
  1148.                     fwriteFinal.close();
  1149.                 } catch (IOException e) {
  1150.                     e.printStackTrace();
  1151.                 }
  1152.                 System.exit(0);
  1153.             } else if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("YES")) {
  1154.                 double sizeInbytes = pathn1.length();
  1155.                 double sizeInKilobytes = (sizeInbytes / 1024);
  1156.                 if (sizeInKilobytes >= 20) {
  1157.                     yi.add(sizeInbytes/y);
  1158.                     File logM = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles");
  1159.                     logM.mkdir();
  1160.                     // -------------------------------------------------------------------------------------------------
  1161.                     if ((new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/FullFolders/ofb_rex[Full].docx")).exists()) {
  1162.                         int i;
  1163.                         y = 0;
  1164.                         int x = 2;
  1165.                         for (i = 1; i < x; i++) {
  1166.                             if ((new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/FullFolders/ofb_rex[Full]" + i + ".docx")).exists()) {
  1167.                                 x++;
  1168.                             } else {
  1169.                                 Files.copy(onlyfans, Paths.get("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/FullFolders/ofb_rex[Full]" + i + ".docx"));
  1170.                             }
  1171.                         }
  1172.                     } else {
  1173.                         File org3 = new File("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/FullFolders");
  1174.                         org3.mkdir();
  1175.                         Path logPF = Paths.get("C:/Users/Public/Operational_Functional_Block/Java_projects/src/GenFiles/GenData/FullFolders/ofb_rex[Full].docx");
  1176.                         Files.copy(onlyfans, logPF);
  1177.                     }
  1178.                     XWPFDocument docx1 = new XWPFDocument();
  1179.                     XWPFParagraph par1 = docx1.createParagraph();
  1180.                     par1.setAlignment(ParagraphAlignment.CENTER);
  1181.                     XWPFRun run1 = par1.createRun();
  1182.                     run1.setText("Rocket Engine Generator");
  1183.                     run1.setFontFamily("Arial");
  1184.                     run1.setBold(true);
  1185.                     run1.setFontSize(33);
  1186.                     run1.setTextPosition(60);
  1187.                     // -----------------------------------------------------------------------------
  1188.                     XWPFParagraph par2 = docx1.createParagraph();
  1189.                     par2.setAlignment(ParagraphAlignment.RIGHT);
  1190.                     XWPFRun run2 = par2.createRun();
  1191.                     LocalDateTime date = LocalDateTime.now();
  1192.                     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
  1193.                     String dt = date.format(formatter);
  1194.                     run2.setText("Created on: " + dt);
  1195.                     run2.setFontFamily("Arial");
  1196.                     run2.setBold(true);
  1197.                     run2.setFontSize(10);
  1198.                     run2.setTextPosition(60);
  1199.                     // ----------------------------------------------------------------------------------------------------
  1200.                     FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1));
  1201.                     docx1.write(out1);
  1202.                     out1.close();
  1203.                     docx1.close();
  1204.                 }
  1205.                 String[] engine_Name1 = {"\"Argosy\"", "\"Galileo\"", "\"Callisto\"", "\"Nauka\"", "\"Insider\"", "\"Granis\"",
  1206.                         "\"Rassvet\"", "\"Zvezda\"", "\"Zarya\"", "\"Orion\"", "\"Ares\"", "\"Delta\"", "\"Atlas\"", "\"Dreadnought\"",
  1207.                         "\"Daedalus\"", "\"Baltia\"", "\"Dizhou\"", "\"Hermes\"", "\"Icarus\"", "\"Connestoga\"", "\"Yupiter\"",
  1208.                         "\"Emphasis\"", "\"Olympus\"", "\"Kronos\"", "\"Helios\"", "\"Alabaster\"", "\"Falcon\"", "\"Saturn\"",
  1209.                         "\"Eagle\"", "\"Endeavour\"", "\"Atlantis\"", "\"Cygnus\"", "\"Apollo\"", "\"Horizon\"", "\"Bulava\"",
  1210.                         "\"Pioneer\"", "\"Voyager\"", "\"Exploration\"", "\"Expedition\"", "\"Vulcan\"", "\"Vysota\"",
  1211.                         "\"Federation\"", "\"Sojourner\"", "\"Nautilus\"", "\"Jubilance\"", "\"Lagrange\"",  "\"Volna\"",
  1212.                         "\"Prometheus\"", "\"Tellus\"", "\"Alpha\"", "\"Delta\"", "\"Proton\"", "\"Neutron\"", "\"Topol\"",
  1213.                         "\"Electron\"", "\"Pluton\"", "\"Poodle\"", "\"Skipper\"", "\"Convair\"", "\"Nexus\"", "\"Oko\"",
  1214.                         "\"Vector\"", "\"Terrier\"", "\"Rhino\"", "\"Panther\"", "\"Goliath\"", "\"Juno\"", "\"Shrimp\"",
  1215.                         "\"Thumper\"", "\"Mainsail\"", "\"Dart\"", "\"Twitch\"", "\"Stratus\"", "\"Oscar\"", "\"Kosmos\"",
  1216.                         "\"Sentinel\"", "\"Pegasus\"", "\"Kelus\"", "\"Starshot\"", "\"Vernor\"", "\"Mammoth\"", "\"Liberty\"",
  1217.                         "\"Douglas\"", "\"Heimdall\"", "\"Dynetics\"", "\"Pathfinder\"", "\"Horizon\"", "\"Poisk\"",
  1218.                         "\"Pirs\"", "\"Philae\"", "\"Mariner\"", "\"Centaur\"", "\"Orel\"", "\"Pratt\"", "\"Hyperion\"",
  1219.                         "\"Sagittarius\"", "\"Apollo\"", "\"Bryton\"", "\"Volga\"", "\"Harmony\"", "\"Cassini\"", "\"Contour\"",
  1220.                         "\"Altair\"", "\"Dream\"", "\"Baikal\"", "\"Zenith\"", "\"Urpinod\"", "\"Bernal\"", "\"Condor\"",
  1221.                         "\"Athena\"", "\"Astra\"", "\"Aerolus\"", "\"Rombus\"", "\"Lunokhod\"", "\"Fregat\"", "\"Glonass\"",
  1222.                         "\"Dragon\"", "\"Salyut\"", "\"Starliner\"", "\"Skylab\"", "\"Briz\"", "\"Colombus\"", "\"Rosetta\"",
  1223.                         "\"Redstone\"", "\"Antares\"", "\"Philae\"", "\"Prospero\"", "\"Leonardo\"", "\"Parker\"", "\"Dyson\"",
  1224.                         "\"Oberon\"", "\"DragonFly\"", "\"Energia\"", "\"Buran\"", "\"Urgan\"", "\"Angara\"", "\"Vostok\"",
  1225.                         "\"Voskhod\"", "\"Shenzhou\"", "\"Ingenuity\"", "\"Oberon\"", "\"Discovery\"", "\"Horizon\"", "\"Visionalis\"",
  1226.                         "\"Cerasus\"", "\"Progress\"", "\"Unity\"", "\"Surveyor\"", "\"Prospector\"", "\"Ikar\"", "\"Redstone\"",
  1227.                         "\"Lapis\"", "\"Caesius\"", "\"Iridium\"", "\"Daedlus\"", "\"Aelita\"", "\"Beta\"", "\"Gamma\"",
  1228.                         "\"Alpha\"", "\"Epsilon\"", "\"Omega\"", "\"Discoverer\"", "\"Explorer\"", "\"Hornet\"", "\"Serenity\"",
  1229.                         "\"Ariane\"", "\"Hornet\"", "\"Asimov\"", "\"Pegasus\"", "\"Venture\"", "\"Antares\"", "\"Star\"",
  1230.                         "\"Archimedes\"", "\"Hera\"", "\"Iris\"", "\"Titan\"", "\"Artemis\"", "\"Phoenix\"", "\"Ross\"",
  1231.                         "\"Sarychev\"", "\"Nemesis\"", "\"Heimdall\"", "\"Sturt\"", "\"Odin\"", "\"Aethelred\"", "\"Vesper\"",
  1232.                         "\"Aces\"", "\"Argon\"", "\"Olympia\"", "\"Perseus\"", "\"Chyron\"", "\"Proxima\"", "\"Arminus\"",
  1233.                         "\"Destiny\"", "\"Valient\"", "\"FireFly\"", "\"Obsidian\"", "\"Leviathan\"", "\"Magellan\"", "\"Voyager\"",
  1234.                         "\"Mariner\"", "\"Joist\"", "\"Crimson\"", "\"Fortune\"", "\"Vanguard\"", "\"Aurora\"", "\"Ulysses\"",
  1235.                         "\"Crusader\"", "\"Python\"", "\"Kuiper\"", "\"Insurgent\"", "\"Pathfinder\"", "\"Kvant\"", "\"Spektr\"",
  1236.                         "\"Cassini\"", "\"Zemlya\"", "\"Dawn\"", "\"Kepler\"", "\"Parom\"", "\"Elektron\"", "\"Aeonian\"",
  1237.                         "\"Node\"", "\"Burya\"", "\"Voyager\"", "\"Ceres\"", "\"Bayern\"", "\"Chasovoy\"", "\"Copernicus\"",
  1238.                         "\"Quaoar\"", "\"Minotaur\"", "\"Agena\"", "\"Thor\"", "\"Vega\"", "\"Scout\"", "\"Coeus\"", "\"Minerva\"",
  1239.                         "\"Kratos\"", "\"Neith\"", "\"Omoikane\"", "\"Gayamun\"", "\"Odin\"", "\"Kronos\"", "\"Hope\"", "\"Polet\"",
  1240.                         "\"Polyot\"", "\"Sputnik\"", "\"Clementine\"", "\"Sojourner\"", "\"Ingenuity\"", "\"Perseverence\"",
  1241.                         "\"Onatchesko\"", "\"Atlantis\"", "\"Tsyklon\"", "\"Zenit\"", "\"Almaz\"", "\"Soyuz\"", "\"Molniya\"",
  1242.                         "\"Oreol\"", "\"Yantar\"", "\"Foton\"", "\"Meteor\"", "\"Ekran\"", "\"Strela\"", "\"Bion\"", "\"Piroda\"",
  1243.                         "\"Salyut\"", "\"Strela\"", "\"Luch\"", "\"Potok\"", "\"Prognoz\"", "\"Orlets\"", "\"Etalon\"", "\"Astron\"",
  1244.                         "\"Efir\"", "\"Kometa\"", "\"Fram\"", "\"Zemlya\"", "\"Gorizont\"", "\"Arkon\"", "\"Gamma\"", "\"Ekspress\"",
  1245.                         "\"Gonets\"", "\"Taifun\"", "\"Okean\"", "\"Reflektor\"", "\"Kolibr\"", "\"Sever\"", "\"Comet\"",
  1246.                         "\"Roton\"", "\"Solaris\"", "\"Altaris\"", "\"Ithacus\"", "\"Dekto\"", "\"Dream\"", "\"Impuls\"",
  1247.                         "\"Vremya\"", "\"Portal\"", "\"Zodiak\"", "\"Slava\"", "\"Inertsiya\"", "\"Stimuls\"", "\"Ambross\"",
  1248.                         "\"Amal\"", "\"Thea\"", "\"Orphelia\"", "\"Polyot\"", "\"Mudrost\"", "\"Carrack\"", "\"Artak\"",
  1249.                         "\"Questar\"", "\"Artyom\"", "\"Tsyclon\"", "\"Ascension\"", "\"Tenacity\"", "\"Contour\"", "\"Zephyr\"",
  1250.                         "\"Atlanta\"", "\"Polaris\"", "\"Aeolus\"", "\"Mayak\"", "\"Pamir\"", "\"Taimyr\"", "\"Cheget\"", "\"Sirius\"",
  1251.                         "\"Uragan\"", "\"Agat\"", "\"Skiph\"", "\"Kristall\"", "\"Altair\"", "\"Uran\"", "\"Ingul\"", "\"Carat\"",
  1252.                         "\"Pulsar\"", "\"Titan\"", "\"Eridanus\"", "\"Parus\"", "\"Cepheus\"", "\"Varagian\"", "\"Olympus\"",
  1253.                         "\"Tarkhaniy\"", "\"Astraeus\"", "\"Antares\"", "\"Kazbek\"", "\"Burlak\"", "\"Borei\"", "\"Favor\"",
  1254.                         "\"Rubin\"", "\"Almaz\"", "\"Granit\"", "\"Ruby\"", "\"Sokol\"", "\"Argon\"", "\"Kavkaz\"", "\"Ural\"",
  1255.                         "\"Berkut\"", "\"Dunay\"", "\"Yastreb\"", "\"Terek\"", "\"Radon\"", "\"Taymyr\"", "\"Pamir\"", "\"Photon\"",
  1256.                         "\"Elbrus\"", "\"Isayiev\"", "\"Shmel\"", "\"Kobra\"", "\"Shturn\"", "\"Metis\"", "\"Malyutka\"", "\"Fleyta\"",
  1257.                         "\"Konkurs\"", "\"Bastion\"", "\"Svir\"", "\"Ataka\"", "\"Vodopad\"", "\"Veter\"", "\"Vyuga\"", "\"Vulga\"",
  1258.                         "\"Tochka\"", "\"Oka\"", "\"Dvina\"", "\"Almaz\"", "\"Araks\"", "\"Kanopus\"", "\"Kliper\"", "\"Kobalt\"",
  1259.                         "\"Siluet\"", "\"Kondor\"", "\"Lotos\"", "\"Luch\"", "\"Mir\"", "\"Neman\"", "\"Obzor\"", "\"Okean\"",
  1260.                         "\"Oktan\"", "\"Orlets\"", "\"Poisk\"", "\"Potok\"", "\"Pirs\"", "\"Prognoz\"", "\"Resurs\"", "\"Rodnik\"",
  1261.                         "\"Romb\"", "\"Kapustin\"", "\"Oplot\"", "\"Tsygan\"", "\"Teplokhod\"", "\"Sokosha\"", "\"Rubezh\"",
  1262.                         "\"Zircon\"", "\"Moskva\"", "\"Tryol\"", "\"Ustinov\"", "\"Belyayev\"", "\"Novorod\"", "\"Argos\"",
  1263.                         "\"Nerthus\"", "\"Janus\"", "\"Hephaestus\"", "\"Themis\"", "\"Chronos\"", "\"Tethys\"", "\"Minos\"",
  1264.                         "\"Autumn\"", "\"Resilience\"", "\"Aelita\"", "\"Rheus\"", "\"Solntspek\"", "\"Spitzer\"", "\"Cartago\"",
  1265.                         "\"Melibea\"", "\"Spartacus\"", "\"Pulsar\"", "\"Fusion\"", "\"Reliant\"", "\"Thunder\"", "\"Novo\"",
  1266.                         "\"Panthera\"", "\"Nematoda\"", "\"Anelida\"", "\"Chordata\"", "\"Tetrapoda\"", "\"Cyclero\"", "\"Carrier\"",
  1267.                         "\"Gaia\"", "\"Irtysh\"", "\"Wyvern\"", "\"Tarsier\"", "\"Alpina\"", "\"Espadon\"", "\"Parlos\"", "\"Nebula\"",
  1268.                         "\"Lazarus\"", "\"Rufus\"", "\"Dornier\"", "\"Argus\"", "\"Kybau\"", "\"Kalau\"", "\"Chasvoy\"", "\"Zephyr\"",
  1269.                         "\"Temny\"", "\"Gorizont\"", "\"Yars\"", "\"Krugazor\"", "\"Soprotivlenye\"", "\"Shtil\"", "\"Layner\"",
  1270.                         "\"Arthropoda\"", "\"Hexapoda\"", "\"Crustacea\"", "\"Tardigrada\"", "\"Mollusca\"", "\"Annelida\"",
  1271.                         "\"Bryozoa\"", "\"Rotifera", "\"Brachiopoda\"", "\"Echinodermata\"", "\"Hemichordata\"", "\"Cnidaria\"",
  1272.                         "\"Staurozoa\"", "\"Hydrozoa\"", "\"Porifera", "\"Placozoa\"", "\"Craniata\"", "\"Tunicata\"", "\"Conodonta\"",
  1273.                         "\"Tetrapoda\"", "\"Amniota\"", "\"Synapsida\"", "\"Sauropsida", "\"Mammalia\"", "\"Sarcodina\"", "\"Aspin\"",
  1274.                         "\"Sporozoa\"", "\"Ciliata\"", "\"Filosa\"", "\"Toxoplasma\"", "\"Plasmodium\"", "\"Cryptomonada",
  1275.                         "\"Heterokonta\"", "\"Haptophyta\"", "\"Cercozoa\"", "\"Heliozoa\"", "\"Anapsida\"", "\"Aves\"", "\"Peewee\""};
  1276.                 String[] engine_Cycle = {"Gas Generator", "Staged Combustion (Oxidizer Rich)", "Staged Combustion (Fuel Rich)",
  1277.                         "Expander (Open/Bleed)", "Expander (Closed)", "Dual Expander (Open/Bleed)", "Dual Expander (Closed)",
  1278.                         "Pressure-Fed", "Full Flow Staged", "Electric Pump Fed", "Combustion Tap Off", "Monopropellant (Cold Gas)",
  1279.                         "Monopropellant (Decomposition)", "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Pebble-Bed Core",
  1280.                         "Nuclear SaltWater", "Radioisotope Engine", "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster",
  1281.                         "Gridded Ion Thruster", "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)"};
  1282.                 String[] propellant_List1 = {"H2O2 (Hydrogen Peroxide)", "N2H4 (Hydrazine)", "NH2OH+NO3 (Hydroxylammonium nitrate)",
  1283.                         "65% NH4N(NO2)2 (Ammonium Dinitramide) + 35% CH3OH(Methanol)"};
  1284.                 String[] propellant_List2 = {"Nitrogen (N2)", "Helium (He)", "Carbon Dioxide (CO2)", "Ammonia (NH3)", "Hydrogen (H2)",
  1285.                         "Methane (CH4)"};
  1286.                 String[] altitude_Of_Operation = {"0-20 km (Sea Level)", "20-30 km (Medium Atmosphere)", "30-80 km (High Atmosphere)",
  1287.                         "80 km+ (Vacuum)", "Any Altitude (0-80 km+)"};
  1288.                 String[] tank_Repressurisation = {"Autogenous", "Inert Gas"};
  1289.                 String[] firstPart = {"RD", "RS", "AJ", "XLR", "NK", "RL", "KDTU", "AR", "BE", "MV", "YF", "PKA", "J", "RSA",
  1290.                         "MJ", "XS", "LM10", "HM", "LE", "LRE", "CE", "DST", "DOK", "KDU", "KRD", "R", "RO", "LMS", "LMP", "RT",
  1291.                         "F", "E", "A", "B", "S.10", "R", "JDK", "SPP", "TYS", "SOK", "RES", "FWR", "NAA75", "LR", "MA", "GE",
  1292.                         "OSA", "OBA", "NA", "RM02", "RM", "H", "MBB", "MB", "DF", "DE", "BF", "X", "BW", "BADR", "HS", "DC",
  1293.                         "UA", "FG", "P", "KMV", "M", "SRMU", "V", "KVD", "JD", "PS", "CE"};
  1294.                 String engine_Name = nameGen(engine_Name1, firstPart);
  1295.                 String engine_Cycle_Chosen = rand(engine_Cycle);
  1296.                 switch (engine_Cycle_Chosen) {
  1297.                     case "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Pebble-Bed Core", "Nuclear SaltWater", "Radioisotope Engine" -> {
  1298.                         String propellant_List_Chosen = "", nuclear_Cycle_Chosen = "", reactor_Fuel_Chosen = "",
  1299.                                 nozzle_Type_List_Chosen, remass_List_Chosen = "", propellantState = "";
  1300.                         switch (engine_Cycle_Chosen) {
  1301.                             case "Gas Core" -> {
  1302.                                 String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  1303.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
  1304.                                         "Methane (CH4)"};
  1305.                                 String[] nuclear_cycle = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"",
  1306.                                         "\"Vortex Confined\"", "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\""};
  1307.                                 remass_List_Chosen = rand(remass_List);
  1308.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as remass";
  1309.                                 nuclear_Cycle_Chosen = rand(nuclear_cycle);
  1310.                                 reactor_Fuel_Chosen = "100-90% Uranium-235";
  1311.                                 propellantState = "Cryogenic Liquid";
  1312.                             } case "Liquid Core", "Colloid-Core", "Pebble-Bed Core", "Pulsed Nuclear" -> {
  1313.                                 String[] nuclear_cycle = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\""};
  1314.                                 String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
  1315.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)"};
  1316.                                 String[] reactor_fuel = {"80-95% Uranium-235", "50-80% Uranium-235", "20-50% Uranium-235", "8-20% Uranium-235"};
  1317.                                 remass_List_Chosen = rand(remass_List);
  1318.                                 propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as a remass";
  1319.                                 nuclear_Cycle_Chosen = rand(nuclear_cycle);
  1320.                                 reactor_Fuel_Chosen = rand(reactor_fuel);
  1321.                                 propellantState = "Aqueous";
  1322.                             } case "Nuclear SaltWater" -> {
  1323.                                 propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)";
  1324.                                 remass_List_Chosen = "Water (H2O)";
  1325.                                 nuclear_Cycle_Chosen = "";
  1326.                                 reactor_Fuel_Chosen = "The engine has no reactor";
  1327.                                 propellantState = "Aqueous";
  1328.                             } case "Solid Core" -> {
  1329.                                 String[] remass_List = {"Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)",
  1330.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)"};
  1331.                                 remass_List_Chosen = rand(remass_List);
  1332.                                 propellant_List_Chosen = remass_List_Chosen;
  1333.                                 String[] nuclear_cycle = {"\"Expander Bleed\"", "\"Expander Closed\""};
  1334.                                 nuclear_Cycle_Chosen = rand(nuclear_cycle);
  1335.                                 String[] reactor_fuel = {"80-95% Uranium-235", "50-80% Uranium-235", "20-50% Uranium-235", "8-20% Uranium-235", "5-8% Uranium-235",
  1336.                                         "80-95% Plutonium-238", "50-80% Plutonium-238", "20-50% Plutonium-238" , "8-20% Plutonium-238", "5-8% Plutonium-238"};
  1337.                                 reactor_Fuel_Chosen = rand(reactor_fuel);
  1338.                                 propellantState = "Cryogenic Liquid";
  1339.                             } case "Radioisotope Engine" -> {
  1340.                                 String[] remass_List = {"Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)",
  1341.                                         "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)"};
  1342.                                 remass_List_Chosen = rand(remass_List);
  1343.                                 propellant_List_Chosen = remass_List_Chosen;
  1344.                                 nuclear_Cycle_Chosen = "";
  1345.                                 String[] reactor_fuel = {"Polonium-210", "Fermium-252"};
  1346.                                 reactor_Fuel_Chosen = rand(reactor_fuel);
  1347.                                 propellantState = "Cryogenic Liquid";
  1348.                             }
  1349.                         }
  1350.                         String[] pot_uses = new String[]{"Upper Stage(Main Propulsion)", "Payload (Main Propulsion)",
  1351.                                 "Space Tug (Main Propulsion)"};
  1352.                         String use = rand(pot_uses);
  1353.                         nozzle_Type_List_Chosen = rand(new String[]{"Contour Bell Nozzle", "Parabolic Bell Nozzle"});
  1354.                         String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
  1355.                                 "Regenerative Cooling", "Transpiration Cooling"};
  1356.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1357.                         String tank_Repressurisation_Chosen = rand(tank_Repressurisation);
  1358.                         String cooling_Mechanism_Chosen = rand(cooling_mechanism);
  1359.                         String reactor_gen_Chosen;
  1360.                         String[] reactor_gen;
  1361.                         if ((engine_Cycle_Chosen.equals("Liquid Core") || engine_Cycle_Chosen.equals("Solid Core")
  1362.                                 || engine_Cycle_Chosen.equals("Pulsed Nuclear"))) {
  1363.                             reactor_gen = new String[]{"Generation III+", "Generation IV", "Generation V", "Generation V+"};
  1364.                         } else if (engine_Cycle_Chosen.equals("Nuclear SaltWater") || engine_Cycle_Chosen.equals("Radioisotope Engine")) {
  1365.                             reactor_gen = new String[]{"Engine has no reactor"};
  1366.                         } else {
  1367.                             reactor_gen = new String[]{"Generation II", "Generation III", "Generation III+",
  1368.                                     "Generation IV", "Generation V", "Generation V+"};
  1369.                         }
  1370.                         reactor_gen_Chosen = rand(reactor_gen);
  1371.                         int uio97 = rN(1, 456);
  1372.                         int uio98 = rN(1, 77);
  1373.                         boolean isBimodal = uio97%uio98 != 0;
  1374.                         String NzlReturnP = NzlParameters(altitude_Of_Operation_Chosen);
  1375.                         String[] parts = NzlReturnP.split(", ");
  1376.                         String AreaRatio = parts[1];
  1377.                         output_nt(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, nuclear_Cycle_Chosen,
  1378.                                 propellant_List_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen,
  1379.                                 tank_Repressurisation_Chosen, cooling_Mechanism_Chosen, use, reactor_gen_Chosen,
  1380.                                 isBimodal, remass_List_Chosen, propellantState, AreaRatio);
  1381.                         y++;
  1382.                         h++;
  1383.                     }
  1384.  
  1385.                     case "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster", "Gridded Ion Thruster",
  1386.                             "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
  1387.                         String propellant_List_Chosen = null, nozzle_Type_List_Chosen = null;
  1388.                         switch (engine_Cycle_Chosen) {
  1389.                             case "Hall Effect Thruster" -> {
  1390.                                 String[] propellant_List = {"Xe (Xenon)", "Kr (Krypton)", "Ar (Argon)", "Bi (Bismuth)",
  1391.                                         "I2 (Iodine)", "Mg (Magnesium)", "Zn (Zinc)", "C10H16 (Adamantane)"};
  1392.                                 propellant_List_Chosen = rand(propellant_List);
  1393.                                 nozzle_Type_List_Chosen = "Hall Effect Thruster Nozzle";
  1394.                             } case "Gridded Ion Thruster" -> {
  1395.                                 String[] propellant_List = {"Xe (Xenon)", "Hg (Mercury)", "Cs (Caesium)"};
  1396.                                 propellant_List_Chosen = rand(propellant_List);
  1397.                                 nozzle_Type_List_Chosen = "Electrostatic Ion Nozzle";
  1398.                             } case "Colloid Thruster" -> {
  1399.                                 propellant_List_Chosen = "NH2OH+NO3 (Hydroxylammonium nitrate)";
  1400.                                 nozzle_Type_List_Chosen = "Capillary Emitter-Electrode Cone";
  1401.                             } case "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
  1402.                                 String[] propellant_List = {"Xe (Xenon)", "Kr (Krypton)", "Ar (Argon)"};
  1403.                                 propellant_List_Chosen = rand(propellant_List);
  1404.                                 nozzle_Type_List_Chosen = "VASIMR Magnetic Confinement Nozzle";
  1405.                             } case "MagnetoPlasmaDynamic Thruster" -> {
  1406.                                 String[] propellant_List = {"Xe (Xenon)", "Ne (Neon)", "Ar (Argon)", "H2 (Hydrogen)", "N2H4 (Hydrazine)", "Li (Lithium)"};
  1407.                                 propellant_List_Chosen = rand(propellant_List);
  1408.                                 nozzle_Type_List_Chosen = "Cathode Plug Magnetic Confinement Nozzle";
  1409.                             }
  1410.                         }
  1411.                         String[] pot_uses = new String[]{"Payload (Main Propulsion)", "Payload (Vernier)",
  1412.                                 "Space Tug (Main Propulsion)", "Space Tug (Vernier)"};
  1413.                         String use = rand(pot_uses);
  1414.                         String[] powerGen_List = {"Hydrogen Fuel cell", "Nuclear Fission Reactor",
  1415.                                 "Nuclear Fusion Reactor", "Photovoltaic Panel", "Solar Thermal Panel",
  1416.                                 "Radioisotope Thermoelectric Generator (RTG)"};
  1417.                         String powerGen_List_Chosen = rand(powerGen_List);
  1418.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1419.                         output_et(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, propellant_List_Chosen,
  1420.                                 nozzle_Type_List_Chosen, powerGen_List_Chosen, use);
  1421.                         y++;
  1422.                         h++;
  1423.                     }
  1424.  
  1425.                     case "Monopropellant (Decomposition)" -> {
  1426.                         String[] nozzle_Type_List1 = {"Conical Nozzle", "Contour Bell Nozzle", "Parabolic Bell Nozzle"};
  1427.                         String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling"};
  1428.                         String propellant_List_Chosen = rand(propellant_List1);
  1429.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1430.                         String nozzle_Type_List_Chosen = rand(nozzle_Type_List1);
  1431.                         String cooling_Mechanism_Chosen = rand(cooling_mechanism);
  1432.                         String catalyst_Chosen = null;
  1433.                         switch (propellant_List_Chosen) {
  1434.                             case "N2H4 (Hydrazine)", "65% NH4N(NO2)2 (Ammonium Dinitramide) + 35% CH3OH(Methanol)" -> {
  1435.                                 catalyst_Chosen = "Iridium coated Alumina Pellets";
  1436.                             } case "H2O2 (Hydrogen Peroxide)" -> {
  1437.                                 String[] catalyst = {"KMnO4 (Potassium Permanganate) Honeycomb", "Ag (Silver) Honeycomb",
  1438.                                 "MnO2 (Manganese Dioxide) Honeycomb", "K2Cr2O7 (Potassium dichromate) Honeycomb",
  1439.                                 "FeO (Iron (II) oxide)"};
  1440.                                 catalyst_Chosen = rand(catalyst);
  1441.                             } case "NH2OH+NO3 (Hydroxylammonium nitrate)" -> {
  1442.                                 catalyst_Chosen = "Iridium coated Copper Pellets";
  1443.                             }
  1444.                         }
  1445.                         String[] pot_uses = new String[]{"Upper Stage(Ullage)", "Upper Stage(Vernier)", "Payload (Main Propulsion)",
  1446.                                 "Payload (Vernier)", "Space Tug (Ullage)", "Space Tug (Vernier)"};
  1447.                         String use = rand(pot_uses);
  1448.                         output_monod(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, propellant_List_Chosen,
  1449.                                 nozzle_Type_List_Chosen, cooling_Mechanism_Chosen, catalyst_Chosen, use);
  1450.                         y++;
  1451.                         h++;
  1452.  
  1453.                     } case "Monopropellant (Cold Gas)" -> {
  1454.                         String[] nozzle_Type_List1 = {"Conical Nozzle", "Contour Bell Nozzle", "Parabolic Bell Nozzle"};
  1455.                         String propellant_List_Chosen = rand(propellant_List2);
  1456.                         String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
  1457.                         String nozzle_Type_List_Chosen = rand(nozzle_Type_List1);
  1458.                         String cooling_Mechanism_Chosen = "Ablative Cooling";
  1459.                         String[] pot_uses = {"Upper Stage(Ullage)", "Upper Stage(Vernier)", "Payload (Main Propulsion)",
  1460.                                              "Payload (Vernier)", "Space Tug (Ullage)", "Space Tug (Vernier)"};
  1461.                         String purpose = rand(pot_uses);
  1462.                         output_mono(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
  1463.                                 propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen, purpose);
  1464.                         y++;
  1465.                         h++;
  1466.                     }
  1467.  
  1468.                     case "Expander (Closed)", "Expander (Open/Bleed)" -> {
  1469.                         String[] oxidizer_List = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"};
  1470.                         String oxidizer_Chosen = rand(oxidizer_List);
  1471.                         String fuel_Chosen = "";
  1472.                         switch (oxidizer_Chosen) {
  1473.                             case "O2 (Oxygen)" -> {
  1474.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1475.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1476.                                         "CH3OH (Methanol)", "C12H26 (n-Dodecane)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1477.                                 fuel_Chosen = rand(fuel_List);
  1478.                             } case "F2 (Fluorine)" -> {
  1479.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1480.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  1481.                                         "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H26 (n-Dodecane)",
  1482.                                         "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1483.                                 fuel_Chosen = rand(fuel_List);
  1484.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  1485.                                 String[] fuel_List = {"H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
  1486.                                         "C12H26 (n-Dodecane)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1487.                                 fuel_Chosen = rand(fuel_List);
  1488.                             }
  1489.                         }
  1490.                         StndrdDet(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  1491.                                 tank_Repressurisation, altitude_Of_Operation);
  1492.                         y++;
  1493.                         h++;
  1494.                     }
  1495.  
  1496.                     case "Dual Expander (Closed)", "Dual Expander (Open/Bleed)" -> {
  1497.                         String[] oxidizer_List = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"};
  1498.                         String oxidizer_Chosen = rand(oxidizer_List);
  1499.                         String fuel_Chosen = "";
  1500.                         String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)"};
  1501.                         switch (oxidizer_Chosen) {
  1502.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  1503.                                 fuel_Chosen = rand(fuel_List);
  1504.                             } case "F2 (Fluorine) + O2 (Oxygen)" -> fuel_Chosen = "H2 (Hydrogen)";
  1505.                         }
  1506.                         StndrdDet(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  1507.                                 tank_Repressurisation, altitude_Of_Operation);
  1508.                         y++;
  1509.                         h++;
  1510.                     }
  1511.  
  1512.                     case "Staged Combustion (Fuel Rich)" -> {
  1513.                         String[] oxidizer_List = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"};
  1514.                         String oxidizer_Chosen = rand(oxidizer_List);
  1515.                         String fuel_Chosen = "";
  1516.                         switch (oxidizer_Chosen) {
  1517.                             case "O2 (Oxygen)", "F2 (Fluorine)" -> {
  1518.                                 String[] fuel_List = {"H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)"};
  1519.                                 fuel_Chosen = rand(fuel_List);
  1520.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> fuel_Chosen = "H2 (Hydrogen)";
  1521.                         }
  1522.                         StndrdDet(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  1523.                                 tank_Repressurisation, altitude_Of_Operation);
  1524.                         y++;
  1525.                         h++;
  1526.                     }
  1527.  
  1528.                     case "Staged Combustion (Oxidizer Rich)" -> {
  1529.                         String[] oxidizer_List = {"O2 (Oxygen)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
  1530.                         String oxidizer_Chosen = rand(oxidizer_List);
  1531.                         String fuel_Chosen = "";
  1532.                         switch (oxidizer_Chosen) {
  1533.                             case "O2 (Oxygen)", "O3 (Ozone)" -> {
  1534.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1535.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1536.                                         "CH3OH (Methanol)"};
  1537.                                 fuel_Chosen = rand(fuel_List);
  1538.                             } case "N2O4 (Nitrogen Tetroxide)" -> {
  1539.                                 String[] fuel_List = {"C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1540.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)"};
  1541.                                 fuel_Chosen = rand(fuel_List);
  1542.                             }
  1543.                         }
  1544.                         StndrdDet(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  1545.                                 tank_Repressurisation, altitude_Of_Operation);
  1546.                         y++;
  1547.                         h++;
  1548.                     }
  1549.  
  1550.                     case "Full Flow Staged Combustion", "Combustion Tap Off" -> {
  1551.                         String[] oxidizer_List = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  1552.                                 "N2H4 (Hydrazine)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
  1553.                         String oxidizer_Chosen = rand(oxidizer_List);
  1554.                         String fuel_Chosen = "";
  1555.                         switch (oxidizer_Chosen) {
  1556.                             case "O2 (Oxygen)" -> {
  1557.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1558.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1559.                                         "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1560.                                 fuel_Chosen = rand(fuel_List);
  1561.                             } case "F2 (Fluorine)" -> {
  1562.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1563.                                         "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
  1564.                                         "N2H4 (Hydrazine)", "CH3OH (Methanol)"};
  1565.                                 fuel_Chosen = rand(fuel_List);
  1566.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  1567.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1568.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1569.                                         "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1570.                                 fuel_Chosen = rand(fuel_List);
  1571.                             } case "N2H4 (Hydrazine)", "N2O4 (Nitrogen Tetroxide)" -> {
  1572.                                 String[] fuel_List = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1573.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1574.                                         "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"};
  1575.                                 fuel_Chosen = rand(fuel_List);
  1576.                             }
  1577.                         }
  1578.                         StndrdDet(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  1579.                                 tank_Repressurisation, altitude_Of_Operation);
  1580.                         y++;
  1581.                         h++;
  1582.                     }
  1583.  
  1584.                     default -> {
  1585.                         String[] oxidizer_List = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
  1586.                                 "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%",
  1587.                                 "H2O2 (Hydrogen Peroxide) 75%", "O3 (Ozone)", "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1588.                                 "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1589.                                 "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)", "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1590.                                 "ClF5 (Chlorine Pentafluoride)"};
  1591.                         String oxidizer_Chosen = rand(oxidizer_List);
  1592.                         String fuel_Chosen = "";
  1593.                         switch (oxidizer_Chosen) {
  1594.                             case "O2 (Oxygen)" -> {
  1595.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1596.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1597.                                         "CH3OH (Methanol)", "C12H26 (n-Dodecane)", "B2H6 (Diborane)", "B5H9 (Pentaborane)",
  1598.                                         "C2H6 (Ethane)"};
  1599.                                 fuel_Chosen = rand(fuel_List);
  1600.                             } case "F2 (Fluorine)" -> {
  1601.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1602.                                         "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
  1603.                                         "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H26 (n-Dodecane)",
  1604.                                         "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
  1605.                                 fuel_Chosen = rand(fuel_List);
  1606.                             } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
  1607.                                 String[] fuel_List = {"H2 (Hydrogen)", "CH3OH (Methanol)", "C12H26 (n-Dodecane)", "B2H6 (Diborane)",
  1608.                                         "B5H9 (Pentaborane)"};
  1609.                                 fuel_Chosen = rand(fuel_List);
  1610.                             } case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
  1611.                                     "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1612.                                     "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
  1613.                                     "ClF5 (Chlorine Pentafluoride)" -> {
  1614.                                 String[] fuel_List = {"C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1615.                                         "CH3OH (Methanol)"};
  1616.                                 fuel_Chosen = rand(fuel_List);
  1617.                             } case "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%",
  1618.                                     "H2O2 (Hydrogen Peroxide) 75%" -> {
  1619.                                 String[] fuel_List = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
  1620.                                         "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
  1621.                                         "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
  1622.                                         "CH3OH (Methanol)", "C12H26 (n-Dodecane)"};
  1623.                                 fuel_Chosen = rand(fuel_List);
  1624.                             }
  1625.                         }
  1626.                         StndrdDet(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
  1627.                                 tank_Repressurisation, altitude_Of_Operation);
  1628.                         y++;
  1629.                         h++;
  1630.                     }
  1631.                 }
  1632.             } else {
  1633.                 while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N"))) {
  1634.                     System.out.println("Wrong input! Please input an appropriate command [Y/N] ot [YES/NO]");
  1635.                     System.out.print("> ");
  1636.                     repeatCommand = scanner.next();
  1637.                     if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO")) {
  1638.                         break;
  1639.                     }
  1640.                 }
  1641.             }
  1642.         }
  1643.     }
  1644. }
Add Comment
Please, Sign In to add comment