Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

CCL programming in ANSYS CFX

    • pegah.mehrabian
      Subscriber

      Hello everyone, I did URANS simulations in ANSYS CFX, and I need to extract the data of "u" and "v" velocities for every 10-time step. I have the code for extracting data for every time step. Does anyone know how to do this simple task? Thanks in advance.

      # Session file started:  2023/03/11 07:34:35
      # CFX-20.2

      # To avoid unnecessary file pre-processing and modifications, include
      # COMMAND FILE at the top of your session file.
      # If it is not included, the file is assumed to be older and will be
      # modified for backward compatibility.
      COMMAND FILE:
        CFX Post Version = 20.2
      END

      ! @steplist = (5000...7000);

      ! foreach $curstep (@steplist) {
      > load timestep=$curstep

      EXPORT:
        ANSYS Export Data = Element Heat Flux
        ANSYS File Format = ANSYS
        ANSYS Reference Temperature = 0.0 [K]
        ANSYS Specify Reference Temperature = Off
        ANSYS Supplemental HTC = 0.0 [W m^-2 K^-1]
        Additional Variable List =
        BC Profile Type = Inlet Velocity
        CSV Type = CSV
        Case Name = Case 1
        Export Connectivity = Off
        Export Coord Frame = Global
        Export File = //..../$curstep.csv
        Export Geometry = On
        Export Location Aliases =
        Export Node Numbers = Off
        Export Null Data = On
        Export Type = Generic
        Export Units System = Current
        Export Variable Type = Current
        External Export Data = None
        Include File Information = Off
        Include Header = On
        Location = Back
        Location List = /PLANE:Plane 1
        Null Token = null
        Overwrite = On
        Precision = 8
        Separator = ", "
        Spatial Variables = X,Y,Z
        Variable List = Velocity u, Velocity v
        Vector Brackets = ()
        Vector Display = Scalar
      END
      >export
      ! }

      # Session file stopped:  2023/03/11 07:50:30

       

       

    • rfblumen
      Ansys Employee

      Here's an example CFD-Post session file for exporting every 10th transient file:

      !$fileout="My_Export";
      !$bcname="out";
      !$numsteps = 50;
      !$interval = 10;
       
      COMMAND FILE:
        CFX Post Version = 19.3
      END
       
      #!for ($j=0; $j <= $numsteps; $j++) {
      !for ($j=0; $j <= $numsteps; $j += $interval) {
      DATA READER:
        Current Timestep = $j
      END
      > load
       
      ! $filename = "$fileout" .$j.".csv";
      EXPORT:
        Export File = .\$filename
        Location List = $bcname
        Variable List = Velocity u, Velocity v, Velocity w
      END
      >  export
      !}
      • pegah.mehrabian
        Subscriber

        Thank you for your help. 

Viewing 1 reply thread
  • The topic ‘CCL programming in ANSYS CFX’ is closed to new replies.