  Lorenzian Water Wheel - HELP

General:

What is a Lorenzian Water Wheel?

What Does This Program Do?

System Requirements

File Operations:

Creating a New File

Opening an Existing File

Saving a File

Saving a File As...

Wheel Operations:

Starting the Wheel

Stopping the Wheel

Phase-Space Diagram

Changing the Configuration

Changing Control Ranges

Resetting the Wheel

Quitting the Lorenzian Water Wheel Program

Reference:

Tips

Design Assumptions

The .lww File Format

About:

About Lorenzian Water Wheel...

About Shareware...


General


What is a Lorenzian Water Wheel?

A Lorenzian Water Wheel consists of:

•	a wheel that rotates on an axle.

•	several buckets with holes in them spaced equally around the wheel.

•	a water faucet at the top of the wheel that delivers water at a steady rate [image].

The wheel is initially at rest and all the buckets are empty.  When the faucet is turned on, the top bucket begins to fill with water and the wheel begins to rotate.  As buckets pass under the faucet they fill with water.  How much they fill depends upon the speed of the wheel and the flow rate of the faucet.  Under some configurations the wheel can settle into a steady rotation.

If the speed of the wheel is fast enough and the buckets drain slowly enough, the buckets start up the other side of the wheel before they have time to empty, causing the wheel to slow down and possibly even reverse.  Under some combinations of faucet rate, bucket drain rate, wheel radius, etc., the direction of rotation can reverse itself many times, never settling down to a steady rate, and never repeating itself in any predictable manner.


What Does This Program Do?

This program is a real-time interactive chaos demonstrator that models a Lorenzian Water Wheel.  It allows the user to configure a Lorenzian Water Wheel, use scroll bars to adjust some of its characteristics in real time, and observe the effects of the adjustments.

Main parts of the program include:

•	Scroll Bars to control the faucet rate, friction half-life, and bucket drain time.

•	Dynamics Gauges to display the wheel's angle, velocity, and acceleration.

•	Bucket Water Level Gauges to display the level in each bucket.

•	Phase-Space Diagram to graphically display the wheel's angular position vs. its angular velocity.

The program also includes a complete file system that allows you to save wheel configurations for later use.

New in Lorenzian Water Wheel version 1.1:

•	On-line, context-sensitive HELP system.  Press the Help buttons in the dialog boxes or press F1 at any time to start Windows Help with a topic applicable to what you are doing.

•	Animated application icon.


Animated Icon
If this application is minimized while the Lorenzian Water Wheel is in motion, its animated icon indicates that the program is still active in the background.


System Requirements

•	IBM-compatible PC with a 386 or higher processor.

•	Microsoft Windows 3.1 or higher.

•	Math-coprocessor required for real-time demonstration.  The program will run at a slower pace without one.

•	VGA or higher graphics.

•	A mouse is recommended, but not required.  All program functions can be carried out using a keyboard.


Operations


  Creating a New Wheel  (Ctrl+N)

After starting the program, you must open an existing file or create a new configuration before you can start the wheel.

Press the New File button on the program's toolbar, select File | New, or press Ctrl+N and the following dialog box will appear, prompting you to enter various characteristics for your wheel:

Click on items in the dialog box above for an explanation of each one.

This model of a Lorenzian Water Wheel uses the cgs system of units.

If you enter a value that is out of the predetermined range for each piece of data you will be required to change it or cancel.  No checks are made other than is on your data.  It is possible to enter configurations that make no physical sense, such as having a wheel or radius 900 cm and a mass of 1 gram.


Config Buckets
Buckets are assumed to be right cylinders (like coffee cans) and all buckets are the same.  Enter the Number of Buckets to use (3-24), and the buckets' Height, Mass, Volume, and Drain Time.

The buckets' width is calculated based on the volume and height you enter.  This is important since it determines the angle from the top of the wheel that each bucket begins to fill with water.  This has a significant impact on the wheel's behavior.

See also:

Metric System

Tips


Config Faucet Rate
Enter the Faucet Rate to establish when the wheel is started.  This can be changed later by changing the configuration (this dialog box) or with the faucet rate scroll bar.

See also:

Metric System

Tips


Config Wheel
Enter the Radius, Mass, and Friction Half-Life of the wheel.  The wheel is assumed to be a uniformly distributed mass and its moment of inertia is calculated accordingly.

See also:

Design Assumptions

Metric System

Tips


Config OK
Select OK to accept values you have entered.


Config Cancel
Select Cancel to cancel this dialog box and return you to whatever state the application was in before.


Help
Select Help to start the Lorenzian Water Wheel HELP program.


  Opening a File  (Ctrl+O)

Press the Open File button on the program's toolbar, select File | Open, or press Ctrl+O.  The following dialog box will appear:

This is a standard Windows open file dialog box.  Click on items in the dialog box above for an explanation of each one.

You will receive an error message if your file could not be read due to it being an invalid file type, if an unexpected EOF (end of file) was encountered, or if data in your file was out of range.  If your file specifies that no colors are to be used for the Phase-Space Diagram, a default set of colors will be chosen for you which you can change later.

These problems can be corrected by editing your Wheel File (.lww) with any text editor such as Windows Notepad.


Directories
Displays the current directory.  Double-click the directory you want to open or double-click to return to a parent directory.


Drives
Displays the current Drive.  To change the drive, click the down arrow and choose from the list.


Open Cancel
Select Cancel to cancel the file opening operation.


Open File List
A list of files in the current directory.  Displays files of the type specified below in List Files of Type drop down box or of the type you specify in the File Name edit box.


Open File Name
Names the file to open.  Select from the list below or type in the path and name of the file to open.


Open List Files of Type
Determines what types of files will be displayed in the File List above.  The default is .lww (Lorenzian Water Wheel) format.  You can also choose *.* to list all files.


Open OK
Select OK to open the file you have specified in the File Name edit box.


Network
Select Network to connect to a network drive.  This button will only appear in your dialog box if network operations are supported by your operating system.


  Saving a File  (Ctrl+S)

Once you have created a new wheel configuration or opened an existing file and changed it you can save your new configuration to disk by pressing the Save File button on the program's toolbar, selecting File | Save, or by pressing Ctrl + S.

If you have created a new file, you will automatically be taken to Saving a File As...

You will be notified if there are any errors while saving your file.


  Saving a File As...  (Ctrl+A)

To save a file under a different name press the Save File As button on the program's toolbar, select File | Save As, or press Ctrl+A.  If you request to save a new file you will automatically be taken to Save File As.  The following dialog box will appear:

This is a standard Windows save file dialog box.  Click on items in the dialog box above for an explanation of each one.

You will be notified if there are any errors saving your file.


Save As Cancel
Select Cancel to cancel the file saving operation.


Save As File List
Lists files in the current directory of the type specified in the File Name edit box or the Save File As Type drop down box.


Save As File Name
The name of the file you are going to save.  Specify the name by typing up to eight characters followed by the filename extension.  If you do not type an extension, .lww (Lorenzian Water Wheel) will be added as the default file extension.


Save As OK
Select OK to save the file listed in the File Name edit box.


Save File As Type
Lists the file type that will be assumed if you do not type a file extension in the File Name edit box.  Defaults to .lww (Lorenzian Water Wheel) format.


  Starting the Wheel  (Ctrl+G)

Once you have successfully created a new file or opened an existing file, you can start the wheel by pressing the GO button on the toolbar, selecting Wheel | Go, or by pressing Ctrl+G.

The wheel will start rotating and its angle, velocity, and acceleration will be displayed in the Dynamics Gauges.  The water levels in the wheel's buckets will be displayed in the Bucket Water Level Gauges.  The Phase-Space Diagram will begin to draw the wheel's angle vs. its velocity.

You may start, stop, and reset the wheel, as well as control the faucet, friction, and bucket drain time with the scroll bars.  An elapsed time clock in the status bar displays how long the wheel has been in motion.  If your system is reasonably fast, the clock should display in real time.  If your system is slower, or especially if it doesn't have a math coprocessor, the clock will run slower than real time.

If you minimize the program while the wheel is running, it will continue to run in the background as indicated by its animated icon.


  Stopping the Wheel  (Ctrl+P)

Stop the wheel by pressing the STOP toolbar button, selecting Wheel | Stop, or by pressing Ctrl+P.  Stopping the wheel simply freezes the wheel in whatever condition the wheel is in when you press stop.

You may Start the Wheel again by pressing GO on the toolbar.  The wheel will pick up where it left off when you stopped it.


  Phase-Space Diagram  (Ctrl+D)

You can control the colors that the Phase-Space Diagram uses and the frequencies at which it changes color and erases itself and starts over.  Press the PS Diagram Colors button on the toolbar, choose PS Diagram | Diagram Colors, or press Ctrl+D and the following dialog box appears:

Click on items in the above dialog box for an explanation of each one.

You can control whether or not the diagram periodically changes its drawing color or periodically erases itself, as well as the frequency at which these two operations occur.  The colors that the diagram uses to draw can also be specified.

Whether periodic color changes or erasures are turned on or off, both of these operations can still be accomplished manually.  Moving the cursor over the phase-space diagram causes the cursor to change to a mouse with a "C" on the left and a "W" on the right.

This incidates that the color can be changed by pressing the left mouse button and that the diagram can be wiped clean by pressing the right mouse button.

You can also change the color by pressing F2 or wipe the diagram clean by pressing F3.

See phase-space diagram for an explanation of what a phase-space diagram is.


Change Colors
Check here to have the Phase-Space Diagram automatically change the color it uses to draw on the screen.


Change Colors Period
Enter the period here that the Phase-Space Diagram uses each color to draw on the screen.


Wipe Clean
Check here to have the Phase-Space Diagram automatically wipe itself clean and start over periodically.


Wipe Clean Period
Enter the period here at which the Phase-Space Diagram erases itself and starts over.


Use Color
Check here to use the color associated with this check box.


PSD OK
Select OK to use the Phase-Space Diagram options you have selected.


PSD Cancel
Select Cancel to cancel the Phase-Space Diagram options you have selected.


  Changing the Configuration (Ctrl+H)

Press the Change Configuration button on the toolbar, select Wheel | Change, or press Ctrl+H and the following dialog box appears:

Click on items in the above dialog box for an explanation of each one.

This is the same dialog box as is displayed when creating a new configuration. However, it is now filled in with the wheel's present configuration instead of blanks.  If you enter values that are out of range, you must correct them or choose cancel.

If you enter a faucet rate, friction 1/2-life, or drain time that is outside of any of the scrollbars' previous control ranges, the control ranges for the affected scrollbars are adjusted to accomodate your entry.


  Changing Control Ranges (Ctrl+L)

Press the Control Ranges button on the toolbar, select Wheel | Controls, or press Ctrl+L and the following dialog box appears:

This dialog box allows you to control the ranges over which the scrollbars operate.  Click on items in the above dialog box for an explanation of each one.

If you enter a value that is out of range you will be required to change it or cancel.  If you specify a control that does not include the current value for that scrollbar you will be given a range that does include the current value on the scroll bar.  For example, if your current configuration has a faucet rate of 5000 cc/sec and you request a range of 100 to 4000 cc/sec, you will be given a range of 100 to 5000 cc/sec.


Low Faucet
Enter the Low end of the faucet scrollbar range here.


High Faucet
Enter the High end of the faucet scrollbar range here.


Low Friction
Enter the Low end of the Friction 1/2-Life scrollbar range here.


High Friction
Enter the High end of the Friction 1/2-Life scrollbar range here.


Drain Time Low
Enter the Low end of the Bucket Drain Time scrollbar range here.


Drain Time High
Enter the High end of the Bucket Drain Time scrollbar range here.


Control OK
Select OK to accept the new values for the control ranges.


Control Cancel
Select Cancel to cancel changing values for the control ranges.


  Resetting the Wheel  (Ctrl+R)

Press the Reset toolbar button, select Wheel | Reset, or press Ctrl+R and all the wheel's buckets are emptied, the wheel's angle, velocity, and acceleration are reset to zero.  If the wheel was running when you reset it, it will restart automatically.  Otherwise, press the GO toolbar button to get the wheel running again.


  Quitting the Lorenzian Water Wheel Program

Press the EXIT toolbar button or select File | Exit to quit the Lorenzian Water Wheel program program.

If you are working with a new file or have modified an existing file since saving it last you will be asked if you want to save the file or not before exiting.


Glossary


Bucket Drain Time
Bucket Drain Time is the time, in seconds, that would be required for a full bucket to drain completely when no forces other than gravity are operating on it.

See also:

Design Assumptions

Tips


Bucket Water Level Gauges
Bucket Water Level Gauges display how relatively full the buckets are.  No units are specified.  If the gauge is at the top this simply means that the bucket is full.  If the gauge is at the bottom the bucket is empty.  The left-most gauge displays the water level in the first bucket.  The second bucket is located immediately clockwise from the first bucket, and so on.


Dynamics Gauges
Dynamics Gauges display the wheel's angle in degrees, the wheel's velocity in degrees per second, and the wheel's acceleration in degrees per second per second.

The wheel's angle is the angular location of the bucket that is at the top of the wheel (the first bucket) before the faucet is turned on.  It is measured clockwise from vertical.

The wheel's velocity is the number of degrees that the wheel rotates in one second.

The angular acceleration of the wheel is the rate of change of the wheel's velocity.  For example, if the wheel is travelling at a rate of 50 degrees per second and its acceleration is 20 degrees per second, in one second its velocity will be 70 degrees per second.


Friction Half-Life
Friction Half-Life is the amount of time, in seconds, that would be required for the wheel to slow to half its speed if no forces other than friction were operating on it.  Increasing the Friction Half-Life decreases the amount of friction on the wheel.

For example, if the wheel is travelling at 100 degrees per second and its friction half-life is 30 seconds, in 30 seconds it will be travelling at 50 degrees per second.  In another 30 seconds it will be travelling at 25 degrees per second, and so on.

See also:

Design Assumptions

Tips


Metric System

This application uses the "cgs" system of units, a Metric System of units which uses units of centimeters for length, grams for mass, and seconds for time.

For those that are used to the "English" system of measurement:

•	There are 2.54 centimeters (cm) in an inch.  100 cm is a meter (m), which is 39.37 inches.

•	There are 1000 grams (g) in a kilogram (kg), which weighs about 2.2 pounds.  There are about 454 grams in a pound.

•	There are 1000 cubic centimeters (cc) in a liter (l), which is slightly more than a quart.

"mks" is another metric system of units based on meters for length, kilograms for mass, and seconds for time.


Scroll Bars
Scroll Bars are used to control the faucet rate, friction half-life, and bucket drain time.

The Faucet Rate scroll bar allows you to adjust the rate that the faucet delivers water to the buckets.

The Friction 1/2-LIfe scroll bar allows you to control the amount of friction on the wheel's axle.

The Bucket Drain Time scroll bar allows you to control the rate at which water drains from the buckets.


Phase-Space Diagram
The Phase-Space Diagram plots the position of the first bucket vs. the wheel's angular velocity.  This is done by plotting the first bucket's horizontal (x) and vertical (y) coordinates in the diagram, with the x coordinate being offset from the center of the diagram in proportion to the wheel's velocity.

Thus, is the wheel is rotating clockwise, clockwise circles are drawn on the right side of the diagram.  Similarly, if the wheel is rotating counter-clockwise (its velocity is negative), counter-clockwise circles are drawn on the left side of the diagram.

The plot of position vs. velocity passes through the center of the diagram as the wheel reverses its direction of rotation.


Reference


Tips

Most wheel configurations will not achieve chaotic wheel behavior.  In order to achieve good chaotic behavior you might want to try the following:

•	Use a reasonable number of buckets.  3-18 usually works well.  Although the program will support up to 24 buckets, an increased number of buckets seems to smooth out the wheel's behavior so that it settles down into a nearly steady state condition and never reverses direction.  Also, more buckets means that your computer will be tied up longer calculating what is happening to each bucket during every wheel update cycle.

•	Use a fairly high faucet rate.  Try 5,000-8,000 cc/sec or so.

•	Use a fairly low friction half-life.  Try 5-10 seconds.  Remember that a low friction half-life really means increased friction on the wheel.

•	Use a reasonable bucket drain time.  Try 30-60 seconds.

•	Use a reasonable value for the mass of the wheel.  Try 20,000-50,000 grams or so.

•	Use a reasonable value for the wheel's radius.  Try 75-125 cm.  A small wheel radius generally gets the wheel going too fast in one direction for it to ever reverse.

•	Don't use a bucket height that is too high.  This will result in a narrow bucket for a given bucket volume, and the bucket won't have much of a chance to fill up when passing under the faucet.

•	Once you have established chaotic behavior, try lowering the faucet rate or increasing the friction half-life to achieve predictable behavior.  Then return the faucet rate and friction half-life to their previous values.  Sometimes this will reestablish chaotic behavior, sometimes it won't!


Design Assumptions

The following assumptions were made when developing a computer model for the Lorenzian Water Wheel:

1.	The wheel's mass is distributed uniformly, such that its moment of inertia can be calculated by the formula:

I  =  mR^2 / 2

where I is the moment of inertia, m is the mass of the wheel, and R is the wheel's radius.

2.	The wheel accelerates due to moments applied to the wheel by the buckets and friction according to:

α  =  ω[ (½)^(Δt / Thalf)  -  1 ] / Δt  +  ΣM / ΣI

where α is the wheel's angular acceleration, ω is the wheel's angular velocity, Δt is the time that elapses between each sampling of the wheel by the computer, Thalf is the friction half-life of the wheel, ΣM is the summation of moments about the center of the wheel due to the buckets, and ΣI is the moment of inertia of the wheel plus the moment of inertia of each bucket about the center of the wheel.  The buckets are assumed to be point masses, such that their moments of inertia can be calculated according to:

I  =  mR^2

where I is the moment of inertia of the bucket, m is the mass of the bucket including the water in it, and R is the radius of the wheel.

3.	Angular velocity and angular position are calculated according to standard physics equations:

ω2  =  ω1  +  αΔt

θ2  =  θ1  +  ωΔt  +  α(Δt)^2 / 2

where θ is the angular position of the wheel ω is the angular velocity of the wheel, and α is the angular acceleration of the wheel.

4.	Buckets fill with water at the when their angular position is within

arctan( r / R )

of vertical where r is the radius of the bucket and R is the radius of the wheel.  Buckets either fill at the rate of the faucet or not at all.

5.	The drain rate out of the bucket is calculated according to:

Q  =  πr^2(2gh / k)^(1/2)

where Q is the drain rate, r is the radius of the bucket, g is gravity, h is the water level in the bucket, and k is the bucket's hydraulic head loss coefficient.

6.	The bucket's hydraulic head loss coefficient, k, is calculated according to:

k  =  gT^2 / 2H

where T is the buckets' drain time, and H is the buckets' height.

7.	For the purposes of calculating the drain rate out of the buckets in 5. above, the gravity term g is replaced with the bucket's total acceleration A, which includes gravity, centripetal acceleration, and tangential acceleration according to:

A  =  g  -  R(ω^2cosθ  +  αsinθ)

where g is acceleration due to gravity, R is the radius of the wheel, θ is the angle of the bucket under consideration measured clockwise from vertical, ω is the angular velocity of the wheel, and α is the angular acceleration of the wheel.

8.	Buckets can only fill when they are at the top of the wheel, not at the bottom.

9.	Once water leaves a bucket it has no further affect on the system.  The effects of water draining from one bucket and falling into another are not considered.

10. 	Acceleration due to gravity is 981 cm/sec2.


The .lww File Format

The following are the contents of an example .lww file:

8

50 500 8000 45

8000

100 40000 5

500 10000

1 30

5 60

1 60

1 600

1 0 0 0 1 0 1 0 0 0 1 0 1 1

These are simple ASCII text files that can be edited with any text editor.  The information contained in these files is as follows:

( number of buckets )

( bucket height, cm ) ( bucket mass, gm ) ( bucket volume, cc ) ( bucket drain time, sec)

( faucet rate, cc/sec )

( wheel radius, cm ) ( wheel mass, gm ) ( friction half-life, sec)

( faucet rate low, cc/sec ) ( faucet rate high, cc/sec )

( friction half-life low, sec ) ( friction half-life high, sec )

( bucket drain time low, sec ) ( bucket drain time high, sec )

( change colors periodically, boolean ) ( color period, sec )

( wipe PS diagram periodically, boolean ) ( wipe period, sec )

( use light red, boolean ) ( use red, boolean ) ..... ( use gray, boolean )

The number and location of whitespace characters (spaces, tabs, new lines, etc.) is not important.  Boolean (true or false) variables such as "change colors periodically" are 0 when false and may be any other integer value when true.


Errors


  Failure Opening a File

Sorry...

Couldn't open your file for reading.


  Failure Reading a File

Sorry...

A failure occurred while reading your file.  This usually occurs if you try to load a file that is not in the proper format.

See .lww File Format for information on how to correct this.


  File Data Out of Range

Sorry...

Your file contained data that was out of range.  See .lww File Format for information on how to correct this.


  No Colors Specified for Phase-Space Diagram

Sorry...

Your file or dialog box did not specify any colors to use in drawing the phase-space diagram.  A default set of colors has been chosen for you.


  Open File Dialog Error

Sorry...

An error occurred during the execution of a Open File dialog box for the reason shown in the message box.


  Out of Timer Resources

Sorry...

The Windows operating system is out of timer resources and can't start the wheel.  Try closing some applications to make more timers available.


  Save File As Dialog Error

Sorry...

An error occurred during the execution of a Save File As dialog box for the reason shown in the message box.


  Save File Error

Sorry...

Couldn't open your file for writing.


  Unexpected End-Of-File (EOF)

Sorry...

An unexpected EOF was encountered while reading your file.  Your file is probably OK, but missing some information.  See .lww File Format for information on how to correct this.


Miscellaneous


  Configuration Changed

You have requested to close this file, which you have just created or which has changed since opening, without saving it.  Press OK to save it, NO not to save it, or cancel to return to using this file.


  About Lorenzian Water Wheel...

Lorenzian Water Wheel

Version 1.1

Copyright © 1995

Mike Monagle

Arvada, CO  USA  80005

All Rights Reserved

303/425-9121

This Shareware program is based on information presented in Chapter 1 of James Gleick's CHAOS:  Making a New Science, and was developed at the University of Denver as a project for Advanced Topics in Programming - Level 3, in the Master of Computer Information Systems program, using:

Borland C++ 4.02

Help Writer's Assistant 1.1 from Olson Software

Visio 3.0 with Advanced Software Shapes

HiJaak Pro 3.0 from Inset Systems

Windows Paintbrush 3.11


  About Shareware...

Lorenzian Water Wheel 1.1 is Shareware.  It may be copied and distributed freely but may not be sold and remains the property of the author.

Support the Shareware concept!

If you like this program, please make a donation to:

Mike Monagle

10583 W. 75th Ave.

Arvada, CO  USA  80005

303/425-9121