You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All forces are represented in the form of a vector in this example.
7
+
A box with the mass 2kg is resting on an incline. The task is to determinate the resulting force given an angle of the incline.
7
8
8
-
{.float-img-left}
9
+
When calculating with forces in this example we will use force vectors. This way we can add and subtract different forces together. We can also scale a force with a scalar.
9
10
10
-
Notation:
11
-
$$ fg = gravitational\ accelleration $$
11
+
{.float-img-left}
12
+
13
+
$$\dot g = gravitational\ acceleration $$
12
14
13
15
$$ m = mass\ of\ box $$
14
16
15
-
> fg =V20 (-10)
17
+
> g::Vector2Double
18
+
> g =V20 (-10)
19
+
20
+
> m::Double
16
21
> m =2
17
22
18
-
A unit vector that we get from a degree $a$.
23
+
We scale the gravitational acceleration vector with the mass of the box to get a vector representing the gravitational force.
24
+
25
+
$$\dot F_{g} = m \cdot\dot g $$
26
+
27
+
> fg::Vector2Double
28
+
> fg = scale m g
29
+
30
+
> alpha::Angle
31
+
> alpha =pi/4
19
32
20
-
> unit_normal::Angle->Vector2Double
21
-
> unit_normal angle =V2 (cos angle) (sin angle)
33
+
A unit vector that we get from a radian $a$.
22
34
23
-
Force against the incline $F_{\perp}$ from the box (negative in y-axis).
Force against the incline from the box we denote as $\dot F_{\perp}$. Since the force is perpendicular against the incline of the surface, we need to create the unit vector for $\dot F_{\perp}$ by adding $-(pi/2)$ radians.
39
+
40
+
This vector we then scale up, with the magnitude of the gravitational force multiplied by $cos(angle)$, which gives how much the gravitational force that affects $\dot F_{\perp}$.
41
+
42
+
There are two edge cases. If the incline is flat, it means the incline has the angle 0, and $cos(0) = 1$, which means $\dot F_{g} = \dot F_{\perp}$. If the incline is fully tilted however $\frac{\pi}{2}$, it means that $cos(\frac{\pi}{2}) = 0$ and the gravitational force on the box does not result in any force against the incline.
We have the normal force against the incline and only need example constants.
92
+
Given that we know if the box is already moving or not, we can chose the corresponding friction constant and calculate the friction force between the box and the incline. The direction of the friction force will then be in the opposite direction of the resulting force without friction, which we determined in the previous section.
93
+
94
+
We will use a type definition to clarify parameters.
53
95
54
96
> typeFricConst=Double
55
-
> us =0.5
56
-
> uk =0.4
57
97
58
-
Från en rörelse eller vekt, fixa komplementet
98
+
We will also need to use the unit vector of the resulting force from the previous section.
> motkraftv u normal v = scale (u * (magnitude normal)) (negate (unit_vec v))
107
+
We let this function compute the friction. If the magnitude of the friction is greater than the magnitude of the resulting force without friction, it means the
108
+
box will stand still or that the magnitudes can be treated as equally big.
69
109
70
-
Now we just need to sum the force vectors into $F_{r}$:
> fru fa a u = (fr fa a) + (motkraftv u (fn fa a) (fr fa a))
119
+
> fru fa a u = (fr fa a) + (ff (fr fa a) magn_l_ magn_fr u)
120
+
>where
121
+
> magn_l_ = magnitude (f_l_ fa a)
122
+
> magn_fr = magnitude (fr fa a)
123
+
124
+
Testing for $u = 0$. In this case both "fr" and "fru" should give the same resulting vector:
125
+
126
+
<*Main> print_vec_2dec $ fr fg (pi/3)
127
+
< (-8.66,-15.00)
128
+
129
+
<*Main> print_vec_2dec $ fru fg (pi/3) 0
130
+
< (-8.66,-15.00)
131
+
132
+
They should also give the same if the incline is flat.
133
+
134
+
<*Main> print_vec_2dec $ fr fg (0)
135
+
< (-0.00,0.00)
136
+
137
+
<*Main> print_vec_2dec $ fru fg (0) 1
138
+
< (-0.00,0.00)
139
+
140
+
Lastly one should see the edge case where the angle is $\frac{\pi}{4}$. The magnitude of the normal and the resulting force from the previous section becomes the same (try and control it!). This also means that if $\mu_{static} = 1$ the magnitude of the friction force becomes $equal$ to the magnitude of the resulting force without friction. The consequence of this will be that the friction force is just enough to prevent the box from sliding. If we increase the angle just a little, the box starts sliding.
141
+
142
+
<*Main> print_vec_2dec $ fru fg (pi/4) 1
143
+
< (-0.00,0.00)
144
+
145
+
<*Main> print_vec_2dec $ fru fg (0.01+pi/4) 1
146
+
< (-0.20,-0.20)
147
+
148
+
In this case it may be beneficial to see more decimals, given that it should slide more downwards (down on the y-axis) than to the left (left on the x-axis).
149
+
150
+
< fru fg (0.01+pi/4) 1
151
+
< (-0.197986733599107, -0.201986600267551)
152
+
153
+
Friction for a box in motion:
154
+
-----------------------------
155
+
This one is for you to solve. A box in motion is always affected by the friction (except for one particular edge case).
156
+
157
+
Pretty printing:
158
+
----------------
159
+
160
+
> print_2dec::Double->IO()
161
+
> print_2dec a =putStrLn$ printf "%.2f" a
162
+
163
+
> print_vec_2dec::Vector2Double->IO()
164
+
> print_vec_2dec (V2 a b) =putStrLn$"("++ (printf "%.2f" a) ++","++ (printf "%.2f" b) ++")"
0 commit comments