106
3 Computer Simulation of Dynamic Systems
Fig. 3.11 WSM program code written in Modelica
this case, the friction force is not constant, but substantially depends on the speed of
movement. This dependence is described by the well-known Stokes’ formula
F = −μυ = −μ
dr
dt
,
where the coefficient μ > 0 is determined by the dimensions of the load, the density
of the medium, its viscosity, etc. The equation of motion in a viscous medium has
the form
m
d
2 r
dt 2 = −kr + F(υ) = −kr − μ
dr
dt
The program code looks like in Fig. 3.11.
We will carry out analytical and numerical analysis of the model.
We find the general solution of this linear equation, having previously got rid of the
term with the first derivative. Substitution in the replacement equation r (t) = r (t)e
αt
gives the equation r (t) for the new function
m
e
αt d
2 r
dt 2 + αe
αt dr
dt
+ αe
αt dr
dt
+ α
2 e
αt r
= −kr e
αt
− μe
αt dr
dt
− μαe
αt r
Reducing the factor e
αt in it and setting α = −μ/(2m), we arrive at the equation
m
d
2 r
dt 2 = −
k −
μ
2
4m
r = −k 1 r
In contrast to the equation for forced oscillations, the first factor on the righthand side of the obtained expression can change sign depending on the values of
the parameters k, μ, and m of the system, which, taking into account the relation
r (t) = r (t)e
αt , leads to its other behavior with respect to the standard case of an
ideal harmonic oscillator.
3 Computer Simulation of Dynamic Systems
Fig. 3.11 WSM program code written in Modelica
this case, the friction force is not constant, but substantially depends on the speed of
movement. This dependence is described by the well-known Stokes’ formula
F = −μυ = −μ
dr
dt
,
where the coefficient μ > 0 is determined by the dimensions of the load, the density
of the medium, its viscosity, etc. The equation of motion in a viscous medium has
the form
m
d
2 r
dt 2 = −kr + F(υ) = −kr − μ
dr
dt
The program code looks like in Fig. 3.11.
We will carry out analytical and numerical analysis of the model.
We find the general solution of this linear equation, having previously got rid of the
term with the first derivative. Substitution in the replacement equation r (t) = r (t)e
αt
gives the equation r (t) for the new function
m
e
αt d
2 r
dt 2 + αe
αt dr
dt
+ αe
αt dr
dt
+ α
2 e
αt r
= −kr e
αt
− μe
αt dr
dt
− μαe
αt r
Reducing the factor e
αt in it and setting α = −μ/(2m), we arrive at the equation
m
d
2 r
dt 2 = −
k −
μ
2
4m
r = −k 1 r
In contrast to the equation for forced oscillations, the first factor on the righthand side of the obtained expression can change sign depending on the values of
the parameters k, μ, and m of the system, which, taking into account the relation
r (t) = r (t)e
αt , leads to its other behavior with respect to the standard case of an
ideal harmonic oscillator.
