cellar-protocol/winter-propane.html

237 lines
9.0 KiB
HTML
Raw Normal View History

2026-07-18 04:41:23 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Winter Propane Calculator | Barbara Cintron</title>
<style>
:root {
--midnight: #0c0f1a;
--plowsteel: #2d3a4f;
--wheatgold: #f4e8c8;
--loam: #8b7355;
--frostline: #e8f4ff;
--danger: #ff6b6b;
--safe: #4ade80;
}
html, body {
background: var(--midnight);
color: var(--frostline);
font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
margin: 0;
padding: 2em;
line-height: 1.6;
}
header {
border-bottom: 2px solid var(--wheatgold);
padding-bottom: 1.5em;
margin-bottom: 2em;
}
h1 {
font-size: 1.8rem;
letter-spacing: 0.1em;
color: var(--wheatgold);
margin-bottom: 0.5em;
}
.subtitle {
color: var(--loam);
font-size: 0.9rem;
letter-spacing: 0.05em;
}
.calculator {
border: 1px solid var(--plowsteel);
padding: 2em;
background: rgba(45, 58, 79, 0.3);
max-width: 56ch;
}
.input-group {
margin: 1.5em 0;
}
label {
display: block;
color: var(--wheatgold);
margin-bottom: 0.5em;
font-size: 0.85rem;
letter-spacing: 0.05em;
}
input[type="number"], select {
width: 100%;
background: var(--midnight);
border: 1px solid var(--loam);
color: var(--frostline);
padding: 0.75em;
font-family: inherit;
font-size: 1rem;
box-sizing: border-box;
}
input:focus, select:focus {
outline: none;
border-color: var(--wheatgold);
}
button {
background: var(--loam);
color: var(--midnight);
border: none;
padding: 1em 2em;
font-family: inherit;
font-weight: bold;
cursor: pointer;
margin-top: 1em;
transition: all 0.3s ease;
}
button:hover {
background: var(--wheatgold);
}
.result {
margin-top: 2em;
padding: 1.5em;
border-left: 4px solid var(--wheatgold);
background: rgba(139, 115, 85, 0.1);
display: none;
}
.result.active {
display: block;
}
.result h3 {
color: var(--wheatgold);
margin-top: 0;
}
.metric {
font-size: 1.25rem;
color: var(--frostline);
margin: 0.5em 0;
}
.warning {
color: var(--danger);
font-weight: bold;
}
.safe {
color: var(--safe);
font-weight: bold;
}
.data-link {
color: var(--loam);
font-size: 0.8rem;
margin-top: 2em;
display: block;
}
.context {
margin: 2em 0;
font-size: 0.9rem;
color: var(--loam);
border-left: 2px solid var(--plowsteel);
padding-left: 1.5em;
}
</style>
</head>
<body>
<header>
<h1>WINTER PROPANE CALCULATOR</h1>
<div class="subtitle">STORM LAKE OPERATIONS • BUENA VISTA COUNTY WINTERIZATION</div>
</header>
<section class="context">
<strong>WHY THIS EXISTS:</strong> In January 1994, forty-three households in Storm Lake went dark when the blizzard hit. Not from lack of fuel—they had calculated for a mild winter. This tool calculates for the worst night you will face. Base temperature: 65°F (ASHRAE standard). Design outdoor temp: -30°F (Zone 4b historical extreme).
</section>
<main class="calculator">
<form id="propaneCalc">
<div class="input-group">
<label>OUTDOER TEMPERATURE (°F)</label>
<input type="number" id="outdoorTemp" value="-25" min="-50" max="32" step="1">
<small style="color:var(--loam)">Typical Storm Lake low: -25°F to -30°F</small>
</div>
<div class="input-group">
<label>INDOOR SETPOINT (°F)</label>
<input type="number" id="indoorSetpoint" value="68" min="60" max="75" step="1">
</div>
<div class="input-group">
<label>HOUSE ENVELOPE INTEGRITY</label>
<select id="envelopeFactor">
<option value="0.65">Poor (pre-1970s, minimal insulation)</option>
<option value="0.85" selected>Average (1970s-1990s ranch)</option>
<option value="0.95">Excellent (post-2000, sealed)</option>
</select>
</div>
<div class="input-group">
<label>EVENT DURATION (hours)</label>
<input type="number" id="eventDuration" value="72" min="12" max="168" step="6">
<small style="color:var(--loam)">Major blizzard: 72 hours minimum</small>
</div>
<button type="button" onclick="calculate()">CALCULATE SURVIVAL REQUIREMENT</button>
</form>
<div id="results" class="result">
<h3>CALCULATION COMPLETE</h3>
<div class="metric">Required reserve: <span id="gallonsNeeded"></span> gallons</div>
<div class="metric">Current tank status: <span id="tankStatus"></span></div>
<div id="recommendation"></div>
</div>
</main>
<footer>
<a href="winter-propane.json" class="data-link">Download raw data (JSON) • Machine-readable constants and coefficients</a>
<a href="/" class="data-link" style="margin-left: 2em;">← Return to operations hub</a>
</footer>
<script>
// Constants from winter-propane.json
const BASE_TEMP_F = 65;
const PROANE_ENERGY_BTU_PER_GALLON = 91500;
const HOUSE_HEATING_LOAD_BASE_BTU_PER_HOUR = 45000; // Typical 1800 sq ft ranch
function calculate() {
const outdoorTemp = parseFloat(document.getElementById('outdoorTemp').value);
const indoorSetpoint = parseFloat(document.getElementById('indoorSetpoint').value);
const envelopeFactor = parseFloat(document.getElementById('envelopeFactor').value);
const eventDurationHours = parseFloat(document.getElementById('eventDuration').value);
// Delta-T drives consumption
const deltaT = indoorSetpoint - outdoorTemp;
// Baseline consumption at 65°F delta (standard moderate load)
const baselineDeltaT = 65 - 20; // 45°F differential
const baselineConsumptionGalPerDay = 2.8;
// Scale consumption by actual delta-T ratio
const scaledConsumptionGalPerHour = (baselineConsumptionGalPerDay / 24) * (deltaT / baselineDeltaT);
// Apply envelope efficiency (poorer envelope = more consumption)
const adjustedConsumptionGalPerHour = scaledConsumptionGalPerHour / envelopeFactor;
// Total gallons for event duration
const totalGallonsNeeded = adjustedConsumptionGalPerHour * eventDurationHours;
// Safety margin: always recommend 20% buffer
const recommendedReserve = totalGallonsNeeded * 1.2;
// Display results
document.getElementById('gallonsNeeded').textContent = Math.round(recommendedReserve);
// Tank status simulation (assume user reports 50% full 100-gallon tank = 50 gallons)
const assumedTankCapacity = 100;
const assumedCurrentFillPercent = 50;
const currentGallons = assumedTankCapacity * (assumedCurrentFillPercent / 100);
const tankStatusElem = document.getElementById('tankStatus');
const recommendationElem = document.getElementById('recommendation');
if (currentGallons >= recommendedReserve) {
tankStatusElem.innerHTML = `<span class="safe">${currentGallons.toFixed(1)} gallons (SAFE)</span>`;
recommendationElem.innerHTML = `<span class="safe">Your reserve exceeds requirement. Seal windows, bank heat in south rooms.</span>`;
} else {
const shortfall = Math.round(recommendedReserve - currentGallons);
tankStatusElem.innerHTML = `<span class="warning">${currentGallons.toFixed(1)} gallons (DEFICIENT)</span>`;
recommendationElem.innerHTML = `<span class="warning">SHORTFALL: ${shortfall} gallons required before storm hits. Call distributor NOW—delivery windows close at first snow.</span>`;
}
document.getElementById('results').classList.add('active');
}
</script>
</body>
</html>