|
[Sponsors] |
May 15, 2012, 18:25 |
OpenFOAM interface with REFPROP
|
#1 |
Member
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14 |
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. |
|
June 21, 2012, 00:58 |
Some progress in call REFPROP in OF
|
#2 | |
Member
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14 |
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 psiCells[celli] = refPsiPH(pCells[celli],hCells[celli]); muCells[celli] = refMuPH(pCells[celli],hCells[celli]); alphaCells[celli] = refAlphaPH(pCells[celli],hCells[celli]); 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. T.jpg 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 |
||
June 21, 2012, 08:25 |
|
#3 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
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 |
|
June 21, 2012, 13:26 |
|
#4 |
Member
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14 |
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. |
|
June 22, 2012, 08:29 |
|
#5 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
the BC's are defined in derivedFvPatchField and the question is if you use the correct temperature and pressure to calculate h Christian |
|
November 28, 2012, 16:50 |
Refprop subroutine
|
#6 | |
New Member
fnk
Join Date: Aug 2009
Posts: 4
Rep Power: 17 |
Hi,
Can you share yout refprop subroutine? Thank you. Quote:
|
||
November 28, 2012, 17:32 |
|
#7 |
Member
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
creating interface in openfoam | vinnithepooh | OpenFOAM | 17 | June 20, 2022 07:58 |
Interface w. Pitch Change: | Thcfd | CFX | 0 | December 22, 2010 04:50 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
OpenFOAM Training and Workshop Zagreb 2628Jan2006 | hjasak | OpenFOAM | 1 | February 2, 2006 22:07 |