Showing posts with label physics. Show all posts
Showing posts with label physics. Show all posts

Saturday, October 31, 2026

TI-84 Evo BASIC: Hydraulic Radius and Chezy-Manning (Circular Pipes)

TI-84 Evo BASIC: Hydraulic Radius and Chezy-Manning (Circular Pipes)




Introduction



The program, HYDRAD makes three calculations concerning the flow of water through a sloped pipe:



* Wetted perimeter of the pipe. This is the arc length of the pipe that is touched by the flowing water. (U.S. units: feet)

* Hydraulic radius, which is mathematically defined as the cross area of the water flow (not necessarily the entire cross area of a pipe) divided by the wetter perimeter. (U.S. units: feet)

* Flow rate of the water through the pipe. (U.S. units: cubic feet per second)



The flow rate depends on the type of material the water flows through.



The general equation is:

Q = α ÷ n * A * Y^(2/3) * √S



where:

α = coefficient which varies depending on what type of units are used. If US units, specifically feet, are used, then α = 1.49 (ft^(1/3)/s). If SI units, specifically meters, are used, then α = 1.00 (m^(1/3)/s). (Unusual powers of units.)

n = Manning’s Roughness Coefficient which is dependent on the material the water flows through. Specific values for certain materials include:



Concrete: n = 0.013

Cast Iron: n = 0.014

Steel: n = 0.010

(Lindeburg)



The coefficient is unit-less.

A = the flow area, which is the total cross-section are which water can flow through. In the case of the pipe, A = π * r^2.

Y = the hydraulic radius, or the “radius” of the wet area that the water touches. In general, the hydraulic radius is the wetted area divided by the wetted perimeter.



In the case of the pipe, the area of the wetted segment is calculated as R = r^2 * (Θ – sin Θ) ÷ 2, which Θ is the angle of the wet pipe in radians. The wetted perimeter is Wp = r * Θ. (see diagram below)




S = slope of the pipe, which should not be 0. In this case, downward slope is considered to be positive. (feet/feet or meters/meters)



TI-84 Evo BASIC Program: HYDRAD (US Units)



Code:

ClrHome

Disp “CHEZY-MANNING”, “PART-FILLED PIPE”,

“RADIANS SET”

Radian

Disp “LENGTHS IN FEET”

Input “PIPE RADIUS? “, R

Input “HEIGHT OF H20? “, H

Input “SLOPE? “, S

Menu(“SELECT PIPE MATERIAL”, “CONCRETE”, 1,

“CAST IRON”, 2, “STEEL”, 3, “OTHER N VALUE”, 4)

Lbl 1: .013 → N : Goto 0

Lbl 2: .014 → N : Goto 0

Lbl 3: .01 → N : Goto 0

Lbl 4: Input “N? “, N : Goto 0

Lbl 0

2 * cos^-1(1 – H / R) → Θ

R * Θ → W

R² * (Θ – sin(Θ)) / 2 → A

A / W → Y

(1.49 / N) * (π * R²) * Y^(2/3) * √(S) → Q

Disp “WETTED PERIMETER:”, W, “HYDRAULIC RADIUS”, Y,

“FLOW RATE:”, Q



Examples



Example 1:

pipe radius: r = 2.4 feet

water height: h = 0.9 feet

slope: 0.13

concrete pipe



wetted perimeter: 4.299191011 feet

hydraulic radius: 0.5463307184 feet

flow rate: 499.7552462 ft³/s



Example 2:

pipe radius: r = 1.5 feet

water height: h = 0.02 feet

slope: 0.4

custom n: n = 0.2



wetted perimeter: 0.4904439191 feet

hydraulic radius: 0.0132918217 feet

flow rate: 5.90983011 ft³/s



Example 3:

pipe radius: r = 7.5 feet

water height: h = 3 feet

slope: 1.01

steel pipe



wetted perimeter: 13.90942827 feet

hydraulic radius: 1.808870611 feet

flow rate: 39284.78283 ft³/s



Sources



EngineerExcel. “Chezy Equation: Application In Open Channel Flow Calculations” 2026. Retrieved July 7, 2026. https://engineerexcel.com/chezy-equation/



Lindeburg, Michael R, PE. Quick Reference for the Civil Engineering PE Exam. Professional Publications, Inc. Belmont, CA. 1999. ISBN 1-888577-47-9. pg. 19.



National Weather Service. “Normal Depth Calculator” Weather.gov > Alaska-Pacific RFC > Normal Depth Calculator. Anchorage, AK. Retrieved 5, 2026. https://www.weather.gov/aprfc/normaldepthcalc



Wikipedia. “Chézy formula” Edited March 12, 2026. Retrieved July 5, 2026. https://en.wikipedia.org/wiki/Ch%C3%A9zy_formula




Happy Halloween, everyone! May the spooky season bring fun, laughs, candy, and good times,



Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, October 17, 2026

HP 67 Collection: October 2026

HP 67 Collection: October 2026


All examples are done in FIX 4. (DSP 4)



Earth's Gravity at a Specific Latitude



The true earth gravity force depends on several factors, such as latitude and altitude. This estimation takes the latitude (north/south), in degrees-minutes-seconds, and latitude, in kilometers, into account.



The constant 9.80665 m/s^2 is an accepted average, the true force varies.

g_s = 9.806 – 0.026 * cos(2 * φ)

g_h = g_s * (6378.1 / (6378.1 + h))



HP 67 Code:

LBL A: 001 31, 25, 11

DEG: 002 35, 41

H←: 003 31, 74

2 : 004 02

× : 005 71

COS: 006 31, 63

. : 007 83

0 : 008 00

2 : 009 02

6 : 010 06

× : 011 71

9 : 012 09

. : 013 83

8 : 014 08

0 : 015 00

6 : 016 06

x<>y: 017 35, 52

- : 018 51

x<>y: 019 35, 52

6 : 020 06

3 : 021 03

7 : 022 07

8 : 023 08

. : 024 83

1 : 025 01

+ : 026 61

LST x: 027 35, 82

x<>y: 028 35, 52

÷ : 029 81

× : 030 71

RTN : 031 35, 22



Inputs:

Y: h

X: φ



Examples:

Inputs: h = 0, φ = 2°33’: g ≈ 9.7801

Inputs: h = 0.762, φ = 52°17’: g ≈ 9.8114



Source 

Grainger Engineering Office of Marketing and Communications. (answer written by Rebecca H.) (2016, November 21). “How gravitational force varies at different locations on Earth.” Illinois. https://van.physics.illinois.edu/ask/listing/64061. Retrieved March 10, 2026.



Triangulation



With angles α and ß:

base = dist * (1/tan α + 1/tan ß)

dist = base ÷ (1/tan α + 1/tan ß)



Labels:

LBL A: Enter angles α and ß in the current angle mode. Returns 1/tan α + 1/tan ß.

LBL B: Base. When a number is entered prior to pressing [ B ], the number is stored as a base. Otherwise, the program solves for a base.

LBL C: Distance (of a line that bisects the base). When a number is entered prior to pressing [ C ], the number is stored as a base. Otherwise, the program solves for a base.


HP 67 Code:

LBL A: 001 31, 25, 11 (enter the angles)

TAN: 002 31, 64

1/x: 003 35, 62

x<>y: 004 35, 52

TAN: 005 31, 64

1/x: 006 35, 62

+: 007 61

STO 5: 008 33, 05

RTN: 009 35, 22


LBL B: 010 31, 25, 12 (base)

STO 3: 011 33, 03

F? 3: 012 35, 71, 03

RTN: 013 35, 22

RCL 4: 014 34, 04

RCL 5: 015 34, 05

× : 016 71

STO 3: 017 33, 03

RTN: 018 35, 22


LBL C: 019 31, 25, 13 (distance)

STO 4: 020 33, 04

F? 3: 021 35, 71, 03

RTN: 022 35, 22

RCL 3: 023 34, 03

RCL 5: 024 34, 05

÷ : 025 81

STO 4: 026 33, 04

RTN: 027 35, 22


Examples:

α = 30°, ß = 65°

Set degree mode. 30 [ ENTER ] 65 [ A ]. Result: 2.1984

Distance = 24, solve for base. 24 [ C ] [ B ]. Result: 52.7606

Base = 24, solve for distance. 24 [ B ] [ C ]. Result: 10.9172


Source:

“Triangulation (surveying)” Wikipedia. https://en.wikipedia.org/wiki/Triangulation_(surveying) (last edited October 24, 2025). Retried March 17, 2026



Time of Runoff on Turf


t = 2.5 * (L / (S * I^2))^(1/3)


t: time of runoff (rain off) in minutes

2.5: turf constant

L: distance from remote area in feet

S: slope of the terrain

I: rain intensity in inches per hour


Input Stack:

Z: L

Y: S

X: I


Output Stack:

X: t


HP 67 Code:

LBL A: 001 31, 25, 11

x² : 002 32, 54

× : 003 71

÷ : 004 81

3 : 005 03

1/x: 006 35, 62

y^x: 007 35, 63

2 : 008 02

. : 009 83

5 : 010 05

× : 011 71

RTN: 012 35, 22


Examples:

Inputs: Z: 900 ft, Y: 0.11, X: 4 in/hr. Result: 19.9917 min

Inputs: Z: 650 ft, Y: 0.33, X: 0.06 in/hr. Result: 204.4744 min


Source


Texas Instruments. Slide Rule Calculator SR-50A Manual. 1975. Manual from datamath.org: http://www.datamath.net/Manuals/SR-50A_US.pdf pg. 59



Beamwidth of a Radio Telescope


This program calculates the beam width of a radio telescope in degree-minutes-seconds.


Θ = 67625 ÷ (D * f)

Θ = beam width

D = the diameter of a circular telescope in feet

f = observing frequency in MHz (megahertz)


Inputs:

Y: D

X: f

Outputs:

X: Θ


HP 67 Code:

LBL B: 001 31, 25, 12

× : 002 71

1/x : 003 35, 62

6 : 004 06

7 : 005 07

6 : 006 06

2 : 007 02

5 : 008 05

× : 009 71

→H.MS: 10 32, 74

RTN: 11 35, 22


Examples:

Inputs: X: 1980 MHz, Y: 106 ft. Output: Θ: 0.1920 (19’20”)

Inputs: X: 1665 MHz, Y: 84 ft. Output: Θ: 0.2901 (29’01”)


Source


Ball, John A. Algorithms for RPN Calculators John Wiley & Sons: New York, NY. 1978. ISBN 0-471-03078-8. pg. 259



Fan Laws


p2 = (rpm2 ÷ rpm1)^n * p1

(p1 and p2 stand for various parameters, see the input syntax below)


Inputs:

1st law: (cfm: cubic feet per minute, rpm: revolutions per minute)

Calculate cfm2:

T: cfm1

Z: rpm2

Y: rpm1

X: 1


2nd Law: (sp: static pressure, rpm: revolutions per minute)

Calculate sp2:

T: sp1

Z: rpm2

Y: rpm1

X: 2


3rd Law: (hp: horsepower, rpm: revolutions per minute)

Calculate hp2:

T: hp1

Z: rpm2

Y: rpm1

X: 3


HP 67 Code:

LBL B: 001 31, 25, 12

R↓ : 002 35, 53

÷ : 003 81

R↑ : 004 35, 54

y^x: 005 35, 63

× : 006 71

RTN: 007 35, 22


Examples

1st Law: T: cfm1 = 2000, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 1

Result: cfm2 ≈ 2315.7895

2nd Law: T: sp1 = 0.5, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 2

Result: sp2 ≈ 0.6704

3rd Law: T: hp1 = 1.5, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 3

Result: hp2 ≈ 2.3286


Source

Gladstone, John. Air Conditioning Testing and Balancing: A Field Practice Manual A Van Nostrand Reinhhold Book. August 1976. pp. 24-32



More HP 67 goodness to come in November,


Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, October 3, 2026

Casio fx-50F/Radio Shack EC-4024 Program Collection: October 2026

Casio fx-50F/Radio Shack EC-4024 Program Collection: October 2026




Notes:

* The fx-50F/EC-4024 has a 29 step program space between two program spaces. Program steps can not be edited but can be cleared by [SHIFT] [ C ] (PCL) key sequence.

* Formula calls can not be included as a program step, but scientific constants can be. The values for the constants most likely are from the Japan Standards of 1978 (JISZ-8020-1978), so a little dated to 2026 standards.

* The Casio fx-10F is similar as fx-50F/EC-4024 except that the fx-10F does not have the scientific constants and has a slightly inclined keyboard.

* Mode changes can be included. SHIFT and Kin arithmetic calls are merged.



The programs presented today require inputs to be stored in registers 1-6 using [ SHIFT ] [ Kout ] (Kin) ((K)onstants In).



Angle Between 2 Lines (in Degrees)



Θ = arctan( abs((y – x) ÷ (1 + x * y)) )

abs(x) = √(x^2), key sequence: [ x² ] [ √ ]



x: slope of line 1 (Kin 1)

y: slope of line 2 (Kin 2)



Program Code (20 steps):

MODE 4 (degree)

(

(

Kout 2

-

Kout 1

)

÷

(

1

+

Kout 1

×

Kout 2

)

)

x²

√

TAN^-1

=



Maximum and Minimum of Two Numbers



The two numbers are stored in registers 1 and 2 (Kin 1, Kin 2).

max(x,y) = (x + y + abs(x – y)) ÷ 2 = min(x,y) + abs(x – y)

min(x,y) = (x + y - abs(x – y)) ÷ 2 = max(x,y) - abs(x – y)



Program Code (21 steps):

Kout 2

-

Kout 1

=

x²

√

Kin 3

(

Kout 1

+

Kout 2

+

Kout 3

)

÷

2

=

HLT (show maximum)

-

Kout 3

= (show minimum)



Terminal Velocity of a Spherical Object

vt = √(2 * g * mass ÷ (ρ * cd * exposed area of the object) (units: m/s)

≈ √(34.05656 * mass ÷ (π * radius^2))



The following constants are assumed:

g = 9.80665 m/s² (Earth’s gravitational constant)

ρ ≈ 1.225 kg/m³ (air pressure)

cd = 0.47 (coefficient drag of a sphere)

2 * g ÷ (ρ * cd) ≈ 34.06565 m^4/(s^2 kg)



Program Code (19 steps):

Kout 1

×

3

4

.

0

6

5

6

5

÷

(

π

×

Kout 2

x²

)

=

√

=



Ideal Thermal Voltage and Shockley Diode Equation



Thermal Voltage:

vt = k * T ÷ q * 10^3 (mV)

Shockley Diode Equation:

Id = Is * (exp(vD ÷ (n * vt)) – 1)

Ideal: n = 1



Inputs:

Is: scale current in milliamps (mA) Kin 1

Vd: diode voltage in millivolts (vA) Kin 2

T: temperature in degrees Kelvin (K) Kin 3

Outputs:

vt: Thermal Voltage (mA),

Id: diode current (mV)



Constant used (see comments on the scientific constants above):

k: Boltzmann Constant ([SHIFT] [ 8 ]): 1.380662 * 10^-23 J/K

(q) e: Electron Charge ([SHIFT] [ 4 ]): 1.6021892 * 10^-19 C



Program Code (21 steps):

Kout 3

×

k (SHIFT 8)

÷

e (SHIFT 4)

×

3

10^x

=

HLT (see vt: thermal voltage)

1/x

×

Kout 2

=

e^x

-

1

=

×

Kout 1

=



Source:

“Shockley Diode Equation” Wikipedia. Last Edited November 13, 2025.

https://en.wikipedia.org/wiki/Shockley_diode_equation

Retrieved June 19, 2026.




Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Saturday, September 5, 2026

Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units



Introduction



The following script, gravus2.py, estimates the Earth’s gravity in ft/sec^2 given:



1. The observer’s latitude on Earth (North or South; you don’t have to enter negative numbers for South)

2. The elevation where the observer is in feet.



The Python script is made with a TI-84 Evo, but it should work with all platforms with Python.



Equation Used: With Everything Converted to U.S. Units:



Calculating g_0 at sea level with latitude φ:

g_0 = 32.17192 – 0.08530 * cos(2 * φ°) = 32.17192 – 0.08530 * cos(2 * φ * π ÷ 180)



Calculating g_h with height h:

g_h = g_0 * (erad ÷ (erad + h ÷ 5280))^2



Where (Earth’s radius at latitude φ):

erad = √((a^4 + b^4 * tan(φ)^2) ÷ (a^2+ b^2 * tan(φ)^2)) 



a = 3963.1905919

b = 3949.90276423189



Code: gravus2.py


'''

Earth's Gravity in US Units

EWS 05/26/2026

'''


from math import *


# title screen

print("Earth's Gravity")

print("Given Latitude and Elevation")

print("U.S./Imperial Units")

print("-----------------")


# angles must be converted to radians


print("Latitude in DMS:")

l1=eval(input("Whole Degrees? "))

l2=eval(input("Whole Minutes? "))

l3=eval(input("Seconds? "))

langle=l1+l2/60+l3/3600

# convert to radians

langle*=pi/180

# elevation

elev=eval(input("Elevation in feet? "))

# calculate radius 

a=3963.1905919

b=3949.90276423189

erad=(a**4+b**4*(tan(langle))**2)

erad/=(a**2+b**2*(tan(langle))**2)

erad=sqrt(erad)

# calculation

g=32.17192-0.08530*cos(2*langle)

g*=(erad/(erad+elev/5280))**2

print("Earth's radius: {0:.5f} mi".format(erad))

print("Estimated Gravity: {0:.5f} ft/s**2".format(g))



Examples (Results are rounded to five decimal places)



Latitude (φ)

Height (h ft)

Earth’s Radius (mi)

g_h (ft/s^2)

34°03’00”

500

3959.04875

32.13857

64°11’27”

1650

3952.43868

32.21979

10°57’00”

395

3962.71501

32.09156





Source



Grainger Engineering Office of Marketing and Communications. (answer written by Rebecca H.) (2016, November 21). “How gravitational force varies at different locations on Earth.” Illinois. https://van.physics.illinois.edu/ask/listing/64061. Retrieved March 10, 2026.

Planetcalc. “Earth Radius by Latitude (WGS 84)” Timur. 2021. https://planetcalc.com/7721/ Retrieved March 22, 2026.



Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Saturday, August 15, 2026

HP 48G Collection

 HP 48G Collection 


Contents: 

Intensity of Spherical Light Source 

Speed of Light in Dry Air 

Pressure of Air 

Earth's Gravity at a Specific Latitude 

Light of Sight: Altitude


Intensity of the Spherical Light Source



INTSP: 

<< '1_cm' * '1_m' CONVERT SQ 4 * π * →NUM SWAP '1_W' * SWAP / >>


I = P/(4π(r/100)^2)


Input: 

2: power in Watts (W) 

1: spherical radius in centimeters (cm) No need to enter units.

Output: 

1: intensity (W/m^2) with unit object attached



Example:

Input: 

2: 1368 (W) 1: 5 (cm)

Output: 

1: ≈ 43544.7924_W/m^2



Speed of Sound in Dry Air


CAIR: 

<< '1_°C' * '1_K' CONVERT 1.4 * 'R' CONST * '.289647_kg/mol' / UBASE √ >>


c_air = √(φR(T°C+273.15)/M_air) 

φ = 1.4, ideal adiabatic of air 

M_air = 0.289647 kg/mol, mole of air molecule 

R ≈ 8.314462 J/(mol K), ideal gas constant


Input: 

1: temperature in degrees Celsius (°C) No need to enter units


Output: 

1: speed of sound in air (m/s) with unit object attached


Example:


Input: 

1: 18 (°C)

Output: 

1: ≈ 342.0631_m/s


Pressure of Air


ρAIR (ρ character: [ α ] [ |→ ] [ R ]): 

<< '1_°C' * '1_K' CONVERT 287.05007 '1_J' * '1_kg' / '1_K'

* INV 'StdP' CONST '1_Pa' CONVERT * UBASE >>


ρ = P/(R*(T°C+273.15)) 

P = 101325 Pa, Standard temperature of pressure 

R = 287.05007 J/(kg K)


Input: 

1: temperature in degrees Celsius (°C) No need to enter units

Output: 

1: air pressure_J/(kg K) with unit object attached


Example:


Input: 

1: 18 (°C)

Output: 

1: ≈ 1.2124_kg/m^3


Earth's Gravity at a Specific Latitude


The true earth gravity force depends on several factors, such as latitude and altitude. This estimation takes the latitude (north/south) into account.

The constant 9.80665 m/s^2 is an accepted average, the true force varies.


gLAT: 

<< RAD HMS→ 90 / π * →NUM COS .026 * 9.806 SWAP - '1_m/s^2' * >>


g_Earth = g_45-(g_poles + g_equ) / 2 * cos(lat * π / 90 radians) 

Simplified: g_Earth = 9.806 – 0.026 * cos(lat * π / 90)

g_45 ≈ 9.806 m/s^2 

g_poles ≈ 9.832 m/s^2 

g_equ ≈ 9.78 m/s^2 Take the cosine of (latitude * π / 90) radians


Input: 

1: latitude in D.MMSS (degrees, minutes, seconds) No need to enter units

Output:

1: Earth's gravity at latitude_m/s^2 with unit object attached



Example:

Input:
1: 20.2214 (20°22'14")

Output: 

1: ≈ 9.7863_m/s^2

Source: Grainger Engineering Office of Marketing and Communications. (answer written by Rebecca H.) (2016, November 21). “How gravitational force varies at different locations on Earth.” Illinois. https://van.physics.illinois.edu/ask/listing/64061. Retrieved March 10, 2026.



Light of Sight: Altitude

The program calculates altitude required for an airplane to receive a signal from an airplane.


Program LOSALT: 

<< '1_nmi' * 3 ROLLD '1_ft' * '1_nmi' CONVERT '3440_nmi' + SQ 3 ROLLD '1_ft' * '1_nmi' CONVERT '3440_nmi' + SQ DUP 4 ROLL SWAP - √ 3 ROLL SWAP - SQ + √ '3440_nmi' - '1_ft' CONVERT >>


Inputs: 

3: height of the antenna in feet 

2: average height of the terrain between the airplane and antenna 

1: horizontal distance from airplane to antenna in nautical miles

Enter numbers only, no need to attach units.


Output: 

1: required height in feet, _ft unit object attached


Example: 


height of antenna: 426 ft 

average terrain height: 846 ft 

horizontal distance: 57 nautical mi

required altitude: ≈1519.7282 ft

Note: An average Earth radius is 3440 nautical miles is used. Results will vary since Earth is a spheroid.


Formulas Used:

R_ter: terrain height, Rt = radius_Earth + R_ter 

R_atn: antenna height, Ra = radius_Earth + R_atn 

D: distance to antenna 

R_alt: altitude 1 nmi ≈ 6076.1155 ft R_alt = √(Ra^2 + (D - √(Ra^2 - Rt^2))^2) – radius_Earth



This is a partial adaption of the line of sight distance program of the HP 67.

Source: Hewlett Packard. "Line of Sight Distance" HP-67/HP-97 User's Library Solutions: Avigation. Corvallis, OR. Rev. E. April 1979. pp. 18-22


Eddie

All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

TI-84 Evo BASIC: Hydraulic Radius and Chezy-Manning (Circular Pipes)

TI-84 Evo BASIC: Hydraulic Radius and Chezy-Manning (Circular Pipes) Introduction The program, HYDRAD makes three calculations...