Showing posts with label windchill factor. Show all posts
Showing posts with label windchill factor. Show all posts

Tuesday, October 27, 2015

Casio fx-3650p: Programming - The Sequel

Casio fx-3650p: Programming - The Sequel

Time to revisit the Casio fx-3650p.  Since the last time I did this, Casio released an updated fx-3650p.  I still have the older version.  And still, the fx-3650p is not sold in the United States (sigh).   

Since the language of the fx-3650p is similar to the Casio graphing calculators and fx-5800p (in fact it is simplified, you can adopt and port these programs.)

Access to the first set of fx-3650P programs:



Contents for this blog:
1.  Combination with Replacement
2.  Great Circle (Distance in km) 
3.  Orbital Speed and Period 
4.  Eccentricity and Area of an Ellipse
5.  Super Factorial
6.  Escape Velocity 
7.  Finance: Payment of a Monthly Mortgage
8.  Wind Chill Factor
9.  Speed of Sound in Dry Air 


Combination with Replacement 

Formula: nCr(A + B - 1, B)

Program: (17 steps)
? → A : ? → B :
(A + B - 1) [nCr] B 

Example: 
A = 17, B = 8, Result: 735,471
A = 52, B = 5, Result: 3,819,816

Great Circle (Distance in km)

Input:
A = latitude 1 (North is positive), B = longitude 1 (East is positive)
C = latitude 2, D = longitude 2

Program: (49 steps)
? → A : ? → B : ? → C : ? → D :
cos⁻¹ ( sin A sin C + cos A cos C cos (B - D → Y :
Y * 6371 * π ÷ 180 → Y


Example: Los Angels to Rome
Los Angeles:  Lat 34°03' N, Long 118°15' W (enter as negative)
Rome: Lat 41°54' N, Long 12°30' E

Result: (approx) 10,189.94397 km

Orbital Speed and Period   

Input:
A = Mass 1 (kg), B = Mass 2 (kg), D = Distance (m)

Output:
X = Orbital Speed (m/s), Y = Time for One Orbit to complete (in years)

Program: (61 steps)
? → A : ? → B : ? → D : 6.67384E-11 ( A + B → C :
√ ( C ÷ D → X ◢ 2 π √ ( D³ ÷ C → Y : Y ÷ 315576000 → Y

Example:
Sun: 1.989E30 kg (A)
Earth: 5.927E24 kg (B)
Avg. distance between Sun and Earth: 1.496E11 m (D)

Results:
Orbital Speed (Earth around Sun): 29787.91714 m/s (X)
Orbital Period: 0.999924841 yrs (Y)

Eccentricity and Area of an Ellipse

Ellipse with semi-axis lengths A and B, assuming that A ≤ B.  

Program: (25 steps)
? → A : ? → B : 
√ ( 1 - A² ÷ B²  → C ◢ π A B → D 

Example:
A = 5, B = 10

Results:
Eccentricity: 0.866025403 (C)
Area: 157.0796327 (D)

Super Factorial

Formula: spf(n) =   product(X!, X, 1, n)

For the Casio, n is an integer where 1 ≤ n ≤ 16

Source for formula:
Martin, Ángel M.  Sandmath_44: Math Extensions for the HP 41. Rev 44_E. 2012

Program: (35 steps)
? → A : 1 → Y : 1 → M : Lbl 0 :
M! * Y → Y : 1 M+ : A > M - 1 ⇒ Goto 0 : Y 

Examples:
spf(1) = 1
spf(2) = 2
spf(3) = 12
spf(4) = 288


Escape Velocity

Input:
A = mass (kg), D = radius (m)

Output:
Escape velocity in m/s

Program: (27 Steps)
? → A : ? → D : 
√ ( 2 * 6.67384E-11 * A ÷ D 

Example:
A = 5.927E24 kg (mass of Earth)
D = 6.371E3 m (radius of Earth)

Result: 11,143.37008 m/s

Finance: Payment of a Monthly Mortgage

Input:
A = Loan Amount
C = Annual Interest Rate 
D = Number of payments

Output:
B = Monthly Payment 

End of month payments are assumed.  No balloon amounts are assumed.  The program is set up to mimic behavior on most financial calculators (negative for outflows, positive for inflows).  

Program: (40 Steps)
? → A : ? → C : ? → D : C ÷ 1200 → X :
- A * X ÷ ( 1 - ( 1 + X ) ^ -D ) → B

Example:
A = 400,000
C = 5%
D = 360

Result:
B = -2,147.286491 (payment of 2,147.29 per month)

Wind Chill Factor (US Units)

Source for formula:
Glover, Thomas J.  Pocket Ref. 4th Edition.  Sequoia Publishing Inc.  Littleton, CO.  2012

Input:
A = temperature in °F
B = speed of the wind in mph

Output:  
C = Wind Chill in °F

Program: (47 steps)
? → A : ? → B : 35.74 + .6215 A 
- 35.75 B^.16 + .4275 * A * B^.16 → C 

Example:
A = 45°F
B = 15 mph

Result:
C = 38.23993448 °F

Speed of Sound in Dry Air

C = √ ( γ R (T + 273.15))

γ = 1.4 (ratio of specific heat of dry air)
R = 286.9 J/(kg K) (Individual Gas Constant)
T = temperature in °C

Sources:

"Speed of Sound" NASA.  Glenn Research Center. 
Retrieved October 27, 2015

"The Individual and Universe Gas Constant".  The Engineering Toolbox. 
Retrieved October 27, 2015

Input:
C = temperature in °C

Output:
Speed of sound in m/s

Program: (25 Steps)
? → C : √(  1.4 * 286.9 * (C + 273.15

Example:
For 20°C, the speed of sound is approximately 343.1422868 m/s 


Enjoy!  Happy Halloween!  

Eddie 


This blog is property of Edward Shore. 2015 

Thursday, January 1, 2015

TI-84+: Windchill Factor, Boiling Point at Various Elevations, Velocity of Seismic Waves

Happy New Year!  Time flies when we are having fun - we are in 2015 - 15 years into the 21st century.  Here's to making 2015 happy and prosperous for all!

Without further ado, here are the first programs for 2015!

Wind-Chill Factor

The equation, provided by NOA 2011, to determine wind chill is:

W = 35.74 + .6215*T – 35.75*V^.16 + .4275*T*V^.16

Where:
T = air temperature (°F)
V = speed of the wind (mph)

Program WINDCHIL
: Input “AIR TEMP IN °F:”, T
: Input “WIND SPEED (MPH):”, V
: 35.75+.6215*T-35.75*V^.16+.4275*T*V^.16→W
: Disp “WIND CHILL FACTOR:”, W

Example 1:
V = 25 mph, T = 50°F.  Result:  W = 42.75596219
V = 40 mph, T = 20°F.  Result:  W = -.9093161248

Source:  Thomas J. Glover.  “Pocket Ref: 4th Ed” – 2012.  Sequoia Publishing, Inc.:  Littleton, CO




Boiling Point at Various Elevations

Using data   from Pocket Ref, the boiling point of water at certain elevations can be estimated by the following equation:

Y » 211.99262 – (1.94802*10^-3)*X + (7.17273*10^-9)*X^2

X = elevation in feet
Y = boiling point of water in °F

Program BOILH20:
: Input “ELEV. IN FEET:”, X
: 211.99262-(1.94802E-3)*X+(7.17273E-9)*X^2→Y
: Disp “APPROX BAIL PT. (°F):”, Y

Examples:
X = elevation (feet)
Y = boiling point (°F)
250
211.5060633
1000
210.0517727
2750
206.6898088


Source:  Thomas J. Glover.  “Pocket Ref: 4th Ed” – 2012.  Sequoia Publishing, Inc.:  Littleton, CO



Velocity of P-Waves and S-Waves

In measuring seismic waves (earthquakes) of p-waves (primary waves) and s-waves (secondary waves), the following equations can be used:

(I)     First Lamé Parameter:
λ = (v*E)/((1+v)*(1-2*v))

Where: 
v = ratio of soil.  The following parameters are stated from the Foundation Engineering Handbook:

Type of Soil
v =
Clay, above the water table
0.4
Saturated Clay, below the water table
0.5
Wet Sand
0.35
Dry Sand or Rock
0.25

E = elasticity of the soil, measured in thousand-feet per pound

(II)   Shear Modulus (modulus of rigidity)
‘μ = E/(1 + v)

(III) Velocity of the P-Wave (feet/second)
P = √((λ+2μ)*g*1000/w)

w = specific soil weight, in pounds per cubic foot
g = Earth’s gravity constant,  g = 32.1740486 ft/s^2

(IV) Velocity of the S-Wave (feet/second)
S = √(μ*1000*g/w)

Program SEISMIC
: Disp “ELASTICITY (1000 LB/FT)”
: Prompt E
: Disp “SPEC. SOIL WEIGHT”, “(LB/FT^3)”
: Prompt W
: Menu(“SOIL TYPE”, “CLAY”, 1, “BELOW H20 TABLE”, 2, “WET SAND”, 3,
“DRY SAND/ROCK”, 4)
: Lbl 1
: .4→V
: Goto 5
: Lbl 2
: .5→V
: Goto 5
: Lbl 3
: .35→V
: Goto 5
: Lbl 4
: .25→V
: Goto 5
: Lbl 5
: (EV)/((1+V)(1-2V))→L
: E/(2(1+V))→M
: √((L+2M)*32174.0486/W)→P
: √(M*32174.0486/W)→S
: Disp “P-WAVE (FT/S)”,P
: Disp “S-WAVE (FT/S)”,S

Example:
Input: 
E = 3000 pounds per square foot
w = 120 pounds per cubic foot
Type of soil: Clay (v=.4)
Output:
P-Wave Velocity » 1312.863186 ft/s
S-Wave Velocity » 535.9741515 ft/s

Sources: 

Hsai-Yang Fang.  “Foundation Engineering Handbook” Springer Science & Business Media.  1990.

 Indrahil Goswami, Ph.D. P.E. “Civil Engineering PE Breadth and Depth, Exam Guide.  2nd Edition” McGraw Hill. 2014

----

This blog is property of Edward Shore. 2015.  




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 i...