Copyright: Copyright ® 1995 Kenneth Holladay


Help Contents
Contents

Introduction

Welcome

Installation

Warranty

Shareware Registration

Product Support

A Brief History of Standards for Units

A Note from the Author

References

Using the Functions

Unit Conversion Functions

Volume Calculations

Function Wizard Support

Using Functions that Return an Array

Unit Conversion Reference

CvtAcceleration

CvtArea

CvtDensity

CvtEnergy

CvtEnthalpy

CvtEntropy

CvtLength

CvtMass

CvtMassFlow

CvtPower

CvtPressure

CvtTemperature

CvtThermCond

CvtVelocity

CvtViscosity

CvtVolume

CvtVolumeFlow

Volume Calculation Reference

VolSphere

VolHorzCyl

VolHorzCylCap

VolVertCyl

VolTaperedCyl

VolVertCylSphCap


Welcome

Thank you for trying  Units & Volumes.    If you find this set of functions useful, I encourage you to register.

Units & Volumes is an Add-in module compatible with Microsoft Excel 5.0.  The functions become available for use after the module is loaded with the Excel Add-in manager.


Installation

Starting the Setup Program

File Installation

Configuration Files

Adding the Module to Excel


Starting the Setup Program

If you have an installation diskette,

1.	Insert the disk into your disk drive.

2.	In the Window's Program Manager, pull down the File menu and select the Run... item.

3.	In the Command Line box, type   A:\Setup
where A: is the letter associated with your disk drive.

4.	Click on the OK button.

If you are installing the shareware version,

1.	Unzip the file UNITVOL.ZIP into a subdirectory.

2.	In the Window's Program Manager, pull down the File menu and select the Run... item.

3.	Click on the Browse... button to raise the Browse dialog box.

4.	In the Drive and Directories areas, select the drive and directory where you unzipped the files; then highlight SETUP.EXE in the File list box.

5.	Click on the OK button in the Browse dialog box; then click on the OK button in the Run dialog box.


File Installation

If the setup program can find Excel, it suggests that you install the Units & Volumes files to a subdirectory named XLIBRIS under your Excel directory.  The shareware version installs the following files:

UNITVOL.XLL 	The Units & Volumes add-in module.

UNITVOL.HLP	The help file.

UVTEST.XLS	A spreadsheet file demonstrating the functions.

In addition, the registered version installs:

DDEFEED.EXE	A simple DDE server that feeds values to any DDE client.

TANK.XLS	A tank demonstration spreadsheet.


Configuration Files

All XL Engineering modules use only a single entry in the WIN.INI file.  The purpose of this entry is to locate files.  A typical entry would look like this:

[XLIBRIS]
Install=C:\EXCEL\XLIBRIS

All other module configuration parameters are kept in the XLIBRIS.INI file in the installation directory.


Adding the Module to Excel

In order to use the functions in the Units & Volumes module, you must add them into Excel as follows.

1.	From the Tools menu, choose the "Add-Ins" item.

2.	In the Add-Ins dialog box, choose the "Browse" button.

3.	Select the drive and path where you installed this module, then highlight the UNITVOL.XLL file in the "File Name" area.  Choose the OK button to close the Browse dialog box.

4.	You will be back in the Add-Ins dialog box, and a new entry will be in the "Add-Ins Available" list.  Make sure the box is checked beside "Units & Volumes," then choose the OK button.

5.	If the addition is successful, you will see a brief "Thank you" message.


Warranty

Users of Units & Volumes must accept this disclaimer of warranty:

"Units & Volumes is supplied as is.  The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose.  The author assumes no liability for damages, direct or consequential, which may result from the use of Units & Volumes."


Shareware Registration

Registration Agreement

Units & Volumes is a "shareware program" and is provided at no charge to the user for evaluation.  Feel free to share it with your friends, but please do not give it away altered or as part of another system.  The essence of "user-supported" software is to provide personal computer users with quality software without high prices, and yet to provide incentive for programmers to continue to develop new products.  If you find this program useful and find that you are using Units & Volumes and continue to use Units & Volumes after a reasonable trial period, you must make a registration payment to Kenneth Holladay.  The registration fee will license one copy for use on any one computer at any one time.  You must treat this software just like a book.  An example is that this software may be used by any number of people and may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another, just as a book cannot be read by two different persons at the same time.

Commercial users of Units & Volumes must register and pay for their copies of Units & Volumes within 30 days of first use or their license is withdrawn.  Site-License arrangements may be made by contacting Kenneth Holladay.

Registration Fee

The registration fee for Units & Volumes is $25.  For this, you will receive:

1.	A copy of the latest version of Units & Volumes.

2.	A printed copy of the 46 page User's manual.

3.	An additional example spreadsheet and a utility program, DDEFEED, that acts as a DDE server to feed up to four variables into a DDE client.

4.	Notification of new versions and major bug fixes.

Please remit payment to:

Kenneth L. Holladay
PO Box 19306
Plantation, FL  33318

Related Topics:

Registration Form

Definition of Shareware

Redistribution


Registration Form

You can print a registration form directly from Excel.  During your evaluation period, the About dialog box will appear once in a while when you start Excel reminding you that you are using an unregistered version.  In addition, a "Units & Volumes..." menu item is added to the Help menu in Excel.  This menu item also raises the About box.  The About box contains a button labeled "Register".

When you choose the Register button, the Registration Information dialog box appears.  In this box, please fill in your name, shipping address, phone and Email contact information.

Choosing OK in the Registration Information box loads a special Invoice spreadsheet and fills in the information you just provided   If you want more than one copy of Units & Volumes, simply fill in the quantity.  Next, print the form, make out a check, and mail the form and check to the address shown on the Invoice.


Definition of Shareware

Shareware distribution gives users a chance to try software before buying it. If you try a Shareware program and continue using it, you are expected to register. Individual programs differ on details -- some request registration while others require it, some specify a maximum trial period. With registration, you get anything from the simple right to continue using the software to an updated program with printed manual.

Copyright laws apply to both Shareware and commercial software, and the copyright holder retains all rights, with a few specific exceptions as stated below. Shareware authors are accomplished programmers, just like commercial authors, and the programs are of comparable quality.  (In both cases, there are good programs and bad ones!) The main difference is in the method of distribution.  The author specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some authors require written permission before a commercial disk vendor may copy their Shareware.

Shareware is a distribution method, not a type of software. You should find software that suits your needs and pocketbook, whether it's commercial or Shareware. The Shareware system makes fitting your needs easier, because you can try before you buy.  And because the overhead is low, prices are low also.  Shareware has the ultimate money-back guarantee -- if you don't use the product, you don't pay for it.


Redistribution

You are encouraged to pass a copy of the shareware version of Units & Volumes along to your friends for evaluation.  Please encourage them to register their copy if they find it useful.

Anyone distributing the shareware version of Units & Volumes for any kind of remuneration must comply with the conditions that are outlined in the VENDOR.DOC file.  If this file is not present in the version that you have, then you must first contact Kenneth Holladay for authorization.


Product Support

Whether you are registered or not, bug reports and comments are always appreciated.  For registered users, if you find a major bug within 6 months, it will be fixed expeditiously or you will be entitled to a refund.  All registered users will be notified of any release that is designed to primarily fix problems.  After the 6 month warranty period, these will be available to registered users for a nominal fee to cover shipping.

Related Topics:

Getting Help

Ombudsman Statement


Getting Help

If you have Internet or CompuServe access, please contact me via EMAIL

CompuServe: 74130,1531

Internet:   74130.1531@compuserve.com

You can also contact me by mail at:

Kenneth L. Holladay
PO Box 19306
Plantation, FL  33318
USA


Ombudsman Statement

This program is produced by a member of the Association of Shareware Professionals (ASP).  ASP wants to make sure that the shareware principle works for you.   If you are unable to resolve a shareware-related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member, but does not provide technical support for members' products.

Please write to:

ASP Ombudsman
545 Grover Road
Muskegon, MI  49442-9427
USA

You may also contact the Ombudsman by FAX at 616-788-2765, or send a message via CompuServe Mail to ASP Ombudsman 70007,3536.


A Brief History of Standards for Units

THE ANCIENTS

As the social order of mankind expanded to include organized construction and expanded trade, a uniform system of weights and measures became an inevitable requirement.  The earliest units of weights and measures were derived from the human body and from natural surroundings.  For example, as early as 3000 BC the cubit was defined  as the distance between a man's elbow and the tip of his middle finger.

In Egypt, the construction of massive buildings and monuments, the growth of trade in metals, and the practice of water-resource management encouraged the development of more accurate definitions for measurement units.  By the time of  Imhotep, the first engineer known by name, the results of the standardization can be seen in the precise construction of projects such as the pyramid of King Zoser of Egypt, which was built at Saqqara in 2600 BC.

In Mesopotamia the cubit became the standard of length, and the shekel the standard of weight. Time was measured in Egypt with a calendar that divided the yearly cycle of seasons into months and days.  Clay tablets dating from about 2000 BC show that the Babylonians had detailed knowledge of a number of mathematical concepts and developed a system of measurement based on the number 60, from which modern time and angle units are descended.

The Mosaic law (1450 BC) specifically dealt with the moral and ethical issues related to using standard measurements when conducting trade.  Leviticus 19:35-36 states "You shall do no wrong in judgment, in measurement of weight, or capacity.   You shall have just balances, just weights, a just ephah, and a just hin..."  (The ephah was used to measure grain, and the hin was a liquid measurement).  This same principal was reiterated by the wise king Solomon (about 950 BC) when he stated in Proverbs 11:1 "A false balance is an abomination to the Lord, but a just weight is his delight."  Just prior the Assyrian conquest of Israel in 722 BC, the prophet Micah condemned the unscrupulous practice of using non-standard weights and measures in trade.  Micah 6:10 "Is there yet a man in the wicked house, along with the treasures of wickedness, and a short measure that is cursed?  Can I justify wicked scales and a bag of deceptive weights?"

THE ROMANS

The Romans made many important contributions to the development of weights and measures.  They used a base-12 system and divided both the foot and the pound into 12 unciae ("parts," from which we get the words inches and ounces).  The English abbreviation lb. for the pound was derived from the libra, a Roman unit of weight.  The Romans established five feet as a pace, or double step.  To measure longer distances, they adopted the mille passus (mile), which was equal to 1,000 paces, or 5,000 feet.

Perhaps even more important than these specific contributions, however, was the Roman standardization of measurement.  Roman law required that people in all parts of the empire use the units as they were defined by the government in Rome.

EUROPE

During the Middle Ages, after the fall of the Roman Empire, many variations in weights and measures developed in Europe. Different standards, and sometimes different units, were used in the various regions, towns, and guilds.  An example of the lack of uniformity can be seen in the directions for establishing the length of a rod ("rood") as given in a 16th-century German treatise on surveying: "Stand at the door of a church on Sunday and bid 16 men to stop, tall ones and small ones, as they happen to pass out when the service is finished; then make them put their left feet one behind the other, and the length thus obtained shall be a right and lawful rood to measure and survey the land with, and the 16th part of it shall be a right and lawful foot."

Many units of measurement and their English names can be traced to the Middle Ages. The word acre developed from a word for "field."  The furlong was originally a "furrow long," the length of a plowed strip of land in the division of medieval manors.  The rod originated from the length of the pole used by a plowman to measure a furrow.  The yard (from gierd, meaning "twig" or "measure") represented the length of a man's arm.

There were attempts during the Middle Ages to establish unified standards of weights and measures.  At the European trade fairs, which attracted merchants from all parts of the continent, exact standards were required. The troy units of weight, for example, originated at the fairs held at Troyes, France.  Merchants, however, continued to use their own weights and measures in local commerce.  It was in England that the standardization of medieval weights and measures was first successful.

The most famous document of British constitutional history, the Magna Carta, addressed the problem of unit standardization.  Issued in 1215 by King John at Runnymede (under compulsion), article 35 states: "Let there be one measure of wine throughout our whole realm; and one measure of ale; and one measure of corn, to wit, "the London quarter"; and one width of cloth (whether dyed, or russet, or "halberget"), to wit, two ells within the selvedges; of weights also let it be as of measures."

In 1776, when the American Colonies separated from England, they retained the weights and measures then in use.  At the time, these were probably the most firmly established and widely used weights and measures in the world.  The European continent still did not have any type of uniform standard.  Weights and measures differed not only from country to country, but even from one town to another and from one trade to another.  This lack of uniformity led the National Assembly of France during the French Revolution to enact a decree (May 8, 1790) that called upon the French Academy of Sciences to act in concert with the Royal Society of London to "deduce an invariable standard for all of the measures and all weights."  Since the English already had an adequate system of weights and measures, the English did not participate in the French endeavor.  The result of the French work evolved into what we now know as the metric system.

The metric system became preferred by scientists of the nineteenth century, partly because it was intended to be an international system of measurement, partly because the units of measurement were theoretically supposed to be independently reproducible, and partly because of the simplicity of its decimal nature.  Today, the United States is the last large country that has not officially adopted the metric system.

THE UNITED STATES

From the beginning of this country, our founding fathers recognized the importance of a uniform and standardized set of weights and measures.  Section IX of The Articles Of Confederation, agreed to by Congress on November 15, 1777, states that "The United States in Congress assembled shall also have the sole and exclusive right and power of regulating the alloy and value of coin struck by their own authority, or by that of the respective States -- fixing the standards of weights and measures throughout the United States--"

Later,  in Article I, section 8, of The Constitution Of The United States Of America, (September 17, 1787) Congress is given the authority "To coin money, regulate the value thereof, and of foreign coin, and fix the standard of weights and measures;"  It was not until 1901 however, that the National Bureau of Standards (NBS) was established by Congress.  The name has since been changed to the National Institute of Standards and Technology (NIST).  This agency operates under the United States Department of Commerce, and is the central measurement laboratory of the federal government.

THE WORLD

The quest for standardized, independently reproducible units of measurement is stronger than ever.  In fact, the array of world organizations dedicated to this task can be overwhelming.  In addition to NIST, there is the International Electrotechnical Commission (IEC), the Deutsches Institut fur Normung (DIN), The British Standards Institute (BS), the Japanese Standards Association (JIS), the Scientific Apparatus Makers Association (SAMA), and the American National Standards Institute (ANSI), just to name a few.

The engineering community has made significant progress in defining units since Imhotep's time.  Length standards have evolved from body parts, to scratches on metal bars, to the present definition of a meter as 1,650,763.73 wavelengths in a vacuum of the orange-red line of the spectrum of krypton-86.  As impressive as this sounds from the viewpoint of a fundamental scientist, engineers must still produce quality work with rulers and scales, or perhaps with a laser range finder and computerized load cell.


A Note from the Author

As a chemical engineer and professional programmer, I have found the Microsoft Excel spreadsheet to be a versatile and valuable tool.  However, there are many areas where additional functions can make a job faster and easier.  I am committed to producing a series of useful engineering oriented Add-In modules.

•	Each module will contain a set of related functions that are seamlessly integrated into Excel.

•	Each module will come with a complete help file and full Function Wizard support.

If you find any problems with Units & Volumes, or if you have any suggestions for improvements or future modules, please contact me.

Kenneth L. Holladay, PE
PO Box 19306
Plantation, FL  33318

CompuServe Mail: 74130,1531

Internet:   74130.1531@compuserve.com

I am a member of:

American Institute of Chemical Engineers
Instrument Society of America
Association of Shareware Professionals.

The module "Units & Volumes" and its documentation are
Copyright  1995 by Kenneth Holladay.  All rights reserved.


References

Dean, John, Lange's Handbook of Chemistry, 11th Edition, McGraw Hill, 1973.

HimmelBlau, David, Basic Principles and Calculations in Chemical Engineering, 3rd Edition, Prentice Hall, 1974.

Perry, Robert H. and Green, Don W., Perry's Chemical Engineer's Handbook, 6th Edition, McGraw-Hill, 1984.

Platt, George, ISA Guide To Measurement Conversions, Instrument Society of America, 1994.

Selby, Samuel M., Standard Mathematical Tables, 22nd Edition, CRC Press, Cleveland Ohio, 1974.


Unit Conversion Functions

The Units & Volumes module uses a different approach to unit conversions than most of the programs available on the market.  Rather than a single function which gives an error for incompatible unit types, a separate function is defined for each compatible category of units.  This is much more practical for use in a spreadsheet.

Each unit conversion function requires three arguments:  the input value, the units associated with the input value, and the desired output units.  The result is a two cell array where the first cell contains the numerical value and the second cell contains the text label of the converted unit.  Both the input and output units can be specified using either the label text or a numerical index.  Using the index results in slightly faster recalculation.  For example, to convert a mass value in cell A1 from grams to pounds, you can use the CvtMass function as:

=CvtMass( A1, grams, pounds )

or

=CvtMass( A1, 2, 8)

The Function Reference section contains a table of supported units for each function.  The table shows the index, label text, and conversion factor for each unit.  Except for temperature units, the output value is calculated using the formula:

Each unit category contains the most commonly used units.  In order to make the conversion functions easier to use, many obscure and unusual units were left out.  If you don't see a unit that you believe would be useful, please let me know and I will try to include it in the next release.


Volume Calculations

The Volume Calculations section also supplies individual functions for each type of  tank geometry.  Although it is possible to build these calculations directly in Excel, you will find that using the volume calculation functions is easier, especially for a complicated tanks such as a horizontal cylinder with end caps.

The first parameter to each volume function is the height of the material in the tank.  In order to limit the function results to realistic values, there are two restrictions imposed.

1.	If the value given for material height is less than 0, a value of 0 is used.

2.	If the value given for material height is greater than the height of the tank, then the height of the tank is used.

The Function Reference section for each volume calculation function gives the basic formulas used in the calculation.  The reference does not include the complete logic required to piece together the volume from the given parameters.

By using some other program that can supply a tank height via DDE, these volume calculation functions can be used with the graph and chart capabilities of Excel to implement an excellent display for a small tank farm.  The registered version of the module includes a simple DDE server to simulate up to four tank levels, and an example template with animated graphics.


Function Wizard Support

This Add-in module takes full advantage of the help potential available from the Excel Function Wizard.  After installing the module, you will find two new categories of functions in the Function Wizard:

Unit Conversions

Volume Calculations

When using the Function Wizard to add a function into a cell, there are several places where help is available.

1.	In the Step 1 of 2 dialog box,  you will see a brief description for each function as you highlight it.

2.	In the Step 2 of 2 dialog box, you will see descriptions for each argument in a function.  In addition, if you choose the Help button in this dialog box, you will access a detailed description of the function.  For unit conversions, the help includes a complete list of the units handled by the function.


Using Functions that Return an Array

All unit conversion functions return a 1 row by two column array with the converted value in the first column, and the label text corresponding to the converted units in the second column.  If all you want to see is the numerical converted value, then enter the function into a spreadsheet cell just as you would any other function.

However, if you want to take advantage of the functions ability to place the unit text associated with the convert value into an adjacent cell, then use must entering the function as an array.

To enter a conversion function as an array:

1.	Highlight two consecutive cells in a row.

2.	Type in a formula, for example:   =CvtVolume( 1,1,2 )

3.	Simultaneously press the Ctrl + Shift + Enter keys.


CvtAcceleration

This function converts between acceleration units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtAcceleration( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	meters/sec/sec	1.0
2	centimeters/sec/sec	100.0
3	inches/sec/sec	12/0.3048
4	feet/sec/sec	1/0.3048
5	kilometers/hour/sec	3.6
6	miles/hour/sec	2.236936


CvtArea

This function converts between area units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtArea( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	square meters	1.0
2	acres	2.47105381E-04
3	ares	0.01
4	circular mils	1.97352524E+09
5	hectares	1.0 E-04
6	square centimeters	10000.0
7	square chains	2.47105381E-03
8	square feet	1.07639104E+01
9	square inches	1.55000310E+03
10	square miles	3.86102158E-07
11	square perches	3.95368610E-02
12	square poles	3.95368610E-02
13	square rods	3.95368610E-02
14	square yards	1.19599005


CvtDensity

This function converts between density units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtDensity( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	pounds/gallon	1.0
2	pounds/cubic foot	7.4805
3	pounds/cubic inch	1/231
4	ounces/cubic inch	0.069264
5	short tons/cubic yard	0.10099
6	grains/cubic inch	1000/33
7	grams/liter	119.8264
8	kilograms/cubic meter	119.8264
9	grains/gallon	7000.0
10	grams/cubic centimeter	0.1198264
11	grams/milliliter	0.1198264
12	kilograms/liter	0.1198264


CvtEnergy

This function converts between energy, heat, and work units.  The function returns a 1 row by two column array with the converted value in the first column and the label text of the converted units in the second column.

Syntax

CvtEnergy( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the value units.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	joules	1.0
2	Ergs	1.0 E+07
3	BTU	9.47831 E-04
4	BTU(@39degF)	9.43690 E-04
5	BTU(@60degF)	9.48156 E-04
6	BTU(mean)	9.470863 E-04
7	BTU(thermochemical)	9.4845141475 E-04
8	calories	0.238849
9	calories(@15degC)	0.238903
10	calories(@20degC)	0.239126
11	calories(mean)	0.238662
12	calories(thermochemical)	1.0/4.184
13	centigrade heat units	5.26573 E-04
14	electronvolts	6.24181 E+18
15	foot-pounds(force)	0.737562
16	horsepower-hours	3.72506 E-07
17	horsepower-hours(metric)	3.7767 E-07
18	kilocalories	2.38849 E-04
19	kilocalories(mean)	2.38662 E-04
20	kilocalories(thermochemical)	1.0/4184.0
21	kilowatt-hours	1/3.6 E+06
22	liter-atmospheres	0.00986894
23	megajoules	1.0 E-06
24	quads	9.47831 E-19
25	therms(EEC)	9.47831 E-09
26	therms(US)	9.48058 E-09
27	watt-seconds	1.0
28	watt-hour	1/3600
29	kilogram-meters	0.1019716
Note: BTU, calories, and kilocalories with no modifiers are International Steam Table (IT) values.


CvtEnthalpy

This function converts between enthalpy units.  The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtEnthalpy( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	kilojoules/kilogram	2.325966
2	BTU/pound	1.0
3	calories/gram	0.5555554
4	kilocalories/kilogram	0.5555554


CvtEntropy

This function converts between entropy units.  This function also works for heat capacity.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtEntropy( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	kilojoules/kilogram-K	4.18674
2	BTU/pound-degF	1.0
3	calories/gram-degC	0.999998
4	kilocalories/kilogram-degC	0.999998
5	joules/gram-K	4.18674


CvtLength

This function converts between length (distance) units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtLength( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	meters	1.0
2	angstroms	1.0E+10
3	centimeters	100.0
4	millimeters	1000.0
5	chains(engineer's)	0.032808
6	chains	0.049710
7	fathoms	0.54681
8	feet	3.28084
9	furlongs	0.0049710
10	inches	39.37008
11	links(engineer's)	3.28084
12	links	4.9710
13	miles	6.2137E-04
14	nautical miles	5.3996E-04
15	mils	39370.08
16	rods	0.19884
17	yards	1.09361
NOTE: chains and links with no qualifier are surveyor's units.


CvtMass

This function converts between mass units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtMass( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	kilograms	1.0
2	grams	1000.0
3	carats	5000.0
4	milligrams	1.0E+06
5	metric tons	0.001
6	drams	564.38339
7	ounces	35.273962
8	pounds	2.2046226
9	short tons	1.10231131E-03
10	long tons	9.84206528E-04
11	grains	1.54323584E+04
12	long hundredweights	1.96841306E-02
13	short hundredweights	2.20462262E-02
14	pennyweights	643.014931
15	troy ounces	32.1507466
16	troy pounds	2.67922888
17	apothecary drams	257.20597
18	apothecary ounces	32.1507466
19	apothecary pounds	2.67922888
20	apothecary scruples	771.617918
Note:  drams, ounces, and pounds with no qualifier are avoirdupois.


CvtMassFlow

This function converts between mass flow units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtMassFlow( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	kilograms/sec	1.0
2	kilograms/min	60.0
3	kilograms/hour	3600.0
4	kilograms/day	86400.0
5	grams/sec	1000.0
6	grams/min	60000.0
7	grams/hour	3.60E+06
8	metric tons/sec	0.001
9	metric tons/min	0.06
10	metric tons/hour	3.6
11	metric tons/day	86.4
12	pounds/sec	2.20462262
13	pounds/min	132.277357
14	pounds/hour	7936.64144
15	pounds/day	190479.394
16	short tons/sec	1.10231131E-03
17	short tons/min	6.61386786E-02
18	short tons/hour	3.96832072
19	short tons/day	95.2396973
20	long tons/sec	9.84206528E-04
21	long tons/min	5.90523916E-02
22	long tons/hour	3.54314350
23	long tons/day	85.0354440


CvtPower

This function converts between power units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtPower( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	kilowatts	1.0
2	BTU/min	56.869882
3	BTU/hour	3412.1929
4	foot-pounds/min	44253.73
5	foot-pounds/sec	737.5621
6	horsepower	1.341022
7	metric horsepower	1.359621
8	boiler horsepower	0.1019420
9	kilocalories/min	14.33075
10	kilocalories/sec	0.2388459
11	meter-kilograms(f)/sec	101.9716
Note:  BTU and kilocalories are International Steam Table (IT) values.  Horsepower with no qualifier is 550 foot-pounds/sec.


CvtPressure

This function converts between pressure units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtPressure( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	pounds/square inch	1.0
2	pounds/square foot	144.0
3	atmospheres	6.80459639E-02
4	millibars	68.9475729
5	bars	6.89475729E-02
6	inches of water	27.7075924
7	feet of water	2.30896603
8	inches of mercury	2.041772
9	kips/square inch	0.001
10	dynes/square cm	6.89475729E+04
11	grams(f)/square cm	70.306958
12	kilograms(f)/square cm	0.070306958
13	kilograms(f)/square meter	703.06958
14	kiloPascals	6.89475729
15	Pascals	6894.75729
16	torrs	51.71492
17	millimeters of mercury	51.71492
18	centimeters of mercury	5.171492
19	millimeters of water	703.0889
20	centimeters of water	70.30889
21	megaPascals	6.89475729E-03
Note:  inches of water, feet of water, and inches of mercury are at 60 deg. F.  Centimeters of water and millimeters of water are at 4 deg. C.  Millimeters of mercury are at 0 deg. C.


CvtTemperature

This function converts between temperature units.  The conversion for temperature is different than most due to the different zero point of the SI and English scale.  The appropriate equations are:

deg. Rankine = deg. F + 459.67
Kelvin = deg. C + 273.15
deg. F = deg. C * 1.8 + 32

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtTemperature( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	deg. C	NA
2	Kelvin	NA
3	deg. F	NA
4	deg. Rankine	NA


CvtThermCond

This function converts between thermal conductivity units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtThermCond( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	kilowatt/meter-K	1000.0
2	watt/meter-K	1.0
3	BTU/foot-hour-degF	0.5777892
4	calories/centimeter-sec-degC	2.390057E-03
5	kilocalories/meter-sec-degC	2.390057E-02
6	kilocalories/meter-hr-degC	86.042065


CvtVelocity

This function converts between velocity (speed) units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtVelocity( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	miles/hour	1.0
2	knots	0.868976241
3	miles/min	(1/60)
4	feet/hour	5280.0
5	feet/min	88.0
6	feet/sec	(22/15)
7	inches/sec	17.6
8	centimeters/sec	44.704
9	kilometers/hour	1.609344
10	meters/hour	1609.344
11	meters/min	26.8224
12	meters/sec	0.44704


CvtViscosity

This function converts between relative viscosity (also known as dynamic viscosity) units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtViscosity( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	centipoises	1.0
2	poise	0.01
3	grams/centimeter-sec	0.01
4	pounds/foot-sec	6.7196895E-04
5	pounds/foot-hour	2.419088
6	pounds(force)-sec/square foot	2.088543E-05
7	kilograms/meter-hour	3.60
8	Newton-sec/square meter	0.001
9	Pascal-sec	0.001


CvtVolume

This function converts between volume units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtVolume( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the units associated with value.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

NOTE: barrels with no qualifier are petroleum (42 gal) barrels.

Index	Label Text	Factor
1	gallons	1.0
2	cubic feet	0.133680556
3	cubic inches	231.0
4	cubic yards	0.00495113169
5	cubic meters	0.003785411784
6	dekaliters	0.3785411784
7	fluid drams	1024.0
8	dry gallons	0.859367
9	Imperial gallons	0.8326747
10	gills	32.0
11	hectoliters	0.03785411784
12	liters	3.785411784
13	cubic centimeters	3785.411784
14	milliliters	3785.411784
15	minims	61440
16	fluid ounces	128.0
17	pints	8.0
18	quarts	4.0
19	acre-feet	1 / 325850
20	barrels (beer)	1 / 31
21	barrels	1 / 42
22	bushels	0.107420876


CvtVolumeFlow

This function converts between volumetric flow units.

The function returns a 1 row by two column array with the converted value in the first column and the label text corresponding to the converted units in the second column.

Syntax

CvtVolumeFlow( value, units, new_units )

value  is the input value that you want to convert.

units  is the Label Text or Index corresponding to the value units.

new_units   is the Label Text or Index corresponding to the units associated with the returned converted value.

Supported Units

Index	Label Text	Factor
1	gallons/hour	60.0
2	gallons/min	1.0
3	gallons/sec	(1/60.0)
4	million gallons/day	0.00144
5	acre-feet/hour	1.841338039E-04
6	barrels/day	34.2857143
7	barrels/hour	1.42857143
8	barrels/min	(1/42.0)
9	barrels(beer)/day	46.4516129
10	barrels(beer)/hour	1.93548387
11	barrels(beer)/min	(1/31.0)
12	cubic feet/day	192.5
13	cubic feet/hour	8.02083333
14	cubic feet/min	0.133680556
15	cubic feet/sec	2.22800926E-03
16	cubic meters/day	5.450992969
17	cubic meters/hour	0.227124707
18	cubic meters/min	3.785411784E-03
19	cubic meters/sec	6.30901964E-05
20	hectoliters/hour	2.27124707
21	hectoliters/min	3.785411784E-02
22	hectoliters/sec	6.30901964E-04
23	liters/hour	227.124707
24	liters/min	3.785411784
25	liters/sec	0.0630901964
26	Imperial gallons/hour	49.9604840
27	Imperial gallons/min	0.832674737
28	Imperial gallons/sec	0.0138779122
Note: barrels with no qualifier are petroleum (42 gal) barrels.


VolSphere

This function converts the height of a material in a spherical tank into the equivalent volume.  Note that the specific units do not matter, but the height and Radius must be supplied in the same units.  For example, if the height is measured in feet, the radius must be in feet, and the calculated volume will be in cubic feet.  Use the CvtVolume function to convert the calculated volume to the desired units.

Syntax

VolSphere( mtl_height, radius )

mtl_height  is the height of the material in the tank.

radius  is the radius of the tank.


VolHorzCyl

This function converts the height of a material in a horizontal cylindrical tank into the equivalent volume.  Note that the specific units do not matter, but the height and all tank dimensions must be supplied in the same units.  For example, if the height is measured in feet, the radius and length must be in feet, and the calculated volume will be in cubic feet.  Use the CvtVolume function to convert the calculated volume to the desired units.

Syntax

VolHorzCyl( mtl_height, radius, length )

mtl_height  is the height of the material in the tank.

radius  is the radius of the tank.

length  is the length of the tank.


VolHorzCylCap

This function converts the height of a material in a horizontal cylindrical tank with end caps into the equivalent volume.  Note that the specific units do not matter, but the height and all tank dimensions must be supplied in the same units.  For example, if the height is measured in feet, the radius and both lengths must be in feet, and the calculated volume will be in cubic feet.  Use the CvtVolume function to convert the calculated volume to the desired units.

The end caps are assumed to be ellipsoids.  The depth of each end cap is assumed to be  (max_length - cyl_length) / 2.  Note that the depth of an end cap must be less than or equal to the cylinder radius.  If it is equal to the cylinder radius, then the caps are hemispherical.

Since there is no simple, closed form solution to the partial volume of the hemispherical end caps, the volume is calculated using a Simpson's rule integration of the partially filled ellipsoid.  The volume of the cylindrical portion is calculated using the equations described under VolHorzCyl

Syntax

VolHorzCylSphCap( mtl_height, radius, cyl_length, max_length )

mtl_height  is the height of the material in the tank.

radius  is the radius of the cylindrical portion of the tank.

cyl_length  is the length of the cylindrical portion of the tank

max_length  is the longest length of the tank, end cap to end cap.


VolVertCyl

This function converts the height of a material in a vertical cylindrical tank into the equivalent volume.  Note that the specific units do not matter, but the height and all tank dimensions must be supplied in the same units.  For example, if the height is measured in feet, the radius and length must be in feet, and the calculated volume will be in cubic feet.  Use the CvtVolume function to convert the calculated volume to the desired units.

Syntax

VolVertCyl( mtl_height, radius, length )

mtl_height  is the height of the material in the tank.

radius  is the radius of the tank.

length  is the length of the tank


VolTaperedCyl

This function converts the height of a material in a vertical tapered cylindrical tank into the equivalent volume.  Note that the specific units do not matter, but the height and all tank dimensions must be supplied in the same units.  For example, if the height is measured in feet, then all other dimensions must be in feet, and the calculated volume will be in cubic feet.  Use the CvtVolume function to convert the calculated volume to the desired units.

Note that while in most cases R1 will be less than R2, the function does not require this.

Syntax

VolTaperedCyl( mtl_height, radius_bottom, radius_top, length )

mtl_height  is the height of the material in the tank.

radius_bottom  is the radius of the lower part of the tank (R1 in the picture).

radius_top  is the radius of the top part of the tank (R2 in the picture).

length  is the length (or maximum height) of the tank


VolVertCylSphCap

This function converts the height of a material in a vertical cylindrical tank with a spherical bottom into the equivalent volume.  Note that the specific units do not matter, but the height and all tank dimensions must be supplied in the same units.  For example, if the height is measured in feet, all other dimensions must be in feet, and the calculated volume will be in cubic feet.  Use the CvtVolume function to convert the calculated volume to the desired units.  Note that (max_length - cyl_length) must be less than radius.

The bottom part of the tank is assumed to be some portion of a sphere.  If  (Max Length - Cylinder Length) is equal to the cylinder Radius, then the bottom is a complete hemisphere.  If it is less than the cylinder Radius, then the function calculates a theoretical radius for the bottom before calculating the volume.  See VolSphere and VolVertCyl for the standard portions of the equations.

Syntax

VolVertCylSphCap( mtl_height, radius, cyl_length, max_length )

mtl_height  is the height of the material in the tank.

radius  is the radius of the cylindrical portion of the tank.

cyl_length  is the length of the cylindrical portion of the tank

max_length  is the longest length of the tank, end cap to end cap.