point point1 = point( 0[ m ], 0.5[ m ], 0.0000e+000 [ m ] ); point point2 = point( 0 [ m ], 0 [ m ], 0 [ m ] ); solid solid1 = cylinder( point1, point2, 0.2[ m ], mass = 10 [ kg ] ); color Green = RGB( 34, 106, 34 ); body Цилиндр = body( color = Green ); point point3 = point( 0 [ m ], 0.25 [ m ], 0.0000e+000 [ m ], visible = hide: ); body Неподвижная_точка = body( color = RGB( 255, 153, 153 ) ); condition V0 = transVelocity( Неподвижная_точка, reverse( projectY ), Цилиндр, point3, 3 [ m/ s ] ); scalar b = 5 [N/s]; scalar mu = 1 [N s/m]; function F(t [s])=b * #t; function R(v [m/s])=mu * #v; sensor Скорость = velocity( point1 ); force Сила_R = force( Цилиндр, point3, projectY, R, list( Скорость ) ); force Сила_F = force( Цилиндр, point3, reverse( projectY ), F, list( time ) ); event Событие = reformsBySensor( list( stop( ) ), time, 2 [ s ], ratio = single:, gauge = list( Скорость ) ); sensor Теоретический_ответ = (3[ m/s ]+10[ kg] *b/mu/mu)*exp(-1*mu*time/10[ kg ])+b/mu*(time-10[ kg ]/mu); sensor Погрешность = abs((Теоретический_ответ-Скорость)/Теоретический_ответ); /\/////////////////////////////////////////////////////////////////////////////////// /\ Прикрепление объектов body Цилиндр < (solid1, point1, point2 ); body Неподвижная_точка < (point3 ); /\/////////////////////////////////////////////////////////////////////////////////// /\ Инерциальное звено; set ground = Неподвижная_точка; /\/////////////////////////////////////////////////////////////////////////////////// /\ Единицы измерения; set units = SI;