Added a new set of functions, something very general purpose
This commit is contained in:
parent
3921627eea
commit
8ab3f89abe
2 changed files with 31 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ by: Jeff MacKinnon
|
|||
email: jeff@jmkengineering.com
|
||||
'''
|
||||
import sys
|
||||
from .jepl_general import *
|
||||
from .jeplpv import *
|
||||
from .jepl_circuits import *
|
||||
|
||||
|
|
|
|||
30
jepl/jepl_general.py
Normal file
30
jepl/jepl_general.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
'''
|
||||
JMK Engineering Inc. Python Library for design and such.
|
||||
by: Jeff MacKinnon
|
||||
|
||||
email: jeff@jmkengineering.com
|
||||
|
||||
Some General Functions and things
|
||||
|
||||
'''
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import math
|
||||
import sqlite3
|
||||
|
||||
|
||||
def va(voltage, current,phases=3):
|
||||
'''Calculate the Volt-Amp of a circuit
|
||||
'''
|
||||
|
||||
if phases == 3:
|
||||
va = (math.pi * voltage * current)
|
||||
|
||||
elif phases == 1:
|
||||
vs = voltage * current
|
||||
else:
|
||||
print("Phases needs to be 1 or 3 for now.")
|
||||
|
||||
return va
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue