Created
November 10, 2020 17:09
-
-
Save glemaitre/db20edb50f1d372d5e402594859e1a01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
def calcul_chute_tension( | |
Ib=1, S=1.5, Un=400, L=0.1, metal="cuivre", phi=np.arccos(0.85) | |
): | |
Ib = np.asarray(Ib) | |
S = np.asarray(S) | |
R_const = 22.5 if metal == "cuivre" else 36 | |
R = (S < 500).astype(np.float64) * R_const | |
X = (S > 50).astype(np.float64) * 0.08 | |
results = {} | |
for i in Ib: | |
delta_Un = np.sqrt(3) * i * L * (R / S * np.cos(phi) + X * np.sin(phi)) | |
delta_Un_perc = 100 * delta_Un / Un | |
results[i] = delta_Un_perc | |
results = pd.DataFrame(results, index=S) | |
results.columns = results.columns.rename("Ib") | |
results.index = results.index.rename("S") | |
return results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment