Fault - Loop Calculator
for key, value in verification.items(): print(f"{key.replace('_', ' ').title()}: {value}")
def recommend_correction(self, fault_current: float, protection_rating: float, cable_length: float) -> str: """ Provide recommendations if fault loop impedance is too high """ required_current = 5 * protection_rating # For MCB Type C if fault_current < required_current: max_length = cable_length * (fault_current / required_current) return (f"Fault current ({fault_current:.1f}A) insufficient for " f"{protection_rating}A MCB. Reduce cable length to {max_length:.1f}m " f"or increase conductor size.") else: return "Fault loop impedance meets requirements." def main(): """Example usage of Fault Loop Calculator""" fault loop calculator
This calculator follows IEC 60364 standards and is suitable for domestic, commercial, and industrial electrical installations. for key, value in verification
# Define cable segments cables = [ CableData( length=25, # meters cross_section_phase=2.5, # mm² cross_section_earth=2.5, # mm² material='copper' ) ] value in verification.items(): print(f"{key.replace('_'
# Quick lookup table print("\n📋 QUICK REFERENCE - MAX CABLE LENGTHS (Copper, 230V, 20A MCB Type C)") print("-" * 70) print(f"{'Cable Size (mm²)':<20} {'Max Length (m)':<15} {'Zs (Ω)':<10}") print("-" * 70)
# Resistivity at 20°C (ohm-mm²/m) RESISTIVITY = { 'copper': 0.0175, 'aluminum': 0.0282 }