## 18.12. Calculating the Particle Drag Coefficient

The User Defined option enables you to use a User Fortran subroutine to calculate the particle drag coefficient. A particle user routine example is presented later in this section.

To use a particle user routine, you should first write the Fortran routine and create a shared library. Next, you should create a User Routine of type Particle User Routine in CFX-Pre. When defining the domain, particle user sources are enabled by selecting the Particle User Source check box for the appropriate quantity, then selecting the routine from the drop-down list. For details, see Creating the Shared Libraries and Particle User Routines in the CFX-Pre User's Guide.

The Argument Variables list should contain the fluid and particle variables needed to calculate the source (help on how to use variable names in CFX, as well as a list of all variables, can be found in the VARIABLES file, in the /etc/ directory of your CFX installation). The Return Variables list enables you to return only the Particle Drag Coefficient.

Release 18.2 - © ANSYS, Inc. All rights reserved.