-
Notifications
You must be signed in to change notification settings - Fork 3
/
Density_V.m
33 lines (25 loc) · 1.05 KB
/
Density_V.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function Density_V
global MN RHOV DRHOVh DRHOVT TT hh HR g Rv RHOV_s DRHOV_sT NN
for MN=1:NN
HR(MN)=exp(hh(MN)*g/(Rv*(TT(MN)+273.15)));
RHOV_s(MN)=1e-6*exp(31.3716-6014.79/(TT(MN)+273.15)-7.92495*0.001*(TT(MN)+273.15))/(TT(MN)+273.15);
DRHOV_sT(MN)=RHOV_s(MN)*(6014.79/(TT(MN)+273.15)^2-7.92495*0.001)-RHOV_s(MN)/(TT(MN)+273.15);
RHOV(MN)=RHOV_s(MN)*HR(MN);
DRHOVh(MN)=RHOV_s(MN)*HR(MN)*g/(Rv*(TT(MN)+273.15));
DRHOVT(MN)=RHOV_s(MN)*HR(MN)*(-hh(MN)*g/(Rv*(TT(MN)+273.15)^2))+HR(MN)*DRHOV_sT(MN);
end
% for MN=1:NN
% gm=g/100;Rvm=Rv/10000;
% HR(MN)=exp(hh(MN)*gm/(Rvm*(TT(MN)+273.15)));
%
% RHOV_s(MN)=1e-6*exp(31.3716-6014.79/(TT(MN)+273.15)-7.92495*0.001*(TT(MN)+273.15))/(TT(MN)+273.15);
%
% DRHOV_sT(MN)=RHOV_s(MN)*(6014.79/(TT(MN)+273.15)^2-7.92495*0.001)-RHOV_s(MN)/(TT(MN)+273.15);
%
% RHOV(MN)=RHOV_s(MN)*HR(MN);
%
% DRHOVh(MN)=RHOV_s(MN)*HR(MN)*g/(Rv*(TT(MN)+273.15));
%
% DRHOVT(MN)=RHOV_s(MN)*HR(MN)*(-hh(MN)*g/(Rv*(TT(MN)+273.15)^2))+HR(MN)*DRHOV_sT(MN);
%
% end