Курсовая работа: Технология строительства метрополитена
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
Draw;
{$R *.DFM}
procedure TForm1.rxDBLookupCombo1Change(Sender: TObject);
var
S: String;
begin
rxDBFilter1.Deactivate;
rxDBFilter1.Filter.Clear;
s:='Stuff = '+TableSTUFF.FieldByName('Code').AsString;
rxDBFilter1.Filter.Add(S);
rxDBFilter1.Activate;
end;
procedure TForm1.DBGrid1DblClick(Sender: TObject);
var
Mass, R_press, R_stretch, Puasson, PuassonP, R1, Rb, R, A, B: Double;
P0, P2: Double;
C1, C2: Double;
K0, K1, K2, K3, K4: Double;
L, L1: Double;
ALFA1, ALFA2: Double;
BETA, BETA1, BETA2: Double;
DELTA1, DELTA2: Double;
GAMMA1, GAMMA2: Double;
D1, D2: Double;
F: Double;
SIGMARS, SIGMARR, SIGMASS, SIGMASR: Double;
i: Integer;
Pkr, PkrOld: Double;
Eo, Ep, J: Double;
procedure Calc;
begin
C1 := R1/Rb;
C2 := R/R1;
F := (C2*C2-1)/(C1*C1-1)*(C2*C2-1)/(C1*C1-1)*
(C2*C2-1)/(C1*C1-1)*(1+B/A);
D2 := (C2*C2+1)*(C2*C2+1)*(C2*C2+1)/(Puasson+1);
D1 := (C1*C1-1)*(C1*C1-1)/(Puasson+1);
DELTA2 := C2*C2*(C2*C2+1);
DELTA1 := C2*C2*(3-C2*C2);
GAMMA2 := C2*C2*(2*C2*C2*C2*C2+C2*C2+1);
GAMMA1 := C2*C2*(3+C2*C2);
BETA := (3+R/Rb*R/Rb)/(3-R/Rb*R/Rb);
BETA2 := C2*C2*C2*C2*(C2*C2+1)-D2+F*(C1*C1+1+D1);
BETA1 := 3*C2*C2-1-D2+F*((3-C2*C2)*C1*C1*C1*C1+D1);
ALFA2 := C2*C2*(2+C2*C2+C2*C2*C2*C2)-
D2+F*(2*C1*C1*C1*C1+C1*C1+1+D1);
ALFA1 := 3*C2*C2+1+D2+F*((C1*C1+3)*C1*C1*C1*C1-D1);
K4 := (ALFA2*DELTA1-ALFA1*DELTA2)/(ALFA2*BETA1-ALFA1*BETA2);
K3 := (ALFA1*GAMMA2-ALFA2*GAMMA1)/(ALFA2*BETA1-ALFA1*BETA2);
K2 := (BETA2*DELTA1-BETA1*DELTA2)/(ALFA2*BETA1-ALFA1*BETA2);
K1 := (BETA1*GAMMA2-BETA2*GAMMA1)/(ALFA2*BETA1-ALFA1*BETA2);
L1 := 4*C2*C2*(C2*C2+1-BETA)-(K1+BETA*K2)*((C1*C1+1)*(C1*C1+1)
+4*C2*C2)+2*(K3+BETA*K4)*((C2*C2+1)*(C2*C2+1)-2);
L := (K1+BETA*K2)*(C1*C1+1)-(K3+BETA*K4);
K0 := 3*C2*C2/((1+B/A)*(C2*C2-1)/(C1*C1-1)*(2+C1*C1)+2*C2*C2+1);
end;
begin
with TableDATA do begin
Mass := FieldByName('Mass').AsFloat;
R_press := FieldByName('R_press').AsFloat;
R_stretch := FieldByName('R_stretch').AsFloat;
Puasson := FieldByName('Puasson').AsFloat;
R1 := FieldByName('R1').AsFloat;
Rb := FieldByName('Rb').AsFloat;
R := FieldByName('R').AsFloat;
A := FieldByName('A').AsFloat;
B := FieldByName('B').AsFloat;
end;
if RadioButton1.Checked then begin
Calc;
if TableDATA.FieldByName('Stuff').AsInteger = 0 {Железо-бетон} then begin
PLines[isP0,1] := (C1*C1-1)*Mass*R_press/2*C1*C1*K0*(1+B/A);
PLines[isP2,1] := (C1*C1-1)*(C1*C1-1)*
Mass*R_press/4*C1*C1*K0*(1+B/A);
PLines[isP0,2] := -(C1*C1-1)*Mass*R_stretch/2*C1*C1*K0*(1+B/A);
PLines[isP2,2] := (C1*C1-1)*(C1*C1-1)*
Mass*R_stretch/4*C1*C1*K0*(1+B/A);
PLines[isP0,4] := (C2*C2-1)*Mass*R_press/(2*C2*C2-K0*
(C2*C2+1));
PLines[isP2,4] := (C2*C2-1)*(C2*C2-1)*Mass*R_press/L1;
PLines[isP0,5] := -(C2*C2-1)*
Mass*R_stretch/(2*C2*C2-K0*(C2*C2+1));
PLines[isP2,5] := (C2*C2-1)*(C2*C2-1)*Mass*R_stretch/L1;
end
else begin {Чугун}
PLines[isP0,1] := (C1*C1-1)*Mass*R_press/2*C1*K0*(1+B/A);
PLines[isP2,1] := (C2*C2-1)*(C2*C2-1)*
Mass*R_press/4*C1*C1*K0*(1+B/A);
PLines[isP0,2] := -(C2*C2-1)*Mass*R_stretch/2*C1*K0*(1+B/A);
PLines[isP2,2] := (C1*C1-1)*(C1*C1-1)*
Mass*R_stretch/4*C1*C1*K0*(1+B/A);
PLines[isP0,4] := (C2*C2-1)*Mass*R_press/(2*C2*C2-K0*
(C2*C2+1));
PLines[isP2,4] := (C2*C2-1)*(C2*C2-1)*Mass*R_press/L1;
PLines[isP0,5] := -(C2*C2-1)*Mass*R_stretch/(2*C2*C2-K0*
(C2*C2+1));
PLines[isP2,5] := (C2*C2-1)*(C2*C2-1)*Mass*R_stretch/L1;
end;
DrawForm.ShowModal;
end
else if RadioButton2.Checked then begin
Calc;
P0 := StrToFloat(Edit1.Text);
P2 := StrToFloat(Edit2.Text);
SIGMARS := ABS(2*C1*C1/(C1*C1-1)*(1+B/A)*(P0*K0+2*P2*L/
(C1*C1-1)));
SIGMARR := ABS(2*C1*C1/(C1*C1-1)*(1+B/A)*(P0*K0-2*P2*L/
(C1*C1-1)));
SIGMASS := ABS(P0/(C2*C2-1)*(2*C2*C2-K0*(C2*C2+1))+P2*L1/
(C2*C2-1)*(C2*C2-1));
SIGMASR := ABS(P0/(C2*C2-1)*(2*C2*C2-K0*(C2*C2+1))-P2*L1/
(C2*C2-1)*(C2*C2-1));
if (SIGMARS>Mass*R_press) or (SIGMARR>Mass*R_stretch) or
(SIGMASS>Mass*R_press) or (SIGMASR>Mass*R_stretch)
then
MessageDlg('Несущая способность не
обеспечена',mtInformation,[mbOk],0)
else
MessageDlg('Несущая способность
обеспечена',mtInformation,[mbOk],0);
end
else begin
i:=1;
PkrOld :=0;
repeat
i := i+1;
Pkr := (i*i-1)*Eo*J/((1-Puasson)*(1-Puasson)*R*R*R)+Ep/(2*
(1+PuassonP))*((i+1)*(i+1)/(i*i*(i-1))+(i-1)*
(i-1)/(i*i*(i+1)*(3-4*PuassonP)));
if Pkr < PkrOld then PkrOld := Pkr else i:=0;
until i = 0;
P0 := StrToFloat(Edit1.Text);
if P0<=Pkr then
MessageDlg('Устойчивость обеспечена',mtInformation,[mbOk],0)
else
MessageDlg('Устойчивость не
обеспечена',mtInformation,[mbOk],0);
end;
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
Label2.Visible := False;
Label3.Visible := False;
Edit1.Visible := False;
Edit2.Visible := False;
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
Label2.Visible := True;
Label3.Visible := True;
Edit1.Visible := True;
Edit2.Visible := True;
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
Label2.Visible := True;
Label3.Visible := False;
Edit1.Visible := True;
Edit2.Visible := False;
end;
end.
unit Draw;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;
type
TDrawForm = class(TForm)
BitBtn1: TBitBtn;
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TPaintData = (isP0,isP2);
TDiagramArray = Array[TPaintData,1..5] of Double;
var
PLines : TDiagramArray;
DrawForm: TDrawForm;
implementation
{$R *.DFM}
procedure TDrawForm.FormActivate(Sender: TObject);
var
R: TRect;
MaxX, MinX: Double;
MaxY, MinY: Double;
Nx, Ny: Integer;
Kx, Ky: Double;
i: Byte;
PointMin, PointMax: Double;
procedure DrawLine(X0, k, b:Double);
begin
Canvas.MoveTo(R.Left+60+Round(Kx*X0),R.Bottom-30);
if k<0 then
Canvas.LineTo(R.Left+60,Round(R.Bottom - 33 -
(Ky*(b+(k*(10)/Kx)))))
else
Canvas.LineTo(R.Right-10,Round(R.Bottom - 33 -
(Ky*(-b+(k*((R.Right-R.Left-70)/Kx))))));
end;
begin
PLines[isP0,3] := 0;
PLines[isP2,3] := 0;
MaxX := 0.0;
MinX := 0.0;
MaxY := 0.0;
MinY := 0.0;
for i := 1 to 5 do begin
if PLines[isP0,i] > MaxX then MaxX := PLines[isP0,i];
if PLines[isP2,i] > MaxY then MaxY := PLines[isP2,i];
if PLines[isP0,i] < MinX then MinX := PLines[isP0,i];
if PLines[isP2,i] < MinY then MinY := PLines[isP2,i];
end;
if MaxX > 200 then Nx := 100 else Nx := 10;
MaxX := Round(MaxX/Nx)*Nx+Nx;
if MaxY > 200 then Ny := 100 else Ny := 10;
MaxY := Round(MaxY/Ny)*Ny+Ny;
with DrawForm do begin
Canvas.Pen.Color := clBlack;
R.Left := 10;
R.Top := 10;
R.Right := Width - 15;
R.Bottom := Height - 70;
Canvas.FrameRect(R);
Canvas.Brush.Color := clBtnFace;
Страницы: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12