2016-09-01 8 views
0
다음

나는 지점에서 PMV를 계산하기 위해 사용 된 그래프이다 A, B, C, D, E GraphicMatlab에서 테이블을 만드는 방법은 무엇입니까?

%This is the code I used to calculate the PMV at points: A, B, C, D, E. 
%Where: 
%ta=tr=interior temperature setting (22°C, 23°C, 27°C) (variable); 
%va=0,2 m/s (invariable); 
%RH=50% (invariable); 
%W=0 (invariable); 
%Met= energy metabolism (1,2 met or 1,4 met) (variable); 
%Iclo= static clothing insulation (0,5 clo or 1,0 clo) (variable). 

ta=22.0; 
tr=22.0; 
va=0.2; %air speed 
RH=50; %relative humidity 
W=0;%mechanical work 
Met=1.2;%energy metabolism in met (1 met=58.2 W/m2) 
Iclo=0.5;%static clothing insulation 
%preparation of variables 
PHI=RH/100;%hygrometric dimensionless degree 
Icl=Iclo*.155;%Conversion from clo to m2K/W 
M=Met*58.15;%conversion of metabolism in unit of measurement of SI 
Iclr=Icldyn_7730(va, Icl, M); %calculation of dynamic clothing insulation 
vw=0.0052*(M-58); 
vr=va+vw; 
PMV_Fanger=PMV_evaluator(M,W,ta,tr,vr,PHI,Iclr); 

관측 : I는 호출 된 함수는 다음과 같다 : "Icldyn_7730"

function [ Icldyn ] = Icldyn_7730(va, Iclst, M) 
%calculation of dynamic clothing insulation 
%Input data 
% va, air speed, m/s 
% Iclst, static clothing insulation 
% M, metabolism in W/m2 
vw=0.0052*(M-58); 
if vw>0.7 
    vw=0.7; 
end 
vr=va+vw; 
%Static cloting insulation conversion m2K/W to clo 
    Iclo = Iclst/0.155; 

%Clothing area factor 
    if Iclst <=0.078 
    fcl= 1.00 + 1.290 * Iclst; 
    else 
    fcl= 1.05 + 0.645 * Iclst; 
    end 
%Static boundary layer thermal insulation in quiet air in m2K/W 
    Iast = 0.111; 

%Total static insulation 
    Itotst= Iclst + Iast/fcl; 

%Clothing insulation correction for wind (vr) and and walking (vw) 
    vraux= vr; 
    if vraux > 3.5 
     vraux=3.5; 
    end 

    if vraux < 0.15 
     vraux=0.15; 
    end 

    vwaux=vw; 
    if vwaux>0.7 
     vwaux=0.7; 
    end 

    CorIt=exp(-0.281*(vraux-0.15)+0.044*(vraux-0.15)^2-0.492*vwaux+0.176*vwaux^2); 
    if CorIt>1 
    CorIt=1; 
    end 

    CorIa=exp(-0.533*(vraux-0.15)+0.069*(vraux-0.15)^2-0.462*vwaux+0.201*vwaux^2); 
    if CorIa>1 
    CorIa=1; 
    end 

    Itr = Itotst * CorIt; 
    Iar = CorIa * Iast; 
    if Iclo<=0.6 
     Itr= ((0.6-Iclo) * Iar + Iclo * Itr)/0.6; 
    end 

    Itdyn = Itr; 
    Iadyn = Iar; 
    Icldyn = Itdyn - Iadyn/fcl; 
end 

와 "PMV_evaluator"

function [ PMV ] = PMV_evaluator(M,W,ta,tr,vr,PHI,Icl) 
%Function for the calculation of the PMV index 
% Input data 
% M, metabolic rate in W/m2 
% W, mechanical work in W/m2 
% ta, air temperature in °C 
% tr, mean radiant temperature in °C 
% vr, rwlative air velocity in m/s 
% PHI, hygrometric ratio dimensionless 
% Icl in m2K/W (dynamic clothing insulation) 
if (ta >=0) 
ps = exp (16.6536-4030.183/(235 + ta)); 
else 
    ps = 0.6105* exp (21.875*ta/(265.5 + ta)); 
end; 

TAA = ta+273.0; 
TRA = tr+273.0; 
TCLA = TAA + (35.5-ta)/(3.5*Icl+0.1); 
hcf = 12.1 * sqrt(vr); 

%Clothing area factor 
if Icl <=0.078 
fcl= 1.00 + 1.290 * Icl; 
else 
fcl= 1.05 + 0.645 * Icl; 
end 
% Start of the loop for the evaluation of clothing surface temperature} 
P1 = Icl * fcl; 
P2 = P1 * 3.96; 
P3 = P1 * 100; 
P4 = P1 * TAA; 
P5 = 308.7 - 0.028 * (M-W) + P2 * (TRA/100)^4; 
XN = TCLA/100; 
XF = XN; 
EPS = 0.00015; 
CONV = 100; 
N=1; 
while (CONV>EPS) 
XF = (XF+XN)/2; 
hcn = 2.38 * ((abs(100*XF - TAA))).^0.25; 
if (hcf<=hcn) 
hc = hcn; 
else 
hc = hcf; 
end 
XN = (P5+P4*hc-P2*XF^4)/(100+P3*hc); 
CONV=abs(XF-XN); 
end 

tcl = 100*XN-273; 
% End of the loop for the evaluation of clothing surface temperature} 

%Skin diffusion heat loss 
HL1=3.05*0.001*(5733-6.99*(M-W)-1000*PHI*ps); 

%Sweat heat loss 
if (M-W)>58.15 
    HL2= 0.42 * ((M-W)-58.15); 
else 
    HL2=0; 
end 

%Respiration latent heat loss 
HL3= 1.7*0.00001 * M * (5867-1000*PHI*ps); 

%Respiration dry heat loss 
HL4= 0.0014 * M * (34-ta); 

%Radiative heat loss 
HL5= 3.96 * fcl * ((0.01*tcl+2.73)^4-(0.01*tr+2.73)^4); 

%Convective heat loss 
HL6= fcl * hc * (tcl-ta); 

%Thermal sensation transformation coefficient} 
TS= 0.303 * exp(-0.036*M) + 0.028; 

PMV= TS * (M-W-HL1-HL2-HL3-HL4-HL5-HL6); 
end 

어떻게 할 수 MATLAB을 사용하여 다음과 같은 테이블을 만드시겠습니까?

table

테이블의 데이터는 PMV의 값이다. 그것들은 MATLAB의 개별 계산으로부터 얻어졌습니다.

+0

'PMV_evaluator'와'Icldyn_7730' 함수가하는 것을 추가하십시오. 코드에 자세한 내용을 입력하십시오. – Umar

+0

테이블을 어디에서 구합니까? 파일에? 변수 편집기에서? 명령 창에서? 'table' 함수의 문제점은 무엇입니까? 시도해 봤어? – thewaywewalk

+0

매트릭스와 matlab의 테이블 함수를 사용하려고 생각했지만 구성을 올바르게 사용하는 방법을 모르겠습니다. 훨씬 간단하기 때문에 Excel에서 염두에 두었던 테이블을 만들었습니다. Matlab에서 동일하게하고 싶습니다. 도와 주실 수 있습니까? –

답변

0

이후 버전의 matlab에서 소개 된 테이블 변수를 사용하는 것이 좋습니다.이 변수는 서로 다른 데이터 소스를 허용합니다. 전체 matlab에 example이 있는데 여기에는 일련의 범주 형 행 이름이 첫 번째 열을 차지하고 머리글 집합이 맨 위를 차지합니다.

matlab에서 작성 가능한 commmand는 Excel 스프레드 시트에 테이블 변수 (행/열/헤더 등)를 씁니다.

관련 문제