From 568d7d3ef6ac8c33144a7891d670f628972860b8 Mon Sep 17 00:00:00 2001 From: dmy Date: Wed, 4 Mar 2026 16:12:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E7=94=B5=E5=8E=8B?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index 531b521..2c0231e 100644 --- a/main.py +++ b/main.py @@ -156,16 +156,16 @@ def run_egm(para: Parameter, animation=None) -> dict: rated_voltage = para.rated_voltage logger.info(f"交、直流标识{para.ac_or_dc}") for u_bar in range(voltage_n): # 计算不同工作电压下的跳闸率 - if para.ac_or_dc=="AC": - # TODO 需要区分交、直流 - u_ph = ( - math.sqrt(2) - * rated_voltage - * math.cos(2 * math.pi / voltage_n * u_bar) - / 1.732 - ) # 运行相电压 - else: - u_ph = rated_voltage + # if para.ac_or_dc=="AC": + # # TODO 需要区分交、直流 + # u_ph = ( + # math.sqrt(2) + # * rated_voltage + # * math.cos(2 * math.pi / voltage_n * u_bar) + # / 1.732 + # ) # 运行相电压 + # else: + u_ph = rated_voltage/1.732 logger.info(f"计算第{phase_conductor_foo + 1}相,电压为{u_ph:.2f}kV") # 迭代法计算最大电流 i_max = 0