You can run Calchemy here: https://rtestardi.github.io/calchemy/calchemy.html
Basic Features
To perform a simple unit conversion, such as 3 meters converted to inches, you could enter the equation (or click/tap on the link):
Calchemy would respond:
= 118.11 inch
To calculate the required horsepower for a motor which could raise a 2000 lbf elevator to the top of a 10 story building (assuming 12 feet per story) in 1 minute, you could enter the equation:
2000 lbf * (10 * 12 feet) / (1 minute) ? horsepower
Indicating that you want to multiply 2000 pounds force by 10 times 12 feet, divide that by 1 minute, and then express the final result in horsepower. Calchemy would respond:
= 7.27273 horsepower
If, on the other hand, you had made a mistake in the original equation and left out the "/ (1 minute)":
2000 lbf * (10 * 12 feet) ? horsepower
Calchemy would have responded with a Dimensional Mismatch indication containing:
Time^-1
Indicating that the left hand side of the equation was missing a factor of 1/Time -- the equation was not dimensionally correct, and therefore, could not be evaluated.
Calchemy can also be used as a simple dimensionless calculator by eliminating the "?" and result unit from the equation. For example, you could enter the equation:
Calchemy would respond with the algebraically correct answer:
= 17
Advanced Features
You could also enter the original equation in the following less explicit form:
2000 lb; 10 stories; 12 feet/story; 1 minute ? horsepower
Indicating that you want to "combine" 2000 pounds, 10 stories, 12 feet/story, and 1 minute in such a way that the equation is dimensionally correct, and then express the final result in horsepower. Calchemy would again respond:
> 2000 poundf * 10 stories * (12 foot / stories) / (1 minute) ? horsepower
= 7.27273 horsepower
Notice above that Calchemy will always show you how it is interpreting your equations, with a line that begins with ">".
This example illustrates the following features:
Solve By Dimensional Analysis
The ";" operator tells Calchemy to use dimensional analysis to determine whether its operands should be in the numerator or the denominator of the equation. In this example, Calchemy placed the first three operands in the numerator and the last operand in the denominator. This allows you to be less involved with the actual mechanics of the equations.
Overloaded Units
The "lb" unit is an overloaded unit, meaning that it has more than one common definition. It is primarily defined as "lbm" (pounds mass) and secondarily defined as "lbf" (pounds force). Calchemy automatically uses the appropriate definition, again based on dimensional analysis. In this example, Calchemy used "lbf". This allows you to naturally use units with multiple common definitions.
Free Units
The "stories" and "story" units are called free units. Free units are units which are not actually understood by Calchemy, except in that they are new and unique dimensions which must "cancel out" in the end. This allows you to enter equations in a more natural format.
Pluralized Units
The "stories" and "story" units also illustrate that Calchemy understands basic pluralization rules for units. This, again, allows you to enter equations in a more natural format.
How does Calchemy work?
"A number is meaningless without units!" -- a mechanical engineering professor at University of Virginia
Every "number" in Calchemy is represented as a structure containing both a coefficient and an array of dimensional exponents:
class Unit {
double coefficient;
int exponents[0..7];
};
The exponents represent the power of each of the various "base dimensions" understood by Calchemy:
exponents[0] = power of MASS (represented as kilograms externally and grams internally) exponents[1] = power of LENGTH (meters) ...Read more »
Richard Testardi
Anteneh Gashaw
Bruce Land
Bart//Bratke