|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 13 ![]() |
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 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)
|
|
|
|
|
|
|
|
|
#2 |
|
New Member
Seulchan Chu
Join Date: Jan 2021
Posts: 3
Rep Power: 6 ![]() |
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. |
|
|
|
|
|
|
|
|
#3 | |
|
Member
Matt Ridzon
Join Date: Jun 2014
Posts: 91
Rep Power: 13 ![]() |
Quote:
|
||
|
|
|
||
|
|
|
#4 |
|
New Member
Join Date: Jul 2023
Posts: 5
Rep Power: 4 ![]() |
Did you manage to do it eventually? If so, how?
Thank you |
|
|
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Oct 2010
Location: USA
Posts: 19
Rep Power: 17 ![]() |
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) |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |