SHARE
TWEET

Untitled

a guest May 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7.   Dialogs, StdCtrls, TeEngine, Series, ExtCtrls, TeeProcs, Chart;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     lbl3: TLabel;
  12.     edt2: TEdit;
  13.     lbl4: TLabel;
  14.     lbl5: TLabel;
  15.     lbl6: TLabel;
  16.     edt3: TEdit;
  17.     lbl9: TLabel;
  18.     edt5: TEdit;
  19.     lbl10: TLabel;
  20.     lbl11: TLabel;
  21.     lbl12: TLabel;
  22.     edt6: TEdit;
  23.     mmo1: TMemo;
  24.     mmo2: TMemo;
  25.     mmo3: TMemo;
  26.     lbl13: TLabel;
  27.     lbl14: TLabel;
  28.     lbl15: TLabel;
  29.     btn1: TButton;
  30.     lbl16: TLabel;
  31.     lbl17: TLabel;
  32.     lbl18: TLabel;
  33.     lbl19: TLabel;
  34.     edt7: TEdit;
  35.     edt8: TEdit;
  36.     cht1: TChart;
  37.     fstlnsrsSeries1: TFastLineSeries;
  38.     fstlnsrsSeries2: TFastLineSeries;
  39.     fstlnsrsSeries3: TFastLineSeries;
  40.     mmo4: TMemo;
  41.     procedure btn1Click(Sender: TObject);
  42.     procedure FormCreate(Sender: TObject);
  43.   private
  44.     { Private declarations }
  45.   public
  46.     { Public declarations }
  47.   end;
  48.  
  49. var
  50.  Form1: TForm1;
  51.  Tgor1,Txl1:Real;
  52. implementation
  53.  
  54. {$R *.dfm}
  55.  function func1(Txl2,Tst:Real):Real;
  56.  begin
  57.    Result:=(0.041/(0.002376*810*0.1472))*(Txl1-Txl2)+((54.9*0.549)/(2430*810*0.1472*0.002376))*(Tst-Txl2);
  58.  end;
  59.  function func2(Txl2,Tgor2,Tst:Real):Real;
  60.  begin
  61.    Result:=((54.9*0.549)/(903.7*2697*0.00015*1.7831))*(Txl2-Tst)+((52.536*1.736)/(903.7*2697*1.7831*0.00015))*(Tgor2-Tst);
  62.  end;
  63.  function func3(Tgor2,Tst:Real):Real;
  64.  begin
  65.    Result:=(0.04/(0.972*0.011*0.132))*(Tgor1-Tgor2)+((52.536*1.736)/(1009*0.972*0.011*0.132))*(Tst-Tgor2);
  66.  end;
  67.  
  68. procedure TForm1.btn1Click(Sender: TObject);
  69.   var
  70.    h,Tgor2i,Txl2i,Tsti,Tgor2i_pred,Txl2i_pred,Tsti_pred:Real;
  71.    i,n:Integer;
  72.    spisok3,spisok4,spisok5:TStringList;
  73. begin
  74.  fstlnsrsSeries1.Clear;
  75.  fstlnsrsSeries2.Clear;
  76.  fstlnsrsSeries3.Clear;
  77. Form1.mmo1.Clear;
  78. Form1.mmo2.Clear;
  79. Form1.mmo3.Clear;
  80. Form1.mmo4.Clear;
  81. spisok3:=TStringList.Create;
  82. spisok4:=TStringList.Create;
  83. spisok5:=TStringList.Create;
  84.   Tgor1:=StrToFloat(Form1.edt7.Text);
  85.   Tgor2i:=StrToFloat(Form1.edt2.Text);
  86.   Txl1:=StrToFloat(Form1.edt8.Text);
  87.   Txl2i:=StrToFloat(Form1.edt3.Text);
  88.   Tsti:=StrToFloat(Form1.edt6.Text);
  89.   h:=StrToFloat(Form1.edt5.Text);
  90.  
  91.   for i:=1 to 3 do begin
  92.   n:=0;
  93.   repeat
  94.    Tgor2i_pred:=Tgor2i;
  95.    Txl2i_pred:=Txl2i;
  96.    Tsti_pred:=Tsti;
  97.    Txl2i:=Txl2i+h*func1(Txl2i,Tsti);
  98.    Tsti:=Tsti+h*func2(Txl2i,Tgor2i,Tsti);
  99.    Tgor2i:=Tgor2i+h*func3(Tgor2i,Tsti);
  100.    spisok3.Add('Tgor2i='+FloatToStr(Tgor2i));
  101.    spisok4.Add('Txl2i='+FloatToStr(Txl2i));
  102.    spisok5.Add('Tsti='+FloatToStr(Tsti));
  103.     fstlnsrsSeries1.Add(Txl2i);
  104.     fstlnsrsSeries2.Add(Tgor2i);
  105.     fstlnsrsSeries3.Add(Tsti);
  106.     inc(n);
  107.     until ((Abs(Tgor2i_pred-Tgor2i)<0.00001) and (Abs(Txl2i_pred-Txl2i)<0.00001) and (Abs(Tsti_pred-Tsti)<0.00001));
  108.      Tgor1:=Tgor1+5;
  109.      Form1.mmo4.Lines.Add('Âðåìÿ âûõîäà ('+IntToStr(i)+'-ñòàöèîíàð):'+FloatToStr(h*n));
  110.   end;
  111.      Form1.mmo1.Lines:=spisok4;
  112.      Form1.mmo2.Lines:=spisok3;
  113.      Form1.mmo3.Lines:=spisok5;
  114. end;
  115.  
  116. procedure TForm1.FormCreate(Sender: TObject);
  117. begin
  118.  mmo1.Clear;
  119.  mmo2.Clear;
  120.  mmo3.Clear;
  121.  mmo4.Clear;
  122.  
  123. end;
  124.  
  125. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top