Changes between Initial Version and Version 1 of Ticket #1715
- Timestamp:
- 2012-10-02T11:05:56Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1715
- Property Cc added
-
Ticket #1715 – Description
initial v1 2 2 3 3 In Dymola I couln't get it to simulate using instantatnious gear shifts because of issues with signals without well defined derivative. As workaround I added a first order system for the speed equation, as follows: 4 {{{model IdealGearBox 4 {{{ 5 model IdealGearBox 5 6 extends 6 7 Modelica.Mechanics.Rotational.Interfaces.PartialElementaryTwoFlangesAndSupport2; … … 22 23 phi_b = flange_b.phi - phi_support; 23 24 0 = gearRatio*flange_a.tau + flange_b.tau; 24 end IdealGearBox;}}} 25 26 27 25 end IdealGearBox; 26 }}} 28 27 29 28 When simulatig a simple vehicle with this gearbox solution i get the following: 30 29 31 {{{"Following Error has occurred. 30 {{{ 31 "Following Error has occurred. 32 32 Unknown error throw | [line] 42 | [file] util/division.c 33 | division by zero"}}} 33 | division by zero" 34 }}} 34 35 35 36 Running the executable manually gives: 36 {{{ warning | division by zero in partial equation: $DER.simplevehicle1.clutchAndGearbox.gearboxAndFinalDrive.phi_a / simplevehicle1.chassis.Wheel.w because simplevehicle1.chassis.Wheel.w == 0 37 {{{ 38 warning | division by zero in partial equation: $DER.simplevehicle1.clutchAndGearbox.gearboxAndFinalDrive.phi_a / simplevehicle1.chassis.Wheel.w because simplevehicle1.chassis.Wheel.w == 0 37 39 | [line] 1102 | [file] TestModel.c 38 40 throw | [line] 42 | [file] util/division.c 39 | division by zero}}} 40 41 If I remove 42 {{{der(gearRatio) = ((if Gear == 0 then 1 else ratios[Gear]) - gearRatio)/Tg;}}} 43 44 and replace with 45 {{{gearRatio = (if Gear == 0 then 1 else ratios[Gear]);}}} 46 47 everyting is running smoothly but in my opinion this shouln't happen. 41 | division by zero 42 }}} 43 44 If I remove `der(gearRatio) = ((if Gear == 0 then 1 else ratios[Gear]) - gearRatio)/Tg;` and replace with `gearRatio = (if Gear == 0 then 1 else ratios[Gear]);` everything is running smoothly but in my opinion this shouln't happen. 48 45 49 46 … … 52 49 53 50 54 {{{function Modelica.Math.tempInterpol1 "Temporary function for linear interpolation (will be removed)" 51 {{{ 52 function Modelica.Math.tempInterpol1 "Temporary function for linear interpolation (will be removed)" 55 53 56 54 input Real u "input value (first column of table)"; … … 119 117 }}} 120 118 121 {{{class TestModel 119 {{{ 120 class TestModel 122 121 123 122 input Real simplevehicle1.ThrottlePedal; … … 793 792 Throttle.y = simplevehicle1.ThrottlePedal; 794 793 795 end TestModel;}}} 794 end TestModel; 795 }}}