Post Reply 
(71B) Automotive Cylinders: Calculating Displacement and Piston Speed
12-23-2016, 07:16 PM
Post: #1
(71B) Automotive Cylinders: Calculating Displacement and Piston Speed
Automotive Cylinders: Calculating Displacement and Piston Speed

The program supplies default values which can be accepted or changed.

Program AUTOCYN
217 Bytes, 12/22/2016

Code:
10 DESTROY N,B,S,R,E,P
15 INPUT “# CYLINDERS:”,  “6”; N
20 INPUT “BORE (IN):”, “4”; B
25 INPUT “STROKE (IN):”, “4”; S
30 E = PI/4 * B^2 * S * N
35 INPUT “RPM:”; R
40 P = S * R / 6
45 DISP “ENGINE DISPLACEMENT =” @ WAIT 1
50 DISP E; “ IN^3” @ PAUSE
55 DISP “PISTON SPEED =” @ WAIT 1
60 DIPS P; “FPM”

Example 1:
N = 6 cylinders, B = 4 in, S = 4 in, RPM = 3500
Output: E ≈ 301.59290 in^3, P ≈ 2333.33333 FPM

Example 2:
N = 6 cylinders, B = 4 in, S = 3 in, RPM = 4500
Output: E ≈ 226.19467 in^3, P = 2250 FPM
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)