




<html lang="zh"><head><meta charset="UTF-8"><title>电动汽车电池包参数计算器</title><style>.calculator {max-width: 800px;margin: 20px auto;padding: 20px;border: 1px solid #ddd;border-radius: 8px;}.input-group {margin: 15px 0;display: flex;align-items: center;}label {display: inline-block;width: 220px;margin-right: 15px;}input[type="number"], select {width: 200px;padding: 6px;}.dimension-inputs { display: none; }.dimension-inputs.active { display: block; }button {padding: 10px 25px;background: #2196F3;color: white;border: none;border-radius: 4px;cursor: pointer;}.result {background-color: #f8f9fa;padding: 20px;margin-top: 25px;border-radius: 5px;}.result h3 { margin-top: 0; }.result span { color: #d32f2f; }</style></head><body><div class="calculator"><h2>电动汽车电池包参数计算器</h2><h3>电池包参数</h3><div class="input-group"><label>续航里程 Dv (km):</label><input type="number" id="Dv" value="250" step="10"></div><div class="input-group"><label>平均能耗 Eavg (Wh/km):</label><input type="number" id="Eavg" value="161.7451" step="1"></div><div class="input-group"><label>电池包标称电压 Ubp (V):</label><input type="number" id="Ubp" value="400" step="50"></div><h3>电池单体参数</h3><div class="input-group"><label>电池类型:</label><select id="cellType" onchange="toggleDimensions()"><option value="cylindrical">圆柱形</option><option value="pouch">方形</option></select></div><div id="cylindricalDims" class="dimension-inputs active"><div class="input-group"><label>电池直径 (m):</label><input type="number" id="diameter" value="0.0185" step="0.001"></div><div class="input-group"><label>电池长度 (m):</label><input type="number" id="length" value="0.0653" step="0.001"></div></div><div id="pouchDims" class="dimension-inputs"><div class="input-group"><label>高度 (m):</label><input type="number" id="height" value="0.227" step="0.001"></div><div class="input-group"><label>宽度 (m):</label><input type="number" id="width" value="0.16" step="0.001"></div><div class="input-group"><label>厚度 (m):</label><input type="number" id="thickness" value="0.00725" step="0.001"></div></div><div class="input-group"><label>电池质量 mbc (kg):</label><input type="number" id="mbc" value="0.0485" step="0.01"></div><div class="input-group"><label>电池容量 Cbc (Ah):</label><input type="number" id="Cbc" value="3.2" step="0.1"></div><div class="input-group"><label>电池电压 Ubc (V):</label><input type="number" id="Ubc" value="3.6" step="0.1"></div><div class="input-group"><label>连续倍率 C-rate (cont.):</label><input type="number" id="CrateCont" value="1" step="0.1"></div><div class="input-group"><label>脉冲倍率 C-rate (peak):</label><input type="number" id="CratePeak" value="1" step="0.1"></div><button onclick="calculate()">开始计算</button><div class="result"><h3>电池单体参数</h3><p>单体能量 Ebc: <span id="Ebc">0</span> Wh</p><p>单体体积 Vbc: <span id="Vbc">0</span> L</p><p>体积能量密度 uV: <span id="uV">0</span> Wh/L</p><p>质量能量密度 uG: <span id="uG">0</span> Wh/kg</p><h3>电池包参数</h3><p>每串电池数: <span id="Ncs">0</span> 个/串</p><p>总并联串数: <span id="Nsb">0</span> 串</p><p>总电池数量: <span id="Ncb">0</span> 个</p><p>总能量 Ebp: <span id="Ebp">0</span> kWh</p><p>总容量 Cbp: <span id="Cbp">0</span> Ah</p><p>总质量 mbp: <span id="mbp">0</span> kg</p><p>总体积 Vbp: <span id="Vbp">0</span> L</p><p>连续输出电流: <span id="Ibpc">0</span> A</p><p>连续输出功率: <span id="Pbpc">0</span> kW</p><p>峰值输出电流: <span id="Ibpp">0</span> A</p><p>峰值输出功率: <span id="Pbpp">0</span> kW</p></div></div><script>function toggleDimensions() {const type = document.getElementById('cellType').value;document.getElementById('cylindricalDims').classList.toggle('active', type === 'cylindrical');document.getElementById('pouchDims').classList.toggle('active', type === 'pouch');}function calculate() {// 获取输入参数const inputs = {Dv: parseFloat(document.getElementById('Dv').value),Eavg: parseFloat(document.getElementById('Eavg').value),Ubp: parseFloat(document.getElementById('Ubp').value),cellType: document.getElementById('cellType').value,mbc: parseFloat(document.getElementById('mbc').value),Cbc: parseFloat(document.getElementById('Cbc').value),Ubc: parseFloat(document.getElementById('Ubc').value),CrateCont: parseFloat(document.getElementById('CrateCont').value),CratePeak: parseFloat(document.getElementById('CratePeak').value)};// 电池单体计算const Ebc = inputs.Cbc * inputs.Ubc; // 单体能量let Vbc;if(inputs.cellType === 'cylindrical') {const D = parseFloat(document.getElementById('diameter').value);const L = parseFloat(document.getElementById('length').value);Vbc = (Math.PI * D**2 * L / 4) * 1000; // 转换为升} else {const H = parseFloat(document.getElementById('height').value);const W = parseFloat(document.getElementById('width').value);const T = parseFloat(document.getElementById('thickness').value);Vbc = (H * W * T) * 1000; // 转换为升}const uV = Ebc / Vbc; // 体积能量密度const uG = Ebc / inputs.mbc; // 质量能量密度// 电池包计算const Ebp_total = inputs.Eavg * inputs.Dv; // 总需求能量const Ncs = Math.ceil(inputs.Ubp / inputs.Ubc); // 每串电池数const Ebs = Ncs * Ebc; // 每串能量const Nsb = Math.ceil(Ebp_total / Ebs); // 总并联串数const Ebp = (Nsb * Ebs) / 1000; // 总能量(kWh)const Cbp = Nsb * inputs.Cbc; // 总容量const Ncb = Ncs * Nsb; // 总电池数const mbp = Ncb * inputs.mbc; // 总质量const Vbp = (Ncb * Vbc).toFixed(1); // 总体积(L)// 功率计算const Ibpc = inputs.CrateCont * inputs.Cbc * Nsb; // 连续电流const Pbpc = (Ibpc * inputs.Ubp / 1000).toFixed(1); // 连续功率(kW)const Ibpp = inputs.CratePeak * inputs.Cbc * Nsb; // 峰值电流const Pbpp = (Ibpp * inputs.Ubp / 1000).toFixed(1); // 峰值功率(kW)// 更新显示结果document.getElementById('Ebc').textContent = Ebc.toFixed(2);document.getElementById('Vbc').textContent = Vbc.toFixed(3);document.getElementById('uV').textContent = uV.toFixed(1);document.getElementById('uG').textContent = uG.toFixed(1);document.getElementById('Ncs').textContent = Ncs;document.getElementById('Nsb').textContent = Nsb;document.getElementById('Ncb').textContent = Ncb;document.getElementById('Ebp').textContent = Ebp.toFixed(2);document.getElementById('Cbp').textContent = Cbp.toFixed(1);document.getElementById('mbp').textContent = mbp.toFixed(1);document.getElementById('Vbp').textContent = Vbp;document.getElementById('Ibpc').textContent = Ibpc.toFixed(1);document.getElementById('Pbpc').textContent = Pbpc;document.getElementById('Ibpp').textContent = Ibpp.toFixed(1);document.getElementById('Pbpp').textContent = Pbpp;}</script></body></html>


