Many improvments + install script

This commit is contained in:
2026-03-03 18:11:00 +00:00
parent 03452517b5
commit 386f6fe928
12 changed files with 710 additions and 44 deletions

View File

@@ -9,6 +9,7 @@ import {
} from '../engine/engineExportImport.js'
import DesignSection from '../components/engine/DesignSection.jsx'
import EngineModel3D from '../components/engine/EngineModel3D.jsx'
import ErrorBoundary from '../components/ErrorBoundary.jsx'
import { formatValue } from '../engine/format.js'
import { getUnitsForFamily } from '../engine/units.js'
import { ENGINE_FIELD_INFO } from '../engine/engineFieldInfo.js'
@@ -524,13 +525,48 @@ export default function EnginePage() {
infoKey="coolingMethod"
/>
{cooling.method === 'regenerative' && (
<NumInput
label="Channel Count"
value={cooling.channelCount}
onChange={v => setCooling(c => ({ ...c, channelCount: Math.max(1, Math.round(v)) }))}
infoKey="channelCount"
step="1"
/>
<>
<NumInput
label="Channel Count"
value={cooling.channelCount}
onChange={v => setCooling(c => ({ ...c, channelCount: Math.max(1, Math.round(v)) }))}
infoKey="channelCount"
step="1"
/>
<NumInput
label="Dynamic Viscosity (μ)"
value={cooling.mu}
onChange={v => setCooling(c => ({ ...c, mu: v }))}
units="Pa·s"
step="1e-5"
placeholder="6e-5"
/>
<NumInput
label="Specific Heat (cₚ)"
value={cooling.cp}
onChange={v => setCooling(c => ({ ...c, cp: v }))}
units="J/(kg·K)"
step="100"
placeholder="2000"
/>
<NumInput
label="Prandtl Number (Pr)"
value={cooling.Pr}
onChange={v => setCooling(c => ({ ...c, Pr: v }))}
units="—"
step="0.05"
placeholder="0.7"
/>
<NumInput
label="Wall Temperature (T_wall)"
value={cooling.T_wall}
onChange={v => setCooling(c => ({ ...c, T_wall: v }))}
unitFamily="temperature"
defaultUnitId="K"
step="50"
placeholder="800"
/>
</>
)}
{cooling.method === 'film' && (
<NumInput
@@ -593,7 +629,9 @@ export default function EnginePage() {
{/* ── Centre: 3D Model ── */}
<div className="flex-1 relative border-r border-slate-700 bg-slate-950/50">
<EngineModel3D chamberGeometry={cg} nozzleGeometry={ng} />
<ErrorBoundary>
<EngineModel3D chamberGeometry={cg} nozzleGeometry={ng} />
</ErrorBoundary>
</div>
{/* ── Right: Results ── */}
@@ -647,7 +685,7 @@ export default function EnginePage() {
<ResultRow label="Est. Heat Flux" value={cr.q_est} unit="W/m²" infoKey="q_est_result" />
<ResultRow label="Total Heat Load" value={cr.q_total} unit="W" infoKey="q_total_result" />
<ResultRow label="Channel Count" value={cr.channelCount} unit="—" infoKey="channelCount_result" />
<ResultRow label="Channel Area (each)" value={cr.channelArea} unitFamily="area" defaultUnitId="mm²" infoKey="channelArea_result" />
<ResultRow label="Heat load / channel" value={cr.q_perChannel} unit="W" infoKey="q_perChannel_result" />
</>
)}
{cr.method === 'film' && (