OpenFOAM interface with REFPROP
Hi, all:
I want to find a way to interface OpenFOAM with Refprop. I know a thread talking about this issue two years ago, but I don's think it gives me a clear answer. Can somebody give me a tutorial or something to show me how to do that ? thank you all in advance. 
Some progress in call REFPROP in OF
1 Attachment(s)
Hey, guys,
I think I have made some progress in calling REFPROP In OF. Here is what I have changed in OF. In hPsiThermo.C Quote:
I changed this to Code:
TCells[celli] = refTPH(pCells[celli], hCells[celli]); // call REFPROP subroutine I have made simple case to compare the perfectGas model in OF and the real Air by REFPROP. but the results are little bit different. the case using perfectGas model gives this temperature profile that everywhere is 300 K. but the case using REFPROP property gives this temperature profile as attachment. Attachment 13948 I cannot explain the temperature rise in the internal filed. The boundary are all fixed to 300K. This is really wield . I think there must be some place I did not notice. And hope somebody can help me. thank you in advance 
Hi,
have you corrected the h or e boundary functions? How long did the case run. What BC did you use for p and U Christian 
HI, Chris
thank you for your reply. I do not know how to change the h and e boundary functions. i know the h and e boundary functions are defined in basicThermo.C . Do you mean hBoundaryCorrection and eBoundaryCorrection?? I do not know how to change them. Can you show me? thank you. 
Hi,
the BC's are defined in derivedFvPatchField and the question is if you use the correct temperature and pressure to calculate h Christian 
Refprop subroutine
Hi,
Can you share yout refprop subroutine?:) Thank you. Quote:

hi, fnk382
This is very easy, you can just follow the REFPROP manual. But you need to find out how to call FORTRAN subroutine in C++, you will easily find out by google online 
All times are GMT 4. The time now is 14:17. 