procedure TForm1.Button1Click(Sender: TObject);
var
I,J,N,M,K0,E,Tz,T0,G,SH:integer;
R, L, H, TAU:real;
TETA:array of array of Extended;
begin
SH:=0;
N:=200;
M:=100000;
G:=100;
K0:=500000000;
E:=126000;
R:=8.34;
Tz:=1480;
T0:=315;
L:=0.1;
H:=0.1;
TAU:=0.0001;
SetLength(TETA, N+1,M+1);
TETA[0,0]:=1;
for J:=1 to M do
begin
TETA[0,J]:=1;
end;
for i:=1 to N do
begin
teta[i,0]:=0;
end;
for J:=0 to M-1 do
begin
for I:=1 to N-1 do
begin
TETA[I,J+1]:=TETA[I,J]*(1-(2*TAU)/(SQR(H))+TAU/H -K0*TAU*EXP(-E/(R*(T0+TETA[I,J]*(Tz-T0)))))+TETA[I+1,J]*(TAU/SQR(H)-TAU/H)+TETA[I-1,J]*(TAU/SQR(H));
end;
end;
J:=1;
repeat
for i:=1 to N do
begin
SH:=SH+1;
if SH>=10 then
begin
//Memo1.Lines.Add(FloatToStr(teta[N,j+1]));
memo1.Lines.Add('TETA('+INTTOSTR(I)+','+INTTOSTR(J+1)+') = '+FLOATTOSTR(TETA[I,J+1]));
SH:=0;
end;
end;
J:=J+G;
until j>M-1;
end;
end.