Anda di halaman 1dari 1

{Trabalho 1 }

{Exemplo 1: Determinaao da funo string}


{Esta funo determina qual o estado da substncia: mistura, subresfriado ou superaquecido}

function x$(x)
x$=''
if(x<0) then x$='subresfriado'
if(x=0) then x$='liquido saturado'
if(x>0) and (x<1) then x$='mistura'
if(x=1) then x$='vapor saturado'
if(x>1) then x$='vapor superaquecido'
end
{Fluido$='R134'}
{Dados de entrada}
{m_frac = 2}
T[1]=12 [C]
P[1]=1000 [kPa]
T[2]=60 [C]
P[2]=1000 [kPa]
{m_dot_1=m_frac*m_dot_2}
P[3]=1000 [kPa]
m_dot_1=1
m_dot_1=2*m_dot_2
m_dot_3 = m_dot_1 + m_dot_2
m_dot_1*h[1] +m_dot_2*h[2] = m_dot_3*h[3]
{Propriedades}
h[1]=Enthalpy(R134a;T=T[1];P=P[1])
h[2]=Enthalpy(R134a;T=T[2];P=P[2])
T[3]=Temperature(R134a;P=P[3];h=h[3])

x[3]=Quality(R134a;P=P[3];h=h[3])
x[1]=Quality(R134a;P=P[1];h=h[1])
x[2]=Quality(R134a;T=T[2];h=h[2])
Estado_3$=x$(x[3])

Anda mungkin juga menyukai