CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Where is RGP Table File Created?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 7, 2021, 15:46
Default Where is RGP Table File Created?
  #1
Member
 
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 13
m_ridzon is on a distinguished road
I'm new to using NIST RGP tables in Fluent. According to Fluent Help, I can run the following BAT file to create the RGP file.


Code:
%AWP_ROOT212%\SystemCoupling\bin\systemcoupling.bat
I then issue the following commands.

Code:
import pyExt.RefProp as arp
fluidsPath = arp.getFluidsPath()
mat = arp.RefPropLib()

fluidList = ['fluids/water.fld']
mat.setup(fluidsPath, fluidList)

interpError = 1.0e-3
Tmin = 300.0
Tmax = 700.0
Pmin = 100000.0
Pmax = 25000000.0

# Generate just the vapor component in the RGP file, for entire range
h2ovapor = arp.RGPVapor("H2OV", interpError)
arp.generateRGPfile("H2O-vapor.rgp", h2ovapor)
The last line looks like it is creating a RGP file. Where is this stored in the file directory? I'd like to open it for review.
m_ridzon is offline   Reply With Quote

Old   November 7, 2021, 12:50
Default Recommend to use Python
  #2
New Member
 
Seulchan Chu
Join Date: Jan 2021
Posts: 3
Rep Power: 6
Carnot is on a distinguished road
In Python, type

-------------------

import os

if __name__ == '__main__':
os.system(r'"C:\Program Files\ANSYS Inc\ANSYS Student\v211\SystemCoupling\bin\systemcoupling.bat "')

-------------------

Here, change into your directory for systemcouling.bat.

then type

-------------------

import pyExt.RefProp as arp
fluidsPath = arp.getFluidsPath()
mat = arp.RefPropLib()

fluidList = ['fluids/water.fld']
mat.setup(fluidsPath, fluidList)

interpError = 1.0e-3
Tmin = 300.0
Tmax = 700.0
Pmin = 100000.0
Pmax = 25000000.0

# Generate just the vapor component in the RGP file, for entire range
h2ovapor = arp.RGPVapor("H2OV", interpError)
arp.generateRGPfile("H2O-vapor.rgp", h2ovapor)

-------------------

after then, type

-------------------

import os

path=os.getcwd()
print(path)

-------------------

You can find the directory for rgp files made.
In my case, they were hidden.
Carnot is offline   Reply With Quote

Old   November 9, 2021, 10:01
Default
  #3
Member
 
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 13
m_ridzon is on a distinguished road
Quote:
Originally Posted by Carnot View Post
In Python, type

-------------------

import os

if __name__ == '__main__':
os.system(r'"C:\Program Files\ANSYS Inc\ANSYS Student\v211\SystemCoupling\bin\systemcoupling.bat "')

-------------------

Here, change into your directory for systemcouling.bat.

then type

-------------------

import pyExt.RefProp as arp
fluidsPath = arp.getFluidsPath()
mat = arp.RefPropLib()

fluidList = ['fluids/water.fld']
mat.setup(fluidsPath, fluidList)

interpError = 1.0e-3
Tmin = 300.0
Tmax = 700.0
Pmin = 100000.0
Pmax = 25000000.0

# Generate just the vapor component in the RGP file, for entire range
h2ovapor = arp.RGPVapor("H2OV", interpError)
arp.generateRGPfile("H2O-vapor.rgp", h2ovapor)

-------------------

after then, type

-------------------

import os

path=os.getcwd()
print(path)

-------------------

You can find the directory for rgp files made.
In my case, they were hidden.
Unfortunately, I don't have Python installed. I typically do all of the work in the Fluent Console. How should I revise these commands you gave, to use in the Fluent Console?
m_ridzon is offline   Reply With Quote

Old   August 1, 2023, 10:41
Default
  #4
New Member
 
Join Date: Jul 2023
Posts: 5
Rep Power: 4
Bak16 is on a distinguished road
Did you manage to do it eventually? If so, how?
Thank you
Bak16 is offline   Reply With Quote

Old   March 14, 2024, 22:26
Default Python script
  #5
New Member
 
Join Date: Oct 2010
Location: USA
Posts: 19
Rep Power: 17
Tony12 is on a distinguished road
This is the process to generate the RGP file using an Ansys python script:

Step 1: open CMD and change directory to where you want the files stored

cd C:\Users\username\Desktop\RGP_files

Step 2: run the systemcoupling.bat script (the example below is for version 23R1)

“C:\Program Files\ANSYS Inc\v231\SystemCoupling\bin\systemcoupling.bat”

Step 3: Copy/paste python script (this one generates the RGP file for water and vapor). You only need to choose one of the options below:

import pyExt.RefProp as arp
fluidsPath = arp.getFluidsPath()
mat = arp.RefPropLib()

fluidList = ['fluids/water.fld']
mat.setup(fluidsPath, fluidList)

interpError = 1.0e-3
Tmin = 300.0
Tmax = 700.0
Pmin = 100000.0
Pmax = 25000000.0

# Option 1: Generate both the liquid and vapor components, independent settings possible
h2ollow = arp.RGPLiquid("H2OL", Tmin, Tmax, Pmin, Pmax, interpError)
h2ovlow = arp.RGPVapor("H2OV", Tmin, Tmax, Pmin, Pmax, interpError)
arp.generateRGPfile("H2O-low.rgp", h2ollow, h2ovlow)

# Option 2: Generate both the liquid and vapor components in the RGP file in one go
h2omed = arp.RGPSettings("H2O", Tmin, Tmax, Pmin, Pmax, interpError , arp.ADAPT_AUTO_TP)
arp.generateRGPfile("H2O-med.rgp", h2omed)

# Option 3: Generate just the vapor component in the RGP file, for entire range
h2ovapor = arp.RGPVapor("H2OV", interpError)
arp.generateRGPfile("H2O-vapor.rgp", h2ovapor)
Tony12 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 17:05
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 11:50.