Compare commits

..

224 Commits

Author SHA1 Message Date
474050ff6d increase dot grid size to be less distracting 2025-09-07 18:32:52 +01:00
1b95f46544 add note on cloudwatch event rules via ansible 2025-02-12 14:09:35 +00:00
a4b13fb71e always dark mode 2024-12-25 19:45:11 +00:00
d512ff1c73 use dotgrid module 2024-12-25 19:34:14 +00:00
b7c38ddc89 fix title cuasing issues with gronk 2024-08-09 21:03:58 +01:00
9d602fede7 cadence license manager issues 2024-08-09 20:57:19 +01:00
a21898048c update readmes 2024-04-16 18:47:33 +01:00
5e3bdbe2f6 how to install droidcam on jetson nano 2024-04-16 18:42:24 +01:00
1e90d6c8a9 comic mono 2024-04-14 16:05:13 +01:00
b6c9129fa5 update readme 2024-04-13 21:03:16 +01:00
00b08276a2 add realistic date 2024-04-13 21:01:33 +01:00
47bfb4ac20 update blog readme 2024-04-13 20:58:25 +01:00
1055f83d3a fix images 2024-04-13 20:54:16 +01:00
a9cb29989d fix metadata 2024-04-13 20:52:42 +01:00
ce04f5dd57 add old posts 2024-04-13 20:44:27 +01:00
ef43740721 update readme 2024-04-13 20:18:04 +01:00
b94dba3163 add base_url 2024-04-13 20:06:50 +01:00
816896537d start move blog to gronk 2024-04-13 20:02:11 +01:00
ad7096bca2 explain xed value 2024-03-02 14:28:24 +00:00
37618fe7eb cross elastic demand 2024-03-02 14:25:31 +00:00
8c16a0d537 update flashcards 2024-02-29 12:56:56 +00:00
e203b294c5 update flashcards 2024-02-25 13:02:36 +00:00
91e7c9701a update flashcards 2024-02-23 19:16:29 +00:00
9e12734c5f update readme 2024-02-21 15:08:29 +00:00
524465453a update flashcards (corrections) 2024-02-21 15:06:30 +00:00
dec593c503 management 2024-02-16 12:34:28 +00:00
56d55a6617 update readme to include errata 2024-02-13 09:45:57 +00:00
15cec82789 add resources on mmme3081 2024-02-13 09:39:33 +00:00
8185cd14e4 mmme3049 2024-02-02 12:36:25 +00:00
e4a0ef25e1 help i think my device shut down after deleting the current kernel and before installing the second (no entries in systemd-boot/grub/<bootloader>) 2024-01-29 15:38:10 +00:00
5f5e43e54e update readme 2024-01-23 16:31:12 +00:00
a24eb028a9 add code for solutions for exam papers 2024-01-23 16:28:16 +00:00
996700bec9 add exercise sheet 8 solution plotter script 2024-01-17 15:50:25 +00:00
4369e246bd update folder name 2024-01-07 16:14:15 +00:00
a42bfcc814 add errata for exercise sheets 2024-01-07 16:06:29 +00:00
3de79c2111 formatting 2024-01-02 20:15:44 +00:00
da516f5160 add page no issues with logging into email 2024-01-02 20:14:13 +00:00
0489963eda update gohookr.sh 2024-01-02 19:04:05 +00:00
8981e9b9c4 update readmes 2024-01-02 18:48:48 +00:00
dd35b48def add flask project example 2024-01-02 02:15:24 +00:00
0ceb20bcf1 add computer engineering slides 2023-12-28 20:18:17 +00:00
f266085c4e add mechatronics lecture slides 2023-12-28 20:16:19 +00:00
5b64235c97 add past papers 2023-12-28 20:13:00 +00:00
b3d42c30d9 add lecture slides, lectur notes 2023-12-28 20:12:23 +00:00
a84913e3f5 add exercise sheets 2023-12-28 19:49:08 +00:00
557bad8387 add exam cheatsheets 2023-11-06 12:56:52 +00:00
0f29002415 add mmme3085 mechatronics week 4 lecture slides 2023-11-06 12:55:42 +00:00
11cd8df774 correct lecture_notes folder name 2023-11-06 12:54:53 +00:00
a92f99dae8 add fea lecture slides 2023-11-06 12:54:10 +00:00
7f7955fc4f add fea exercise sheets 2023-11-06 12:53:52 +00:00
a4d8d95d74 add .n2w config 2023-10-31 16:04:01 +00:00
bec5809694 add notes, slides, lecture notes on fea 2023-10-31 16:03:40 +00:00
4e51f23dca move lecture notes and slides into subfolders 2023-10-31 14:35:05 +00:00
212cfd6e4c add lecture notes, lecture slides for lecture 4, 5 2023-10-23 17:08:35 +01:00
c58e7b2f94 add computer engineering slides, separate computer engineering and mechatronics into subfolders 2023-10-23 17:08:00 +01:00
307c4f366d remove unnecessary frontmatter 2023-10-18 18:33:54 +01:00
3b0d086ea0 update labs.md 2023-10-18 18:33:16 +01:00
4b59dcaa8b mmmme3085 move labs to own page 2023-10-18 18:32:52 +01:00
55b75039bf add lecture notes, lecture slides, exercise sheets for lectures 2,3 2023-10-18 18:32:09 +01:00
cde7a3c7f9 add courseworks page for cmt 2023-10-18 18:31:32 +01:00
b0f8043db0 format tables 2023-10-15 16:14:53 +01:00
6e748d46b2 add exerices sheets, worked example matlab scripts 2023-10-15 16:12:48 +01:00
f2e94c592f add index.md for mmme3085 2023-10-15 15:50:56 +01:00
f8785c4fd2 mmme3085 add week 2 mechatronics lecture slides 2023-10-12 09:59:20 +01:00
56282d75af initial resources for 3085, 3086 2023-10-05 11:01:12 +01:00
ed7af09a55 2nd year fin 2023-06-15 00:33:56 +01:00
917a47caf9 rename mmme2049 flashcard apkg 2023-06-07 13:41:14 +01:00
57507d4c34 finish mmme2049 2023-06-07 13:40:09 +01:00
d61c94880c done with 2047 2023-05-22 22:14:01 +01:00
9b694732bd mmme2053 beam bending dicontinuiutity functions 2023-05-19 23:50:26 +01:00
160418816f add past papers 2023-05-08 18:55:48 +01:00
d505de5ac1 add exercise sheets, lecture notes, lecture slides 2023-05-08 17:30:28 +01:00
868fac25cf add, organise exam papers 2023-05-08 17:30:08 +01:00
c90147635a explain variable in nusselt number 2023-05-08 17:29:40 +01:00
c0c565a104 add errata for bearings 2023-04-30 16:21:21 +01:00
fb21e1012f add MMME2044 anki flashcards 2023-04-28 20:43:40 +01:00
015149b341 update notes on bearings, add past papers 2023-04-28 20:42:43 +01:00
bc73ac4e09 update heading sizes 2023-04-28 18:10:08 +01:00
6357ba4fdb mmme2049 add lecture slides, exercise sheet 1 2023-04-26 00:05:28 +01:00
b262977263 mmme2046 add exercise sheets, control lecture notes 2023-04-26 00:04:18 +01:00
486774e0d6 add exercise sheets 2023-04-26 00:02:38 +01:00
3eed68e1b3 updaet digital electronics 2023-04-26 00:02:21 +01:00
826ea4690f fix error in flip flop output table 2023-04-25 20:20:50 +01:00
07466ce8a9 notes on ac motors 2023-04-24 22:55:25 +01:00
9b1346f8f0 add errata, fix typos 2023-04-23 19:13:58 +01:00
6ec65bd5ec fix typos in turbomachinery notes 2023-04-23 17:09:25 +01:00
519d3e37f0 update notes on heat transfer 2023-04-22 14:38:33 +01:00
5d580557ec fix typo 2023-04-18 13:54:16 +01:00
bb4ba0ff66 fix typos 2023-04-11 15:52:22 +01:00
249a2f30d2 typo in piezoelectrics notes 2023-04-09 14:42:53 +01:00
a07f63de81 mmme2051 notes on dc motors 2023-03-30 11:35:23 +01:00
f3580ea182 mmme2051 boolean algebra 2023-03-30 11:15:49 +01:00
572d86e60f mmme2053 note on elastic instability (buckling) 2023-03-24 15:37:43 +00:00
7d9ad8cbf0 notes on thick walled cylinders 2023-03-23 15:49:05 +00:00
7166aecc6f mmme2053 empty notes on thick walled cylinders, elastic instability (buckling) 2023-03-23 14:33:46 +00:00
274c643b09 notes on diodes 2023-03-23 12:17:45 +00:00
5d4ec5ab36 add note about exclusion of efficiency from transformer equation 2023-03-23 11:54:24 +00:00
acb42fb8c6 mmme2051 add formula sheet 2023-03-23 11:26:58 +00:00
ebb8ad0350 add notes on transformers 2023-03-23 11:26:34 +00:00
b2ff21cd12 add notes on piezoelectrics 2023-03-20 14:21:30 +00:00
73d39c8744 add mmme2044 lecture slides 2023-03-20 14:04:42 +00:00
d0496e79d8 add notes on pumps, turbines 2023-03-20 14:02:40 +00:00
485ca3ca66 fix metadata 2023-03-18 10:57:19 +00:00
11bc9c6c0d add metadata to asymmetrical bending 2023-03-18 10:50:02 +00:00
044a898557 mmme2045 add incomplete notes on polymers 2023-03-14 10:28:37 +00:00
ec195bbe66 mmme2044 add incomplete notes on pneumatics, bearings 2023-03-14 10:26:16 +00:00
5a807f15ac mmme2044 lecture slides on macine system deign 2023-03-14 10:24:18 +00:00
96891f53ba mmme2049 add lecture slides p006 2023-03-14 10:23:35 +00:00
5f109d2843 mmme2051 add approximate methods exercise sheet 2023-03-14 10:23:14 +00:00
0a4b93d33b add mmme2053 worked examples, exercise sheets 2023-03-14 10:22:12 +00:00
e14699c5ef notes on vibration isolation 2023-03-13 17:11:43 +00:00
3880dc3c5c notes on turbomachinery pt1 2023-03-13 14:18:28 +00:00
2fb7818e20 steady state performance 2023-03-06 22:26:39 +00:00
f04625d539 vibrations lecture --- approximate methods 2023-03-06 22:25:45 +00:00
5a788e0eed notes on digital electronics 2023-03-02 12:50:01 +00:00
414d4b1183 lecture notes, slides on gas mixtures and combustion, heat transfer 2023-02-27 10:47:52 +00:00
1bf9a50a93 add power factor 2023-02-18 20:28:06 +00:00
a2e60d3eea update control notes 2023-02-18 20:27:04 +00:00
b35404bc42 fix missing end command 2023-02-17 13:40:07 +00:00
b994350970 fix typo in ac_power.md 2023-02-17 13:27:13 +00:00
4959ea926b begin notes on ac 2023-02-17 13:24:14 +00:00
9ef91509e7 update tags for mmme2049 2023-02-16 16:14:14 +00:00
4494ba74b9 fix typo 2023-02-16 15:43:15 +00:00
aa7650c78f fix typo 2023-02-16 15:41:07 +00:00
468b4a22cd notes on strain energy 2023-02-16 15:08:05 +00:00
998a08633e notes on combustion and gas mixtures 2023-02-14 19:59:31 +00:00
d584420e0f notes on private enterprises 2023-02-08 18:33:17 +00:00
5c27d1a91c mmme2046 notes on control 2 lecture 2023-02-06 17:11:38 +00:00
81fe971662 remove flist 2023-02-06 11:39:00 +00:00
027f5dfb89 move notes out of year subfolders 2023-02-06 11:36:23 +00:00
6c0d1020a7 add inherited tas to uni folders 2023-02-06 11:30:16 +00:00
5202768589 mmme2047 lecture notes dimensional analysis 2023-02-06 2023-02-06 10:57:39 +00:00
7b2ed927b4 fix another typo lol 2023-02-05 17:10:47 +00:00
3eb6fe9d56 fix typos 2023-02-05 17:09:34 +00:00
829beab997 mmme2049 add lecture notes, notes 2023-02-05 17:06:22 +00:00
8f18918c05 mmme2046 add worked examples, lecture notes 2023-02-05 17:05:56 +00:00
6150bb4707 fix images 2023-02-05 17:03:41 +00:00
23d7364485 remove duplicate notes in wrong folder 2023-02-05 16:50:14 +00:00
1f8a5382d8 fix typos 2023-02-05 16:50:13 +00:00
2033c7524e notes on asymmetrical beam bending 2023-02-05 16:50:12 +00:00
b7ef6c914b add electrical fundamentals 2023-02-05 16:50:11 +00:00
83cd3ad585 add standard nondimensional groups in fluids 2023-01-31 21:48:07 +00:00
00d1758c35 fix typo 2023-01-31 20:59:05 +00:00
5ac0e81f5a add lecture slides 2023-01-31 20:51:46 +00:00
fb07f79fb0 add dimensional analysiss lecture slides, lecture notes 2023-01-31 20:51:17 +00:00
9904aaa68d delete duplicate typo folder 2023-01-31 20:50:34 +00:00
58476ad943 fix typo, add missing image 2023-01-31 20:50:13 +00:00
9baa4abeb7 add other files 2023-01-30 20:47:34 +00:00
ba3430236c add exercise sheets 2023-01-30 20:45:31 +00:00
d7e2c77140 add lecture notes 2023-01-30 20:44:10 +00:00
d938b19869 add lecture slide 2023-01-30 20:43:49 +00:00
cda5056661 add thermodynamic tables 2023-01-30 20:41:33 +00:00
9396acbe81 update thermodynamic tables - add 16 pages 2023-01-30 20:41:22 +00:00
4f2fff1d71 mths2007 finished 2023-01-30 20:37:47 +00:00
98f161b927 add lecture slides 2023-01-30 20:37:01 +00:00
19bb008d18 notes and example on laplace 2023-01-30 20:36:47 +00:00
199c488cb3 add images mmme2047 2023-01-30 20:34:13 +00:00
aa163ccbf1 notes on dimensional analysis 2023-01-30 20:33:35 +00:00
e4fc38feaa add how to concat pdfs 2023-01-26 15:33:15 +00:00
50721f0bcd add figure to thin cylinder 2022-11-10 16:21:21 +00:00
14f4fc0fa9 add pdfimages to .gitignore 2022-11-10 15:55:39 +00:00
1d226d9503 mmme2053 thermal stress and strain add notes, lecture notes, lecture slides, worked examples 2022-11-10 15:54:53 +00:00
1ffbca756c mmme2044 start notes on seals 2022-11-07 16:45:24 +00:00
e263656e60 mmme2046 dynamics fix title, tags 2022-11-04 12:39:44 +00:00
78946e25e4 mmme1026 eigenvalues update title 2022-11-04 12:38:47 +00:00
2c14c31e93 mths2007 add problem sheets, lecture slides and notes, formula sheet 2022-11-04 12:03:52 +00:00
187337d789 mmme2045 mmme2047 add lecture notes 2022-11-04 12:03:16 +00:00
1e42fd59b4 mmme2046 add exercise sheets, formula sheet 2022-11-04 12:02:46 +00:00
d0fd9f5ed4 mmme2053 notes on fatigue and fracture 2022-11-04 12:02:11 +00:00
44ccde2294 mmme2044 notes on shaft design 2022-11-04 11:38:10 +00:00
1b4b7faf38 mths2007 add lecture notes on 1e, 1g 2022-10-17 22:03:20 +01:00
476976a4de mmme2053 notes on w0441 2022-10-17 22:02:27 +01:00
93809b624f mmme2045 add notes and questions on block L 2022-10-17 22:01:44 +01:00
388a08aaf0 mmme2046 exercise sheet 2 2022-10-17 22:00:29 +01:00
7172f29183 mmme2047 w0341 w0442 notes 2022-10-17 22:00:06 +01:00
4cc230ceee mmme2044 w0441 notes on linkages 2022-10-17 21:57:11 +01:00
21482ff439 mmme2047 l2 w04/41 l3 w05/42 2022-10-17 11:00:53 +01:00
24634aae51 mmme2046 l3 w05/42 2022-10-17 10:49:09 +01:00
8b27c853f4 mths2007 week3 slides 2022-10-09 22:34:13 +01:00
7388bbe104 add uncommitted year 1 content 2022-10-05 12:44:49 +01:00
b4b6f8b54d mmme2045 add lecture slides 2022-10-05 12:42:54 +01:00
355fddb665 mmme2046 add lecture slides, exercise sheets 2022-10-05 12:42:17 +01:00
bcba31b8a0 mmme2047 add lecture notes 2022-10-05 12:41:37 +01:00
a455671a65 mmme2045 lecture 1 2022-10-05 10:50:10 +01:00
554caccd4b mmme2047 lecture 1 2022-10-03 12:37:27 +01:00
c453e4fcd4 add zack.jpg 2022-10-03 11:10:40 +01:00
e3fcbdf7cc mmme2046 lecture 1 2022-10-03 11:06:34 +01:00
1acef81bb7 mmme2046 lecture 1 2022-10-03 10:44:28 +01:00
70308e2285 add volume of parallelapiped 2022-05-26 22:40:01 +01:00
053a3530b5 add notes on namecheap srv records 2022-04-08 21:40:58 +01:00
a1cf6996cf take notes on machining processes i guess 2022-03-28 10:32:35 +01:00
c3a47c46b3 fix a thing kind of to do with \textit 2022-03-09 16:45:37 +00:00
21e4474341 fix a thing kind of to do with \textit 2022-03-09 16:41:22 +00:00
f875f32177 create notes on dynamics 2022-03-08 11:17:35 +00:00
506984b69c add notes on heat treatments 2022-03-08 11:17:04 +00:00
fe8a7209b3 fix typos 2022-03-08 11:15:34 +00:00
35a4e42433 add notes on extended bernoulli eqn 2022-03-08 11:07:15 +00:00
86896fdc2c fix typo 2022-03-04 18:56:17 +00:00
422cedff86 notes on vectors: corrections 2022-03-03 23:12:41 +00:00
a085632759 add uuid to frontmatter 2022-03-02 01:43:54 +00:00
6029a95698 most of the notes on feb 22nd 2022-03-02 01:36:36 +00:00
a8de6477af fix vector formatting issue 2022-03-02 01:34:34 +00:00
f6ce1dedd6 notes on moulding 2022-03-01 22:21:01 +00:00
99aaf75110 notes on diffusion, deformation processes 2022-02-28 21:51:32 +00:00
c327b62aa4 notes on casting 2022-02-21 17:26:19 +00:00
48d6ea286c manufacutring cost modelling notes 2022-02-21 16:28:28 +00:00
a5e865c29d add section angle between vectors 2022-02-20 14:40:12 +00:00
9c8de3928e fix formatting issue 2022-02-20 14:33:55 +00:00
d845161287 fix typo 2022-02-19 00:05:53 +00:00
a8305e1b38 update title 2022-02-19 00:04:12 +00:00
fb6a1797a7 vectors notes 2022-02-19 00:02:46 +00:00
620370f52b add internal link checker script 2022-02-13 22:13:02 +00:00
68996291d8 create notes page for dell xps 15 9570 2022-02-13 22:12:33 +00:00
6ace5534bf fix typo 2022-02-13 22:12:08 +00:00
42d8101a92 fix typo 2022-02-09 18:52:01 +00:00
0ffbf781ed minor fixes 2022-02-07 15:34:47 +00:00
6f1e5e6fe6 applied technology lecture at uni of sussex 2022-02-07 2022-02-07 15:29:24 +00:00
f60e983788 Add SI units for specific and molar gas constant 2021-12-28 19:49:05 +00:00
7fe78254b3 add notes on integration 2021-12-28 16:39:26 +00:00
cef225ae95 add notes on mmme 1026 differentiation 2021-12-27 19:30:41 +00:00
b05441973e attempt to better organise thermodynamics page 2021-12-26 22:58:19 +00:00
c075bea216 fix internal link 2021-12-26 22:34:57 +00:00
02a98be18e finish notes on semester 1 thermodynamics 2021-12-26 22:00:00 +00:00
2a32037e1c wrap up unimportant first two lectures in details tags 2021-12-23 22:07:27 +00:00
1072 changed files with 150049 additions and 249 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
*.md.pdf
pdfimages

11
blog/first_post.md Executable file
View File

@@ -0,0 +1,11 @@
---
author: Akbar Rahman
pub_date: Fri, 31 Jul 2020 19:52:52 +0100
title: first post
tags: []
uuid: fd338dc9-ae5f-48f4-9fc6-e02e88ab4ce5
---
# first post
this is my first post

182
blog/g27_pedals.md Executable file
View File

@@ -0,0 +1,182 @@
---
author: Akbar Rahman
pub_date: Tue, 04 Aug 2020 15:20:13 +0100
title: Repurposing Racing Wheel Pedals
tags: [ g27, sim_racing ]
uuid: 0f09200e-fd50-451b-aae1-1117a8a704db
---
<h1>Repurposing Racing Wheel Pedals</h1>
<p>I have a Logitech G27 I don't use much. I wondered if I could use it for anything else. I could. </p>
<h2> The Pinout of the Connector </h2>
<p>The first thing I had to do was figure out what each pin did on the DE-9 connector, and which
ones I should care about.
This was done easily after I took off the top plastic casing thing by poking the three 100k Ohm
potentiometers and the connector in the right places at the right times:
</p>
<style> #pinout_table tr td:first-child { text-align: right } </style>
<img src="./images/repurposing-racing-wheel-pedals-g27-pinout.svg" class="centered" style="width: 10em;">
<table id="pinout_table">
<tr> <th>pin</th> <th>function</th></tr>
<tr> <td>1,4</td> <td>ground</td></tr>
<tr> <td>6</td> <td>clutch pedal</td></tr>
<tr> <td>7</td> <td>brake pedal</td></tr>
<tr> <td>8</td> <td>accelerator pedal</td></tr>
<tr> <td>9</td> <td>voltage in</td></tr>
</table>
<h2> Reading the Values of the Pots </h2>
I'm using an Arduino to read the pots and then do something with the values.
I very dirtily wired pin 4 on the pedals to GND on a Arduino Uno, pin 9 to 5V, and
pins 6,7,8 to A0, A1, and A2.
I used a basic sketch to check that everything is good:
<details>
<summary> Show/hide test_sketch.ino </summary>
<pre><code> void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(A2));
delay(20);
}
</code></pre>
</details>
I noticed that the minimum and maximum values read by the Uno were quite far off 0 and 1024, like
they should be, and voltage was being lost on the way to and from the potentiometers.
Since the pedals have to be calibrated every time you plug them in, I assume this is normal and
spat out this code:
<details>
<summary> Show/hide sketch_aug02a.ino </summary>
<pre><code>// sensor pins
int sa = A0;
int sb = A1;
int sc = A2;
// minimum values detected by the sensors
int mina = 1025;
int minb = 1025;
int minc = 1025;
// maximum values detected by the sensors
int maxa = 512;
int maxb = 512;
int maxc = 512;
// raw values of the sensors
int rva, rvb, rvc;
// calculated values of the sensors (between 0 and 1, this is the value sent to computer)
float cva, cvb, cvc;
void setup() {
Serial.begin(9600);
}
void loop() {
rva = analogRead(sa);
rvb = analogRead(sb);
rvc = analogRead(sc);
if (rva &lt; mina) mina = rva;
if (rvb &lt; minb) minb = rvb;
if (rvc &lt; minc) minc = rvc;
if (rva &gt; maxa) maxa = rva;
if (rvb &gt; maxb) maxb = rvb;
if (rvc &gt; maxc) maxc = rvc;
cva = (float)(rva-mina)/(float)(maxa-mina);
cvb = (float)(rvb-minb)/(float)(maxb-minb);
cvc = (float)(rvc-minc)/(float)(maxc-minc);
Serial.print('[');
Serial.print(cva); Serial.print(',');
Serial.print(cvb); Serial.print(',');
Serial.print(cvc);
Serial.print(']');
Serial.println();
delay(20);
}
</code></pre>
</details>
<h2> Actually Making the Numbers Do Something </h2>
This is where you can make the pedals do fun things.
I reworked another piece of code I wrote to do a similar thing to quickly create a script that
reads the values sent by the Arduino, and then simulate pressing a key combination.
The only thing I've done with this is set push-to-talk to ctrl-shift-alt-1.
I don't know what else I could use this for, maybe temporarily muting particular things, like music.
<details>
<summary> Show/hide pedalboard.py </summary>
<pre><code> #!/usr/bin/env python3
import sys
import json
import time
from enum import Enum
import keyboard
import serial
class KeyState(Enum):
UP = 0
DOWN = 1
STATES = [KeyState.UP] * 3
THRESHOLD = 0.8
MACROS = ['ctrl+shift+alt+1', 'ctrl+shift+alt+2', 'ctrl+shift+alt+3']
def get_args():
""" Get command line arguments """
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('device')
return parser.parse_args()
def main(args):
""" Entry point for script """
while True:
try:
kb = serial.Serial(port=args.device, baudrate=9600)
while True:
handle(json.loads(kb.readline()))
except serial.serialutil.SerialException as e:
print(e)
print("Failed to connect to device... trying again")
time.sleep(1)
except Exception as e:
print(e)
return 0
def handle(data):
global STATES
states = [KeyState.DOWN if value &gt; THRESHOLD else KeyState.UP for value in data]
r = [handle_state_change(i, states[i]) if states[i] != STATES[i] else None for i in range(len(STATES))]
STATES = states
return r
def handle_state_change(key, newstate):
print(f"{key} {newstate}")
return keyboard.press(MACROS[key]) if newstate == KeyState.DOWN else keyboard.release(MACROS[key])
if __name__ == '__main__':
try:
sys.exit(main(get_args()))
except KeyboardInterrupt:
sys.exit(0)
</code></pre>
</details>

View File

@@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="68.148842"
height="34.400002"
viewBox="-138.624 -137.291 68.14884 34.400003"
id="Layer_1"
xml:space="preserve"
sodipodi:docname="repurposing-racing-wheel-pedals-g27-pinout.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><title
id="title1416">DE-9 Connector with numbers</title><metadata
id="metadata1308"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>DE-9 Connector with numbers</dc:title><dc:date>2020-08-02</dc:date><dc:creator><cc:Agent><dc:title>alvierahman90</dc:title></cc:Agent></dc:creator><cc:license
rdf:resource="" /><dc:contributor><cc:Agent><dc:title>Original drawing from Mobius (maybe): https://commons.wikimedia.org/wiki/File:DSubminiatures.svg</dc:title></cc:Agent></dc:contributor></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1722"
inkscape:window-height="1060"
id="namedview1306"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="10.44492"
inkscape:cx="27.994898"
inkscape:cy="11.731109"
inkscape:window-x="1056"
inkscape:window-y="1094"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><defs
id="defs2584">
</defs>
<g
id="g1336"
transform="rotate(180,-104.54958,-120.091)"
style="stroke:#454545;stroke-opacity:1"><g
transform="translate(-193.19312,-267.013)"
id="g2241"
style="stroke:#454545;stroke-opacity:1">
<circle
cx="66.588997"
cy="141.351"
r="2.2409999"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2243" />
<circle
cx="77.617996"
cy="141.351"
r="2.2409999"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2245" />
<circle
cx="88.643997"
cy="141.351"
r="2.2379999"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2247" />
<path
d="m 99.668,139.11 c 1.238,0 2.242,1.004 2.242,2.241 0,1.237 -1.004,2.24 -2.242,2.24 -1.233,0 -2.237,-1.003 -2.237,-2.24 0,-1.237 1.004,-2.241 2.237,-2.241 z"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="path2249"
inkscape:connector-curvature="0" />
<circle
cx="110.697"
cy="141.351"
r="2.2409999"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2251" />
<circle
cx="72.102997"
cy="152.491"
r="2.2390001"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2253" />
<circle
cx="83.130997"
cy="152.491"
r="2.2390001"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2255" />
<path
d="m 94.156,150.252 c 1.237,0 2.238,1.003 2.238,2.237 0,1.237 -1.001,2.241 -2.238,2.241 -1.238,0 -2.242,-1.004 -2.242,-2.241 0,-1.234 1.004,-2.237 2.242,-2.237 z"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="path2257"
inkscape:connector-curvature="0" />
<circle
cx="105.185"
cy="152.491"
r="2.2390001"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="circle2259" />
</g><path
d="m -129.54912,-136.791 c -5.609,0 -9.4,4.518 -8.425,10.042 l 2.354,13.309 c 0.976,5.525 6.366,10.049 11.975,10.049 h 38.191005 c 5.608,0 10.996,-4.523 11.975,-10.049 l 2.354,-13.309 c 0.975,-5.524 -2.813,-10.042 -8.425,-10.042 z"
style="fill:none;stroke:#454545;stroke-opacity:1"
id="path2261"
inkscape:connector-curvature="0" /></g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-123.37334"
y="-129.7538"
id="text1340"><tspan
sodipodi:role="line"
id="tspan1338"
x="-123.37334"
y="-129.7538"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-112.29854"
y="-129.7538"
id="text1340-3"><tspan
sodipodi:role="line"
id="tspan1338-7"
x="-112.29854"
y="-129.7538"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-101.2884"
y="-129.7538"
id="text1340-9"><tspan
sodipodi:role="line"
id="tspan1338-8"
x="-101.2884"
y="-129.7538"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-90.565475"
y="-129.7538"
id="text1340-6"><tspan
sodipodi:role="line"
id="tspan1338-70"
x="-90.565475"
y="-129.7538"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">4</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-129.24457"
y="-105.27687"
id="text1340-4"><tspan
sodipodi:role="line"
id="tspan1338-84"
x="-129.24457"
y="-105.27687"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">5</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-117.9472"
y="-105.27687"
id="text1340-8"><tspan
sodipodi:role="line"
id="tspan1338-1"
x="-117.9472"
y="-105.27687"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">6</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-106.88921"
y="-105.27687"
id="text1340-68"><tspan
sodipodi:role="line"
id="tspan1338-5"
x="-106.88921"
y="-105.27687"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">7</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-94.538704"
y="-105.27687"
id="text1340-2"><tspan
sodipodi:role="line"
id="tspan1338-19"
x="-94.538704"
y="-105.27687"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">8</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
x="-83.91153"
y="-105.27687"
id="text1340-96"><tspan
sodipodi:role="line"
id="tspan1338-0"
x="-83.91153"
y="-105.27687"
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">9</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 8.6 KiB

63
blog/lastfm_bookmarklets.md Executable file
View File

@@ -0,0 +1,63 @@
---
author: Akbar Rahman
pub_date: Mon, 18 Sep 2023 16:25:48 +0100
title: last.fm bookmarklets
tags: [ last.fm, scripts ]
uuid: e54ebf58-4033-4dae-81db-91db344f1311
---
# last.fm bookmarklets
last.fm doesn't let you see how many scrobbled you've made in one day particularly easily.
Here is a bookmarklet to solve that.
<label for="days"> Number of days to view: </label>
<input type="number" value="1" id="days" placeholder="Days"/><br><br>
<label for="offset"> Offset (e.g. 0 to include today, 7 to look at last week): </label>
<input type="number" value="0" id="offset" placeholder="Offset (Days)" /><br><br>
<label for="username"> last.fm username </label>
<input type="text" value="" id="username" placeholder="Username" /><br><br>
<input type="button" id="button" value="Generate bookmarklet"><br>
<p><a style="display: none" href="" id="scriptLink">Bookmark this link</a></p>
When you press generate bookmarklet, the values `OFFSET`, `DAYS`, `USERNAME` will be
subsituted and put into the link above.
It's always best to inspect bookmarklets though.
Inspect the page to view the script used to generate the bookmarklet.
<textarea cols="109" rows="15" readonly id="scriptText">
javascript: (() => {
const MILLESECONDS_PER_DAY = 1000 * 24 * 60 * 60;
const OFFSET;
const DAYS;
const USERNAME;
const currentDate = new Date();
const to = new Date(currentDate - (OFFSET * MILLESECONDS_PER_DAY));
const from = new Date(to - ((DAYS-1) * MILLESECONDS_PER_DAY));
const toDate = to.getFullYear() + "-" + (to.getMonth()+1) + "-" + to.getDate();
const fromDate = from.getFullYear() + "-" + (from.getMonth()+1) + "-" + from.getDate();
document.location = "https://www.last.fm/user/" + USERNAME + "/library?from=" + fromDate + "&to=" + toDate;
})();
</textarea>
<script>
document.getElementById("button").addEventListener("click", () => {
scriptText = document.getElementById("scriptText").value;
offset = document.getElementById("offset").value;
days = document.getElementById("days").value;
username = document.getElementById("username").value;
newscript = scriptText.replace(
"OFFSET", "OFFSET = " + offset
).replace(
"DAYS", "DAYS = " + days
).replace(
"USERNAME", "USERNAME = '" + username + "'"
);
document.getElementById("scriptLink").href = newscript;
document.getElementById("scriptLink").style = "";
});
</script>

13
blog/readme.md Normal file
View File

@@ -0,0 +1,13 @@
---
title: alv's blog
author: Akbar Rahman
pub_date: Fri, 31 Jul 2020 19:50:51 +0100
blog: true
tags: [ alvs_blog, blog ]
uuid: 2d03893a-eb9b-4923-8024-a223ecbe72f7
---
# alv's blog
this is my blog.
i promise i will try to keep things posted here interesting.

View File

@@ -2,7 +2,11 @@
author: Alvie Rahman
date: \today
title: Bash
tags: [ linux, shell, programming ]
tags:
- linux
- shell
- programming
uuid: a436d67a-1f07-45fb-9241-5dbaa69b4667
---
# `set` builtin[^gnuset]

View File

@@ -0,0 +1,57 @@
---
author: Akbar Rahman
date: \today
title: "Cadence License Manager Install - `java.lang.IllegalArgumentException: :locationICompSelected: Null parameter - InstallComponent ID`"
tags: [ cadence, license_manager, flexlm, java, errors ]
uuid: a5f46736-1ab8-4da1-8737-95de51c95d50
---
# Error
```
[root@host Downloads]# iscape/bin/iscape.sh -batch majorAction=InstallFromArchive archiveDirectory=$(realpath LCU04.30.000_lnx86.Base) installDirectory=$(realpath target)
Initializing InstallScape using JVM at /home/alvi/Downloads/iscape.04.23-s012/runtime/LNX86/bin/java. This might take some time...
WARNING: The DISPLAY environment variable has not been set.
InstallScape might not initialize.
InstallScape Installer (Batch Mode) - 04.23.s12
:locationICompSelected: Null parameter - InstallComponent ID
java.lang.IllegalArgumentException: :locationICompSelected: Null parameter - InstallComponent ID
at com.khanpur.installerng.ArchiveLocationManager.locationICompSelected(ArchiveLocationManager.java:143)
at com.khanpur.installerng.Installer.archiveLocationICompSelected(Installer.java:1156)
at com.khanpur.installer.gui.batch.BatchInstallfromarchive.execute(BatchInstallfromarchive.java:86)
at com.khanpur.installer.gui.batch.BatchView.initialize(BatchView.java:329)
at com.khanpur.installer.gui.batch.BatchView.<init>(BatchView.java:90)
at com.khanpur.installer.gui.InstallerUINoSplash.showBatch(InstallerUINoSplash.java:325)
at com.khanpur.installer.gui.BatchCommand.execute(BatchCommand.java:78)
at com.khanpur.util.TransactionCommand.execute(TransactionCommand.java:74)
at com.khanpur.util.Commandline.runCommands(Commandline.java:223)
at com.khanpur.installer.gui.InstallerUINoSplash.processCommandLine(InstallerUINoSplash.java:340)
at com.khanpur.installer.gui.InstallerUINoSplash.main(InstallerUINoSplash.java:372)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.khanpur.installer.gui.InstallerUI.main(InstallerUI.java:123)
Failed with InstallScape JVM.
Now loading System JVM...
iscape/bin/iscape.sh: line 222: java: command not found
Error:
/usr/bin/which: no java in (/usr/local/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)
Could not use JVM packaged with Installcape. The Java in your path did not work or could not find Java in your path. Ensure that Java 1.6 or later is in your PATH environment variable and restart InstallScape.
```
# Cause
Using the wrong filepath.
The Cadence archives have subfolders to split the software between multiple CDs (a relic of the
past perhaps).
The actual folder to use is the CDs.
# Solution
Use the folder that contains the `.sdx` files (in my case, add `/CDROM1` onto end of
`archiveDirectory`).

View File

@@ -0,0 +1,81 @@
---
author: Akbar Rahman
date: \today
title: Eventbridge Rule (Cloudwatch Rule) Does Not Invoke Lambda When Configured Through Ansible
tags:
- ansible
- aws
- aws_eventbridge
- aws_lambda
- cloudwatch
- eventbridge
- lambda
- permissions
uuid: df3ca083-b6ae-4e35-bb1c-8b3978117c57
---
# Eventbridge Rule (formerly Cloudwatch Rule) Does Not Invoke Lambda When Configured Through Ansible
## Problem
After creating an Eventbridge rule to run a Lambda function with the Ansible module
[`amazon.aws.cloudwatchevent_rule`](https://docs.ansible.com/ansible/latest/collections/amazon/aws/cloudwatchevent_rule_module.html),
the rule does not run Lambda function when it should:
```yaml
- name: "Create lambda function"
register: create_lambda
amazon.aws.lambda:
region: "{{ aws_ec2_region }}"
description: "My Lambda function"
name: "{{ lambda_name }}"
role: "{{ iam_role.iam_role.arn }}"
state: "present"
timeout: 120
vpc_security_group_ids: "{{ sec_group.group_id }}"
vpc_subnet_ids: "{{ subnet_ids }}"
image_uri: "{{ ecr.repository.repositoryUri }}:latest"
- name: "Schedule my Lambda function"
register: lambda_schedule_rule
amazon.aws.cloudwatchevent_rule:
name: "a_unique_rule_name"
region: "{{ aws_ec2_region }}"
schedule_expression: "rate(1 minute)"
state: "present"
targets:
- arn: "{{ create_lambda.configuration.function_arn }}"
id: "a_unique_id"
input: "{{ eventbridge_rule_lambda_event_input }}"
```
Even though creating a seemingly identical setup through the AWS console works fine.
## Cause
The Eventbridge rule is not allowed to invoke this Lambda, as it is not in the Lambda's policy.
## Solution
Use the
[`amazon.aws.lambda_policy`](https://docs.ansible.com/ansible/latest/collections/amazon/aws/lambda_policy_module.html)
module to allow the Eventbridge rule to invoke the Lambda.
Note that, if specifying the Lambda function name to `function_name` (as opposed to the ARN of the
Lambda function), you must specify `version` or otherwise the Lambda function still won't be run!
```yaml
- name: "Allow Eventbridge (Cloudwatch) Rules to invoke lambda"
amazon.aws.lambda_policy:
action: "lambda:InvokeFunction"
function_name: "{{ lambda_name }}"
state: "present"
statement_id: "a_unique_statement_id"
region: "{{ aws_ec2_region }}"
principal: "events.amazonaws.com"
source_arn: "{{ lambda_schedule_rule.rule.arn }}"
version: "{{ create_lambda.configuration.version }}"
```
Solution found thanks to @david-kretch's answer to the same question at
<https://stackoverflow.com/questions/45282939/cloudwatch-event-rule-creation-via-ansible-succeeds-but-not-invoked>.

View File

@@ -2,7 +2,11 @@
author: Alvie Rahman
date: \today
title: Setting Up Nginx and Let's Encrypt in Docker
tags: [ linux, docker, programming ]
tags:
- linux
- docker
- programming
uuid: 2abad576-9921-463b-928d-2381f91488e0
---
# Setting Up Nginx and Let's Encrypt in Docker

12
computery_stuff/flask.md Executable file
View File

@@ -0,0 +1,12 @@
---
author: Akbar Rahman
date: \today
title: Flask
tags: [ python, flask, programming, docker ]
uuid: e513ed96-cb19-4d4c-9894-e337c54659e5
---
# Examples
- [alv.cx-glass](https://git.alv.cx/alvierahman90/alv.cx-glass) --- a pretty minimal example, probably not very production ready but has example of how to use in Docker
- <https://flask.palletsprojects.com/> --- official documentation for Flask

View File

@@ -2,7 +2,11 @@
author: Alvie Rahman
date: \today
title: Git
tags: [ linux, programming, git ]
tags:
- linux
- programming
- git
uuid: 8eb93ba5-72e8-4c25-b1f5-02e25408a14d
---

View File

@@ -2,7 +2,11 @@
author: Alvie Rahman
date: \today
title: GNOME is a Whole Mess
tags: [ gnome, linux, troubleshooting ]
tags:
- gnome
- linux
- troubleshooting
uuid: 635199f2-f2c6-4f94-840f-8f729bde0c13
---
Gnome is, like, a whole mess. These are the weird issues I had to solve.

View File

@@ -2,7 +2,10 @@
author: Alvie Rahman
date: \today
title: Go (golang)
tags: [ golang, programming ]
tags:
- golang
- programming
uuid: 70d24c2e-25f6-4a46-9756-659d13b5149f
---
# Getting Up to Speed With Go

17
computery_stuff/jetson_nano.md Executable file
View File

@@ -0,0 +1,17 @@
---
author: Akbar Rahman
date: \today
title: Jetson Nano
tags: [ nvidia, jetson, jetson_nano, droidcam ]
uuid: f312451a-2cd4-468a-9eef-ca9859c7cd1e
---
# installing Droidcam
figured out with help from <https://hizzely.hashnode.dev/instalasi-droidcam-cli-di-jetson-nano> :pray:
0. build and install libjpeg-turbo version 2.1.2 from github (cmake, make, make install)
0. build droidcam (2.1.3 confirmed working) from source (make) and install (./install-client) (may need to set `PKG_CONFIG_PATH` environment varible to whatever libjpeg turbo installed at (for me, `/opt/libjpeg-turbo/lib64/pkgconfig`))
0. install v4l2loopback-dkms with apt
0. run droidcam (you may need to set `LD_LIBRARY_PATH` environment variable to wherever libjpeg-turbo installed to (for me, `/opt/libjpeg-turbo/lib64`))

View File

@@ -2,7 +2,10 @@
author: Alvie Rahman
date: \today
title: libvirt
tags: [ linux, virtualisation ]
tags:
- linux
- virtualisation
uuid: 62c2f458-f701-4075-8e12-d9b9a59efd1f
---
# issues

View File

@@ -2,7 +2,9 @@
author: Alvie Rahman
date: \today
title: Linux
tags: [ linux ]
tags:
- linux
uuid: 8ef11516-4afd-4f80-abb8-bdce045e8b65
---
# user stuff
@@ -18,3 +20,47 @@ usermod -a -G group user
```bash
usermod -g group user
```
# help i think my device shut down after deleting the current kernel and before installing the second (no entries in systemd-boot/grub/<bootloader>)
0. boot into a live usb of current disto
1. mount the root partition to `/mnt` and the boot partition to the appropriate folder (check
fstab which should be in `/mnt/etc/fstab`, if it says `/efi`, mount it to `/mnt/efi`)
2. chroot into the mounted filesystem:
on arch based systems you can simply run:
```
arch-chroot /mnt
```
on non arch based systems[^1]:
```
mount -t proc /proc /mnt/proc/
mount -t sysfs /sys /mnt/ys/
mount --rbind /dev /mnt/dev/
# only if using uefi
mount --rbind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars/
# for internet access
cp /etc/resolv.conf /mnt/etc/resolv.conf
chroot /mnt /bin/bash
```
3. the system can now be force updated/kernel images can be generated
on arch based systems[^2]:
```
# reinstall all current packages
pacman -Qqen > /root/pkgs.txt # list all installed packages
pacman -S $(< /root/pkgs.txt) # reinstall all installed packages
rm /root/pkgs.txt # clean up
# reinstall dependencies (if there are issues)
pacman -Qqdn > /root/deps.txt # list all installed dependencies
pacman -S $(< /root/deps.txt) # reinstall all installed dependencies
rm /root/deps.txt # clean up
```
[^1]: https://wiki.archlinux.org/title/Chroot [wayback machine](https://web.archive.org/web/20240121115548/https://wiki.archlinux.org/title/Chroot)
[^2]: https://bbs.archlinux.org/viewtopic.php?id=193174 [wayback machine](https://web.archive.org/web/20240129153400/https://bbs.archlinux.org/viewtopic.php?id=193174)

30
computery_stuff/namecheap.md Executable file
View File

@@ -0,0 +1,30 @@
---
author: Akbar Rahman
date: \today
title: Namecheap DNS
tags: []
uuid: d4d9fa2b-3d4c-44f7-a44d-12b0410be633
---
# SRV Records not Showing up on DNS Servers
> There is a bug on Namecheap's DNS configuration interface.
> When defining a SRV Record you must write the subdomain in the protocol box aswell.
> After you save that entry, a visual bug kicks in and the protocol box now only shows the protocol
> itself, but in the backend it's saved as protocol+subdomain, as it should be.
>
> ~ [exore13](https://www.spigotmc.org/threads/solved-multiple-servers-namecheap-srv-record-config.517697/)
So say your SRV record looks something like this:
```
_minecraft _tcp 0 5 25566 peen.mc.alv.cx.
```
You'll have to enter this instead:
```
_minecraft _tcp.peen.mc 0 5 25566 peen.mc.alv.cx.
```

19
computery_stuff/pdfs.md Executable file
View File

@@ -0,0 +1,19 @@
---
author: Akbar Rahman
date: \today
title: PDFs
tags: [ pdf, concatenate ]
uuid: a43eac87-cb19-4c58-a285-cff04c494847
---
# Concatenate PDFs from the Command Line
```
qpdf t1.pdf --pages t1.pdf 1-z t2.pdf 1-z t3.pdf 1-z -- t.pdf
```
```
pdftk t1.pdf t2.pdf t3.pdf cat output t.pdf
```
Original answer by pts [here](https://superuser.com/a/458188)

View File

@@ -2,7 +2,9 @@
author: Alvie Rahman
date: \today
title: Postgres
tags: [ programming ]
tags:
- programming
uuid: 7e44b054-4b6e-4f8c-b9af-9d4c4bf77878
---
\tableofcontents

View File

@@ -2,7 +2,14 @@
author: Alvie Rahman
date: \today
title: Pulseaudio
tags: [ pulseaudio, linux, audio, mixing, microphone, sink ]
tags:
- pulseaudio
- linux
- audio
- mixing
- microphone
- sink
uuid: 4e251354-9afb-49fd-abd9-fedc9b280a25
---
# Collect and Mix Sound Input From Different Sources {#paMixer}
@@ -41,7 +48,7 @@ From <https://www.pclinuxos.com/forum/index.php/topic,119695.msg1159936.html#msg
This will unload _all_ loopback and null-sink modules.
### Destroy Specific Modules {#destsroyMixerSpecific}
### Destroy Specific Modules {#destroyMixerSpecific}
>
> pactl unload-module <module number>

View File

@@ -2,7 +2,12 @@
author: Alvie Rahman
date: \today
title: Python
tags: [ docker, python, programming, io ]
tags:
- docker
- python
- programming
- io
uuid: cd5c50f9-66f4-4a3b-b89a-04a20ecd642b
---
# Issues

View File

@@ -0,0 +1,14 @@
---
author: Akbar Rahman
date: \today
title: University of Nottingham
tags: [ uni ]
uuid: d1b03938-c5b4-48ad-a258-78f96880aa4b
---
### Trying to log into Microsoft 365 sends me to a different organisation's login page
Try one of these links:
- <https://pls.cx/uon_email> (a redirect to the link below)
- <https://outlook.office.com/owa/nottingham.ac.uk>

25
computery_stuff/xps_15_9570.md Executable file
View File

@@ -0,0 +1,25 @@
---
author: Alvie Rahman
date: \today
title: Dell XPS 15 (9570)
tags:
- dell
- xps
- xps_15
- windows
- drivers
uuid: 489c3145-b3b8-43e0-b51c-c788977e2907
---
# Installing Windows: A media driver your computer needs is missing.
> A media driver your computer needs is missing.
> This could be a DVD, USB, or Hard disk driver.
> If you have a CD, DVD, or USD flash drive with the driver on it, please insert it now.
>
> Note: If the installation media for Windows is in the DVD drive or on a USB you can safely remove
> it for this step.
A very misleading error indeed... turns out the issue may be that you need to use a dedicated
[windows image flasher](https://github.com/WoeUSB/WoeUSB)...

View File

@@ -6,4 +6,6 @@ cd `dirname $0`
git pull
cd ..
rm -rf notes.alv.cx/*
notes2web.py -o notes.alv.cx notes
cd /root/gronk
git pull
docker compose up --build

16
internal_link_checker.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# used to alert me if i've written a bad internal link or broken one by changing a header
files="$(find $1 -name '*.html' -type f)"
for filename in $files
do
links="$(grep -oP '<a.*?>' -h $filename | grep -oP '(?<=href="\#).*?(?=")')"
ids="$(grep -oP '(?<=id=").*?(?=")' -h $filename)"
for link in $links
do
[[ "$ids" == *"$link"* ]] \
|| echo Found broken internal link in $filename: $link
done
done

10
readme.md Normal file
View File

@@ -0,0 +1,10 @@
---
title: alv's notes
base_url: https://notes.alv.cx
---
# alv's notes
These are my personal notes. Correctness is not guaranteed.
Best viewed at [notes.alv.cx](https://notes.alv.cx).

12
styles.css Normal file
View File

@@ -0,0 +1,12 @@
@import url("https://styles.alv.cx/fonts/comic-mono-font.css");
@import url("https://styles.alv.cx/modules/dotgrid.css");
@import url("https://styles.alv.cx/modules/alwaysdark.css");
:root {
--dotgrid-size: 15em;
--dotgrid-dot-size: 1px;
}
body {
font-family: 'Comic Mono', monospace;
}

1
uni/.n2w.yml Normal file
View File

@@ -0,0 +1 @@
itags: [ uni ]

1
uni/mmme/.n2w.yml Normal file
View File

@@ -0,0 +1 @@
itags: [ mmme ]

View File

@@ -2,7 +2,15 @@
author: Alvie Rahman
date: \today
title: MMME1026 // Calculus
tags: [ uni, nottingham, mechanical, engineering, mmme1026, maths, calculus ]
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1026
- maths
- calculus
uuid: 126b21f8-e188-48f6-9151-5407f2b2b644
---
# Calculus of One Variable Functions
@@ -172,3 +180,604 @@ To draw the curve of an implicit function you have to rewrite it in the form $y
There may be more than one $y$ value for each $x$ value.
</details>
# Differentiation
The derivative of the function $f(x)$ is denoted by:
$$f'(x) \text{ or } \frac{\mathrm{d}}{\mathrm dx} f(x)$$
Geometrically, the derivative is the gradient of the curve $y = f(x)$.
It is a measure of the rate of change of $f(x)$ as $x$ varies.
For example, velocity, $v$, is the rate of change of displacement, $s$, with respect to time, $t$,
or:
$$v = \frac{\mathrm ds}{dt}$$
<details>
<summary>
#### Formal Definition
</summary>
![](./images/vimscrot-2021-12-27T14:33:20,836330991+00:00.png)
As $h\rightarrow 0$, the clospe of the cord $\rightarrow$ slope of the tangent, or:
$$f'(x_0) = \lim_{h\rightarrow0}\frac{f(x_0+h) - f(x_0)}{h}$$
whenever this limit exists.
</details>
## Rules for Differentiation
### Powers
$$\frac{\mathrm d}{\mathrm dx} x^n = nx^{-1}$$
### Trigonometric Functions
$$\frac{\mathrm d}{\mathrm dx} \sin x = \cos x$$
$$\frac{\mathrm d}{\mathrm dx} \cos x = \sin x$$
### Exponential Functions
$$\frac{\mathrm d}{\mathrm dx} e^{kx} = ke^{kx}$$
$$\frac{\mathrm d}{\mathrm dx} \ln kx^n = \frac n x$$
where $n$ and $k$ are constant.
### Linearity
$$\frac{\mathrm d}{\mathrm dx} (f + g) = \frac{\mathrm d}{\mathrm dx} f + \frac{\mathrm d}{\mathrm dx} g$$
### Product Rule
$$\frac{\mathrm d}{\mathrm dx} (fg) = \frac{\mathrm df}{\mathrm dx}g + \frac{\mathrm dg}{\mathrm dx}f$$
### Quotient Rule
$$ \frac{\mathrm d}{\mathrm dx} \frac f g = \frac 1 {g^2} \left( \frac{\mathrm df}{\mathrm dx} g - f \frac{\mathrm dg}{\mathrm dx} \right) $$
$$ \left( \frac f g \right)' = \frac 1 {g^2} (gf' - fg')$$
### Chain Rule
Let
$$f(x) = F(u(x))$$
$$ \frac{\mathrm df}{\mathrm dx} = \frac{\mathrm{d}F}{\mathrm du} \frac{\mathrm du}{\mathrm dx} $$
<details>
<summary>
#### Example 1
Differentiate $f(x) = \cos{x^2}$.
</summary>
Let $u(x) = x^2$, $F(u) = \cos u$
$$ \frac{\mathrm df}{\mathrm dx} = -\sin u \cdot 2x = 2x\sin{x^2} $$
</details>
## L'Hôpital's Rule
l'Hôpital's rule provides a systematic way of dealing with limits of functions like
$\frac{\sin x} x$.
Suppose
$$\lim_{x\rightarrow{a}} f(x) = 0$$
and
$$\lim_{x\rightarrow{a}} g(x) = 0$$
and we want $\lim_{x\rightarrow{a}} \frac{f(x)}{g(x)}$.
If
$$\lim_{x\rightarrow{a}} \frac{f'(x)}{g'(x)} = L $$
where any $L$ is any real number or $\pm \infty$, then
$$\lim_{x\rightarrow{a}} \frac{f(x)}{g(x)} = L$$
You can keep applying the rule until you get a sensible answer.
# Graphs
## Stationary Points
An important application of calculus is to find where a function is a maximum or minimum.
![](./images/vimscrot-2021-12-27T15:30:26,494800477+00:00.png)
when these occur the gradient of the tangent to the curve, $f'(x) = 0$.
The condition $f'(x) = 0$ alone however does not guarantee a minimum or maximum.
It only means that point is a *stationary point*.
There are three main types of stationary points:
- maximum
- minimum
- point of inflection
### Local Maximum
The point $x = a$ is a local maximum if:
$$f'(a) = 0 \text{ and } f''(a) < 0$$
This is because $f'(x)$ is a decreasing function of $x$ near $x=a$.
### Local Minimum
The point $x = a$ is a local minimum if:
$$f'(a) = 0 \text{ and } f''(a) > 0$$
This is because $f'(x)$ is a increasing function of $x$ near $x=a$.
### Point of Inflection
$$f'(a) = 0 \text{ and } f''(a) = 0 \text { and } f'''(a) \ne 0$$
#### $f'''(a) > 0$
![](./images/vimscrot-2021-12-27T15:38:11,125781274+00:00.png)
#### $f'''(a) < 0$
![](./images/vimscrot-2021-12-27T15:38:29,395666506+00:00.png)
# Approximating with the Taylor series
The expansion
$$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$$
is an example of a *Taylor series*.
These enable us to approximate a given function f(x) using a series which is often easier to
calculate.
Among other uses, they help us:
- calculate complicated function using simple arithmetic operations
- find useful analytical approximations which work for $x$ near a given value
(e.g. $e^x \approx 1 + x$ for $x$ near 0)
- Understand the behaviour of a function near a stationary point
## Strategy
Suppose we know information about $f(x)$ only at the point $x=0$.
How can we find out about $f$ for other values of $x$?
We could approximate the function by successive polynomials,
each time matching more derivatives at $x=0$.
\begin{align*}
g(x) = a_0 &\text{ using } f(0) \\
g(x) = a_0 + a_1x &\text{ using } f(0), f'(0) \\
g(x) = a_0 + a_1x + a_2x^2 &\text{ using } f(0), f'(0), f''(0) \\
&\text{and so on...}
\end{align*}
<details>
<summary>
#### Example 1
For $x$ near 0, approximate $f(x) = \cos x$ by a quadratic.
</summary>
1. Set $f(0) = g(0$:
$$f(0) = 1 \rightarrow g(0) = a_0 = 1$$
2. Set $f'(0) = g'(0$:
$$f'(0) = -\sin0 = 0 \rightarrow g'(0) = a_1 = 0$$
3. Set $f''(0) = g''(0$:
$$f''(0) = -\cos = -1 \rightarrow g''(0) = 2a_2 = -1 \rightarrow a_2 = -0.5$$
So for $x$ near 0,
$$\cos x \approx 1 - \frac 1 2 x^2$$
Check:
$x$ | $\cos x$ | $1 - 0.5x^2$
--- | -------- | ------------
0.4 | 0.921061 | 0.920
0.2 | 0.960066 | 0.980
0.1 | 0.995004 | 0.995
</details>
## General Case
### Maclaurin Series
A Maclaurin series is a Taylor series expansion of a function about 0.
Any function $f(x)$ can be written as an infinite *Maclaurin Series*
$$f(x) = a_0 + a_1x + a_2x^2 + a_3x^2 + \cdots$$
where
$$a_0 = f(0) \qquad a_n = \frac 1 {n!} \frac{\mathrm d^nf}{\mathrm dx^n} \bigg|_{x=0}$$
($|_{x=0}$ means evaluated at $x=0$)
### Taylor Series
We may alternatively expand about any point $x=a$ to give a Taylor series:
\begin{align*}
f(x) = &f(a) + (x-a)f'(a) \\
& + \frac 1 {2!}(x-a)^2f''(a) \\
& + \frac 1 {3!}(x-a)^3f'''(a) \\
& + \cdots + \frac 1 {n!}(x-a)^nf^{(n)}(a)
\end{align*}
a generalisation of a Maclaurin series.
An alternative form of Taylor series is given by setting $x = a+h$ where $h$ is small:
$$f(a+h) = f(a) + hf'(a) + \cdots + \frac 1 {n!}h^nf^{(n)}(a) + \cdots$$
## Taylor Series at a Stationary Point
If f(x) has a stationary point at $x=a$, then $f'(a) = 0$ and the Taylor series begins
$$f(x) = f(a) + \frac 1 2 f''(a)(x-a)^2 + \cdots$$
- If $f''(a) > 0$ then the quadratic part makes the function increase going away from $x=a$ and we
have a minimum
- If $f''(a) < 0$ then the quadratic part makes the function decrease going away from $x=a$ and we
have a maximum
- If $f''(a) = 0$ then we must include a higer order terms to determine what happens
have a minimum
# Integration
Integration is the reverse of [differentiation](#differentiation).
Take velocity and displacement as an example:
$$\int\! v \mathrm dt = s + c$$
where $c$ is the constant of integration, which is required for
[indefinite integrals](#indefinite-integrals).A
## Definite Integrals
The definite integral of a function $f(x)$ in the range $a \le x \le b$ is denoted be:
$$\int^b_a \! f(x) \,\mathrm dx$$
If $f(x) = F'(x)$ ($f(x)$ is the derivative of $F(x)$) then
$$\int^b_a \! f(x) \,\mathrm dx = \left[F(x)\right]^b_a = F(b) - F(a)$$
## Area and Integration
Approximate the area under a smooth curve using a large number of narrow rectangles.
![](./images/vimscrot-2021-12-28T15:18:59,911868873+00:00.png)
Area under curve $\approx \sum_{n} f(x_n)\Delta x_n$.
As the rectangles get more numerous and narrow, the approximation approaches the real area.
The limiting value is denoted
$$\approx \sum_{n} f(x_n)\Delta x_n \rightarrow \int^b_a\! f(x) \mathrm dx$$
This explains the notation used for integrals.
<details>
<summary>
#### Example 1
Calculate the area between these two curves:
\begin{align*}
y &= f_1(x) = 2 - x^2 \\
y &= f_2(x) = x
\end{align*}
</summary>
![](./images/vimscrot-2021-12-28T15:25:12,556743251+00:00.png)
1. Find the crossing points $P$ and $Q$
\begin{align*}
f_1(x) &= f_2(x) \\
x &= 2-x^2 \\
x &= 1 \\
x &= -2
\end{align*}
2. Since $f_1(x) \ge f_2(x)$ between $P$ and $Q$
\begin{align*}
A &= \int^1_{-2}\! (f_1(x) - f_2(x)) \mathrm dx \\
&= \int^1_{-2}\! (2 - x^2 - x) \mathrm dx \\
&= \left[ 2x - \frac 13 x^3 - \frac 12 x^2 \right]^1_{-2} \\
&= \left(2 - \frac 13 - \frac 12 \right) - \left( -4 + \frac 83 - \frac 42 \right) \\
&= \frac 92
\end{align*}
</details>
## Techniques for Integration
Integration requires multiple techniques and methods to do correctly because it is a PITA.
These are best explained by examples so try to follow those rather than expect and explanation.
### Integration by Substitution
Integration but substitution lets us integrate functions of functions.
<details>
<summary>
#### Example 1
Find
$$I = \int\!(5x - 1)^3 \mathrm dx$$
</summary>
1. Let $w(x) = 5x - 1$
2.
\begin{align*}
\frac{\mathrm d}{\mathrm dx} w &= 5 \\
\frac 15 \mathrm dw &= \mathrm dx
\end{align*}
3. The integral is then
\begin{align*}
I &= \int\! w^3 \frac 15 \mathrm dw \\
&= \frac 15 \cdot \frac 14 \cdot w^4 + c \\
&= \frac{1}{20}w^4 + c
\end{align*}
4. Finally substitute $w$ out
$$I = \frac{(5x-1)^4}{20} + c$$
</details>
<details>
<summary>
#### Example 2
Find
$$I = \int\! \cos x \sqrt{\sin x + 1} \mathrm dx$$
</summary>
1. Let
$$w(x) = \sin x + 1$$
2. Then
\begin{align*}
\frac{\mathrm d}{\mathrm dx} w = \cos x \\
\mathrm dw = \cos x \mathrm dx \\
\end{align*}
3. The integral is now
\begin{align*}
I &= \int\! \sqrt w \,\mathrm dw \\
&= \int\! w^{\frac12} \,\mathrm dw \\
&= \frac23w^{\frac32} + c
\end{align*}
4. Finally substitute $w$ out to get:
$$I = \frac23 (\sin x + 1)^{\frac32} + c$$
</details>
<details>
<summary>
#### Example 3
Find
$$I = \int^{\frac\pi2}_0\! \cos x \sqrt{\sin x + 1} \,\mathrm dx$$
</summary>
1. Use the previous example to get to
$$I = \int^2_1\! \sqrt w \,\mathrm dw = \frac23w^{\frac32} + c$$
2. Since $w(x) = \sin x + 1$ the limits are:
\begin{align*}
x = 0 &\rightarrow w = 1\\
x = \frac\pi2 &\rightarrow w = 2
\end{align*}
3. This gives us
$$I = \left[ \frac23w^{\frac32} \right]^2_1 = \frac23 (2^{\frac23} = 1)$$
</details>
<details>
<summary>
#### Example 4
Find
$$I = \int^1_0\! \sqrt{1 - x^2} \,\mathrm dx$$
</summary>
1. Try a trigonmetrical substitution:
\begin{align*}
x &= \sin w \\
\\
\frac{\mathrm dx}{\mathrm dw} = \cos w \\
\mathrm dx = \cos 2 \,\mathrm dw \\
\end{align*}
2.
\begin{align*}
x=0 &\rightarrow w=0 \\
x=1 &\rightarrow w=\frac\pi2
\end{align*}
3. Therefore
\begin{align*}
I &= \int^{\frac\pi2}_0\! \sqrt{1 - \sin^2 w} \cos w \,\mathrm dw \\
&= \int^{\frac\pi2}_0\! \cos^w w \,\mathrm dw
\end{align*}
But $\cos(2w) = 2\cos^2w - 1$ so:
$$\cos^2w = \frac12 \cos(2w) + \frac12$$
Hence
\begin{align*}
I &= \int^{\frac\pi2}_0\! \frac12 \cos(2w) + \frac12 \,\mathrm dw \\
&= \left[ \frac14 \sin(2w) + \frac w2 \right]^{\frac\pi2}_0 \\
&= \left( \frac14 \sin\pi + \frac\pi4 \right) - 0 \\
&= \frac\pi4
\end{align*}
### Integration by Parts
$$uv = \int\! u\frac{\mathrm dv}{\mathrm dx} \,\mathrm dx + \int\! \frac{\mathrm du}{\mathrm dx}v \,\mathrm dx$$
or
$$\int\! u\frac{\mathrm dv}{\mathrm dx} \,\mathrm dx = uv - \int\! \frac{\mathrm du}{\mathrm dx}v \,\mathrm dx$$
This technique is derived from integrating the product rule.
</details>
<details>
<summary>
#### Example 1
Find
$$I = \int\! \ln x \,\mathrm dx$$
</summary>
1. Use
$$\int\! u\frac{\mathrm dv}{\mathrm dx} \,\mathrm dx = uv - \int\! \frac{\mathrm du}{\mathrm dx}v \,\mathrm dx$$
2. Set $u = \ln x$
and $v' = 1$.
3. This means that $u' = \frac1x$ and $v = x$.
4.
\begin{align*}
I &= x\ln x - \int\! x\cdot\frac1x \,\mathrm dx + c \\
&= x\ln x - \int\! \,\mathrm dx + c \\
&= x\ln x - x + c \\
\end{align*}
</details>
# Application of Integration
## Differential Equations
Consider the equation
$$\frac{\mathrm dy}{\mathrm dx} = y^2$$
To find $y$, is not a straightforward integration:
$$y = \int\!y^2 \,\mathrm dx$$
The equation above does not solve for $y$ as we can't integrate the right until we know $y$...
which is what we're trying to find.
This is an example of a first order differential equation.
The general form is:
$$\frac{\mathrm dy}{\mathrm dx} = F(x, y)$$
### Separable Differential Equations
A first order diferential equation is called *separable* if it is of the form
$$\frac{\mathrm dy}{\mathrm dx} = f(x)g(y)$$
We can solve these by rearranging:
$$\frac1{g(y} \cdot \frac{\mathrm dy}{\mathrm dx} = f(x)$$
$$\int\! \frac1{g(y)} \,\mathrm dy = \int\! f(x) \,\mathrm dx + c$$
<details>
<summary>
#### Example 1
Find $y$ such that
$$\frac{\mathrm dy}{\mathrm dx} = ky$$
where $k$ is a constant.
</summary>
Rearrange to get
\begin{align*}
\int\! \frac1y \,\mathrm dy &= \int\! k \mathrm dx + c \\
\ln y &= kx + c \\
y &= e^{kx + c} = e^ce^{kx} \\
&= Ae^{kx}
\end{align*}
where $A = e^c$ is an arbitrary constant.
</details>

View File

@@ -2,7 +2,15 @@
author: Alvie Rahman
date: \today
title: MMME1026 // Complex Numbers
tags: [ uni, nottingham, mechanical, engineering, mmme1026, maths, complex_numbers ]
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1026
- maths
- complex_numbers
uuid: b9be8780-1ab7-402f-9c67-8cc74a74f7a9
---
# Complex Numbers
@@ -30,11 +38,11 @@ tags: [ uni, nottingham, mechanical, engineering, mmme1026, maths, complex_numbe
Given complex number $z$:
$$z = z + iy$$
$$z = x + iy$$
The complex conjugate of z, $\bar z$ is:
$$\bar{z} = z -iy$$
$$\bar{z} = x -iy$$
### Division of Complex Numbers

View File

@@ -0,0 +1,64 @@
---
author: Akbar Rahman
date: \today
title: MMME1026 // Eigenvalues
tags: [ mmme1026, maths, eigenvalues, uni ]
uuid: f2220395-bc97-432e-a1d2-74085f16991d
---
An eigenvalue problem takes the form:
Find all the values of $\lambda$ for which the equation
$$A\pmb{x} = \lambda \pmb{x}$$
has a nonzero solution $\pmb x$, where $A$ is an $n\times n$ matrix and
$\pmb x$ is a column vector.
The equation may be written as
\begin{align*}
A\pmb x &= \lambda I \pmb x \\
\Leftrightarrow A \pmb x - \lambda I \pmb x & = 0 \\
\Leftrightarrow (A-\lambda I)\pmb x &= 0
\end{align*}
($\Leftrightarrow$ means "if and only if")
Non-zero solutions will exist if
$\det(A-\lambda I) = 0$
There are infinitely many eigenvectors for a given eigenvalue.
This is because if $\pmb x$ is an eigenvector of $A$ corresponding to the
eigenvalue $\lambda$ and $c$ is a non-zero scalar, then $c\pmb x$ is also
an eigenvector of $A$:
$$A(c\pmb x) = cA\pmb x = c\lambda \pmb x = \lambda(c\pmb x)$$
In general, if $A$ is an $n\times n$ matrix, then $|A-\lambda I|$ is a
polynomial of degree $n$ in $\lambda$, called the characteristic polynomial.
The characteristic equation is:
$$\lambda^n + c_{n-1}\lambda^{n-1} + c_{n-2}\lambda^{n-2} + \cdots + c_0 = 0$$
<details>
<summary>
#### Example 1 ($2\times2$ example)
</summary>
If $A$ is the matrix
$$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$$
then
$$|A - \lambda I| = \lambda^2 - (a+d)\lambda + (ad-bc)$$
And the standard method for solving a quadratic can be used to find $\lambda$.
</details>

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -2,7 +2,16 @@
author: Alvie Rahman
date: \today
title: MMME1026 // Systems of Equations and Matrices
tags: [ uni, nottingham, mechanical, engineering, mmme1026, maths, systems_of_equations, matrices ]
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1026
- maths
- systems_of_equations
- matrices
uuid: 16edb140-9946-4759-93df-50cad510fe31
---
# Systems of Equations (Simultaneous Equations)

View File

@@ -0,0 +1,322 @@
---
author: Akbar Rahman
date: \today
title: MMME1026 // Vectors
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1026
- maths
- vectors
uuid: ef1669d9-b8c3-4813-8b33-5764a2f57a55
---
Vectors have a *magnitude* (size) and *direction*.
Examples of vectors include force, velocity, and acceleration.
In type, vectors are notated in **bold**: $\pmb{a}$.
In handwriting is is \underline{underlined}.
# Vector Algebra
## Equality
Two vectors are said to be equal if their magnitudes and directions are equal.
You can also do this by checking if their vertical and horizontal components are equal.
## Addition
Two vectors, $\pmb{a}$ and $\pmb{b}$, can be summed together by summing their components.
You can also do this graphically by drawing $\pmb{a}$ and then $\pmb{b}$ by putting its tail on
the tip of $\pmb{a}$.
The sum of the vectors is from the tail of $\pmb{a}$ to the tip of $\pmb{b}$:
![](./images/vimscrot-2022-02-18T16:34:17,290235454+00:00.png)
Vector addition is associative[^d_associative] and commutative[^d_commutative].
## Zero Vector
The *zero vector* is denoted by $\pmb{0}$ and has zero magnitude and arbitrary direction.
$$\pmb{a} + \pmb 0 = \pmb a$$
If $\pmb a + \pmb b = 0$ then it is normal to write
$$\pmb b = -\pmb a$$
$-\pmb a$ is a vector with the same magnitude to $\pmb a$ but opposite direction.
## Multiplication
### Multiplication by a Scalar
Let $k$, an arbitrary scalar and $\pmb a$, an arbitrary vector.
- $k\pmb a$ is a vector of magnitude $|k|$ times that of $\pmb a$ and is parralel to it
- $0\pmb a = 0$
- $1\pmb a = a$
- $(-k)\pmb a = -(k\pmb a)$
- $(-1)\pmb a = -\pmb a$
- $k(\pmb a + \pmb b) = k\pmb a + k\pmb b$
- $(k_1 + k_2)\pmb a = k_1\pmb a + k_2\pmb a$
- $(k_1k_2)\pmb a = k_1(k_2\pmb a)$
### The Scalar Product (Inner Product, Dot Product)
The scalar product of two vectors $\pmb a$ and $\pmb b$ is a scalar defined by
$$\pmb a \cdot \pmb b = |\pmb a||\pmb b|\cos\theta = a_1b_1 + a_2b_2 + a_3b_3$$
where $\pmb a = (a_1, a_2, a_3)$ and $\pmb b = (b_1, b_2, b_3)$
where $\theta$ is the angle between the two vectors (note that $\cos\theta = \cos(2\pi - \theta)$).
This definition does not depend on a coordinate system.
- The dot product is commutative[^d_commutative]
- The dot product is distributive[^d_distributive]
- If $\pmb a$ is perpendicular to $\pmb b$, then $\pmb a \cdot \pmb b = 0$ and they are said to be
orthogonal
- If $\pmb a \cdot \pmb b = 0$ then either
i. The vectors are orthogonal
ii. One or both of the vectorse are zero vectors
- $\pmb a \cdot \pmb a = |\pmb a|^2 = a^2$
The base vectors are said to be *orthonormal* when $\pmb i^2 = \pmb j^2 = \pmb k^2 = 1$ and
$i\cdot j = i\cdot k = j\cdot k = 0$.
### The Vector Product (Cross Product)
The vector product between two vectors is defined by:
$$\pmb a \times \pmb b = |\pmb a||\pmb b|\sin\theta \hat{\pmb n}$$
where $0 \le \theta \le \pi$ is the angle between $\pmb a$ and $\pmb b$ and $\pmb n$ is a unit
vector such that the three vectors from a right handed system:
![](./images/vimscrot-2022-02-18T20:11:12,072203286+00:00.png)
- $\pmb a \times \pmb b = -\pmb b \times \pmb a$ (the vector product is anti-commutative[^d_commutative])
- If $\pmb a \times \pmb b = 0$ then either
i. The vectors are parallel
ii. One or both of the vectors are a zero vector
- $(k_1\pmb a)\times(k_2\pmb b) = (k_1k_2)(\pmb a \times \pmb b)$ where $k_1$, $k_2$ are scalars
- If $\pmb a = (a_1, a_2, a_3)$ and $\pmb b = (b_1, b_2, b_3)$ then
$$\pmb a \times \pmb b = (a_2b_3 - a_3b_2, a_1b_3-a_3b_1, a_1b_2-a_2b_1)$$
- In the notation of determinants, provided we **expand by row 1**:
$$\pmb a \times \pmb b = \begin{vmatrix} \pmb i & \pmb j & \pmb k \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}$$
This is technically not a determinant because not all the elements are numbers but shhhhhh...
### Scalar Triple Product (and co-planar vectors)
\begin{align*}
[ \pmb a, \pmb b, \pmb c ] &= \pmb a \cdot (\pmb b \times \pmb c) \\
&= \pmb b \cdot (\pmb c \times \pmb a) \\
&= \pmb c \cdot (\pmb a \times \pmb b) \\
&= (\pmb b \times \pmb c) \cdot \pmb a \\
&= (\pmb c \times \pmb a) \cdot \pmb b \\
&= (\pmb a \times \pmb b) \cdot \pmb c
\end{align*}
In terms of determinants:
$$
[ \pmb a, \pmb b, \pmb c ] = \begin{vmatrix}
a_1 & a_2 & a_3 \\
b_1 & b_2 & b_3 \\
c_1 & c_2 & c_3
\end{vmatrix}
$$
If $[\pmb a, \pmb b, \pmb c] = 0$ then the vectors are coplanar.
The absolute value of the scalar triple product reperesents the volume of the parallelepiped defined
by those vectors:
![](./images/vimscrot-2022-02-18T20:27:53,322534334+00:00.png)
## The Unit Vector
$$\hat{\pmb a}= \frac{\pmb a}{|\pmb a|}$$
## Components of a Vector
The component of a vector $\pmb a$ in the direction of the **unit vector** $\hat{\pmb n}$ is
$$\pmb a \cdot \hat{\pmb n}$$
![](./images/vimscrot-2022-02-18T20:34:50,128465689+00:00.png)
Vectors are often written in terms of base vectors, such as the Cartesian system's $\pmb i$,
$\pmb j$, and $\pmb k$ in three dimensions.
![](./images/vimscrot-2022-02-18T19:31:50,686289623+00:00.png)
These vectors have unit magnitude, are perpendicular to each other, and are right handed.
If $\pmb a = a_1\pmb i + a_2\pmb j + a_3\pmb k$ then the scalars $a_1$, $a_2$, and $a_3$ are the
*components* of the vector (relative to the base vectors).
### Vector Projections
The *vector projection* of $\pmb a$ onto $\hat{\pmb n}$ is given by
$$(\pmb a \cdot \hat{\pmb n})\hat{\pmb n}$$
![](./images/vimscrot-2022-02-18T21:40:15,724449945+00:00.png)
They look like the same as [vector components](#components-of-a-vector) to me...
no idea what the difference is but uh StackExchange says
([permalink](https://physics.stackexchange.com/a/537690)):
> As pointed out, the projection and component actually refers to the same thing.
> To solve a problem like this it useful to introduce a coordinate system, as you mentioned yourself
> you project onto the x-axis.
> As soon as you introduce a coordinate system you can talk about the components of some vector.
## Position Vectors
If an origin $O$ is fixed, then any point $P$ in space may be represented by the vector $\pmb r$
which has a magnitude and direction given by the line $\overrightarrow{OP}$.
A point $(x, y, z)$ in Cartesian space has the position vector $r = x\pmb i + y\pmb j + z\pmb k$.
## Angle Between Vectors
By rearranging the [dot product equation](#the-scalar-product-inner-product-dot-product) you can get
an equation to find the angle, $\theta$, between two vectors:
$$\cos\theta = \frac{\pmb a \cdot \pmb b}{|\pmb a||\pmb b|} = \frac{a_1b_1 + a_2b_2 + a_3b_3}{|\pmb a ||\pmb b|}$$
# Applications of Vectors
## Application of Vectors to Geometry
### Area of a Parallelogram
$$area = |\pmb a||\pmb b|\sin\theta = |\pmb a \times \pmb b|$$
### Volume of a Parallelepiped
$$volume = | [ \pmb a, \pmb, b, \pmb c ] |$$
### Equation of a Straight Line
A straight line can be specified by
- two points it passes
- one point it passes and a direction
If $\pmb a$ and $\pmb b$ are the position vectors of two distinct points, then the position vectors
of an arbitrary point on the line joining these points is:
$$\pmb r = \pmb a + \lambda(\pmb b - \pmb a)$$
where $\lambda \in \Re$ is a parameter.
![](./images/vimscrot-2022-02-18T21:55:30,367159917+00:00.png)
Suppose $O$ is an origin and $\pmb a$, $\pmb b$, and $\pmb r$ are position vectors on the line such
that
\begin{align*}
\pmb a &= (x_0, y_0, z_0) \\
\pmb b &= (x_1, y_1, z_1) \\
\pmb r &= (x, y, z)\\
\\
(x, y, z) &= (x_0, y_0, z_0) + \lambda((x_1, y_1, z_1) - (x_0, y_0, z_0)) \\
\\
x &= x_0 + \lambda(x_1-x_0) \\
y &= y_0 + \lambda(y_1-y_0) \\
z &= z_0 + \lambda(z_1-z_0) \\
\\
\lambda &= \frac{x-x_0}{x_1-x_0} = \frac{y-y_0}{y_1-y_0} = \frac{z-z_0}{z_1-z_0}
\end{align*}
In the above, the vector $\pmb b - \pmb a$ is in the direction of the line.
Thus the equation of a line can be specified by giving a point it passes through ($\pmb a$, say) and
the direction of the line ($\pmb d = (d_1, d_2, d_3)$, say).
The vector equation is then
$$\pmb r = \pmb a + \lambda\pmb d$$
#### The Cartesian Equation
$$\frac{x-x_0}{d_1} = \frac{y-y_0}{d_2} = \frac{z-z_0}{d_3}$$
### Equation of a Plane
A *plane* can be defined by specifying either:
- three points (as long as they're not in a straight line)
- a point on the plane and two directions (useful for a parametric form)
- specifying a point on the plane and the normal vector to the plane
#### Specifying a Point and a Normal Vector
Let $\pmb a$ be the position vector of a point on the plane, and $\pmb n$ a normal vector to the
plane.
If $\pmb r$ is the position vector of an arbitrary point on the plane, then $\pmb r - \pmb a$ is a
vector lying *in* the plane, so
$$(\pmb r - \pmb a) \cdot \pmb n = 0$$
So the *vector equation* of the plane is
$$\pmb r \cdot \pmb n = \pmb a \cdot \pmb n = D$$
where $\pmb r = (x, y, z)$ and the vectors $\pmb a$ and $\pmb n$ are known.
Suppose $\pmb a$, $\pmb n$, and $\pmb r$ are given by
\begin{align*}
\pmb a &= (x_0, y_0, z_0) \\
\pmb n &= (l, m, p) \\
\pmb r &= (x, y, z)\\
\text{then } 0 &= ((x, y, z) - (x_0, y_0, z_0))\cdot(l, m, p)
\end{align*}
#### Specifying Three Points on a Plane
If we specify three points on a plane with position vectors $\pmb a$, $\pmb b$, and $\pmb c$ the
vectors $\pmb c - \pmb a$ and $\pmb c - \pmb b$ lie *in* the plane.
(The vectors $\pmb a$, $\pmb b$, and $\pmb c$ do not necessarily lie *in* the plane;
rather they take you from $O$ **to** the plane.)
The normal to the plane, $\pmb n$, is then parallel to
$$(\pmb c - \pmb a)\times(\pmb c - \pmb b)$$
and so the equation of the plane is
$$(\pmb r - \pmb a)\cdot((\pmb c - \pmb a)\times(\pmb c - \pmb b)) = 0$$
#### The Angle Between Two Planes
... is the same as the angle between their normal vectors
[^d_associative]: The grouping of elements in in an operation do not matter (e.g. scalar addition: $a+(b+c) = (a+b)+c$)
[^d_commutative]: The order of elements in an operation do not matter (e.g. scalar addition: $a+b = b+a$)
[^d_distributive]: Easiest to explain with examples. Scalar multiplication is said to be distributive because $(a+b)c = ac + bc$

View File

@@ -0,0 +1,72 @@
---
author: Akbar Rahman
date: \today
title: MMME1028 // Dynamics
tags: [ uni, mmme1028, dynamics ]
uuid: e6d3a307-b2e6-40e3-83bb-ef73512d69ad
---
# Circular Motion
$$a_c = r\omega^2$$
$$a = r\alpha \hat{e}_\theta - r\omega^2\hat{e}_r$$
## Moment of Inertia
$$J = mr^2 = \frac{M}{\ddot\theta}$$
The unit of $J$ is kgm$^2$.
Consider a particle of mass $m$ attached to one end of a rigid rod of length $r$.
The rod is pivoting at its other end about point $O$, and experiences a torque $M$.
This torque will cause the mass and the rod to rotate about $O$ with angular velocity
$\dot{\theta}$ an angular acceleration $\ddot{\theta}$.
![](./images/vimscrot-2022-03-10T14:40:59,716300890+00:00.png)
What is the expression for $M$?
Well if break down the moment $M$ into a force, $F$, acting on the mass, we know that the
moment $M = Fr$.
We know $F = ma$, and this case $a = r\ddot{\theta}$ so $M = mr^2\ddot\theta$.
The moment of inertia is $J = mr^2$ so $M = J\ddot\theta$.
If multiple torques are applied to a body the *rotational equation* of the motion is
$$\overrightarrow{M} = \sum_i \overrightarrow{M}_i = J \overrightarrow{\ddot\theta} = J \overrightarrow{\alpha}$$
The moment of inertia of any object is found by considering the object to be made up of lots of
small particles and adding the moments of inertia for each small particle.
The moments of inertia for a body depends on the mass and its distribution about the axis in
consideration.
$$J = \sum_i m_ir^2_i \rightarrow \int\! r^2 \mathrm{d}m$$
### Perpendicular Axis Rule
The perpendicular axis rule states that, for lamina object:
$$J_z = J_x + J_y$$
where $J_x$, $J_y$, and $J_z$ are the moments of inertia along their respective axes.
### Parallel Axes Rule (Huygens-Steiner Theorem)
The parallel axes rule states that:
$$J_A = J_G = md^2$$
where $d$ is the perpendicular distance between the two axes.
![](./images/vimscrot-2022-03-10T15:06:48,355133323+00:00.png)
### Moment of a Compound Object
The moment of inertia for any compound object can be calculated by adding and subtracting the
moments of inertia for its 'standard' components.
### Moment of Inertia of Standard Objects
// TODO

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -11,6 +11,7 @@ tags:
- statics
- dynamics
title: MMME1028 // Statics
uuid: 2ddad9d0-b085-4602-aca9-c573351558ba
---
# Lecture L1.1, L1.2

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -0,0 +1,399 @@
---
author: Alvie Rahman
date: \today
title: MMME1029 // Manufacturing
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1029
- manufacturing
uuid: b5fae4fd-32c3-4fd8-a05a-7440d6c44f9c
---
# Cost Modelling
Key issues in selection:
- Component function, including materials and shape, form, and assembly
- Manufacturing process may greatly affect material properties, such as yield strength
- Similarly, the material will likely decide the manufacturing process
- Cost of a material and manufacture
The main requirement for a product to be viable is
$$cost < price < value$$
Cost modelling equation:
$$C = \frac{mC_m}{1-f} + \frac{C_t}{n} + \frac{1}{\dot n} \left[ \dot C_{oh} + \frac{C_c}{L\cdot t_{wo}} \right]$$
# Shaping Processes
## Casting
- Can be used for large size range
- Molten metal poured into solid mould to give shape
- Heat removed leads to shrinkage
- We need to be able to melt the metal and handlethe molten metal
- Mould degradation by the liquid metal needs to be considered
- Heat flowing from the molten metal into the mould causes a drop in temperature so solidification
starts from outside inwards
- Rate of solidification depends on rate of heat flow into mould
### Types of Mould
- Expendable mould (sand, plaster, ceramic)
- The mould is used once, being broken to release the casting
- Can have multiple use or single use pattern (investment and lost foam casting
- Multiple mold casting
- Die casting (pressure die casting)
- Permanent mould casting (gravity die casting)
#### Sand Casting
![](./images/vimscrot-2022-02-21T16:36:48,640821636+00:00.png)
- Wide range of metals can be cast
- Almost no limit to size and shape of casting
- Poorer tolerances than other proces, rough surface texture
- Slow
- Economic for a low number of castings
- Applications include cylinder blocks and large pipe fittings
#### Investment Casting
- A high cost process
- Used mostly for complex shapes, such as sculptures, jewellery, and gas turbine blades
- Can be used for a wide range of metals
- Very high precision and surface finish
1. Make a master die
2. Make wax pattern by casting wax into master die
3. Coat wax pattern with investment material
1. First with a slurry of water and fine ceramic to capture fine details
2. Then coat with stucco, which is a thicker coating for strength
4. Heat mould to melt wax out, bake and preheat mould
5. Pour in molten metal
6. Wait for solidification, break mould when done
#### Permanent Mould Casting (Gravity Die Casting)
- Mould cavity is machined into mating metal blocks
- Molten material poured into mould
- Mould material is cast iron, steel, bronze, graphite
- Mould must disassebmble without locking
- Mould is expensive but can be reused (typically around 25k times)
- Mould life is reduce by casting high meling point metals
- Good surface finish and dimensional accuracy
- Cooling is rapid therefore high production rates
- Example use is a piston
#### Die Casting (High Pressure Die Casting)
- Dies must be able to withstand high pressure
- 0.1 mm slits at parting lines provide escape for air
- Dies are made of expensive tool steels
- High volume production is necessary to justify costs
- Generally limited to low viscosity, low melting point, non ferrous metals like Al, Zn, Mg, and Pb
- Good surface finish
- Precision castings with thickness between 0.75 mm and 12 mm
### Design of Castings
- Distribute castings evently around parting planes
- Need to be able to get patterns out of moulds and casting out of moulds where applicable
- No re-entrants (complex multi-part moulds may be able to avoid this restriction)
- Draft angle between surfaces
- Need to be able to get solid patternout of mould in sand casting
- Need to be able to get solid casting out of mould in die casting
- Allow for shrinkage --- dimensions of casting mould/pattern needs to be made so that part is
desired size after shrinkage
- Avoid rapid change in section or direction:
![](./images/vimscrot-2022-02-21T17:12:20,117329889+00:00.png)
### Solifidification of Metals
- How well the liquid fills detail depends on viscosity of liquid
- During freezing, latent heat of fusion is removed
- During freezing, material is a solid/liquid mixture
- There is a significant (~7 %v) shrinkage during solidification
- Heat flows down steepest thermal gradient so usually there is an actively cooled section
- Thin sections freeze faster than thick sections
### Castability
- Low melting point
- Low viscosity and surface tension
- Low solidification contraction
- Low thermal capacity and high conductibity
- Low solubility
- Not contaminated by air
## Deformation
When a metal is plastically deformed, dislocations move and multiply.
Annealed aluminium may have a dislocatio density of around 200 m per mm$^3$.
This is a very low amount.
A heavily cold worked piece may have a density of up to 270 km per mm$^3$.
As dislocation density increases, the dislocations impede the motion of other dislocations.
This means that to continue plastically deforming, more stress has to be applied.
The stress goes down towards the end of the graph due to the material necking, meaning the
material gets thinner.
This means that the engineering stress is lower as the true area is lower.
The true stress, however, is going up:
![](./images/vimscrot-2022-02-28T20:01:59,453437307+00:00.png)
### Effect of Prior Deformation (*Work Hardening*)
![](./images/vimscrot-2022-02-28T20:02:42,050513187+00:00.png)
See
[here](materials.html#work-hardening-and-cold-working)
for more information
### Effect of Temperature (Diffusion)
In an alloy, atoms tend to migrate from regions of high concentration to low concentration.
This is diffusion.
More information on diffusion [here](materials.html#diffusion).
### Annealing
Annealing is a process by which a component is heated to reduce work hardening.
![](./images/vimscrot-2022-02-28T20:32:47,838820599+00:00.png)
These are diffusional processes and only occur at higher temperatures.
When the temperature of a material, $T > 0.55T_m$, it is said to be hot.
A material being worked on hot has its deformations eliminated as fast as they are created.
A material is said to be cold when $T < 0.35T_m$.
# Powder Processes
Poweders can plowflow if forces between them are low
With small amounts of binder, they can form "*plastic*" materials like clay.
A *slurry* can be formed with a liquid carrier (where there is enough liquid to separate particles).
In a slurry, often you want to reduce liquid content but avoid the particles touching or attracting
each other.
Adding a *deflocculant*[^d_deflocculant] results in the formation of a stable *slip*.
Making the powders is often quite expensive when you have a controlled size distribution.
## Clay and Ceramics
Clay is an abundant raw material but it needs to be milled and screen for a controlled size
distribution.
When mixed with water it forms a *plastic* material.
Structural clay products include bricks, tiles, and pipes.
Other proucts include whitewares such as porcelain, pottery, and tableware.
Ways to form the clay include pressing, isostatic pressing, extrusion, and machining.
Engineering ceramics (e.g. silicon carbide, alumina) are shaped with small amounts of binder ---
commonly pressed or isostatically pressed.
## Slip Casting
1. Pour slip into a mould (e.g. plaster of Paris)
2. The mould is extremely water absorbing. This results in the remaining part developing some
structural integrity.
3. Remove the mould and place in the oven to reduce water content.
4. Fire to harden
5. Add glaze and fire again.
Drying leads to shrinkage and potential cracking.
It also gives strength and allows for handling and maybe machining.
![](./images/vimscrot-2022-02-28T22:03:43,392791602+00:00.png)
## Sintering of Metals and Ceramics
![](./images/vimscrot-2022-02-28T22:17:23,587537954+00:00.png)
Atoms diffuse to points of contact, creating bridges and reducing the pore size.
Diffusion is driven by a desire to reduce the surface area as surfaces are regions of high energy.
## Powdering Metallurgy
- Competitive with processes like casting, forging, machining
- Used when the melting point is too high, a chemical reaction occurs at melting point, the part is
too hard to machine, or a very large quantity (on the order of 100 000) of the part is needed
- Nearly 70% of parts produced is by powder metallurgy
- Good dimensional accuracy
- Controlloable porosity
- Size range from balls in ball point pens to parts weighing 50 kg
Basic steps of powder metallurgy:
1. Powder production (commonly atomization) --- this is often a costly process and you must minimize
oxidation of the metal
2. Blending/mixing --- add binders to keep the particles together and lubricants to reduce damage to
dies and aid consolidation
3. Powder consolidation
- Shaping in a die
- 100-900 MPa of pressure applied
- Fast process as no heat needs to be removed
4. Sintering at $0.7T_m$ to $0.9T_m$
Shaping equipment has no requirement to be able to withstand high temperatures and the sintering
equipment does not have the need for complex designs.
This separates problems, making them easier to design.
The pressing equipment is costly but the time spent pressing is quite small, allowing for greater
throughput.
Additionally, the furnace can operate continuously and is simple and cost effective.
![](./images/vimscrot-2022-02-28T22:50:45,735174146+00:00.png)
### Green Density
The *green density* is a fraction of the true density.
A low green density will result in high shrinkage on sintering.
## Moulding
Moulding is a shaping process used for viscous materials (typically polymers and glasses).
Here the material can hold a shape unsupported but not for very long or under even small stresses.
In order to mould a material we must raise the temperature above the glass transition temperature,
$T_g$.
At this temperature, the C-C bond in the chapolymer chain are able to easily rotate around each
other.
Large side chains or molecules on the main chain make it harder to rotate these bonds, making
$T_g$ higher.
Polar groups (e.g. chloride, cynaide, and hydroxide) have also hinder bond rotation.
More information about polymers
[here](https://notes.alv.cx/notes/uni/mmme/1029_materials_and_manufacturing/materials.html#polymers-1).
## Extrusion
Extrusion produced parts of constant cross section, like pipes and rods.
The process is used primarily with thermoplastics and 60% of polymers are prepared by extrusion.
![](./images/vimscrot-2022-03-01T18:28:42,810593415+00:00.png)
## Blow Moulding
Blow moulding is a rapid process with low labour costs.
It produces hollow components that do not require a constant thickness, such as
bottles, petrol tanks, and drums.
Common materials to blow mould are HDPE, LDPE, PP, PET, and PVC.
There are three common types of blow moulding:
- Extrusion blow moulding
- Injetion blow moulding
- Stretch-blow processes
However, they involve the following stages:
1. A tubular preform, called a *parison* (a word I haven't been able to remember since GCSE) is
produced by either extrusion of injection moulding
2. The *parison* is transferred into a cooled split-mould
3. The *parison* is sealed and inflated to take up the shape of the mould
4. The moulding is let to cool and solifidies under pressure
5. The mould is opened and moulding is ejected
![](./images/vimscrot-2022-03-01T18:30:18,545745201+00:00.png)
## Injection Moulding
1. Powder or pellets of polymer heated to liquid state (low viscosity)
2. Under pressure, the liquid polymer is forced into a mould through a *sprue*, a small opening
3. The pressurized material is held in the mould until it solidifies
4. The mould is opened and the part is removed by ejector pins
Selection was cancelled by keystroke or right-click.
![](./images/vimscrot-2022-03-01T21:30:56,215686378+00:00.png)
Theromoplastics are most common in injection moulding.
A very high level of detail is attainable through this process and it produced little waste.
Similar to [Die Casting](#die-casting-high-pressure-die-casting), you must consider corners (avoid
sharp ones), draft angles (so you can get the part out), and section thickness (using ribs instead
is preferable).
Due to the high capital cost, injection moulding is only economical at high production volumes.
### Co-Injection Moulding
There is *sequential moulding* (one after the other) and *co-injection moulding* (together).
These processes reduce assembly costs by integrating the parts and can use low grade recycled
material for the inside of a component.
It also allows for a part have to have multiple colours.
This process requires special attention to be payed to shrinking/cooling.
## Rotational Moulding
Rotational moulding involves coating the insides of a heated mould with a thermoplastic.
It is a low pressure alternative to blow moulding for making hollow components and is used
for large components such as storage tanks, boat hulls, kayaks, and cones.
## Moulding for Thermosetting Polymers
There are two types:
a. Compression moulding
b. Transfer moulding
![](./images/vimscrot-2022-03-01T22:15:05,965638775+00:00.png)
### Compression Moulding
For thermoplastics, the mould is cooled before removoal so the part will not lose its shape.
Thermosets, however, may be ejected while they are hot so long as curing is complete.
The process is slow but the material only moves a short distance and has lower mould pressures.
It also does minimal damage to reinforcing fibres in composites and it is possible to make large
parts.
More manual labour is required and has longer cycle times than injection moulding.
# Machining Processes
## Advantages of Machining Processes
- High precision of geometrical dimensions, tolerances, and surface finishes
- Is able to make one off prototypes in production grade material
- Creates high volume production tooling
- Increasing hard/brittle/fragile/tough materials can only be machines
- Some designs are so complex that machining is the only realistic process to make them with
## Disadvantages of Machining Processes
- Material is wasted (as it is a subtractive process)
- Complex parts require expensive machines to make and making them can take a long time
- Parts need to be set up using fixtures. These fixtures get increasingly complex with the part.
- Faster production rates and harder materials wear down the tools.
# Glossary
[^d_deflocculant]: a substance which, when added to scattered particles in suspension, causes a reduction in apparent viscosity. Deflocculants are substances which prevent flocculation by increasing zeta potential and therefore the repulsive forces between particles. (<https://digitalfire.com/article/deflocculants%3A+a+detailed+overview>)

View File

@@ -2,13 +2,25 @@
author: Alvie Rahman
date: \today
title: MMME1029 // Materials
tags: [ uni, nottingham, mechanical, engineering, mmme1029, materials ]
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1029
- materials
uuid: 755626f6-53ae-473a-8ff8-185ca9427bfd
---
\tableofcontents
<details>
<summary>
# Lecture 1 (2021-10-04)
</summary>
## 1A Reading Notes
### Classification of Energy-Related Materials
@@ -22,17 +34,17 @@ tags: [ uni, nottingham, mechanical, engineering, mmme1029, materials ]
usually associated wit structural and mechanical properties or long standing chemical effects like
corrosion:
- fossil fuels
- hydroelectric
- oil from shale and tar
- sands
- coal gasification
- liquefaction
- geothermal energy
- wind power
- bomass conversion
- solar cells
- nuclear reactors
- fossil fuels
- hydroelectric
- oil from shale and tar
- sands
- coal gasification
- liquefaction
- geothermal energy
- wind power
- bomass conversion
- solar cells
- nuclear reactors
### Applications of Energy-Related Materials
@@ -107,8 +119,15 @@ work:
> Young's modulus, specific heat, coefficient of thermal expansion
</details>
<details>
<summary>
# Lecture 2
</summary>
## Properties of the Classes
### Metals
@@ -264,6 +283,8 @@ $$\rho = \frac m v$$
> ~~C~~ B
</details>
# Polymers
## Introduction to Polymers
@@ -304,6 +325,19 @@ They are made of long carbon-carbon chains.
![](./images/vimscrot-2021-11-01T11:13:39,370133338+00:00.png)
## Industrially Important Polymers
The worldwide production of polymers in 2019 was $368\times10^6$ tonnes and the majority is from
just 5 polymers:
- Polyethylene (PE) --- wire insulation, flexible tubing, squeezy bottles
- Polypropyene (PP) --- carpet fibres, ropes, liquid containers, pipes, chairs in Shoreham Academy
- Polyvinyl chloride (PVC) --- bottles, hoses, pipes, valves, wire insulation, toys
- Polystyrene (PS) --- packaging foam, egg cartons, lighting panels
- Polyethylene terephthalate (PET) --- carbonated drinks bottles
All of these materials are low cost.
## Thermoplastics
The simplest polymer is poly(ethene):
@@ -1056,7 +1090,7 @@ As you decrease grain size, you get more grain boundaries which basically create
to prevent slip.
This is because a dislocation would have to change orientation across a grain boundary and "ionic
disorder in the grain boundary results in discontinuity of slip" (A.B Seddon University of
disorder in the grain boundary results in discontinuity of slip" (A.B Seddon, University of
Nottingham 2020) (I think that's repeating it but it said it on the slideshow sooo...).
So for any given metal, the fine grained is harder and has greater yield stress than the coarse
@@ -1070,6 +1104,41 @@ where $d$ is the grain size and $\sigma_0$ and $k_y$ are material constants.
Therefore a plot of $\sigma_{yield}$ against $d^{-0.5}$ would results in a straight line.
## Heat Treatment of Metals
These processes are to change a material's mechanical properties, not change its shape.
### Phase Diagrams
Here is an example of a *two component phase diagram* with a familiar system:
![](./images/vimscrot-2022-03-07T14:16:57,570858805+00:00.png)
The component in this case are sugar and water, but not syrup.
A *phase* is a chemically and physically distinct species as we can have a change in phase that goes
from solid to solid.
The *solubility limit* is the maximum concentration for which only a solution occurs.
In the case of this system, thee limit increases with temperature.
Here is a generic phase diagram for a generic *A-B* system:
![](./images/vimscrot-2022-03-07T14:26:08,092894184+00:00.png)
- L - liquid
- $\alpha$ --- a solid phase but still a solution. B can dissolve into A
- $\beta$ --- a solid phase but still a solution. A can dissolve into B
### Annealing
Annealing is a process by which a component is heated to remove the effects of cold work.
![](./images/vimscrot-2022-03-07T14:15:01,296649522+00:00.png)
These are diffusional processes and only occur at high temperatures.
The driver for diffusion is the removal of high energy defects from the system.
# Diffusion
Diffusion is atomic or ionic movement down a concentration gradient.
@@ -1126,7 +1195,74 @@ You can apply the Arrhenius equation for all thermally activated diffusion:
$$D = D_0 \exp{\left( - \frac{Q}{RT} \right)}$$
where $Q$ is the activation energy and $R$ is the ideal gas constant (8.31 J k$^{-1}$ mol$^{-1}$).
where $D$ is the diffusion coefficient, $D_0$ is the frequency factor, $Q$ is the activation energy,
$R$ is the ideal gas constant (8.31 J k$^{-1}$ mol$^{-1}$).
You can find the diffusion distance, $x$, with the following equation:
$$x ~ \sqrt{Dt}$$
![](./images/vimscrot-2022-02-28T20:31:12,395307966+00:00.png)
# Materials in Sustainable Transport
- Concerns over use of fossil fuels, climate change
- Const of energy
- Energy use in making and moving vehicles
- Rising energy prices mean cost of fuel is comparable to cost of car
- 1/4 of energy used in UK is to transport goods and people
- Legislation and voluntary targets set by EU to improve fuel efficiency
- In 2015 average CO2 emmisions as 130 g / km
- Engine powerhas gone up significantly from 2001 to 2018 (~30%) yet engine displracement has gone
down ~10% and CO2 emissions down ~18% while weight has gone up ~10%
## Is the car emissions reduction target significant?
Overall CO2 emissions in 2016 is 466 Megatonnes.
Does a reduction from 130 g / km to 95 g / km (a 35 g/km reduction) make a significant difference?
There are 33 million registered cars in the uk.
If they average around 8000 miles each (~13000 km) per year that's a ~15 Megatonne reduction,
or about 3% of the annual C02 emmissions, a significant reduction.
## Materials in Cars
- Most of the energy used by cars is during driving (71%)
- This means the mass of the vehicle has a great effect on its emmissions across a lifetime
- The body, suspension, drivetrain, and interior all contribute roughly a quarter to the mass of the
car
- However, the mass of cars are increasing
### Material Substitution
- The material will likely have performance requirements:
- It may need to be a physical size
- It may need to operate at certain temperatures
- It may need to bear a certain load
- The component mustalso be designed for convenient manufacturing, assembly, servicing, disposal,
remanufacturing and/or disassembly
#### Case Study --- 2012 Honda Accord
- Body --- opted to stay with steel --- aluminium intense and multi-material approaches were both
rejected due to higher costs and limitations in manufacturing and assembly.
Recyclability was also noted as an issue due to different grades of aluminium needing to be
separated at end of life.
- Doors and bonnets --- move to aluminium from steel --- more costly but the mass savings made this
option worth it
- Wiring --- aluminium to copper --- lower mass for same conductivity, copper is more expensive
(I think)
- Seats --- steel to composites or magnesium structural components --- very high weight savings
## Choosing a Material
# Glossary

View File

@@ -2,10 +2,18 @@
author: Alvie Rahman
date: \today
title: MMME1048 // Fluid Dynamics
tags: [ uni, nottingham, mechanical, engineering, fluid_mechanics, mmme1048, fluid_dynamics ]
tags:
- uni
- nottingham
- mechanical
- engineering
- fluid_mechanics
- mmme1048
- fluid_dynamics
uuid: b88f78f8-a358-460b-9dbb-812e7b1ace92
---
\newcommand\Rey{\mbox{\textit{Re}}}
\newcommand\Rey{\text{Re}}
\newcommand\textRey{$\Rey$}
# Introductory Concepts
@@ -14,9 +22,9 @@ These are ideas you need to know about to know what's going on, I guess?
## Control Volumes
A control volume is a volume with an imaginary boundry to make it easier to analyze the flow of a
A control volume is a volume with an imaginary boundary to make it easier to analyse the flow of a
fluid.
The boundry is drawn where the properties and conditions of the fluid is known, or where an
The boundary is drawn where the properties and conditions of the fluid is known, or where an
approximation can be made.
Properties which may be know include:
@@ -25,7 +33,7 @@ Properties which may be know include:
- Temperature
- Viscosity
The region in the control volume is analyed in terms of enery and mass flows entering and leaving
The region in the control volume is analysed in terms of energy and mass flows entering and leaving
the control volumes.
You don't have to understand what's going on inside the control volume.
@@ -42,7 +50,7 @@ momentum or the air passing through the engine.
![](./images/vimscrot-2021-11-03T21:51:51,497459693+00:00.png)
The control volume is drawn far enough in front of the engine that the air velocity entering can
be assumed to be at atmospheric pressurce and its velocity negligible.
be assumed to be at atmospheric pressure and its velocity negligible.
At the exit of the engine the boundary is drawn close where the velocity is known and the air
pressure atmospheric.
@@ -89,7 +97,7 @@ with respect to time, like the opposite of steady flow.
## One Dimensional Flow
In one dimensional (1D) flow it is assumed that all properties are uniform over any plane
perpedenciular to the direction of flow (e.g. all points along the cross section of a pipe have
perpendicular to the direction of flow (e.g. all points along the cross section of a pipe have
identical properties).
This means properties can only flow in one direction---usually the direction of flow.
@@ -124,7 +132,7 @@ Same reasoning with if they are not parallel.
### Pathlines
A pathline shows the route taken by a single particle during a given time interval.
It is equivalent to a high exposure photograph which traces the moevement of the particle marked.
It is equivalent to a high exposure photograph which traces the movement of the particle marked.
You could track pathlines with a drop of injected dye or inserting a buoyant solid particle which
has the same density as the solid.
@@ -139,7 +147,7 @@ Examples of this are line dye or a smoke stream which is produced from a continu
### Viscosity
A fluid offers resisistance to motion due to its viscosity or internal friction.
A fluid offers resistance to motion due to its viscosity or internal friction.
The greater the resistance to flow, the greater the viscosity.
Higher viscosity also reduces the rate of shear deformation between layers for a given shear stress.
@@ -176,10 +184,10 @@ to the velocity gradient when straight and parallel flow is involved:
$$\tau = \mu\frac{\mathrm{d}v}{\mathrm{d}y}$$
Where $\mu$ is the constant of proportinality and known as the dynamic viscosity, or simply the
Where $\mu$ is the constant of proportionality and known as the dynamic viscosity, or simply the
viscosity of the fluid.
This is Newton's Law of Viscosity and fluids that ovey it are known as Newtonian fluids.
This is Newton's Law of Viscosity and fluids that obey it are known as Newtonian fluids.
### Viscosity and Lubrication
@@ -214,15 +222,15 @@ Between fully laminar and fully turbulent flows is a transition region.
### Development of the Reynolds Number
In laminar flow the most influentialfactor is the magnitude of the viscous forces:
In laminar flow the most influential factor is the magnitude of the viscous forces:
$$viscous\, forces \propto \mu\frac v l l^2 = \mu vl$$
where $v$ is a characteristic velocit and $l$ is a characteristic length.
where $v$ is a characteristic velocity and $l$ is a characteristic length.
In turbulent flow viscous effects are not significant but inertia effects (mixing, momentum
exchange, acceleration of fluid mass) are.
Interial forces can be represented by $F = ma$
Inertial forces can be represented by $F = ma$
\begin{align*}
m &\propto \rho l^3 \\
@@ -232,7 +240,7 @@ a &= \frac{dv}{dt} \\
&\therefore \text{Interial forces} \propto \rho l^2\frac{v^2} l = \rho l^2v^2
\end{align*}
The ratio of internalforces to viscous forces is called the Reynolds number and is abbreviated to
The ratio of internal forces to viscous forces is called the Reynolds number and is abbreviated to
Re:
$$\Rey = \frac{\text{interial forces}}{\text{viscous forces}} = \frac {\rho l^2v^2}{\mu vl} = \frac {\rho vl} \mu$$
@@ -240,12 +248,12 @@ $$\Rey = \frac{\text{interial forces}}{\text{viscous forces}} = \frac {\rho l^2v
where $\rho$ and $\mu$ are fluid properties and $v$ and $l$ are characteristic velocity and length.
- During laminar flow, $\Rey$ is small as viscous forces dominate.
- During turbulent flow, $\Rey$ is large as intertial forces dominate.
- During turbulent flow, $\Rey$ is large as inertial forces dominate.
\textRey is a non dimensional group.
It has no units because the units cancel out.
Non dimensional groups are very important in fluid mechancics and need to be considered when scaling
Non dimensional groups are very important in fluid mechanics and need to be considered when scaling
experiments.
If \textRey is the same in two different pipes, the flow will be the same regardless of actual
@@ -277,7 +285,7 @@ $$\frac 1 \rho \frac{\delta p}{\delta s} + g\frac{\delta z}{\delta s} + v\frac{\
## Assumptions / Conditions
The Euler euqation applies where the following can be assumed:
The Euler equation applies where the following can be assumed:
- Steady flow
- The fluid is inviscid
@@ -338,11 +346,11 @@ It is split into 3 parts:
Divide the energy form by $g$:
$$\frac\rho{\rho g} + z + \frac{v^2}{2g} = H_T$$
$$\frac p {\rho g} + z + \frac{v^2}{2g} = H_T$$
where $H_T$ is constant and:
- $\frac{p}{\rho g}$ --- static/pressure haed
- $\frac{p}{\rho g}$ --- static/pressure head
- $z$ --- elevation head
- $\frac{v_2}{2g}$ --- dynamic/velocity head
- $H_T$ --- total head
@@ -384,3 +392,264 @@ Head form:
\frac{p_s}{\rho g} + z + \frac{v^2}{2g} &= \text{total head} \\
\frac{p_s}{\rho g} + z &= \text{piezometric head}
\end{align*}
# Steady Flow Energy Equation (SFEE) and the Extended Bernoulli Equation (EBE)
SFEE is a more general equation that can be applied to **any fluid** and also is also takes
**heat energy** into account.
This is useful in applications such as a fan heater, jet engines, ICEs, and steam turbines.
The equation deals with 3 types of energy transfer:
1. Thermal energy transfer (e.g. heat transfer from central heating to a room)
2. Work energy transfer (e.g. shaft from car engine that turns wheels)
3. Energy transfer in fluid flows (e.g. heat energy in a flow, potential energy in a flow, kinetic
energy in a flow)
## Derivation of Steady Flow Energy Equation
#### Consider a control volume with steady flows in and out and steady transfers of work and heat.
The properties don't change with time at any any location and are considered uniform over inlet and
outlet areas $A_1$ and $A_2$.
For steady flow, the mass, $m$, of the fluid **within the control volume** and the total energy, $E$,
must be constant.
$E$ includes **all forms for energy** but we only consider internal, kinetic, and potential energy.
#### Consider a small time interval $\delta t$.
During $\delta t$, mass $\delta m_1$ enters the control volume and $\delta m_2$ leaves:
![](./images/vimscrot-2022-03-01T22:47:31,932087932+00:00.png)
The specific energy $e_1$ of fluid $\delta m_1$ is the sum of the specific internal energy, specific
kinetic energy, and specific potential energy:
$$e_1 = u_1 + \frac{v_1^2}{2} gz_1$$
$$e_2 = u_2 + \frac{v_2^2}{2} gz_2$$
Since the mass is constant in the control volume, $\delta m_1 = \delta m_2$.
#### Applying the First Law of Thermodynamics
The control volume is a system for which $\delta E_1$ is added and $\delta E_2$ is removed::
$$\delta E = \delta E_2 - \delta E_1$$
$E$ is constant so applying the
[first law of thermodynamics](thermodynamics.html#st-law-of-thermodynamics)
we know that:
$$\delta Q + \delta W = \delta E$$
We can also say that:
$$\delta E = \delta E_2 - \delta E_1 = \delta m(e_2 - e_1)$$
#### The Work Term
The work term, $\delta W$, is made up of shaft work **and the work necessary to deform the system**
(by adding $\delta m_1$ at the inlet and removing $\delta m_2$ at the outlet):
$$\delta W = \delta W_s + \text{net flow work}$$
Work is done **on** the system by the mass entering and **by** the system on the mass leaving.
For example, at the inlet:
![](./images/vimscrot-2022-03-01T22:59:14,129582752+00:00.png)
$$\text{work done on system} = \text{force} \times \text{distance} = p_1A_1\delta x = p_1\delta V_1$$
Knowing this, we can write:
$$\delta W = \delta W_s + (p_1\delta V_1 - p_2\delta V_2)$$
#### Back to the First Law
Substituting these equations:
$$\delta E = \delta E_2 - \delta E_1 = \delta m(e_2 - e_1)$$
$$\delta W = \delta W_s + (p_1\delta V_1 - p_2\delta V_2)$$
into:
$$\delta Q + \delta W = \delta E$$
gives us:
$$\delta Q + \left[ \delta W_s + (p_1\delta V_1 - p_2\delta V_2)\right] = \delta m (e_2-e_1)$$
Dividing everything by $\delta m$ and with a bit of rearranging we get:
$$q + w_s = e_2-e_1 + \frac{p_2}{\rho_2} - \frac{p_1}{\rho_1}$$
#### Substitute Back for $e$
$$e = u + \frac{v^2}{2} + gz$$
This gives us:
$$q + w_s + \left[ u_2 + \frac{p_2}{\rho_2} + gz_2 + \frac{v_2^2}{2} \right] - \left[ u_1 + \frac{p_1}{\rho_1} + gz_1 + \frac{v_1^2}{2} \right]$$
#### Rearrange and Substitute for Enthalpy
By definition, enthalpy $h = u + pv = u + \frac p \rho$.
This gives us the equation:
$$q + w_s = (h_2 - h_1) + g(z_2-z_1) + \frac{v_2^2-v_1^2}{2}$$
This equation is in specific energy form.
Multiplying by mass flow rate will give you the power form.
## Application of the Steady Flow Energy Equation
#### Heat Transfer Devices
Like heat exchangers, boilers, condensers, and furnaces.
In this case, $\dot W = 0$, $\delta z ~ 0$, and $\delta v^2 ~ 0$ so the equation can be simplified
to just
$$\dot Q = \dot m(h_2-h_1) = \dot m c_p(T_2-T_1)$$
#### Throttle Valve
No heat and work transfer.
Often you can neglect potential and kinetic energy terms, giving you:
$$0 = h_2-h_1)$$
#### Work Transfer Devices
e.g. Turbines, Pumps, Fans, and Compressors
For these there is often no heat transfer ($\dot Q = 0$) and we can neglect potential
($\delta z ~ 0$) and kinetic ($\delta v^2 ~ 0$) energy terms, giving us the equation
$$\dot W = \dot m (h_2-h_1) = \dot m c_p(T_2-T_1)$$
#### Mixing Devices
e.g. Hot and cold water in a shower
In these processes, work and heat transfers are not important and you can often
neglect potential and kinetic energy terms, giving us the same equation as for the throttle valve
earlier:
$$0 = h_2-h_1$$
which you may want to write more usefully as:
$$\sum \dot m h_{out} = \sum \dot m h_{in}$$
## SFEE for Incompressible Fluids and Extended Bernoulli Equation
$$\frac{w_s}{g} = H_{T2} - H_{T1} + \left[ \frac{(u_2-u_1)-1}{g}\ \right]$$
or
$$w_s = g(H_{T2}-H_{T1}+H_f$$
If we assume shaft work, $w_s$, is 0, then we can get this equation:
$$H_{T1}-H_{T2} = H_f$$
This is very similar to the Bernoulli equation.
The difference is that it considers friction so it can be applied to real fluids, not just ideal
ones.
It is called the *Extended Bernoulli Equation*.
The assumptions remain:
- Steady flow
- No shaft work
- Incompressible
### $H_f$ for Straight Pipes
$$H_f = \frac{4fL}{D} \frac{v^2}{2g}$$
$$\Delta p = \rho g H_f \text{ (pressure form)}$$
This equation applies to long, round and straight pipes.
It applies to both laminar and turbulent flow.
However be aware that in North America the equation is:
$$H_f = f \frac{L}{D} \frac{v^2}{2g}$$
Their $f$ (the Darcy Friction Factor) is four times our $f$ (Fanning Friction Factor).
In mainland Europe, they use $\lambda = 4f_{Fanning}$, which is probably the least confusing version
to use.
### Finding $f$
#### $f$ for Laminar Flow
$$f = \frac{16}{\Rey}$$
#### $f$ for Turbulent Flow
For turbulent flow, the value defends on relative pipe roughness ($k' = \frac k d$) and Reynolds
number.
Note when calculating $k'$ that **both $k$ and $d$ are measured in mm** for some reason.
A *Moody Chart* is used to find $f$:
![A Moody Chart](./images/vimscrot-2022-03-08T09:28:38,519555620+00:00.png)
### Hydraulic Diameter
$$D_h = \frac{4 \times \text{duct area}}{\text{perimeter}}$$
### Loss Factor $K$
There are many parts of the pipe where losses can occur.
It is convenient to represent these losses in terms of loss factor, $K$, times the velocity head:
$$H_f = K \frac{v^2}{g}$$
Most manufacturers include loss factors in their data sheets.
#### Loss Factor of Entry
![](./images/vimscrot-2022-03-08T10:01:31,557158164+00:00.png)
#### Loss Factor of Expansion
$$K = \left( \frac{A_2}{A_1} - 1\right)^2$$
This also tells us the loss factor on exit is basically 1.
For conical expansions, $K ~ 0.08$ (15 degrees cone angle),
$K ~ 0.25$ (30 degrees).
For cones you use the inlet velocity.
#### Loss Factor of Contraction
$\frac{d_2}{d_1}$ | K
----------------- | ----
0 | 0.5
0.2 | 0.45
0.4 | 0.38
0.6 | 0.28
0.8 | 0.14
1.0 | 0
#### Loss Factor of Pipe Bends
On a sharp bend, $K ~ 0.9$.
On a bend with a radius, $K ~ 0.16-0.35$.
#### Loss Factor of Nozzle
$$K ~ 0.05$$
But you use the outlet velocity, increasing losses.

View File

@@ -2,29 +2,35 @@
author: Alvie Rahman
date: \today
title: MMME1048 // Fluid Mechanics Intro and Statics
tags: [ uni, nottingham, mechanical, engineering, fluid_mechanics, mmme1048, fluid_statics ]
tags:
- uni
- nottingham
- mechanical
- engineering
- fluid_mechanics
- mmme1048
- fluid_statics
uuid: 43e8eefa-567f-438b-b93d-63ae08e61d8f
---
# Properties of Fluids
## What is a Fluid?
- A fluid may be liquid, vapor, or gas
- A fluid may be liquid, vapour, or gas
- No permanent shape
- Consists of atoms in random motion and continual collision
- Easy to deform
- Liquids have fixed volume, gasses fill up container
- **A fluid is a substance for wich a shear stress tends to produce unlimited, continuous
- **A fluid is a substance for which a shear stress tends to produce unlimited, continuous
deformation**
## Shear Forces
- For a solid, application of shear stress causes a deformation which, if not too great (elastic),
is not permanent and solid regains original positon
- For a fluid, continuious deformation takes place as the molecules slide over each other until the
is not permanent and solid regains original position
- For a fluid, continuous deformation takes place as the molecules slide over each other until the
force is removed
- **A fluid is a substance for wich a shear stress tends to produce unlimited, continuous
deformation**
## Density
@@ -43,7 +49,7 @@ tags: [ uni, nottingham, mechanical, engineering, fluid_mechanics, mmme1048, flu
- Matter is not continuous on molecular scale
- For fluids in constant motion, we take a time average
- For most practical purposes, matter is considered to be homogenous and time averaged
- For most practical purposes, matter is considered to be homogeneous and time averaged
## Pressure
@@ -69,7 +75,7 @@ tags: [ uni, nottingham, mechanical, engineering, fluid_mechanics, mmme1048, flu
- A fluid at rest has constant pressure horizontally
- That's why liquid surfaces are flat
- But fluids at rest do have a vertical gradient, where lower parts have higher presure
- But fluids at rest do have a vertical gradient, where lower parts have higher pressure
### How Does Pressure Vary with Depth?
@@ -108,11 +114,11 @@ The -ve sign indicates that as $z$, height, increases, $p$, pressure, decreases.
### Absolute and Gauge Pressure
- Absolute Pressure is measured relative to zero (a vacuum)
- Guage pressure = absolute pressure - atmospheric pressure
- Gauge pressure = absolute pressure - atmospheric pressure
- Often used in industry
- If abs. pressure = 3 bar and atmospheric pressure is 1 bar, then gauge pressure = 2 bar
- If absolute pressure = 3 bar and atmospheric pressure is 1 bar, then gauge pressure = 2 bar
- Atmospheric pressure changes with altitude
## Compressibility
@@ -124,7 +130,7 @@ The -ve sign indicates that as $z$, height, increases, $p$, pressure, decreases.
## Surface Tension
- In a liquid, molecules are held together by molecular attraction
- At a boundry between two fluids this creates "surface tension"
- At a boundary between two fluids this creates "surface tension"
- Surface tension usually has the symbol $$\gamma$$
## Ideal Gas
@@ -147,7 +153,7 @@ The -ve sign indicates that as $z$, height, increases, $p$, pressure, decreases.
- Pressure always in Pa
- Temperature always in K
## Units and Dimentional Analysis
## Units and Dimensional Analysis
- It is usually better to use SI units
- If in doubt, DA can be useful to check that your answer makes sense
@@ -281,7 +287,7 @@ p_1 - p_2 &= \rho_wg(z_C-z_B-z_C+z_A) + \rho_mg\Delta z \\
the upper surface (figure 1.4). The tank and riser are filled with
water such that the water level in the riser pipe is 3.5 m above the
Calulate:
Calculate:
i. The gauge pressure at the base of the tank.
@@ -291,7 +297,7 @@ p_1 - p_2 &= \rho_wg(z_C-z_B-z_C+z_A) + \rho_mg\Delta z \\
> $$\rho gh = 1000\times9.81\times3.5 = 34 \text{ kPa}$$
iii. The force exercted on the base of the tank due to gauge water pressure.
iii. The force exerted on the base of the tank due to gauge water pressure.
> $$F = p\times A = 49\times10^3\times6\times3 = 8.8\times10^5 \text{ N}$$
@@ -337,7 +343,7 @@ p_1 - p_2 &= \rho_wg(z_C-z_B-z_C+z_A) + \rho_mg\Delta z \\
## Submerged Surfaces
### Prepatory Maths
### Preparatory Maths
#### Integration as Summation
@@ -362,7 +368,7 @@ Take the following lamina:
1. Split the lamina into elements parallel to the chosen axis
2. Each element has area $\delta A = w\delta y$
3. The moment of area ($\delta M$) of the element is $\delta Ay$
4. The sum of moments of all the elements is equal to the moment $M$ obtained by assuing all the
4. The sum of moments of all the elements is equal to the moment $M$ obtained by assuming all the
area is located at the centroid or:
$$Ay_c = \int_{area} \! y\,\mathrm{d}A$$
@@ -418,7 +424,7 @@ Determine the location of the centroid of a rectangular lamina.
</details>
### Horizontal Submereged Surfaces
### Horizontal Submerged Surfaces
![](./images/vimscrot-2021-10-20T10:33:16,783724117+01:00.png)
@@ -484,12 +490,12 @@ Where $\rho$ is the density of the fluid, and $V$ is the volume of displaced flu
### Immersed Bodies
As pressure increases with depth, the fluid exerts a resultant upward force on a body.
There is no horizontal component of the buoyancy force because the vertiscal projection of the body
There is no horizontal component of the buoyancy force because the vertical projection of the body
is the same in both directions.
### Rise, Sink, or Float?
- $F_B = W$ \rightarrow equilirbrium (floating)
- $F_B = W$ \rightarrow equilibrium (floating)
- $F_B > W$ \rightarrow body rises
- $F_B < W$ \rightarrow body sinks

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -2,7 +2,14 @@
author: Alvie Rahman
date: \today
title: MMME1048 // Thermodynamics
tags: [ uni, nottingham, mechanical, engineering, mmme1048, thermodynamics ]
tags:
- uni
- nottingham
- mechanical
- engineering
- mmme1048
- thermodynamics
uuid: db8abbd9-1ef4-4a0d-a6a8-54882f142643
---
# What is Thermodynamics?
@@ -16,12 +23,12 @@ Thermodynamics deals with the transfer of heat energy and temperature.
A region of space, marked off by its boundary.
It contains some matter and the matter inside is what we are investigating.
There are two types of sysems:
There are two types of systems:
- Closed systems
- Contain a fixed quantity of matter
- Work and heat cross bounaries
- Work and heat cross boundaries
- Impermeable boundaries, some may be moved
- Non-flow processes (no transfer of mass)
@@ -40,7 +47,7 @@ The system is not in equilibrium if parts of the system are at different conditi
#### Adiabatic
A process in which does not cross the system boundary
A process in which heat does not cross the system boundary
## Perfect (Ideal) Gasses
@@ -116,177 +123,15 @@ c_p &= \frac{c_p}{\gamma} + R \\
c_p &= \frac{\gamma}{\gamma -1} R
\end{align*}
</details>
### The Specific and Molar Gas Constant
## Properties of State
The molar gas constant is represented by $\tilde R = 8.31 \text{JK}^{-1}\text{mol}^{-1}$.
*State* is defined as the condition of a system as described by its properties.
The state may be identified by certain observable macroscopic properties.
These properties are the *properties of state* and they always have the same values for a given
state.
A *property* can be defined as any quantity that depends on the *state* of the system and is
independant of the path by which the system arrived at the given state.
Properties determining the state of a thermodynamic system are referred to as *thermodynamic
properties* of the *state* of the system.
Common properties of state are:
- Temperature
- Pressure
- Mass
- Volume
And these can be determined by simple measurements.
Other properties can be calculated:
- Specific volume
- Density
- Internal energy
- Enthalpy
- Entropy
### Intensive vs Extensive Properties
In thermodynamics we distinguish between *intensive*, *extensive*, and *specific* properties:
- Intensive --- properties which do not depend on mass (e.g. temperature)
- Extensive --- properties which do depend on the mass of substance in a system (e.g. volume)
- Specific (extensive) --- extensive properties which are reduced to unit mass of substance
(essentially an extensive property divided by mass) (e.g. specific volume)
### Units
<div class="tableWrapper">
Property | Symbol | Units | Intensive | Extensive
--------------- | ------ | --------------- | --------- | ---------
Pressure | p | Pa | Yes |
Temperature | T | K | Yes |
Volume | V | m$^3$ | | Yes
Mass | m | kg | | Yes
Specific Volume | v | m$^3$ kg$^{-1}$ | Yes |
Density | $\rho$ | kg m$^{-3}$ | Yes |
Internal Energy | U | J | | Yes
Entropy | S | J K$^{-1}$ | | Yes
Enthalpy | H | J | | Yes
</div>
### Density
For an ideal gas:
$$\rho = \frac{p}{RT}$$
### Enthalpy and Specific Enthalpy
Enthalpy does not have a general physical interpretation.
It is used because the combination $u + pv$ appears naturally in the analysis of many
thermodynamic problems.
The heat transferred to a closed system undergoing a reversible constant pressure process is equal
to the change in enthalpy of the system.
Enthalpy is defined as:
$$H = U+pV$$
and Specific Enthalpy:
$$h = u + pv$$
### Entropy and Specific Entropy
Entropy is defined as the following, given that the process s reversible:
$$S_2 - S_1 = \int\! \frac{\mathrm{d}Q}{T}$$
### Heat Capacity and Specific Heat Capacity
Heat capacity is quantity of heat required to raise the temperature of a system by a unit
temperature:
$$C = \frac{\mathrm{d}Q}{\mathrm{d}T}$$
Specific heat capacity is the quantity of heat required to raise the temperature of a unit mass
substance by a unit temperature:
$$c = \frac{\mathrm{d}q}{\mathrm{d}T}$$
<details>
<summary>
#### Heat Capacity in Closed Systems and Internal Energy
The specific heat transfer to a closed system during a reversible constant **volume** process is
equal to the change in specific **internal energy** of the system:
$$c_v = \frac{\mathrm{d}q}{\mathrm{d}T} = \frac{\mathrm{d}u}{\mathrm{d}T}$$
</summary>
This is because if the change in volume, $\mathrm{d}v = 0$, then the work done, $\mathrm{d}w = 0$
also.
So applying the (1st Corollary of the) 1st Law to an isochoric process:
$$\mathrm{d}q + \mathrm{d}w = \mathrm{d}u \rightarrow \mathrm{d}q = \mathrm{d}u$$
since $\mathrm{d}w = 0$.
</details>
<details>
<summary>
#### Heat Capacity in Closed Systems and Enthalpy
The specific heat transfer to a closed system during a reversible constant **pressure** process is
equal to the change in specific **enthalpy** of the system:
$$c_p = \frac{\mathrm{d}q}{\mathrm{d}T} = \frac{\mathrm{d}h}{\mathrm{d}T}$$
</summary>
This is because given that pressure, $p$, is constant, work, $w$, can be expressed as:
$$w = -\int^2_1\! p \,\mathrm{d}v = -p(v_2 - v_1)$$
Applying the (1st corollary of the) 1st law to the closed system:
\begin{align*}
q + w &= u_2 - u_1 \rightarrow q = u_2 - u_1 + p(v_2 - v_1) \\
q &= u_2 + pv_2 - (u_1 + pv_1) \\
&= h_2 - h_1 = \mathrm{d}h \\
\therefore \mathrm{d}q &= \mathrm{d}h
\end{align*}
</details>
<details>
<summary>
#### Ratio of Specific Heats
$c_p > c_v$ is always true.
</summary>
Heating a volume of fluid, $V$, at a constant volume requires specific heat $q_v$ where
$$q_v = u_2 - u_1 \therefore c_v = \frac{q_v}{\Delta T}$$
Heating the same volume of fluid but under constant pressure requires a specific heat $q_p$ where
$$q_p =u_2 - u_1 + p(v_2-v_1) \therefore c_p = \frac{q_p}{\Delta T}$$
Since $p(v_2-v_1) > 0$, $\frac{q_p}{q_v} > 1 \therefore q_p > q_v \therefore c_p > c_v$.
The ratio $\frac{c_p}{c_v} = \gamma$
</details>
The specific gas constant is $R = \frac{\tilde{R}}{M}$.
The SI unit for the specific gas constant is J kg$^{-1}$ mol$^{-1}$.
The SI unit for molar mass is kg mol$^{-1}$.
## Thermodynamic Processes and Cycles
@@ -296,10 +141,10 @@ An example of a process is expansion (volume increasing).
A *cycle* is a process or series of processes in which the end state is identical to the beginning.
And example of this could be expansion followed by a compression.
### Reversible and Irreversible Proccesses
### Reversible and Irreversible Processes
During reversible processes, the system undergoes a continuous succession of equilibrium states.
Changes in the system can be defined and reversed to restore the intial conditions
Changes in the system can be defined and reversed to restore the initial conditions
All real processes are irreversible but some can be assumed to be reversible, such as controlled
expansion.
@@ -320,7 +165,7 @@ Constant volume process
## Heat and Work
Heat and Work are different forms of enery transfer.
Heat and Work are different forms of energy transfer.
They are both transient phenomena and systems never possess heat or work.
Both represent energy crossing boundaries when a system undergoes a change of state.
@@ -350,10 +195,6 @@ In thermally insulated systems and isolated systems, heat transfer cannot take p
In thermally isolated systems, work transfer cannot take place.
# Process and State Diagrams
Reversible processes are represented by solid lines, and irreversible processes by dashed lines.
# 1st Law of Thermodynamics
The 1st Law of Thermodynamics can be thought of as:
@@ -375,3 +216,421 @@ The 1st Law of Thermodynamics can be thought of as:
> The internal energy of a closed system remains unchanged if it
> [thermally isolated](#thermally-insulated-and-isolated-systems) from its surroundings
# Properties of State
*State* is defined as the condition of a system as described by its properties.
The state may be identified by certain observable macroscopic properties.
These properties are the *properties of state* and they always have the same values for a given
state.
A *property* can be defined as any quantity that depends on the *state* of the system and is
independent of the path by which the system arrived at the given state.
Properties determining the state of a thermodynamic system are referred to as *thermodynamic
properties* of the *state* of the system.
Common properties of state are:
- Temperature
- Pressure
- Mass
- Volume
And these can be determined by simple measurements.
Other properties can be calculated:
- Specific volume
- Density
- Internal energy
- Enthalpy
- Entropy
## Intensive vs Extensive Properties
In thermodynamics we distinguish between *intensive*, *extensive*, and *specific* properties:
- Intensive --- properties which do not depend on mass (e.g. temperature)
- Extensive --- properties which do depend on the mass of substance in a system (e.g. volume)
- Specific (extensive) --- extensive properties which are reduced to unit mass of substance
(essentially an extensive property divided by mass) (e.g. specific volume)
## Units
<div class="tableWrapper">
Property | Symbol | Units | Intensive | Extensive
--------------- | ------ | --------------- | --------- | ---------
Pressure | p | Pa | Yes |
Temperature | T | K | Yes |
Volume | V | m$^3$ | | Yes
Mass | m | kg | | Yes
Specific Volume | v | m$^3$ kg$^{-1}$ | Yes |
Density | $\rho$ | kg m$^{-3}$ | Yes |
Internal Energy | U | J | | Yes
Entropy | S | J K$^{-1}$ | | Yes
Enthalpy | H | J | | Yes
</div>
## Density
For an ideal gas:
$$\rho = \frac{p}{RT}$$
## Enthalpy and Specific Enthalpy
Enthalpy does not have a general physical interpretation.
It is used because the combination $u + pv$ appears naturally in the analysis of many
thermodynamic problems.
The heat transferred to a closed system undergoing a reversible constant pressure process is equal
to the change in enthalpy of the system.
Enthalpy is defined as:
$$H = U+pV$$
and Specific Enthalpy:
$$h = u + pv$$
## Entropy and Specific Entropy
Entropy is defined as the following, given that the process s reversible:
$$S_2 - S_1 = \int\! \frac{\mathrm{d}Q}{T}$$
### Change of Entropy of a Perfect Gas
Consider the 1st corollary of the 1st law:
$$\mathrm dq + \mathrm dw = \mathrm du$$
and that the process is reversible:
\begin{align*}
\mathrm ds &= \frac{\mathrm dq} T \bigg|_{rev} \\
\mathrm dq = \mathrm ds \times T \\
\mathrm dw &= -p\mathrm dv \\
\end{align*}
The application of the 1st corollary leads to:
$$T\mathrm ds - p\mathrm dv = \mathrm du$$
Derive the change of entropy
\begin{align*}
\mathrm ds &= \frac{\mathrm du}{T} + \frac{p \mathrm dv}{T} \\
\\
\mathrm du &= c_v \mathrm{d}T \\
\frac p T &= \frac R v \\
\\
\mathrm ds &= \frac{c_v\mathrm{d}T}{T} \frac{R\mathrm dv}{v} \\
s_2 - s_1 &= c_v\ln\left(\frac{T_2}{T_1}\right) + R\ln\left(\frac{v_2}{v_1}\right)
\end{align*}
There are two other forms of the equation that can be derived:
$$s_2 - s_1 = c_v\ln\left(\frac{p_2}{p_1}\right) + c_p\ln\left(\frac{v_2}{v_1}\right)$$
$$s_2 - s_1 = c_p\ln\left(\frac{T_2}{T_1}\right) - R\ln\left(\frac{p_2}{p_1}\right)$$
## Heat Capacity and Specific Heat Capacity
Heat capacity is quantity of heat required to raise the temperature of a system by a unit
temperature:
$$C = \frac{\mathrm{d}Q}{\mathrm{d}T}$$
Specific heat capacity is the quantity of heat required to raise the temperature of a unit mass
substance by a unit temperature:
$$c = \frac{\mathrm{d}q}{\mathrm{d}T}$$
<details>
<summary>
### Heat Capacity in Closed Systems and Internal Energy
The specific heat transfer to a closed system during a reversible constant **volume** process is
equal to the change in specific **internal energy** of the system:
$$c_v = \frac{\mathrm{d}q}{\mathrm{d}T} = \frac{\mathrm{d}u}{\mathrm{d}T}$$
</summary>
This is because if the change in volume, $\mathrm{d}v = 0$, then the work done, $\mathrm{d}w = 0$
also.
So applying the (1st Corollary of the) 1st Law to an isochoric process:
$$\mathrm{d}q + \mathrm{d}w = \mathrm{d}u \rightarrow \mathrm{d}q = \mathrm{d}u$$
since $\mathrm{d}w = 0$.
</details>
<details>
<summary>
### Heat Capacity in Closed Systems and Enthalpy
The specific heat transfer to a closed system during a reversible constant **pressure** process is
equal to the change in specific **enthalpy** of the system:
$$c_p = \frac{\mathrm{d}q}{\mathrm{d}T} = \frac{\mathrm{d}h}{\mathrm{d}T}$$
</summary>
This is because given that pressure, $p$, is constant, work, $w$, can be expressed as:
$$w = -\int^2_1\! p \,\mathrm{d}v = -p(v_2 - v_1)$$
Applying the (1st corollary of the) 1st law to the closed system:
\begin{align*}
q + w &= u_2 - u_1 \rightarrow q = u_2 - u_1 + p(v_2 - v_1) \\
q &= u_2 + pv_2 - (u_1 + pv_1) \\
&= h_2 - h_1 = \mathrm{d}h \\
\therefore \mathrm{d}q &= \mathrm{d}h
\end{align*}
</details>
<details>
<summary>
### Ratio of Specific Heats
$c_p > c_v$ is always true.
</summary>
Heating a volume of fluid, $V$, at a constant volume requires specific heat $q_v$ where
$$q_v = u_2 - u_1 \therefore c_v = \frac{q_v}{\Delta T}$$
Heating the same volume of fluid but under constant pressure requires a specific heat $q_p$ where
$$q_p =u_2 - u_1 + p(v_2-v_1) \therefore c_p = \frac{q_p}{\Delta T}$$
Since $p(v_2-v_1) > 0$, $\frac{q_p}{q_v} > 1 \therefore q_p > q_v \therefore c_p > c_v$.
The ratio $\frac{c_p}{c_v} = \gamma$
</details>
# Process and State Diagrams
Reversible processes are represented by solid lines, and irreversible processes by dashed lines.
# Isentropic and Polytropic Processes
## Polytropic Processes
A polytropic process is one which obeys the polytropic law:
$$pv^n = k \text{ or } p_1v_1^n = p_2v_2^n$$
where $n$ is a constant called the polytropic index, and $k$ is a constant too.
A typical polytropic index is between 1 and 1.7.
<details>
<summary>
#### Example 1
Derive
$$\frac{p_2}{p_1} = \left(\frac{T_2}{T_1}\right)^{\frac{n}{n-1}}$$
</summary>
\begin{align*}
p_1v_1^n &= p_2v_2^n \\
pv &= RT \rightarrow v = R \frac{T}{p} \\
\frac{p_2}{p_1} &= \left( \frac{v_1}{v_2} \right)^n \\
&= \left(\frac{p_2T_1}{T_2p_1}\right)^n \\
&= \left(\frac{p_2}{p_1}\right)^n \left(\frac{T_1}{T_2}\right)^n \\
\left(\frac{p_2}{p_1}\right)^{1-n} &= \left(\frac{T_1}{T_2}\right)^n \\
\frac{p_2}{p_1} &= \left(\frac{T_1}{T_2}\right)^{\frac{n}{1-n}} \\
&= \left(\frac{T_2}{T_1}\right)^{\frac{n}{n-1}} \\
\end{align*}
<details>
<summary>
How did you do that last step?
</summary>
For any values of $x$ and $y$
\begin{align*}
\frac x y &= \left(\frac y x \right) ^{-1} \\
\left(\frac x y \right)^n &= \left(\frac y x \right)^{-n} \\
\left(\frac x y \right)^{\frac{n}{1-n}} &= \left(\frac y x \right)^{\frac{-n}{1-n}} \\
&= \left(\frac y x \right)^{\frac{n}{n-1}} \\
\end{align*}
</details>
</details>
## Isentropic Processes
*Isentropic* means constant entropy:
$$\Delta S = 0 \text{ or } s_1 = s_2 \text{ for a precess 1-2}$$
A process will be isentropic when:
$$pv^\gamma = \text{constant}$$
This is basically the [polytropic law](#polytropic-processes) where the polytropic index, $n$, is
always equal to $\gamma$.
<details>
<summary>
Derivation
</summary>
\begin{align*}
0 &= s_2 - s_1 = c_v \ln{\left(\frac{p_2}{p_1}\right)} + c_p \ln{\left( \frac{v_2}{v_1} \right)} \\
0 &= \ln{\left(\frac{p_2}{p_1}\right)} + \frac{c_p}{c_v} \ln{\left( \frac{v_2}{v_1} \right)} \\
&= \ln{\left(\frac{p_2}{p_1}\right)} + \gamma \ln{\left( \frac{v_2}{v_1} \right)} \\
&= \ln{\left(\frac{p_2}{p_1}\right)} + \ln{\left( \frac{v_2}{v_1} \right)^\gamma} \\
&= \ln{\left[\left(\frac{p_2}{p_1}\right)\left( \frac{v_2}{v_1} \right)^\gamma\right]} \\
e^0 = 1 &= \left(\frac{p_2}{p_1}\right)\left( \frac{v_2}{v_1} \right)^\gamma \\
&\therefore p_2v_2^\gamma = p_1v_1^\gamma \\
\\
pv^\gamma = \text{constant}
\end{align*}
</details>
During isentropic processes, it is assumed that no heat is transferred into or out of the cylinder.
It is also assumed that friction is 0 between the piston and cylinder and that there are no energy
losses of any kind.
This results in a reversible process in which the entropy of the system remains constant.
An isentropic process is an idealization of an actual process, and serves as the limiting case for
real life processes.
They are often desired and often the processes on which device efficiencies are calculated.
### Heat Transfer During Isentropic Processes
Assume that the compression 1-2 follows a polytropic process with a polytropic index $n$.
The work transfer is:
$$W = - \frac{1}{1-n} (p_2V_2 - p_1V_1) = \frac{mR}{n-1} (T_2-T_1)$$
Considering the 1st corollary of the 1st law, $Q + W = \Delta U$, and assuming the gas is an ideal
gas [we know that](#obey-the-perfect-gas-equation) $\Delta U = mc_v(T_2-T_1)$ we can deduce:
\begin{align*}
Q &= \Delta U - W = mc_v(T_2-T_1) - \frac{mR}{n-1} (T_2-T_1) \\
&= m \left(c_v - \frac R {n-1}\right)(T_2-T-1)
\end{align*}
Now, if the process was *isentropic* and not *polytropic*, we can simply substitute $n$ for
$\gamma$ so now:
$$Q = m \left(c_v - \frac R {\gamma-1}\right)(T_2-T-1)$$
But since [we know](#relationship-between-specific-gas-constant-and-specific-heats) $c_v = \frac R {\gamma - 1}$:
$$Q = m (c_v-c_v)(T_2-T_1) = 0 $$
This proves that the isentropic version of the process adiabatic (no heat is transferred across the
boundary).
# 2nd Law of Thermodynamics
The 2nd Law recognises that processes happen in a certain direction.
It was discovered through the study of heat engines (ones that produce mechanical work from heat).
> Heat does not spontaneously flow from a cooler to a hotter body.
~ Clausius' Statement on the 2nd Law of Thermodynamics
> It is impossible to construct a heat engine that will operate in a cycle and take heat from a
> reservoir and produce an equivalent amount of work.
~ Kelvin-Planck Statement of 2nd Law of Thermodynamics
## Heat Engines
A heat engine must have:
- Thermal energy reservoir --- a large body of heat that does not change in temperature
- Heat source --- a reservoir that supplies heat to the engine
- Heat sink --- a reservoir that absorbs heat rejected from a heat engine (this is usually
surrounding environment)
![](./images/vimscrot-2022-03-22T09:17:36,214723827+00:00.png)
#### Steam Power Plant
![](./images/vimscrot-2022-03-22T09:19:07,697440371+00:00.png)
## Thermal Efficiency
For heat engines, $Q_{out} > 0$ so $W_{out} < Q_{in}$ as $W_{out} = Q_{in} - Q_{out}$
$$\eta = \frac{W_{out}}{Q_{in}} = 1 - \frac{Q_{out}}{Q_{in}}$$
Early steam engines had efficiency around 10% but large diesel engines nowadays have efficiencies
up to around 50%, with petrol engines around 30%.
The most efficient heat engines we have are large gas-steam power plants, at around 60%.
## Carnot Efficiency
The maximum efficiency for a heat engine that operates reversibly between the heat source and heat
sink is known as the *Carnot Efficiency*:
$$\eta_{carnot} = 1 - \frac{T_2}{T_1}$$
where $T$ is in Kelvin (or any unit of absolute temperature, I suppose)
Therefore to maximise potential efficiency, you want to maximise input heat temperature, and
minimise output heat temperature.
The efficiency of any heat engine will be less than $\eta_{carnot}$ if it operates between more than
two reservoirs.
## Reversible and Irreversible Processes
### Reversible Processes
A reversible process operate at thermal and physical equilibrium.
There is no degradation in the quality of energy.
There must be no mechanical friction, fluid friction, or electrical resistance.
Heat transfers must be across a very small temperature difference.
All expansions must be controlled.
### Irreversible Processes
In irreversible processes, the quality of the energy degrades.
For example, mechanical energy degrades into heat by friction and heat energy degrades into lower
quality heat (a lower temperature), including by mixing of fluids.
Thermal resistance at both hot sources and cold sinks are an irreversibility and reduce efficiency.
There may also be uncontrolled expansions or sudden changes in pressure.
# Energy Quality
## Quantifying Disorder (Entropy)
$$S = k\log_eW$$
where $S$ is entropy, $k = 1.38\times10^{-23}$ J/K is Boltzmann's constant, and $W$ is the number of
ways of reorganising energy.s

View File

@@ -0,0 +1 @@
itags: [ mmme2044 ]

View File

@@ -0,0 +1,102 @@
#separator:tab
#html:false
what are plain bearings - a suitable solid material fitted between shaft and support to reduce friction and wear - bearing may be dry rubbing bearing or lubricated
what types of lubrication can be used for plain bearings - hydrodynamic - hydrostatic - solid-film - boundary layer
what is hydrodynamic lubrication the shaft rotating in oil creates the oil pressure to lubricate the shaft
what are ball and roller bearings the rotating load is converted to rolling contact of the balls or rollers
what are the parts of a ball bearing
what is the difference between a journal bearing and a thrust bearing - a journal bearing supports the shaft radially - a thurst bearing supports the shaft axially
when would one use a plain rubbing bearing low load, low speed applications
what is the pV factor and what is it the product of a measure of the bearing's ability to cope with frictional heat generation p- pressure V- speed at contact point
what is the projected area of a radial sliding bearing the area of a journal when looking down from it:
what is the thrust area of an axial bearing area of the bearing that isn't holey [$]\frac\pi4 \left(D^2-d^2\right)[/$]
what is the wear volume of an axial sliding bearing the non holey area multiplied by the distance the bearing can wear down without issue [$]YA_\text{thrust} = Y\frac\pi4\left(D^2-d^2\right)[/$]
what are the main properties of plain rubbing bearings (4) - usually made of polymers - moulded to final shape - dry lubricants added - reinforcements added
what dry lubricants and reinforcements are added to plain rubbing bearings - PTFE lubricant added - glass fibre reinforement added
what limits the pressure and speed a plain bearing can be operated at strength and temperature, respectively
what differentiates oil lubricated porous bearings - manufactured from sintered metal powders - porous and impregnated
how often does lubricant need to be replenished in porous bearings roughly 1000 hours
list some of the lowest coefficient of friction bearing materials and their coefficient range - babbitt metal (0.005 to 0.1) - POM (0.05-0.15) - cast iron and lead bronze with grease (0.05 to 0.15)
list the highest pV bearing materials - babbitt metal (2) - cast iron and lead bronze with grease (1) - porous bronze (1)
what is the equation for wear factor, [$]K[/$] [$]K = \frac{W}{FVt}[/$] where $W$ is wear volume, $F$ is bearing load, $V$ is sliding velocity, and $t$ is elapsed time
what is the main issue with hydrodynamic bearings surfaces touch at low speeds
draw the curve of friction against speed
describe the properties of boundary lubrication continuoous and extensive contactlubricant is smeared across surfacecoefficient of friction 0.05 to 0.2wear take place & limits life
what are the properties of mixed lubrication higher surface speedsintermittent contact between surfacepartial hydrodynamic supportcoefficient of friction of 0.004 to 0.10very high local pressures can create elastic deformation of surfaces
what is elastohydrodynamic lubrication fluid film lubrication where high local pressure create elastic deformation of surfaces
what are the properties of hydrodynamic lubrication high speedsno contact between surfaces---no wearminimum film thickness of 8 to 20 micronsvery good surface finish and tolerances requiredcoefficient of friction between 0.002 to 0.01
what is the Sommerfeld number a dimensionless number describing the relationship between a bearings dimensions, speeds, and fluid properties [$]S = \left( \frac R h\right)^2 \frac{\eta n}{P}[/$] where R is radius, h is clearance, [$]\eta[/$] is viscosity, n is angular speed, and P is bearing pressure
what is the equation for clearance of a bearing [$]h = R_\text{bearing} - R_{shaft}[/$]
what is petroff's equation and what is it used for [$]\mu = 2\pi^2 \frac{\eta n}{P}\frac{R}{h}[/$] used for lightly loaded bearings
equation for hydrodynamic journal bearing capacity [$]F = S\eta V \left(\frac{R}{h}\right)^2[/$]
equation for thrust capacity for hydrodynamic thrust bearing [$]F = 6\eta\left[ \frac{Ln(1+n)}{n^2} - \frac{2}{n(2+n)}\right]\frac{VL^2}{h_\text{min}^2}[/$] where [$]n = \frac{h_\text{max}}{h_\text{min}}-1[/$]
what causes friction between components in relative motion real surfaces have asperities which stick out and make contact with the other facewhen sliding, asperities catch and must be deformed or brokenthe forces required to do so is friction
what are the different rolling element types
what are the types of ball bearings and what are their primary features
what is the equation for static load carrying capacty [$]s_0 = \frac{C_0}{P_0}[/$] where s is the static safety factor, P, is the equivalent static bearing load, and C is the basic static load rating
dynamic load carrying capacity [$]L_{10} = \left(\frac CP \right)^q[/$] where L10 is the basic life rating in millions of revolutions, C is the basic dynamic load rating, P is equivalent dynamic bearing load, q is exponent of life: 3 for balls10/3 for rollers
what are the equations for equivalent dynamic load (4) constant magnitude and direction: P = F axial and radial load: [$]P = XF_r + YF_a[/$] (X and Y from manufacturers data)roller bearings: P = F_rfluctuating loads: [$]F_m = \sqrt[3]{\frac{F_1^3U_1 + \cdots}{U}}[/$]
when would you have adjust life rating (5) low reliabilityhigh temperaturehigh vibrationrisk of water ingressrisk of corrosion
why should a locating bearing be used in conjunction with a floating bearing ensures journal does not slide about axially (i think)
what combinations of bearings can be used to support a shaft (5) 2 angular contact bearings - free sliding housing for axial adjustmentone ball + one roller - roller supports radial, ball supports axial and radial2 taper rollers - both support radial and axial, one bearing adjusted against other to required preload2 balls - radial and axial loads, one clamped axially on both races while other left free2 roller - accepts heavy radial load, some axial, each roller locates axially one in direction
when should you slide fit the inner race with the shaft when the load rotates with the shaft
what is the difference between bolts, screws, and studs bolts have an unthreaded core, and a matching nutscrews are threaded all the way and screw directly into a materialstuds do not have heads
draw a lap joint and the forces they are designed to handle
draw a butt joint and the forces they are designed to handle
what is a rivet a non threaded fastener that is deformed around the parts to be joined
what are the types of rivets (3) solidtubular - have a hole down the axisblind (pop rivets)
what are the advantages of rivets (5) low costrapid assemblypermanentcan join dissimilar materialswide range of shapes and materials
what are the disadvantages of rivits (3) slower than welding and adhesivespoor under tensile loadsjoints leak unless sealed
draw a welded but joint and forces is designed to handle
draw a welded lap joint and the forces it is designed to handle
draw a double fillet t joint
draw a fillet cornet joint
why are bolts pre tensioned stops faces from separatingreduces fluctuating stresses experienced by bolt -> increases fatigue life
what is the recommend preload for non permanent joints [$]F_i = 0.75A_s\sigma_p[/$]
what is the rceommended preload for permanent joints [$]F_i = 0.9A_s\sigma_p[/$]
what is the tensile area of a bolt [$]A_s = \frac{\pi}{16}(d_p+d_r)^2[/$]
what is the pitch diameter of a bolt [$]d_p = d-0.6495p[/$]
what is the minor diameter of a bolt [$]d_r = d-1.0825p[/$]
what can proof strength be approximated to if unavailable [$]\sigma_p = 0.85\sigma_y[/$]
"what does the marking ""MX.Y"" mean on a bolt" X - has tensile strength of X*100 MPa Y - has yield strength of Y*X*10 Mpa
what is the bolt torque pre tension equation [$]T= KF_id[/$] where K is torque coefficient (around 0.2 for most cases), and d is nominal diameter
how can the stiffness of a bolt be reduced (2) reduce cross sectional areaincrease length
what stress reserve factor would you want for reliable materials under controlled conditions and known stresses 1.25 to 1.5
what stress reserve factor would you want for average materials with known loads and stresses 2 to 2.5
what reserve factor would you want for untried materials in average conditions 3 to 3.5
what reserve factor would you want for well known materials in uncertain conditions 3 to 3.5
what are the steps to select a bolt (6) consider permanent vs non permanent, define external load, number of bolts, and reserve factorestimate preload by assuming hard joint (K_c = 3K_b)choose suitable bolt size and determine preload by using table 5 of bs en iso 898-1:2009calculate stiffness of bolts and componentscalculate maximum allowable external loadcalculate reserve factor
why is a pre tensioned bolted joint beneficial for cyclic loading pre tension raises mean stress which increases fatigue life
what must be considered when using helical gears axial load generated
what are the properties of spur gears between parallel shafts (4) cheap to manufacturenoisyfew number number of teeth in contact at any given timesensitive to alignment
what are the properties of helical gears teeth cut at inclined angle to axis of rotationcontact between teeth more progressive and longercarries higher loadsquietercan be mounted at right anglesdouble helical gears (herringbone) can cancel out axial thrust for smoother power transmission at high speeds
what is the pitch circle circle upon which all calculations are based
what is circular pitch the distance between two identical points on adjacent teeth on a gear
what is the module of a gear, m [$]m = \frac d N [/$] where d is pitch diameter, N is number of teeth
what is tooth thickness and width of space [$]t = w = 0.5p[/$] where p is circular pitch
what is the addendum radial distance between pitch circle and top land a = m
what is the dedendum radial distance between pitch circle and bottom land b = 1.25 m
what is the clearance c = 0.25m radial distance between bottom land of gear 1 and top land of gear 2
what is the whole depth of a gear ht = addendum + dedendum = 2.25m
what is the working depth of a gear hk = addendum + dedendum - clearance = 2m
what are the conditions for proper meshing between gears module is samepressure angle is same
what are the common pressure angles 20 degrees14.5 degrees
what is the equation for centre distance betwen two gears [$]C = \frac m 2 (N_1 + N_2)[/$]
what is the minimum number of teeth for standard gears of pressure angle 20 degrees 18
what is a simple gear train each shaft only carries one gear
what is a compound gear train a gear train where at least one shaft carries two or more gears
what is a reverted train a compond train in which the input and shaft are colinear
what is a planetary gear train has a sun gear, planet carrier, and one or more planet gears
what differentiates planetary gear systems it has two degrees of freedomhas very high gear ratios
what are the common forms of gear failure bending fatiguepittingmicropittingscuffing
what is a lower pair joint joint with surface contact (pin in a hole)
what is a higher pair joint a joint with point or line contact, such as a pin in a slot
what is rectilinear translation points in the body move in parallel straight lines
what is curvilinear motion points in the body move along idential curves so the link does not rotate with respect to the ground
what is the equation for degrees of freedom of a mechanism (gruebler's) M = 3L - 2J - 3G
what does it mean if a structure has negative degrees of freedom it's preloaded or overconstrained
what is the grashof condition equation and what does it mean S + L < P + Q: it is a grashof linkage and at least one link can make a full revolutionS + L > P + Q: non grashof and no link capable of making full revolutionS + L = P + Q: special grashof - either double-cranks or crank rockers
what is a limit/toggle test checks if linkage can reach all positions without encountering a limit of toggle positiontoggle positons may be determined by collinearity of two links
what is transmission angle angle between output link and coupler
what is the ideal transmission angle 90 degrees
what is the minimum transmission angle 40 degrees

View File

@@ -0,0 +1,189 @@
---
author: Akbar Rahman
date: \today
title: MMME2044 // Bearings
tags: [ bearings ]
uuid: 94cac3fd-c352-4fdd-833d-6129cb484b8a
lecture_slides: [ ./lecture_slides/Lecture 7 - Bearings 1 Plain Hydrodynamic Bearings 1.pdf, ./lecture_slides/Lecture 11 - Bearings 2 - Rolling Element Bearings.pdf ]
anki_deck_tags: [ bearings ]
---
> I don't think I ever finished these notes.
# Errata
## Lecture Slides 2 (Lecture 11), slide 18
Static load carrying capacity equation is
$$S_0 = \frac{P_0}{C_0}$$
but should be:
$$S_0 = \frac{C_0}{P_0}$$
If the load applied to a bearing is half of its rated capacity,
then you have a safety factor of 2.
Therefore the equation in the slides must be incorrect.
# Types of Bearings
<details>
<summary>
### Plain Journal Bearings
</summary>
- used to support rotating shafts loaded in radial directions
- consists of an insert fitted between the shaft and support
- the insert may be an aluminium alloy, copper alloy, or other material
- the insert provides lower friction and less wear than if just rotating in the support
- the bearing may be dry rubbing or lubricated
#### Lubrication
- hydrodynamic---a shaft continuously in oil. the load is carried by pressure generated in the oil
as a result of the rotation
- hydrostatic---avoids excessive wear at start up by pumping oil into the load bearing area at a
pressure that lifts the shaft
- solid-firm---a coating of a solid material like graphite or molybdenum disulphide
- boundary layer---a thin layer of lubricant which adheres to the surface of the bearing
</details>
<details>
<summary>
### Ball and Roller Bearings (Rolling Element Bearings)
</summary>
- main load is transferred from rotating shaft to its support by rolling contact from balls
- a rolling element bearing consists of an inner race, outer race, rolling elements and a cage
![](./images/bearings_1-010.jpg)
![](./images/bearings_1-011.jpg)
</details>
<details>
<summary>
### Plain Rubbing Bearings (Dry Sliding)
</summary>
- does not use liquid lubrication
- usually polymeric
- dry lubricants added (e.g. PTFE)
- reinforcements added (e.g. glass fibre)
</details>
<details>
<summary>
### Oil Lubricated Porous Bearings
</summary>
- manufactured from sintered metal powders
- porous and oil impregnated
- more porous is weaker but allows for high speeds
- lubricant needs to replenished at regular intervals --- usually every 1000 hours of use
</details>
<details>
<summary>
### Hydrodynamic Bearings
</summary>
- pressure builds up in the lubricant as a response to the relative motion
- both journal and thrust bearings may use this principle
- surfaces touch and rub at very low speeds
![](./images/vimscrot-2022-11-15T17:56:26,739425867+00:00.png)
</details>
# fun graphs that may be useful for bearing selection
![](./images/bearings_1-035.jpg)
![](./images/vimscrot-2022-11-15T17:33:30,763609479+00:00.png)
![](./images/vimscrot-2022-11-15T17:51:56,506933942+00:00.png)
# $pV$ Factor
- a measure of the bearing's ability to cope with frictional heat generation
- rapid wear occurs at $pV_\text{max}$
- if the value is exceeded then overheating, melting, and excessive wear or seizure may follow
- general operational range should be around $0.5pV_\text{max}$
![$P_\text{max}$ is limited by strength, $V_\text{max}$ is limited by temperature rise](./images/bearings_1-036.svg)
- A - thermoplastics
- B - PTFE
- C - PTFE + fillers
- D - porous bronze + PTF + lead
- E - PTFE-glass weave + thermoset
- F - reinforced thermoset + molybdenum disulphide
- G - thermoset/carbon graphite + PTFE
## Radial Sliding Bearing
$$p = \frac{F_\text{radial}}{bD}$$
$$V = \omega\frac D2$$
![](./images/vimscrot-2023-04-28T18:17:05,184873693+01:00.png)
## Axial Sliding Bearing
$$p = \frac{4F_\text{axial}}{\pi(D^2-d^2)}$$
$$V = \omega\frac{D+d}{4}$$
![](./images/vimscrot-2023-04-28T18:17:16,580658677+01:00.png)
## Plain Rubbing Bearings
- does not rely on liquid lubricaton
- usually made of polymers and moulded to final shape
- dry lubricants like ptfe are added
- reinforcements like glass fibres can be added
- pressure is limited by strength
- speed is limited by temperature
## Oil Lubricated Porous Bearings
- manufactured from sintered metal powders
- porous & oil impregnated
- more porous bearings are weaker but can run at higher speeds
- lubricant needs to be replenished at regular intervals
# Wear
$$K = \frac{W}{FVt}$$
where $K$ is wear factor (provided by manufacturer), $W$ is wear volume, $F$ is sliding velocity,
$F$ is bearing load, and $t$ is elapsed time.
# Manufacture
- nominal diametral clearance is commonly 1 $\mu$m per mm
- manufacturing tolerance
- close running fit (H8/f7)
- free running (H9/d9)

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Some files were not shown because too many files have changed in this diff Show More