34.3.3. Script Method

The Script method is used when you call Ansys Polydata within a script. It controls the value of the flagged parameters via a template file (*.upd) which is automatically created by Ansys Polydata during the creation of the UDT. Below is an example of a template file.

 DV #1
  expo
 0.4000000E+00
  DV #2
  fac
 0.4000000E+00
  DV #3
  facinf
 0.4000000E+00
  DV #4
  tnat
 0.4000000E+00 

The sample file corresponds to a UDT in which the four parameters of the Bird-Carreau law were flagged. This can be easily used to modify the value of any parameter of the viscosity model.

The name of each parameter appearing in the template file (e.g., expo) corresponds to the comment that is entered in the Create template entry process during the creation of the UDT (see Creating a New Template Entry to Flag a Parameter).

Now, suppose you want to run a simulation with a value of the exponent of the power law (for example, expo) set to.35 instead of 0.40. To do this, edit the template file and change the corresponding value. An example of an edited template file is shown below.

  DV #1
 expo
  0.3500000E+00
 DV #2
 fac
  0.4000000E+00
 DV #3
 facinf
  0.4000000E+00
 DV #4
 tnat
  0.4000000E+00 

To directly update the value of the parameter, launch Ansys Polydata with the -UPDT command option following these steps:

  1. Launch Ansys Polydata with the -UPDT templates.upd command line option.

  2. Read the mesh file.

  3. Read the old data file.

  4. Select Save & exit.