LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

refprop

Hi,

 

I also had errors but they're not rounding errors. Don't forget to call the setmixdll and the setrefdll.

Attached you find an example for the phflsh-Subroutine in the RefProp.dll (input values: p, h; output values: T, cp, cv, speed of sound, entropy...). With the attached llb you can build your own VIs.

 

Philipp

0 Kudos
Message 31 of 45
(3,691 Views)

I am trying to generate enthalpy values in labview using refprop based on a temperature and pressure input. I have been working off the examples posted on this fourm however, am unable to get them working. I believe it has something do with my directory but I believe i have them set correctly. I am recieveing and error out 8 : Open File. With a possible cause relating to not having permission to open the file. Anyone know what I am doing wrong? Thanks

0 Kudos
Message 32 of 45
(3,567 Views)

Hello bshelly,

 

maybe you need administrator rights?
Attached you find your VI and a manual.txt for using RefProp with other programs.
Here's what I did (since I'm using the german version, I had to translate the commands. So maybe the terms are wrong):
Open "Example for phflsh.llb" --> open Test.vi --> enter block diagram --> double content of right frame --> change caption and input values --> enter "Two phase ph-flash.vi" --> Save as new copy "Two phase tp-flash.vi" in "Example for phflsh.llb" --> close "Two phase ph-flash.vi" --> edit vi symbol --> enter block diagram --> double click "Call Libary Function Node" --> since "enter path in block diagram" is checked, you cannot change the dll function. Uncheck it and browse the path to RefProp.dll --> Look for TPFLSHdll in the drop down menu --> check "enter path in block diagram" --> go to parameters. Here you can see the input and output values --> change the order as you can find it in the manual.txt (subroutine TPFLSH (t,p,z,D,Dl,Dv,x,y,q,e,h,s,cv,cp,w,ierr,herr)) --> OK --> from "Initialize Array" delete the lower cable and make a new connection with the slot above the upper one --> enter front panel --> right click the output cluster --> "Rearrange elements in cluster..." --> choose the same order as in manual.txt --> in Test.vi block diagram replace the "2 phase ph-flash" with the new "2 phase tp-flash" delete the indicator and copy/paste it from "Two phase tp-flash.vi" --> start the VI --> all calculated values (density...) should be identical.

Hope that helps

Philipp

Download All
0 Kudos
Message 33 of 45
(3,544 Views)

Hi DrHoas,

 

Are these vis that you attached at the previous thread just for mixtures? I want to calculate isobutane properties for given specific state points. Can I do this with this ones? If I could not, how can I do this? I read and find a series of vis from NIST web site but I really do not how to prepare a vi with them. I will appreciate if you answer to me.

Egemen
0 Kudos
Message 34 of 45
(2,695 Views)

Hi newbieeng,

 

attached you find a llb for several calculations. Just enter your path to RefProp in the "Init and Calc RefProp.vi". That should work. You can also use the VIs for pure refrigerants (e.g. R134a without file extension but R407C.mix with file extension). For comparisons with the RefProp GUI note that the output clusters are in mol.

 

Philipp

0 Kudos
Message 35 of 45
(2,677 Views)

Thank you very much Philipp.

Egemen
0 Kudos
Message 36 of 45
(2,674 Views)

Hi,

 

I hope that you are doing fine.

 

First of all, I followed this thread and finally managed to get Refprop working in LabView. Thank you.

 

Please view the attached Refprop.png file, that shows that how I have used 'R calc' and 'R int' to calculate the fluid properties. I used the files mention on this website. http://www.boulder.nist.gov/div838/theory/refprop/LINKING/Linking.htm#LabViewApplications.

 

I a beginer in Labview. Currently I am using NI USB 6001 to read pressure and temperature from my instrument. I am interested to calculate the viscosity of Nitrogen gas based on the pressure and temperatrue (real time calculations) .

 

Problem: As you can view from the front panel. png that this program is calculating properties of nitrogen gas, but not calculating the dynamic viscosity (Pa.s). Could you please let me know how can I calculate dynamic viscosity ? which files I need to change ? I am using the same files that are available in link that I mentioned above.

 

Thanks a lot.

 

Syed

 

 

Download All
0 Kudos
Message 37 of 45
(1,820 Views)

 

Thank you for this information on how to use Labview together with Refprop.

 

Can anyone tell me how to add a variable to the Labview VI that was posted earlier in this thread ? For example if I do a P,T flash using the Labview VIs posted here I can get the pressure, temperature, enthalpy, density liquid, density vapor, entropy, internal energy, quality, speed of sound, Cv, and Cp.

 

But how can I get the viscosity ? How do I modify the VI to give me extra parameters like for example the viscosity ?

 

Any tips would be appreciated.

Thank you

0 Kudos
Message 38 of 45
(1,699 Views)

Hi,

 

I finally manage to get the properties of Fluids in labView, procedure is lengthy but quite simple to do.

 

1) Installed matlab on my computer.

2) Installed Refprop on my computer (http://www.boulder.nist.gov/div838/theory/refprop/MINIREF/MINIREF.HTM )

3) Connect Refprop with Matlab (http://www.boulder.nist.gov/div838/theory/refprop/LINKING/Linking.htm#MatLabApplications). By doing this you should be able to call Refprop in to Matlab. If you can do it, then next step is fairly simple.

4) Afterward, call the matlab script in labView. Function>Mathematics>script and formulas>script nodes> Matlab script. Or simply search in funtion "Matlab. By doing this you will be able to do what ever you can do in Matlab.

 

I am currently using it. It is faily simple.

 

Let me know if you stuck some where.

 

Thanks

 

Syed

0 Kudos
Message 39 of 45
(1,684 Views)

Hi Syed,

 

The links are not opening. Are they the right ones? Please confirm.

- Partha ( CLD until Oct 2021 🙂 )
0 Kudos
Message 40 of 45
(1,670 Views)