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

56 lines
1008 B
Markdown

---
id: 2026-03-05T10:26:48-0500
title: 2026-03-05 10:26:48
tags:
- status/draft
date-created: 2026-03-05T10:26:48-05:00
daily: "[[2026-03-05]]"
---
# 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
```python
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)
```