unit
Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TeEngine, Series, ExtCtrls, TeeProcs, Chart,Math;
type
TForm1 =
class
(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label3: TLabel;
Button1: TButton;
Label4: TLabel;
Label5: TLabel;
Edit4: TEdit;
Label6: TLabel;
Graphic: TChart;
Series1: TLineSeries;
Series2: TLineSeries;
Memo1: TMemo;
Edit5: TEdit;
Label2: TLabel;
Label7: TLabel;
Button2: TButton;
Edit6: TEdit;
Edit7: TEdit;
Label8: TLabel;
procedure
Button1Click(Sender: TObject);
private
function
Q(t:
real
):
real
;
public
end
;
const
Ro2=
260
;
const
Rco2=
189
;
const
Temp=
293
;
const
dPo2=
20
;
const
dt=
10
;
var
Form1: TForm1;
v:
real
;
P,Po2,Pco2:
real
;
Mo2,Mco2:
real
;
Kd:
real
;
Proc:
real
;
u,z,dPco2:
real
;
Q0:
real
;
implementation
{$R *.dfm}
procedure
TForm1
.
Button1Click(Sender: TObject);
begin
v:= StrToFloat(Edit1
.
Text);
P:= StrToFloat(Edit3
.
Text);
Proc:= StrToFloat(Edit2
.
Text);
Kd:= StrToFloat(Edit5
.
Text);
Q0:= StrToFloat(Edit6
.
Text);
Mo2:=(
0.87
-
0.2
*Kd)*exp(-
4
*ln(
10
));
Mco2:=(
1.2
-
0.275
*Kd)*Kd*exp(-
4
*ln(
10
));
Po2:=Proc*P/
100
;
Pco2:=(
100
-Proc)*P/
100
;
Z:=-Mo2*Q;
Z:=(v/(Ro2*Temp)*(dPo2/dt)) ;
u:=Mco2*Q;
u:=(v/(Rco2*Temp)*(dPco2/dt)) ;
Edit7
.
Text:=FloatToStr(Pco2);
end
;
end
.