📄 gas.pas
字号:
unit Gas;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons;
type
TGasForm = class(TForm)
BOKButton: TBitBtn;
BCancelButton: TBitBtn;
CoalLabel: TLabel;
CoalCo2Label: TLabel;
CoalCO2Edit: TEdit;
CoalCoLabel: TLabel;
CoalCOEdit: TEdit;
CoalN2Label: TLabel;
CoalN2Edit: TEdit;
CoalO2Label: TLabel;
CoalO2Edit: TEdit;
CoalH2Label: TLabel;
CoalH2Edit: TEdit;
CoalCh4Label: TLabel;
CoalCh4Edit: TEdit;
CoalCmHnLabel: TLabel;
CoalCmHnEdit: TEdit;
CoalTmLabel: TLabel;
CoalTmEdit: TEdit;
FumeLabel: TLabel;
FumeCo2Label: TLabel;
FumeCo2Edit: TEdit;
FumeN2Label: TLabel;
FumeN2Edit: TEdit;
FumeO2Label: TLabel;
FumeO2Edit: TEdit;
FumeCH4Label: TLabel;
FumeCH4Edit: TEdit;
FumeCOLabel: TLabel;
FumeCOEdit: TEdit;
CokeCoalLabel: TLabel;
CokeCoalCo2LabelLabel: TLabel;
CokeCoalCoLabel: TLabel;
CokeCoalN2Label: TLabel;
CokeCoalO2Label: TLabel;
CokeCoalH2Label: TLabel;
CokeCoalH2Labell: TLabel;
CokeCoalCmHnLabel: TLabel;
CokeCoalCO2Edit: TEdit;
CokeCoalCOEdit: TEdit;
CokeCoalN2Edit: TEdit;
CokeCoalO2Edit: TEdit;
CokeCoalH2Edit: TEdit;
CokeCoalCh4Edit: TEdit;
CokeCoalCmHnEdit: TEdit;
Label1: TLabel;
CokeCoalFactorEdit: TEdit;
procedure FormCreate(Sender: TObject);
procedure BOKButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
GasForm: TGasForm;
implementation
uses Declare,Balance;
{$R *.dfm}
procedure TGasForm.FormCreate(Sender: TObject);
begin
CoalCO2Edit.Text := FloatToStr(SESystemElement.co2_coal[1]);
CoalCOEdit.Text := FloatToStr(SESystemElement.co_coal[1]);
CoalN2Edit.Text := FloatToStr(SESystemElement.n2_coal[1]);
CoalO2Edit.Text := FloatToStr(SESystemElement.o2_coal[1]);
CoalH2Edit.Text := FloatToStr(SESystemElement.h2_coal[1]);
CoalCH4Edit.Text := FloatToStr(SESystemElement.ch4_coal[1]);
CoalCmHnEdit.Text := FloatToStr(SESystemElement.cmhn_coal[1]);
CoalTmEdit.Text := FloatToStr(SESystemElement.tm_coal);
CokeCoalCO2Edit.Text := FloatToStr(SESystemElement.co2_cokecoal);
CokeCoalCOEdit.Text := FloatToStr(SESystemElement.co_cokecoal);
CokeCoalN2Edit.Text := FloatToStr(SESystemElement.n2_cokecoal);
CokeCoalO2Edit.Text := FloatToStr(SESystemElement.o2_cokecoal);
CokeCoalH2Edit.Text := FloatToStr(SESystemElement.h2_cokecoal);
CokeCoalCH4Edit.Text := FloatToStr(SESystemElement.ch4_cokecoal);
CokeCoalCmHnEdit.Text := FloatToStr(SESystemElement.cmhn_cokecoal);
CokeCoalFactorEdit.Text := FloatToStr(SESystemElement.factor_cokecoal);
FumeCO2Edit.Text := FloatToStr(SESystemElement.co2_fume[1]);
FumeN2Edit.Text := FloatToStr(SESystemElement.n2_fume[1]);
FumeO2Edit.Text := FloatToStr(SESystemElement.o2_fume[1]);
FumeCH4Edit.Text := FloatToStr(SESystemElement.ch4_fume[1]);
FumeCOEdit.Text := FloatToStr(SESystemElement.co_fume[1]);
end;
procedure TGasForm.BOKButtonClick(Sender: TObject);
var WaterofAir,a,bw,log,V0,Vns,all:Real;
begin
SESystemElement.co2_coal[1]:= StrToFloat(CoalCO2Edit.Text);
SESystemElement.co_coal[1]:= StrToFloat(CoalCOEdit.Text);
SESystemElement.n2_coal[1]:= StrToFloat(CoalN2Edit.Text);
SESystemElement.o2_coal[1]:= StrToFloat(CoalO2Edit.Text);
SESystemElement.h2_coal[1]:= StrToFloat(CoalH2Edit.Text);
SESystemElement.ch4_coal[1]:= StrToFloat(CoalCH4Edit.Text);
SESystemElement.cmhn_coal[1]:= StrToFloat(CoalCmHnEdit.Text);
SESystemElement.tm_coal := StrToFloat(CoalTmEdit.Text);
SESystemElement.co2_cokecoal:= StrToFloat(CokeCoalCO2Edit.Text);
SESystemElement.co_cokecoal:= StrToFloat(CokeCoalCOEdit.Text);
SESystemElement.n2_cokecoal:= StrToFloat(CokeCoalN2Edit.Text);
SESystemElement.o2_cokecoal:= StrToFloat(CokeCoalO2Edit.Text);
SESystemElement.h2_cokecoal:= StrToFloat(CokeCoalH2Edit.Text);
SESystemElement.ch4_cokecoal:= StrToFloat(CokeCoalCH4Edit.Text);
SESystemElement.cmhn_cokecoal:= StrToFloat(CokeCoalCmHnEdit.Text);
SESystemElement.factor_cokecoal := StrToFloat(CokeCoalFactorEdit.Text);
BalanceForm.BalanceMemo.Lines.Add('混合前煤气成分(%,温度:℃)');
BalanceForm.BalanceMemo.Lines.Add('干成分');
BalanceForm.BalanceMemo.Lines.Add('CO2:'+FloatToStr(SESystemElement.co2_coal[1])+','+
'CO:'+FloatToStr(SESystemElement.co_coal[1])+','+
'N2:'+FloatToStr(SESystemElement.n2_coal[1])+','+
'O2:'+FloatToStr(SESystemElement.o2_coal[1])+','+
'H2:'+FloatToStr(SESystemElement.h2_coal[1])+','+
'CH4:'+FloatToStr(SESystemElement.ch4_coal[1])+','+
'CmHn:'+FloatToStr(SESystemElement.cmhn_coal[1])+','+
'煤气温度Tm:'+FloatToStr(SESystemElement.tm_coal));
BalanceForm.BalanceMemo.Lines.Add('焦炉煤气成分(%)');
BalanceForm.BalanceMemo.Lines.Add('干成分');
BalanceForm.BalanceMemo.Lines.Add('CO2:'+FloatToStr(SESystemElement.co2_cokecoal)+','+
'CO:'+FloatToStr(SESystemElement.co_cokecoal)+','+
'N2:'+FloatToStr(SESystemElement.n2_cokecoal)+','+
'O2:'+FloatToStr(SESystemElement.o2_cokecoal)+','+
'H2:'+FloatToStr(SESystemElement.h2_cokecoal)+','+
'CH4:'+FloatToStr(SESystemElement.ch4_cokecoal)+','+
'CmHn:'+FloatToStr(SESystemElement.cmhn_cokecoal)+','+
'高炉煤气与焦炉煤气的参混比例:'+FloatToStr(SESystemElement.factor_cokecoal));
SESystemElement.co2_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.co2_coal[1]/100 +SESystemElement.co2_cokecoal/100;
SESystemElement.co_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.co_coal[1]/100 +SESystemElement.co_cokecoal/100;
SESystemElement.n2_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.n2_coal[1]/100 +SESystemElement.n2_cokecoal/100;
SESystemElement.o2_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.o2_coal[1]/100 +SESystemElement.o2_cokecoal/100;
SESystemElement.h2_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.h2_coal[1]/100 +SESystemElement.h2_cokecoal/100;
SESystemElement.ch4_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.ch4_coal[1]/100 +SESystemElement.ch4_cokecoal/100;
SESystemElement.cmhn_coal[1]:=SESystemElement.factor_cokecoal*SESystemElement.cmhn_coal[1]/100 +SESystemElement.cmhn_cokecoal/100;
all:=SESystemElement.co2_coal[1]+SESystemElement.co_coal[1]+SESystemElement.n2_coal[1]+
SESystemElement.o2_coal[1]+SESystemElement.h2_coal[1]+SESystemElement.ch4_coal[1]+
SESystemElement.cmhn_coal[1];
SESystemElement.co2_coal[1]:=int((SESystemElement.co2_coal[1]*100/all)*100)/100;
SESystemElement.co_coal[1]:=int((SESystemElement.co_coal[1]*100/all)*100)/100;
SESystemElement.n2_coal[1]:=int((SESystemElement.n2_coal[1]*100/all)*100)/100;
SESystemElement.o2_coal[1]:=int((SESystemElement.o2_coal[1]*100/all)*100)/100;
SESystemElement.h2_coal[1]:=int((SESystemElement.h2_coal[1]*100/all)*100)/100;
SESystemElement.ch4_coal[1]:=int((SESystemElement.ch4_coal[1]*100/all)*100)/100;
SESystemElement.cmhn_coal[1]:=int((SESystemElement.cmhn_coal[1]*100/all)*100)/100;
WaterofAir:= int((DryAirtoHumidityAir(SESystemElement.tm_coal))*100)/100;
BalanceForm.BalanceMemo.Lines.Add('干空气中的含水量:'+FloatToStr(WaterofAir));
SESystemElement.co2_coal[2]:=int((SESystemElement.co2_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.co_coal[2]:=int((SESystemElement.co_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.n2_coal[2]:=int((SESystemElement.n2_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.o2_coal[2]:=int((SESystemElement.o2_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.h2_coal[2]:=int((SESystemElement.h2_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.ch4_coal[2]:=int((SESystemElement.ch4_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.cmhn_coal[2]:=int((SESystemElement.cmhn_coal[1]*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.h2o_coal:=int((0.124*WaterofAir*100/(100+0.124*WaterofAir))*100)/100;
SESystemElement.co2_fume[1]:= StrToFloat(FumeCO2Edit.Text);
SESystemElement.n2_fume[1]:= StrToFloat(FumeN2Edit.Text);
SESystemElement.o2_fume[1]:= StrToFloat(FumeO2Edit.Text);
SESystemElement.ch4_fume[1]:= StrToFloat(FumeCH4Edit.Text);
SESystemElement.co_fume[1]:= StrToFloat(FumeCOEdit.Text);
a:=int((AirExpendCoefficient(SESystemElement.o2_fume[1],SESystemElement.co_fume[1],
0,SESystemElement.ch4_fume[1],SESystemElement.n2_fume[1],
SESystemElement.n2_coal[2],SESystemElement.co2_fume[1],
SESystemElement.co2_coal[2],SESystemElement.co_coal[2],
SESystemElement.ch4_coal[2],2,SESystemElement.cmhn_coal[2],0))*100)/100;
BalanceForm.BalanceMemo.Lines.Add('空气消耗系数:'+FloatToStr(a));
bw:=int((IncompleteComparecomplete(a,SESystemElement.co_fume[1],0,
SESystemElement.ch4_fume[1],SESystemElement.o2_fume[1]))*100)/100;
BalanceForm.BalanceMemo.Lines.Add('(Vn)不/(Vn)完:'+FloatToStr(bw));
Log:=int((TheoryDryAirQ(SESystemElement.h2_coal[2],SESystemElement.co_coal[2],
SESystemElement.ch4_coal[2],2,4,SESystemElement.cmhn_coal[2],
0,SESystemElement.o2_coal[2]))*100)/100;
BalanceForm.BalanceMemo.Lines.Add('理论干空气量(m^3/m^3):'+FloatToStr(Log));
V0:=int((TheoryHumidityFumeQ(SESystemElement.co_coal[2],SESystemElement.ch4_coal[2],
2,4,SESystemElement.cmhn_coal[2],SESystemElement.co2_coal[2],
SESystemElement.h2_coal[2],0,SESystemElement.n2_coal[2],
SESystemElement.h2_coal[2],Log))*100)/100;
BalanceForm.BalanceMemo.Lines.Add('理论湿烟气量(m^3/m^3):'+FloatToStr(V0));
Vns:=int((FactHumidityFumeQ(V0,a,WaterofAir,Log))*100)/100;
BalanceForm.BalanceMemo.Lines.Add('实际湿烟气量(m^3/m^3):'+FloatToStr(Vns));
SESystemElement.h2o_fume:= int(( (0.01*(2*SESystemElement.ch4_coal[2]+
SESystemElement.h2_coal[2]+2*
SESystemElement.cmhn_coal[2]+0+SESystemElement.h2o_coal)
+0.00124*WaterofAir*a*Log/bw/Vns)*100 )*100)/100;
SESystemElement.co2_fume[2]:=int((SESystemElement.co2_fume[1]*(100-SESystemElement.h2o_fume)/100)*100)/100;
SESystemElement.n2_fume[2]:=int((SESystemElement.n2_fume[1]*(100-SESystemElement.h2o_fume)/100)*100)/100;
SESystemElement.o2_fume[2]:=int((SESystemElement.o2_fume[1]*(100-SESystemElement.h2o_fume)/100)*100)/100;
SESystemElement.ch4_fume[2]:=int((SESystemElement.ch4_fume[1]*(100-SESystemElement.h2o_fume)/100)*100)/100;
SESystemElement.co_fume[2]:=int((SESystemElement.co_fume[1]*(100-SESystemElement.h2o_fume)/100)*100)/100;
BalanceForm.BalanceMemo.Lines.Add('混合后煤气成分(%,温度:℃)');
BalanceForm.BalanceMemo.Lines.Add('干成分');
BalanceForm.BalanceMemo.Lines.Add('CO2:'+FloatToStr(SESystemElement.co2_coal[1])+','+
'CO:'+FloatToStr(SESystemElement.co_coal[1])+','+
'N2:'+FloatToStr(SESystemElement.n2_coal[1])+','+
'O2:'+FloatToStr(SESystemElement.o2_coal[1])+','+
'H2:'+FloatToStr(SESystemElement.h2_coal[1])+','+
'CH4:'+FloatToStr(SESystemElement.ch4_coal[1])+','+
'CmHn:'+FloatToStr(SESystemElement.cmhn_coal[1])+','+
'煤气温度Tm:'+FloatToStr(SESystemElement.tm_coal));
BalanceForm.BalanceMemo.Lines.Add('湿成分');
BalanceForm.BalanceMemo.Lines.Add( 'CO2:'+FloatToStr(SESystemElement.co2_coal[2])+','+
'CO:'+FloatToStr(SESystemElement.co_coal[2])+','+
'N2:'+FloatToStr(SESystemElement.n2_coal[2])+','+
'O2:'+FloatToStr(SESystemElement.o2_coal[2])+','+
'H2:'+FloatToStr(SESystemElement.h2_coal[2])+','+
'CH4:'+FloatToStr(SESystemElement.ch4_coal[2])+ ','+
'CmHn:'+FloatToStr(SESystemElement.cmhn_coal[2])+','+
'H2O:'+FloatToStr(SESystemElement.h2o_coal));
BalanceForm.BalanceMemo.Lines.Add('混合后烟气成分%');
BalanceForm.BalanceMemo.Lines.Add('干成分');
BalanceForm.BalanceMemo.Lines.Add( 'CO2:'+FloatToStr(SESystemElement.co2_fume[1])+','+
'CO:'+FloatToStr(SESystemElement.co_fume[1])+','+
'N2:'+FloatToStr(SESystemElement.n2_fume[1])+','+
'O2:'+FloatToStr(SESystemElement.o2_fume[1])+','+
'CH4:'+FloatToStr(SESystemElement.ch4_fume[1]));
BalanceForm.BalanceMemo.Lines.Add('湿成分');
BalanceForm.BalanceMemo.Lines.Add( 'CO2:'+FloatToStr(SESystemElement.co2_fume[2])+','+
'CO:'+FloatToStr(SESystemElement.co_fume[2])+','+
'N2:'+FloatToStr(SESystemElement.n2_fume[2])+','+
'O2:'+FloatToStr(SESystemElement.o2_fume[2])+','+
'CH4:'+FloatToStr(SESystemElement.ch4_fume[2])+','+
'H2O:'+FloatToStr(SESystemElement.h2o_fume));
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -