⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 capacitor.~pas

📁 用于设计电容器开发方面
💻 ~PAS
字号:
unit capacitor;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Label3: TLabel;
    Edit2: TEdit;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    Edit3: TEdit;
    Edit4: TEdit;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Edit5: TEdit;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    Edit9: TEdit;
    Edit10: TEdit;
    Edit11: TEdit;
    Edit12: TEdit;
    Edit13: TEdit;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Edit14: TEdit;
    Label18: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    Label21: TLabel;
    procedure Button3Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure ComboBox1Change(Sender: TObject);
    procedure ComboBox2Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button3Click(Sender: TObject);
begin
edit1.text:='';
edit2.text:='';
edit3.text:='';
edit4.text:='';
edit5.text:='';
edit6.text:='';
edit7.text:='';
edit8.text:='';
edit9.text:='';
edit10.text:='';
edit11.text:='';
edit12.text:='';
edit13.text:='';
edit14.text:='';
combobox1.text:='';
combobox2.text:='';
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
edit1.clear;
edit2.Clear;
edit3.Clear;
edit4.Clear;
edit5.Clear;
edit6.Clear;
edit7.Clear;
edit8.Clear;
edit9.Clear;
edit10.Clear;
edit11.Clear;
edit12.Clear;
edit13.Clear;
edit14.Clear;
combobox1.clear;
combobox2.clear;

end;

procedure TForm1.Button1Click(Sender: TObject);
var
width,houdu,p1,p2,d1,d2,cwidth,c,b,n1,n2,l,l1,h,gao,wh,n3,w,z,s,y,a:real;
begin
width:=Strtofloat(edit1.Text); {膜宽度}
houdu:=Strtofloat(edit2.Text); {膜厚度}
p1:=Strtofloat(combobox1.Text); {介质常数}
p2:=Strtofloat(combobox2.Text); {介质密度}
d1:=Strtofloat(edit3.Text);     {卷针直径}
cwidth:=Strtofloat(edit4.text);  {错开宽度}
c:=Strtofloat(edit5.text);       {电容容量}
n1:=Strtofloat(edit6.text);      {前清洗圈数}
n2:=Strtofloat(edit7.Text);      {后清洗圈数}
b:=strtofloat(edit14.Text);       {溜边宽度}

w:=(width-(cwidth+2*b));  {有效宽度}
l:=(56.5*houdu*c*1.02)/(p1*w);{卷取膜总长度}
l1:=l*4*2*houdu/3.14;
z:=sqr(d1+4*n1*houdu*0.001);
s:=(l1+z);
if s<0 then
  begin
   messagebox(0,'您输入的数据有误,请从输!','系统提示',MB_OK+MB_ICONINFORMATION);
   exit;
   end;
a:=sqrt(s);
y:=4*n2*houdu*0.001;
d2:=(a+y);{卷取后素子直径}
h:=(d2-d1);   {压扁素子厚度}
gao:=(d2+0.57*d1);{压扁素子高度}
wh:=width*houdu*l*2*p2*1.03*0.001; {素子单重}
n3:=(h/(4*houdu)-(n1+n2)*0.001)*1000; {卷取圈数}

    edit8.Text:=floattostr(l);
    edit9.Text:=floattostr(d2);
    edit10.Text:=floattostr(h);
    edit11.Text:=floattostr(gao);
    edit12.Text:=floattostr(wh);
    edit13.Text:=floattostr(n3);



end;

procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if combobox1.text='' then
combobox1.Text:=combobox1.Items.Strings[1];
end;

procedure TForm1.ComboBox2Change(Sender: TObject);
begin
  if combobox2.text='' then
combobox2.Text:=combobox2.Items.Strings[1];
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -