[go: up one dir, main page]

Showing posts with label applications. Show all posts
Showing posts with label applications. Show all posts

Saturday, October 16, 2021

Swiss Micros DM41X: Applications

Swiss Micros DM41X: Applications





Swiss Micros DM41X Program:  Euclid Algorithm


Registers:

R01:  A

R02: B

R03:  C  (used)


Finds the GCD of A and B, where A and B are positive integers and A > B.


01 LBL^T EUCLID

02 ^T GCD A>B

03 AVIEW

04 PSE

05 ^T A?

06 PROMPT

07 STO 01

08 ^T B?

09 PROMPT

10 STO 02

11 LBL 00

12 RCL 01

13 ENTER

14 ENTER

15 RCL 02

16 /

17 LASTX

18 X<>Y

19 INT

20 *

21 - 

22 STO 03

23 X=0?

24 GTO 01

25 RCL 02

26 STO 01

27 X<>Y

28 STO 02

29 GTO 00

30 LBL 01

31 ^T GCD=

32 ARCL 02

33 AVIEW

34 END


Examples:


A = 100, B = 20, GCD = 20

A = 78, B =24, GCD = 6


Swiss Micros DM41X Program: Fan Laws 


The program will calculate RPM_new (Revolutions per Minute), SP_new (Static Pressure), and BHP_new (Brake Horsepower).  


Inputs:

CFM_old:  Cubic Feet of Minute - old

CFM_new:  Cubic Feet of Minute - new

RPM_old:  Revolutions per Minute - old

SP_old:  Static Pressure - old

BHP_old:  Brake Horsepower - old


Outputs:

RPM_new

SP_new

BHP_new


01 LBL^T FANLAWS

02 CLA

03 ^T CFM.OLD?

04 PROMPT

05 STO 01

06 ^T CFM.NEW?

07 PROMPT

08 STO 02

09 X<>Y

10 /

11 STO 04

12 STO 06

13 ST* 06

14 STO 08

15 ST* 08

16 ST* 08

17 ^T RPM.OLD?

18 PROMPT

19 STO 03

20 ST* 04

21 ^T SP.OLD

22 PROMPT

23 STO 05

24 ST* 06

25 ^T BHP.OLD?

26 PROMPT

27 STO 07

28 ST* 08

29 ^T RPM.NEW=

30 ARCL 04

31 AVIEW

32 STOP

33 ^T SP.NEW=

34 ARCL 06

35 AVIEW

36 STOP

37 ^T BHP.NEW=

38 ARCL 08

39 AVIEW

40 END


Variables:


R01 = CFM.OLD

R02 = CFM.NEW

R03 = RPM.OLD

R04 = RPM.NEW

R05 = SP.OLD

R06 = SP.NEW

R07 = BHP.OLD

R08 = BHP.NEW


The program uses a lot of storage arithmetic.  


Example


Inputs:

CFM.OLD:  1250 CFM

CFM.NEW: 1600 CFM

RPM.OLD:  840 RPM

SP.OLD: 4 in

BHP.OLD: 7 BHP


Results:

RPM.NEW: 1075.2 RPM

SP.NEW: 6.5536 in

BHP.OLD:  14.680064 BHP


Source:

Calculated Industries "Sheet Metal/HVAC Pro Calc User's Guide" 2021


Swiss Micros DM41X Program: Johnson-Nyquist Noise Analysis


Equations Used:


Power (in Watts):


P = kb * T * Δf


RMS Voltage (in Volts):


v_n = √(4 * R * kb * T * Δf) = √(4 * R * P)


Current (in Amps):


i_n = √((4 * T * kb * Δf / R) = v_n / R


Inputs:


T = temperature in Kelvin  (°C + 273.15)

Δf = bandwidth, difference of frequencies in Hz

R = resistance in ohms (Ω)


Constants:  Boltzmann's Constant

kb ≈ 1.380649 * 10^-23 J/K


Program:


01 LBL^T NOISE

02 ^T TEMP? <K>

03 PROMPT

04 ^T BANDWIDTH?

05 PROMPT

06 *

07 1.308649E-23

08 *

09 ^T POW=

10 ARCL X

11 AVIEW

12 STOP

13 ^T R?

14 PROMPT

15 *

16 LASTX

17 X<>Y

18 4

19 *

20 SQRT

21 ^T V=

22 ARCL X

23 AVIEW

24 STOP

25 X<>Y

26 /

27 ^T I=

28 ARCL X

29 AVIEW

30 END


Example:


Temperature:  299.68 K

Bandwidth:  10,500 Hz

Resistance:  1375 Ω


Results:


Power:  4.3444E-17 W

Volts:  4.8882E-7 V

Current:  3.5550E-10 A


"Johnson-Nyquist Noise" Wikipedia.  Retrieved February 15, 2015 https://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise




Eddie


All original content copyright, © 2011-2021.  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 4, 2012

Applications and Programming: Ellipses

The following program works with several properties with ellipses. The general equation for an ellipse with center (x0, y0) is:

(x - x0)^2 / a^2 + (y -y0)^2 / b^2 = 1

For today's blog, I will center the ellipse at the origin (0,0).


With a and b as the length of the semi-axes:

* min(a,b) is the length of the semi-minor axis. min is the Minimum function, the least of a and b.
* max(a,b) is the length of the semi-major axis. max is the Maximum function, the greater of a and b.
* The eccentricity of the ellipse is e = √ (1 - [min(a,b) / max(a,b)]^2). In this sense, e is not the constant 2.7182818285... . If e = 0, then the ellipse is actually a circle. Further more, you can determine where the foci are, which is the distance e * max(a,b) along the semi-major axis.
* The area of an ellipse is easy enough: A = π a b
* The circumference is a different story. A good estimate, suggest by the NCEES, if a and b are close together is C ≈ 2 π √ ( [a^2 - b^2] / 2)

Finding the true circumference will require some calculus. Let the ellipse be defined by the parametric equations:

x(t) = a cos t
y(t) = b sin t
With 0 ≤ t ≤ 2 π

The arc length of a parametric equation is

∫ ( √ ( (dx/dt)^2 + (dy/dt)^2 ) dt, t0, t1)

Which means that the true circumference of an ellipse is

∫ ( √ ( a^2 sin(t)^2 + b^2 cos(t)^2 ) dt, 0, 2 π )

Any calculator with integration can handle this.

The ELLIPSE Program, TI-84+, 184 bytes

The following program will:
1. Prompt for a and b. (A, B)
2. Calculate eccentricity (E).
3. Calculate area (A).
4. Calculate circumference (C).
5. Draw the ellipse. The program leaves the user on the graph screen. The ellipse can be traced and used for further analysis if desired.


ELLIPSE - TI-84+

: Param
: Radian
: Disp "X^2/A^2+Y^2/B^2 =1"
: Prompt A,B
: "A cos(T)"→X1T
: "B sin(T)" →Y1T
: FnOff
: PlotsOff
: FnOn 1
: 0 →Tmin
: 2 π →Tmax
: π / 128 →Tstep
: √(1-(min(A,B)/max(A,B))² → E
: π A B → R
: fnInt(√(A² sin(T)² + B² cos(T)² , T, 0, 2 π) → C
: Disp "ECC.=", E
: Pause
: Disp "AREA=", R
: Pause
: Disp "CIRC.=",C
: Pause
: ZoomFit


Here is the ELLIPSE program executed with A=2 and B=3:

I thank you once again. Thank you to the followers of my blog, love the comments, I appreciate it.

Until next time,

Eddie


This blog is property of Edward Shore. © 2012

Saturday, July 14, 2012

Programs for HP 48S and What's Coming Up

HP 48: Law of Sines and Cosines, Quadratic Formula, and Cubic Formula.

Hi everyone! Recently, a poster on the MoHPC HP Calculator Forum asked for programs for solving triangles and finding roots for polynomials. (link here)

I will repost the programs here. They have been done with the HP 48S.

Law of Sines:

sin(θ1)/S1 = sin(θ2)/S2. Apply this to any of the two sides and their corresponding angels.

θ which can be typed by pressing:
HP 48S: [alpha] [right shift] (F)
HP 48G: [alpha] [right shift] (F)
HP 50g: [alpha] [right shift] (T)

LAWSIN:

<< 'SIN(θ1)/S1=SIN(θ2)/S2' STEQ 30 MENU>>

Law of Cosines:

A^2=B^2+C^2-2BC cos θ

LAWCOS:

<< 'SQ(A)=SQ(B)+SQ(C)-2*B*C*COS(θ)' STEQ 30 MENU>>

30 MENU brings up the calculator's solver using whatever is stored in STEQ.

QD: (Quadratic Formula) - Credit goes to the document "1 Minute Marvels" by Wldoek Mier-Jedrzejowicz and Richard Nelson (They have this program named 'quad')

Input:

3: A
2: B
1: C

Output:

2: root 1
1: root 2

<< 3 PICK / SWAP ROT -2 * / DUP SQ ROT - √ + LASTARG - >>

SQRT: Square Root

CU: Cubic Formula Uses the program QD above. This program finds the roots of AX^3+BX^2+CX+D=0

Input:
4: A
3: B
2: C
1: D

Output:
3: root 1
2: root 2
1: root 1

Program:

<< → A B C D
<<
C 3 A * / B SQ 9 A SQ * / - 'Q' STO
C B * A SQ / 3 D * A / - 6 / B 3 ^ 27 A 3 ^ * / - 'R' STO
R Q 3 ^ R SQ + √ + 3 XROOT 'S' STO
R Q 3 ^ R SQ + √ - 3 XROOT 'T' STO
S T + B 3 A * / - 'X' STO
X
B A X * +
C B X * + A X SQ * +
QD
{Q,R,S,T,X} PURGE >> >>

What is Coming Up

Coming in August, I will do a short series which I will use a graphing calculator with programming capabilities, most likely the TI-84 Plus, to demonstrate how programming is used to assist in mathematical applications: including finding the amount of miles between two places, projectile motion, and random walks.

If you get a chance, check out the Math/Maths Podcast. Link: Pulse Project

Until then,

Eddie


This blog is property of Edward Shore. © 2012

Spotlight: Calculated Industries QR Calc

Spotlight: Calculated Industries QR Calc <Title> Quick Facts Model: 3375 Name: QR Calc Company: Calculated Industries ...