Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

RGP file for fluent

    • rahul159753159
      Subscriber

      Hello,

      I have created a predefined mixture of fluid in refprop (Version 10.0) to be used in fluent (Version 2025R2). I have the mass fractions and all the .fld files that refprop is using to create the predefined mixture. I don't really know how to create RGP for that. I looked out for this thread How to generate and setup RGP-Tables for CFX multiphase flow simulations but the zip file seems tp be removed/missing. Can anyone help me with this please?

       

      Thanks

    • SRP
      Ansys Employee

      Hi,

      You can check user's manual for creating RGP file: 6.1. Real Gas Property (RGP) Table Files

    • jcooper
      Ansys Employee

      Hi Rahul:

      The generic process for creating RGP files uses the ANSYS System coupling application. You supply a Python file with instructions for the mixture and then run from the command line:

      "C:\Program Files\ANSYS Inc\v251\SystemCoupling\bin\systemcoupling" -R script.py

      The resulting RGP file can be used with either CFX or Fluent.

      Below is a sample script for a mixture:

       

      import os
      import pyExt.RefProp as arp

      fluidsPath = arp.getFluidsPath()
      mat = arp.RefPropLib()
      #
      # Enter mixture components - these all must exist in the material database
      #

      fluidList = arp.FluidList()
      fluidList.append("R23.FLD")
      fluidList.append("R116.FLD")
      #
      # Enter mass ratios of mixture components
      #
      composition = arp.Values()
      composition.append(0.46)
      composition.append(0.54)


      matInfo = mat.setmix(fluidsPath, fluidList, composition)
      mixInfo = mat.info()
      print(
          f"Critical point       : (",
          mixInfo.tempCrit,
          ", ",
          mixInfo.presCrit,
          ", ",
          mixInfo.rhoCrit,
          ")",
      )
      print(
          f"Cricondenbar point   : (",
          mixInfo.psatMaxT,
          ", ",
          mixInfo.psatMax,
          ", ",
          mixInfo.psatMaxD,
          ")",
      )
      print(
          f"Cricondentherm point : (",
          mixInfo.tsatMax,
          ", ",
          mixInfo.tsatMaxP,
          ", ",
          mixInfo.tsatMaxD,
          ")",
      )
      #Set the variable interpError as follows to define an accuracy, may need to adjust
      # for convergence 
      # 
      #'low' :       1e-3  
      #'medium':     1e-4 
      #'med-high' :  5e-5   
      #'high' :      2e-5 
      #'very-high' : 1e-5
      #
      interpError = 5.0e-5

      #
      #Set table ranges larger than problem range to allow for overshoots
      #

      Tmin = 200.0
      Tmax = 500.0
      Pmin = 3000
      Pmax = 2.4e06

      #
      # generate tables - pass arp.ADAPT_AUTO_TP for 1D tables and arp.ADAPT_AUTO_2D for 2D
      #

      R508BL = arp.RGPLiquid("R508BL", Tmin, Tmax, Pmin, Pmax, interpError, arp.ADAPT_AUTO_TP)
      liquid_tab = arp.buildRGPComponent(R508BL)
      arp.writeRGPfile("R508BL.rgp", liquid_tab)

      R508BV = arp.RGPVapor("R508BV", Tmin, Tmax, Pmin, Pmax, interpError, arp.ADAPT_AUTO_TP)
      vapor_tab = arp.buildRGPComponent(R508BV)
      arp.writeRGPfile("R508BV.rgp", vapor_tab)

      mat.release()

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]