Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Mechanics.Rotational.Examples.HeatLosses.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: translateModel(Modelica.Mechanics.Rotational.Examples.HeatLosses,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|clutch.phi_rel|clutch.w_rel|damper.phi_rel|damper.w_rel|elastoBacklash.phi_rel|elastoBacklash.w_rel|inertia5.phi|inertia5.w|oneWayClutch.phi_rel|oneWayClutch.w_rel|springDamper.phi_rel|springDamper.w_rel|bearingFriction.mode|bearingFriction.startBackward|bearingFriction.startForward|brake.mode|brake.startBackward|brake.startForward|clutch.mode|clutch.startBackward|clutch.startForward|lossyGear.mode|oneWayClutch.startForward|oneWayClutch.stuck",fileNamePrefix="Modelica_trunk_Modelica.Mechanics.Rotational.Examples.HeatLosses") translateModel(Modelica.Mechanics.Rotational.Examples.HeatLosses,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|clutch.phi_rel|clutch.w_rel|damper.phi_rel|damper.w_rel|elastoBacklash.phi_rel|elastoBacklash.w_rel|inertia5.phi|inertia5.w|oneWayClutch.phi_rel|oneWayClutch.w_rel|springDamper.phi_rel|springDamper.w_rel|bearingFriction.mode|bearingFriction.startBackward|bearingFriction.startForward|brake.mode|brake.startBackward|brake.startForward|clutch.mode|clutch.startBackward|clutch.startForward|lossyGear.mode|oneWayClutch.startForward|oneWayClutch.stuck",fileNamePrefix="Modelica_trunk_Modelica.Mechanics.Rotational.Examples.HeatLosses") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001136/0.001136, allocations: 114.4 kB / 18.42 MB, free: 4.668 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.0012/0.0012, allocations: 215.5 kB / 19.37 MB, free: 3.719 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.253/1.253, allocations: 227.4 MB / 247.5 MB, free: 10.42 MB / 206.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 1.985e-05/1.994e-05, allocations: 2.281 kB / 308.3 MB, free: 15.96 MB / 254.1 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.HeatLosses): time 0.005659/0.005691, allocations: 5.155 MB / 313.5 MB, free: 10.78 MB / 254.1 MB Notification: Performance of NFInst.instExpressions: time 0.00308/0.008788, allocations: 2.036 MB / 315.5 MB, free: 8.742 MB / 254.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.00027/0.00907, allocations: 15.94 kB / 315.5 MB, free: 8.727 MB / 254.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0004108/0.009488, allocations: 198.2 kB / 315.7 MB, free: 8.531 MB / 254.1 MB Notification: Performance of NFTyping.typeBindings: time 0.000787/0.0103, allocations: 471.2 kB / 316.2 MB, free: 8.066 MB / 254.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008379/0.01115, allocations: 0.5242 MB / 316.7 MB, free: 7.547 MB / 254.1 MB Notification: Performance of NFFlatten.flatten: time 0.001404/0.01256, allocations: 1.838 MB / 318.5 MB, free: 5.699 MB / 254.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004054/0.01298, allocations: 324 kB / 318.9 MB, free: 5.371 MB / 254.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0007774/0.01376, allocations: 0.7283 MB / 319.6 MB, free: 4.641 MB / 254.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0007103/0.01449, allocations: 0.7941 MB / 320.4 MB, free: 3.844 MB / 254.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001728/0.01467, allocations: 136 kB / 320.5 MB, free: 3.711 MB / 254.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003719/0.01504, allocations: 231.9 kB / 320.7 MB, free: 3.484 MB / 254.1 MB Notification: Performance of combineBinaries: time 0.001398/0.01645, allocations: 2.058 MB / 322.8 MB, free: 1.406 MB / 254.1 MB Notification: Performance of replaceArrayConstructors: time 0.0006584/0.01712, allocations: 1.109 MB / 323.9 MB, free: 288 kB / 254.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002364/0.01736, allocations: 191.3 kB / 324.1 MB, free: 96 kB / 254.1 MB Notification: Performance of FrontEnd: time 0.0001196/0.01749, allocations: 43.94 kB / 324.1 MB, free: 52 kB / 254.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 248 (235) * Number of variables: 248 (242) Notification: Performance of Bindings: time 0.004818/0.02231, allocations: 5.298 MB / 329.4 MB, free: 10.58 MB / 270.1 MB Notification: Performance of FunctionAlias: time 0.0006622/0.02299, allocations: 0.5961 MB / 330 MB, free: 9.965 MB / 270.1 MB Notification: Performance of Early Inline: time 0.003529/0.02653, allocations: 3.84 MB / 333.9 MB, free: 6.086 MB / 270.1 MB Notification: Performance of simplify1: time 0.0002711/0.02681, allocations: 279.6 kB / 334.1 MB, free: 5.812 MB / 270.1 MB Notification: Performance of Alias: time 0.004517/0.03134, allocations: 4.321 MB / 338.5 MB, free: 1.066 MB / 270.1 MB Notification: Performance of simplify2: time 0.0002128/0.03156, allocations: 227.6 kB / 338.7 MB, free: 0.8438 MB / 270.1 MB Notification: Performance of Events: time 0.001134/0.0327, allocations: 0.947 MB / 339.6 MB, free: 15.93 MB / 286.1 MB Notification: Performance of Detect States: time 0.001064/0.03378, allocations: 1.21 MB / 340.8 MB, free: 14.7 MB / 286.1 MB Notification: Performance of Partitioning: time 0.001248/0.03504, allocations: 1.206 MB / 342 MB, free: 13.47 MB / 286.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency $SEV_41 could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) bearingFriction.table_signs = if bearingFriction.startForward then {1.0, 1.0} else if bearingFriction.startBackward then {-1.0, -1.0} else if $SEV_41 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_134) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (214/226) **************************** (1) [ALGB] (1) Real oneWayClutch.fn (2) [ALGB] (1) Real elastoBacklash.tau (3) [DISC] (1) Boolean $SEV_29 (4) [ALGB] (1) Real oneWayClutch.tau (5) [DISC] (1) Boolean $SEV_28 (6) [DISC] (1) Boolean $SEV_27 (7) [DISC] (1) Boolean $SEV_26 (8) [DISC] (1) Boolean $SEV_25 (9) [DISC] (1) Boolean $SEV_24 (10) [DER-] (1) Real $DER.oneWayClutch.phi_rel (11) [DISC] (1) Boolean $SEV_23 (12) [ALGB] (1) Real clutch.a_relfric (13) [ALGB] (1) Real clutch.tau (14) [ALGB] (1) Real lossyGear.sa (15) [DISC] (1) Boolean $SEV_22 (16) [ALGB] (2) protected Real[2] clutch.table_signs (17) [DISC] (1) Boolean $SEV_21 (18) [DISC] (1) Boolean $SEV_20 (19) [ALGB] (1) flow Real lossyGear.heatPort.Q_flow = -(-lossyGear.heatPort.Q_flow) (20) [DER-] (1) Real $DER.damper.phi_rel (21) [DER-] (1) Real $DER.inertia2.phi (22) [ALGB] (4) Real[1, 4] lossyGear.interpolation_result (23) [DER-] (1) Real $DER.clutch.w_rel (24) [DISC] (1) Boolean $TEV_1 (25) [DISC] (1) Boolean $TEV_0 (26) [ALGB] (1) Real lossyGear.phi_b (27) [DER-] (1) Real $DER.inertia4.phi (28) [DER-] (1) Real $DER.inertia6.w (29) [DISC] (1) Boolean $SEV_19 (30) [DISC] (1) Boolean $SEV_18 (31) [DISC] (1) Boolean brake.startForward (fixed = true, start = false) (32) [DISC] (1) Boolean $SEV_17 (33) [ALGB] (1) Real brake.sa (34) [DISC] (1) Boolean $SEV_16 (35) [ALGB] (1) Real bearingFriction.tau0_max (36) [DISC] (1) Integer bearingFriction.mode (fixed = true, start = 3, min = -1, max = 3) (37) [DISC] (1) Boolean $SEV_15 (38) [DISC] (1) Boolean $SEV_14 (39) [ALGB] (1) Real clutch.tau0_max (40) [ALGB] (1) Real lossyGear.quadrant1_p (41) [DISC] (1) Boolean $SEV_13 (42) [DISC] (1) Boolean $SEV_12 (43) [DISC] (1) Boolean $SEV_11 (44) [ALGB] (1) Real lossyGear.tau_bf1 (45) [DISC] (1) Boolean $SEV_10 (46) [ALGB] (1) Real lossyGear.tau_bf2 (47) [DER-] (1) Real $DER.inertia2.w (48) [DISC] (1) Boolean brake.free (49) [DISC] (1) Integer brake.mode (fixed = true, start = 3, min = -1, max = 3) (50) [ALGB] (1) Real damper.heatPort.T (start = 288.15, min = 0.0, nominal = 300.0) (51) [ALGB] (1) flow Real inertia6.flange_b.tau (52) [ALGB] (1) flow Real inertia1.flange_b.tau (53) [ALGB] (1) flow Real inertia3.flange_b.tau (54) [DISC] (1) Boolean bearingFriction.locked (start = false) (55) [DISC] (1) protected Boolean oneWayClutch.free (56) [ALGB] (1) Real inertia3.a (57) [ALGB] (1) Real elastoBacklash.a_rel (start = 0.0) (58) [ALGB] (1) flow Real springDamper.flange_a.tau (59) [DER-] (1) Real $DER.bearingFriction.w_relfric (60) [ALGB] (1) Real springDamper.a_rel (start = 0.0) (61) [ALGB] (1) Real spring3.tau (62) [DISC] (1) Boolean lossyGear.locked (start = false) (63) [ALGB] (1) Real bearingFriction.sa (64) [ALGB] (1) Real brake.a_relfric (65) [DER-] (1) Real $DER.inertia5.flange_b.phi (66) [ALGB] (1) Real brake.tau (67) [ALGB] (1) Real $FUN_9 (68) [DISC] (1) Integer $FUN_7 (69) [ALGB] (1) Real $FUN_6 (70) [DER-] (1) Real $DER.clutch.phi_rel (71) [ALGB] (1) Real $FUN_5 (72) [ALGB] (1) Real $FUN_4 (73) [ALGB] (1) Real $FUN_3 (74) [ALGB] (1) Real $FUN_2 (75) [ALGB] (1) Real $FUN_1 (76) [ALGB] (1) Real lossyGear.tauLoss (77) [DER-] (1) Real $DER.oneWayClutch.w_rel (78) [DER-] (1) Real $DER.damper.w_rel (79) [ALGB] (1) Real lossyGear.eta_mf1 (80) [ALGB] (1) Real lossyGear.eta_mf2 (81) [ALGB] (1) Real oneWayClutch.a_rel (start = 0.0) (82) [ALGB] (1) Real clutch.tau0 (83) [DER-] (1) Real $DER.inertia3.w (84) [ALGB] (1) Real lossyGear.quadrant1 (85) [ALGB] (1) flow Real convection.solid.Q_flow (86) [ALGB] (1) Real lossyGear.quadrant2 (87) [DER-] (1) Real $DER.lossyGear.w_a (88) [ALGB] (1) Real lossyGear.quadrant3 (89) [DISC] (1) Boolean lossyGear.startForward (start = false) (90) [ALGB] (1) Real lossyGear.quadrant4 (91) [ALGB] (1) Real lossyGear.quadrant4_m (92) [ALGB] (1) Real inertia2.a (93) [DISC] (1) Integer $FUN_19 (94) [ALGB] (1) Real $FUN_18 (95) [ALGB] (1) Real $FUN_17 (96) [ALGB] (1) Real $FUN_16 (97) [ALGB] (1) Real $FUN_15 (98) [ALGB] (1) Real $FUN_14 (99) [ALGB] (1) Real $FUN_13 (100) [ALGB] (1) Real spring3.phi_rel (start = 0.0) (101) [DISC] (1) Integer $FUN_12 (102) [ALGB] (1) Real $FUN_11 (103) [ALGB] (1) Real $FUN_10 (104) [ALGB] (1) Real inertia6.a (105) [DISC] (1) Boolean $SEV_9 (106) [DISC] (1) Boolean $SEV_8 (107) [DISC] (1) Boolean $SEV_7 (108) [DISC] (1) Boolean $SEV_6 (109) [DISC] (1) Boolean $SEV_5 (110) [DISC] (1) Boolean $SEV_4 (111) [DISC] (1) Boolean oneWayClutch.startForward (fixed = true, start = false) (112) [DISC] (1) Boolean $SEV_3 (113) [DER-] (1) Real $DER.inertia1.phi (114) [DISC] (1) Boolean $SEV_2 (115) [ALGB] (1) Real lossyGear.tau_bf_a (116) [DISC] (1) Boolean $SEV_1 (117) [DISC] (1) Boolean $SEV_0 (118) [ALGB] (1) Real lossyGear.tauLossMin_m (119) [DER-] (1) Real $DER.lossyGear.phi_a (120) [ALGB] (1) Real lossyGear.tauLossMax (121) [DISC] (4) Boolean[4] $SEV_36[i] (122) [ALGB] (1) Real lossyGear.tauLossMin (123) [ALGB] (1) Real lossyGear.flange_b.phi (124) [ALGB] (1) flow Real elastoBacklash.heatPort.Q_flow = -(-elastoBacklash.heatPort.Q_flow) (125) [DER-] (1) Real $DER.inertia3.phi (126) [ALGB] (1) Real clutch.fn (127) [ALGB] (1) Real lossyGear.tau_eta_m (128) [DISC] (1) Boolean bearingFriction.startForward (fixed = true, start = false) (129) [ALGB] (1) flow Real damper.heatPort.Q_flow = -(-damper.heatPort.Q_flow) (130) [DER-] (1) Real $DER.brake.phi (131) [DISC] (1) Boolean lossyGear.tau_aPos (start = true) (132) [DISC] (1) Integer lossyGear.mode (fixed = true, start = 2, min = -1, max = 3) (133) [ALGB] (1) protected Real oneWayClutch.sa (134) [ALGB] (1) Real sine.y (135) [ALGB] (1) flow Real bearingFriction.heatPort.Q_flow = -(-bearingFriction.heatPort.Q_flow) (136) [DISC] (1) Boolean $SEV_54 (137) [DISC] (1) Boolean $SEV_53 (138) [ALGB] (1) Real lossyGear.a_a (139) [ALGB] (1) Real bearingFriction.a_relfric (140) [DISC] (1) Boolean $SEV_52 (141) [DISC] (1) Boolean $SEV_51 (142) [DER-] (1) Real $DER.inertia4.w (143) [DISC] (1) Boolean $SEV_50 (144) [ALGB] (1) Real clutch.mu (145) [ALGB] (1) Real bearingFriction.tau0 (146) [DISC] (1) Boolean clutch.startBackward (fixed = true, start = false) (147) [DISC] (1) Boolean brake.startBackward (fixed = true, start = false) (148) [ALGB] (1) protected Real oneWayClutch.tau0 (149) [ALGB] (2) protected Real[2] bearingFriction.table_signs (150) [ALGB] (2) protected Real[2] brake.table_signs (151) [DISC] (1) Boolean clutch.locked (start = false) (152) [ALGB] (1) Real bearingFriction.tau (153) [ALGB] (1) Real inertia1.a (154) [ALGB] (1) Real lossyGear.quadrant3_m (155) [ALGB] (1) Real brake.tau0_max (156) [ALGB] (1) Real brake.tau0 (157) [ALGB] (1) flow Real clutch.heatPort.Q_flow = -(-clutch.heatPort.Q_flow) (158) [DISC] (1) Boolean clutch.startForward (fixed = true, start = false) (159) [DISC] (1) Boolean oneWayClutch.locked (start = false) (160) [DISC] (4) Boolean[4] $SEV_37[i] (161) [ALGB] (1) Real inertia5.a (162) [DISC] (1) Boolean lossyGear.ideal (163) [DISC] (1) Boolean $SEV_49 (164) [ALGB] (1) Real oneWayClutch.u (165) [DISC] (1) Boolean $SEV_48 (166) [DISC] (1) Boolean $SEV_47 (167) [DER-] (1) Real $DER.brake.flange_b.phi (168) [DISC] (1) Boolean $SEV_46 (169) [ALGB] (1) Real brake.fn (170) [DISC] (1) Boolean $SEV_45 (171) [DISC] (1) Boolean brake.locked (start = false) (172) [DISC] (1) Boolean $SEV_44 (173) [DISC] (1) Boolean $SEV_43 (174) [DISC] (1) Boolean $SEV_42 (175) [DISC] (1) Boolean $SEV_41 (176) [DISC] (1) Boolean $SEV_40 (177) [DER-] (1) Real $DER.bearingFriction.phi (178) [ALGB] (1) protected Real oneWayClutch.tau0_max (179) [ALGB] (1) flow Real springDamper.heatPort.Q_flow = -(-springDamper.heatPort.Q_flow) (180) [ALGB] (1) flow Real oneWayClutch.heatPort.Q_flow = -(-oneWayClutch.heatPort.Q_flow) (181) [DISC] (1) Boolean oneWayClutch.stuck (fixed = true, start = false) (182) [ALGB] (1) Real brake.mu (183) [DER-] (1) Real $DER.springDamper.phi_rel (184) [ALGB] (1) Real lossyGear.tauLossMax_p (185) [DISC] (1) Boolean lossyGear.startBackward (start = false) (186) [DER-] (1) Real $DER.brake.w_relfric (187) [ALGB] (1) Real lossyGear.tau_eta (188) [ALGB] (1) Real convection.dT (189) [DISC] (1) Boolean $SEV_39 (190) [ALGB] (1) protected Real elastoBacklash.tau_c (191) [DER-] (1) Real $DER.elastoBacklash.phi_diff (192) [DER-] (1) Real $DER.inertia5.w (193) [ALGB] (1) protected Real elastoBacklash.tau_d (194) [DISC] (1) Boolean $SEV_35 (195) [DISC] (1) Boolean $SEV_34 (196) [DISC] (1) Boolean $SEV_33 (197) [DISC] (1) Boolean $SEV_32 (198) [DISC] (1) Boolean $SEV_31 (199) [ALGB] (1) protected Real springDamper.tau_c (200) [DISC] (1) Boolean bearingFriction.startBackward (fixed = true, start = false) (201) [DISC] (1) Boolean $SEV_30 (202) [ALGB] (1) protected Real springDamper.tau_d (203) [DISC] (1) Integer clutch.mode (fixed = true, start = 3, min = -1, max = 3) (204) [ALGB] (1) Real lossyGear.quadrant2_p (205) [ALGB] (1) Real oneWayClutch.mu (206) [DISC] (1) Boolean clutch.free (207) [DER-] (1) Real $DER.inertia1.w (208) [ALGB] (1) flow Real damper.flange_b.tau (209) [DER-] (1) Real $DER.elastoBacklash.w_rel (210) [ALGB] (1) Real damper.a_rel (start = 0.0) (211) [ALGB] (1) flow Real brake.heatPort.Q_flow = -(-brake.heatPort.Q_flow) (212) [ALGB] (1) Real clutch.sa (213) [DER-] (1) Real $DER.springDamper.w_rel (214) [ALGB] (1) Real inertia4.a System Equations (207/226) **************************** (1) [SCAL] (1) lossyGear.tau_aPos = $SEV_32 ($RES_SIM_80) (2) [SCAL] (1) lossyGear.tau_eta = if lossyGear.ideal then -(lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) else if lossyGear.locked then -(lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) else if $SEV_28 then -(lossyGear.tau_bf_a + (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m)) else lossyGear.tau_bf_a - (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) ($RES_SIM_81) (3) [SCAL] (1) lossyGear.quadrant3 = -(lossyGear.tau_bf1 + (1.0 - lossyGear.eta_mf1) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m)) ($RES_SIM_82) (4) [SCAL] (1) lossyGear.quadrant4 = -(lossyGear.tau_bf2 + (1.0 - 1/lossyGear.eta_mf2) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m)) ($RES_SIM_83) (5) [SCAL] (1) lossyGear.quadrant2 = lossyGear.tau_bf2 - (1.0 - 1/lossyGear.eta_mf2) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) ($RES_SIM_84) (6) [SCAL] (1) spring3.phi_rel = inertia4.phi - inertia3.phi ($RES_SIM_124) (7) [SCAL] (1) lossyGear.quadrant1 = lossyGear.tau_bf1 - (1.0 - lossyGear.eta_mf1) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) ($RES_SIM_85) (8) [SCAL] (1) spring3.tau = spring3.c * (spring3.phi_rel - spring3.phi_rel0) ($RES_SIM_125) (9) [SCAL] (1) lossyGear.tauLossMin_m = if noEvent($SEV_33) then lossyGear.quadrant4_m else lossyGear.quadrant3_m ($RES_SIM_86) (10) [SCAL] (1) lossyGear.quadrant3_m = -(lossyGear.tau_bf1_0 + (1.0 - lossyGear.eta_mf1_0) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m)) ($RES_SIM_87) (11) [SCAL] (1) bearingFriction.mode = if $SEV_39 then 1 else if $SEV_40 then -1 else 0 ($RES_SIM_127) (12) [SCAL] (1) lossyGear.quadrant4_m = -(lossyGear.tau_bf2_0 + (1.0 - 1/lossyGear.eta_mf2_0) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m)) ($RES_SIM_88) (13) [SCAL] (1) bearingFriction.a_relfric = if bearingFriction.locked then 0.0 else if bearingFriction.startForward then bearingFriction.sa - bearingFriction.tau0_max else if bearingFriction.startBackward then bearingFriction.sa + bearingFriction.tau0_max else if $SEV_41 then bearingFriction.sa - bearingFriction.tau0_max else if $SEV_42 then bearingFriction.sa + bearingFriction.tau0_max else bearingFriction.sa - $FUN_7 * bearingFriction.tau0_max ($RES_SIM_128) (14) [SCAL] (1) lossyGear.tauLossMax_p = if noEvent($SEV_34) then lossyGear.quadrant1_p else lossyGear.quadrant2_p ($RES_SIM_89) (15) [SCAL] (1) bearingFriction.locked = not $SEV_43 ($RES_SIM_129) (16) [SCAL] (1) $SEV_8 = brake.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_290) (17) [SCAL] (1) $SEV_9 = brake.fn <= 0.0 ($RES_EVT_291) (18) [SCAL] (1) $SEV_10 = oneWayClutch.locked or oneWayClutch.w_rel <= 0.0 ($RES_EVT_292) (19) [SCAL] (1) $SEV_11 = oneWayClutch.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_293) (20) [SCAL] (1) $SEV_12 = oneWayClutch.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_294) (21) [SCAL] (1) brake.free = $SEV_9 ($RES_SIM_10) (22) [SCAL] (1) $SEV_13 = $PRE.oneWayClutch.stuck and not oneWayClutch.startForward ($RES_EVT_295) (23) [SCAL] (1) brake.tau0_max = brake.peak * brake.tau0 ($RES_SIM_11) (24) [SCAL] (1) $SEV_14 = $PRE.oneWayClutch.stuck and ((oneWayClutch.sa > oneWayClutch.tau0_max or $PRE.oneWayClutch.startForward and oneWayClutch.sa > oneWayClutch.tau0) or oneWayClutch.w_rel > oneWayClutch.w_small) or initial() and oneWayClutch.w_rel > 0.0 ($RES_EVT_296) (25) [SCAL] (1) brake.tau0 = brake.cgeo * brake.mu0 * brake.fn ($RES_SIM_12) (26) [SCAL] (1) $SEV_15 = oneWayClutch.u <= 0.0 ($RES_EVT_297) (27) [SCAL] (1) brake.fn = brake.fn_max * oneWayClutch.u ($RES_SIM_13) (28) [SCAL] (1) $SEV_16 = (($PRE.clutch.mode == 1 or $PRE.clutch.mode == 2) or clutch.startForward) and clutch.w_rel > 0.0 ($RES_EVT_298) (29) [SCAL] (1) -(brake.tau + inertia6.flange_b.tau) = 0.0 ($RES_SIM_14) (30) [SCAL] (1) $SEV_17 = (($PRE.clutch.mode == (-1) or $PRE.clutch.mode == 2) or clutch.startBackward) and clutch.w_rel < 0.0 ($RES_EVT_299) (31) [SCAL] (1) convection.solid.Q_flow + springDamper.heatPort.Q_flow + elastoBacklash.heatPort.Q_flow + bearingFriction.heatPort.Q_flow + lossyGear.heatPort.Q_flow + clutch.heatPort.Q_flow + oneWayClutch.heatPort.Q_flow + brake.heatPort.Q_flow + damper.heatPort.Q_flow = 0.0 ($RES_SIM_214) (32) [SCAL] (1) bearingFriction.startBackward = $SEV_44 ($RES_SIM_130) (33) [SCAL] (1) damper.flange_b.tau + springDamper.flange_a.tau + inertia1.flange_b.tau = 0.0 ($RES_SIM_215) (34) [SCAL] (1) lossyGear.quadrant2_p = lossyGear.tau_bf2_0 - (1.0 - 1/lossyGear.eta_mf2_0) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) ($RES_SIM_90) (35) [SCAL] (1) brake.a_relfric = $DER.brake.w_relfric ($RES_SIM_17) (36) [SCAL] (1) bearingFriction.startForward = $SEV_45 ($RES_SIM_131) (37) [SCAL] (1) lossyGear.quadrant1_p = lossyGear.tau_bf1_0 - (1.0 - lossyGear.eta_mf1_0) * (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) ($RES_SIM_91) (38) [SCAL] (1) brake.w_relfric = $DER.brake.phi ($RES_SIM_18) (39) [SCAL] (1) -bearingFriction.heatPort.Q_flow = bearingFriction.tau * bearingFriction.w_relfric ($RES_SIM_132) (40) [SCAL] (1) bearingFriction.tau = if bearingFriction.locked then bearingFriction.sa else bearingFriction.table_signs[2] * (if $SEV_46 then $FUN_4 else if $SEV_47 then $FUN_5 else $FUN_6) ($RES_SIM_133) (41) [SCAL] (1) lossyGear.a_a = $DER.lossyGear.w_a ($RES_SIM_94) (42) [ARRY] (2) bearingFriction.table_signs = if bearingFriction.startForward then {1.0, 1.0} else if bearingFriction.startBackward then {-1.0, -1.0} else if $SEV_41 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_134) (43) [SCAL] (1) lossyGear.w_a = $DER.lossyGear.phi_a ($RES_SIM_95) (44) [SCAL] (1) spring3.tau - (bearingFriction.tau + inertia3.flange_b.tau) = 0.0 ($RES_SIM_135) (45) [SCAL] (1) 0.0 = clutch.tau + lossyGear.ratio * (-(lossyGear.tauLoss + (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m))) ($RES_SIM_96) (46) [SCAL] (1) $FUN_1 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(bearingFriction.tableID, 1, 0.0) ($RES_$AUX_275) (47) [SCAL] (1) lossyGear.phi_a = lossyGear.ratio * lossyGear.phi_b ($RES_SIM_97) (48) [SCAL] (1) $FUN_2 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(bearingFriction.tableID, 1, 0.0) ($RES_$AUX_274) (49) [SCAL] (1) lossyGear.phi_b = lossyGear.flange_b.phi ($RES_SIM_98) (50) [SCAL] (1) bearingFriction.a_relfric = $DER.bearingFriction.w_relfric ($RES_SIM_138) (51) [SCAL] (1) $FUN_3 = Modelica.Blocks.Tables.Internal.getTable1DValue(bearingFriction.tableID, 1, 0.0) ($RES_$AUX_273) (52) [SCAL] (1) lossyGear.phi_a = inertia4.phi ($RES_SIM_99) (53) [SCAL] (1) bearingFriction.w_relfric = $DER.bearingFriction.phi ($RES_SIM_139) (54) [SCAL] (1) $FUN_4 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(bearingFriction.tableID, 1, bearingFriction.table_signs[1] * bearingFriction.w_relfric) ($RES_$AUX_272) (55) [SCAL] (1) $SEV_18 = $PRE.clutch.mode == 1 ($RES_EVT_300) (56) [SCAL] (1) $FUN_5 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(bearingFriction.tableID, 1, bearingFriction.table_signs[1] * bearingFriction.w_relfric) ($RES_$AUX_271) (57) [SCAL] (1) $SEV_19 = $PRE.clutch.mode == (-1) ($RES_EVT_301) (58) [SCAL] (1) $FUN_6 = Modelica.Blocks.Tables.Internal.getTable1DValue(bearingFriction.tableID, 1, bearingFriction.table_signs[1] * bearingFriction.w_relfric) ($RES_$AUX_270) (59) [SCAL] (1) $SEV_20 = not clutch.free and not ((($PRE.clutch.mode == 1 or clutch.startForward) or $PRE.clutch.mode == (-1)) or clutch.startBackward) ($RES_EVT_302) (60) [SCAL] (1) $SEV_21 = ($PRE.clutch.mode == 0 and (clutch.sa < (-clutch.tau0_max) or $PRE.clutch.startBackward and clutch.sa < (-clutch.tau0)) or $PRE.clutch.mode == 1 and clutch.w_rel < (-clutch.w_small)) or initial() and clutch.w_rel < 0.0 ($RES_EVT_303) (61) [SCAL] (1) $SEV_22 = ($PRE.clutch.mode == 0 and (clutch.sa > clutch.tau0_max or $PRE.clutch.startForward and clutch.sa > clutch.tau0) or $PRE.clutch.mode == (-1) and clutch.w_rel > clutch.w_small) or initial() and clutch.w_rel > 0.0 ($RES_EVT_304) (62) [SCAL] (1) $SEV_23 = clutch.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_305) (63) [SCAL] (1) $SEV_24 = clutch.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_306) (64) [SCAL] (1) $SEV_25 = clutch.fn <= 0.0 ($RES_EVT_307) (65) [SCAL] (1) $SEV_26 = ($PRE.lossyGear.mode == 1 or lossyGear.startForward) and lossyGear.w_a > 0.0 ($RES_EVT_308) (66) [SCAL] (1) $SEV_27 = ($PRE.lossyGear.mode == (-1) or lossyGear.startBackward) and lossyGear.w_a < 0.0 ($RES_EVT_309) (67) [SCAL] (1) brake.phi = brake.flange_b.phi ($RES_SIM_20) (68) [SCAL] (1) oneWayClutch.a_rel = $DER.oneWayClutch.w_rel ($RES_SIM_23) (69) [SCAL] (1) oneWayClutch.w_rel = $DER.oneWayClutch.phi_rel ($RES_SIM_24) (70) [SCAL] (1) oneWayClutch.phi_rel = brake.flange_b.phi - inertia5.flange_b.phi ($RES_SIM_25) (71) [SCAL] (1) -oneWayClutch.heatPort.Q_flow = if oneWayClutch.stuck then 0.0 else oneWayClutch.tau * oneWayClutch.w_rel ($RES_SIM_26) (72) [SCAL] (1) oneWayClutch.stuck = $SEV_10 ($RES_SIM_27) (73) [SCAL] (1) oneWayClutch.tau = if oneWayClutch.locked then oneWayClutch.sa else if oneWayClutch.free then 0.0 else oneWayClutch.cgeo * oneWayClutch.mu * oneWayClutch.fn ($RES_SIM_28) (74) [SCAL] (1) bearingFriction.phi = inertia3.phi ($RES_SIM_141) (75) [SCAL] (1) oneWayClutch.a_rel = if oneWayClutch.locked then 0.0 else oneWayClutch.sa - oneWayClutch.tau0 ($RES_SIM_29) (76) [SCAL] (1) $FUN_7 = sign(bearingFriction.w_relfric) ($RES_$AUX_269) (77) [SCAL] (1) bearingFriction.tau0_max = bearingFriction.peak * bearingFriction.tau0 ($RES_SIM_143) (78) [SCAL] (1) lossyGear.ideal = Modelica.Math.Matrices.isEqual(lossyGear.lossTable, {{0.0, 1.0, 1.0, 0.0, 0.0}}, 2.220446049250313e-16) ($RES_$AUX_268) (79) [SCAL] (1) bearingFriction.tau0 = if $SEV_46 then $FUN_1 else if $SEV_47 then $FUN_2 else $FUN_3 ($RES_SIM_144) (80) [SCAL] (1) $FUN_9 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(clutch.tableID, 1, clutch.table_signs[1] * clutch.w_rel) ($RES_$AUX_267) (81) [SCAL] (1) inertia3.J * inertia3.a = inertia3.flange_b.tau - elastoBacklash.tau ($RES_SIM_145) (82) [SCAL] (1) $FUN_10 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(clutch.tableID, 1, clutch.table_signs[1] * clutch.w_rel) ($RES_$AUX_266) (83) [SCAL] (1) inertia3.a = $DER.inertia3.w ($RES_SIM_146) (84) [SCAL] (1) $FUN_11 = Modelica.Blocks.Tables.Internal.getTable1DValue(clutch.tableID, 1, clutch.table_signs[1] * clutch.w_rel) ($RES_$AUX_265) (85) [SCAL] (1) inertia3.w = $DER.inertia3.phi ($RES_SIM_147) (86) [SCAL] (1) $FUN_12 = sign(clutch.w_rel) ($RES_$AUX_264) (87) [SCAL] (1) $FUN_13 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(oneWayClutch.tableID, 1, oneWayClutch.w_rel) ($RES_$AUX_263) (88) [SCAL] (1) $FUN_14 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(oneWayClutch.tableID, 1, oneWayClutch.w_rel) ($RES_$AUX_262) (89) [SCAL] (1) $SEV_28 = lossyGear.startForward or $PRE.lossyGear.mode == 1 ($RES_EVT_310) (90) [SCAL] (1) $FUN_15 = Modelica.Blocks.Tables.Internal.getTable1DValue(oneWayClutch.tableID, 1, oneWayClutch.w_rel) ($RES_$AUX_261) (91) [SCAL] (1) $SEV_29 = (((lossyGear.ideal or $PRE.lossyGear.mode == 1) or lossyGear.startForward) or $PRE.lossyGear.mode == (-1)) or lossyGear.startBackward ($RES_EVT_311) (92) [SCAL] (1) $FUN_16 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(brake.tableID, 1, brake.table_signs[1] * brake.w_relfric) ($RES_$AUX_260) (93) [SCAL] (1) $SEV_30 = $PRE.lossyGear.mode == 0 and lossyGear.sa < lossyGear.tauLossMin_m or initial() and lossyGear.w_a < 0.0 ($RES_EVT_312) (94) [SCAL] (1) $SEV_31 = $PRE.lossyGear.mode == 0 and lossyGear.sa > lossyGear.tauLossMax_p or initial() and lossyGear.w_a > 0.0 ($RES_EVT_313) (95) [SCAL] (1) $SEV_32 = lossyGear.tau_eta >= 0.0 ($RES_EVT_314) (96) [SCAL] (1) $SEV_33 = lossyGear.tau_eta_m > 0.0 ($RES_EVT_315) (97) [SCAL] (1) $SEV_34 = -(lossyGear.tau_bf_a_0 + (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m)) > 0.0 ($RES_EVT_316) (98) [SCAL] (1) $SEV_35 = abs((-1.0) + lossyGear.eta_mf1) <= 2.220446049250313e-16 and abs((-1.0) + lossyGear.eta_mf2) <= 2.220446049250313e-16 ($RES_EVT_317) (99) [FOR-] (4) ($RES_EVT_318) (99) [----] for i in 1:4 loop (99) [----] [SCAL] (1) $SEV_36[i] = lossyGear.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_319) (99) [----] end for; (100) [SCAL] (1) oneWayClutch.mu = if $SEV_11 then $FUN_13 else if $SEV_12 then $FUN_14 else $FUN_15 ($RES_SIM_30) (101) [SCAL] (1) oneWayClutch.locked = $SEV_13 ($RES_SIM_31) (102) [SCAL] (1) oneWayClutch.startForward = $SEV_14 ($RES_SIM_32) (103) [SCAL] (1) oneWayClutch.tau0_max = if oneWayClutch.free then oneWayClutch.tau0_max_low else oneWayClutch.peak2 * oneWayClutch.tau0 ($RES_SIM_33) (104) [SCAL] (1) oneWayClutch.tau0 = oneWayClutch.cgeo * oneWayClutch.mu0 * oneWayClutch.fn ($RES_SIM_34) (105) [SCAL] (1) oneWayClutch.fn = if oneWayClutch.free then 0.0 else oneWayClutch.fn_max * oneWayClutch.u ($RES_SIM_35) (106) [SCAL] (1) oneWayClutch.free = $SEV_15 ($RES_SIM_36) (107) [SCAL] (1) inertia6.J * inertia6.a = inertia6.flange_b.tau - oneWayClutch.tau ($RES_SIM_38) (108) [SCAL] (1) inertia6.a = $DER.inertia6.w ($RES_SIM_39) (109) [SCAL] (1) elastoBacklash.a_rel = $DER.elastoBacklash.w_rel ($RES_SIM_152) (110) [SCAL] (1) $FUN_17 = Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(brake.tableID, 1, brake.table_signs[1] * brake.w_relfric) ($RES_$AUX_259) (111) [SCAL] (1) elastoBacklash.w_rel = $DER.elastoBacklash.phi_diff ($RES_SIM_153) (112) [SCAL] (1) $FUN_18 = Modelica.Blocks.Tables.Internal.getTable1DValue(brake.tableID, 1, brake.table_signs[1] * brake.w_relfric) ($RES_$AUX_258) (113) [SCAL] (1) -(-(elastoBacklash.phi_diff + elastoBacklash.phi_rel0)) = inertia3.phi - inertia2.phi ($RES_SIM_154) (114) [SCAL] (1) $FUN_19 = sign(brake.w_relfric) ($RES_$AUX_257) (115) [-IF-] (4)if initial() then (115) [----] [SCAL] (1) -elastoBacklash.heatPort.Q_flow = elastoBacklash.tau_d * elastoBacklash.w_rel ($RES_SIM_156) (115) [----] [SCAL] (1) elastoBacklash.tau = elastoBacklash.tau_c + elastoBacklash.tau_d ($RES_SIM_157) (115) [----] [SCAL] (1) elastoBacklash.tau_d = elastoBacklash.d * elastoBacklash.w_rel ($RES_SIM_158) (115) [----] [SCAL] (1) elastoBacklash.tau_c = if $SEV_48 then elastoBacklash.c * (elastoBacklash.phi_diff - elastoBacklash.bMax) else if $SEV_49 then elastoBacklash.c * (elastoBacklash.phi_diff - elastoBacklash.bMin) else (elastoBacklash.c / 3.0) * elastoBacklash.phi_diff ($RES_SIM_159) (115) [----] else (115) [----] [SCAL] (1) -elastoBacklash.heatPort.Q_flow = if $SEV_50 then elastoBacklash.tau_d * elastoBacklash.w_rel else if $SEV_51 then smooth(0, noEvent(if $SEV_52 then 0.0 else min(elastoBacklash.tau_c, elastoBacklash.tau_d) * elastoBacklash.w_rel)) else if $SEV_53 then smooth(0, noEvent(if $SEV_54 then 0.0 else max(elastoBacklash.tau_c, elastoBacklash.tau_d) * elastoBacklash.w_rel)) else 0.0 ($RES_SIM_160) (115) [----] [SCAL] (1) elastoBacklash.tau = if $SEV_50 then elastoBacklash.tau_c + elastoBacklash.tau_d else if $SEV_51 then smooth(0, noEvent(if $SEV_52 then 0.0 else elastoBacklash.tau_c + min(elastoBacklash.tau_c, elastoBacklash.tau_d))) else if $SEV_53 then smooth(0, noEvent(if $SEV_54 then 0.0 else elastoBacklash.tau_c + max(elastoBacklash.tau_c, elastoBacklash.tau_d))) else 0.0 ($RES_SIM_161) (115) [----] [SCAL] (1) elastoBacklash.tau_d = elastoBacklash.d * elastoBacklash.w_rel ($RES_SIM_162) (115) [----] [SCAL] (1) elastoBacklash.tau_c = if $SEV_50 then elastoBacklash.c * elastoBacklash.phi_diff else if $SEV_51 then elastoBacklash.c * (elastoBacklash.phi_diff - elastoBacklash.bMax) else if $SEV_53 then elastoBacklash.c * (elastoBacklash.phi_diff - elastoBacklash.bMin) else 0.0 ($RES_SIM_163) (115) [----] end if; (116) [FOR-] (4) ($RES_EVT_320) (116) [----] for i in 1:4 loop (116) [----] [SCAL] (1) $SEV_37[i] = lossyGear.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_321) (116) [----] end for; (117) [SCAL] (1) $SEV_39 = (($PRE.bearingFriction.mode == 1 or $PRE.bearingFriction.mode == 2) or bearingFriction.startForward) and bearingFriction.w_relfric > 0.0 ($RES_EVT_323) (118) [SCAL] (1) $SEV_40 = (($PRE.bearingFriction.mode == (-1) or $PRE.bearingFriction.mode == 2) or bearingFriction.startBackward) and bearingFriction.w_relfric < 0.0 ($RES_EVT_324) (119) [SCAL] (1) $SEV_41 = $PRE.bearingFriction.mode == 1 ($RES_EVT_325) (120) [SCAL] (1) $SEV_42 = $PRE.bearingFriction.mode == (-1) ($RES_EVT_326) (121) [SCAL] (1) $SEV_43 = (($PRE.bearingFriction.mode == 1 or bearingFriction.startForward) or $PRE.bearingFriction.mode == (-1)) or bearingFriction.startBackward ($RES_EVT_327) (122) [SCAL] (1) $SEV_44 = ($PRE.bearingFriction.mode == 0 and (bearingFriction.sa < (-bearingFriction.tau0_max) or $PRE.bearingFriction.startBackward and bearingFriction.sa < (-bearingFriction.tau0)) or $PRE.bearingFriction.mode == 1 and bearingFriction.w_relfric < (-bearingFriction.w_small)) or initial() and bearingFriction.w_relfric < 0.0 ($RES_EVT_328) (123) [SCAL] (1) $SEV_45 = ($PRE.bearingFriction.mode == 0 and (bearingFriction.sa > bearingFriction.tau0_max or $PRE.bearingFriction.startForward and bearingFriction.sa > bearingFriction.tau0) or $PRE.bearingFriction.mode == (-1) and bearingFriction.w_relfric > bearingFriction.w_small) or initial() and bearingFriction.w_relfric > 0.0 ($RES_EVT_329) (124) [SCAL] (1) inertia6.w = $DER.brake.flange_b.phi ($RES_SIM_40) (125) [SCAL] (1) oneWayClutch.u = sine2.offset + (if $TEV_0 then 0.0 else sine2.amplitude * sin(sine2.phase + 6.283185307179586 * (time - sine2.startTime) * sine2.f)) ($RES_SIM_43) (126) [SCAL] (1) inertia5.J * inertia5.a = oneWayClutch.tau - clutch.tau ($RES_SIM_44) (127) [SCAL] (1) inertia5.a = $DER.inertia5.w ($RES_SIM_45) (128) [SCAL] (1) inertia5.w = $DER.inertia5.flange_b.phi ($RES_SIM_46) (129) [SCAL] (1) inertia2.J * inertia2.a = springDamper.flange_a.tau + elastoBacklash.tau ($RES_SIM_164) (130) [SCAL] (1) inertia2.a = $DER.inertia2.w ($RES_SIM_165) (131) [SCAL] (1) inertia2.w = $DER.inertia2.phi ($RES_SIM_166) (132) [SCAL] (1) $SEV_46 = bearingFriction.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_330) (133) [SCAL] (1) $SEV_47 = bearingFriction.smoothness == Modelica.Blocks.Types.Smoothness.LinearSegments ($RES_EVT_331) (134) [SCAL] (1) $SEV_48 = elastoBacklash.phi_diff > 1.5 * elastoBacklash.bMax ($RES_EVT_332) (135) [SCAL] (1) $SEV_49 = elastoBacklash.phi_diff < 1.5 * elastoBacklash.bMin ($RES_EVT_333) (136) [SCAL] (1) $SEV_50 = abs(elastoBacklash.b) <= 1e-10 ($RES_EVT_334) (137) [SCAL] (1) $SEV_51 = elastoBacklash.phi_diff > elastoBacklash.bMax ($RES_EVT_335) (138) [SCAL] (1) $SEV_52 = elastoBacklash.tau_c + elastoBacklash.tau_d <= 0.0 ($RES_EVT_336) (139) [SCAL] (1) $SEV_53 = elastoBacklash.phi_diff < elastoBacklash.bMin ($RES_EVT_337) (140) [SCAL] (1) $SEV_54 = elastoBacklash.tau_c + elastoBacklash.tau_d >= 0.0 ($RES_EVT_338) (141) [SCAL] (1) clutch.a_relfric = $DER.clutch.w_rel ($RES_SIM_51) (142) [SCAL] (1) clutch.w_rel = $DER.clutch.phi_rel ($RES_SIM_52) (143) [SCAL] (1) clutch.phi_rel = inertia5.flange_b.phi - lossyGear.flange_b.phi ($RES_SIM_53) (144) [ARRY] (2) brake.table_signs = if brake.startForward then {1.0, 1.0} else if brake.startBackward then {-1.0, -1.0} else if $SEV_2 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_9) (145) [SCAL] (1) clutch.mode = if clutch.free then 2 else if $SEV_16 then 1 else if $SEV_17 then -1 else 0 ($RES_SIM_54) (146) [SCAL] (1) brake.mu = brake.table_signs[2] * (if $SEV_7 then $FUN_16 else if $SEV_8 then $FUN_17 else $FUN_18) ($RES_SIM_8) (147) [SCAL] (1) clutch.a_relfric = if clutch.locked then 0.0 else if clutch.free then clutch.sa else if clutch.startForward then clutch.sa - clutch.tau0_max else if clutch.startBackward then clutch.sa + clutch.tau0_max else if $SEV_18 then clutch.sa - clutch.tau0_max else if $SEV_19 then clutch.sa + clutch.tau0_max else clutch.sa - $FUN_12 * clutch.tau0_max ($RES_SIM_55) (148) [SCAL] (1) brake.tau = if brake.locked then brake.sa else if brake.free then 0.0 else brake.cgeo * brake.mu * brake.fn ($RES_SIM_7) (149) [SCAL] (1) clutch.locked = $SEV_20 ($RES_SIM_56) (150) [SCAL] (1) -brake.heatPort.Q_flow = brake.tau * brake.w_relfric ($RES_SIM_6) (151) [SCAL] (1) clutch.startBackward = $SEV_21 ($RES_SIM_57) (152) [SCAL] (1) brake.startForward = $SEV_6 ($RES_SIM_5) (153) [SCAL] (1) clutch.startForward = $SEV_22 ($RES_SIM_58) (154) [SCAL] (1) springDamper.a_rel = $DER.springDamper.w_rel ($RES_SIM_171) (155) [SCAL] (1) -clutch.heatPort.Q_flow = clutch.tau * clutch.w_rel ($RES_SIM_59) (156) [SCAL] (1) springDamper.w_rel = $DER.springDamper.phi_rel ($RES_SIM_172) (157) [SCAL] (1) brake.startBackward = $SEV_5 ($RES_SIM_4) (158) [SCAL] (1) springDamper.phi_rel = inertia2.phi - inertia1.phi ($RES_SIM_173) (159) [SCAL] (1) brake.locked = $SEV_4 ($RES_SIM_3) (160) [SCAL] (1) -springDamper.heatPort.Q_flow = springDamper.tau_d * springDamper.w_rel ($RES_SIM_174) (161) [SCAL] (1) brake.a_relfric = if brake.locked then 0.0 else if brake.free then brake.sa else if brake.startForward then brake.sa - brake.tau0_max else if brake.startBackward then brake.sa + brake.tau0_max else if $SEV_2 then brake.sa - brake.tau0_max else if $SEV_3 then brake.sa + brake.tau0_max else brake.sa - $FUN_19 * brake.tau0_max ($RES_SIM_2) (162) [SCAL] (1) -springDamper.flange_a.tau = springDamper.tau_c + springDamper.tau_d ($RES_SIM_175) (163) [SCAL] (1) brake.mode = if brake.free then 2 else if $SEV_0 then 1 else if $SEV_1 then -1 else 0 ($RES_SIM_1) (164) [SCAL] (1) springDamper.tau_d = springDamper.d * springDamper.w_rel ($RES_SIM_176) (165) [SCAL] (1) springDamper.tau_c = springDamper.c * (springDamper.phi_rel - springDamper.phi_rel0) ($RES_SIM_177) (166) [SCAL] (1) clutch.tau = if clutch.locked then clutch.sa else if clutch.free then 0.0 else clutch.cgeo * clutch.mu * clutch.fn ($RES_SIM_60) (167) [-IF-] (1)if $SEV_35 then (167) [----] [SCAL] (1) lossyGear.tau_bf_a = lossyGear.tau_bf1 / 2.0 ($RES_SIM_101) (167) [----] else (167) [----] [SCAL] (1) lossyGear.tau_bf_a = (lossyGear.tau_bf1 - lossyGear.tau_bf2) / (lossyGear.eta_mf1 - 1.0 / lossyGear.eta_mf2) ($RES_SIM_102) (167) [----] end if; (168) [SCAL] (1) clutch.mu = clutch.table_signs[2] * (if $SEV_23 then $FUN_9 else if $SEV_24 then $FUN_10 else $FUN_11) ($RES_SIM_61) (169) [ARRY] (2) clutch.table_signs = if clutch.startForward then {1.0, 1.0} else if clutch.startBackward then {1.0, -1.0} else if $SEV_18 then {1.0, 1.0} else {-1.0, -1.0} ($RES_SIM_62) (170) [SCAL] (1) clutch.tau0_max = clutch.peak * clutch.tau0 ($RES_SIM_63) (171) [-IF-] (8)if lossyGear.ideal then (171) [----] [SCAL] (1) lossyGear.tau_bf2 = 0.0 ($RES_SIM_104) (171) [----] [SCAL] (1) lossyGear.tau_bf1 = 0.0 ($RES_SIM_105) (171) [----] [SCAL] (1) lossyGear.eta_mf2 = 1.0 ($RES_SIM_106) (171) [----] [SCAL] (1) lossyGear.eta_mf1 = 1.0 ($RES_SIM_107) (171) [----] [ARRY] (4) lossyGear.interpolation_result = {{1.0, 1.0, 0.0, 0.0}} ($RES_SIM_108) (171) [----] else (171) [----] [SCAL] (1) lossyGear.tau_bf2 = noEvent(abs(lossyGear.interpolation_result[1, 4])) ($RES_SIM_109) (171) [----] [SCAL] (1) lossyGear.tau_bf1 = noEvent(abs(lossyGear.interpolation_result[1, 3])) ($RES_SIM_110) (171) [----] [SCAL] (1) lossyGear.eta_mf2 = lossyGear.interpolation_result[1, 2] ($RES_SIM_111) (171) [----] [SCAL] (1) lossyGear.eta_mf1 = lossyGear.interpolation_result[1, 1] ($RES_SIM_112) (171) [----] [FOR-] (4) ($RES_SIM_113) (171) [----] [----] for i in 1:4 loop (171) [----] [----] [SCAL] (1) lossyGear.interpolation_result[1, i] = if $SEV_36[i] then Modelica.Blocks.Tables.Internal.getTable1DValueNoDer(lossyGear.tableID, i, noEvent(abs(lossyGear.w_a))) else if $SEV_37[i] then Modelica.Blocks.Tables.Internal.getTable1DValueNoDer2(lossyGear.tableID, i, noEvent(abs(lossyGear.w_a))) else Modelica.Blocks.Tables.Internal.getTable1DValue(lossyGear.tableID, i, noEvent(abs(lossyGear.w_a))) ($RES_SIM_114) (171) [----] [----] end for; (171) [----] end if; (172) [SCAL] (1) clutch.tau0 = clutch.cgeo * clutch.mu0 * clutch.fn ($RES_SIM_64) (173) [SCAL] (1) clutch.free = $SEV_25 ($RES_SIM_65) (174) [SCAL] (1) clutch.fn = clutch.fn_max * oneWayClutch.u ($RES_SIM_66) (175) [SCAL] (1) convection.solid.Q_flow = const.k * convection.dT ($RES_SIM_180) (176) [SCAL] (1) convection.dT = damper.heatPort.T - (273.15 + TAmbient.T) ($RES_SIM_183) (177) [SCAL] (1) damper.a_rel = $DER.damper.w_rel ($RES_SIM_187) (178) [SCAL] (1) damper.w_rel = $DER.damper.phi_rel ($RES_SIM_188) (179) [SCAL] (1) damper.phi_rel = inertia1.phi - fixed.phi0 ($RES_SIM_189) (180) [SCAL] (1) -lossyGear.heatPort.Q_flow = lossyGear.tauLoss * lossyGear.w_a ($RES_SIM_70) (181) [SCAL] (1) lossyGear.mode = if lossyGear.ideal then 2 else if $SEV_26 then 1 else if $SEV_27 then -1 else 0 ($RES_SIM_71) (182) [SCAL] (1) lossyGear.a_a = if lossyGear.locked then 0.0 else lossyGear.sa - lossyGear.tauLoss ($RES_SIM_72) (183) [SCAL] (1) lossyGear.tauLoss = if lossyGear.ideal then 0.0 else if lossyGear.locked then lossyGear.sa else if $SEV_28 then lossyGear.tauLossMax else lossyGear.tauLossMin ($RES_SIM_73) (184) [SCAL] (1) lossyGear.locked = not $SEV_29 ($RES_SIM_74) (185) [SCAL] (1) lossyGear.startBackward = $SEV_30 ($RES_SIM_75) (186) [SCAL] (1) lossyGear.startForward = $SEV_31 ($RES_SIM_76) (187) [SCAL] (1) lossyGear.tauLossMin = if lossyGear.tau_aPos then lossyGear.quadrant4 else lossyGear.quadrant3 ($RES_SIM_77) (188) [SCAL] (1) -damper.heatPort.Q_flow = damper.flange_b.tau * damper.w_rel ($RES_SIM_190) (189) [SCAL] (1) inertia4.J * inertia4.a = (lossyGear.tau_bf_a_0 - lossyGear.tau_eta_m) - spring3.tau ($RES_SIM_117) (190) [SCAL] (1) lossyGear.tauLossMax = if lossyGear.tau_aPos then lossyGear.quadrant1 else lossyGear.quadrant2 ($RES_SIM_78) (191) [SCAL] (1) damper.flange_b.tau = damper.d * damper.w_rel ($RES_SIM_191) (192) [SCAL] (1) inertia4.a = $DER.inertia4.w ($RES_SIM_118) (193) [SCAL] (1) inertia1.J * inertia1.a = sine.y + inertia1.flange_b.tau ($RES_SIM_192) (194) [SCAL] (1) inertia4.w = $DER.inertia4.phi ($RES_SIM_119) (195) [SCAL] (1) inertia1.a = $DER.inertia1.w ($RES_SIM_193) (196) [SCAL] (1) inertia1.w = $DER.inertia1.phi ($RES_SIM_194) (197) [SCAL] (1) sine.y = sine.offset + (if $TEV_1 then 0.0 else sine.amplitude * sin(sine.phase + 6.283185307179586 * (time - sine.startTime) * sine.f)) ($RES_SIM_199) (198) [SCAL] (1) $TEV_0 = time < sine2.startTime ($RES_EVT_280) (199) [SCAL] (1) $TEV_1 = time < sine.startTime ($RES_EVT_281) (200) [SCAL] (1) $SEV_0 = (($PRE.brake.mode == 1 or $PRE.brake.mode == 2) or brake.startForward) and brake.w_relfric > 0.0 ($RES_EVT_282) (201) [SCAL] (1) $SEV_1 = (($PRE.brake.mode == (-1) or $PRE.brake.mode == 2) or brake.startBackward) and brake.w_relfric < 0.0 ($RES_EVT_283) (202) [SCAL] (1) $SEV_2 = $PRE.brake.mode == 1 ($RES_EVT_284) (203) [SCAL] (1) $SEV_3 = $PRE.brake.mode == (-1) ($RES_EVT_285) (204) [SCAL] (1) $SEV_4 = not brake.free and not ((($PRE.brake.mode == 1 or brake.startForward) or $PRE.brake.mode == (-1)) or brake.startBackward) ($RES_EVT_286) (205) [SCAL] (1) $SEV_5 = ($PRE.brake.mode == 0 and (brake.sa < (-brake.tau0_max) or $PRE.brake.startBackward and brake.sa < (-brake.tau0)) or $PRE.brake.mode == 1 and brake.w_relfric < (-brake.w_small)) or initial() and brake.w_relfric < 0.0 ($RES_EVT_287) (206) [SCAL] (1) $SEV_6 = ($PRE.brake.mode == 0 and (brake.sa > brake.tau0_max or $PRE.brake.startForward and brake.sa > brake.tau0) or $PRE.brake.mode == (-1) and brake.w_relfric > brake.w_small) or initial() and brake.w_relfric > 0.0 ($RES_EVT_288) (207) [SCAL] (1) $SEV_7 = brake.smoothness == Modelica.Blocks.Types.Smoothness.ConstantSegments ($RES_EVT_289)