电压也从外部读入

This commit is contained in:
n3040 2021-12-22 16:15:19 +08:00
parent 7f03fc2b9c
commit 6a123b6213
1 changed files with 9 additions and 1 deletions

10
main.py
View File

@ -48,6 +48,7 @@ def egm():
para.h_arm = toml_parameter["h_arm"]
para.altitude = toml_parameter["altitude"]
para.max_i = toml_parameter["max_i"]
para.rated_voltage = toml_parameter["rated_voltage"]
toml_optional = toml_dict["optional"]
para.voltage_n = toml_optional["voltage_n"] # 工作电压分成多少份来计算
#########################################################
@ -296,7 +297,14 @@ def egm():
# if abs(calculus-0.05812740052770032)<1e-5:
# abc=123
# pass
n_sf = 2 * ng / 10 * calculus * arc_possibility(750, insulator_c_len)
rated_voltage = para.rated_voltage
n_sf = (
2
* ng
/ 10
* calculus
* arc_possibility(rated_voltage, insulator_c_len)
)
avr_n_sf += n_sf / voltage_n
n_sf_phases[phase_conductor_foo][u_bar] = n_sf
logger.info(f"工作电压为{u_ph:.2f}kV时,跳闸率是{n_sf:.6}")