testpas.pas

来自「delphi water math Programning with delp」· PAS 代码 · 共 53 行

PAS
53
字号
program testpas(input, output); 

uses Water;

     var
            iag: integer;
		pres, temp, vpres, btemp, enthal, vspec, visc, thc, cp: real;
     begin
      	write('Pressure in bar? ');
      	readln(pres);
      	write('Temperature in K? ');
      	readln(temp);
            writeln(' ');

            vpres := VAPP(temp);
       	writeln('Vapor pressure at ',temp:12,' K is: ', vpres:12,' bar');

		btemp := BOILP(pres);
       	writeln('Boiling point at ',pres:12,' bar is: ', btemp:12,' K');
            writeln(' ');

            iag := 1;
            if pres < vpres then 
              begin
                iag := 2;
              end;

            if iag =1 then
              begin
                writeln('At ',pres:12,' bar and ',temp:12,' K: liquid');
                enthal := HSUB1(temp, pres);
                vspec := VSUB1(temp, pres);
              end
            else
              begin
                writeln('At ',pres:12,' bar and ',temp:12,' K: vapor');
                enthal := HSUB2(temp, pres);
                vspec := VSUB2(temp, pres);
              end;

            writeln('Enthalpy is: ', enthal:12,' kJ/kg');
            writeln('Specific volume is: ', vspec:12,' m^3/kg');

            visc := ETAF(temp, vspec);
            thc := TCON(temp, vspec);
            cp := HCAP(temp,pres,iag);

            writeln('Dynamic viscosity is: ', visc:12,' E-6 Pa s');
            writeln('Thermal conductivity is: ', thc:12,' W/(K m)');
            writeln('Heat capacity is: ', cp:12,' kJ/(kg K)');

     end.

⌨️ 快捷键说明

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