Fault Loop | Calculator Hot!
# Compare cold and hot cable conditions cable = CableData(length=50, cross_section_phase=4, cross_section_earth=4, material='copper')
def __init__(self, supply_voltage: float = 230, frequency: float = 50): """ Args: supply_voltage: Nominal phase-to-earth voltage (V) frequency: System frequency (Hz) """ self.supply_voltage = supply_voltage self.frequency = frequency fault loop calculator
I'll produce a feature for electrical engineering applications. This calculates prospective fault current and earth fault loop impedance for electrical installations. Fault Loop Calculator import math from dataclasses import dataclass from typing import Optional, Tuple @dataclass class CableData: """Cable parameters for fault loop calculation""" length: float # meters cross_section_phase: float # mm² cross_section_earth: float # mm² material: str # 'copper' or 'aluminum' # Compare cold and hot cable conditions cable
This calculator follows IEC 60364 standards and is suitable for domestic, commercial, and industrial electrical installations. result = calc
result = calc.calculate_fault_loop_impedance( cables=cables, available_fault_current=10000 # 10kA at supply point )
# Temperature effects print("\n🌡️ TEMPERATURE EFFECTS") print("-" * 40)
def cable_impedance(self, cable: CableData, use_temp_correction: bool = True) -> Tuple[float, float]: """ Calculate cable resistance and reactance Returns: Tuple of (resistance ohms, reactance ohms) """ resistivity = cable.RESISTIVITY[cable.material] # Temperature correction factor temp_factor = cable.TEMP_FACTOR_FAULT if use_temp_correction else 1.0 # Phase conductor resistance r_phase = resistivity * temp_factor * cable.length / cable.cross_section_phase # Earth conductor resistance r_earth = resistivity * temp_factor * cable.length / cable.cross_section_earth # Total loop resistance (phase + earth) r_total = r_phase + r_earth # Reactance (typical for LV cables: ~0.08 ohm/km for 50Hz) reactance_per_km = 0.08 # ohms/km x_total = reactance_per_km * cable.length / 1000 return r_total, x_total