mile-run-protocol/coolant-flow-calculator.html

133 lines
7.0 KiB
HTML
Raw Permalink Normal View History

2026-07-19 00:52:33 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Coolant Flow Rate Calculator • Allen Lorch</title>
<style>
:root { --bg: #0a0a0a; --fg: #e0e0e0; --accent: #4ade80; --warn: #ff6b00; --border: #333; }
body { font-family: 'SF Mono', Menlo, monospace; background: var(--bg); color: var(--fg); margin: 0; padding: 2rem; line-height: 1.5; max-width: 900px; margin-left: auto; margin-right: auto; }
header { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 2rem; }
h1 { color: var(--accent); font-size: 1.4rem; margin: 0; letter-spacing: -0.02em; }
.subtitle { color: #666; font-size: 0.85rem; margin-top: 0.25rem; }
.calc-container { background: #111; border: 1px solid var(--border); border-radius: 4px; padding: 1.5rem; margin: 2rem 0; }
.input-group { margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }
label { font-size: 0.9rem; color: #aaa; }
input[type="number"] { background: #000; border: 1px solid #444; color: var(--fg); padding: 0.5rem; width: 120px; font-family: inherit; font-size: 1rem; }
input:focus { outline: 1px solid var(--accent); }
.result-box { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--border); }
.result-label { color: #666; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.result-value { font-size: 2rem; color: var(--accent); font-weight: bold; margin-top: 0.25rem; }
.result-unit { font-size: 1rem; color: #888; }
.theory-section { margin-top: 3rem; border-left: 2px solid var(--warn); padding-left: 1rem; }
.formula { background: #111; padding: 1rem; border: 1px solid var(--border); font-style: italic; color: #ccc; margin: 1rem 0; }
.citation { font-size: 0.75rem; color: #555; margin-top: 0.5rem; display: block; }
.image-proof { margin-top: 2rem; width: 100%; height: auto; border: 1px solid var(--border); opacity: 0.8; transition: opacity 0.3s; }
.image-proof:hover { opacity: 1; }
.caption { font-size: 0.75rem; color: #444; margin-top: 0.5rem; text-align: right; }
.warning { color: var(--warn); font-size: 0.85rem; margin-top: 0.5rem; display: none; }
.back-link { display: inline-block; margin-top: 3rem; color: #666; text-decoration: none; border-bottom: 1px dotted #666; }
.back-link:hover { color: var(--accent); border-color: var(--accent); }
</style>
<script defer src="https://analytics.4ort.xyz/script.js" data-website-id="d3ed927c-888a-4a6c-ae5f-0b1c613ddf5b"></script>
</head>
<body>
<header>
<h1>Coolant Flow Rate Calculator</h1>
<div class="subtitle">Thermal Management Protocol • Burlington Cycle</div>
</header>
<section class="calc-container">
<div class="input-group">
<label for="load">Thermal Load (kW)</label>
<input type="number" id="load" step="0.1" placeholder="e.g., 4.5" min="0">
</div>
<div class="input-group">
<label for="deltaT">Max ΔT (°C)</label>
<input type="number" id="deltaT" step="0.1" placeholder="e.g., 5.0" min="0.1">
</div>
<div class="input-group">
<label for="mix">Coolant Mix Ratio</label>
<select id="mix" style="background:#000;border:1px solid #444;color:#fff;padding:0.5rem;font-family:inherit;">
<option value="3.3">50/50 Ethylene Glycol (Standard)</option>
<option value="3.8">30/70 Ethylene Glycol (Warm Cl.)</option>
<option value="4.18">Pure Water (Emergency Only)</option>
</select>
</div>
<div class="result-box">
<div class="result-label">Required Mass Flow</div>
<span class="result-value" id="flowResult">0.00</span> <span class="result-unit">L/min</span>
<div class="warning" id="warningMsg">ΔT BELOW SAFE THRESHOLD — INCREASE DELTA OR REDUCE LOAD</div>
</div>
</section>
<section class="theory-section">
<h3 style="color: var(--warn); margin-top: 0;">Derivation</h3>
<p>The flow rate is derived from the fundamental heat transfer equation:</p>
<div class="formula">
ṁ = Q / (cₚ × ΔT)<br>
<small>where ṁ is mass flow rate, Q is thermal load, cₚ is specific heat capacity, ΔT is temperature differential.</small>
</div>
<p>For a 50/50 ethylene glycol mixture at operating temperature, cₚ ≈ 3.3 kJ/(kg·K). Density ρ ≈ 1.05 kg/L.</p>
<span class="citation">Grounded in Wikidata Q487756 (Specific Heat Capacity) & ISO 80000-5:2019</span>
</section>
<figure style="margin-top: 3rem;">
<img src="https://images.pexels.com/photos/34351909/pexels-photo-34351909.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940" alt="Car radiator close-up showing thermal exchange fins" class="image-proof">
<figcaption class="caption">Fig 1.0: Radiator face geometry. Surface area dictates maximum heat rejection velocity.</figcaption>
</figure>
<a href="index.html" class="back-link">← Return to Protocol Index</a>
<script>
const loadInput = document.getElementById('load');
const deltaInput = document.getElementById('deltaT');
const mixSelect = document.getElementById('mix');
const resultDisplay = document.getElementById('flowResult');
const warningBox = document.getElementById('warningMsg');
function calculate() {
const Q_kW = parseFloat(loadInput.value) || 0; // kW
const dT_C = parseFloat(deltaInput.value) || 0; // °C
const cp = parseFloat(mixSelect.value); // kJ/kg·K
if (Q_kW <= 0 || dT_C <= 0) {
resultDisplay.textContent = "0.00";
warningBox.style.display = 'none';
return;
}
// Formula: MassFlow (kg/s) = Power (kW) / (cp * dT)
// Convert to L/min: (kg/s * 60) / density(kg/L)
// Assuming density ~1.05 kg/L for 50/50 mix (adjust slightly for others but 1.05 is safe default for calc)
const massFlowKgS = Q_kW / (cp * dT_C);
let density = 1.05; // Default 50/50
if (cp === 3.8) density = 1.03;
if (cp === 4.18) density = 1.0;
const volFlowLMin = (massFlowKgS * 60) / density;
resultDisplay.textContent = volFlowLMin.toFixed(2);
// Safety check: if dT < 3°C, warn of insufficient gradient
if (dT_C < 3.0) {
warningBox.style.display = 'block';
} else {
warningBox.style.display = 'none';
}
}
loadInput.addEventListener('input', calculate);
deltaInput.addEventListener('input', calculate);
mixSelect.addEventListener('change', calculate);
</script>
</body>
</html>