Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr PowerSystems_PowerSystems.Examples.AC3ph.Drives.ASMav.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 1.0.1/package.mo", uses=false) Using package PowerSystems with version 1.0.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 1.0.1/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(PowerSystems.Examples.AC3ph.Drives.ASMav,tolerance=1e-06,outputFormat="empty",numberOfIntervals=2400,variableFilter="",fileNamePrefix="PowerSystems_PowerSystems.Examples.AC3ph.Drives.ASMav") translateModel(PowerSystems.Examples.AC3ph.Drives.ASMav,tolerance=1e-06,outputFormat="empty",numberOfIntervals=2400,variableFilter="",fileNamePrefix="PowerSystems_PowerSystems.Examples.AC3ph.Drives.ASMav") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001093/0.001093, allocations: 109.5 kB / 17.7 MB, free: 5.379 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001013/0.001013, allocations: 192.7 kB / 18.64 MB, free: 4.449 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.623/1.623, allocations: 205.1 MB / 224.5 MB, free: 12.24 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 1.0.1/package.mo): time 0.1903/0.1903, allocations: 37.99 MB / 309.9 MB, free: 5.973 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.759e-05/2.768e-05, allocations: 2.281 kB / 376.7 MB, free: 2.969 MB / 318.1 MB Notification: Performance of NFInst.instantiate(PowerSystems.Examples.AC3ph.Drives.ASMav): time 0.2031/0.2032, allocations: 7.098 MB / 383.8 MB, free: 58.71 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.007238/0.2105, allocations: 5.042 MB / 388.9 MB, free: 56.78 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0007102/0.2112, allocations: 31.84 kB / 388.9 MB, free: 56.78 MB / 318.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:1895:3-1973:18:writable] Warning: Pure function 'Modelica.Math.Matrices.eigenValues' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgeev_eigenValues'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:2829:3-2870:10:writable] Warning: Pure function 'Modelica.Math.Matrices.inv' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgetrf'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:1125:3-1182:12:writable] Warning: Pure function 'Modelica.Math.Matrices.solve' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgesv_vec'. Notification: Performance of NFTyping.typeComponents: time 0.01111/0.2223, allocations: 5.695 MB / 394.6 MB, free: 55.64 MB / 318.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Utilities/Strings.mo:139:3-175:14:writable] Warning: Pure function 'Modelica.Utilities.Strings.isEmpty' contains a call to impure function 'Modelica.Utilities.Strings.Advanced.skipWhiteSpace'. Notification: Performance of NFTyping.typeBindings: time 0.00175/0.2241, allocations: 0.5208 MB / 395.1 MB, free: 55.32 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001303/0.2254, allocations: 475.7 kB / 395.6 MB, free: 54.96 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.002973/0.2284, allocations: 2.436 MB / 398 MB, free: 53.65 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001059/0.2295, allocations: 0.7616 MB / 398.8 MB, free: 53.15 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001116/0.2306, allocations: 0.605 MB / 399.4 MB, free: 52.79 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0005727/0.2312, allocations: 0.5348 MB / 399.9 MB, free: 52.47 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001104/0.2313, allocations: 73.12 kB / 400 MB, free: 52.47 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.003478/0.2348, allocations: 2.268 MB / 402.3 MB, free: 50.3 MB / 318.1 MB Notification: Performance of combineBinaries: time 0.0008066/0.2356, allocations: 1.456 MB / 403.7 MB, free: 48.83 MB / 318.1 MB Notification: Performance of replaceArrayConstructors: time 0.0004139/0.236, allocations: 0.9604 MB / 404.7 MB, free: 47.86 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002151/0.2363, allocations: 135.6 kB / 404.8 MB, free: 47.73 MB / 318.1 MB Notification: Performance of FrontEnd: time 0.0002111/0.2365, allocations: 27.86 kB / 404.8 MB, free: 47.7 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 220 (139) * Number of variables: 220 (136) Notification: Performance of Bindings: time 0.002852/0.2393, allocations: 4.377 MB / 409.2 MB, free: 43.21 MB / 318.1 MB Notification: Performance of FunctionAlias: time 0.0003424/0.2397, allocations: 327.9 kB / 409.5 MB, free: 42.91 MB / 318.1 MB Notification: Performance of Early Inline: time 0.001556/0.2413, allocations: 2.05 MB / 411.6 MB, free: 40.84 MB / 318.1 MB Notification: Performance of simplify1: time 0.0001642/0.2414, allocations: 159.8 kB / 411.7 MB, free: 40.69 MB / 318.1 MB Notification: Performance of Alias: time 0.001996/0.2434, allocations: 2.383 MB / 414.1 MB, free: 38.05 MB / 318.1 MB Notification: Performance of simplify2: time 0.0001205/0.2436, allocations: 139.7 kB / 414.3 MB, free: 37.92 MB / 318.1 MB Notification: Performance of Events: time 0.0001294/0.2437, allocations: 151.8 kB / 414.4 MB, free: 37.77 MB / 318.1 MB Notification: Performance of Detect States: time 0.000496/0.2442, allocations: 0.6411 MB / 415.1 MB, free: 37.1 MB / 318.1 MB Notification: Performance of Partitioning: time 0.0005704/0.2448, allocations: 0.6927 MB / 415.8 MB, free: 36.37 MB / 318.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency power.v[2] could not be devided by the body size 3 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (3) power.p = {power.v[1:2] * power.i[1:2], -{-power.v[2], power.v[1]} * power.i[1:2], power.v[3] * power.i[3]} ($RES_SIM_63) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (103/185) **************************** (1) [ALGB] (3) flow Real[3] inverter.AC.i (nominal = {1.0 for $i1 in 1:3}) (2) [ALGB] (3) flow Real[3] asm.motor.term.i (nominal = {1.0 for $i1 in 1:3}) (3) [ALGB] (2) protected Real[2] asm.motor.omega (4) [ALGB] (2) protected Real[2] asm.motor.i_rq (start = asm.motor.i_rq_start, nominal = {1.0 for $i1 in 1:2}) (5) [ALGB] (1) Real $FUN_18 (6) [ALGB] (1) Real $FUN_17 (7) [ALGB] (1) Real $FUN_16 (8) [ALGB] (4) Real[2, 2] $FUN_15 (9) [ALGB] (4) Real[2, 2] $FUN_14 (10) [DER-] (1) Real $DER.asm.rotor.w (11) [ALGB] (4) Real[2, 2] $FUN_13 (12) [ALGB] (1) protected Real inverter.vDC1 = 0.5 * (inverter.DC.v[1] - inverter.DC.v[2]) (nominal = 1000.0) (13) [DER-] (3) Real[3] $DER.power.pav (14) [ALGB] (1) Real power.alpha_i (StateSelect = never) (15) [ALGB] (1) protected Real inverter.vDC0 = 0.5 * (inverter.DC.v[2] + inverter.DC.v[1]) (nominal = 1000.0) (16) [ALGB] (2) flow Real[2] inverter.DC.i (nominal = {1.0 for $i1 in 1:2}) (17) [ALGB] (3) Real[3] asm.motor.term.v (nominal = {1000.0 for $i1 in 1:3}) (18) [ALGB] (2) flow Real[2] asm.heat.ports.Q_flow (19) [ALGB] (2) protected Real[2] asm.motor.i_rd (start = asm.motor.i_rd_start, nominal = {1.0 for $i1 in 1:2}) (20) [ALGB] (1) protected Real inverter.phi (21) [ALGB] (3) Real[3] power.v (StateSelect = never) (22) [ALGB] (1) protected Real tabLoad.f (23) [ALGB] (1) Real[1] asm.motor.top.i_n (start = {0.0 for $i1 in 1:1}, nominal = {1.0 for $i1 in 1:1}) (24) [ALGB] (1) Real power.alpha_v (StateSelect = never) (25) [ALGB] (1) protected Real[1] inverter.Q_flow (26) [ALGB] (1) protected Real voltage.v (nominal = 1000.0) (27) [ALGB] (3) Real[3] power.p (StateSelect = never) (28) [ALGB] (2) flow Real[2] bdCond1.heat.ports.Q_flow (29) [ALGB] (2) Real[2] inverter.vPhasor (30) [ALGB] (1) Real asm.motor.slip (31) [DER-] (1) Real $DER.asm.motor.phi_el (32) [ALGB] (1) protected Real inverter.cT (33) [ALGB] (1) flow Real[1] bdCond2.heat.ports.Q_flow (34) [DER-] (2) Real[2] $DER.asm.motor.psi_rq (35) [ALGB] (1) flow Real asm.rotor.flange_b.tau (36) [ALGB] (3) Real[3] power.i (StateSelect = never) (37) [ALGB] (3) Real[3] asm.motor.v (start = {3000.0, 0.0, 0.0}, nominal = {1000.0 for $i1 in 1:3}) (38) [ALGB] (1) Real power.i_norm (StateSelect = never) (39) [ALGB] (1) protected Real[1] inverter.T (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (40) [DER-] (3) Real[3] $DER.asm.motor.i (41) [ALGB] (1) Real $FUN_7 (42) [DER-] (1) Real $DER.tabLoad.s (43) [ALGB] (3) Real[3] asm.motor.top.i_term (nominal = {1.0 for $i1 in 1:3}) (44) [ALGB] (1) Real $FUN_6 (45) [DER-] (2) Real[2] $DER.asm.motor.psi_rd (46) [ALGB] (1) flow Real[1] inverter.heat.ports.Q_flow (47) [ALGB] (1) Real asm.motor.tau_el (48) [ALGB] (1) Real $FUN_5 (49) [ALGB] (3) protected Real[3] inverter.v_dq0 (50) [ALGB] (1) Real[1] asm.motor.v_n (nominal = {1000.0 for $i1 in 1:1}) (51) [ALGB] (1) Real $FUN_4 (52) [ALGB] (1) flow Real grd.term.i (53) [ALGB] (1) Real power.v_norm (StateSelect = never) (54) [ALGB] (1) protected Real inverter.iAC2 (55) [ALGB] (2) Real[2] power.term_p.theta (56) [ALGB] (2) protected Real[2] asm.motor.v_rq = {0.0 for $i1 in 1:2} (nominal = {1000.0 for $i1 in 1:2}) (57) [ALGB] (1) Real tabLoad.tau (58) [ALGB] (1) protected Real tabLoad.slope (59) [ALGB] (3) Real[3] asm.motor.top.v_term (nominal = {1000.0 for $i1 in 1:3}) (60) [ALGB] (3) Real[3] power.p_av = power.pav (61) [ALGB] (2) flow Real[2] asm.motor.heat.ports.Q_flow (62) [ALGB] (2) Real[2] power.vpp (StateSelect = never) (63) [ALGB] (3) Real[3] asm.motor.top.i_cond = asm.motor.i (nominal = {1.0 for $i1 in 1:3}) (64) [ALGB] (4) protected Real[2, 2] power.Rot_dq (65) [ALGB] (2) protected Real[2] asm.motor.v_rd = {0.0 for $i1 in 1:2} (nominal = {1000.0 for $i1 in 1:2}) (66) [DER-] (2) Real[2] $DER.asm.motor.term.theta (67) [ALGB] (1) Real[1] tabLoad.table.y (68) [ALGB] (1) protected Real inverter.Vloss (nominal = 1000.0) (69) [ALGB] (1) Real power.cos_phi (StateSelect = never) (70) [ALGB] (1) Real tabLoad.table.u (71) [ALGB] (3) Real[3] asm.motor.top.v_cond = asm.motor.v (nominal = {1000.0 for $i1 in 1:3}) (72) [ALGB] (2) Real[2] asm.term.theta (73) [ALGB] (3) flow Real[3] power.term_n.i (nominal = {1.0 for $i1 in 1:3}) (74) [ALGB] (3) Real[3] asm.term.v (nominal = {1000.0 for $i1 in 1:3}) (75) [DER-] (1) Real $DER.tabLoad.vVehicle (76) [ALGB] (1) protected Real inverter.iDC1 = inverter.DC.i[1] - inverter.DC.i[2] (nominal = 1.0) (77) [ALGB] (2) Real[2] power.term_n.theta (78) [ALGB] (1) protected Real inverter.iDC0 = inverter.DC.i[1] + inverter.DC.i[2] (nominal = 1.0) (79) [ALGB] (1) Real system.thetaRef = system.thetaRef (80) [ALGB] (1) Real[1] asm.motor.top.v_n = asm.motor.v_n (start = {0.0 for $i1 in 1:1}, nominal = {1000.0 for $i1 in 1:1}) (81) [ALGB] (1) Real[1] bdCond2.heat.ports.T (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (82) [ALGB] (1) flow Real asm.rotor.rotor.tau (83) [ALGB] (2) protected Real[2] select.vPhasor_internal (84) [ALGB] (2) flow Real[2] voltage.term.i (nominal = {1.0 for $i1 in 1:2}) (85) [ALGB] (1) Real asm.rotor.a (86) [ALGB] (3) Real[3] power.term_n.v (nominal = {1000.0 for $i1 in 1:3}) (87) [ALGB] (3) flow Real[3] asm.term.i (nominal = {1.0 for $i1 in 1:3}) (88) [ALGB] (1) Real system.thetaRel = system.thetaRef - system.thetaRef (89) [ALGB] (3) flow Real[3] power.term_p.i (nominal = {1.0 for $i1 in 1:3}) (90) [ALGB] (1) Real[1] inverter.heat.ports.T (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (91) [ALGB] (2) Real[2] voltage.term.v (nominal = {1000.0 for $i1 in 1:2}) (92) [ALGB] (1) protected Real tabLoad.sin_gam (93) [DER-] (1) Real $DER.tabLoad.flange_b.phi (94) [ALGB] (2) Real[2] inverter.AC.theta (95) [ALGB] (3) Real[3] power.term_p.v (nominal = {1000.0 for $i1 in 1:3}) (96) [ALGB] (1) Real[1] asm.motor.i_n = asm.motor.top.i_n (nominal = {1.0 for $i1 in 1:1}) (97) [ALGB] (1) Real asm.motor.w_el (98) [ALGB] (3) Real[3] inverter.AC.v (nominal = {1000.0 for $i1 in 1:3}) (99) [DER-] (2) Real[2] $DER.asm.motor.psi_s (100) [ALGB] (3) protected Real[3] inverter.switch_dq0 (101) [ALGB] (2) Real[2] select.vPhasor_out (102) [ALGB] (2) Real[2] inverter.DC.v (nominal = {1000.0 for $i1 in 1:2}) (103) [ALGB] (1) Real asm.rotor.friction.phi System Equations (106/185) **************************** (1) [SCAL] (1) asm.rotor.friction.phi = tabLoad.flange_b.phi ($RES_SIM_50) (2) [SCAL] (1) tabLoad.r * tabLoad.f = tabLoad.gRatio * tabLoad.tau ($RES_SIM_15) (3) [ARRY] (3) asm.term.v = asm.motor.term.v ($RES_SIM_133) (4) [SCAL] (1) tabLoad.gRatio * tabLoad.vVehicle = tabLoad.r * $DER.tabLoad.flange_b.phi ($RES_SIM_16) (5) [ARRY] (3) power.p_av = power.pav ($RES_BND_146) (6) [ARRY] (2) asm.term.theta = asm.motor.term.theta ($RES_SIM_134) (7) [ARRY] (2) power.term_n.theta = power.term_p.theta ($RES_SIM_52) (8) [ARRY] (3) asm.motor.top.v_cond = asm.motor.v ($RES_BND_147) (9) [ARRY] (3) power.term_p.i + power.term_n.i = {0.0 for $i1 in 1:3} ($RES_SIM_53) (10) [SCAL] (1) tabLoad.table.y[1] = Modelica.Blocks.Tables.Internal.getTable1DValue(tabLoad.table.tableID, 1, tabLoad.table.u) ($RES_SIM_18) (11) [ARRY] (3) asm.motor.top.i_cond = asm.motor.i ($RES_BND_148) (12) [FOR-] (2) ($RES_SIM_136) (12) [----] for $i1 in 1:2 loop (12) [----] [SCAL] (1) asm.motor.heat.ports[$i1].Q_flow - asm.heat.ports[$i1].Q_flow = 0.0 ($RES_SIM_137) (12) [----] end for; (13) [ARRY] (3) power.term_p.v = power.term_n.v ($RES_SIM_54) (14) [ARRY] (1) asm.motor.top.v_n = asm.motor.v_n ($RES_BND_149) (15) [ARRY] (4) power.Rot_dq = $FUN_13 ($RES_SIM_55) (16) [SCAL] (1) system.thetaRef = 314.1592653589793 * time ($RES_SIM_94) (17) [ARRY] (1) bdCond2.heat.ports.T = {bdCond2.T_amb} ($RES_SIM_20) (18) [ARRY] (1) asm.motor.i_n = asm.motor.top.i_n ($RES_BND_151) (19) [SCAL] (1) grd.term.i = sum(voltage.term.i) ($RES_$AUX_173) (20) [ARRY] (3) asm.motor.term.i = asm.motor.top.i_term ($RES_SIM_22) (21) [FOR-] (2) ($RES_BND_152) (21) [----] for $i1 in 1:2 loop (21) [----] [SCAL] (1) asm.motor.v_rd[$i1] = 0.0 ($RES_BND_153) (21) [----] end for; (22) [SCAL] (1) 0.16666666666666666 * inverter.Vloss = tanh(0.02 * inverter.iDC1) ($RES_$AUX_172) (23) [ARRY] (3) asm.motor.term.v = asm.motor.top.v_term ($RES_SIM_23) (24) [SCAL] (1) inverter.cT = PowerSystems.Examples.AC3ph.Drives.ASMav.inverter.loss((-300.0) + inverter.T[1], {0.005}) ($RES_$AUX_171) (25) [SCAL] (1) asm.motor.w_el = $DER.asm.motor.phi_el ($RES_SIM_24) (26) [FOR-] (2) ($RES_BND_154) (26) [----] for $i1 in 1:2 loop (26) [----] [SCAL] (1) asm.motor.v_rq[$i1] = 0.0 ($RES_BND_155) (26) [----] end for; (27) [SCAL] (1) $FUN_4 = cos(inverter.phi) ($RES_$AUX_170) (28) [SCAL] (1) -asm.rotor.rotor.tau = -asm.motor.pp * asm.motor.tau_el ($RES_SIM_25) (29) [SCAL] (1) asm.motor.pp * asm.rotor.friction.phi = asm.motor.phi_el ($RES_SIM_26) (30) [ARRY] (3) $DER.power.pav = 20.0 .* (power.p - power.pav) ($RES_SIM_62) (31) [ARRY] (2) asm.motor.omega = $DER.asm.motor.term.theta ($RES_SIM_27) (32) [SCAL] (1) inverter.heat.ports[1].Q_flow + bdCond2.heat.ports[1].Q_flow = 0.0 ($RES_SIM_109) (33) [ARRY] (3) power.p = {power.v[1:2] * power.i[1:2], -{-power.v[2], power.v[1]} * power.i[1:2], power.v[3] * power.i[3]} ($RES_SIM_63) (34) [ARRY] (2) asm.motor.heat.ports.Q_flow = -{asm.motor.c.R_s * asm.motor.i * asm.motor.i, $FUN_15 * asm.motor.i_rd * asm.motor.i_rd + $FUN_15 * asm.motor.i_rq * asm.motor.i_rq} ($RES_SIM_28) (35) [ARRY] (3) power.i = power.term_p.i / power.I_base ($RES_SIM_64) (36) [SCAL] (1) asm.motor.tau_el = asm.motor.i[1:2] * {-asm.motor.psi_s[2], asm.motor.psi_s[1]} ($RES_SIM_29) (37) [ARRY] (2) power.vpp = 1.7320508075688772 * {power.v[2], -power.v[1]} ($RES_SIM_65) (38) [ARRY] (3) power.v = power.term_p.v / power.V_base ($RES_SIM_66) (39) [ARRY] (1) inverter.heat.ports.Q_flow = -inverter.Q_flow ($RES_SIM_67) (40) [ARRY] (1) inverter.T = inverter.heat.ports.T ($RES_SIM_68) (41) [SCAL] (1) inverter.iDC0 + 1.7320508075688772 * inverter.AC.i[3] = 0.0 ($RES_SIM_69) (42) [SCAL] (1) $FUN_5 = sin(inverter.phi) ($RES_$AUX_169) (43) [SCAL] (1) $FUN_6 = abs(inverter.vDC1) ($RES_$AUX_168) (44) [SCAL] (1) $FUN_7 = sqrt(inverter.iAC2) ($RES_$AUX_167) (45) [ARRY] (1) inverter.heat.ports.T = bdCond2.heat.ports.T ($RES_SIM_110) (46) [SCAL] (1) power.v_norm = sqrt(power.v * power.v) ($RES_$AUX_166) (47) [FOR-] (2) ($RES_SIM_111) (47) [----] for $i1 in 1:2 loop (47) [----] [SCAL] (1) asm.heat.ports[$i1].Q_flow + bdCond1.heat.ports[$i1].Q_flow = 0.0 ($RES_SIM_112) (47) [----] end for; (48) [SCAL] (1) power.alpha_v = atan2(power.Rot_dq[:, 2] * power.v[1:2], power.Rot_dq[:, 1] * power.v[1:2]) ($RES_$AUX_165) (49) [SCAL] (1) asm.motor.slip = (-1.0) + asm.motor.w_el / $FUN_16 ($RES_SIM_30) (50) [SCAL] (1) power.i_norm = sqrt(power.i * power.i) ($RES_$AUX_164) (51) [ARRY] (1) asm.motor.v_n = asm.motor.c.R_n * asm.motor.i_n ($RES_SIM_31) (52) [SCAL] (1) power.alpha_i = atan2(power.Rot_dq[:, 2] * power.i[1:2], power.Rot_dq[:, 1] * power.i[1:2]) ($RES_$AUX_163) (53) [ARRY] (2) (asm.motor.omega[2] - asm.motor.w_el) * asm.motor.psi_rd + $DER.asm.motor.psi_rq + $FUN_15 * asm.motor.i_rq = asm.motor.v_rq ($RES_SIM_32) (54) [SCAL] (1) power.cos_phi = cos(power.alpha_v - power.alpha_i) ($RES_$AUX_162) (55) [ARRY] (2) ($DER.asm.motor.psi_rd + $FUN_15 * asm.motor.i_rd) - (asm.motor.omega[2] - asm.motor.w_el) * asm.motor.psi_rq = asm.motor.v_rd ($RES_SIM_33) (56) [ARRY] (4) $FUN_13 = PowerSystems.Examples.AC3ph.Drives.ASMav.power.rot_dq(power.term_p.theta[1]) ($RES_$AUX_161) (57) [FOR-] (3) ($RES_SIM_116) (57) [----] for $i1 in 1:3 loop (57) [----] [SCAL] (1) power.term_n.i[$i1] + asm.term.i[$i1] = 0.0 ($RES_SIM_117) (57) [----] end for; (58) [SCAL] (1) asm.motor.c.L_s[3] * $DER.asm.motor.i[3] + asm.motor.c.R_s * asm.motor.i[3] = asm.motor.v[3] ($RES_SIM_34) (59) [ARRY] (4) $FUN_14 = diagonal(asm.motor.c.L_s[1:2]) ($RES_$AUX_160) (60) [SCAL] (1) inverter.iDC1 + inverter.switch_dq0 * inverter.AC.i = 0.0 ($RES_SIM_70) (61) [ARRY] (2) asm.motor.omega[2] * {-asm.motor.psi_s[2], asm.motor.psi_s[1]} + $DER.asm.motor.psi_s + asm.motor.c.R_s * asm.motor.i[1:2] = asm.motor.v[1:2] ($RES_SIM_35) (62) [ARRY] (3) power.term_n.v = asm.term.v ($RES_SIM_118) (63) [ARRY] (3) inverter.AC.v = inverter.v_dq0 + {0.0, 0.0, 1.7320508075688772 * inverter.vDC0} ($RES_SIM_71) (64) [ARRY] (2) asm.motor.psi_rq = asm.motor.L_m .* asm.motor.i[2] + asm.motor.L_r * asm.motor.i_rq ($RES_SIM_36) (65) [ARRY] (2) power.term_n.theta = asm.term.theta ($RES_SIM_119) (66) [ARRY] (1) inverter.Q_flow = {inverter.R_nom * inverter.par.eps[1] * inverter.iAC2 + 1.559393602467352 * (3.0 + 0.013333333333333334 * $FUN_6) * inverter.cT * $FUN_7} ($RES_SIM_72) (67) [ARRY] (2) asm.motor.psi_rd = asm.motor.L_m .* asm.motor.i[1] + asm.motor.L_r * asm.motor.i_rd ($RES_SIM_37) (68) [ARRY] (3) inverter.v_dq0 = (inverter.vDC1 - inverter.cT * inverter.Vloss) * inverter.switch_dq0 ($RES_SIM_73) (69) [ARRY] (2) asm.motor.psi_s = $FUN_14 * asm.motor.i[1:2] + {asm.motor.L_m * asm.motor.i_rd, asm.motor.L_m * asm.motor.i_rq} ($RES_SIM_38) (70) [ARRY] (3) inverter.switch_dq0 = 1.224744871391589 * inverter.vPhasor[1] * {$FUN_4, $FUN_5, 0.0} ($RES_SIM_74) (71) [SCAL] (1) asm.motor.top.i_n[1] = 1.7320508075688772 * asm.motor.top.i_term[3] ($RES_SIM_39) (72) [SCAL] (1) inverter.phi = inverter.AC.theta[1] + inverter.vPhasor[2] ($RES_SIM_75) (73) [SCAL] (1) inverter.iAC2 = inverter.AC.i * inverter.AC.i ($RES_SIM_78) (74) [ARRY] (4) $FUN_15 = diagonal(asm.motor.R_r) ($RES_$AUX_159) (75) [SCAL] (1) $FUN_16 = sum(asm.motor.omega) ($RES_$AUX_158) (76) [SCAL] (1) $FUN_17 = sqrt(1.0 + tabLoad.slope * tabLoad.slope) ($RES_$AUX_157) (77) [FOR-] (3) ($RES_SIM_120) (77) [----] for $i1 in 1:3 loop (77) [----] [SCAL] (1) inverter.AC.i[$i1] + power.term_p.i[$i1] = 0.0 ($RES_SIM_121) (77) [----] end for; (78) [SCAL] (1) $FUN_18 = abs(tabLoad.vVehicle) ($RES_$AUX_156) (79) [ARRY] (3) asm.motor.top.i_term = asm.motor.top.i_cond ($RES_SIM_40) (80) [ARRY] (3) inverter.AC.v = power.term_p.v ($RES_SIM_122) (81) [ARRY] (3) asm.motor.top.v_cond = asm.motor.top.v_term - {0.0, 0.0, 1.7320508075688772 * asm.motor.top.v_n[1]} ($RES_SIM_41) (82) [ARRY] (2) inverter.AC.theta = power.term_p.theta ($RES_SIM_123) (83) [FOR-] (2) ($RES_SIM_124) (83) [----] for $i1 in 1:2 loop (83) [----] [SCAL] (1) voltage.term.i[$i1] + inverter.DC.i[$i1] = 0.0 ($RES_SIM_125) (83) [----] end for; (84) [ARRY] (2) voltage.term.v = inverter.DC.v ($RES_SIM_126) (85) [SCAL] (1) system.thetaRel = system.thetaRef - system.thetaRef ($RES_BND_139) (86) [ARRY] (2) inverter.AC.theta = {0.0, system.thetaRef} ($RES_SIM_80) (87) [SCAL] (1) asm.rotor.a = $DER.asm.rotor.w ($RES_SIM_45) (88) [ARRY] (2) select.vPhasor_out = inverter.vPhasor ($RES_SIM_127) (89) [ARRY] (2) select.vPhasor_out = select.vPhasor_internal ($RES_SIM_81) (90) [SCAL] (1) asm.rotor.w = $DER.tabLoad.flange_b.phi ($RES_SIM_46) (91) [SCAL] (1) asm.rotor.J * asm.rotor.a = asm.rotor.flange_b.tau + asm.rotor.rotor.tau ($RES_SIM_48) (92) [ARRY] (2) select.vPhasor_internal = {select.v0, select.alpha0} ($RES_SIM_84) (93) [SCAL] (1) voltage.term.v[1] + voltage.term.v[2] = 0.0 ($RES_SIM_87) (94) [SCAL] (1) voltage.term.v[1] - voltage.term.v[2] = voltage.v ($RES_SIM_88) (95) [SCAL] (1) voltage.v = voltage.v0 * voltage.V_base ($RES_SIM_89) (96) [SCAL] (1) tabLoad.tau - asm.rotor.flange_b.tau = 0.0 ($RES_SIM_8) (97) [SCAL] (1) tabLoad.mass * $DER.tabLoad.vVehicle = -(9.80665 * tabLoad.mass * tabLoad.sig * tabLoad.sin_gam + tabLoad.f + (tabLoad.cFrict[1] + tabLoad.cFrict[2] * $FUN_18) * tabLoad.vVehicle) ($RES_SIM_10) (98) [SCAL] (1) $DER.tabLoad.s = tabLoad.sig * tabLoad.vVehicle ($RES_SIM_11) (99) [SCAL] (1) inverter.vDC1 = 0.5 * (inverter.DC.v[1] - inverter.DC.v[2]) ($RES_BND_141) (100) [SCAL] (1) tabLoad.sin_gam = tabLoad.slope / $FUN_17 ($RES_SIM_12) (101) [SCAL] (1) inverter.vDC0 = 0.5 * (inverter.DC.v[2] + inverter.DC.v[1]) ($RES_BND_142) (102) [SCAL] (1) tabLoad.slope = tabLoad.slope_factor * tabLoad.table.y[1] ($RES_SIM_13) (103) [SCAL] (1) inverter.iDC1 = inverter.DC.i[1] - inverter.DC.i[2] ($RES_BND_143) (104) [FOR-] (3) ($RES_SIM_131) (104) [----] for $i1 in 1:3 loop (104) [----] [SCAL] (1) asm.motor.term.i[$i1] - asm.term.i[$i1] = 0.0 ($RES_SIM_132) (104) [----] end for; (105) [SCAL] (1) tabLoad.table.u = tabLoad.s / tabLoad.s_factor ($RES_SIM_14) (106) [SCAL] (1) inverter.iDC0 = inverter.DC.i[1] + inverter.DC.i[2] ($RES_BND_144)