3.3 Листинг процедуры расчета расхода и количества жидкостей и газов
В нижеприведенной процедуре вызываются две внешние программы:
1) TpNg.exe - расчет теплофизических свойств природного газа в соответствии с требованиями ГОСТ 30319.2 и ГОСТ 30319.3;
2) TpSubs.exe - расчет теплофизических свойств компонентов природного газа и продуктов его переработки в соответствии с требованиями ГОСТ 30319.1.
Типы используемых переменных: Fl: text; NNit: byte; Dd, Dt, Dd20, Dt20, RSh, Rn, TauP, AlfaT, AlfaSU, Roc, Ya, Yy, Dp, P, T, Ro, Rot, Mu, Kappa, KZ, Eps, KSh, Kk, Cb, KRe, Re, Vc, Vm, TauAv: real; NSubA, NSuzA, SodSuA, NMethKA, VarRoA: array[1..30] of byte; YR: array[1..16] of real; Hs: array[1..2] of real;
Procedure Qcalc;
var
I,IBeg,IFin: byte; Code: integer;
Bet,Bet4,Ec,Rd,Psi,Rk,L1,L2,Alfa,Qcb,ARe,R0,KCb,Qc,Vcv,Log: real;
HsS: string [10];
label
1,3;
const
RocSubs: array[1..31] of real = (0.6682,1.2601,1.8641,2.488,
2.4956,3.147,3.174,3.898,4.755,
5.812,1.09,1.1733,1.776,3.469,
4.294,1.587,2.045,1.1649,1.8393,
1.4311,2.718,0.787,998.23,
1.33116,1.20445,0.16631,0.8385,
1.6618,0.08375,0.716,1.1649);
HsSubs1: аrrау[1..31] of real = (37.12,65.43,93.85,122.8,123.6,0.0,
0.0,0.0,0.0,0.0,54.47,59.04,86.88,
0.0,0.0,0.0,52.70,11.77,0.0,23.61,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
11.88,16.11,0.0);
HsSubs2: array[1..31] of real = (33.43,59.87,86.37,113.4,114.1,0.0,
0.0,0.0,0.0,0.0,52.62,55.34,81.29,
0.0,0.0,0.0,48.94,11.77,0.0,21.75,