Physics - Numerical Calculus - Matlab

profilenpg10
efbquestion.docx

The assignment should contain 2 sections.

1- A text file wich contains the answers to the questions, tables of values ​​for iterations requested and any graphs of the results.

2- The source code of your implementation, duly commented, and dependencies, if any. Any programming language will be accepted (C, C ++, Javascript, Python, Octave, R, etc.), but the student must indicate which one he used, what version and under what operating system it worked. Disable / comment all lines of the code that use external libraries to generate graphics.

1. The oscillator with sliding friction

The sliding friction oscillator is a harmonic oscillator modified, in which besides the elastic force ( Felas = - ) it also acts a sliding kinetic frictional force with the usual shape k = µmg .

In practice all mass-spring oscillators are of this type because there is always some friction between the mass and the surface where it slides.

Using Newton's 2nd law, we can construct an equation differential for a mass-spring system with friction:

where sgn(v) is the signal function, defined by :

This function is necessary so that the frictional force always has opposite direction of speed.

Transforming acceleration and speed into derivatives, we get, after some handling of the expression and replacing the expression for the sliding kinetic friction, to :

The remaining variables in this expression are:

x,t : position of the mass (elongation) and time

m : mass value

µ : kinetic friction coefficient

g : gravitational constant

a) Integrate the above damped oscillator equation using the Heun method for differential equations of second order. For this purpose, use (units: SI)

Initial conditions: 0, = 5, ( Note : |t=0 )

Parameters: µ = 0.2; m = 0.5; g = 9.8; k = 4

Step: ℎ = 0.1

Perform 120 iterations, i.e. from t = 0 to t = 12.

b) Change the parameter values ​​according to the instructions below. Physically explain the change you noticed in system movement for each case.

µ = 0,1 and other parameters equal to those of paragraph (a).

m = 0,75 and other parameters equal to those of paragraph (a).

k = 6 and other parameters equal to those of paragraph (a).

c) Again keeping the remaining parameters as the same (a), now change the parameters below.

µ = 0,4 and other parameters equal to those of paragraph (a).

m = 2 and other parameters equal to those of paragraph (a).

k = 2 and other parameters equal to those of paragraph (a).

For these cases you will detect something strange from a certain

instant of time. This "something strange" is due to an error

(deliberate) in the formulation of the differential equation under study.

Which is the error and what happens physically in the instant of time the

from which instability is installed?

Extra Points : If you managed to understand what is happening with

(c), you can try to correct the given error in the differential equation.