33.2. Using CSV-Defined Functions

The steps for defining a CSV-defined function in Ansys Polyflow are provided here. Note that you should also perform all other steps needed to correctly define your model before running Ansys Polyflow.

  1. Create your CSV file containing the coordinates of the sample points and the value at each of those points under a specific label. For example:

    COORDINATES
    1; .3078385E+01; .0000000E+00; .1466668E+02;
    2; .3078372E+01; .0000000E+00; .1500000E+02;
    3; .3068895E+01; .2415273E+00; .1466668E+02;
    4; .3068882E+01; .2415263E+00; .1500000E+02;
    5; .3040485E+01; .4815655E+00; .1466668E+02;
    6; .3040472E+01; .4815635E+00; .1500000E+02;
    7; .2993329E+01; .7186346E+00; .1466668E+02;
    8; .2993316E+01; .7186317E+00; .1500000E+02;
    9; .2927718E+01; .9512732E+00; .1466668E+02;
    10; .2927706E+01; .9512693E+00; .1500000E+02;
    
    Talpha
    1; 200.0;
    2; 201.0;
    3; 202.0;
    4; 203.0;
    5; 204.0;
    6; 205.0;
    7; 206.0;
    8; 207.0;
    9; 208.0;
    10; 209.0;
    
  2. Declare the dependency in Ansys Polydata.

    1. In Ansys Polydata, select the parameter you want to have described by CSV-defined function.

    2. Click the PMAT button at the top of the menu.

    3. Define this parameter to be a constant times the value given by your CSV-defined function. Select the appropriate menu item to modify the parameter value and enter the value for this constant.

    4. In the Functional Dependence of... menu, select CSV-defined function

        CSV-defined function

      and then Create a new function

        Create a new function

      You will see a function f1(...) listed in the menu.

    5. Select f1(...) and enter the appropriate information in the CSV-defined function menu.

      1. Enter the pathname of your CSV file.

          Modify CSV filename

        This path name must be such that the solver will be able to locate the file from the directory it will be running in.

      2. Enter the label under which your data are provided in your CSV file.

          Modify the label

        Using the CSV file example given above, the label must be ‘Talpha’. Note that you can have one CSV file per parameter, or you can have one single CSV file containing a series of data, with each set of data under a different label.

  3. Execute Ansys Polyflow  as usual.

    polyflow [options] < data-file

    where data-file is the data file containing the problem definition.

    No specific options are required for CSV-defined functions since all necessary information is already stored in the data file.