Here we are going to understand
1. How to extract enthalpy value from ref prop in Matlab
2. Solve the VCR system.
Before, we look at the code of VCR
Step1: we need REFPROP function for Matlab
Link for refprop function: https://trc.nist.gov/refprop/LINKING/...
Step2: Save the file " WITHOUT " changing the name of the Matlab file name in whichever folder you wanna save.
Now, How to use this function to extract value from ref prop database
P1 = refpropm('P','T',307,'Q',0,'r134a');
Here,
'refpropm' is function which we are going to use
It work as,
refpropm('VALUE YOU WANT TO EXTRACT',state point1, value of state point 1,state point 2, value of state point 2,WORKING FLUID NAME)..
for example,
t1 = refpropm('T','p',100,'Q',1,'water');
ans=373k
it says, the temperature of water at pressure 100kpa and quality of zero.
let us look at VCR SYSTEM!
run the code and test it!
now, for verification
Youtube ref. link: • Calc Vapor Compression Refrigeration ...