Tumgik
rocketcollider · 6 years
Text
How Math Works
You may have noticed that mathematical formulas on this blog look kinda nice. They depend on a multitude of modern technologies generally referred to as "The World Wide Web".
There are two main technologies involved: protocols and documents. Protocols make sure you can send and receive documents. The documents contain some content and instructions what to do with that content in computer readable language.
Over the past years, protocols have gotten more and more sophisticated. Quite recently, a lot of effort went into encrypting all these protocols better. But they also get faster, integrate new algorithms more efficiently and generally move forward at an impressive pace. There are some problems, but generally speaking humanity has protocols figured out.
Documents are a bit more problematic. When you look at a web-page, you use a browser (Firefox, Chrome, Safari, Opera and some unimportant ones) to do all the heavy lifting for you. The browser figures out what protocols to use, who to talk to and what documents to request. Once it got all the documents, it reads all the computer languages in the document to figure out how to display the content.
There are three main languages we use to make web-pages pretty:
Hyper Text Markup Language or HTML describes the structure of a document. Where does a paragraph start and end? What text should link somewhere else? Is that text for the user or the computer?
Cascading Style Sheets or CSS tell the browser what the document should look like. Text color, size, where to position text and what text should be hidden is defined using CSS. It's probably the most difficult to learn language of these three.
[Javascript or JS](https://en.wikipedia.org/wiki/JavaScript "Wikipedia on JS"] is the only programming language here. It can change a documents layout, evaluate input and is nothing short of the brain of a web-page.
That's the good part. Let's start with the bad part at a point you bare some responsibility for: bad browser support.
Superficially, all browsers agree on how the internet should look like. Over some time, we got all browser-suppliers to listen to the World Wide Web Consortium, an organisation that defines how HTML and CSS should work and how JavaScript interfaces with both. In detail however, many browsers speak there own, specific "slang" instead of what the W3C defined.[1] Sometimes browsers charge ahead and implement features the W3C didn't have time to define yet. Other times they don't implement something for various reasons. And then again some browsers understand words differently.
For everybody caring about their web page, that meant to write different documents for different browsers. Most of the time, only tiny bits and pieces need to be different. Though there is not much work involved, it's a plethora of annoyance to test every detail in every browser. So much so that it's big business to help people with cross-browser-testing.
That's where the math breaks.
There is a great standard embedded in HTML, the Math Markup Language or MathML. Though it's part of HTML, part of the web and well defined by W3C[2], most browsers don't understand MathML.
JavaScript To The "Rescue"
It's such a pain to test different browsers, sometimes only to find out that what worked nicely in one doesn't work at all in the other, that developers started to use frameworks. Frameworks teach a browser some new language, usually as an extension of JavaScript. Most are written in JavaScript, but all promise to look the same across all browsers. It's a lot easier to write a page nearly exclusively in JavaScript than using HTML and CSS, both possibly failing in one browser or the other. Furthermore, CSS tends to have unexpected results. It's a quite old language that pales in comparison to newer ones. CSS' complexity is partly to blame for the popularity of frameworks.
Here the math came in. Since MathML is badly supported, a framework exists to display mathematical formulas. I used MathJax because it allows formulas to be written in LaTex, a language used in scientific literature.
E.g. this LaTex code:
\gamma ={\frac {1}{\sqrt {1-{\frac {v^{2}}{c^{2}}}}}}={\frac {1}{\sqrt {1-\beta ^{2}}}}=(1-{\frac {v^{2}}{c^{2}}})^{-{\frac {1}{2}}}={\frac {dt}{d\tau}}
ideally renders as:
People are lazy. Web developers especially. If there is a tool out there fixing a problem[3], people will use it. The additional cost is conveniently hidden. But there is plenty!
Your browser is a tool to display HTML and CSS. It's well optimised to do that quickly, neatly and securely. JavaScript on the other hand is designed to be able to do everything. And it's actually quite hard to do that quickly, not to mention securely.
JavaScript is awesome. Used correctly, it allows a more fluent user experience. And smoothing over browser differences is possible as well. There seems to be no limit to what JavaScript can do.
But when it's used for everything, web-pages require a lot more code to be transferred, slowing users down. JavaScript, though fast, can't come close to a browsers native ability to read HTML and CSS.
More recently, JavaScript is used for user surveillance. Tracking your device, your click-behavior, and of course what pages you visit is all possible with JavaScript.
JavaScript used at the scale it's used today excludes slow connections and slow computers and enables user surveillance by big companies. That's why I try to reduce JavaScript to an absolute minimum in all my projects.[4]
How That Works
HTML tells the browser about a documents structure. Browsers expect everything in a document to be embedded in HTML. Documents are generally structured as follows:
- tells the browser this document may contain HTML - Everything between and is html-code. </p> All document properties go here. The head is never displayed, but used to tell the browser how to handle the document. <title>The Documents title goes here</title><style> Cascading _Style_ Sheet language goes here </style><script> JavaScript code would go here, use sparingly! </script><link href="Here%20we%20could%20write%20some%20link%20to%20load%20additional%20CSS-files" the> - tag is used for very basic document descriptions, like if the document contains emoticons: <meta charset="utf-8"> Content goes here. Ideally, we don't need any more property-definitions here, though it would be possible to enter them here as well.
tumblr allows quite substantial manipulation of a blog's HTML. But they insert some extra HTML without asking any blogger. By inserting some <script>-tags, they can add some JavaScript. That is mostly for surveillance purposes, but some is to show e.g. that tumblr-bar at the top of the page.
By adding some JavaScript to display nice formulas I contribute to the jungle of JavaScript. Then again, removing MathJax would change little. However, I could actually add some JavaScript to protect my visitors from surveillance. Even better, I can use HTML itself.
There is a lot more to HTML than most people, even web-developers[5], realise. For example, there is a way to define what sources the browser should trust, and discard all others. That way, a browser will block any JavaScript[6] which is not allowed.
These restrictions are actually part of the protocol, not the document. But HTML has a way to tell the browser about things the protocol might have forgotten to mention. This extra information is of course valid for the whole document, so they go in the <head> element. On this blog, this line keeps you safe from surveillance JavaScript:
<meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-eval' 'nonce-optica_setup' 'nonce-disqus' 'nonce-mathjax' https://*.tumblr.com">
This line introduces itself to the browser as meta-information about the document. http-equiv tells the browser it's supposed to treat the line as equivalent to an HTTP[7] statement, which is specified in quotation marks. The content specifies what the statement is evaluated as. Suffice to say, this content tells the browser to ignore all JavaScript not from tumblr.
Safe From Math As Well
You may have noticed that I said pretty formulas needed JavaScript because browsers don't all support MathML. Well, there are ways around this shortcoming. MathJax is one way, browser specific CSS is another.
Assume a browser doesn't understand MathML. It's still HTML, but uses tags the browser has no use for. Since it's HTML, the browser would understand CSS styling it's content perfectly well. That allows to as a browser to please draw e.g. a square root in pure CSS. Or to define the style of how fractions are written. And how the typesetting of a formula differs from that of text.
This method is called a "CSS-fallback". Your browser doesn't understand MathML? Well, you can fall back to how we did it in the old days. It won't be as pretty and there won't be the same functionality, but it covers you for the most part.
There is a catch, though. Say a browser understands MathML perfectly fine and reads the CSS-fallback. MathML tells it to draw a square root. CSS tells it to draw a square root as well. Now you have two square roots on the screen. Ugly.
What needs to happen is that the browser reads the CSS if it doesn't understand MathML and ignores it otherwise. However, there is no way to ask a browser if it understands MathML. The only way to reliably test weather a browser does requires JavaScript.
Trying to reduce JavaScript, there is only one way: browser specific hacks. Browsers implement HTML and CSS differently. That's generally an annoyance. But, once you know how exactly they differ, it's possible to write code one browser will understand and others won't. Once we know [what browser actually understand MathML](https://caniuse.com/mathml “caniuse.com is a helpful page that documents what which browser understands”), all we need to figure out is how to talk specifically with those who don't.
I failed. There is nothing that exclusively browsers that don't speak MathML understand.[8] The frustration is real.
The Demise of The Web (Page)
On the modern web, fewer and fewer documents contain static content. Most web pages rightfully call themselves "web apps", since they more closely resemble a dedicated application than any form of document. But by using browsers, they need to work with the minimum set of features every browser supports. Electron to the rescue!
Electron is a tool that solves many problems. Using Electron on a page returns a stripped-down version of Chromium that runs only that page. The web-developers are happy, because there is only one browser looking at their page. Chromium is happy, because there are much more people using Chromium now. And app-developers are happy, because Chromium works on any computer so their app will work on any computer.
There is a bunch of problems with Electron, specifically security wise, but it's better these projects are turned into apps than pages. That's because your program is your problem. How much work you invest vs. how bad it turns out is your decision.
A web-page is everybodie's problem. Because of browser economoics.
The Politics of Browser Economics
Browsers and web-developers are in a weird dance with users. Every browser wants to be the most popular and lure users with features. Web-developers depend on browser support, so they tend to use features all browsers support. Users generally want a page to work before caring about what nice features it offers. And ideally, the W3C finds common ground and writes that down which we then call a standard.
To be the most popular, every browser found something it’s particularly good at. Firefox has the most experimental features, Chromium is super fast, Opera is pretty and Edge is good at downloading Firefox.
Faster browsers are easier to sell. The moment a user installs a faster browser he feels improvement. But it takes a document including e.g. MathML for a user to see the benefits of beautiful formulas. At the same time, every user with browsers not supporting MathML will leave the page because it looks ugly to them. That's why fallbacks are important. And that's why JavaScript frameworks are so convenient. But JavaScript is slow, so users would see a real improvement by switching to faster browsers. It's a vicious circle.
If we all could get faster browsers, that would be awesome. But we can't. There are people with old computers that don't have the power to run fast browsers. There are countries with slow connections and every byte JavaScript they need to download counts. And though JavaScript has it's applications, extensive use of JavaScript comes with many ramifications.
JavaScript takes time to load. A lot of companies use JavaScript for surveillance. Since JavaScript is so powerful, it's easier to hack. And since JavaScript is everywhere, it is used to grab your attention.
The Ad-Epidemic
The availability and prevalence of JavaScript everywhere has enabled new exploitation. Annoyingly blinking ads have existed since the very early days of the internet, but it took a lot of ~surveillance~ behavioral science to turn that into a business.
In the early days, to advertise you had to find a page that attracted users who might buy your stuff. Then you needed to actively reach out to that page and ask it to put some paid ads up. It was your responsibility to guess what users visit what pages and it was the pages responsibility to guess weather this or that ad might scare users away.
Today ads work like this: If you want to advertise, you hire an ad-network to show your ads to specific users. The ad-network has access to many thousand pages and will show your ad whenever a user you specified visits.[9] At the same time, all pages contributing to the ad-network can set what ads shouldn't be displayed on the page. There is no more guessing involved.
It's crucial to this process that the ad-network knows what user is currently visiting the page. Surveillance is a key element of modern advertising. The better an ad-network knows a user, the better it can show ads the user will actually click on and thereby earn money. Therefore, the best at this game are Google and Facebook. Google, because it knows what you search. Facebook, because you told them everything about you. And of course JavaScript based surveillance of user behavior.
Web-developers are lazy. Selling users attention and privacy is a super simple and reliable way to get enough money to keep a page running. Of course there are other concepts out there, ranging from plain paid subscriptions to more creative concepts! All of them require some thought into how a page adds value to a users life, though.
Plain And Simple
I'm lazy. I want a fast web. I'm easily distracted. And I don't know anybody who doesn't hate ads.
You are responsible for the browser you use. Could I convince you to switch to a browser with MathML support to make my life a little easier? If not, how about a fast browser with decent HTML support?
If you still have time, think about installing an ad blocker. You will experience faster pages, because the JavaScript trying to load ads is blocked. And if enough people block ads, web-developers will have to think of new ways to get money.
Another part to this story is mass surveillance. Surveillance is a lot easier with a lot of JavaScript and advertising requires surveillance to be efficient. Making surveillance more difficult is simple:
Privacy Possum disables surveillance a page does on it's own.
TorBrowser disables surveillance based on protocols
It's a bit more tricky to disable JavaScript based surveillance. The best way is to disable JavaScript. Some tools allow you to disable specific sources of JavaScript. uBlock has this functionality integrated. However, these tools require a bit more substantial understanding of how HTML documents work.
Most of this measures don't have an immediate benefit to you. Quite the opposite! TorBrowser is slow. Disabling JavaScript will break most pages because they rely so heavily on it.[10] But we shape the web by the way we use it. Using these tools shapes the web away from specific, slow, surveilled user experiences towards a common experience equal to all users.
EDIT: All of this was for nought, since tumblr filter MathML content from blog posts. They do that because they need to display posts on the dashboard, where a blog's layout isn't used. So any "invalid" HTML (i.e. HTML most browsers don't support) needs to be filtred. So for the sake of math on tumblr, please, PLESE use browsers that support the full HTML-syntax!
0 notes
rocketcollider · 6 years
Text
Keeping Particles in Line
The Basics
First off, there are many types of particle accelerators. But they all utilise the one effect science has found to reliably accelerate particles in vacuum: voltages acting on charged particles.
(And we are talking about making things go fastER! Already fast particles can come from many different sources, including space, radioactive decay and particle interaction.)
A voltage puts energy into charges changing their velocity. The higher the voltage[1], the faster the particles get.
Every charge creates a tiny voltage difference. How exactly that works isn’t important right now. We only need this property to create our own voltages. By separating a lot of positive and negative charges in different containers, we can recover a high voltage between them.
Imagine two plates with nothing between them. When we put positive charges in one plate and negative charges in the other, the voltage resulting will add a velocity to all free charges between both plates. Postive charges gain velocity towards the negative plate and negative charges towards the positive.
In the macroscopic world, we rarely move around positive charges, but instead move around electrons. Any atom is made of it’s core and electrons. The core and the electrons are oppositely charged.[2]
As long as core and electrons are close togehter, their voltage differences overlap and we don’t precieve them as charged. By separating them, we recover the voltage between them. And since atoms like to stick in their place and they only have one core, they tend to toss off electrons long before they start moving themselves. So when we “charge” something, we really talk about putting electrons in or pulling electrons out leaving the positively charged cores behind.
Metals are good charge-containers. Electrons can move freely through metals. If we make two plates out of metal, we can move charges between them by applying a voltage from a power source. This circuit is generally referred to as capacitor. If we have access to a high voltage source, we can build a simple accelerator.
A Simple Accelerator
To build a simple electron accelerator, we need two metal plates and some nonconducting material to hold them in place. We position them face to face and drill a hole at the very center through both plates. Over one hole we attach our experiment, e.g. a sample we want to examine. Over the other hole we attach our particle source.
A piece of wire we can heat very hot in vacuum is a good electron source. When metal is hot enough, some of the electrons will come out and we can accelerate them. And heating metal is as simple as building a light bulb: running high currents through some wire.
When we connect our voltage source to the plates, it takes electrons from one plate and puts them into the other. In theory, if we disconnect the plates from the voltage source, the charges would stay there without any additional work necessary. But there is no perfect insulator and over time, electrons would move slowly from one plate to the other. So we keep the voltage source attached.
To accelerate electrons, we heat the wire until it’s hot enough. Some electrons will come out and by accident go through the hole. We get better results by charging the wire as well, so we connect that to a voltage source too.
As long as they are behind both plates, they will see the voltage of both plates overlap, similar to how an electron withtin the atom overlaps with the core. One plate adds velocity away from, while the other adds velocity towards to the plates. The overall force would be zero, so particles first have to come in between the plates.
Once an electron stumbled through the hole, it will gain velocity exactly perpendicular to them towards the plate with less electrons, ignoring the hole we drilled earlier. That is because there are equally many electrons on every side of the hole, and equally many missing electrons on every side of the opposing hole. An electron won’t have any indicator weather to go right or left, just to get away from one plate and towards the other. If we drilled the holes precisely enough, any electron falling in one side will come out the other. A lot faster.
This simple particle accelerator is called an electron gun. For purely practical reasons it’s better to use a cup as first plate, so the charged hot wire is shielded and doesn’t disturbe the acceleration process.
Hot wire
Negative “plate” in form of a cup
Positive plate with hole at center
All Us are a power source. UH is the power to heat the wire, UW and UA supply our acceleration voltage. Between the plates are arrows depicting the electric field, essentially how the voltage drops from one plate towards the other.[3]
This simple device is already enough to have a lot of fun. It’s the essential ingredient in electron microscopes and what powered old CRT monitors or by hitting a metal plate we can extract some x-rays or even build a metal 3D printer.
A Slightly More Complex Accelerator
The higher the voltage between the plates, the faster the electrons will come out. But for technical reasons, we can’t create arbitrarily high voltages. Things would break down or become prohibitively expensive.
Placing accelerator after accelerator, though possible, would require many small voltage sources, which are usually even more expensive than a single big one. Not to mention we would effectively add up all their voltages, so we require very good isolation of our particle source and the experiment. We need to be clever.
For example by reusing a single voltage source over and over again. That way, we would still build accelerator after accelerator, but keep costs and voltage low by recycling[4].
In detail, many plates with holes in a row constitute many accelerators with missing voltage source. Connecting just two plates at a time, we activate just one accelerator. The first two plates operate exactly like the simple accelerator. A bunch of electrons enters and exits. While they fly through the exit plate, we rapidly unplug the voltage source and connect the next two plates. When the electron bunch flys through the next simple accelerator, it will work just like the first one. All we have to do now is repeat this process for all our plates and we get massively fast electrons.
We can switch the voltage source while the electrons pass through the hole in the plate without slwoing them down or knocking them off course. When replugging the plate the electrons fly through, we drain positive charges and fill it with negative ones.[5] Since that happens on all sides of the hole at once, electrons in the hole see the same charges on all sides all the time. It doesn’t matter how much they are pushed or pulled in no direction. switching the voltage therefore has no effect while the electrons are moving through the hole.
There is a simple upper limit to how fast this accelerator can make electrons go: How fast we can reverse high voltages. So again, we need to be clever to work around this problem.
A computer could do the switching for us. The problem here is the high voltage, which makes any switch, even a computer controlled switch, quite slow.
Reversing the voltage while the electrons fly through a thin plate is hard. Reversing the voltage while electrons fly through an elongated metal tube is easy.[6] This way we have some more time to flip the switch.
To be super fast at switching, we want to wire up all plates in one place. What we will find is that we keep charging the plates in alternating fashion. So to make the switching faster, we can hook up every second plate to the same wire. This way, we are left with only two wires. Flipping them will flip the voltage in all plates. Now since we flip the voltage in all plates at the same time, we can even get some more electrons accelerated by accelerating several bunches at the same time but two tubes (= plates) appart.
The electrons get faster with every simple accelerator. To keep the time we have for switching constant, we need to build longer tubes after every stage. If we do this precise enough, we can dump the computer and instead use plain old alternating current to do the switching. Handling alternating current is much simpler from an engineering perspective than handling switches.
The animation shows how each tube is charged and, the green line above, how the voltage looks to the particle. Remember, only voltage differences change the velocity of a charged particle.
The takeaway here should be that alternating current is super simple but requires constant acceleration-times which require longer and longer accelerator tubes. But super long accelerators are unwieldy.
A Round Accelerator
Enter: magnets.
A magnetic field forces charges on circular (or coiling) path. We can use this to use the same tube over and over again.
The clever trick is the observation that an electron’s circular path has to be bigger the faster it’s moving.[7]
As a result, the time an electron takes to complete one circle is always the same.
So what we could do is just take all our tubes and place them, bent, inside a magnetic field. By fiddling with the strength of the magnetic field, we can coil up our tubes until they all snuggle one another like a snake coiled up on itself. Electrons would start at the center and get faster and faster until they exit at the brim. This way we take advantage of the ever bigger circular paths.
But since the time for a single circle is constant, we can tune the magnetic field so the switching time is exactly one half-circle. The lengths of our tubes is tuned to our switching times. So now all our tubes take one half turn, resulting in all slits aligning and forming one slit splitting the coiled up snake in two.
Because we flip voltage every half-circle, all tubes connected together are on one half and the other tubes are in the other half. This allows us to remove the walls between the tubes.
Imagine a huge coin. Large enough that our fastest electrons can circle freely inside. Hollow it out. Slice it in halve. Place both halves facing each other roughly one hand width apart in a strong magnetic field. Put a particle source[8] at the very center between both halves.
When particles exit the source, they see two charged “plates”, so they move towards the positively charged half-coin. The magnetic field can be ignored for such small distances.
Once they are inside the “tube”[9], they don’t gain velocity but the magnetic field steers them. So they orbit around and want to exit the half-coin again. Before they do, the voltage flips. When the electrons exit, they see two charged “plates” and are driven away from the plate they just exited. This cycle repeats, until they are so fast, they don’t fit inside our coin anymore.
Ernest Lawrance drew this for his patent of the cyclotron in 1934. On the left, you see the two half-coins 1 and 2. They are charged by a connected High Frequency Oscillator 4 (= AC-power). The ∓ and ± signify the two halfs are always charged oppoitely. What’s not drawn is an extraction-tube for the High Speed Ions, which is technically required to shield them weird fields at the magnet’s rim so they continue in a straight line. The line titled “Magnetic Field” is drawn where the field starts to diverge.
On the right the disk is viewed from the side. Here the magnet, 3, is depicted an it’s magnetic field m is shown, including it’s divergence on the edges. p indicates the particles’ flight path, e the voltage applied to the particles and α the central plane. I guess j is supposed to be a 1, but I don’t know what the arrows at the very top towards the center are supposed to signify.
This way, we can build a particle accelerator that would have been as long as some streets at the size of a fridge. So what happens if we make it bigger?
A Particle Round About
The coin-shaped accelerator will run into some problems when particles get too close to the speed of light. Relativistic effects take hold and correcting for them quickly gets very difficult.
A particle always gains the same energy when passing through an accelerator. Close to the speed of light, adding ever more kinetic energy doesn’t add much more velocity.[10]
Inside a magnetic field, the size of the circle a particle travels depends on it’s energy, not it’s speed. When our particles need to fly bigger circles at essentially the same speed, they can’t all complete one circle at the same time anymore. Our coin-shaped accelerator won’t work, because we based the concept on all particles taking the same time to travel a half-circle.
We need to be clever again.
At constant magnetic field, the time for a particle to complete one circle depends only on it’s mass. According to relativity, mass is equal to energy. If we can manage to add the energy exactly equal to the mass of one electron during a single voltage flip, the electrons arrival times could be synchronised.
We can’t build a device like this with two hollow half-coins. Instead, we need to build a tiny, simple accelerator consisting of two plates inside a magnetic field. Electrons exiting the accelerator will circle back to it’s entry. Every time they fly through the accelerator, they take exactly one slow electron’s circle time longer. That way, all electron bunches arrive synchronised with other bunches.
It looks quite similar, but here an extraction-tube is drawn in red which uses a small voltage to add some sideways velocity to the particle. The simple accelerator is at the top, connected to a high frequency voltage source.
The problem with this approach is that the simple accelerator needs to reach about 500 kV.[11] Though quite doable, we still need to flip the voltage constantly at very high frequency.[12] The particles need to arrive at the accelerator when the voltage is at it’s highest value to be efficient. Since we want to accelerate our particles close to the speed of light, the time to flip is close to how long a ray of light would need to pass through an electron’s circle. That is very little time and requires frequent switching.
However, this concept works for electrons only. Since we need to add the particles mass in energy with each passing, with higher particle mass we need to increase the voltage as well. Just protons would require to accelerate at around one giga volt. That is a trillion volts. That is a lot of voltage.
But even for electrons there is a simple size limit. The faster our electrons should be at the end of acceleration, the bigger circles they need to pass, the bigger our magnet has to be. At this point, we might as well give up.
A BIG Particle Round About
We want faster electrons. We want more particles. We need to go bigger!
Trying to build accelerators with magnets to have particles pass the same accelerator several times will soon find a very simple problem: focus.
Think about the distance electrons have to travel to pass through the accelerator. Even if the accelerator itself is quite small, the electrons still fly vast distances. Have you ever tried to focus a beam of light across town without any optics? That’s what we are doing with our particles beams. We need some optics.
One bunch of electrons, though very tiny, is still spread out and every pass through a magnetic field spreads them out further by forcing them on different circles depending on their energy. Oh, and they are all of the same charge and therefore try to push eachother apart. Unless we can build tiny, powerful accelerators, cough, we need to focus the beam somehow.
Enter: more magnets.
First we need to split the one huge magnet into several smaller magnets, simply because one huge magnet is more expensive, harder to cool and simply not practical for our purposes. So instead we build magnets that turn the particles for some degrees, arrange them in a circle and let the particles fly between them. After each pass, we now have a particle beam we can manipulate, e.g. accelerate or do experiments with or focus again.
So how do we do focusing?
Even more magnets!
What would be great are magnets that don’t effect the very centered electrons, but steer those at the side on a path inwards. Since magnetic fields curve the electrons path, that seems possible.
We just have to build two magnets next to each other, one on either side of the particle beam. One pushes them right, the other left, so that at the center they cancel out. The farther out a particle travels, the stronger it’s pushed inwards, resulting in all particles being directed towards a single point behind the magnets.
Then all we have to do is build another pair of magnets that does the same thing with particles too far up or down. Simple, right? Wrong.
Two magnetic fields side by side interact and distort each other. Two opposing magnetic fields side by side are a special case called a quadrupole. And though a quadrupole does bend particles inwards in one direction, it spreads them out in the other by the same amount.[12]
Tumblr media
A schematic depiction of how a quadrupole forms. Though the sides may be distorted, at the center the magnetic field is curved equally horizontally and vertically.
Naively, we would say that moving inwards then outwards has no net effect. But that’s not precisely what happens. What the magnets do is bend the particles’ paths, so they move very little inward or outward. Instead, they are set on a trajectory which will land them further in or further out. Actually moving inwards or outwards happens after the quadrupole in free flight.
A quadrupoles magnetic field gradually changes from up to down or left to right, crossing zero at the very center of the particle beam. That means the closer the particles are to the beam center, the less steering force they experience. If we let the particles pass some distance before using a second quadrupole, the focused particles are close to the center and defocused particles are farther away. Thereby defocused particles will experience a stronger focusing force while focused particles experience a weaker defocusing force. If we choose the magnetic field strength and distance correctly, we can focus horizontally and vertically into the same point.
Using a focusing and defocusing lens to form a single focal point is actually well known in optics. They did us a favor by already working out the math of focal lengths, so all we need to do is plug in our special conditions[13] and what we get is that the second lens needs to be twice as strong as the first one.
Tumblr media
The top images show a front-view of the quadrupole as the particle beam sees it, with a colored ring tracing the brim of the beam. Red and green signify horizontal and vertical portions of the beam. Below, the vertical and horizontal edges of the beam are shown in a side view. As you can see, they end up passing through the same point. (The effect of the magnetic fields are shown for positively charged particles, electrons behave inversely.)
Usually though, even more complex magnetic fields are used. A quadrupole is a great thing, but particles of different energies are affected differently. Add another pair of magnets forming a sextupole and that problem can be fixed. And having all particles pass through one point isn’t enough, we want them to approach in the same angle of incidence. Add another quadrupole (or sextupole) and that’s possible as well. But since we have our particles go in circles, there isn’t just one point where they should be focused but rather constantly kept close together. Sprinkle some linear algebra on top, and you can calculate a constantly focused beam.
Finally!
We did it! We’ve got super fast particles waiting for our experiments. With this much energy, we can tap into a whole new realm of physics. With some puny electrons we could observe the structure of tiny crystals. With particle beams we can observe the structure of subatomic particles. Sort of.
It’s much more difficult to take “pictures” at this scale. Essentially impossible. When we observe scattered electrons, we just need to look at the exact angle they came from to calculate a picture. When we smash particles to pieces, we need to look at the fragments very carefully to get at least some information about the structure of the initial particle. If it had a charge-distribution, they will scatter slightly differently. That’s why particle detectors need to be that huge, so they can observe all fragments scattering in all directions. And that’s if they observe anything at all.
We accelerate particles in bunches. One bunch has some several thousand particles. It’s much more a loose cloud of particles. When this cloud hits a hard wall, there are so many atoms in that wall that every particle will find an atom eventually. But that’s quite inefficient, because most of our particle’s energy will be conserved in kinetic energy in the particles scattering off.[14] To direct most energy into the particle reaction, we need to have two bunches heading for each other straight on. But since bunches are quite loose, nearly all particles will miss. It will take many bunches to observe even a single reaction.
That’s why the LHC has two particle beams. But even when collisions happen, most of the time they are two particles slightly touching and not head on. So we need to observe many collisions until we find an interesting one. Now there is the problem of building collision detectors. But that’s another chapter for a later day.
Shiny Electrons!
The following isn’t necessarily important, but it’s interesting and I’m too lazy to write another post about it.[14]
There is a bunch of cool experiments we could try with fast particles, but the very first one is actually a bit of a problem for circular accelerators. Particles inside a magnetic field will loose energy. Not because of resistance in the classical sense, they are in vacuum, but because of radiation.
Whenever a charge changes velocity, some energy is lost as radiation. We actively use that effect in X-ray tubes: An electron beam hits a target, thereby slowing the electrons down instantly. This massive (negative) acceleration releases a lot of radiation. The same thing occurs inside a linear accelerator, where we accelerate electrons to ever higher velocities. And though magnetic fields don’t change particles’ speeds, they do direct them and thereby change their velocity. That’s still acceleration. And actually the worst kind. Thanks to, you guessed it, relativity.
So firstly, radiation always shoots out sideways to any acceleration. Imagine a charge on a rope. If you pull the rope and accelerate the charge, the radiation is released in the shape of an umbrella. Far below the speed of light, it doesn’t matter in what direction you pull the rope, the radiation will always come out sideways.
But the speed of light does weird things to radiation. Essentially, at relativistic speeds radiation released sideways is dimmed, even more so backwards, while radiation released forwards is that much brighter. Conservation of energy is still in effect, so that extra radiation is powered by extra losses of kinetic energy of the particle. Pulling the rope in the charge’s direction of flight releases the same umbrella of radiation, only smaller, so less energy is lost. However, pulling the rope on our charge sideways will form a high radiation beam in the direction of flight, costing much more energy. On the other hand, we just built a brilliant torch light.
A Brilliant Bunch
In some cases, we want brilliant light. Material properties, surface phenomena and dark rooms react quite revealing to brilliance. But for fast particles, this is plain lost energy. We need to minimise these losses if we want to conduct some particle physics.
There are two things we can do to control that effect. First and foremost, we can build particle roundabouts as straight as possible. So either plain linear accelerators, or very huge roundabouts. Usually, this would be the point to be clever, but so far nobody was. It seems pretty essential physics: Turning particles is acceleration and costs energy. Maybe building very efficient accelerators could overcompensate that energy loss, but right now, it’s cheaper to build huge circles. If you find a way to be clever, you are probably in for a Nobel Price.
The only trick we know is using heavier particles. The heavier a particle is, the slower it can be while still carrying the same energy. It’s a drop on a stone, but it’s something.
On the other hand, we could do the opposite and build brilliant lights. These are called synchrotrons. In a synchrotorn, electrons are used since they are very light. Behind every magnet the light is used in a beam line to do experiments. Turning electrons are a unique light source, because they are easily tuneable and shine bright even in the x-ray spectrum. A single magnet, however, causes them to release a whole range of colors. To dial in a specific wavelength, one possibility is to wiggle the beam left to right with many alternating magnetic fields.[15] This device works by releasing radiation with every tight turn the electrons are forced to take. Light from previous turns shines on electrons taking the next turns. This light resonates with the electrons and eases radiation of the same color, so more radiation of a single color is released.
Kicking it up a notch is the free electron laser. In a wiggler, a color is roughly dialed in by choosing the right turning radius and distance. Though it helps with dialing in a specific color, the electrons still shine bright in adjacent colors. But we can use the same effect that made wigglers more efficient: radiation eases the release of the same color.
Tumblr media
What you see here are two wigglers[16] with a side-track for the electrons in between. The light from the first wiggler is filterd with a diamond, the filtered light then is amplified by the second wiggler. Behind that assembly the electrons are removed and some experiments conducted.
A free electron laser consists of two wigglers. The first is used to shine roughly one color on a set of filters. The filters clean up the radiation by removing all the color we don’t want. That radiation is directed into the next wiggler, amplifying that radiation and resulting in massive radiation of a very narrow color.
So there you go. That’s how billion dollar research facilities work. Now if anybody could tell me what magic drives a microwave, I might explain that next time.
1 note · View note
rocketcollider · 6 years
Text
Lights at Light’s Speed
Measuring speed is easy: Take your trusted measuring stick and stop the time it takes to cross that. So tell me, how fast is that star over there? Okay, how about a speeding car?
Astronomers and radar-guns share some kind of magic that lets them look at something and instantly knowing how fast it’s going. Though different in detail, the effect both use is exactly the same. But there is a lot more to it than just measuring speed.
Speeding Stars
Let’s look at a light bulb. A perfectly round one. With a battery inside. That will be our star-standin, because throwing light bulbs is much easier than throwing stars.[1] And let’s use a yellow light bulb, simply because white is actually a mixture of many colors, whereas yellow is a single color. That will be important later.
Now throw the bulb. Faster. More Faster. Just a bit closer to the speed of light would be great! Don’t worry, there will be only slight relativistic effects involved. For the most part, all we need to consider is that light, no matter what, moves at the speed of light.
For our purposes, every ray of light behaves just like a stream of water. The bulb sends out rays in every direction, which would look like a badly leaking rain cloud.
Say a rain cloud stormed at you at roughly the speed of falling raindrops. It spurts out raindrops to all sides, but all these raindrops get an extra velocity added to them. So raindrops that the cloud spurts out sideways now fly towards you at an angle. Raindrops spurted out backwards are now very slow, while raindrops spurted out forward are much faster. And if you don’t know this, you point the umbrella in the wrong direction. Raindrops coming from a moving cloud will always hit you at an angle, not straight down. It’s the same for moving light bulbs.
Raindrops don’t have a certain speed imposed onto them. Light does. So to get from Raindrops to rays of light, we need to squeeze and stretch them, until their speed matches that of light. Since light rays sent backwards would be too slow, they need to be stretched while those sent forward need to be squeezed. Remember, rays sent to the side actually move a bit forward now, so they will be squeezed a bit as well.
Squeezing and stretching actually happens all the time with waves. It’s called the Doppler effect. You can observe it by moving something through water. The waves breaking at it’s brim will travel equally fast in all directions, so waves behind the object will be stretched while those in front will be squeezed.
I promised a bit of relativity. Releasing light is just another process. So if time slows down, this process slows down and not as much light is released. The overall brightness of the bulb gets a bit dimmed. That’s it, no more relativity!
Outsiders
So far, all we talked about is how the light coming off the bulb’s surface will be transformed when the bulb is very fast. It’s time to talk about how it looks.
First, the colors: When light rays get squeezed, their wavelength changes. Wavelength is equal to color. That means the rays sent forward will transform from yellow to green, blue and ultimately violet. Those sent directly forward are squeezed the most, while those that seem to go sideways from the outside (which are those the bulb released slightly backwards) will still look yellow. Rays sent backwards on the other hand will be stretched, turning yellow into red and close to infrared. Our once boring yellow light is now, depending on how you look at it, a rainbow of all colors.
And that simple effect allows us to measure the speed of stars. We know very well what colors a star shows and by measuring how much reder or bluer those colors are, we can determine the stars’ speed.
But, there’s more! As I mentioned rays sent sideways will be bent forward. Say we painted some black markings on the bulb (black is the absence of light, so it always has the same “color”), those would now look squeezed to anybody in front of the bulb, since he will see those from the side of the bulb as well. Anybody looking at the bulb from behind will see our markings stretched, since the rays backwards are bent sideways.
Staring down the bulb head on, you see more surface. That also means there is more energy released forward, since more surface releases more energy. But that’s not all: The energy of light is higher the lower it’s wavelength. Since all rays released forward are squeezed, they have a lower wavelength and more energy. A speeding light bulb will release most of it’s energy forwards.
Speeding Lights vs. Speeding Cars
Cars and stars are slightly different.[2] Stars glow, cars don’t.[3] Stars have a fixed range of colors, cars can be colored very differently. But they aren’t as far away, so we can just repaint them with a known color.
A radar-gun is essentially a light source of a well defined color. It’s just a very long wavelength color and our eyes can’t see that anymore, similar to how your ears can’t hear a dog whistle[4]. That color is reflected by a car and thereby the car “shines” that color. When the car is moving, the color shifts again. By detecting that shift, a radar-gun can measure the speed of a car without touching it, without any measuring sticks or stopwatches.
0 notes
rocketcollider · 6 years
Text
The Charges in the Field
Charges act forces on each other. These forces are usually described by electric fields. I don’t like that description.
A better way to think about electric forces is in terms of energy. It takes energy to separate charges. A particle moving from one charge to another will gain some of that energy, depending on how much charge the particle carries. It has to gain the exact amount of energy it took to separate the same charge the particle carries.
The important thing to recognise is that the energy gained does not depend on the particle’s path. It can travel in circles, wind itself like a snake or do other crazy stuff, the energy a particle can possibly gain (and possibly loose at the same time due to e.g. friction) is constant between two fixed points.
A ball moving on a shaped landscape behaves the exact same way. Any change in kinetic energy has to be equal to it’s mass and change in height, no matter what path it took to get there. Charged particles gain energy equal to their charge and change in … let’s call it “voltage”.
Voltage is essentially electric tension. If we put charges in separate containers, e.g. metal plates, we put some tension on the system. Tension that puts a force on the plates and tries to move them. Releasing the tension, allowing the plates to move, would gain those plates exactly the energy we had overcome to separate the charges. But we can release some tension by just taking one charge and moving it to the other plate. That would decrease the tension. This reduction is potential energy that has to go somewhere. It went into the charge we moved. At the same time, if we want to separate another charge and put them into the plates, we have to overcome this tension. So afterwards, more tension is stored in the plates.
By having particles traveling between the plates, we can extract the energy stored in this tension. The energy we can extract is always equal to the charge our particle caries and the tension at the time:
The difference in a particles energy is equal to its charge times the voltage it crossed.
Now we don’t need to know no particular electric field in a voltage landscape. As long as we know how high the voltage is at which point, we can just compare two points and figure out the energy of a charged particle. We can even go the other way and ask ourselves how far up particles with a certain energy can get.
We may be interested in the energy a particle gains when it doesn’t hit a point of known voltage but passes it by. Since a particle gets faster continuously, passing by a point of known voltage it has to have nearly the same energy as a particle hitting a point of known voltage. So if changing our destination by a little changes the energy only slightly as well. That requires us to assign a voltage to points in empty space between known voltages. Doing this mathematically, we can calculate the complete landscape just by knowing the voltage applied to which parts. After that we don’t just know where a particle is and where it was, and automatically we know its energy.
When you have a particle not in a vacuum, but inside a conductor, it will constantly loose energy due to friction. At the end of the conductor, the particle will be at pretty much the same kinetic energy, but the conductor will have heated up. The friction constantly removes kinetic energy and deposits it in the form of heat in the conductor.
That friction is actually what makes electric motors move. Magnetic fields force charges on circular paths. A simple motor can be built by having a disk carry a current from its center to its brim, while a magnetic field is pointing perpendicular through the disk. Electrons in a vacuum would just circle round and at some point fly out of the magnetic field. Electrons in a conductor turn the conducting disk because they grind against the conductor material and thereby turn it.
Since we know the energy one charge (an electron) gains by moving through the disk, we immediately know how much energy the charge can lose throughout the disk. So by just counting the number of charges going through the disk per second, we get the power this motor can deliver. In fact, this is true for any electrical system:
The power delivered by any electrical system is the applied voltage times the amount of charge per second subject to that voltage: $Power = Voltage * Charge Per Second$, or in scientific notation $P=U*I$
0 notes