Showing posts with label flux. Show all posts
Showing posts with label flux. Show all posts

Sunday, April 23, 2017

HP Prime and TI-84 Plus CE: Shallow Wave Analysis

HP Prime and TI-84 Plus CE:  Shallow Wave Analysis

Introduction



The program H2OWAVES calculates wave speed, impedance, and wave flux for shallow ocean waves.  The following are assumed:

1. The criteria of λ < D/20 is assumed where λ is the length of the wave.
2. The water assumed to be 0°C, where the density (ρ) is 1,000 kg/m. 
3. SI units are used.  For gravity, g = 9.80665 m/s^2 is used.

Formulas Used

Wave Speed (m/s):  v = √(g * D)
Wave Impedance (Mks):  Z = ρ * v
Wave Energy Flux (W/m):  I = (ρ * g * H)^2/(2 * Z)
Maximum Possible Length (m):  λ = 20 * D

HP Prime Program H2OWAVES

EXPORT H2OWAVES()
BEGIN
// EWS 2017-04-21
// Shallow Wave Analysis
// for D/L<1/20
// SI Units

LOCAL D,H;
LOCAL v,Z,I;

INPUT({D,H},
"Wave Analysis",
{"D: ","H: "},
{"Depth (m)","Wave Height (m)"});

v:=√(9.80665*D);
Z:=1000*v;
I:=(9806.65*H)^2/(2*Z);

PRINT();
PRINT("Wave speed (m/s): "+v);
PRINT("Impedance (Mks): "+Z);
PRINT("Wave Flux (W/m): "+I);

RETURN {v,Z,I};

END;

TI-84 Plus CE Program H2OWAVES

"EWS 2017-04-23"
"SHALLOW WAVES"
"D<F/20"
Disp "SHALLOW WAVES"
Input "DEPTH (M): ",D
Input "HEIGHT (M): ",H
√(9.80665*D)→V
1000*V→Z
(9806.65*H)^2/(2*Z)→I
Disp "WAVE SPEED (M/S):",V
Disp "IMPEDANCE (WKS):",Z
Disp "WAVE FLUX (W/M):",I

Example

Input: 
Depth:  3.2 m
Height:  0.49 m

Output:
Wave Speed: 5.601899678 m/s
Impedance:  5601.899678 Wks
Wave Flux:  2060.953478 W/m

Source:

Ingard, K.U. Fundamental of Waves and Oscillations Cambridge University Press:  New York 1988.  IBSN 0 521 32734

Surf’s up!  Eddie


This blog is property of Edward Shore, 2017.

Tuesday, April 7, 2015

HP Prime: Electric Field & Flux (Gauss’s Law)

HP Prime:  Electric Field & Flux (Gauss’s Law)

The program EFILED calculates the electric filed and flux for five common fields:

















Ring


















 Line or Wire of Charge  The radius of the Wire is small.


















Sphere (non-conducting – uniform charge)



Plane (Flat Sheet)



Cylinder with the charge flowing through the ends


By Gauss’s Law, the general formula that of flux is:

Flux =  q/ε0 = ∫ E dA

Where:
q = charge (in Coulombs)
ε0 = 8.85418781762 * 10^-12 F/m
E = electric field
dA = change of area, where A represents Area

HP Prime: EFIELD

EXPORT EFIELD()
BEGIN
// Electric Filed & Flux
// EWS 2015-04-07
// SI Units ares assumed
// ε0=8.85418781762ᴇ−12_(F/m)

LOCAL c,ef,sa,flux;
// ef: electric field
// sa: surface area
// flux = ef * sa = q/ε

CHOOSE(c,"Elec. Field/Flux",
{"Ring","Line/Wire of Charge",
"Non-Conducting Sphere",
"Plane","Cylinder"});

IF c==0 THEN KILL; END;

// Ring
IF c==1 THEN
LOCAL ro,ri,a,q;
INPUT({ro,ri,a,q},"Elec. Filed: Ring",
{"ro=","ri=","a=","q="},
{"Outer Radius","Inner Radius",
"Point","Charge"});
ef:=q/(4*8.85418781762ᴇ−12*π*
((ro-ri)^2+a^2)^1.5);
sa:=π*(ro^2-ri^2);
END;

// Line/Wire of Charge
IF c==2 THEN
LOCAL l,r,a,y,q;
INPUT({l,r,a,q},"Elec. Field: Line",
{"l =","r =","a =","q ="},{"Length of Wire",
"Radius of Wire","Distance from Wire",
"Charge"});
ef:=(q*a)/(l*4*8.85418781762ᴇ−12*π)
*∫((y^2+a^2)^−1.5,y,−l/2,l/2);
sa:=π*l*2*π;
END;

// Non-Conducting Sphere
IF c==3 THEN
LOCAL R,r,q,p;
INPUT({R,r,q},"Non-Conducting Sphere",
{"R =","r =","q ="},{"Radius of Sphere",
"Radial Point","Charge"});
IF r<R THEN
sa:=4*π*r^2;
p:=q/(4/3*π*r^3);
ef:=(p*r)/(3*8.85418781762ᴇ−12);
ELSE
sa:=4*π*R^2;
p:=q/(4/3*π*R^3);
ef:=(p*R^3)/(3*8.85418781762ᴇ−12*r^2);
END;
END;

// Plane
IF c==4 THEN
LOCAL A,q;
INPUT({A,q},"Elec. Field: Plane",
{"A =","q ="},{"Sheet Area","Charge"});
ef:=q/(2*8.85418781762ᴇ−12*A);
sa:=A;
END;

// Cylinder
IF c==5 THEN
LOCAL R,r,L,q,p;
INPUT({R,r,L,q},"Non-Conducting Sphere",
{"R =","r =","L =","q ="},{
"Radius of Cylinder",
"Radial Point",
"Length of Cylinder",
"Charge"});
IF r<R THEN
sa:=2*π*r*L;
p:=q/(π*r^2*L);
ef:=(p*r)/(2*8.85418781762ᴇ−12);
ELSE
sa:=2*π*R*L;
p:=q/(π*R^2);
ef:=(p*R^2)/(2*8.85418781762ᴇ−12*r);
END;
END;

flux:=ef*sa;
PRINT();
PRINT("Electric Field: "+ef);
PRINT("Electric Flux: "+flux);
RETURN({ef, flux});

END;


Eddie


This blog is property of Edward Shore.  2015

RPN HP 12C: Fibonacci and Lucas Sequences

  RPN HP 12C: Fibonacci and Lucas Sequences Golden Ratio, Formulas, and Sequences Let φ be the Golden Ratio: φ = (1 + √5) ÷ 2...