TABULA/ChurchClock-NEW

From J Wiki
Jump to navigation Jump to search

The Energy Stored in a Church Clock

Hauling on the rope to lift the heavy weight in the local church tower, my friend Adrian Smith had a thought. His laptop computer kept time just by running idle, which kinda made it a clock too.

How much energy was stored in its battery, and how did this compare with the energy stored in the hanging weight of this ancient clock mechanism?

Mental arithmetic told him an amazing fact: the two were roughly the same.

The weight in the church tower was 800 kg. Its drop was 75 ft.

  • How far should the weight be lifted to exactly equal the energy stored in his laptop battery?
  • If this was more than the 75 ft available, then how much heavier should the weight be made?

Here's how he can solve the problem using TABULA.

Read TABULA/TabulaGettingStarted if you need help following these instructions.

Important.png This is a draft version of TABULA/ChurchClock to go with a new Qt version of TABULA that's currently in beta. It will not exactly match the behavior of the old TABULA. --Ian Clark (talk) 09:41, 21 September 2015 (UTC)

Give your t-table a title

Using TABULA you work with "TABULA-Tables" – or t-tables for short. When TABULA is launched, it always shows a (sample) t-table, never a blank panel.

(You can easily set this sample t-table to be the one you're currently working with.)

To start a fresh t-table, click Tool00.jpg

You see

untitled

Give your new t-table a title.

Enter: Church Clock

You now see

Church Clock

Calculating potential energy: the fast way

The energy which drives a laptop is called "electrical energy". But the energy which drives a church clock is called "potential energy".

A weight hangs by a rope at the top of a tower. It looks no different up there than it does on the ground. And it moves so slowly it looks as if it's standing still. But as it descends, it has the "potential" to drive a clock mechanism, overcoming the friction of the spindles, plus the gears rubbing together. That's why it's called "potential energy".

TABULA has a lot of built-in scientific formulas. There's one for electrical energy. And another for potential energy at the earth's surface.

By-the-way, it's important to say "at the earth's surface". If we rebuilt the church tower on the moon, the weight at the top of the tower would store far less potential energy.

(About one-sixth as much, in fact.)

We'd need a weight with six times as much iron in it before the clockwork worked as well as it does on the earth's surface.

But that's another project.


Click the tab: Functions

Enter: energy

the list collapses to just those lines containing the word "energy"

You can see this line (among others there)

9.812865328*m*h : m(kg),h(m)   [J]  potential energy; earth surface

Click on it to select it, then press the button Append.

Or just double-click it.

You now see

Church Clock
┌  {1}            1 kg  m:feeder
├  {2}            1 m   h:feeder
└> {3} @      9.813 J   potential energy; earth surface


The formula has brought in with it two extra lines called feeders.

Click line {1} and enter: 800

…This is the mass of the weight.

Click line {2} and enter: 75 ft

…This is the height of the tower.

That action not only sets the value to 75, it also specifies the units as "feet" ([ft]).

You now see

Church Clock
┌  {1}          800 kg  m:feeder
├  {2} @         75 ft  h:feeder
└> {3} @    1.795E5 J   potential energy; earth surface

This shows us the potential energy stored in the weight: 179500 Joules [J].

Note that TABULA shows numbers bigger than 99999 in scientific notation. So the result (in strict SI-units format) is: 1.795E5 J


Want to see it in Calories, the familiar food energy units? Then click line {3} and pick Cal from the units dropdown on the right.

You now see

Church Clock
┌  {1}          800 kg   m:feeder
├  {2} @         75 ft   h:feeder
└> {3} @     42.891 Cal  potential energy; earth surface

So after Adrian has wound the weight back up to the top of the tower, he needs to eat 42.891 Cal of his favorite food to replenish the energy he has given to the weight.

That's less than half a 2-finger KitKat bar (106 Cal, in the UK).

Oh, wait…!

There's friction in the clockwork to consider. And bodies aren't 100%-efficient converters of food to energy, either. You'll need to modify your t-table to allow for these energy losses.

(Let's do that another day.)


Why pick Cal and not cal? That's in the units dropdown too.

The units: [cal] are what physicists call "calories".

The TABULA convention is to show units in brackets, like so: [cal] when not used after a number to make a quantity.

The units [Cal], on the other hand, are called kilocalories [kcal] by physicists, and Calories only by nutritionists and diet-books (…plus ordinary people like you and me).

That capitalized letter C is important!

Don't mix up [Cal] and [cal], like a girl I knew. She reckoned she could lose weight by sucking ice-cubes, which is kinda like eating negative Calories. She gave it up when someone told her she'd need a thousand times more ice-cubes than she'd first supposed.

Calculating potential energy: the slow way

What if there is no stored formula for what you want to calculate? Then you can either

-- Hold down Shift and click Tool28.jpg

  • or build the formula from memory, line-by-line.

Let's do it again the slow way, line-by-line. But first, let's save our work so far, to bring it back later.

Hold down Shift and click Tool02.jpg

Now, when TABULA is relaunched, you'll see the t-table in the state it is now.

In what comes next, there's no need to clear down your t-table. Then you can see both methods, one above the other, and compare them. But for the sake of a simple display to show, let's go back to where the t-table had no lines.

Click Tool04.jpg repeatedly until you see this once more:

Church Clock

Make line {1} the height of the tower

To add the first working line, line {1}, to the empty t-table, click Tool11.jpg

You now see

Church Clock
{1}            1 /   unit

The line you've just created is dimensionless, i.e. it has no units. TABULA shows this with a slash [/] where the units ought to be. According to strict SI standards, it should show nothing at all. But in practice it's helpful to have a placeholder.-~

Notice we've bracketed the slash in the text above. That's because, so far as TABULA is concerned, "no-units" are actual units in their own right.


The line just created (line {1}) should be already selected for you. If not, click line {1} to select it.

Enter:  75 ft

This not only changes the value to 75, but changes the units to: [ft].

You can change a line's units at any time.

You can even change them to incompatible units unless the line is calculated, or it feeds into a calculated line.

Next enter:  'height of tower

The leading apostrophe (') is an Excel convention:

it tells TABULA that everything that follows is the caption.

You now see

Church Clock
{1} @         75 ft  height of tower

Make line {2} the mass of the hanging weight

Do the same again to define line {2}, viz.

Click Tool11.jpg

But this time try entering it all at once:  800 kg 'mass of hanging weight

You now see

Church Clock
{1}           75 ft  height of tower
{2} @        800 kg  mass of hanging weight

Use a built-in physical constant: earth gravity

At this stage let's recall some of the science we've learned at school.

There's a physical constant called the acceleration due to gravity (which physicists call g for short). When you multiply it by the mass and then the height, you get the value of potential energy stored in the weight when it gets hauled up to a height of 75 ft.

TABULA has a library of constants: UUC.ijs, plus a library of formulas: UUF.ijs. These both happen to be J scripts. Since these libraries are "built-in", you can't alter them. But you can add to them.

Click tab: "consts" to show the library of constants. It is fairly long and you can add to it to make it even longer.

You needn't read it right through just now: you can thin-out the display by entering a search-string in the input field.

The word gravity" is a good one to try. But a better one is gravit -- this will also match the word gravitational in case it's there.

Type: gravit and press Enter.

A list of lines containing the word "gravity" appears.

Among the lines in the list you should see the one you want. It's the top line, as shown below:

9.812865328 m/s^2	[grav]	acceleration; gravity
6.67428e_11 N m^2/kg^2	[G]	gravitational constant
1.622 m/s^2 [moon.g]	moon gravity unit
3.711 m/s^2 [mars.g]	mars gravity unit

Select the first line, having units [grav], and click "Append".

A new line appears in the t-table (line {3})

Church Clock
{1}       75 ft          height of tower
{2}      800 kg          mass of hanging weight
{3}        1 grav        acceleration; gravity=

As you can see, this line has its own special "earth-gravity" units: [grav]. In [grav] units, the force of gravity at the earth's surface is precisely 1.

OBSERVATION: g might seem a better choice of name for the units TABULA chooses to call [grav]. But [g] is already in use (by SI) to mean "grams".

Now multiply together the three lines {1} {2} {3} to get the potential energy.

Select all three lines and click Tool07.jpg

To select more than one line on the Mac, you need to hold down the "Command" key: ().

On MS Windows, you need to hold down the "Control" key: (Ctrl).

Now you see

Church Clock
┌  {1}           75 ft          height of tower
├  {2}          800 kg          mass of hanging weight
├  {3}            1 grav        acceleration; gravity=
└> {4} @      60000 ft grav kg  {1}*{2}*{3}

Notice how an arrow appears to the left of the line numbers, showing the first three lines feeding their values into the new line {4}.

Notice too that there's an equals sign (=) on the end of the caption of line {3}. It shows the line is protected from changes whenever backfitting takes place.

A third thing to notice is the At-sign (@) just to the right of {4}. This means the line has taken a new value.

I.e. a changed value. Or, in this case, it's a new line.


Have you ever heard of these energy units: [ft grav kg]?

Be honest: no, you haven't. But TABULA isn't fazed by crazy units.

(Provided they're valid units.)

Click the units dropdown to see other compatible units you can convert them to.

There are some more reasonable-looking ones. Near the top, you can see J for Joules. Select it.

And while we're about it, let's show acceleration; gravity in more expressive units than [grav].

Select line {3} and click Tool27.jpg

It has a menu item: Edit > Convert to SI Units plus a hotkey:

(Windows:) Ctrl+Shift+S

(Mac:) ⇧⌘S

Now at last we see the t-table:

Church Clock
┌  {1}           75 ft    height of tower
├  {2}          800 kg    mass of hanging weight
├  {3}        9.813 m/s²  acceleration; gravity=
└> {4} @    1.795E5 J     {1}*{2}*{3}

Well whaddya know. It computes the same value as before: 1.795E5 J .

The energy in a laptop battery

We turn now to the electrical energy stored in Adrian's laptop battery.

The battery is rechargeable. It is rated at 17 Volts, 3.1 Amp-hours. This is how to write it in SI-units:

17 V, 3.1 A h

If we multiply Volts by Amp-hours we get the stored electrical energy.

At least, we would if the battery gave 17 V until it was fully discharged. Alas, that's too much to hope. As a rule, the voltage drops as the battery runs out of electricity.

But batteries are getting better and better. And one of the ways they're better is that they keep their Volts up to their rated level until just before they run out.

So if you multiply the (rated) Volts by the (rated) Amp-hours, that's a fair estimate to start with.

When doing Physics, you start simple – and make adjustments as you get to know more about the topic.


To calculate the stored electrical energy, first make a new line. Click Tool11.jpg

Enter:  3.1 A h 'battery charge=

Notice the equals sign (=) at the end of the line. This tells TABULA not to go changing it during backfitting. (But you can still change it yourself, by typing a new value.)

Make another new line. Do this as you did before: by clicking Tool11.jpg

Enter:  17 V 'battery potential=

"Potential" is the electrical engineer's word for "voltage".

As you've done already, multiply the two new lines together. Select them both, then click Tool07.jpg

Now convert to J (Joules) by selecting it from the units dropdown.

You can instead enter [J] in the input box. But the units dropdown is better because it shows you only the valid alternatives.

To rename this new line, enter: 'energy stored in battery

In the same way, relabel line {4}  'energy stored in hanging weight

You now see

Church Clock
┌  {1}           75 ft    height of tower
├  {2}          800 kg    mass of hanging weight
├  {3}        9.813 m/s²  acceleration; gravity=
└> {4}      1.795E5 J     energy stored in hanging weight
┌  {5}        3.100 A h   battery charge=
├  {6}           17 V     battery potential=
└> {7} @    1.897E5 J     energy stored in battery

Comparing the two energy values

These are two quite separate calculations, with figures from different sources. But notice that lines {4} and {7} are not very different in value!

(This is a pure coincidence: there's no known reason for it.)

Now, how can you force line {4} to take exactly the same value as line {7}?

You can do this by dividing line {4} by line {7} and then forcing the result to take the value 1.

Another way is by subtracting line {4} from line {7} and then forcing the result to take the value 0.

Let's do it the "dividing" way.

(You can try the other way yourself later.)

Select both lines {4} and {7} by holding down ⌘ on the Mac (or Cmnd in Windows) as you click them. Just as you did before.

Now divide one line by the other, using Tool08.jpg

You now see a new line {8} linking the two energy calculations:

Church Clock
  ┌  {1}           75 ft    height of tower
  ├  {2}          800 kg    mass of hanging weight
  ├  {3}        9.813 m/s²  acceleration; gravity=
┌ └> {4}      1.795E5 J     energy stored in hanging weight
│ ┌  {5}        3.100 A h   battery charge=
│ ├  {6}           17 V     battery potential=
├ └> {7}      1.897E5 J     energy stored in battery
└>   {8} @      0.946 /     {4}/{7}


Now, if only you could persuade line {8} to accept the value 1, then lines {4} and {7} would be forced to become equal.

Well – you can. And it's easy.

Select line {8}, hold down Shift and click Tool21.jpg

Notice that some icons are part-black and part-red. The red part tries to show what's different if you hold down Shift.

There's also a hint which appears in the statusbar (which is at the bottom of the window).

You now see

Church Clock
  ┌  {1} @     79.289 ft    height of tower
  ├  {2}          800 kg    mass of hanging weight
  ├  {3}        9.813 m/s²  acceleration; gravity=
┌ └> {4} @    1.897E5 J     energy stored in hanging weight
│ ┌  {5}        3.100 A h   battery charge=
│ ├  {6}           17 V     battery potential=
├ └> {7}      1.897E5 J     energy stored in battery
└>   {8} @          1 /     {4}/{7}

If you did that in Excel, you'd lose the formula. But TABULA lets you change a calculated result, and then tries to figure out how to change the numbers feeding into it to get the result you've asked for.

This is called backfitting.

Sometimes TABULA can't do it. Sometimes it's mathematically impossible to do. Sometimes that's because too many feeder lines have holds (shown by equals signs on those lines =), giving TABULA no option to change any feeder line at all when trying to backfit.

If so, the number goes back to what it was, and TABULA says something like this in the statusbar

   line {8} resists value: 1

But in this case you're lucky. The two energies, line {4} and line {7} have become equal.

Uh-oh! It's changed the wrong value!

It needed to increase the potential energy stored in the hanging weight, and it's done so by making the tower higher.

We don't want to go re-building the tower. It's far easier to make the weight heavier. How can you ask TABULA to do that?

The answer is, do it again, but first hold line {1}.

Click Tool04.jpg to take the t-table back to how it was.

Now select line {1} and click Tool18.jpg

Notice a (=) appears after the line number, so it now reads {1}=

If you click Tool18.jpg repeatedly, the (=) appears and disappears. (This is called "toggling" the Hold.) Leave it as {1}=

Now, once again, select line {8}, hold down Shift and click Tool21.jpg

You now see

Church Clock
  ┌  {1}=          75 ft    height of tower
  ├  {2} @    845.748 kg    mass of hanging weight
  ├  {3}        9.813 m/s²  acceleration; gravity=
┌ └> {4} @    1.897E5 J     energy stored in hanging weight
│ ┌  {5}        3.100 A h   battery charge=
│ ├  {6}           17 V     battery potential=
├ └> {7}      1.897E5 J     energy stored in battery
└>   {8} @          1 /     {4}/{7}

TABULA has left line {1} alone and altered line {2} instead, as you want. It's gone from 800 kg to 845.748 kg.

It kinda squeezes its values around like toothpaste in a tube.

Making the weight just 45.748 kg heavier equalizes the energies in the laptop and the church clock.

Which answers the question we started out by asking.

Saving your work

Click Tool02.jpg to save the t-table as a file with a name derived from the title, viz. Church_Clock.

TABULA makes up the filename by replacing all spaces and other forbidden characters in the title by Underscore (_).

This gets a well-behaved filename for most computer platforms.

If you look for it in your computer's folders, the file name will have the extension: .ijs

Alternatively choose menu: File > Save As Title to give your t-table the name of your choice.