/**
* Interaktiver USV- & Scheinleistungs-Kalkulator für ITSE
* IHK ZPA Nord-West AP2
*/
(function() {
function renderUSVCalculator(containerId) {
const container = document.getElementById(containerId);
if (!container) return;
container.innerHTML = `
⚡ Interaktiver USV-Dimensionierungs-Rechner (ITSE)
Berechnen Sie die Wirkleistung, Scheinleistung und empfohlene USV-Nennleistung nach IHK-Prüfungsformel:
Wirkleistung (P)
-- kW
Thermische Last
Scheinleistung (S = P / cos φ)
-- kVA
Elektrische Auslegung
Empf. USV-Nennleistung
-- kVA
Inkl. Sicherheitszuschlag
`;
function update() {
const p = parseFloat(document.getElementById('usv_p').value) || 0;
const cos = parseFloat(document.getElementById('usv_cos').value) || 0.9;
const reserve = parseFloat(document.getElementById('usv_reserve').value) || 20;
const s = cos > 0 ? (p / cos) : 0;
const rec = s * (1 + reserve / 100);
document.getElementById('res_usv_p').textContent = (p / 1000).toFixed(2) + ' kW';
document.getElementById('res_usv_s').textContent = (s / 1000).toFixed(2) + ' kVA';
document.getElementById('res_usv_rec').textContent = (rec / 1000).toFixed(2) + ' kVA';
}
['usv_p', 'usv_cos', 'usv_reserve'].forEach(id => {
document.getElementById(id).addEventListener('input', update);
});
update();
}
window.renderUSVCalculator = renderUSVCalculator;
document.addEventListener('DOMContentLoaded', () => {
if (document.getElementById('usv-calculator-app')) {
renderUSVCalculator('usv-calculator-app');
}
});
})();