Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Exporting solution data from Fluent using ansys-fluent-core

    • wheeler.ky
      Subscriber

      Hi all,

      I am using ansys-fluent-core to write a python script to automate some simulations with different geometries and setup. I have a script that can import the different mesh files, setup and run the simulation, and save certain results. However, I need to export specific solution data, which in the GUI is done by file > export > solution data. I need to export static pressure, x-wall shear stress, x-face area, y-face area, and dx-velocity_dx in ascii format.

      ansys-fluent-core has a function for exporting solution data, which is solver.file.export.ascii(), which is what I am trying to use for this. This is the description of the arguments for the function:

      class ascii(Command)
       |  ascii(name: 'Optional[str]' = None, parent=None)
       |
       |  Write an ASCII file.
       |
       |  Parameters
       |  ----------
       |      file_name : str
       |          Enter the desired file name to export.
       |      surface_name_list : List
       |          List of surfaces to export.
       |      delimiter : str
       |          Select the delimiter separating the fields.
       |      cell_func_domain : List
       |          Select the list of quantities to export.
       |      location : str
       |          Select the node or cell-center to export data values.

      So the line of code I'm attempting to use is this:

      solver.file.export.ascii(file_name = solution_data_file, surface_name_list = ["no_slip_walls"], delimiter = "space", location = "cell-center", cell_func_domain = ["Static_Pressure"])

      where solution_data_file is a string with the correct file name and path and no_slip_walls is a defined named selction in the mesh file.

      The issue I am having is that I don't know what the cell_func_domain list expects as an argument. This should be the list that specifies that I want to export static pressure, x-wall shear stress, etc, but I don't know what format these should be in in the list. I have tried many variations, such as ["Static_Pressure"], ["static_pressure"], ["static pressure"], etc., but I always get an error that the value is not allowed:

      RuntimeError: Values contain disallowed entries
      Error Object: (Static_Pressure)

      I could not find any documentation or examples (I searched through the pyfluent documentation and their github) that explain this either, so if anyone knows how the specific quantities are supposed to be specified or where to look for better documentation I would really appreciate it.

      Thanks,

      Kyle

Viewing 0 reply threads
  • You must be logged in to reply to this topic.