Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,8 +40,11 @@ def calculate_relay_curve(tr_kva, tr_volt, ct_pr, ct_sec, fac, tms, i_f_fac, cur
|
|
40 |
|
41 |
# Plot the relay curve
|
42 |
fig, ax = plt.subplots()
|
43 |
-
ax.plot(x_curr, y_time
|
44 |
-
ax.plot(i_f,
|
|
|
|
|
|
|
45 |
ax.set_xlabel('Current (Amp)')
|
46 |
ax.set_ylabel('Time (sec)')
|
47 |
ax.set_title(f"Relay Curve: {curve}")
|
@@ -66,3 +69,4 @@ curve = st.sidebar.selectbox("Relay Curve Type", ['IEC Normal Inverse', 'IEC Ver
|
|
66 |
# Run the calculation when the button is clicked
|
67 |
if st.sidebar.button("Calculate"):
|
68 |
calculate_relay_curve(tr_kva, tr_volt, ct_pr, ct_sec, fac, tms, i_f_fac, curve)
|
|
|
|
40 |
|
41 |
# Plot the relay curve
|
42 |
fig, ax = plt.subplots()
|
43 |
+
ax.plot(x_curr, y_time)
|
44 |
+
ax.plot(i_f, b_ * tms / (((i_f * (ct_sec / ct_pr) / (pick * ct_sec)) ** a_) - 1), 'o')
|
45 |
+
ax.xlabel('Current (Amp)')
|
46 |
+
ax.ylabel('Time (sec)')
|
47 |
+
ax.title(f"Relay Curve: {curve}")
|
48 |
ax.set_xlabel('Current (Amp)')
|
49 |
ax.set_ylabel('Time (sec)')
|
50 |
ax.set_title(f"Relay Curve: {curve}")
|
|
|
69 |
# Run the calculation when the button is clicked
|
70 |
if st.sidebar.button("Calculate"):
|
71 |
calculate_relay_curve(tr_kva, tr_volt, ct_pr, ct_sec, fac, tms, i_f_fac, curve)
|
72 |
+
|