You are on page 1of 18

Calculation Workbook

MikeVanVoorhis@msn.com

This workbook contains added functions for complex unit conversion, air property calculations, 3-d coordinate tra

Examples of Functions
This workbook contains numerous functions that perform usefule calculations. The cells with red text can be changed. Th
These functions are inserted into cells and formula using the >Insert >Function >User Defined menu commands.

The worksheet functions use protected macros. Users can create worksheets with macro capability by using this workshee

Unit Converter Functions:


These functions allow calculations of any parameter at any proper unit combination.
=CVVal(input value, input unit string, output unit string) calculates the parameter value for the given value and units
input value = 100 (degr) (input parameter value and units)
output value = #VALUE! (degk) (output parameter value expressed in proper output units)
=CVBaseUnit(unit string) expresses the given units as SI units.
input units = (lbf/in^2) (input unit string)
output base #VALUE!
units =
=CVBaseVal(value,unit string) evaluates the given parameter into SI units.
input parameter 100 (ft*lbf) (input parameter value and units)
=
output base #VALUE! #VALUE!
parameter =
=UCBaseData(record,field) returns the specific field and record from the unit converter bases factors database. Fie
field
record 1 2 3
9 #VALUE! #VALUE! #VALUE!
=UCBaseIndex(name) returns the specific record number from the unit converter base factors database for a given
name (field 1) record
s #VALUE!
=UCChkval(Unit string) returns a unique check value for a unit text string based on its base units. Proper unit conve
String Value
(kg*m)/(s^2) #VALUE!
=UCFactorData(record,field) returns the specific field and record from the unit converter factors database.
Field 1 = name, field 2 = description, field 3 = factor, field 4 = bias, field 5 = base unit, field 6 = comment, field 7 =
field
record 1 2 3 4 5 6
45 #VALUE! #VALUE! #VALUE! #VALUE! #VALUE! #VALUE!

=UCFactorIndex(name) returns the specific record number from the unit converter factors database for a given nam
name (field 1) record
lbf #VALUE!
=UCFactorDataSearch(start, search string, field) returns the next record number from the given start record of the u
field
search string 6
temp #VALUE!
next temp #VALUE!
next temp #VALUE!

Air and Standard Atmosphere Functions:


These functions allow calculations of atmospheric properties at an input altitude given in meters
=AirPropTemp(altitude) calculates the temperature of air at the given altitude for the "US Standard Atmosphere"
altitude = 1000 m (meter)
#VALUE! K (degrees Kelvin)
=AirPropPress(altitude) calculates the absolute pressure of air at the given altitude for the "US Standard Atmosphe
#VALUE! pa (Pascal, Newton/Meter^2)
=AirPropDens(altitude) calculates the mass density of air at the given altitude for the "US Standard Atmosphere"
#VALUE! kg/m^3 (kilogram/meter^3)
=AirPropSound(altitude) calculates the speed of sound in air at the given altitude using the "US Standard Atmosph
#VALUE! m/s (meter/second)
=AirPropKV(altitude) calculates the kinematic viscosity of air at the given altitude using the "US Standard Atmosphe
#VALUE! kg/(m*s) (kilogram/(meter*second))
=AirPropDV(altitude) calculates the dynamic viscosity of air at the given altitude using the "US Standard Atmospher
#VALUE! m^2/s (meter^2/second)
=AirDensity(temperature,pressure) calculates the density of air at the given temperature and pressure using ideal g
temperature = 288.2 k (degrees Kelvin)
pressure = 101325.4 pa (Pascal, Newton/Meter^2)
#VALUE! kg/m^3 (kilogram/meter^3)
=Reynold(length,density,velocity,kinematic viscosity) calculates the Reynold's number of air at the given density, ve
length = 1.5 m (meter)
density = #VALUE! kg/m^3 (kilogram/meter^3) - see above
velocity = 30 m/s (meter/second)
kinematic #VALUE! kg/(m*s) (kilogram/(meter*second)) - see above
viscosity =
#VALUE! item dimensionless, Re < 2000 is laminar, Re > 4000 is turbulent
Vector Functions:
These functions allow calculations of vectors and coordinate transforms
=VFMabg(vector-dx-dy-dz) converts a vector expressed as [dx,dy,dz] into its [magnitude, alpha, beta, gamma] comp
A vector is expressed by its dx, dy, dz coordinates and converted to magnitude, alpha, beta and gamma angles:
xi yi zi xf yf zf
Vector = 0 0 0 -1 1 2
=VFxyz(vector-mag-alpha-beta-gamma) converts a vector expressed as [magnitude, alpha, beta, gamma] into its [d
A vector is expressed by its magnitude, alpha, beta and gamma angles and converted to its dx, dy, dz coordinate
Mag alpha beta gamma x0 y0
Vector = 2.449 1.991 1.15 0.6155 0 0
=CXFxp(x0,y0,z0,a,b,c,ang,x,y,z) calculates the x' coordinate of x in a transformed system with origin at x0,y0,z0 tha
=CXFyp(x0,y0,z0,a,b,c,ang,x,y,z) calculates the y' coordinate of y in a transformed system with origin at x0,y0,z0 tha
=CXFzp(x0,y0,z0,a,b,c,ang,x,y,z) calculates the z' coordinate of z in a transformed system with origin at x0,y0,z0 tha
Coordinate transform from one 3-d system to another consists of x,y,z and x',y',z' when the x0,y0,z0 and a rotatio
x0 y0 z0
Prime system Origin = 0 0 0 Rotation Axis =
x y z
Point in x,y,z system= 1 0 0
x' y' z'
Point in x', y', z' system = #VALUE! #VALUE! #VALUE!
=CXFx(x0,y0,z0,a,b,c,ang,x',y',z') calculates the x coordinate of x' from a transformed system with origin at x0,y0,z0
=CXFy(x0,y0,z0,a,b,c,ang,x',y',z') calculates the y coordinate of y' from a transformed system with origin at x0,y0,z0
=CXFz(x0,y0,z0,a,b,c,ang,x',y',z') calculates the z coordinate of z' from a transformed system with origin at x0,y0,z0
Coordinate transform from one 3-d system to another consists of x,y,z and x',y',z' when the x0,y0,z0 and a rotatio
x y z
Point in x,y,z system= #VALUE! #VALUE! #VALUE!
x' y' z'
Point in x', y', z' system = 0.707107 -0.70710678 0

Interpolator Function:
This function calculates linear interpolated values
=INTP(DataInx,DataIny,x) calculates the y value for a given table of x y data at a given x' data point by linear interpo
x 1 2 3 4 5
y 1 10 100 1000 10000

x' = 4
y' = #VALUE!

=INTP(DataInx,DataIny,x) calculates the y value for a given table of x y data at a given x' data point by linear interpo
x y
1 1
2 10
3 100
4 1000
5 10000
6 100000

x' y'
4 #VALUE!
ations, 3-d coordinate transforms and interpolation.

d text can be changed. The cells with blue text contain formulas.
menu commands.

bility by using this worksheet with separate worksheets that contain other macros.

r the given value and units expressed as the output units.

roper output units)

ases factors database. Field 1 is the name, field 2 is the check value and field 3 is the description.
actors database for a given name.

se units. Proper unit conversions yield equal check values.

factors database.
field 6 = comment, field 7 = common mark

7
#VALUE!

s database for a given name.

e given start record of the unit converter factors database for a given text string within the given field.

Standard Atmosphere"

he "US Standard Atmosphere"

S Standard Atmosphere"

he "US Standard Atmosphere" properties and ideal gas laws

he "US Standard Atmosphere" properties and ideal gas laws

e "US Standard Atmosphere" properties and ideal gas laws

and pressure using ideal gas laws.

air at the given density, velocity, kinematic viscosity and length.

e > 4000 is turbulent


alpha, beta, gamma] components.
, beta and gamma angles:
dx dy dz Mag alpha beta gamma
-1 1 2 #VALUE! #VALUE! #VALUE! #VALUE!
ha, beta, gamma] into its [dx,dy,dz] components.
d to its dx, dy, dz coordinates:
z0 dx dy dz x y z
0 #VALUE! #VALUE! #VALUE! #VALUE! #VALUE! #VALUE!
m with origin at x0,y0,z0 that has been rotated along the a,b,c vector at angle ang.
m with origin at x0,y0,z0 that has been rotated along the a,b,c vector at angle ang.
m with origin at x0,y0,z0 that has been rotated along the a,b,c vector at angle ang.
n the x0,y0,z0 and a rotation axis defined by I,j,k,theta is given:
a b c ang
0 0 1 0.7853982

stem with origin at x0,y0,z0 that has been rotated along the a,b,c vector at angle ang.
stem with origin at x0,y0,z0 that has been rotated along the a,b,c vector at angle ang.
stem with origin at x0,y0,z0 that has been rotated along the a,b,c vector at angle ang.
n the x0,y0,z0 and a rotation axis defined by I,j,k,theta is given:

data point by linear interpolation.


6
100000

data point by linear interpolation.


Unit Names

Rec Name Description Base Type


1 ACRE acre (M^2) area
7 AMP ampere electric current (AMP) electric
9 ANGSTROM angstrom (M) length
17 ATM atmosphere (KG/(M*S^2)) pressure
22 BAR bar (KG/(M*S^2)) pressure
38 BTU british thermal unit ((KG*M^2)/S^2) energy
42 BUSHEL bushel (US) (M^3) volume
45 degC degrees Celsius (degK) temperature
49 CAL calorie ((KG*M^2)/S^2) energy
55 CALORIE[FOOD] calorie(food) ((KG*M^2)/S^2) energy
60 CARAT Carat (KG) mass
65 CC cubic centimeters (M^3) volume
66 CD Candlela, candle of light (CD) luminesence
69 CENTI multiplier, 1E-2 (ITEM) Multiplier
70 CHAIN chain [Gunter, survey] (M) length
74 CIRCLE full circle (M/M) angle
76 CM centimeter (M) length
81 COULOMB Charge, quantity of electricity (AMP*S) electric
82 CP centipoise, viscocity (KG/(M*S)) viscocity
83 CST centistoke (M^2/S) viscocity
91 CUP cup (M^3) volume
93 CYCLE revolution (M/M) angle
96 DAY day (mean Earth) (S) time
97 DECI multiplier, 1E-1 (ITEM) Multiplier
98 DEG degrees (M/M) angle
99 DEKA multiplier, 1E1 (ITEM) Multiplier
110 DYNE dyne ((KG*M)/S^2) force
131 EV Electron volt ((KG*M^2)/S^2) energy
133 degF degrees Farenheight (degK) temperature
134 F[16] Fraction, 1/16, sixteenth (ITEM) Multiplier
135 F[2] Fraction, 1/2, half (ITEM) Multiplier
136 F[32] Fraction, 1/32, thirtysecond (ITEM) Multiplier
137 F[4] Fraction, 1/4, quarter or fourth (ITEM) Multiplier
138 F[64] Fraction, 1/64, sixtyfourth (ITEM) Multiplier
139 F[8] Fraction, 1/8, eighth (ITEM) Multiplier
145 FATHOM fathom (M) length
153 FLOZ Fluid Ounce (M^3) volume
156 FT feet (M) length
161 FT[H2O] foot of water (KG/(M*S^2)) pressure
171 FT-CANDLE Foot-Candle ((M^2/(M^2*CD))/M^2) luminesence
173 FURLONG furlong (M) length
176 G gravity acceleration (M/S^2) constant
177 GAL gallon (us liquid) (M^3) volume
178 GAL[USDRY] gal(us dry) (M^3) volume
182 GIGA multiplier, 1E9 (ITEM) Multiplier
184 GM gram (KG) mass
190 GROSS 12 dozen, 144 (ITEM) Multiplier
199 HECTARE hectare, area of land (M/S) area
200 HECTO multiplier, 1E2 (ITEM) Multiplier
203 HP horsepower (550 ft*lbf/s) ((KG*M^2)/S^3) power
207 HR hour (S) time
210 HZ Hertz, frequency, cycle/second (M/M/S) rotation
211 IN inch (M) length
216 ITEM Any individual item, dimensionle (ITEM) quantity
217 J joule, energy, work or quentity of ((KG*M^2)/S^2) energy
218 degK degrees Kelvin (degK) temperature
224 KG kilogram (KG) mass
226 KILO multiplier, 1E3 (ITEM) Multiplier
228 KIP 1000 pound force ((KG*M)/S^2) force
233 KM kilometer (M) length
235 KNOT Knot (M/S) velocity
240 KW kilowatt ((KG*M^2)/S^3) power
242 L liter (M^3) volume
248 LBF pound force ((KG*M)/S^2) force
249 LBM pound mass (KG) mass
268 LIGHT speed of light (M/S) velocity
269 LIGHT-YR Light-Year (M) length
277 LM Lumen, Luminous flux (M^2/(M^2*CD)) luminesence
280 LX Illuminance, lux (CD*M^2/M^4) luminesence
281 M meter (M) length
283 MACH[s] mach(isa/sl) (M/S) velocity
286 MBAR millibar (KG/(M*S^2)) pressure
297 MI mile, statute (M) length
298 MICRO multiplier, 1E-6 (ITEM) Multiplier
299 MICRON Micron (M) length
304 MIL mil (M) length
320 MILLI multiplier, 1E-3 (ITEM) Multiplier
322 MIN minute (S) time
327 MM millimeter (M) length
328 MM[H2O] mmh2o (KG/(M*S^2)) pressure
329 MM[HG] millimeter hg (60 F) (KG/(M*S^2)) pressure
336 MOL mole, amount of substance (MOL) quantity
339 MPA megapascal (KG/(M*S^2)) pressure
344 N Newton force ((KG*M)/S^2) force
348 NAUTMI Nautical Mile (M) length
350 OHM Ohm, electical resistance ((KG*M^2)/(AMP^2*S^3)) electric
351 OZ ounce (avoirdupois) (KG) mass
352 OZ[T] Ounce, troy (KG) mass
354 PA pascal, pressure or stress (KG/(M*S^2)) pressure
376 PETA multiplier, 1E15 (ITEM) Multiplier
379 PICO multiplier 1E-12 (ITEM) Multiplier
387 PINT Pint (US liquid) (M^3) volume
396 PSF pound force per sq ft (KG/(M*S^2)) pressure
397 PSI pound force per sq in (KG/(M*S^2)) pressure
406 QT quart (US liquid) (M^3) volume
415 degR degrees Rankine (degK) temperature
416 RAD radian, plane angle (M/M) angle
423 REV revolution (M/M) rotation
424 RGC Molar gas constant, ideal ((((KG)*(M^2))/(S^2))/(MOL*K)) constant
428 ROD rod (M) length
435 RPM Revolution per minute (M/M/S) rotation
438 S second (S) time
457 SLUG slug = 32.17 lbm (KG) mass
472 SPGR specific gravity (h2o @ 60 F) (KG/M^3) density
489 TBLSP tablespoon (M^3) volume
490 TERA multiplier, 1E12 (ITEM) Multiplier
491 THERM therm ((KG*M^2)/S^2) energy
494 TON ton (us or short) (KG) mass
502 TORR torr (mm Hg 0 C) (KG/(M*S^2)) pressure
504 TSP teaspoon (M^3) volume
510 UM micrometer (M) length
511 V Volt, energy per unit charge, pote((KG*M^2)/(AMP*S^3)) electric
522 W watt, power or radiant flux ((KG*M^2)/S^3) power
524 WEBER magnetic flux density integral ((KG*M^2/(AMP*S^2)) magnetic
526 YD yard (M) length
531 YR year (mean Earth) (S) time
Fav
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
TANK DRAIN TIME - ANALYSIS WORKBOOK
Calculation Workbook
MJ Van Voorhis 2/6/2008

Parameter Value Unit Comment


Tank Diameter = 243.31 in Input Value
Drain Oriface Coefficient (0.70 to 0.85 (item) Input Value
0.91) =
Drain Oriface Area = 9.82 in^2 Input Value
Initial Water Height above Drain = 241.50 (in) Input Value
Final Water Height above Drain = 36.00 (in) Input Value
Acceleration of Gravity = 1.00 (g) Input Value
Volume = #VALUE! m^3 =F10*PI()/4*F7^2
Drain Time = #VALUE! min =(((PI()/4*F7^2) * (2/F11)^(1/2)) /
(F9*F8)) * (F10^(1/2))
Average Flow Rate = #VALUE! gal/min =F13/F14

Re: Tank drain-time formula


--------------------------------------------------------------------------------

Here is the differentiated equation from a water operators handbook:


For Circular Tank:
t = ((3.14 x dia^2) / (C x A)) x (h / (8 x g))^0.5
Where:
t = time in seconds
dia = diameter of tank in ft
C = Orface coef. (0.7 to 0.91) I use 0.81 for a pipe penitrating the tank wall.
A = aera of orface in sf
h = height of water above outlet in ft
g = gravitational constant (32.2)

If you have a retangular tank it would seem that you could replace the first part (3.14 x dia^2) with (4 x L x W)
A rate of change is represented by a differential. In your case, the rate of change of volume is the flow rate out of the tank, which is dV/dt. So you can say that dV/d
Integrate it and use the boundary condition that you know, namely that at zero time (T=0) you have full volume (V=V) and that at T=T, you have V=0, remembering t
Then you'll just need to rearrange for T, and hey presto.

zaza

step Level_i time


0 241.5 ###
1 221.0 ###
2 200.4 ###
3 179.9 ###
4 159.3 ###
5 138.8 ###
6 118.2 ###
7 97.7 ###
8 77.1 ###
9 56.6 ###
10 36.0 ###

(in) min
dV/dt. So you can say that dV/dt = A_drain * sqrt(2gh).
=T, you have V=0, remembering to include an appropriate negative sign to indicate that water is flowing out of the tank.

Flow
###
###
###
###
### 300.0
###
###
###
250.0
###
###
###
200.0
gal/min

level
150.0

100.0

50.0

0.0
0.00 2.00 4.00 6.00 8.00 10.00
time
Tank Level vs Time Flow Rate
50.0

0.0
0.00 2.00 4.00 6.00 8.00 10.00
time
Tank Level vs Time Flow Rate
12.0

10.0

8.0

6.0

4.0

2.0

0.0
6.00 8.00 10.00 12.00
time
vs Time Flow Rate
2.0

0.0
6.00 8.00 10.00 12.00
time
vs Time Flow Rate

You might also like