From efc87519871d368fc70215f0487d9865d289fe48 Mon Sep 17 00:00:00 2001 From: Ahmad Ali Date: Fri, 8 Mar 2024 17:04:51 -0600 Subject: [PATCH] t_const for Tx line ODE added --- andes/models/line/line.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/andes/models/line/line.py b/andes/models/line/line.py index 8dfcfe25c..466d8d7de 100644 --- a/andes/models/line/line.py +++ b/andes/models/line/line.py @@ -187,6 +187,8 @@ def __init__(self, system=None, config=None): self.itap = ConstService(tex_name='1/t_{ap}') self.itap2 = ConstService(tex_name='1/t_{ap}^2') + self.Leq = ConstService(v_str='x/(2*pi*60)') + ## declare variables # self.omegaa = ConstService(tex_name='omegaa') # self.omegaa.v_str = 'u * 2.0' @@ -247,17 +249,21 @@ def __init__(self, system=None, config=None): # # end modified + # / ((x+1e-8)/(2*pi*60)) + ## test (this version is also in implicit form but has the same dq-axis alignment as in ANDES implementation) self.idd = State(info='real current', tex_name='idd', v_str='1e-8', - e_str='u * ( -(x+1e-8)*iqq - (r+1e-8)*idd - v2*sin(a2) + v1*sin(a1) ) / (x/(2*pi*60))') + e_str='u * ( -(x+1e-8)*iqq - (r+1e-8)*idd - v2*sin(a2) + v1*sin(a1) )', + t_const=self.Leq) self.iqq = State(info='real current', tex_name='iqq', v_str='1e-8', - e_str='u * (1*(x+1e-8)*idd - (r+1e-8)*iqq - v2*cos(a2) + v1*cos(a1) ) / (x/(2*pi*60))') + e_str='u * (1*(x+1e-8)*idd - (r+1e-8)*iqq - v2*cos(a2) + v1*cos(a1) )', + t_const=self.Leq) self.a1.e_str = 'u * (idd*v1*sin(a1) + iqq*v1*cos(a1))'