procedure
TForm1
.
RazrabGrafik(t:
extended
);
const
xo=
100
;
dds=
0.00001
;
var
fkv,fkn,FL,FL1,dFL,dPk,fkv1,fkn1 :
extended
;
Sl,Sp,Scr,F,deS:
extended
;
Iss,Isx:
integer
;
Sgr,Fvn,Tpr,Svl,Svp,Fun,Svsr,dFLgr:
extended
;
begin
Chart1
.
BottomAxis
.
Automatic :=
false
;
Chart1
.
BottomAxis
.
Maximum:=L;
Chart1
.
BottomAxis
.
Minimum:=
0
;
Chart1
.
BottomAxis
.
Title
.
Caption:=
'Äëèíà ãàëåðåè, ì'
;
Chart1
.
LeftAxis
.
Automatic :=
false
;
Chart1
.
LeftAxis
.
Title
.
Caption:=
'Âîäîíàñûùåííîñòü'
;
Chart1
.
LeftAxis
.
Maximum:=
1
;
Chart1
.
LeftAxis
.
Minimum:=
0
;
Chart1
.
RightAxis
.
Automatic :=
false
;
Chart1
.
RightAxis
.
Title
.
Caption:=
'Äàâëåíèå, ÌÏà'
;
Chart1
.
RightAxis
.
Maximum:=Pk;
Chart1
.
RightAxis
.
Minimum:=
0
;
Series1
.
clear;
Series2
.
clear;
Series3
.
clear;
Series4
.
clear;
Series5
.
clear;
Series7
.
clear;
Leveret(Svo,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
mXi[
0
]:=L;
mPi[
0
]:=
0
;
if
(Xfr<L)
then
begin
mSv[
0
]:=Svo;
mSv[
1
]:=Svo;
mXi[
1
]:=Xfr;
mPi[
1
]:=dPo*(L-Xfr);
mPi[
2
]:=dPo*(L-Xfr);
for
Iss:=
2
to
Ns
do
begin
Sv:=Svfr+(
1
-Svfr)*(Iss-
2
)/(Ns-
2
);
mSv[Iss]:=Sv;
Leveret(Sv+dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
Leveret(Sv-dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv1,fkn1,FL1);
dFL:=(FL-FL1)/(
2
*dds);
mXi[Iss]:=dFL*t*
86400
*Uo/m;
if
(Iss=
2
)
then
mPi[
2
]:=dPo*(L-Xfr)
else
mPi[Iss]:=mPi[Iss-
1
]+(mXi[Iss-
1
]-mXi[Iss])*Uo*Mu_v*
1000
/(k*(fkv+mu_v*fkn/mu_n));
end
end
else
begin
mSv[
0
]:=Svo;
Sl:=Svfr;
Sp:=
1
-Svo;
repeat
Scr:=
0.5
*(Sl+Sp);
Leveret(Scr+dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
Leveret(Scr-dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv1,fkn1,FL1);
dFL:=(FL-FL1)/(
2
*dds);
F:=L-dFL*t*
86400
*Uo/m;
if
(F>
0
)
then
Sp:=Scr
else
Sl:=Scr;
deS:=
abs
(Sp-Sl);
until
(deS<1e-
4
);
mSv[
0
]:=Scr;
for
Iss:=
1
to
Ns
do
begin
Sv:=Scr+(
1
-Scr)*Iss/Ns;
mSv[Iss]:=Sv;
Leveret(Sv+dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
Leveret(Sv-dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv1,fkn1,FL1);
dFL:=(FL-FL1)/(
2
*dds);
mXi[Iss]:=dFL*t*
86400
*Uo/m;
mPi[Iss]:=mPi[Iss-
1
]+(mXi[Iss-
1
]-mXi[Iss])*Uo*Mu_v*
1000
/(k*(fkv+mu_v*fkn/mu_n));
end
end
;
dPk:=Pk-mPi[Ns];
for
Iss:=Ns
downto
0
do
begin
Series7
.
AddXY(mXi[Iss],mSv[Iss],
''
,clTeeColor);
Series5
.
AddXY(mXi[Iss],dPk+mPi[Iss],
''
,clTeeColor);
Tpr:=L*m/(uo*dFLfr*
86400
);
Sl:=Svfr;
Sp:=
1
;
if
t>Tpr
then
begin
repeat
Svsr:=
0.5
*(Sl+Sp);
Leveret(Svsr,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
Leveret(Svsr+dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
Leveret(Svsr-dds,Svo,Sno,nv,nn,mu_v,mu_n,fkv1,fkn1,FL1);
dFL:=(FL-FL1)/(
2
*dds);
Fun:=dFL-m*L/(uo*t*
86400
);
if
(Fun>
0
)
then
Sl:=Svsr
else
Sp:=Svsr;
until
(
abs
(Fun)<dds);
Sgr:=Svsr;
Leveret(Sgr,Svo,Sno,nv,nn,mu_v,mu_n,fkv,fkn,FL);
Series8
.
AddXY(t,FL,
''
,clTeeColor);
end
;
end
;