Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.time.*;
- import java.util.*;
- import java.nio.file.*;
- import org.apache.poi.xwpf.usermodel.*;
- import java.time.format.DateTimeFormatter;
- public class i_will_shoot_yourself {
- static String bussy (String altitude_Of_Operation_Chosen) {
- String nozzle_Type_Chosen = null;
- switch (altitude_Of_Operation_Chosen) {
- case "0-10 km (Sea Level)" -> {
- String[] nozzle_Type_List_SL = {"De Laval Cone (Without Nozzle Extension)",
- "De Laval Bell (Without Nozzle Extension)"};
- Collections.shuffle(Arrays.asList(nozzle_Type_List_SL));
- Random nozzleTypeSLspikeChosen = new Random();
- int nozzleTypeSLspikeChosen_index = nozzleTypeSLspikeChosen.nextInt(nozzle_Type_List_SL.length);
- nozzle_Type_Chosen = nozzle_Type_List_SL[nozzleTypeSLspikeChosen_index];
- } case "20-30 km (Medium Atmosphere)" -> {
- String[] nozzle_Type_List_HA = {"De Laval Bell (Without Nozzle Extension)", "De Laval Cone (With Nozzle Extension)",
- "De Laval Bell (With Nozzle Extension)", "Dual Bell Nozzle"};
- Collections.shuffle(Arrays.asList(nozzle_Type_List_HA));
- Random nozzleTypeHAspikeChosen = new Random();
- int nozzleTypeHAspikeChosen_index = nozzleTypeHAspikeChosen.nextInt(nozzle_Type_List_HA.length);
- nozzle_Type_Chosen = nozzle_Type_List_HA[nozzleTypeHAspikeChosen_index];
- } case "30-80 km (High Atmosphere)" -> {
- String[] nozzle_Type_List_HAi = {"De Laval Cone (With Nozzle Extension)", "De Laval Bell (With Nozzle Extension)",
- "Dual Bell Nozzle"};
- Collections.shuffle(Arrays.asList(nozzle_Type_List_HAi));
- Random nozzleTypeHAispikeChosen = new Random();
- int nozzleTypeHAispikeChosen_index = nozzleTypeHAispikeChosen.nextInt(nozzle_Type_List_HAi.length);
- nozzle_Type_Chosen = nozzle_Type_List_HAi[nozzleTypeHAispikeChosen_index];
- } case "80 km+ (Vacuum)" -> {
- String[] nozzle_Type_List_VA = {"De Laval Cone (With Nozzle Extension)",
- "De Laval Bell (With Nozzle Extension)", "Expanding Nozzle"};
- Collections.shuffle(Arrays.asList(nozzle_Type_List_VA));
- Random nozzleTypeVAspikeChosen = new Random();
- int nozzleTypeVAspikeChosen_index = nozzleTypeVAspikeChosen.nextInt(nozzle_Type_List_VA.length);
- nozzle_Type_Chosen = nozzle_Type_List_VA[nozzleTypeVAspikeChosen_index];
- } case "Any Altitude (0-80 km+)" -> {
- String[] nozzle_Type_List_Aero = {"Linear Aerospike Nozzle", "Toroidal Aerospike Nozzle", "Expansion-Deflection Nozzle"};
- Collections.shuffle(Arrays.asList(nozzle_Type_List_Aero));
- Random nozzleTypeAerospikeChosen = new Random();
- int nozzleTypeAerospikeChosen_index = nozzleTypeAerospikeChosen.nextInt(nozzle_Type_List_Aero.length);
- nozzle_Type_Chosen = nozzle_Type_List_Aero[nozzleTypeAerospikeChosen_index];
- }
- }
- return nozzle_Type_Chosen;
- }
- static String ass_crack(String[] engine_Name1, String[] firstPart) {
- String engine_Name;
- Collections.shuffle(Arrays.asList(engine_Name1));
- Collections.shuffle(Arrays.asList(firstPart));
- Random engineNameChosen = new Random();
- Random firstPartC = new Random();
- int engineNameChosen_index = engineNameChosen.nextInt(engine_Name1.length);
- int firstPart_index = firstPartC.nextInt(firstPart.length);
- String engNameFinalf = " " + engine_Name1[engineNameChosen_index];
- String firstPart_f = firstPart[firstPart_index] + "-";
- int finalNumber = 12 + ((int) (Math.random() * 1001));
- if (finalNumber % 8 == 0) {
- engine_Name = firstPart_f + finalNumber + engNameFinalf;
- } else {
- char randomizedCharacter;
- int uio93 = 1 + ((int) (Math.random() * 1001));
- int uio94 = 1 + ((int) (Math.random() * 11));
- Random randomLetter = new Random();
- if (uio93 % uio94 == 0) {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
- while (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'a');
- if (randomizedCharacter == 'o' || randomizedCharacter == 'i' || randomizedCharacter == 'q' || randomizedCharacter == 'e' || randomizedCharacter == 'h' || randomizedCharacter == 'g' || randomizedCharacter == 'c' || randomizedCharacter == 'j') {
- break;
- }
- }
- } else {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
- while (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
- randomizedCharacter = (char) (randomLetter.nextInt(26) + 'A');
- if (randomizedCharacter == 'O' || randomizedCharacter == 'I' || randomizedCharacter == 'Q') {
- break;
- }
- }
- }
- engine_Name = firstPart_f + finalNumber + randomizedCharacter + engNameFinalf;
- }
- return engine_Name;
- }
- static void output_mono(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC) throws IOException {
- String lbrk = "========================================================================================";
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
- System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
- System.out.println("Your Engine Cycle is: " + ECC);
- System.out.println("Your Propellant is: " + PLC);
- System.out.println("Your Altitude of operation is: " + AOOC);
- System.out.println("Your engine's nozzle type should be : " + NTLC);
- System.out.println("Tank repressurisation would be impractical and unnecessary");
- System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
- XWPFDocument docx = new XWPFDocument();
- if (new File(String.valueOf(pathn1)).exists()) {
- FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
- docx = new XWPFDocument(jesus);
- }
- XWPFParagraph par = docx.createParagraph();
- XWPFRun run = par.createRun();
- run.setFontSize(12);
- run.setBold(true);
- run.setFontFamily("Arial");
- run.setText("Your Engine is called: ");
- run.setTextPosition(15);
- XWPFRun run2 = par.createRun();
- run2.setFontSize(12);
- run.setBold(true);
- run2.setFontFamily("Arial");
- run2.setText(ENN);
- run2.setTextPosition(15);
- run2.addBreak();
- // -----------------------------------------------------------
- XWPFRun run3 = par.createRun();
- run3.setFontSize(10);
- run3.setBold(true);
- run3.setFontFamily("Arial");
- run3.setText("Your Engine Cycle is: ");
- XWPFRun run4 = par.createRun();
- run4.setFontSize(10);
- run4.setFontFamily("Arial");
- run4.setText(ECC);
- run4.addBreak();
- // -----------------------------------------------------------
- XWPFRun run5 = par.createRun();
- run5.setFontSize(10);
- run5.setBold(true);
- run5.setFontFamily("Arial");
- run5.setText("Your Propellant is: ");
- XWPFRun run6 = par.createRun();
- run6.setFontSize(10);
- run6.setFontFamily("Arial");
- run6.setText(PLC);
- run6.addBreak();
- // -----------------------------------------------------------
- XWPFRun run9 = par.createRun();
- run9.setFontSize(10);
- run9.setBold(true);
- run9.setFontFamily("Arial");
- run9.setText("Your engine's nozzle type should be: ");
- XWPFRun run0 = par.createRun();
- run0.setFontSize(10);
- run0.setFontFamily("Arial");
- run0.setText(NTLC);
- run0.addBreak();
- // -----------------------------------------------------------
- XWPFRun run10 = par.createRun();
- run10.setFontSize(10);
- run10.setBold(true);
- run10.setFontFamily("Arial");
- run10.setText("Your Altitude of operation is: ");
- XWPFRun run23 = par.createRun();
- run23.setFontSize(10);
- run23.setFontFamily("Arial");
- run23.setText(AOOC);
- run23.addBreak();
- // -----------------------------------------------------------
- XWPFRun run11 = par.createRun();
- run11.setFontSize(10);
- run11.setBold(true);
- run11.setFontFamily("Arial");
- run11.setText("Tank repressurisation would be impractical and unnecessary");
- run11.addBreak();
- // -----------------------------------------------------------
- XWPFRun run13 = par.createRun();
- run13.setFontSize(10);
- run13.setBold(true);
- run13.setFontFamily("Arial");
- run13.setText("The Cooling Mechanism to be used would be ");
- XWPFRun run14 = par.createRun();
- run14.setFontSize(10);
- run14.setBold(true);
- run14.setFontFamily("Arial");
- run14.setText(CMC);
- run14.addBreak();
- run14.addBreak();
- // -----------------------------------------------------------
- try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
- docx.write(out);
- }
- }
- public static void output_ex(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRR, String CMC) throws IOException {
- String lbrk = "========================================================================================";
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
- System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
- System.out.println("Your Engine Cycle is: " + ECC);
- System.out.println("Your Oxidizer is: " + OCC);
- System.out.println("Your Fuel is: " + FCC);
- System.out.println("Your Altitude of operation is: " + AOOC);
- System.out.println("Your engine's nozzle type should be : " + NTC);
- System.out.println("Tank repressurisation would be done " + TRR);
- System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
- XWPFDocument docx = new XWPFDocument();
- if (new File(String.valueOf(pathn1)).exists()) {
- FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
- docx = new XWPFDocument(jesus);
- }
- XWPFParagraph par = docx.createParagraph();
- XWPFRun run = par.createRun();
- run.setFontSize(12);
- run.setBold(true);
- run.setFontFamily("Arial");
- run.setText("Your Engine is called: ");
- run.setTextPosition(15);
- XWPFRun run2 = par.createRun();
- run2.setFontSize(12);
- run.setBold(true);
- run2.setFontFamily("Arial");
- run2.setText(ENN);
- run2.setTextPosition(15);
- run2.addBreak();
- // -----------------------------------------------------------
- XWPFRun run3 = par.createRun();
- run3.setFontSize(10);
- run3.setBold(true);
- run3.setFontFamily("Arial");
- run3.setText("Your Engine Cycle is: ");
- XWPFRun run4 = par.createRun();
- run4.setFontSize(10);
- run4.setFontFamily("Arial");
- run4.setText(ECC);
- run4.addBreak();
- // -----------------------------------------------------------
- XWPFRun run5 = par.createRun();
- run5.setFontSize(10);
- run5.setBold(true);
- run5.setFontFamily("Arial");
- run5.setText("Your Oxidizer is: ");
- XWPFRun run6 = par.createRun();
- run6.setFontSize(10);
- run6.setFontFamily("Arial");
- run6.setText(OCC);
- run6.addBreak();
- // -----------------------------------------------------------
- XWPFRun run8 = par.createRun();
- run8.setFontSize(10);
- run8.setBold(true);
- run8.setFontFamily("Arial");
- run8.setText("Your Fuel is: ");
- XWPFRun run7 = par.createRun();
- run7.setFontSize(10);
- run7.setFontFamily("Arial");
- run7.setText(FCC);
- run7.addBreak();
- // -----------------------------------------------------------
- XWPFRun run9 = par.createRun();
- run9.setFontSize(10);
- run9.setBold(true);
- run9.setFontFamily("Arial");
- run9.setText("Your engine's nozzle type should be: ");
- XWPFRun run0 = par.createRun();
- run0.setFontSize(10);
- run0.setFontFamily("Arial");
- run0.setText(NTC);
- run0.addBreak();
- // -----------------------------------------------------------
- XWPFRun run10 = par.createRun();
- run10.setFontSize(10);
- run10.setBold(true);
- run10.setFontFamily("Arial");
- run10.setText("Your Altitude of operation is: ");
- XWPFRun run23 = par.createRun();
- run23.setFontSize(10);
- run23.setFontFamily("Arial");
- run23.setText(AOOC);
- run23.addBreak();
- // -----------------------------------------------------------
- XWPFRun run11 = par.createRun();
- run11.setFontSize(10);
- run11.setBold(true);
- run11.setFontFamily("Arial");
- run11.setText("Tank repressurisation would be done ");
- XWPFRun run12 = par.createRun();
- run12.setFontSize(10);
- run12.setBold(true);
- run12.setFontFamily("Arial");
- run12.setText(TRR);
- run12.addBreak();
- // -----------------------------------------------------------
- XWPFRun run13 = par.createRun();
- run13.setFontSize(10);
- run13.setBold(true);
- run13.setFontFamily("Arial");
- run13.setText("The Cooling Mechanism to be used would be ");
- XWPFRun run14 = par.createRun();
- run14.setFontSize(10);
- run14.setBold(true);
- run14.setFontFamily("Arial");
- run14.setText(CMC);
- run14.addBreak();
- run14.addBreak();
- // -----------------------------------------------------------
- try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
- docx.write(out);
- }
- }
- public static void output_nt(String ENN, String ECC, String AOOC, String NCC, String PLC, String RFC, String NTLC,
- String TRC, String CMC) throws IOException {
- String lbrk = "========================================================================================";
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
- System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
- System.out.println("Your Engine Cycle is: " + NCC + " " + ECC);
- System.out.println("Your Propellant is: " + PLC);
- System.out.println("Your Reactor's Fuel is: " + RFC);
- System.out.println("Your Altitude of operation is: " + AOOC);
- System.out.println("Your engine's nozzle type should be : " + NTLC);
- System.out.println("Tank repressurisation would be done " + TRC);
- System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
- XWPFDocument docx = new XWPFDocument();
- if (new File(String.valueOf(pathn1)).exists()) {
- FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
- docx = new XWPFDocument(jesus);
- }
- XWPFParagraph par = docx.createParagraph();
- XWPFRun run = par.createRun();
- run.setFontSize(12);
- run.setBold(true);
- run.setFontFamily("Arial");
- run.setText("Your Engine is called: ");
- run.setTextPosition(15);
- XWPFRun run2 = par.createRun();
- run2.setFontSize(12);
- run.setBold(true);
- run2.setFontFamily("Arial");
- run2.setText(ENN);
- run2.setTextPosition(15);
- run2.addBreak();
- // -----------------------------------------------------------
- XWPFRun run3 = par.createRun();
- run3.setFontSize(10);
- run3.setBold(true);
- run3.setFontFamily("Arial");
- run3.setText("Your Engine Cycle is: ");
- XWPFRun run4 = par.createRun();
- run4.setFontSize(10);
- run4.setFontFamily("Arial");
- run4.setText(NCC + " " + ECC);
- run4.addBreak();
- // -----------------------------------------------------------
- XWPFRun run5 = par.createRun();
- run5.setFontSize(10);
- run5.setBold(true);
- run5.setFontFamily("Arial");
- run5.setText("Your Propellant is: ");
- XWPFRun run6 = par.createRun();
- run6.setFontSize(10);
- run6.setFontFamily("Arial");
- run6.setText(PLC);
- run6.addBreak();
- // -----------------------------------------------------------
- XWPFRun run7 = par.createRun();
- run7.setFontSize(10);
- run7.setBold(true);
- run7.setFontFamily("Arial");
- run7.setText("Your Reactor's Fission Fuel is: ");
- XWPFRun run8 = par.createRun();
- run8.setFontSize(10);
- run8.setFontFamily("Arial");
- run8.setText(RFC);
- run8.addBreak();
- // -----------------------------------------------------------
- XWPFRun run9 = par.createRun();
- run9.setFontSize(10);
- run9.setBold(true);
- run9.setFontFamily("Arial");
- run9.setText("Your engine's nozzle type should be: ");
- XWPFRun run0 = par.createRun();
- run0.setFontSize(10);
- run0.setFontFamily("Arial");
- run0.setText(NTLC);
- run0.addBreak();
- // -----------------------------------------------------------
- XWPFRun run10 = par.createRun();
- run10.setFontSize(10);
- run10.setBold(true);
- run10.setFontFamily("Arial");
- run10.setText("Your Altitude of operation is: ");
- XWPFRun run23 = par.createRun();
- run23.setFontSize(10);
- run23.setFontFamily("Arial");
- run23.setText(AOOC);
- run23.addBreak();
- // ------------------------------------------------------------
- XWPFRun run11 = par.createRun();
- run11.setFontSize(10);
- run11.setBold(true);
- run11.setFontFamily("Arial");
- run11.setText("Tank repressurisation would be done ");
- XWPFRun run12 = par.createRun();
- run12.setFontSize(10);
- run12.setBold(true);
- run12.setFontFamily("Arial");
- run12.setText(TRC);
- run12.addBreak();
- // -----------------------------------------------------------
- XWPFRun run13 = par.createRun();
- run13.setFontSize(10);
- run13.setBold(true);
- run13.setFontFamily("Arial");
- run13.setText("The Cooling Mechanism to be used would be ");
- XWPFRun run14 = par.createRun();
- run14.setFontSize(10);
- run14.setBold(true);
- run14.setFontFamily("Arial");
- run14.setText(CMC);
- run14.addBreak();
- run14.addBreak();
- // -----------------------------------------------------------
- try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
- docx.write(out);
- }
- }
- public static void output_et(String ENN, String ECC, String AOOC, String PLC, String NTLC, String CMC) throws IOException {
- String lbrk = "========================================================================================";
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
- System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
- System.out.println("Your Engine Cycle is: " + ECC);
- System.out.println("Your Propellant is: " + PLC);
- System.out.println("Your Altitude of operation is: " + AOOC);
- System.out.println("Your engine's nozzle type should be : " + NTLC);
- System.out.println("Tank repressurisation would be impractical and unnecessary");
- System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
- XWPFDocument docx = new XWPFDocument();
- if (new File(String.valueOf(pathn1)).exists()) {
- FileInputStream jesus = new FileInputStream(String.valueOf(pathn1));
- docx = new XWPFDocument(jesus);
- }
- XWPFParagraph par = docx.createParagraph();
- XWPFRun run = par.createRun();
- run.setFontSize(12);
- run.setBold(true);
- run.setFontFamily("Arial");
- run.setText("Your Engine is called: ");
- run.setTextPosition(15);
- XWPFRun run2 = par.createRun();
- run2.setFontSize(12);
- run.setBold(true);
- run2.setFontFamily("Arial");
- run2.setText(ENN);
- run2.setTextPosition(15);
- run2.addBreak();
- // -----------------------------------------------------------
- XWPFRun run3 = par.createRun();
- run3.setFontSize(10);
- run3.setBold(true);
- run3.setFontFamily("Arial");
- run3.setText("Your Engine Cycle is: ");
- XWPFRun run4 = par.createRun();
- run4.setFontSize(10);
- run4.setFontFamily("Arial");
- run4.setText(ECC);
- run4.addBreak();
- // -----------------------------------------------------------
- XWPFRun run5 = par.createRun();
- run5.setFontSize(10);
- run5.setBold(true);
- run5.setFontFamily("Arial");
- run5.setText("Your Propellant is: ");
- XWPFRun run6 = par.createRun();
- run6.setFontSize(10);
- run6.setFontFamily("Arial");
- run6.setText(PLC);
- run6.addBreak();
- // -----------------------------------------------------------
- XWPFRun run9 = par.createRun();
- run9.setFontSize(10);
- run9.setBold(true);
- run9.setFontFamily("Arial");
- run9.setText("Your engine's nozzle type should be: ");
- XWPFRun run0 = par.createRun();
- run0.setFontSize(10);
- run0.setFontFamily("Arial");
- run0.setText(NTLC);
- run0.addBreak();
- // -----------------------------------------------------------
- XWPFRun run10 = par.createRun();
- run10.setFontSize(10);
- run10.setBold(true);
- run10.setFontFamily("Arial");
- run10.setText("Your Altitude of operation is: ");
- XWPFRun run23 = par.createRun();
- run23.setFontSize(10);
- run23.setFontFamily("Arial");
- run23.setText(AOOC);
- run23.addBreak();
- // ------------------------------------------------------------
- XWPFRun run11 = par.createRun();
- run11.setFontSize(10);
- run11.setBold(true);
- run11.setFontFamily("Arial");
- run11.setText("Tank repressurisation would be impractical and unnecessary");
- run11.addBreak();
- // -----------------------------------------------------------
- XWPFRun run13 = par.createRun();
- run13.setFontSize(10);
- run13.setBold(true);
- run13.setFontFamily("Arial");
- run13.setText("The Cooling Mechanism to be used would be ");
- XWPFRun run14 = par.createRun();
- run14.setFontSize(10);
- run14.setBold(true);
- run14.setFontFamily("Arial");
- run14.setText(CMC);
- run14.addBreak();
- run14.addBreak();
- // -----------------------------------------------------------
- try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
- docx.write(out);
- }
- }
- public static void output_def(String ENN, String ECC, String OCC, String FCC, String AOOC, String NTC, String TRC, String CMC) throws IOException {
- String lbrk = "========================================================================================";
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
- System.out.println(lbrk + "\n" + "Your Engine is called: " + ENN + "\n");
- System.out.println("Your Engine Cycle is: " + ECC);
- System.out.println("Your Oxidizer is: " + OCC);
- System.out.println("Your Fuel is: " + FCC);
- System.out.println("Your Altitude of operation is: " + AOOC);
- System.out.println("Your engine's nozzle type should be : " + NTC);
- System.out.println("Tank repressurisation would be done " + TRC);
- System.out.println("The Cooling Mechanism to be used would be " + CMC + '\n');
- XWPFDocument docx = new XWPFDocument();
- if (new File(String.valueOf(pathn1)).exists()) {
- docx = new XWPFDocument(new FileInputStream(String.valueOf(pathn1)));
- }
- XWPFParagraph par = docx.createParagraph();
- XWPFRun run = par.createRun();
- run.setFontSize(12);
- run.setBold(true);
- run.setFontFamily("Arial");
- run.setText("Your Engine is called: ");
- run.setTextPosition(15);
- XWPFRun run2 = par.createRun();
- run2.setFontSize(12);
- run.setBold(true);
- run2.setFontFamily("Arial");
- run2.setText(ENN);
- run2.setTextPosition(15);
- run2.addBreak();
- // -----------------------------------------------------------
- XWPFRun run3 = par.createRun();
- run3.setFontSize(10);
- run3.setBold(true);
- run3.setFontFamily("Arial");
- run3.setText("Your Engine Cycle is: ");
- XWPFRun run4 = par.createRun();
- run4.setFontSize(10);
- run4.setFontFamily("Arial");
- run4.setText(ECC);
- run4.addBreak();
- // -----------------------------------------------------------
- XWPFRun run5 = par.createRun();
- run5.setFontSize(10);
- run5.setBold(true);
- run5.setFontFamily("Arial");
- run5.setText("Your Oxidizer is: ");
- XWPFRun run6 = par.createRun();
- run6.setFontSize(10);
- run6.setFontFamily("Arial");
- run6.setText(OCC);
- run6.addBreak();
- // -----------------------------------------------------------
- XWPFRun run8 = par.createRun();
- run8.setFontSize(10);
- run8.setBold(true);
- run8.setFontFamily("Arial");
- run8.setText("Your Fuel is: ");
- XWPFRun run7 = par.createRun();
- run7.setFontSize(10);
- run7.setFontFamily("Arial");
- run7.setText(FCC);
- run7.addBreak();
- // -----------------------------------------------------------
- XWPFRun run9 = par.createRun();
- run9.setFontSize(10);
- run9.setBold(true);
- run9.setFontFamily("Arial");
- run9.setText("Your engine's nozzle type should be: ");
- XWPFRun run0 = par.createRun();
- run0.setFontSize(10);
- run0.setFontFamily("Arial");
- run0.setText(NTC);
- run0.addBreak();
- // -----------------------------------------------------------
- XWPFRun run10 = par.createRun();
- run10.setFontSize(10);
- run10.setBold(true);
- run10.setFontFamily("Arial");
- run10.setText("Your Altitude of operation is: ");
- XWPFRun run23 = par.createRun();
- run23.setFontSize(10);
- run23.setFontFamily("Arial");
- run23.setText(AOOC);
- run23.addBreak();
- // -----------------------------------------------------------
- XWPFRun run11 = par.createRun();
- run11.setFontSize(10);
- run11.setBold(true);
- run11.setFontFamily("Arial");
- run11.setText("Tank repressurisation would be done ");
- XWPFRun run12 = par.createRun();
- run12.setFontSize(10);
- run12.setBold(true);
- run12.setFontFamily("Arial");
- run12.setText(TRC);
- run12.addBreak();
- // -----------------------------------------------------------
- XWPFRun run13 = par.createRun();
- run13.setFontSize(10);
- run13.setBold(true);
- run13.setFontFamily("Arial");
- run13.setText("The Cooling Mechanism to be used would be ");
- XWPFRun run14 = par.createRun();
- run14.setFontSize(10);
- run14.setBold(true);
- run14.setFontFamily("Arial");
- run14.setText(CMC);
- run14.addBreak();
- run14.addBreak();
- // -----------------------------------------------------------
- try (FileOutputStream out = new FileOutputStream(String.valueOf(pathn1))) {
- docx.write(out);
- }
- }
- public static void main(String[] args) throws IOException {
- File org = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles");
- org.mkdir();
- // -------------------------------------
- File pathn1 = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/ofb_rex.docx");
- if (!(new File(String.valueOf(pathn1)).exists())) {
- XWPFDocument docx1 = new XWPFDocument();
- XWPFParagraph par1 = docx1.createParagraph();
- par1.setAlignment(ParagraphAlignment.CENTER);
- XWPFRun run1 = par1.createRun();
- run1.setText("Rocket Engine Generator");
- run1.setFontFamily("Arial");
- run1.setBold(true);
- run1.setFontSize(33);
- run1.setTextPosition(60);
- // -----------------------------------------------------------------------------
- XWPFParagraph par2 = docx1.createParagraph();
- par2.setAlignment(ParagraphAlignment.RIGHT);
- XWPFRun run2 = par2.createRun();
- LocalDateTime date = LocalDateTime.now();
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
- String dt = date.format(formatter);
- run2.setText("Created on: " + dt);
- run2.setFontFamily("Arial");
- run2.setBold(true);
- run2.setFontSize(10);
- run2.setTextPosition(75);
- // ----------------------------------------------------------------------------------------------------
- try (FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1))) {
- docx1.write(out1);
- out1.close();
- docx1.close();
- }
- }
- System.out.println("Welcome to the rocket engine generator!" + '\n');
- Scanner scanner = new Scanner(System.in);
- String repeatCommand = "Y";
- while (!repeatCommand.equals("N")) {
- System.out.println("Do you want to generate a new engine? [Y/N]");
- System.out.print("> ");
- // repeatCommand = scanner.next();
- Path onlyfans = Path.of(String.valueOf(pathn1));
- if (repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("NO")) {
- System.out.println("App exit was successful");
- System.exit(0);
- } else if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("YES")) {
- double sizeInbytes = pathn1.length();
- double sizeInKilobytes = (sizeInbytes / 1000);
- if (sizeInKilobytes >= 25) {
- File logM = new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data");
- logM.mkdir();
- // ------------------------------
- if ((new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full].docx")).exists()) {
- int i;
- int x = 2;
- for (i = 1; i < x; i++) {
- if ((new File("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full]" + i + ".docx")).exists()) {
- x++;
- } else {
- Files.copy(onlyfans, Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full]" + i + ".docx"));
- }
- }
- } else {
- Path logPF = Paths.get("C:/Users/Public/Operational_Functional_Block/src/GeneratedFiles/Data/ofb_rex[Full].docx");
- Files.copy(onlyfans, logPF);
- }
- XWPFDocument docx1 = new XWPFDocument();
- XWPFParagraph par1 = docx1.createParagraph();
- par1.setAlignment(ParagraphAlignment.CENTER);
- XWPFRun run1 = par1.createRun();
- run1.setText("Rocket Engine Generator");
- run1.setFontFamily("Arial");
- run1.setBold(true);
- run1.setFontSize(33);
- run1.setTextPosition(60);
- // -----------------------------------------------------------------------------
- XWPFParagraph par2 = docx1.createParagraph();
- par2.setAlignment(ParagraphAlignment.RIGHT);
- XWPFRun run2 = par2.createRun();
- LocalDateTime date = LocalDateTime.now();
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yyyy, HH:mm:ss");
- String dt = date.format(formatter);
- run2.setText("Created on: " + dt);
- run2.setFontFamily("Arial");
- run2.setBold(true);
- run2.setFontSize(10);
- run2.setTextPosition(60);
- // ----------------------------------------------------------------------------------------------------
- FileOutputStream out1 = new FileOutputStream(String.valueOf(pathn1));
- docx1.write(out1);
- out1.close();
- docx1.close();
- }
- // Arrays
- String[] engine_Name1 = {"\"Argosy\"", "\"Galileo\"", "\"Callisto\"", "\"Nauka\"",
- "\"Rassvet\"", "\"Zvezda\"", "\"Zarya\"", "\"Orion\"", "\"Ares\"", "\"Delta\"", "\"Atlas\"",
- "\"Daedalus\"", "\"Baltia\"", "\"Dizhou\"", "\"Hermes\"", "\"Icarus\"", "\"Connestoga\"", "\"Yupiter\"",
- "\"Emphasis\"", "\"Olympus\"", "\"Kronos\"", "\"Helios\"", "\"Alabaster\"", "\"Falcon\"",
- "\"Eagle\"", "\"Endeavour\"", "\"Atlantis\"", "\"Cygnus\"", "\"Apollo\"", "\"Horizon\"",
- "\"Pioneer\"", "\"Voyager\"", "\"Exploration\"", "\"Expedition\"", "\"Vulcan\"",
- "\"Federation\"", "\"Sojourner\"", "\"Nautilus\"", "\"Jubilance\"", "\"Lagrange\"",
- "\"Prometheus\"", "\"Tellus\"", "\"Alpha\"", "\"Delta\"", "\"Proton\"", "\"Neutron\"",
- "\"Electron\"", "\"Pluton\"", "\"Poodle\"", "\"Skipper\"", "\"Convair\"", "\"Nexus\"",
- "\"Vector\"", "\"Terrier\"", "\"Rhino\"", "\"Panther\"", "\"Goliath\"", "\"Juno\"", "\"Shrimp\"",
- "\"Thumper\"", "\"Mainsail\"", "\"Dart\"", "\"Twitch\"", "\"Stratus\"", "\"Oscar\"",
- "\"Sentinel\"", "\"Pegasus\"", "\"Kelus\"", "\"Starshot\"", "\"Vernor\"", "\"Mammoth\"",
- "\"Douglas\"", "\"Heimdall\"", "\"Dynetics\"", "\"Pathfinder\"", "\"Horizon\"", "\"Poisk\"",
- "\"Pirs\"", "\"Philae\"", "\"Mariner\"", "\"Centaur\"", "\"Orel\"", "\"Pratt\"", "\"Hyperion\"",
- "\"Sagittarius\"", "\"Apollo\"", "\"Bryton\"", "\"Volga\"", "\"Harmony\"", "\"Cassini\"", "\"Contour\"",
- "\"Altair\"", "\"Dream\"", "\"Baikal\"", "\"Zenith\"", "\"Urpinod\"", "\"Bernal\"", "\"Condor\"",
- "\"Athena\"", "\"Astra\"", "\"Aerolus\"", "\"Rombus\"", "\"Lunokhod\"", "\"Fregat\"", "\"Glonass\"",
- "\"Dragon\"", "\"Salyut\"", "\"Starliner\"", "\"Skylab\"", "\"Briz\"", "\"Colombus\"", "\"Rosetta\"",
- "\"Redstone\"", "\"Antares\"", "\"Philae\"", "\"Prospero\"", "\"Leonardo\"", "\"Parker\"", "\"Dyson\"",
- "\"Oberon\"", "\"DragonFly\"", "\"Energia\"", "\"Buran\"", "\"Urgan\"", "\"Angara\"", "\"Vostok\"",
- "\"Voskhod\"", "\"Shenzhou\"", "\"Ingenuity\"", "\"Oberon\"", "\"Discovery\"", "\"Horizon\"",
- "\"Cerasus\"", "\"Progress\"", "\"Unity\"", "\"Surveyor\"", "\"Prospector\"", "\"Ikar\"", "\"Redstone\"",
- "\"Lapis\"", "\"Caesius\"", "\"Iridium\"", "\"Daedlus\"", "\"Aelita\"", "\"Beta\"", "\"Gamma\"",
- "\"Alpha\"", "\"Epsilon\"", "\"Omega\"", "\"Discoverer\"", "\"Explorer\"", "\"Hornet\"", "\"Serenity\"",
- "\"Ariane\"", "\"Hornet\"", "\"Asimov\"", "\"Pegasus\"", "\"Venture\"", "\"Antares\"", "\"Star\"",
- "\"Archimedes\"", "\"Hera\"", "\"Iris\"", "\"Titan\"", "\"Artemis\"", "\"Phoenix\"", "\"Ross\"",
- "\"Sarychev\"", "\"Nemesis\"", "\"Heimdall\"", "\"Sturt\"", "\"Odin\"", "\"Aethelred\"", "\"Vesper\"",
- "\"Aces\"", "\"Argon\"", "\"Olympia\"", "\"Perseus\"", "\"Chyron\"", "\"Proxima\"", "\"Arminus\"",
- "\"Destiny\"", "\"Valient\"", "\"FireFly\"", "\"Obsidian\"", "\"Leviathan\"", "\"Magellan\"", "\"Voyager\"",
- "\"Mariner\"", "\"Joist\"", "\"Crimson\"", "\"Fortune\"", "\"Vanguard\"", "\"Aurora\"", "\"Ulysses\"",
- "\"Crusader\"", "\"Python\"", "\"Kuiper\"", "\"Insurgent\"", "\"Pathfinder\"", "\"Kvant\"", "\"Spektr\"",
- "\"Cassini\"", "\"Zemlya\"", "\"Dawn\"", "\"Kepler\"", "\"Parom\"", "\"Elektron\"", "\"Aeonian\"",
- "\"Node\"", "\"Burya\"", "\"Voyager\"", "\"Ceres\"", "\"Bayern\"", "\"Chasovoy\"", "\"Copernicus\"",
- "\"Quaoar\"", "\"Minotaur\"", "\"Agena\"", "\"Thor\"", "\"Vega\"", "\"Scout\"", "\"Coeus\"", "\"Minerva\"",
- "\"Kratos\"", "\"Neith\"", "\"Omoikane\"", "\"Gayamun\"", "\"Odin\"", "\"Kronos\"", "\"Hope\"", "\"Polet\"",
- "\"Polyot\"", "\"Sputnik\"", "\"Clementine\"", "\"Sojourner\"", "\"Ingenuity\"", "\"Perseverence\"", "\"Insider\"",
- "\"Onatchesko\"", "\"Atlantis\"", "\"Tsyklon\"", "\"Zenit\"", "\"Almaz\"", "\"Soyuz\"", "\"Molniya\"", "\"Kosmos\"",
- "\"Oreol\"", "\"Yantar\"", "\"Foton\"", "\"Meteor\"", "\"Ekran\"", "\"Strela\"", "\"Bion\"", "\"Piroda\"",
- "\"Salyut\"", "\"Strela\"", "\"Luch\"", "\"Potok\"", "\"Prognoz\"", "\"Orlets\"", "\"Etalon\"", "\"Astron\"",
- "\"Efir\"", "\"Kometa\"", "\"Fram\"", "\"Zemlya\"", "\"Gorizont\"", "\"Arkon\"", "\"Gamma\"", "\"Ekspress\"",
- "\"Gonets\"", "\"Taifun\"", "\"Okean\"", "\"Reflektor\"", "\"Kolibr\"", "\"Sever\"", "\"Comet\"",
- "\"Roton\"", "\"Solaris\"", "\"Altaris\"", "\"Ithacus\"", "\"Dekto\"", "\"Dream\"", "\"Impuls\"",
- "\"Vremya\"", "\"Portal\"", "\"Zodiak\"", "\"Slava\"", "\"Inertsiya\"", "\"Stimuls\"", "\"Ambross\"",
- "\"Amal\"", "\"Thea\"", "\"Orphelia\"", "\"Polyot\"", "\"Mudrost\"", "\"Carrack\"", "\"Artak\"",
- "\"Questar\"", "\"Artyom\"", "\"Tsyclon\"", "\"Ascension\"", "\"Tenacity\"", "\"Contour\"", "\"Zephyr\"",
- "\"Atlanta\"", "\"Polaris\"", "\"Aeolus\"", "\"Mayak\"", "\"Pamir\"", "\"Taimyr\"", "\"Cheget\"", "\"Sirius\"",
- "\"Uragan\"", "\"Agat\"", "\"Skiph\"", "\"Kristall\"", "\"Altair\"", "\"Uran\"", "\"Ingul\"", "\"Carat\"",
- "\"Pulsar\"", "\"Titan\"", "\"Eridanus\"", "\"Parus\"", "\"Cepheus\"", "\"Varagian\"", "\"Olympus\"",
- "\"Tarkhaniy\"", "\"Astraeus\"", "\"Antares\"", "\"Kazbek\"", "\"Burlak\"", "\"Borei\"", "\"Favor\"",
- "\"Rubin\"", "\"Almaz\"", "\"Granit\"", "\"Ruby\"", "\"Sokol\"", "\"Argon\"", "\"Kavkaz\"", "\"Ural\"",
- "\"Berkut\"", "\"Dunay\"", "\"Yastreb\"", "\"Terek\"", "\"Radon\"", "\"Taymyr\"", "\"Pamir\"", "\"Photon\"",
- "\"Elbrus\"", "\"Isayiev\"", "\"Shmel\"", "\"Kobra\"", "\"Shturn\"", "\"Metis\"", "\"Malyutka\"", "\"Fleyta\"",
- "\"Konkurs\"", "\"Bastion\"", "\"Svir\"", "\"Ataka\"", "\"Vodopad\"", "\"Veter\"", "\"Vyuga\"", "\"Vulga\"",
- "\"Tochka\"", "\"Oka\"", "\"Dvina\"", "\"Almaz\"", "\"Araks\"", "\"Kanopus\"", "\"Kliper\"", "\"Kobalt\"",
- "\"Siluet\"", "\"Kondor\"", "\"Lotos\"", "\"Luch\"", "\"Mir\"", "\"Neman\"", "\"Obzor\"", "\"Okean\"", "\"Oko\"",
- "\"Oktan\"", "\"Orlets\"", "\"Poisk\"", "\"Potok\"", "\"Pirs\"", "\"Prognoz\"", "\"Resurs\"", "\"Rodnik\"",
- "\"Romb\"", "\"Kapustin\"", "\"Oplot\"", "\"Tsygan\"", "\"Teplokhod\"", "\"Sokosha\"", "\"Rubezh\"", "\"Topol\"",
- "\"Zircon\"", "\"Moskva\"", "\"Tryol\"", "\"Ustinov\"", "\"Belyayev\"", "\"Novorod\"", "\"Argos\"", "\"Dreadnought\"",
- "\"Nerthus\"", "\"Janus\"", "\"Hephaestus\"", "\"Themis\"", "\"Chronos\"", "\"Tethys\"", "\"Minos\"", "\"Visionalis\"",
- "\"Autumn\"", "\"Resilience\"", "\"Aelita\"", "\"Rheus\"", "\"Solntspek\"", "\"Spitzer\"", "\"Cartago\"", "\"Liberty\"",
- "\"Melibea\"", "\"Spartacus\"", "\"Pulsar\"", "\"Fusion\"", "\"Reliant\"", "\"Thunder\"", "\"Novo\"", "\"Granis\"",
- "\"Panthera\"", "\"Nematoda\"", "\"Anelida\"", "\"Chordata\"", "\"Tetrapoda\"", "\"Cyclero\"", "\"Carrier\"", "\"Saturn\"",
- "\"Gaia\"", "\"Irtysh\"", "\"Wyvern\"", "\"Tarsier\"", "\"Alpina\"", "\"Espadon\"", "\"Parlos\"", "\"Nebula\"",
- "\"Lazarus\"", "\"Rufus\"", "\"Dornier\"", "\"Argus\"", "\"Kybau\"", "\"Kalau\"", "\"Chasvoy\"", "\"Zephyr\"",
- "\"Temny\"", "\"Gorizont\"", "\"Yars\"", "\"Krugazor\"", "\"Soprotivlenye\"", "\"Shtil\"", "\"Layner\"", "\"Bulava\"",
- "\"Vysota\"", "\"Volna\""};
- String[] engine_Cycle = {"Gas Generator", "Staged Combustion (Oxidizer Rich)", "Staged Combustion (Fuel Rich)",
- "Expander (Open/Bleed)", "Expander (Closed)", "Dual Expander (Open/Bleed)", "Dual Expander (Closed)",
- "Pressure-Fed", "Full Flow Staged", "Electric Pump Fed", "Combustion Tap Off", "Cold Gas Monopropellant",
- "Monopropellant (Decomposition)", "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Pebble-Bed Core",
- "Nuclear SaltWater", "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster", "Gridded Ion Thruster",
- "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)"};
- String[] propellant_List1 = {"H2O2 (Hydrogen Peroxide)", "N2H4 (Hydrazine)", "NH2OH+NO3 (Hydroxylammonium nitrate)"};
- String[] propellant_List2 = {"Nitrogen (N2)", "Helium (He)", "Carbon Dioxide (CO2)", "Ammonia (NH3)", "Hydrogen (H2)",
- "Methane (CH4)"};
- String[] propellant_List3 = {"Hydrogen (H2)", "Helium (He)", "Nitrogen (N2)", "Hydrogen (H)", "Ammonia (NH3)",
- "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)", "Methane (CH4)"};
- String[] altitude_Of_Operation = {"0-10 km (Sea Level)", "20-30 km (Medium Atmosphere)",
- "30-80 km (High Atmosphere)", "80 km+ (Vacuum)", "Any Altitude (0-80 km+)"};
- String[] tank_Repressurisation = {"Autogenously", "using Inert gas"};
- String[] nozzle_Type_List1 = {"De Laval Cone (Without Nozzle Extension)",
- "De Laval Bell (Without Nozzle Extension)"};
- String[] firstPart = {"RD", "RS", "AJ", "XLR", "NK", "RL", "KDTU", "AR", "BE", "MV",
- "YF", "PKA", "TQ", "MJ", "XS", "LM10", "HM", "LE", "LRE", "CE", "DST",
- "DOK", "KDU", "KRD", "R", "RO"};
- // Randomise Arrays
- boolean Flagger;
- String engine_Name = "";
- if (new File("C:/Users/sfsga/IdeaProjects/demo/ofb_rex.docx").exists()) {
- Flagger = true;
- while (Flagger) {
- engine_Name = ass_crack(engine_Name1, firstPart);
- try {
- File fila = new File("C:/Users/sfsga/IdeaProjects/demo/ofb_rex.docx");
- Scanner reader = new Scanner(fila);
- while (reader.hasNextLine()) {
- String data = reader.nextLine();
- Flagger = data.equals(engine_Name);
- }
- reader.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- } else {
- engine_Name = ass_crack(engine_Name1, firstPart);
- }
- Collections.shuffle(Arrays.asList(engine_Cycle));
- Random engineCycleChosen = new Random();
- int engineTypeChosen_index = engineCycleChosen.nextInt(engine_Cycle.length);
- String engine_Cycle_Chosen = engine_Cycle[engineTypeChosen_index];
- switch (engine_Cycle_Chosen) {
- case "Gas Core", "Liquid Core", "Solid Core", "Pulsed Nuclear", "Nuclear SaltWater", "Pebble-Bed Core" -> {
- String propellant_List_Chosen;
- String nuclear_Cycle_Chosen;
- String reactor_Fuel_Chosen;
- String nozzle_Type_List_Chosen;
- switch (engine_Cycle_Chosen) {
- case "Gas Core" -> {
- String[] remass_List = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
- "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
- "Methane (CH4)"};
- Collections.shuffle(Arrays.asList(remass_List));
- Random remassChosen = new Random();
- int remassChosen_index = remassChosen.nextInt(remass_List.length);
- String remass_List_Chosen = remass_List[remassChosen_index];
- propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as remass";
- // Nuclear Cycle (Nuclear Thermal)
- String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Nuclear Lightbulb\"", "\"Vortex Confined\"",
- "\"Wheel Flow\"", "\"Magnetohydrodynamic(MHD) vortex\"", "\"Expander Open\""};
- Collections.shuffle(Arrays.asList(nuclear_cycle1));
- Random nuclearCycleChosen = new Random();
- int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
- nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
- // Reactor Fuel (Nuclear Thermal)
- String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
- Collections.shuffle(Arrays.asList(reactor_fuel));
- Random reactorfuelChosen = new Random();
- int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
- reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
- }
- case "Liquid Core", "Colloid-Core", "Pebble-Bed Core" -> {
- // Remass (Nuclear Thermal)
- String[] remass_List2 = {"Hydrogen (H2)", "Nitrogen (N2)", "Monoatomic Hydrogen (H)", "Ammonia (NH3)",
- "Water (H2O)", "Oxygen (O2)", "Carbon Dioxide (CO2)", "Carbon Monoxide (CO)",
- "Methane (CH4)", "Hydrogen (H2) + Hexane (C6H14)"};
- Collections.shuffle(Arrays.asList(remass_List2));
- Random remassChosen = new Random();
- int remassChosen_index = remassChosen.nextInt(remass_List2.length);
- String remass_List_Chosen = remass_List2[remassChosen_index];
- propellant_List_Chosen = "Uranium HexaFluoride Salt (UF6) and " + remass_List_Chosen + " as a remass";
- // Nuclear Cycle (Nuclear Thermal)
- String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Vortex Confined\"", "\"Expander Open\""};
- Collections.shuffle(Arrays.asList(nuclear_cycle1));
- Random nuclearCycleChosen = new Random();
- int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
- nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
- // Reactor Fuel (Nuclear Thermal)
- String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
- Collections.shuffle(Arrays.asList(reactor_fuel));
- Random reactorfuelChosen = new Random();
- int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
- reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
- }
- case "Nuclear SaltWater" -> {
- propellant_List_Chosen = "Uranium TetraBromide (UBr4) + Water (H2O)";
- nuclear_Cycle_Chosen = "";
- // Reactor Fuel (Nuclear Thermal)
- String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "25-8% Uranium-235", "1-2% Uranium-235"};
- Collections.shuffle(Arrays.asList(reactor_fuel));
- Random reactorfuelChosen = new Random();
- int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
- reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
- }
- default -> {
- // Propellant (Nuclear Thermal)
- Collections.shuffle(Arrays.asList(propellant_List3));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List3.length);
- propellant_List_Chosen = propellant_List3[propellantChosen_index];
- // Nuclear Cycle (Nuclear Thermal)
- String[] nuclear_cycle1 = {"\"Expander Bleed\"", "\"Expander Closed\"", "\"Expander Open\""};
- Collections.shuffle(Arrays.asList(nuclear_cycle1));
- Random nuclearCycleChosen = new Random();
- int nuclearCycleChosen_index = nuclearCycleChosen.nextInt(nuclear_cycle1.length);
- nuclear_Cycle_Chosen = nuclear_cycle1[nuclearCycleChosen_index];
- // Reactor Fuel (Nuclear Thermal)
- String[] reactor_fuel = {"100-90% Uranium-235", "50% Uranium-235", "20-8% Uranium-235", "1-2% Uranium-235",
- "100-90% Plutonium-238", "50% Plutonium-238", "25-8% Plutonium-238", "1-2% Plutonium-238"};
- Collections.shuffle(Arrays.asList(reactor_fuel));
- Random reactorfuelChosen = new Random();
- int reactorfuelChosen_index = reactorfuelChosen.nextInt(reactor_fuel.length);
- reactor_Fuel_Chosen = reactor_fuel[reactorfuelChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "De Laval Bell (With Nozzle Extension)";
- }
- }
- // Altitude of Operation (Nuclear Thermal)
- String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
- // Tank Repressurisation (Nuclear Thermal)
- Collections.shuffle(Arrays.asList(tank_Repressurisation));
- Random tankRepressurisationChosen = new Random();
- int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
- String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
- // Cooling Mechanism (Nuclear Thermal)
- String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- // Beautiful Part (Nuclear Thermal)
- output_nt(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen, nuclear_Cycle_Chosen,
- propellant_List_Chosen, reactor_Fuel_Chosen, nozzle_Type_List_Chosen,
- tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
- } case "MagnetoPlasmaDynamic Thruster", "Hall Effect Thruster", "Gridded Ion Thruster",
- "Colloid Thruster", "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
- String propellant_List_Chosen = null;
- String nozzle_Type_List_Chosen = null;
- switch (engine_Cycle_Chosen) {
- case "Hall Effect Thruster" -> {
- String[] propellant_List = {"Xenon", "Krypton", "Argon", "Bismuth", "Iodine",
- "Magnesium", "Zinc", "Adamantane"};
- Collections.shuffle(Arrays.asList(propellant_List));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
- propellant_List_Chosen = propellant_List[propellantChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "Hall Effect Thruster Nozzle";
- } case "Gridded Ion Thruster" -> {
- String[] propellant_List = {"Xenon", "Mercury", "Caesium"};
- Collections.shuffle(Arrays.asList(propellant_List));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
- propellant_List_Chosen = propellant_List[propellantChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "Electrostatic Ion Nozzle";
- } case "Colloid Thruster" -> {
- propellant_List_Chosen = "NH2OH+NO3 (Hydroxylammonium nitrate)";
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "Capillary Emitter-Electrode Cone";
- } case "Variable Specific Impulse Magnetoplasma Rocket (VASIMR)" -> {
- String[] propellant_List = {"Xenon", "Krypton", "Argon"};
- Collections.shuffle(Arrays.asList(propellant_List));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
- propellant_List_Chosen = propellant_List[propellantChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "VASIMR Magnetic Confinement Nozzle";
- } case "MagnetoPlasmaDynamic Thruster" -> {
- String[] propellant_List = {"Xenon", "Neon", "Argon", "Hydrogen", "Hydrazine", "Lithium"};
- Collections.shuffle(Arrays.asList(propellant_List));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List.length);
- propellant_List_Chosen = propellant_List[propellantChosen_index];
- // Nozzle Type (Nuclear Thermal)
- nozzle_Type_List_Chosen = "Cathode Plug Magnetic Confinement Nozzle";
- }
- }
- // Altitude of Operation (Electric Propulsion)
- String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
- // Cooling Mechanism (Electric Propulsion)
- String[] cooling_mechanism = {"Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- // Beautiful Part (Electric Propulsion)
- output_et(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
- propellant_List_Chosen, nozzle_Type_List_Chosen,
- cooling_Mechanism_Chosen);
- } case "Monopropellant (Decomposition)" -> {
- // Propellant (Decomposing Monopropellant)
- Collections.shuffle(Arrays.asList(propellant_List1));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List1.length);
- String propellant_List_Chosen = propellant_List1[propellantChosen_index];
- // Altitude of Operation (Decomposing Monopropellant)
- String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
- // Nozzle Type (Decomposing Monopropellant)
- Collections.shuffle(Arrays.asList(nozzle_Type_List1));
- Random nozzle_chosen = new Random();
- int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
- String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
- // Cooling Mechanism (Decomposing Monopropellant)
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- // Beautiful Part (Least non-ugly)
- output_mono(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
- propellant_List_Chosen, nozzle_Type_List_Chosen, cooling_Mechanism_Chosen);
- } case "Cold Gas Monopropellant" -> {
- Collections.shuffle(Arrays.asList(propellant_List2));
- Random propellantChosen = new Random();
- int propellantChosen_index = propellantChosen.nextInt(propellant_List2.length);
- String propellant_List_Chosen = propellant_List2[propellantChosen_index];
- // Altitude of Operation (Cold Gas Monopropellant)
- String altitude_Of_Operation_Chosen = "80 km+ (Vacuum)";
- // Nozzle Type (Cold Gas Monopropellant)
- Collections.shuffle(Arrays.asList(nozzle_Type_List1));
- Random nozzle_chosen = new Random();
- int nozzleChosen_index = nozzle_chosen.nextInt(nozzle_Type_List1.length);
- String nozzle_Type_List_Chosen = nozzle_Type_List1[nozzleChosen_index];
- // Beautiful Part (Least non-ugly)
- output_mono(engine_Name, engine_Cycle_Chosen, altitude_Of_Operation_Chosen,
- propellant_List_Chosen, nozzle_Type_List_Chosen, "unnecessary");
- } case "Expander (Closed)", "Expander (Open/Bleed)" -> {
- String[] oxidizer_List2 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
- "O3 (Ozone)"};
- Collections.shuffle(Arrays.asList(oxidizer_List2));
- Random oxidizerChosen = new Random();
- int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List2.length);
- String oxidizer_Chosen = oxidizer_List2[oxidizerChosen_index];
- String fuel_Chosen = "";
- switch (oxidizer_Chosen) {
- case "O2 (Oxygen)" -> {
- String[] fuel_List20 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
- "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List20));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List20.length);
- fuel_Chosen = fuel_List20[fuelChosen_index];
- } case "F2 (Fluorine)" -> {
- String[] fuel_List1 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)",
- "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)",
- "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List1));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List1.length);
- fuel_Chosen = fuel_List1[fuelChosen_index];
- } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
- String[] fuel_List2 = {"H2 (Hydrogen)", "N2H4 (Hydrazine)", "CH3OH (Methanol)",
- "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List2));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List2.length);
- fuel_Chosen = fuel_List2[fuelChosen_index];
- }
- }
- Collections.shuffle(Arrays.asList(altitude_Of_Operation));
- Random altitudeOfOperationChosen = new Random();
- int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
- String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
- String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- output_ex(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen, altitude_Of_Operation_Chosen,
- nozzle_Type_Chosen,"Autogenously", cooling_Mechanism_Chosen);
- }
- case "Dual Expander (Closed)", "Dual Expander (Open/Bleed)" -> {
- String[] oxidizer_List3 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)"};
- Collections.shuffle(Arrays.asList(oxidizer_List3));
- Random oxidizerChosen = new Random();
- int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List3.length);
- String oxidizer_Chosen = oxidizer_List3[oxidizerChosen_index];
- String fuel_Chosen = "";
- String[] fuel_List3 = {"H2 (Hydrogen)", "CH4 (Methane)"};
- switch (oxidizer_Chosen) {
- case "O2 (Oxygen)", "F2 (Fluorine)" -> {
- Collections.shuffle(Arrays.asList(fuel_List3));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List3.length);
- fuel_Chosen = fuel_List3[fuelChosen_index];
- } case "F2 (Fluorine) + O2 (Oxygen)" -> fuel_Chosen = "H2 (Hydrogen)";
- }
- Collections.shuffle(Arrays.asList(altitude_Of_Operation));
- Random altitudeOfOperationChosen = new Random();
- int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
- String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
- String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- output_ex(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
- altitude_Of_Operation_Chosen, nozzle_Type_Chosen,"Autogenously", cooling_Mechanism_Chosen);
- }
- case "Staged Combustion (Fuel Rich)" -> {
- String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)"};
- Collections.shuffle(Arrays.asList(oxidizer_List4));
- Random oxidizerChosen = new Random();
- int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
- String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
- String fuel_Chosen = "";
- switch (oxidizer_Chosen) {
- case "O2 (Oxygen)", "F2 (Fluorine)" -> {
- String[] fuel_List4 = {"H2 (Hydrogen)", "NH3 (Ammonia)", "N2H4 (Hydrazine)"};
- Collections.shuffle(Arrays.asList(fuel_List4));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
- fuel_Chosen = fuel_List4[fuelChosen_index];
- } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
- String[] fuel_List6 = {"H2 (Hydrogen)"};
- Collections.shuffle(Arrays.asList(fuel_List6));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
- fuel_Chosen = fuel_List6[fuelChosen_index];
- }
- }
- Collections.shuffle(Arrays.asList(tank_Repressurisation));
- Random tankRepressurisationChosen = new Random();
- int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
- String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
- Collections.shuffle(Arrays.asList(altitude_Of_Operation));
- Random altitudeOfOperationChosen = new Random();
- int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
- String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
- String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
- altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
- }
- case "Staged Combustion (Oxidizer Rich)" -> {
- String[] oxidizer_List4 = {"O2 (Oxygen)", "N2H4 (Hydrazine)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
- Collections.shuffle(Arrays.asList(oxidizer_List4));
- Random oxidizerChosen = new Random();
- int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
- String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
- String fuel_Chosen = "";
- switch (oxidizer_Chosen) {
- case "O2 (Oxygen)", "O3 (Ozone)" -> {
- String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
- "CH3OH (Methanol)"};
- Collections.shuffle(Arrays.asList(fuel_List4));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
- fuel_Chosen = fuel_List4[fuelChosen_index];
- } case "N2H4 (Hydrazine)", "N2O4 (Nitrogen Tetroxide)" -> {
- String[] fuel_List7 = {"C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
- "C2H8N2 (UnsymetricalDimethylHydrazine)"};
- Collections.shuffle(Arrays.asList(fuel_List7));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
- fuel_Chosen = fuel_List7[fuelChosen_index];
- }
- }
- Collections.shuffle(Arrays.asList(tank_Repressurisation));
- Random tankRepressurisationChosen = new Random();
- int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
- String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
- Collections.shuffle(Arrays.asList(altitude_Of_Operation));
- Random altitudeOfOperationChosen = new Random();
- int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
- String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
- String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
- altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
- }
- case "Full Flow Staged Combustion", "Combustion Tap Off" -> {
- String[] oxidizer_List4 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
- "N2H4 (Hydrazine)", "O3 (Ozone)", "N2O4 (Nitrogen Tetroxide)"};
- Collections.shuffle(Arrays.asList(oxidizer_List4));
- Random oxidizerChosen = new Random();
- int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List4.length);
- String oxidizer_Chosen = oxidizer_List4[oxidizerChosen_index];
- String fuel_Chosen = "";
- switch (oxidizer_Chosen) {
- case "O2 (Oxygen)" -> {
- String[] fuel_List4 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
- "CH3OH (Methanol)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List4));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List4.length);
- fuel_Chosen = fuel_List4[fuelChosen_index];
- } case "F2 (Fluorine)" -> {
- String[] fuel_List5 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "NH3 (Ammonia)", "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)",
- "N2H4 (Hydrazine)", "CH3OH (Methanol)"};
- Collections.shuffle(Arrays.asList(fuel_List5));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List5.length);
- fuel_Chosen = fuel_List5[fuelChosen_index];
- } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
- String[] fuel_List6 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
- "CH6N2 (MonomethylHydrazine)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List6));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List6.length);
- fuel_Chosen = fuel_List6[fuelChosen_index];
- } case "N2H4 (Hydrazine)", "N2O4 (Nitrogen Tetroxide)" -> {
- String[] fuel_List7 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
- "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH3OH (Methanol)", "B2H6 (Diborane)"};
- Collections.shuffle(Arrays.asList(fuel_List7));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List7.length);
- fuel_Chosen = fuel_List7[fuelChosen_index];
- }
- }
- Collections.shuffle(Arrays.asList(tank_Repressurisation));
- Random tankRepressurisationChosen = new Random();
- int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
- String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
- Collections.shuffle(Arrays.asList(altitude_Of_Operation));
- Random altitudeOfOperationChosen = new Random();
- int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
- String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
- String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
- altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
- }
- default -> {
- String[] oxidizer_List6 = {"O2 (Oxygen)", "F2 (Fluorine)", "F2 (Fluorine) + O2 (Oxygen)",
- "N2O4 (Nitrogen Tetroxide)", "N2H4 (Hydrazine)", "H2O2 (Hydrogen Peroxide) 95%",
- "H2O2 (Hydrogen Peroxide) 85%", "O3 (Ozone)", "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)",
- "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)",
- "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)", "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)",
- "ClF3 (Chlorine Trifluoride)", "ClF5 (Chlorine Pentafluoride)"};
- Collections.shuffle(Arrays.asList(oxidizer_List6));
- Random oxidizerChosen = new Random();
- int oxidizerChosen_index = oxidizerChosen.nextInt(oxidizer_List6.length);
- String oxidizer_Chosen = oxidizer_List6[oxidizerChosen_index];
- String fuel_Chosen = "";
- switch (oxidizer_Chosen) {
- case "O2 (Oxygen)" -> {
- String[] fuel_List8 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "NH3 (Ammonia)", "CH6N2 (MonomethylHydrazine)",
- "N2H4 (Hydrazine)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)",
- "C2H6 (Ethane)"};
- Collections.shuffle(Arrays.asList(fuel_List8));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List8.length);
- fuel_Chosen = fuel_List8[fuelChosen_index];
- } case "F2 (Fluorine)" -> {
- String[] fuel_List9 = {"H2 (Hydrogen)", "CH4 (Methane)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "NH3 (Ammonia)",
- "C2H8N2 (UnsymetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
- "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List9));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List9.length);
- fuel_Chosen = fuel_List9[fuelChosen_index];
- } case "F2 (Fluorine) + O2 (Oxygen)", "O3 (Ozone)" -> {
- String[] fuel_List10 = {"H2 (Hydrogen)", "CH3OH (Methanol)", "C12H24 (Kerosene)", "B2H6 (Diborane)",
- "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List10));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List10.length);
- fuel_Chosen = fuel_List10[fuelChosen_index];
- } case "AK20F: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK20I: 80% HNO3 + 20% N2O4 (Nitric Acid)",
- "AK20K: 80% HNO3 + 20% N2O4 (Nitric Acid)", "AK27I: 73% HNO3 + 27% N2O4 (Nitric Acid)",
- "AK27P: 73% HNO3 + 27% N2O4 (Nitric Acid)", "ClF3 (Chlorine Trifluoride)",
- "ClF5 (Chlorine Pentafluoride)" -> {
- String[] fuel_List11 = {"C2H5OH(Ethanol) 85%", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
- "CH3OH (Methanol)"};
- Collections.shuffle(Arrays.asList(fuel_List11));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List11.length);
- fuel_Chosen = fuel_List11[fuelChosen_index];
- } case "N2O4 (Nitrogen Tetroxide)", "H2O2 (Hydrogen Peroxide) 95%", "H2O2 (Hydrogen Peroxide) 85%" -> {
- String[] fuel_List12 = {"H2 (Hydrogen)", "C2H5OH(Ethanol) 85%", "C2H5OH(Ethanol) 75%",
- "C6H5NH2 (Aniline)", "75% CH6N2 + 25% N2H4 (UH-25)", "50% CH6N2 + 50% N2H4 (Aerosine-50)",
- "C2H8N2 (UnsymmetricalDimethylHydrazine)", "CH6N2 (MonomethylHydrazine)", "N2H4 (Hydrazine)",
- "CH3OH (Methanol)", "C12H24 (Kerosene)"};
- Collections.shuffle(Arrays.asList(fuel_List12));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List12.length);
- fuel_Chosen = fuel_List12[fuelChosen_index];
- } case "N2H4 (Hydrazine)" -> {
- String[] fuel_List13 = {"B2H6 (Diborane)", "B5H9 (Pentaborane)"};
- Collections.shuffle(Arrays.asList(fuel_List13));
- Random fuelChosen = new Random();
- int fuelChosen_index = fuelChosen.nextInt(fuel_List13.length);
- fuel_Chosen = fuel_List13[fuelChosen_index];
- }
- }
- Collections.shuffle(Arrays.asList(tank_Repressurisation));
- Random tankRepressurisationChosen = new Random();
- int tankRepressurisationChosen_index = tankRepressurisationChosen.nextInt(tank_Repressurisation.length);
- String tank_Repressurisation_Chosen = tank_Repressurisation[tankRepressurisationChosen_index];
- Collections.shuffle(Arrays.asList(altitude_Of_Operation));
- Random altitudeOfOperationChosen = new Random();
- int altitudeOfOperationChosen_index = altitudeOfOperationChosen.nextInt(altitude_Of_Operation.length);
- String altitude_Of_Operation_Chosen = altitude_Of_Operation[altitudeOfOperationChosen_index];
- String nozzle_Type_Chosen = bussy(altitude_Of_Operation_Chosen);
- String[] cooling_mechanism = {"Ablative Cooling", "Radiative Cooling", "Dump Cooling", "Film Cooling",
- "Regenerative Cooling", "Transpiration Cooling"};
- Collections.shuffle(Arrays.asList(cooling_mechanism));
- Random coolingMechanismChosen = new Random();
- int coolingMechanismChosen_index = coolingMechanismChosen.nextInt(cooling_mechanism.length);
- String cooling_Mechanism_Chosen = cooling_mechanism[coolingMechanismChosen_index];
- output_def(engine_Name, engine_Cycle_Chosen, oxidizer_Chosen, fuel_Chosen,
- altitude_Of_Operation_Chosen, nozzle_Type_Chosen, tank_Repressurisation_Chosen, cooling_Mechanism_Chosen);
- }
- }
- } else {
- while (!(repeatCommand.equalsIgnoreCase("Y") && repeatCommand.equalsIgnoreCase("N"))) {
- System.out.println("Wrong input! Input must be either [Y/N] or [Yes/No]");
- System.out.print("> ");
- repeatCommand = scanner.next();
- if (repeatCommand.equalsIgnoreCase("Y") || repeatCommand.equalsIgnoreCase("N") || repeatCommand.equalsIgnoreCase("YES") || repeatCommand.equalsIgnoreCase("NO")) {
- break;
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment