Jim Allen's Website

Orifice Bore Calculators, CV Calculators, Process Simulators, PID Tutorials, and Blather Log (Blog)
home | login or register

Orifice Bore Calculators

- Liquid (JavaScript, Flash)
- Steam (JavaScript, Flash)
- Gas (JavaScript, Flash)

CV Calculators

- All in One
- Liquid
- Steam
- Gas

Process Simulators

- Flow
- Level
- Temperature (Beta)

PID Tutorials

- PID Demonstration
- Ultimate Method
- Work Order

- Google Chart Generator
James B. Allen
P. O. Box 563
Mooringsport, LA 71060

Mutilated Chessboard

April 20, 2008 09:10 pm
chess board

Have you heard of the "mutilated chessboard" problem? The chess board to the left has its opposing corners removed, leaving sixty-two squares instead of the usual sixty-four. The domino below it will perfectly cover two squares. Is it possible to arrange thirty-one such dominos so they cover all sixty-two squares? Think about it and settle on an answer before reading further.

In his book Fermat's Enigma, Simon Singh uses this puzzle to demonstrate the difference between a scientific theory and a mathematical proof.

According to Singh, a scientist tries to solve a problem through experimentation. The scientist may arrange the dominos in many different configurations. After many failures, the scientist may conclude that the sixty-two squares cannot be covered by thirty-one dominos. Can the scientist be sure after testing only a fraction of the millions of possibilities?

A mathematician, on the other hand, strives to develop an infallible proof. An example follows:

Who can argue with that?

By the way, if you are the type of person who finds my website useful, then you are probably the type of person who will thoroughly enjoy Simon Singh's books. I highly recommend his Fermat's Enigma.


Why Register or Login?

March 21, 2008 08:00 pm
Although you are not required to register or login to access this site's content, I added a "login or register" link in the left navigation column. Logging in will enable you to save PID process simulators, read and post comments, and retrieve my email address. Registering is easy; it requires only an email address. Furthermore, I will never display or share your email address. My privacy statement follows:
Privacy Statement: I pledge to keep your email address private. I will divulge your email address to no one. I further pledge to only use your email address to reply directly to you. You will never receive unsolicited email (spam) from me. Your privacy is very important to me, and I will do everything I can to protect it.

Registeration Not Required

March 19, 2008 07:01 pm
You are not required to register or login to access this site's content anymore. Please read the following disclaimer, though (for what it's worth).
To the best of my knowledge, the information on this website is reasonably accurate. However, I do not warrant or assume legal liability or responsibility for the accuracy, completeness, or usefulness of any information or process disclosed on this site.
You will find it difficult to leave a comment on this site now, as I am hesitant to allow anonymous comments. I don't feel like fighting unscrupulous comment spammers. I will provide a means to comment shortly. Please email me in the mean time. I am always interested in bug reports and suggestions.

Loop Tuning Anomaly

February 17, 2008 05:07 pm

I was testing my new Flash process simulators when I noticed the following cyclic behavior:

Saw Tooth Wave

It sparked an immediate response in my mind. I stopped thinking about testing and started thinking about a particular equipment malfunction. What do you suspect? A saw tooth shaped cycle almost always indicates a sticking control valve. Would you try to tune a control loop displaying this behavior? Give it a try. Here is the simulator: [java, flash]. As an exercise, can you determine how much the valve is sticking, expressed in percent?


Google Chart API

January 28, 2008 11:12 pm
Google recently released its feature rich Google Chart API. The API enables programmers to generate charts and graphs quickly and easily. Programmers pass chart attributes and data to Google via a query string, and Google returns a nice graphical representation of the data. It is perfect for websites with server-side data to display. I, unfortunately, do not have server-side data, but, as a bored programmer, I wanted to develop against it anyway. Therefore, I developed the practically useless Google Chart Generator! I included as many features as I could fit onto one screen, so its interface is almost too complex to comprehend. However, if you find yourself needing a line chart, scatter plot, bar chart, or pie chart, and you are willing to struggle with a clunky interface, give it a try. I put a link to it in the left column. On the bright side, the charts Google returns are very nice.

[UPDATE March 12, 2008: I fixed the problem with the pie chart.]

The Simple Bubble Tube

December 23, 2007 12:46 pm

With all the new-fangled multifunction instrumentation available nowadays, it is easy to forget about the old tried and true measurement techniques. I believe the old adage, "the simplest solution is usually the best solution." For example, I like the simplicity and elegance of a bubble tube. A bubble tube is a tube (typically ¼ inch to ¾ inch tubing or pipe) that is inserted into a tank a fixed distance from the bottom. The liquid is pushed out of the bubble tube with air or nitrogen, which is metered through a purge meter. The resulting backpressure is proportional to liquid level or density and is usually measured with a differential pressure transmitter. Bubble tubes can be used to measure liquid level, interface level, and density in open tanks.

Liquid Level

I show the transmitter at the top of the tank in the following figure, but it and the purge meter can be located anywhere. Referring to the figure, suppose A = 100 inches, B = 20 inches, and the liquid specific gravity is 0.8. The transmitter's lower range value (LRV) is 20 * 0.8 = 16 inches of water. The transmitter's upper range value is (100 + 20) * 0.8 = 100 inches of water. Therefore, the transmitter's calibration range is 16 - 100 inches of water. However, I usually make B = 0, which makes A = 120. In that case, the calibration range is 0 - 100 inches of water.

Level

Interface Level (One Bubble Tube)

If the overall tank level remains constant, as with a constantly overflowing tank, a single bubble tube can be used to measure interface level. Referring to the following figure, suppose A = 100 inches, B = 20 inches, SG1 = 0.8, and SG2 = 1.0. The transmitter's lower range value (LRV) is (100 * 0.8) + (20 * 1.0) = 100 inches of water. The transmitter's upper range value (URV) is (100 + 20) * 1.0 = 120 inches of water. Therefore, the transmitter's calibration range is 100 - 120 inches of water.

Interface

In many cases, however, a tank's overall level varies several inches as its incoming flow varies. This variation induces significant error in the measured variable. In the previous example, the transmitter's span is 20 inches of water. An overall level change of only two inches (the radius of the overflow pipe, for example) will cause about ten percent error. The following two tube system will eliminate the error.

Interface Level (Two Bubble Tubes)

An interface level system with two bubble tubes will eliminate the error caused by a varying tank level. The second bubble tube is connected to the low side of the transmitter. As the overall level changes, the resulting backpressure is applied to both the high side and low side equally, thereby canceling the error.

Referring to the following figure, suppose A = 100 inches, SG1 is 0.8, and SG2 is 1.0. The transmitter's lower range value (LRV) is 100 * 0.8 = 80 inches of water. The transmitter's upper range value (URV) is 100 * 1.0 = 100 inches of water. Therefore, the transmitter's range is 80 - 100 inches of water.

Interface

Density (One Bubble Tube)

As with interface level, if the overall tank level remains constant, a single bubble tube can be used to measure density. Referring to the following figure, suppose A = 100 inches, SG1 = 0.8, and SG2 = 1.0. The transmitter's lower range value (LRV) is 100 * 0.8 = 80 inches of water. The transmitter's upper range value (URV) is 100 * 1.0 = 100 inches of water. Therefore, the transmitter's calibration range is 80 - 100 inches of water. For the best accuracy, make length A as long as practical, since length A determines the transmitter's span.

Density

Once again, a tank's overall level may vary several inches as its incoming flow varies, and this variation induces significant error in the measured variable; hence, consider using the following two tube system instead.

Density (Two Bubble Tubes)

A density system with two bubble tubes will eliminate the error caused by a varying tank level. The second bubble tube is connected to the low side of the transmitter. As the overall level changes, the resulting backpressure is applied to both the high side and low side equally, thereby canceling the error.

Referring to the following figure, suppose A = 100 inches, SG1 = 0.8, and SG2 = 1.0. The transmitter's lower range value (LRV) is 100 * 0.8 = 80 inches of water. The transmitter's upper range value (URV) is 100 * 1.0 = 100 inches of water. Therefore, the transmitter's calibration range is 80 - 100 inches of water. For the best accuracy, make length A as long as practical, since length A determines the transmitter's span.

Density

If you need to measure the level, interface level, or density in an open tank, consider using a bubble tube. You probably have everything needed in stock: a purge meter, a differential pressure transmitter, and some tubing. You can have it implemented in no time, and it will be accurate, reliable, and easy to maintain.


The Science of Secrecy

December 03, 2007 11:02 pm

I just finished a great book about the secret science of cryptography: The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography by Simon Singh. It is a perfect mix of science and history that documents the evolution of cryptography - the battle between cipher makers and cipher breakers - and how it influenced and continues to influence history. Although much of the book deals with governmental agencies and academia, my favorite story took place in the Wild West, involved cowboys, a buried treasure, and encrypted papers describing its location. It is the story of "The Beale Papers."

In January 1820, Thomas J. Beale, a man with "jet black eyes and hair of the same color," rode into Lynchburg, Virginia and checked into the Washington Hotel. The hotel and its owner, Robert Morriss, "were held in high regard" throughout Virginia and Morriss' reputation as an excellent manager "extended even to other states." Beale spent the entire winter with Morriss and became very popular with the locals. Yet he revealed nothing about his personal life, his past, or the purpose of his visit. He suddenly left Lynchburg at the end of March.

Beale reappeared two years later, in January of 1822. This time, though, he gave Morriss a locked box containing "papers of value and importance." Morriss put the box in his safe and promptly forgot about it. Beale mysteriously disappeared again in the spring. Then in May, Morriss received a letter from Beale revealing the significance of the box. It contained "papers vitally affecting the fortunes" of Beale and his business partners. Beale instructed Morriss to guard the box with "vigilance and care" until he or someone with authority from him returned for it, or, if no one returns for it, "for a period of ten years from the date of this letter." The box contained a letter addressed to Morriss and papers "unintelligible without the aid of a key..." The letter goes on to say, "Such a key I have left in the hand of a friend in this place, sealed and addressed to yourself, and endorsed not to be delivered until June 1832. By means of this you will understand fully all you will be required to do."

Beale never returned for the box, and the letter explaining how to decipher its contents never arrived. Morriss finally opened the box in 1845. It contained a note from Beale and three enciphered sheets. The note explained how Beale and twenty-nine of his hunting buddies stumbled upon a vein of gold in a cleft of some rocks while hunting buffalo north of Santa Fe. They spent the next eighteen months mining the site and accumulating large quantities of gold and silver. Then, in 1822, Beale traveled to Lynchburg with the treasure to find a suitable location to bury it. On this occasion, Beale first stayed in the Washington Hotel and met Morriss. Beale buried the treasure and left Lynchburg at the end of winter to rejoin his men at the mine. After eighteen more months of mining, Beale returned to Lynchburg with another load of treasure and the lock box containing the three enciphered sheets. The first sheet revealed the treasure's location. The second sheet described the treasure's contents. The third sheet listed the people who should receive a share of the treasure. Without the promised key, however, Morriss toiled the next twenty years trying to decipher the three sheets. Morriss enlisted the help of an unidentified friend in 1862. The friend successfully deciphered the second Beale Cipher, revealing the treasure's immense value. The friend spent copious time trying to decipher the other two sheets, especially the first one. He failed to decipher them, however, and the papers brought him nothing but heartache. Therefore, to rid himself of the responsibility, he published the ciphers and Morriss' account of the story in 1885. The Beale Papers have been baffling treasure hunters and professional cryptanalysts ever since. Do you have a little spare time on your hands? Solve this mystery and earn fame and fortune! Everything you need is in this reprint of "The Beale Papers."

For a full account of this story and many more like it, I highly recommend Simon Singh's The Code Book.


Continuous Improvement Anomaly

November 27, 2007 08:52 pm
bass pro shirt I am always on the lookout for unexpected results of an improvement project. Nonetheless, I am often surprised. In an attempt to improve my cloths folding skills, I was practicing the techniques described over on http://www.fold-your-shirt.com/. I was pretty amused when I flipped over my Bass Pro shirt. My wife was not, however. She apparently has no sense of humor (or irony). I may have to fold my Bass Pro shirt the old fashion way (wad it up).


Process Simulators

November 22, 2007 12:22 am

Do you need to teach or demonstrate PID controller tuning, the effects of valve stiction (static friction) and backlash (loose motion), or process dynamics? Try my fully configurable process simulators: flow, level, temperature forthcoming, or view these examples: flow, level. If you log in before configuring a simulator, you can save it. Thereafter, you and your students can open it simultaneously from anywhere with internet access. Furthermore, you can send an email containing a link to your simulator or put a link to it on your web site. If you have suggestions or recommendations, please provide them.

Your browser must be endowed with the Java Runtime Environment. Most are, but if yours is not, you can get it at the following url: http://www.java.com/en/download/index.jsp.

UPDATE: The simulators are now available in Flash, too! Here are a couple examples: flow, level.


Flex

November 15, 2007 11:44 pm

I recently started using a nifty new tool, Adobe Flex 2. Like most tools, Flex fills a niche. It is not right for every job, but it is an excellent choice for developing certain Rich Internet (or Intranet) Applications (RIA). Flex is a standards-based programming environment. The developer uses two languages to write Flex applications: MXML and ActionScript 3.0. MXML is a markup language used to layout the user interface. ActionScript is an object-oriented programming (OOP) language used to bring the application to life. The MXML and ActionScript files compile into a single SWF file that runs in any web browser equipped with Adobe Flash Player 9. I find Flex development very intuitive, as will any experienced developer. If you are comfortable developing with a text editor, you can get started at no cost. The software development kit (sdk) is free, and the documentation is excellent. For a quick start, get Adobe's getting started guide, and visit the Flex team blog. The integrated development environment (IDE), Adobe Flex Builder, is not free, but it is well worth the $299 (down from $499) list price.

I recently used Flex to develop and deploy a client interface to manipulate a bottling machine's production data. Since the bottling machine and the Flex application are both connected to the same SQL database, I could have easily developed the application into a full-blown Human Machine Interface (HMI), but, unfortunately, that was outside the scope of the project. I will provide a project summary and sample application in a future article. Until then, sample these three simple Flex applications: orifice bore calculators (liquid, steam), and cv calculator. (You must be logged in to sample the applications.)