| [ | |
| { | |
| "id": "nozzle_001", | |
| "input": "Design a rocket nozzle for a 5kN thrust LOX/LH2 engine with chamber pressure 100 bar and mixture ratio 6.0", | |
| "reasoning": "[REQUIREMENTS_PARSE]\n- Thrust (F): 5000 N\n- Chamber pressure (Pc): 100 bar = 10 MPa\n- Propellants: LOX/LH2\n- Mixture ratio (O/F): 6.0\n- Propellant: LOX/LH2 (cryogenic bipropellant)\n\n[PHYSICS_DERIVATION]\n\nStep 1: Combustion Properties (from CEA or tables)\n- γ (gamma) = 1.14 for LOX/LH2 at MR=6\n- Tc (chamber temp) = 3500 K\n- M (molecular weight) = 13.4 kg/kmol\n- c* (characteristic velocity) = 2360 m/s\n\nStep 2: Specific Impulse\n$I_{sp} = \\frac{c^*}{g_0} \\cdot C_f$\n$C_f = \\sqrt{\\frac{2\\gamma^2}{\\gamma-1} \\left(\\frac{2}{\\gamma+1}\\right)^{\\frac{\\gamma+1}{\\gamma-1}} \\left[1 - \\left(\\frac{P_e}{P_c}\\right)^{\\frac{\\gamma-1}{\\gamma}}\\right]}$\nAssuming Pe/Pc = 0.01 (optimal expansion)\n$C_f = 1.85$\n$I_{sp} = 450$ s\n\nStep 3: Mass Flow Rate\n$\\dot{m} = \\frac{F}{I_{sp} \\cdot g_0} = \\frac{5000}{450 \\times 9.81} = 1.133$ kg/s\n\nStep 4: Throat Area\n$A^* = \\frac{\\dot{m} \\cdot c^*}{P_c} = \\frac{1.133 \\times 2360}{10 \\times 10^6} = 267.4$ mm²\n$D^* = \\sqrt{\\frac{4 A^*}{\\pi}} = 18.45$ mm → Round to 18.5 mm\n\nStep 5: Expansion Ratio\nFor altitude optimization (vacuum): ε = 50-100\nFor sea level: ε = 8-15\nChoosing ε = 40 (high altitude optimized)\n$A_e = \\epsilon \\cdot A^* = 40 \\times 267.4 = 10696$ mm²\n$D_e = 116.7$ mm → Round to 117 mm\n\nStep 6: Nozzle Length (80% bell contour)\n$L_n = 0.8 \\times \\frac{D_e - D^*}{2 \\tan(15°)} = 183$ mm\n\n[CONSTRAINT_VALIDATION]\n✓ Throat size: 18.5mm > 10mm minimum for manufacturing\n✓ Expansion ratio: 40 within 20-80 range for vacuum engines\n✓ Wall thickness: Will calculate in cooling section", | |
| "output": "using PicoGK;\nusing System.Numerics;\n\nnamespace AlgoRythm.RedRock.Engines\n{\n public class NozzleGenerator\n {\n // Calculated parameters\n const float THROAT_DIAMETER = 18.5f;\n const float EXIT_DIAMETER = 117.0f;\n const float NOZZLE_LENGTH = 183.0f;\n const float WALL_THICKNESS = 2.0f;\n \n public static Voxels GenerateNozzle()\n {\n Voxels voxNozzle = new Voxels();\n \n // Throat section\n float fThroatRadius = THROAT_DIAMETER / 2.0f;\n Vector3 vecThroat = new Vector3(0, 0, 0);\n \n // Convergent section (30 degree half-angle)\n float fConvergentLength = 30.0f;\n float fChamberRadius = fThroatRadius * 1.5f;\n \n // Divergent section (bell contour - 80%)\n float fExitRadius = EXIT_DIAMETER / 2.0f;\n \n // Generate bell nozzle contour using Rao method\n int nPoints = 50;\n for (int i = 0; i <= nPoints; i++)\n {\n float t = (float)i / nPoints;\n float z = -t * NOZZLE_LENGTH;\n float r = fThroatRadius + (fExitRadius - fThroatRadius) * \n (float)Math.Pow(t, 0.7);\n \n // Add material at this cross-section\n Voxels voxRing = Voxels.voxSphere(\n new Vector3(0, 0, z), r + WALL_THICKNESS);\n Voxels voxInner = Voxels.voxSphere(\n new Vector3(0, 0, z), r);\n voxRing.BoolSubtract(voxInner);\n voxNozzle.BoolAdd(voxRing);\n }\n \n return voxNozzle;\n }\n }\n}" | |
| }, | |
| { | |
| "id": "chamber_001", | |
| "input": "Design combustion chamber for 10kN LOX/RP-1 engine at 80 bar chamber pressure", | |
| "reasoning": "[REQUIREMENTS_PARSE]\n- Thrust (F): 10000 N\n- Chamber pressure (Pc): 80 bar = 8 MPa\n- Propellants: LOX/RP-1 (kerosene)\n- Assume standard O/F ratio: 2.7\n\n[PHYSICS_DERIVATION]\n\nStep 1: Combustion Properties\n- γ = 1.24 for LOX/RP-1\n- Tc = 3600 K\n- c* = 1780 m/s\n- Isp (vacuum) ≈ 320 s\n\nStep 2: Mass Flow Rate\n$\\dot{m} = \\frac{F}{I_{sp} \\cdot g_0} = \\frac{10000}{320 \\times 9.81} = 3.185$ kg/s\n\nStep 3: Throat Area\n$A^* = \\frac{\\dot{m} \\cdot c^*}{P_c} = \\frac{3.185 \\times 1780}{8 \\times 10^6} = 708.7$ mm²\n$D^* = 30.0$ mm\n\nStep 4: Characteristic Length (L*)\nFor LOX/RP-1: L* = 1.0 - 1.5 m (typical)\nChoosing L* = 1.2 m\n\nStep 5: Chamber Volume\n$V_c = L^* \\times A^* = 1.2 \\times 708.7 \\times 10^{-6} = 850.4$ cm³\n\nStep 6: Chamber Dimensions\nContraction ratio: CR = 3.0 (typical)\n$A_c = CR \\times A^* = 3.0 \\times 708.7 = 2126$ mm²\n$D_c = 52.0$ mm\n\nChamber length:\n$L_c = \\frac{V_c}{A_c} = \\frac{850400}{2126} = 400$ mm\n\n[CONSTRAINT_VALIDATION]\n✓ L* = 1.2m within 1.0-1.5m range for LOX/RP-1\n✓ Contraction ratio 3.0 within 2.5-4.0 range\n✓ Chamber L/D = 400/52 = 7.7 (acceptable)", | |
| "output": "using PicoGK;\nusing System.Numerics;\n\nnamespace AlgoRythm.RedRock.Engines\n{\n public class ChamberGenerator\n {\n const float THROAT_DIAMETER = 30.0f;\n const float CHAMBER_DIAMETER = 52.0f;\n const float CHAMBER_LENGTH = 400.0f;\n const float WALL_THICKNESS = 3.0f;\n \n public static Voxels GenerateChamber()\n {\n Voxels voxChamber = new Voxels();\n \n float fChamberRadius = CHAMBER_DIAMETER / 2.0f + WALL_THICKNESS;\n float fInnerRadius = CHAMBER_DIAMETER / 2.0f;\n \n // Cylindrical chamber section\n Vector3 vecStart = new Vector3(0, 0, 0);\n Vector3 vecEnd = new Vector3(0, 0, CHAMBER_LENGTH);\n \n // Outer wall\n Voxels voxOuter = Voxels.voxSphere(vecStart, fChamberRadius);\n voxOuter.BoolAdd(Voxels.voxSphere(vecEnd, fChamberRadius));\n \n // Inner cavity\n Voxels voxInner = Voxels.voxSphere(vecStart, fInnerRadius);\n voxInner.BoolAdd(Voxels.voxSphere(vecEnd, fInnerRadius));\n \n voxChamber.BoolAdd(voxOuter);\n voxChamber.BoolSubtract(voxInner);\n \n return voxChamber;\n }\n }\n}" | |
| } | |
| ] |