torque-ledger-v1/torque-ledger.html

288 lines
10 KiB
HTML
Raw Normal View History

2026-07-18 20:00:40 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Torque Ledger | Augusto Garcialeon</title>
<style>
:root {
--bg: #0c0c0c;
--fg: #00ff41; /* Terminal Green */
--border: #00ff41;
--dim: #008f24;
--grid: #1a1a1a;
}
body {
font-family: 'Courier New', Courier, monospace;
background-color: var(--bg);
color: var(--fg);
line-height: 1.4;
margin: 0;
padding: 20px;
background-image:
linear-gradient(var(--grid) 1px, transparent 1px),
linear-gradient(90deg, var(--grid) 1px, transparent 1px);
background-size: 40px 40px;
}
.terminal-frame {
max-width: 900px;
margin: 0 auto;
border: 2px solid var(--border);
padding: 20px;
box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}
h1 {
font-size: 2rem;
border-bottom: 2px solid var(--border);
padding-bottom: 10px;
margin-bottom: 20px;
text-transform: uppercase;
letter-spacing: 0.1em;
}
h2 {
font-size: 1.2rem;
background-color: var(--dim);
color: var(--bg);
padding: 5px 10px;
margin-top: 30px;
}
.control-panel {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin: 20px 0;
border: 1px dashed var(--dim);
padding: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
select, input {
width: 100%;
background-color: #000;
border: 1px solid var(--dim);
color: var(--fg);
font-family: inherit;
padding: 8px;
font-size: 1rem;
}
button {
grid-column: span 2;
background-color: var(--dim);
color: var(--bg);
border: 1px solid var(--border);
padding: 15px;
font-family: inherit;
font-weight: bold;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 10px;
}
button:hover {
background-color: var(--fg);
color: var(--bg);
}
.output-box {
border: 2px solid var(--border);
padding: 20px;
margin-top: 20px;
min-height: 100px;
white-space: pre-wrap;
}
.data-table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-size: 0.9rem;
}
.data-table th, .data-table td {
border: 1px solid var(--dim);
padding: 8px;
text-align: left;
}
.data-table th {
background-color: var(--dim);
color: var(--bg);
}
.image-slot {
width: 100%;
height: 200px;
object-fit: cover;
border: 1px solid var(--border);
margin: 20px 0;
filter: grayscale(100%) contrast(1.2);
}
.citation {
font-size: 0.8rem;
color: var(--dim);
margin-top: 10px;
text-align: right;
}
.nav-link {
display: inline-block;
margin-right: 20px;
color: var(--fg);
text-decoration: none;
border: 1px solid var(--dim);
padding: 5px 10px;
}
.nav-link:hover {
background-color: var(--dim);
color: var(--bg);
}
</style>
<script defer src="https://analytics.4ort.xyz/script.js" data-website-id="d3ed927c-888a-4a6c-ae5f-0b1c613ddf5b"></script>
</head>
<body>
<div class="terminal-frame">
<nav style="margin-bottom: 20px;">
<a href="/" class="nav-link">HOME</a>
<a href="/recipes.html" class="nav-link">KITCHEN</a>
<a href="/the-load-bearing-heart.html" class="nav-link">HEART</a>
</nav>
<h1>TORQUE LEDGER v1.0</h1>
<p>> SYSTEM READY. CALCULATING PRELOAD FOR STRUCTURAL INTEGRITY.</p>
<p>> WARNING: FAILURE TO APPLY CORRECT TORQUE MAY RESULT IN CATASTROPHIC JOINT SEPARATION.</p>
<img src="https://images.pexels.com/photos/257759/pexels-photo-257759.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940" alt="High-grade steel bolt head texture" class="image-slot">
<div class="control-panel">
<div>
<label>BOLT GRADE (SAE J429)</label>
<select id="grade">
<option value="5">Grade 5 (Medium Carbon Steel)</option>
<option value="8">Grade 8 (Alloy Steel)</option>
<option value="L7">Grade L7 (Heat Treated)</option>
</select>
</div>
<div>
<label>NOMINAL DIAMETER (INCH)</label>
<select id="diameter">
<option value="0.125">1/8"</option>
<option value="0.1875">3/16"</option>
<option value="0.25">1/4"</option>
<option value="0.3125">5/16"</option>
<option value="0.375">3/8"</option>
<option value="0.4375">7/16"</option>
<option value="0.5">1/2"</option>
<option value="0.625">5/8"</option>
<option value="0.75">3/4"</option>
<option value="0.875">7/8"</option>
<option value="1.0">1.0"</option>
</select>
</div>
<div>
<label>FRICTION COEFFICIENT (µ)</label>
<input type="number" id="friction" value="0.15" step="0.01" min="0.05" max="0.30">
<small style="color:var(--dim)">Default: 0.15 (Oiled Zinc)</small>
</div>
<div>
<label>THREAD PITCH (TPI)</label>
<select id="pitch">
<option value="27">UNC (Coarse)</option>
<option value="32">UNF (Fine)</option>
</select>
</div>
<button onclick="calculateTorque()">COMPUTE LOAD</button>
</div>
<div class="output-box" id="results">
> AWAITING INPUT...
</div>
<h2>REFERENCE CONSTANTS (ASTM A325/A490 BASED)</h2>
<table class="data-table">
<thead>
<tr>
<th>GRADE</th>
<th>PROOF LOAD (ksi)</th>
<th>ULTIMATE TENSILE (ksi)</th>
<th>YIELD STRENGTH (ksi)</th>
<th>APPLICATION</th>
</tr>
</thead>
<tbody>
<tr>
<td>5</td>
<td>85</td>
<td>120</td>
<td>92</td>
<td>General Automotive / Structural</td>
</tr>
<tr>
<td>8</td>
<td>130</td>
<td>150</td>
<td>133</td>
<td>High-Stress Aerospace / Heavy Machinery</td>
</tr>
<tr>
<td>L7</td>
<td>150+</td>
<td>180+</td>
<td>150</td>
<td>Critical Seismic Bracing</td>
</tr>
</tbody>
</table>
<p class="citation">SOURCE: SAE J429 | ASTM A325 | WIKIDATA:Q1139344 (GRADE)</p>
<script>
function calculateTorque() {
const grade = parseInt(document.getElementById('grade').value);
const diameter = parseFloat(document.getElementById('diameter').value);
const mu = parseFloat(document.getElementById('friction').value);
// Constants based on SAE J429
let proofLoadKsi = 0;
let desc = "";
if (grade === 5) {
proofLoadKsi = 85;
desc = "Grade 5 (Medium Carbon)";
} else if (grade === 8) {
proofLoadKsi = 130;
desc = "Grade 8 (Alloy)";
} else {
proofLoadKsi = 150;
desc = "Grade L7 (Heat Treated)";
}
// Nominal tensile stress area approximation (for coarse threads)
// A_t ≈ π/4 * (d - 0.9382/P)^2
const pitch = document.getElementById('pitch').value == "27" ? 27 : 32; // Simplified TPI
const effectiveDia = diameter - (0.9382 / pitch);
const areaIn2 = (Math.PI / 4) * Math.pow(effectiveDia, 2);
// Target preload = 75% of Proof Load (Standard Engineering Practice)
const targetStressPsi = proofLoadKsi * 1000 * 0.75;
const targetForceLbs = targetStressPsi * areaIn2;
// Torque Formula: T = K * D * F
// T = Torque (lb-ft), K = Friction Factor, D = Diameter (ft), F = Force (lbs)
const diameterFt = diameter / 12;
const torqueLbFt = mu * diameterFt * targetForceLbs;
const torqueLbIn = torqueLbFt * 12;
const output = document.getElementById('results');
output.innerHTML = `> GRADE: ${desc}
> DIAMETER: ${diameter.toFixed(4)} IN
> FRICTION FACTOR (K): ${mu.toFixed(3)}
> TARGET PRELOAD FORCE: ${(targetForceLbs/1000).toFixed(2)} kips
>
> RECOMMENDED TORQUE:
> ${torqueLbFt.toFixed(1)} lb·ft
> ${torqueLbIn.toFixed(1)} lb·in
>
> STATUS: CALCULATION COMPLETE.`;
}
</script>
</div>
</body>
</html>