Skip to content

[FEATURE] Add input validation per IEEE 1584-2018 Section 4.2 #9

@sramharack

Description

@sramharack

Feature Description

Validate inputs against IEEE 1584-2018 model validity ranges before calculation.

Validation Rules (Section 4.2)

Parameter LV (≤600V) MV (>600V)
Voltage 208V - 600V 601V - 15,000V
Current 500A - 106,000A 200A - 65,000A
Gap 6.35mm - 76.2mm 19.05mm - 254mm
Distance ≥ 305mm ≥ 305mm

Proposed Implementation

def validate_inputs(ibf_ka, voc_kv, gap_mm, distance_mm) -> List[str]:
    """Return list of validation errors, empty if valid."""
    errors = []
    if voc_kv < 0.208 or voc_kv > 15.0:
        errors.append(f"Voltage {voc_kv} kV outside valid range 0.208-15 kV")
    # ... etc
    return errors

Acceptance Criteria

  • Validation function created
  • Clear error messages with valid ranges
  • Integrated into calculate_arc_flash()
  • Option to warn vs raise error
  • Unit tests for boundary conditions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions