Capacitors (Part 1) – A2 Physics Revision


Introduction

  • A potential difference is a difference in energy (electrical, in this case) between two places
  • If there’s a potential difference, electrons will try to flow to even it out
  • A capacitor is a component which stores electrical charge
  • Capacitors can be charged up by putting a potential difference across them
  • They can only discharge if a path between their two ends is made available
  • If you charge a capacitor from a battery and then remove the battery – breaking the circuit – the capacitor will retain the charge
  • You could then put a light bulb where the battery was – completing the circuit – and the current stored in the capacitor would flow through the bulb, lighting it up briefly

Structure

  • A capacitor is effectively a pair of metal plates, separated by an electrical insulator
  • The insulator (called the dielectric) could just be air, but the capacitor is more effective if a better insulator is used
  • To make small capacitors that can hold a lot of charge, large, flat plates and dielectrics are wrapped up tightly and put into small cylindrical cases with a wire at each end
  • Some capacitors are polarised and some are not
  • Polarised capacitors have a positive and a negative end
  • Non-polarised capacitors can be connected either way ’round without exploding being damaged

Charging Up

  • Normally, the free electrons in the capacitor are spread out evenly
  • When a potential difference is connected across the capacitor, the electrons are attracted to the positive charge
  • The electrons gather on the plate connected to the positive end of the battery
  • The plate connected to the negative end of the battery loses the majority of its electrons
  • As long as the battery is connected, the electrons are forced on to one plate
  • The potential difference of the battery determines how many electrons it is able to squeeze on to the plate
  • As the build up of electrons grows, it becomes harder and harder for the battery to force more electrons around, as they don’t appreciate being crammed together
  • This is why charging a capacitor starts off fast and gets slower towards the end
  • When there are so many electrons on one plate that the potential difference between the two plates is equal to the potential difference being used to charge the capacitor, the charging can go no further

Storing

  • When the battery is disconnected, the electrons try to spread out evenly again
  • They find themselves trapped on one plate, because the circuit has been broken
  • The other plate, with its lack of electrons, is now positively charged
  • The electrons are attracted to it, because their magnetic field can sense the positive charge through the dielectric, and pulls them towards it
  • Since the dielectric doesn’t conduct electricity, there’s no way for the electrons to actually reach the other side
  • They stay like this until somebody offers them an escape route by connecting the two ends of the capacitor
  • (They don’t quite stay like that forever, or we’d be using capacitors instead of batteries. Electrons can gradually leak from one side to another, so over a long period of time the capacitor will discharge on its own)

Discharging

  • When a path becomes available between the two plates, the electrons can spread out
  • This happens very quickly to begin with, as the potential difference between the two plates is high
  • The potential difference decreases as more electrons reach the other plate
  • This means that the electrons spread out less quickly as time goes on
  • The capacitor discharges in the opposite direction from which it charged (when charging, the electrons moved towards one plate, and when discharging, they move towards the other, back to where they were originally)
  • Putting a resistor on the discharging path limits the current, so the electrons can’t flow as fast, and the capacitor takes longer to discharge
  • The battery, if left connected, is not a suitable discharge route because its potential difference is still forcing the electrons on to the plate

Data, Formulae and Relationships Booklet

  • No equations to remember from this post, thankfully
  • There are some coming in parts two and three, though!
Advertisements
Posted in A2 Physics Revision, Revision | Leave a comment

Radioactive Decay (Part Two) – A2 Physics Revision


Make sure you’ve read the previous part of this post first!

Half Life

  • The half-life of a radioactive substance is the time taken for half of it to decay
  • The number of not-yet-decayed nuclei will always halve after this amount of time (unless the sample size is unreasonably small)
  • Since elements vary in how quickly they decay, half-life can be measured in a variety of units of time, such as milliseconds or years
  • That said, the units of the decay constant will depend on it (as the units on each side have to match in the equation at the end of this list)
  • You can see half-lives on the graph by drawing a line down from the point on the exponential curve where N = N0/2, to the x-axis, then repeating for N = N0/4, N = N0/8 and so on
  • The vertical distances between the points will be smaller each time, but the horizontal distance – the half-life – will be the same between each
  • To find the fraction of the nuclei which will be left after a given number of half-lives, you can use 0.5n = fraction remaining after n half-lives
  • This is the same as calculating 1/2n
  • Multiplying the fraction by the original number of nuclei will produce the remaining number
  • The half-life t1/2 and the decay constant are related by the equation:
  • t1/2 = ln(2) / λ

Using Activity Instead

  • Radioactive decay is exponential, so its rate of change is proportional to the quantity (of nuclei) present
  • This can be written as dN/dt α N
  • Counting the number of nuclei in a sample is very difficult, so it’s impractical to measure N
  • Since they’re proportional, dN/dt is often used in graphs and equations instead of N
  • The proper name for dN/dt is the activity and its symbol is A
  • A = dN/dt
  • The activity of a sample is the rate sample’s rate of decay
  • In other words, it’s the count rate; the number of radioactive emissions per unit time
  • As discussed for half-life, above, time could be measured in a variety of units
  • When you use A instead of N in the exponential equation, you get: A = A0e-λt
  • This graph is more practical to produce as A is much easier to measure than N
  • Activity is measured in counts per second. An equivalent unit is Bq (Becquerels)
  • The constant of proportionality between A and N is the decay constant, so:
  • A = dN/dt = λN
  • dN/dt will be negative as N is decreasing with time, but A, λ and N are all positive, so strictly there should be a minus sign in the equation for it to be true

Data, Formulae and Relationships Booklet

  • You’ll have to remember that the fraction after n half-lives is 0.5n
  • The equation relating half-life and decay constant is in the formula booklet
  • ΔN/Δt = -λN is in the formula booklet, but you’ll have to remember that this it’s also the activity, A
  • N=N0e-λt is in the formula booklet, but you’ll have to remember that the same goes for using A instead of N
Posted in A2 Physics Revision, Revision | Tagged , , | Leave a comment

Radioactive Decay (Part One) – A2 Physics Revision


Decay

  • Unstable nuclei decay by emitting radiation (without external stimulus)
  • Alpha radiation is composed of helium nuclei (balls of two protons and two neutrons, with no electrons)
  • Beta radiation is the emission of electrons or positrons
  • Gamma radiation is the loss of energy only: a high-energy photon is emitted, but no protons, neutrons or electrons are lost
  • Emitting radiation changes the nucleus to a more stable state
  • (In the case of alpha emission, its position on the periodic table also changes)

By The Way

  • An alpha particle has a positive charge of 3.2×10-19 C, because it is an ion lacking two electrons
  • A beta particle has a negative charge of 1.6×10-19 C, unless it’s a positron, in which case the charge is positive
  • Positrons are the antiparticle of electrons, with the opposite properties, apart from their mass, which is the same
  • A gamma particle (photon) has no charge, and also no mass
  • Only energy is lost in gamma emission (it tends to happen when the atom rearranges into a lower energy state following alpha or beta emission)
  • Elements can have long decay chains in which they switch between several different elements and isotopes by emitting various types of radiation

Randomness and Probability

  • Radioactive decay is completely random. There’s no way to tell how long it’ll take an individual nucleus to decay
  • If you have enough nuclei, however, you can predict quite accurately how many will decay within a given time, or how long it’ll take before a certain number of them decay, for example
  • This is because radioactive decay behaves according to probability, as long as the sample size is large enough

It’s Exponential

  • The rate of change is proportional to the quantity present, because:
  • Each nuclei in the sample has the same, fixed chance of decaying each second
  • …so when there are lots of nuclei left, more will decay in a given time
  • …and when there aren’t many left, fewer will decay in the same amount of time
  • (It’s like rolling dice – each has the same chance of landing on a six, but the more you roll at once, the more sixes you’ll get each time)
  • The fixed chance of decaying in one second is the decay constant
  • The units of the decay constant are s-1 and its symbol is λ
  • (You may remember the Greek letter lambda from such equations as c=fλ for waves, where it was used to represent wavelength)

Graphs

  • Plotting the number of remaining (not decayed yet) nuclei on the y-axis against time on the x-axis should produce an exponential decay curve
  • You can call these N (number of nuclei) and t (time), to change the y=e-x equation into something useful:
  • N = N0e-λt
  • N is the nuclei remaining at time t, and N0 is how many there were originally, when t was zero
  • This can be used to work out how many nuclei will be remaining at a certain time, or, with a bit of rearranging, how long it’ll take for a certain number of nuclei to decay, for example
  • Theoretically, the exponential decay curve never reaches the x-axis, but since nuclei are a discrete quantity, there can’t be fractions of intact nuclei remaining, so eventually the number will reach zero
  • By this time, the graph will probably be a bit wobbly anyway, since the sample size will be small and randomness will be more evident
  • It can be turned into a linear natural log graph
  • The graph of ln(N) against t should have a straight line, with a gradient of -λ, which makes it a good way to find the decay constant

Data, Formulae and Relationships Booklet

  • N = N0e-λt is in the formula booklet
  • You may want to remember that ln(N/N0) = -λt for the natural log graph
  • I also mentioned c=fλ in this post. It’s in the formula booklet as v=fλ, which is more general because it also applies to waves which don’t travel at the speed of light
  • The charge on an electron is in the formula booklet
  • The charge on an alpha particle isn’t in the formula booklet. It’s likely to be given in the question if you need it, but if it isn’t, just remember that an alpha particle is a helium nucleus with two protons, so it has two missing electrons’ worth of net charge

Be sure to read the second part of this post.

Posted in A2 Physics Revision, Revision | Tagged , , , , | Leave a comment

Models and Exponentials – A2 Physics Revision


Modelling

  • Modelling is creating an artificial world which can be used to make predictions about a system
  • Models are simplified and idealised, as they usually don’t take into account all of the smallest factors
  • An example of modelling is the use of exponential equations to describe things like radioactive decay and capacitor charging / discharging
  • (Further examples are the Boltzmann Factor and the energy loss in damped oscillators)

Graph Shape

  • The rate of change is proportional to the quantity present
  • If N is the quantity, then ΔN/Δt α N
  • Exponential growth gets faster and faster because the rate of change increases as the quantity increases
  • Exponential decay gets slower and slower because the rate of change decreases as the quantity decreases
  • The graph of y = emx shows exponential growth
  • The graph of y = e-mx shows exponential decay

Natural Log Graphs

  • To get an exponential relationship to form a straight line, you can plot the natural log of the y-axis variable
  • If you take logs of both sides of y = emx you get ln y = mx, so plotting ln y against x will produce a straight line with the gradient m
  • Plotting a natural log graph to see whether it makes a straight line is one way to test whether the relationship between two variables is exponential
  • Exponential growth should produce a natural log graph with a positive gradient
  • Exponential decay should produce a natural log graph with a negative gradient
  • The gradient is the variable x is multiplied by in the original equation (so the gradient of the natural log graph of y = emx is x, and y = e-mx‘s natural log graph would have a gradient of -m)

Constant Ratio Test

  • Another method of testing whether a relationship is exponential is to perform a constant ratio test on the set of data
  • A relationship is exponential if there is always the same ratio between consecutive y values (at equal x intervals)
  • I’m not sure how clear I’ve made that. If you can tolerate an example, have a look at the two below

Successful Constant Ratio Example

  • Measurements of variable y have been taken at equal intervals of variable x
  • It’s important that x increases by the same amount each time – in this case, by 5
  • Every y value (except the first) has been divided by the y value before it
  • The result has always been roughly 1.4
  • This ratio is fairly constant, so we can conclude that the relationship between x and y is exponential
  • (If x and y were plotted, the result would be an exponential growth curve)
x y y divided by previous y (3 d.p.)
10 470 No Previous y available
15 679 679 / 470 = 1.445
20 977 977 / 679 = 1.438
25 1408 1408 / 977 = 1.441
30 2025 2025 / 1408 = 1.438

Unsuccessful Constant Ratio Example

  • Here’s one that fails…
  • The ratio varies a lot more
x y y divided by previous y (3 d.p.)
10 700 N/A
15 1575 2.250
20 2800 1.778
25 4375 1.563
30 6300 1.440

Data, Formulae and Relationships Booklet

  • There aren’t actually any equations to learn in this post
Posted in A2 Physics Revision, Revision | Tagged , , , | Leave a comment

Automatic Year Review Post 2013


The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 17,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 6 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in No Category | Tagged , | Leave a comment

File Types / Handling – AS Computing Revision (F452)


Serial Files

Files

Files (Photo credit: Velo Steve)

 

  • Files are useful not just for the information they hold, but the way they hold that information
  • There are a few different structures files use to make their data accessible
  • Serial files don’t make any effort to make searching easier – they just store records in the order the records are added
  • New records are always just added on to the end (this is called appending)
  • This type of storage is usually used for small files where the order the records are in doesn’t matter (or the only order they’re needed in is order they’re entered in)
  • Finding records again can be difficult if there are a lot
  • The computer has to search through every single record until it finds the one it’s looking for
  • Sometimes you don’t need to find single records individually – you either need all of them or none of them – in this case, serial files are completely fine

Sequential Files

  • In this type of structure, the records are stored in order
  • Each record has several fields, but one of them will be key field, which is what they’re stored in order of
  • This type of storage is great for data that needs to be processed in a specific order
  • Searching through sequential files is a bit faster than searching serial files, because the computer knows when to give up
  • If you’re searching for a number beginning 345 in a file organised in numerical order, you check each number from the beginning until you reach 345. If you don’t find it, and you reach 346, at least you know 345 isn’t there. In a serial file, you’d have to search right up to the end

Indexed Sequential Files

  • (At risk of sounding dramatic), this is the next step in the evolution of sequential files
  • Records are stored in order of a key field, just like in regular sequential files, but this time there’s an index, too
  • This makes it much faster for computers to search through (if there are a lot of records)
  • The index holds the physical disk locations of notable points
  • Continuing the example above, the index might tell you that numbers starting with 34_  begin at a certain memory location – you’d skip to that memory location, and start looking through the records from that point, until you eventually realised that there was no 345
  • If there are loads of records before the one you want, the index stops you having to look through most of them
  • (For instance, you don’t flick through every single page of the dictionary – you head straight to the section for words beginning with a certain letter, and flick through pages carefully from there)
  • The index has to be updated when a record is inserted or deleted

Random Files

  • This is a really weird way of storing files, but there is actually a reason for it
  • Most file types have their records all stored next to each other in memory (contiguously)
  • Random files spread their data all over the disk
  • This is done ‘randomly’ using a hashing algorithm, which takes the key field and distorts it in strange ways to produce a result that’s an address in memory
  • The record with that key field is then stored at that address
  • To find records again, put the key field into the hashing algorithm and you’ll get the address
  • (So it’s not random in the sense that he hashing algorithm produces a different output each time – it actually produces the same output every time for the same input)
  • Hashing algorithms are complicated because they have to avoid ‘collisions’ – where multiple records are told to live in the same memory location, which just can’t happen
  • However complicated the hashing algorithms are, collisions can still happen, and dealing with them takes a lot of memory (this is called redundancy)
  • The good thing about random files is that all you need to find a record is its key field – you don’t have to go searching through loads of them
  • This means random files are better than indexed sequential files, when you have massive databases

Opening and Closing

  • Before you can access a file, you have to open it
  • You can’t read and write to a file at the same time, so you can only open it for reading or for writing – not both
  • When you’ve finished with a file, you have to close it (which is very easy to forget)
  • If you don’t close it, your changes might not be saved
  • Each record tends to be a separate line in the file (or they’re separated by dilemeters characters, such as semi colons or commas) to make them easier to retrieve

Inserting, Updating and Deleting

  • To add something to a serial file, you just append it to the end – easy
  • Adding something to a sequential file is trickier, though, because it has to go in a certain place…
  • (Adding things to indexed sequential files or random files won’t be tested on, apparently)
  • Inserting something is done by:
  1. Open the file for reading
  2. Create a new file
  3. Open the new file for writing
  4. Copy all the records from the original file, before the point the new record needs to go, to the new file
  5. Copy the new record to the new file
  6. Copy everything else from the original file to the new file
  7. Close both files
  8. Delete the old file
  9. Rename the new file to what the old file used to be called
  • The same technique is used to update existing records
  • Similarly, this is how to remove a record from a sequential file:
  1. Open the file for reading
  2. Create a new file
  3. Open the new file for writing
  4. Copy all the records from the original file, up to and including the one before the one you want to get rid of, to the new file
  5. Don’t copy the one you want to get rid of – just skip it
  6. Copy the rest of the records to the new file
  7. Close both files
  8. Delete the original file
  9. Rename the new file to what the old file was called
Posted in AS Computing Revision, Revision | Tagged , , , , , , , , , , , , , | Leave a comment

Estimating File Sizes – AS Computing Revision (F452)


Record Format

  • One way of storing information is to use an ordered text file, with a record format
  • Multiple records are stored, and each is made up of multiple fields
  • In the text file, records could be on separate lines and fields could be separated by control characters the computer can understand, for example
  • Records and fields work a bit like they do in a database – one record per person, for example, made up of fields for name, address, age, whatever

Estimating File Sizes

  • To estimate how much space a file will take up, work out how much space each record will take up, multiply it by the number of records, and add 10%
  • The ten percent is for the file overhead / metadata, etc.
  • You’ll probably be asked to give the answer in kilobytes, so divide your answer by 1000
  • (Yes, there are actually 1024 bytes in a kilobyte, but since you’re not allowed a calculator in the exam, the mark scheme apparently lets you use 1000 instead)
  • To work out the size of a single record, you need to work out the size of each field in the record, and add them together
  • Here is a table of data types and sizes:
Data Type Bytes Notes
Character 1 A single ASCII character is seven bits plus a parity bit, so one byte
String 1 per character A string is just several characters – you need to choose the maximum string length carefully, though
Boolean 1 Yes, a true or false value could be stored as a single bit, but since this is a text file using ASCII, it’s represented as a character, so it’ll take a whole byte
Integer 1, 2, 4 or 8 (There are several types of integer in Java – byte, short, int and long – but they’re all the same in pseudocode)
Real 4 or 8 (There are two types of real number in Java – float and double)
Date 4  
Time 4  
Date and Time 8  
Currency 8 You may be able to get away with using Real instead
  • Strings give you flexibility to choose the maximum length
  • You should make the string lengths sensible, but also use this leeway to make sure the fields add up to a total record size that’s easy to do calculations on later
  • There’s a large “BS” written next to “Date”, “Time”, “Date and Time” and “Currency” in my notes, because those aren’t data types! Not primitive data types in any language I know, anyway. They’re probably included here because computers have some way of storing date / time / currency information that’s better than using a string or a number or both
Posted in AS Computing Revision, Revision | Tagged , , , , , , , , , , , , | Leave a comment