Download presentation

Presentation is loading. Please wait.

Published bySara Bullock Modified over 2 years ago

1
FLYWHEEL CALCULATIONS The flywheel design is based on calculating the EXCESS ENERGY. This is achieved when then the CYCLE IS COMPLETE and when you click on the FORCES in the VIEW MENU. Each time you click on the FORCES item the procedure is activated. procedure TMainForm.MenuItem_ForcesClick(Sender: TObject); begin if ThecycleIsComplete(MenuItem_DesignEngineComponents) then CalculateForces(MeanForce,CutAng); end;

2
CalculateForces(MeanForce,CutAng) As you can see, this procedure returns the Mean Tangential Force and the cutting angles CutAng[1] to CutAng[5] or less (more than 5 cuts is not anticipated). These variables are local to the MAIN UNIT so if you want to use them in another unit you should carry their declarations to the INTERFACE section of this unit and your local unit should include “MAIN” in its uses clause. As a bonus the procedure also calculates the Global variable as well. So that’s it ! I’ve done it for you. Now if you are wondering how I did it then here is the algorithm :

3
procedure CalculateForces(var AverageTangentialForce:real; var cutpoint: CutArray); var i,j,cutnumber : Integer; MrW2,Theta,x,y,Sum,x1,x2,y1,y2,y0 : Real; n,k,m : integer; Cross,EndOfCurve,descending : Boolean; c,cb : carray; MinimumValue,mD2,mx,FlywheelMass,D : real; s : string; Volume,Dx : real; begin for i := 1 to 5 do begin c[i] := 0; cb[i] := 0; CutPoint[i] := ''; end; The local arrays are initialized

4
InputReciprocatingMass; i := 1; n := Trunc(NCyl); j := 72 div n; MrW2 := -ReciprocatingMass * sqr(EngineSpeed * PI / 30) * (Stroke/2)/1000; Theta := 0; while Theta <= 720 do begin x := Radian(Theta); y := Arcsin((1/CRRatio)*Sin(x)); GasForce[i] := Fg(Theta); InertiaForce[i] := MrW2 * (Cos(x) + (1/CRRatio) * Cos(2*x)); ResultantForce[i] := GasForce[i]+InertiaForce[i]; TangentialForce[i] := ResultantForce[i]*Sin(x+y)/Cos(y); Theta := Theta + 10; Inc(i); end; The reciprocating mass is calculated The forces are calculated. The Tangengial Forces will be used in our calculations

5
MinimumValue := 0; for i := 1 to j+1 do begin Sum := 0; for k := 1 to n do Sum := Sum + TangentialForce[i+(k-1)*j]; CrankTangentialForce[i] := Sum; if CrankTangentialForce[i]

6
i := 1; m := 1; if CrankTangentialForce[i]

7
if Cross then begin x1 := (i-2)*10; x2 := (i-1)*10; y1 := CrankTangentialForce[i-1]; y2 := CrankTangentialForce[i]; y0 := AverageTangentialForce; c[m] := x2 - ((y2-y0)/(y2-y1))*(x2-x1); str(c[m]:5:2,s); CutPoint[m] := s; inc(m); end; if i

8
if Cross then begin x1 := (i-2)*10; x2 := (i-1)*10; y1 := CrankTangentialForce[i-1]; y2 := CrankTangentialForce[i]; y0 := AverageTangentialForce; c[m] := x2 - ((y2-y0)/(y2-y1))*(x2-x1); str(c[m]:5:2,s); CutPoint[m] := s; inc(m); end; end else while i

9
if Cross then begin x1 := (i-2)*10; x2 := (i-1)*10; y1 := CrankTangentialForce[i-1]; y2 := CrankTangentialForce[i]; y0 := AverageTangentialForce; c[m] := x2 - ((y2-y0)/(y2-y1))*(x2-x1); str(c[m]:5:2,s); CutPoint[m] := s; inc(m); end; if i

10
if Cross then begin x1 := (i-2)*10; x2 := (i-1)*10; y1 := CrankTangentialForce[i-1]; y2 := CrankTangentialForce[i]; y0 := AverageTangentialForce; c[m] := x2 - ((y2-y0)/(y2-y1))*(x2-x1); str(c[m]:5:2,s); CutPoint[m] := s; inc(m); end; cutnumber := 0; for i := 1 to 5 do if c[i]>0 then begin cb[i] := Int(c[i]/10); inc(cutnumber); end; ExcessEnergy := Integrals(CrankTangentialForce,AverageTangentialForce,c,cb,j,cutnumber); end; The cutting angles of the average tangential force and the varying tangential force are calculated (continued) Each partial tangengial force and their starting and ending angles are transferred to the procedure INTEGRALS, which calculates each integral, compares them and returns the highest value

11
function Integrals(CTF:Forces;AVTF:real;c,cb:carray;numberofpoints,numberofcuts:integer):real; var ri :real; i,j,k,np,np1,np2 : integer; Integral : carray; Sum,LastTri : real; begin c[numberofcuts+1] := numberofpoints*10; cb[numberofcuts+1] := numberofpoints; np := numberofpoints; np2 := np-2; np1 := np-1; for i := 1 to numberofpoints+1 do CTF[i] := CTF[i]-AVTF; i := 1; ri := cb[i]; j := Trunc(ri); if j=0 then begin k := 1; Integral[k] := Abs(CTF[k]*c[k]/2); i := 2;

12
repeat inc(k); Integral[k] := Abs(CTF[i]*((i-1)*10-c[k-1])/2); Sum := CTF[i]; repeat inc(i); Sum := Sum + 2*CTF[i]; until i>=cb[k]; inc(i); Sum := Sum + CTF[i]; LastTri := CTF[i]*(c[k]-(i-1)*10)/2; Sum := Sum*5 + LastTri; Integral[k] := Integral[k] + Abs(Sum); inc(i); until k=numberofcuts+1; end;

13
if ((j>0) and (j

14
if j=np1 then begin end; Sum := 0; for i := 1 to numberofcuts+1 do if Integral[i]>Sum then Sum :=Integral[i]; Integrals := Sum; end;

Similar presentations

OK

1 HTML & teh internets. 2 Contents JavaScript CSS Goal: Integrating knowledge.

1 HTML & teh internets. 2 Contents JavaScript CSS Goal: Integrating knowledge.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on 500 mw turbo generators Ppt on two point perspective Extraocular muscles anatomy and physiology ppt on cells Cartoon magazine ppt online Ppt on business model of hul Ppt on synthesis and degradation of purines and pyrimidines of dna Ppt on network switching operator Full ppt on electron beam machining ppt Download ppt on cybercrime in india Ppt on life and works of william shakespeare