1+ Improvmenet:
2+ notation
3+ formulas
4+ tests
5+
6+
7+
18
29Box on an incline
310=================
@@ -10,6 +17,7 @@ All vectors are in newton.
1017
1118Notation:
1219fg = gravitational accelleration
20+
1321m = mass of box
1422
1523> fg = V2 0 (- 10 )
@@ -28,61 +36,24 @@ The normal against the incline:
2836> fn :: Vector2 Double -> Angle -> Vector2 Double
2937> fn fa a = negate (f_l_ fa a)
3038
31- Frictionfree incline:
39+ Friction free incline:
3240
33- Force resultant :
41+ Resulting force :
3442
3543> fr :: Vector2 Double -> Angle -> Vector2 Double
3644> fr fa a = (fn fa a) + fa
3745
46+ With friction:
3847
39- ** Tests:**
40- ------------
41-
42- *Main> fr (V2 0 10) 0
43-
44- (0.0 x, 0.0 y)
45-
46- Good: No inclination - stands still.
47-
48-
49- *Main> fr (V2 0 (-10)) 0
50-
51- (0.0 x, -20.0 y)
52-
53- Odd: Motsatt gravitation ger något underligt? Vi säger fortfarande att normalen är magnituden
54-
55-
56- *Main> fr (V2 0 10) (pi/2)
57-
58- (-6.123233995736766e-16 x, 10.0 y)
59-
60- Good: 90* lutning - faller med G.
61-
62- *Main> fr (V2 0 10) (pi/3)
63-
64- (-4.330127018922194 x, 7.499999999999999 y)
65-
66- *Main> fr (V2 0 10) (pi/4)
67-
68- (-5.0 x, 4.999999999999999 y)
69-
70- *Main> fr (V2 0 10) (pi/6)
71-
72- (-4.330127018922193 x, 2.499999999999999 y)
73-
74-
75- **Frictionconstant - in motion:**
76-
77- \begin {align }
78- F_{friction} = \mu * F_{normal} \iff \mu = \frac {F_{friction}}{F_{normal}}
79- \end {align }
48+ $$ F_{friction} = \mu * F_{normal} \iff \mu = \frac {F_{friction}}{F_{normal}} $$
8049
8150> us = 0.5
8251> uk = 0.4
8352
8453Add image how friction depends if there is movement.
8554
55+ {.float-img-left}
56+
8657> type FricConst = Double
8758
8859Friction:
@@ -94,7 +65,7 @@ Friction:
9465
9566We have the normal force and only needs the constants.
9667
97- The current speed does not affect the friction. However F*M = Nm = work = J -> racer cars burn tires.
68+ The current speed does not affect the friction.
9869
9970> motscalar :: FricConst -> Vector2 Double -> Scalar
10071> motscalar u f = u * (magnitude f)
@@ -122,81 +93,3 @@ Now we just need to sum the force vectors:
12293> fru' fa a u = (motkraftv u (fn fa a) (fr fa a))
12394
12495
125-
126-
127- Hmm om jag försöker skala riktningsvektorer till sin enhetsvektor så blir det blub med nollvektorn.
128-
129- enh_vekt v = scale (1 / (magnitude v)) v
130- $ enh_vekt (V2 0 0 )
131- (NaN x, NaN y)
132-
133- Jag skulle anta att enh_vekt bara gäller då (magnitude v) =/= 0 .
134-
135-
136- Fixed nollvektorn.
137-
138-
139- *Main> fru fg (pi/4 ) 0
140- (-5.0 x, 4.999999999999999 y)
141- *Main> fru fg (pi/4 ) 1
142- (1.7763568394002505 e-15 x, -1.7763568394002505 e-15 y)
143- *Main> fru fg (pi/4 ) 0.5
144- (-2.499999999999999 x, 2.4999999999999987 y)
145- Ugh? Den är linjär? 1 i friktionskoeff = full stop. alltid?
146-
147- När är isf motkraften = fallkraften?
148- *Main> fru fg 0 5
149- (0.0 x, 0.0 y)
150- *Main> fru fg 0 1
151- (0.0 x, 0.0 y)
152- *Main> fru fg (pi/2 ) 10
153- (-6.123233995736762 e-16 x, 9.999999999999995 y)
154-
155- Hmm?
156-
157- *Main> fru fg (pi/6 ) 1
158- (3.169872981077808 x, -1.8301270189221936 y)
159- *Main> fru fg (pi/6 ) 0
160- (-4.330127018922193 x, 2.499999999999999 y)
161- *Main> fru fg (pi/6 ) 100000
162- (749995.6698729811 x, -433010.2018922193 y)
163-
164- Den statiska friktionen är konstig. Den borde stå still vid låg vinkel o hög friktion.
165-
166- Jag summerar ju visserligen krafterna, så det är nog något lurt med friktionshanteringen.
167-
168- Tests:
169-
170- fr
171- *Main> fr fg (pi/3 )
172- (-4.330127018922194 x, 7.499999999999999 y)
173- *Main> fr fg (pi/6 )
174- (-4.330127018922193 x, 2.499999999999999 y)
175-
176-
177- fru
178- *Main> fru fg (pi/3 ) 1
179- (-1.8301270189221928 x, 3.1698729810778055 y)
180- *Main> fru fg (pi/6 ) 1
181- (3.169872981077808 x, -1.8301270189221936 y)
182-
183-
184-
185- fru'
186- *Main> fru' fg (pi/3 ) 1
187- (2.500000000000001 x, -4.330127018922194 y)
188- *Main> fru' fg (pi/6 ) 1
189- (7.500000000000001 x, -4.330127018922193 y
190-
191-
192-
193- wtf händer? Hur kan fr ha samma x-vektor för två olika vinklar inom samma kvadrant?
194-
195- fn
196-
197- *Main> fn fg (pi/3 )
198- (-4.330127018922194 x, -2.500000000000001 y)
199- *Main> fn fg (pi/6 )
200- (-4.330127018922193 x, -7.500000000000001 y)
201-
202-
0 commit comments