Your SlideShare is downloading. ×
Maple Calculations L-2-demo
Maple Calculations L-2-demo
Maple Calculations L-2-demo
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Maple Calculations L-2-demo

497

Published on

Maple Calculations Mathematics Module 2 of the course IO2081 Modelling for Industrial Design of the TU Delft.

Maple Calculations Mathematics Module 2 of the course IO2081 Modelling for Industrial Design of the TU Delft.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
497
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. > restart : with plots : with DEtools : LECTURE 2 FOR MODELING Mass - spring - damper-system under influence of external forces: differential equation 1: Mass - spring Construction of the DEQ from Newton: > DEQ1 d m$diff x t , t, t =K t ; k$x k is the spring rate and m the mass. Solution by Maple: (General solution) > dsolve DEQ1, x t ; We select some initial conditions > incs1 d x 0 = 0, D x 0 = 1; We solve this "initial" problem: > H1 d dsolve DEQ1, incs1 , x t ; This is formula with which we can define a function: > SOL1 d unapply rhs H1 , t, m, k ; Remark: We call m, and k parameters of the motion (input). With this form you can do further exploration, for instance: > fsolve SOL1 t, 5, 1 = 1, t = 0 ..20 ; > plot SOL1 t, 5, 1 , t = 0 ..20 ; A harmonic oscillation. differential equation 2: Mass - spring -damper. To the above system we add a linear demper with damping constant cd. Construction of the DEQ from Newton: > DEQ2 d m$diff x t , t, t =K t Kcd$diff x t , t ; k$x Solution by Maple: (General solution): > dsolve DEQ2, x t ; We select some initial conditions: > incs2 d x 0 = 0, D x 0 = 2; We solve this "initial" problem: > H2 d dsolve DEQ2, incs2 , x t ; This is formula with which we can define a function: > SOL2 d unapply rhs H2 , t, m, k, cd ; Remark: We call m, k, cd parameters of the motion (input). With this form you can do further exploration, for instance: > with plots : Picture1 d plot SOL2 t, 5, 1, 0 , t = 0 ..20, color = black : Picture2 d plot SOL2 t, 5, 1, 0.5 , t = 0 ..20, color = blue :
  • 2. Picture3 d plot SOL2 t, 5, 1, sqrt 20.0001 , t = 0 ..20, color = green : Picture4 d plot SOL2 t, 5, 1, 10 , t = 0 ..20, color = yellow : display Picture1, Picture2, Picture3, Picture4 ; differential equation 3: Mass, spring, dampersysteem under influence of external forces: On the above system two external forces are acting, a pulse and and a constant mechanical friction force. A Maple input for a pulse: (the Heaviside function) > PULSE d t/1$ Heaviside t K1 KHeaviside t K5 > PULSE t ; > plot PULSE t , t =K ..10 ; 5 > A d diff PULSE t , t ; > plot A, t ; > int A, t ; ; An application > DEQ1 d m$diff x t , t, t Ck$x t = PULSE t ; > incs d x 0 = 0, D x 0 = 0; > H d dsolve DEQ1, incs , x t ; > VERPLAATSING d unapply rhs H , k, m, t ; > plot VERPLAATSING 1, 1, t , t = 0 ..10 ; A constant mechanical friction force:(the maple commando piecewise) > p d x/piecewise x ! 0, K 0 ! x, x ; x, > p x ; > q d x/piecewise x ! 0, x, 0 ! x, sin x ; > plot q x , x =K ..2 ; 2 With maple commando piecewise we can construct a mechanical dragforce with magnitude 1 and acting opposite to the direction of the movement > MF d t/piecewise diff x t , t O 0,K diff x t , t ! 0, 1 ; 1, > MF t ; > x d t/sin t ; > plot MF t , t =K 2$Pi ..2$Pi ; Differential equation 3: A mass, spring, damper systeem under influence of pulse and a mechanical friction force, solved numerically: > restart : with plots : with DEtools : > PULSE d t/1$ Heaviside t K1 KHeaviside t K5 ; MF d t /piecewise diff x t , t O 0,K diff x t , t ! 0, 1 ; 1, > DEQ3 d m$diff x t , t, t Ccd$diff x t , t Ck$x t = A$PULSE t CB$ MF t ;
  • 3. In the differential equation above we have normal parameters m, cd , k and two new one's A, which is the magnitude of the pulse, and B which is of the mechanical drag force. Question: Why is this this differential equation not solvable by hand (analytical)? Because of this we have to deal numeric solvers, whiich only can operate on numbers, so in advance we have to give values for m. cdf ..etc. > m d 1; cd d 0.1; k d 1; A d 2; B d 0.1; > DEQ3; We also have to give initial conditions in advance: (why will explained in nearby future) > incs3 d x 0 = 0, D x 0 = 0; > NUMSOL d dsolve DEQ3, incs3 , type = numeric, output = listprocedure ; In this case the output of the Maple command consistis of three parts of which the right handsides are in succession values of t, x t and diff x t , t . Look at next Maple commands for exploration: > NUMSOL 1 2 ; > NUMSOL 2 10 ; > NUMSOL 3 10 ; > plot rhs NUMSOL 2 t , t = 0 ..20 ;

×