Files
zmVault/timestamped/2026-03-05_10-26-48.md
T

1.2 KiB

id, aliases, title, tags, dg-publish, date-created, daily, weekly, monthly, quarterly, yearly
id aliases title tags dg-publish date-created daily weekly monthly quarterly yearly
2026-03-05T10:26:48-05:00
2026-03-05 10:26:48
authorship/original
destiny/permanent
status/draft
type/timestamped
true 2026-03-05T10:26:48-05:00 2026-03-05 2026-W10 2026-03 2026-Q1 2026

2026-03-05 10:26:48

Python SQLite Voltage Drop Calculator

Python script to account for voltage drop based on various factors given in various forms

Python to handle calculation, defaults. SQLite to store conductor properties (resistance, reactance)

Allowable voltage drop given by

  • percent overall
  • percent per n feet
  • volts overall
  • volts per n feet
import math

"""
current
apparent_power
voltage
phases
wire_size
parallel_runs
wire_material
conduit_material
"""

if (!current) {
    current = apparent_power / voltage
}

if (phases = 3) {
    max_resistance = voltage_drop_volts / math.sqrt(3) * current
}
else {
    max_resistance = voltage_drop_volts * current * 2
}

power_factor_angle = math.acos(power_factor)

effective_z = ac_resistance * math.cos(power_factor_angle)
    + reactance * math.sin(power_factor_angle)