Collapse all
/- Using This Manual
- I. Creating and Using User Defined Functions
- 1. Overview of User-Defined Functions (UDFs)
- 1.1. What is a User-Defined Function?
- 1.2. Limitations
- 1.3. Defining Your UDF Using
DEFINE
Macros - 1.4. Interpreting and Compiling UDFs
- 1.5. Hooking UDFs to Your Ansys Fluent Model
- 1.6. Mesh Terminology
- 1.7. Data Types in Ansys Fluent
- 1.8. UDF Calling Sequence in the Solution Process
- 1.9. Special Considerations for Multiphase UDFs
- 2.
DEFINE
Macros - 2.1. Introduction
- 2.2. General Purpose
DEFINE
Macros - 2.2.1.
DEFINE_ADJUST
- 2.2.2.
DEFINE_DELTAT
- 2.2.3.
DEFINE_EXECUTE_AT_END
- 2.2.4.
DEFINE_EXECUTE_AT_EXIT
- 2.2.5.
DEFINE_EXECUTE_FROM_GUI
- 2.2.6.
DEFINE_EXECUTE_ON_LOADING
- 2.2.7.
DEFINE_EXECUTE_AFTER_CASE/DATA
- 2.2.8.
DEFINE_INIT
- 2.2.9.
DEFINE_ON_DEMAND
- 2.2.10.
DEFINE_REPORT_DEFINITION_FN
- 2.2.11.
DEFINE_RW_FILE
- 2.2.12.
DEFINE_RW_HDF_FILE
- 2.2.1.
- 2.3. Model-Specific
DEFINE
Macros - 2.3.1.
DEFINE_ANISOTROPIC_CONDUCTIVITY
- 2.3.2.
DEFINE_CAPILLARY_PRESSURE
- 2.3.3.
DEFINE_CHEM_STEP
- 2.3.4.
DEFINE_CPHI
- 2.3.5.
DEFINE_CORNER_FLOW_CORRECTION_CCORNER
- 2.3.6.
DEFINE_CURVATURE_CORRECTION_CCURV
- 2.3.7.
DEFINE_DIFFUSIVITY
- 2.3.8.
DEFINE_DOM_DIFFUSE_REFLECTIVITY
- 2.3.9.
DEFINE_DOM_SOURCE
- 2.3.10.
DEFINE_DOM_SPECULAR_REFLECTIVITY
- 2.3.11.
DEFINE_EC_KINETICS_PARAMETER
- 2.3.12.
DEFINE_EC_RATE
- 2.3.13.
DEFINE_EDC_MDOT
- 2.3.14.
DEFINE_EDC_SCALES
- 2.3.15.
DEFINE_ELECTROLYSIS_ECHEM_RATE
- 2.3.16.
DEFINE_ELECTROLYSIS_RELATIVE_PERMEABILITY
- 2.3.17.
DEFINE_EMISSIVITY_WEIGHTING_FACTOR
- 2.3.18.
DEFINE_FLAMELET_PARAMETERS
- 2.3.19.
DEFINE_GAP_MODEL_SOURCE
- 2.3.20.
DEFINE_GEOMETRY
- 2.3.21.
DEFINE_GRAY_BAND_ABS_COEFF
- 2.3.22.
DEFINE_HEAT_FLUX
- 2.3.23.
DEFINE_IGNITE_SOURCE
- 2.3.24. DEFINE_KW_GEKO Coefficients and Blending Function
- 2.3.25.
DEFINE_MASS_TR_PROPERTY
- 2.3.26.
DEFINE_NET_REACTION_RATE
- 2.3.27.
DEFINE_NOX_RATE
- 2.3.28.
DEFINE_PERFORATED_CD
- 2.3.29.
DEFINE_PDF_TABLE
- 2.3.30.
DEFINE_PR_RATE
- 2.3.31.
DEFINE_PRANDTL
UDFs - 2.3.31.1.
DEFINE_PRANDTL_D
- 2.3.31.2. Description
- 2.3.31.3. Usage
- 2.3.31.4. Example
- 2.3.31.5. Hooking a Prandtl Number UDF to Ansys Fluent
- 2.3.31.6.
DEFINE_PRANDTL_K
- 2.3.31.7. Description
- 2.3.31.8. Usage
- 2.3.31.9. Example
- 2.3.31.10. Hooking a Prandtl Number UDF to Ansys Fluent
- 2.3.31.11.
DEFINE_PRANDTL_O
- 2.3.31.12. Description
- 2.3.31.13. Usage
- 2.3.31.14. Example
- 2.3.31.15. Hooking a Prandtl Number UDF to Ansys Fluent
- 2.3.31.16.
DEFINE_PRANDTL_T
- 2.3.31.17. Description
- 2.3.31.18. Usage
- 2.3.31.19. Example
- 2.3.31.20. Hooking a Prandtl Number UDF to Ansys Fluent
- 2.3.31.21.
DEFINE_PRANDTL_T_WALL
- 2.3.31.22. Description
- 2.3.31.23. Usage
- 2.3.31.24. Example
- 2.3.31.25. Hooking a Prandtl Number UDF to Ansys Fluent
- 2.3.31.1.
- 2.3.32.
DEFINE_PROFILE
- 2.3.32.1. Description
- 2.3.32.2. Usage
- 2.3.32.3. Example 1 - Pressure Profile
- 2.3.32.4. Example 2 - Velocity, Turbulent Kinetic Energy, and Turbulent Dissipation Rate Profiles
- 2.3.32.5. Example 3 - Fixed Velocity UDF
- 2.3.32.6. Example 4 - Wall Heat Generation Rate Profile
- 2.3.32.7. Example 5 - Beam Direction Profile at Semi-Transparent Walls
- 2.3.32.8. Example 6 - Viscous Resistance Profile in a Porous Zone
- 2.3.32.9. Example 7 - Porous Resistance Direction Vector
- 2.3.32.10. Example 8 -Target Mass Flow Rate UDF as a Function of Physical Flow Time
- 2.3.32.11. Example 9 - Mass Flow Rate UDF for a Mass-Flow Inlet or Mass-Flow Outlet
- 2.3.32.12. Hooking a Boundary Profile UDF to Ansys Fluent
- 2.3.33.
DEFINE_PROPERTY
UDFs - 2.3.33.1. Description
- 2.3.33.2. Usage
- 2.3.33.3. Auxiliary Utilities
- 2.3.33.4. Example 1 - Temperature-dependent Viscosity Property
- 2.3.33.5. Example 2 - User-defined Mixing Law for Thermal Conductivity
- 2.3.33.6. Example 3 - Surface Tension Coefficient UDF
- 2.3.33.7. Example 4 - Density Function for Compressible Liquids
- 2.3.33.8. Hooking a Property UDF to Ansys Fluent
- 2.3.34.
DEFINE_REACTING_CHANNEL_BC
- 2.3.35.
DEFINE_REACTING_CHANNEL_SOLVER
- 2.3.36.
DEFINE_RELAX_TO_EQUILIBRIUM
- 2.3.37.
DEFINE_SBES_BF
- 2.3.38.
DEFINE_SCAT_PHASE_FUNC
- 2.3.39.
DEFINE_SOLAR_INTENSITY
- 2.3.40.
DEFINE_SOLIDIFICATION_PARAMS
- 2.3.41.
DEFINE_SOOT_MASS_RATES
- 2.3.42.
DEFINE_SOOT_MOM_RATES
- 2.3.43.
DEFINE_SOOT_NUCLEATION_RATES
- 2.3.44.
DEFINE_SOOT_OXIDATION_RATE
- 2.3.45.
DEFINE_SOOT_PRECURSOR
- 2.3.46.
DEFINE_SOURCE
- 2.3.47.
DEFINE_SPARK_GEOM (R14.5 spark model)
- 2.3.48.
DEFINE_SPECIFIC_HEAT
- 2.3.49.
DEFINE_SR_RATE
- 2.3.50.
DEFINE_THICKENED_FLAME_MODEL
- 2.3.51.
DEFINE_TRANS
UDFs - 2.3.51.1.
DEFINE_TRANS_ALG_REC_COR
- 2.3.51.2.
DEFINE_TRANS_FLENGTH
- 2.3.51.3. Description
- 2.3.51.4. Usage
- 2.3.51.5. Example
- 2.3.51.6. Hooking a Transition Correlation UDF to Ansys Fluent
- 2.3.51.7.
DEFINE_TRANS_GEOMRGH
- 2.3.51.8. Description
- 2.3.51.9. Usage
- 2.3.51.10. Example
- 2.3.51.11. Hooking a Transition Correlation UDF to Ansys Fluent
- 2.3.51.12.
DEFINE_TRANS_RETHETA_C
- 2.3.51.13. Description
- 2.3.51.14. Usage
- 2.3.51.15. Example
- 2.3.51.16. Hooking a Transition Correlation UDF to Ansys Fluent
- 2.3.51.17.
DEFINE_TRANS_RETHETA_T
- 2.3.51.18. Description
- 2.3.51.19. Usage
- 2.3.51.20. Example
- 2.3.51.21. Hooking a Transition Correlation UDF to Ansys Fluent
- 2.3.51.1.
- 2.3.52.
DEFINE_TRANSIENT_PROFILE
- 2.3.53.
DEFINE_TURB_PREMIX_SOURCE
- 2.3.54.
DEFINE_TURB_SCHMIDT
UDF - 2.3.55.
DEFINE_TURBULENT_VISCOSITY
- 2.3.56.
DEFINE_VR_RATE
- 2.3.57.
DEFINE_WALL_FUNCTIONS
- 2.3.58.
DEFINE_WALL_NODAL_DISP
- 2.3.59.
DEFINE_WALL_NODAL_FORCE
- 2.3.60.
DEFINE_SOURCE_FE
- 2.3.61.
DEFINE_WSGGM_ABS_COEFF
- 2.3.62.
DEFINE_ZONE_MOTION
- 2.3.1.
- 2.4. Multiphase
DEFINE
Macros - 2.5. Discrete Phase Model (DPM)
DEFINE
Macros - 2.5.1.
DEFINE_DPM_BC
- 2.5.2.
DEFINE_DPM_BODY_FORCE
- 2.5.3.
DEFINE_DPM_DRAG
- 2.5.4.
DEFINE_DPM_EROSION
- 2.5.5.
DEFINE_DPM_HEAT_MASS
- 2.5.6.
DEFINE_DPM_INJECTION_INIT
- 2.5.7.
DEFINE_DPM_LAW
- 2.5.8.
DEFINE_DPM_OUTPUT
- 2.5.9.
DEFINE_DPM_PROPERTY
- 2.5.10.
DEFINE_DPM_SCALAR_UPDATE
- 2.5.11.
DEFINE_DPM_SOURCE
- 2.5.12.
DEFINE_DPM_SPRAY_COLLIDE
- 2.5.13.
DEFINE_DPM_SWITCH
- 2.5.14.
DEFINE_DPM_TIMESTEP
- 2.5.15.
DEFINE_DPM_VP_EQUILIB
- 2.5.16.
DEFINE_IMPINGEMENT
- 2.5.17.
DEFINE_FILM_REGIME
- 2.5.18.
DEFINE_SPLASHING_DISTRIBUTION
- 2.5.1.
- 2.6. Dynamic Mesh
DEFINE
Macros - 2.6.1.
DEFINE_CG_MOTION
- 2.6.2.
DEFINE_DYNAMIC_ZONE_PROPERTY
- 2.6.3.
DEFINE_GEOM
- 2.6.4.
DEFINE_GRID_MOTION
- 2.6.5.
DEFINE_PERDISP_MOTION
- 2.6.6.
DEFINE_SDOF_PROPERTIES
- 2.6.7.
DEFINE_CONTACT
- 2.6.1.
- 2.7. Battery Model
DEFINE
Macros - 2.7.1.
DEFINE_BATTERY_ABUSE_RATE
- 2.7.2.
DEFINE_BATTERY_CLUSTER
- 2.7.3.
DEFINE_BATTERY_ECHEM_MODEL
- 2.7.4.
DEFINE_BATTERY_ELOAD_PROFILE
- 2.7.5.
DEFINE_BATTERY_ENTROPIC_HEAT
- 2.7.6.
DEFINE_BATTERY_NEWMAN_BV_RATE
- 2.7.7.
DEFINE_BATTERY_NEWMAN_POSTPROCESSING
- 2.7.8.
DEFINE_BATTERY_PARAMETER_ECM
- 2.7.9.
DEFINE_BATTERY_PARAMETER_NTGK
- 2.7.10.
DEFINE_BATTERY_PROPERTY
- 2.7.11.
DEFINE_BATTERY_SWELL_LAYER_N
- 2.7.12.
DEFINE_BATTERY_SWELL_STRAIN
- 2.7.1.
- 2.8. User-Defined Scalar (UDS) Transport Equation
DEFINE
Macros
- 3. Additional Macros for Writing UDFs
- 3.1. Introduction
- 3.2. Data Access Macros
- 3.2.1. Axisymmetric Considerations for Data Access Macros
- 3.2.2. Node Macros
- 3.2.3. Cell Macros
- 3.2.3.1. Cell Centroid (
C_CENTROID
) - 3.2.3.2. Cell Volume (
C_VOLUME
) - 3.2.3.3. Number of Faces (
C_NFACES
) and Nodes (C_NNODES
) in a Cell - 3.2.3.4. Cell Face Index (
C_FACE
) - 3.2.3.5. Cell Face Thread (
C_FACE_THREAD
) - 3.2.3.6. Flow Variable Macros for Cells
- 3.2.3.7. Gradient (G) and Reconstruction Gradient (RG) Vector Macros
- 3.2.3.8. Previous Time Step Macros
- 3.2.3.9. Derivative Macros
- 3.2.3.10. Material Property Macros
- 3.2.3.11. Reynolds Stress Model Macros
- 3.2.3.12. Multiphase Model Macros
- 3.2.3.13. Potential/Electrochemistry Model Macros
- 3.2.3.1. Cell Centroid (
- 3.2.4. Face Macros
- 3.2.5. Connectivity Macros
- 3.2.5.1. Adjacent Cell Index (
F_C0
,F_C1
) - 3.2.5.2. Adjacent Cell Thread (
THREAD_T0
,THREAD_T1
) - 3.2.5.3. Interior Face Geometry (
INTERIOR_FACE_GEOMETRY
) - 3.2.5.4. Boundary Face Geometry (
BOUNDARY_FACE_GEOMETRY
) - 3.2.5.5. Boundary Face Thread (
BOUNDARY_FACE_THREAD
) - 3.2.5.6. Boundary Secondary Gradient Source
(
BOUNDARY_SECONDARY_GRADIENT_SOURCE
)
- 3.2.5.1. Adjacent Cell Index (
- 3.2.6. Special Macros
- 3.2.7. Time-Sampled Data
- 3.2.8. Model-Specific Macros
- 3.2.9. NIST Real Gas Saturation Properties
- 3.2.10. NIST Real Gas UDF Access Macro for Multi-Species Mixtures
- 3.2.11. User-Defined Scalar (UDS) Transport Equation Macros
- 3.2.12. User-Defined Memory (UDM) Macros
- 3.2.12.1.
Set_User_Memory_Name
- 3.2.12.2.
Set_User_Node_Memory_Name
- 3.2.12.3.
F_UDMI
- 3.2.12.4.
C_UDMI
- 3.2.12.5.
N_UDMI
- 3.2.12.6. Example UDF that Utilizes UDM and UDS Variables
- 3.2.12.7. Reserving UDM Variables Using
Reserve_User_Memory_Vars
- 3.2.12.8. Example 1
- 3.2.12.9. Example 2
- 3.2.12.10. Unreserving UDM Variables
- 3.2.12.1.
- 3.3. Looping Macros
- 3.3.1. Looping Over Cell Threads in a Domain (
thread_loop_c
) - 3.3.2. Looping Over Face Threads in a Domain (
thread_loop_f
) - 3.3.3. Looping Over Cells in a Cell Thread
(
begin...end_c_loop
) - 3.3.4. Looping Over Faces in a Face Thread
(
begin...end_f_loop
) - 3.3.5. Looping Over Faces of a Cell (
c_face_loop
) - 3.3.6. Looping Over Nodes of a Cell (
c_node_loop
) - 3.3.7. Looping Over Nodes of a Face (
f_node_loop
) - 3.3.8. Overset Mesh Looping Macros
- 3.3.9. Multiphase Looping Macros
- 3.3.10. Advanced Multiphase Macros
- 3.3.10.1. Phase Domain Pointer (
DOMAIN_SUB_DOMAIN
) - 3.3.10.2. Phase-Level Thread Pointer (
THREAD_SUB_THREAD
) - 3.3.10.3. Phase Thread Pointer Array (
THREAD_SUB_THREADS
) - 3.3.10.4. Mixture Domain Pointer (
DOMAIN_SUPER_DOMAIN
) - 3.3.10.5. Mixture Thread Pointer (
THREAD_SUPER_THREAD
) - 3.3.10.6. Domain ID (
DOMAIN_ID
) - 3.3.10.7. Phase Domain Index (
PHASE_DOMAIN_INDEX
)
- 3.3.10.1. Phase Domain Pointer (
- 3.3.1. Looping Over Cell Threads in a Domain (
- 3.4. Vector and Dimension Macros
- 3.5. Time-Dependent Macros
- 3.6. Scheme Macros
- 3.7. Input/Output Functions
- 3.8. Miscellaneous Macros
- 4. Interpreting UDFs
- 5. Compiling UDFs
- 5.1. Introduction
- 5.2. Compiling a UDF Using the GUI
- 5.3. Compile a UDF Using the TUI
- 5.4. Link Precompiled Object Files From Non-Ansys Fluent Sources
- 5.5. Load and Unload Libraries Using the UDF Library Manager Dialog Box
- 5.6. Common Errors When Building and Loading a UDF Library
- 5.7. Special Considerations for Parallel Ansys Fluent
- 6. Hooking UDFs to Ansys Fluent
- 6.1. Hooking General Purpose UDFs
- 6.1.1. Hooking
DEFINE_ADJUST
UDFs - 6.1.2. Hooking
DEFINE_DELTAT
UDFs - 6.1.3. Hooking
DEFINE_EXECUTE_AT_END
UDFs - 6.1.4. Hooking
DEFINE_EXECUTE_AT_EXIT
UDFs - 6.1.5. Hooking
DEFINE_INIT
UDFs - 6.1.6. Hooking
DEFINE_ON_DEMAND
UDFs - 6.1.7. Hooking
DEFINE_RW_FILE
andDEFINE_RW_HDF_FILE
UDFs - 6.1.8. User-Defined Memory Storage
- 6.1.1. Hooking
- 6.2. Hooking Model-Specific UDFs
- 6.2.1. Hooking
DEFINE_ANISOTROPIC_CONDUCTIVITY
UDFs - 6.2.2. Hooking
DEFINE_CAPILLARY_PRESSURE
UDFs - 6.2.3. Hooking
DEFINE_CHEM_STEP
UDFs - 6.2.4. Hooking
DEFINE_CPHI
UDFs - 6.2.5. Hooking
DEFINE_DIFFUSIVITY
UDFs - 6.2.6. Hooking
DEFINE_DOM_DIFFUSE_REFLECTIVITY
UDFs - 6.2.7. Hooking
DEFINE_DOM_SOURCE
UDFs - 6.2.8. Hooking
DEFINE_DOM_SPECULAR_REFLECTIVITY
UDFs - 6.2.9. Hooking
DEFINE_EC_RATE
UDFs - 6.2.10. Hooking
DEFINE_EC_KINETICS_PARAMETER
UDFs - 6.2.11. Hooking
DEFINE_EDC_MDOT
UDFs - 6.2.12. Hooking
DEFINE_EDC_SCALES
UDFs - 6.2.13. Hooking
DEFINE_ELECTROLYSIS_ECHEM_RATE
UDFs - 6.2.14. Hooking
DEFINE_ELECTROLYSIS_RELATIVE_PERMEABILITY
UDFs - 6.2.15. Hooking
DEFINE_EMISSIVITY_WEIGHTING_FACTOR
UDFs - 6.2.16. Hooking
DEFINE_FLAMELET_PARAMETERS
UDFs - 6.2.17. Hooking
DEFINE_GAP_MODEL_SOURCE
UDFs - 6.2.18. Hooking
DEFINE_GEOMETRY
UDFs - 6.2.19. Hooking
DEFINE_GRAY_BAND_ABS_COEFF
UDFs - 6.2.20. Hooking
DEFINE_HEAT_FLUX
UDFs - 6.2.21. Hooking
DEFINE_IGNITE_SOURCE
UDFs - 6.2.22. Hooking
DEFINE_MASS_TR_PROPERTY
UDFs - 6.2.23. Hooking
DEFINE_NET_REACTION_RATE
UDFs - 6.2.24. Hooking
DEFINE_NOX_RATE
UDFs - 6.2.25. Hooking
DEFINE_PERFORATED_CD
UDFs - 6.2.26. Hooking
DEFINE_PDF_TABLE
UDFs - 6.2.27. Hooking
DEFINE_PR_RATE
UDFs - 6.2.28. Hooking
DEFINE_PRANDTL
UDFs - 6.2.29. Hooking
DEFINE_PROFILE
UDFs - 6.2.30. Hooking
DEFINE_PROPERTY
UDFs - 6.2.31. Hooking
DEFINE_REACTING_CHANNEL_BC
UDFs - 6.2.32. Hooking
DEFINE_REACTING_CHANNEL_SOLVER
UDFs - 6.2.33. Hooking
DEFINE_RELAX_TO_EQUILIBRIUM
UDFs - 6.2.34. Hooking
DEFINE_SBES_BF
UDFs - 6.2.35. Hooking
DEFINE_SCAT_PHASE_FUNC
UDFs - 6.2.36. Hooking
DEFINE_SOLAR_INTENSITY
UDFs - 6.2.37. Hooking
DEFINE_SOLIDIFICATION_PARAMS
UDFs - 6.2.38. Hooking
DEFINE_SOURCE
UDFs - 6.2.39. Hooking
DEFINE_SOOT_MASS_RATES
UDFs - 6.2.40. Hooking
DEFINE_SOOT_MOM_RATES
UDFs - 6.2.41. Hooking
DEFINE_SOOT_NUCLEATION_RATES
UDFs - 6.2.42. Hooking
DEFINE_SOOT_OXIDATION_RATE
UDFs - 6.2.43. Hooking
DEFINE_SOOT_PRECURSOR
UDFs - 6.2.44. Hooking
DEFINE_SPARK_GEOM
UDFs - 6.2.45. Hooking
DEFINE_SPECIFIC_HEAT
UDFs - 6.2.46. Hooking
DEFINE_SR_RATE
UDFs - 6.2.47. Hooking
DEFINE_THICKENED_FLAME_MODEL
UDFs - 6.2.48. Hooking
DEFINE_TRANS
UDFs - 6.2.49. Hooking
DEFINE_TRANSIENT_PROFILE
UDFs - 6.2.50. Hooking
DEFINE_TURB_PREMIX_SOURCE
UDFs - 6.2.51. Hooking
DEFINE_TURB_SCHMIDT
UDFs - 6.2.52. Hooking
DEFINE_TURBULENT_VISCOSITY
UDFs - 6.2.53. Hooking
DEFINE_VR_RATE
UDFs - 6.2.54. Hooking
DEFINE_WALL_FUNCTIONS
UDFs - 6.2.55. Hooking
DEFINE_SOURCE_FE
UDFs - 6.2.56. Hooking
DEFINE_WSGGM_ABS_COEFF
UDFs - 6.2.57. Hooking
DEFINE_ZONE_MOTION
UDFs
- 6.2.1. Hooking
- 6.3. Hooking Multiphase UDFs
- 6.3.1. Hooking
DEFINE_BOILING_PROPERTY
UDFs - 6.3.2. Hooking
DEFINE_CAVITATION_RATE
UDFs - 6.3.3. Hooking
DEFINE_EXCHANGE_PROPERTY
UDFs - 6.3.4. Hooking
DEFINE_HET_RXN_RATE
UDFs - 6.3.5. Hooking
DEFINE_LINEARIZED_MASS_TRANSFER
UDFs - 6.3.6. Hooking
DEFINE_MASS_TRANSFER
UDFs - 6.3.7. Hooking
DEFINE_VECTOR_EXCHANGE_PROPERTY
UDFs
- 6.3.1. Hooking
- 6.4. Hooking Discrete Phase Model (DPM) UDFs
- 6.4.1. Hooking
DEFINE_DPM_BC
UDFs - 6.4.2. Hooking
DEFINE_DPM_BODY_FORCE
UDFs - 6.4.3. Hooking
DEFINE_DPM_DRAG
UDFs - 6.4.4. Hooking
DEFINE_DPM_EROSION
UDFs - 6.4.5. Hooking
DEFINE_DPM_HEAT_MASS
UDFs - 6.4.6. Hooking
DEFINE_DPM_INJECTION_INIT
UDFs - 6.4.7. Hooking
DEFINE_DPM_LAW
UDFs - 6.4.8. Hooking
DEFINE_DPM_OUTPUT
UDFs - 6.4.9. Hooking
DEFINE_DPM_PROPERTY
UDFs - 6.4.10. Hooking
DEFINE_DPM_SCALAR_UPDATE
UDFs - 6.4.11. Hooking
DEFINE_DPM_SOURCE
UDFs - 6.4.12. Hooking
DEFINE_DPM_SPRAY_COLLIDE
UDFs - 6.4.13. Hooking
DEFINE_DPM_SWITCH
UDFs - 6.4.14. Hooking
DEFINE_DPM_TIMESTEP
UDFs - 6.4.15. Hooking
DEFINE_DPM_VP_EQUILIB
UDFs - 6.4.16. Hooking
DEFINE_IMPINGEMENT
UDFs - 6.4.17. Hooking
DEFINE_FILM_REGIME
UDFs - 6.4.18. Hooking
DEFINE_SPLASHING_DISTRIBUTION
UDFs
- 6.4.1. Hooking
- 6.5. Hooking Dynamic Mesh UDFs
- 6.6. Hooking User-Defined Scalar (UDS) Transport Equation UDFs
- 6.7. Hooking Battery Model UDFs
- 6.8. Common Errors While Hooking a UDF to Ansys Fluent
- 7. Parallel Considerations
- 7.1. Overview of Parallel Ansys Fluent
- 7.2. Cells and Faces in a Partitioned Mesh
- 7.3. Parallelizing Your Serial UDF
- 7.3.1. Parallelization of Discrete Phase Model (DPM) UDFs
- 7.3.2. Macros for Parallel UDFs
- 7.3.2.1. Compiler Directives
- 7.3.2.2. Communicating Between the Host and Node Processes
- 7.3.2.3. Predicates
- 7.3.2.4. Global Reduction Macros
- 7.3.2.5. Looping Macros
- 7.3.2.6. Cell and Face Partition ID Macros
- 7.3.2.7. Message Displaying Macros
- 7.3.2.8. Message Passing Macros
- 7.3.2.9. Macros for Exchanging Data Between Compute Nodes
- 7.3.3. Limitations of Parallel UDFs
- 7.3.4. Process Identification
- 7.3.5. Parallel UDF Example
- 7.4. Reading and Writing Files in Parallel
- 7.5. Enabling Fluent UDFs to Execute on General Purpose Graphics Processing Units (GPGPUs)
- 8. Examples
- 8.1. Step-By-Step UDF Example
- 8.1.1. Process Overview
- 8.1.2. Step 1: Define Your Problem
- 8.1.3. Step 2: Create a C Source File
- 8.1.4. Step 3: Start Ansys Fluent and Read (or Set Up) the Case File
- 8.1.5. Step 4: Interpret or Compile the Source File
- 8.1.6. Step 5: Hook the UDF to Ansys Fluent
- 8.1.7. Step 6: Run the Calculation
- 8.1.8. Step 7: Analyze the Numerical Solution and Compare to Expected Results
- 8.2. Detailed UDF Examples
- 8.2.1. Boundary Conditions
- 8.2.2. Source Terms
- 8.2.3. Physical Properties
- 8.2.4. Reaction Rates
- 8.2.5. User-Defined Scalars
- 8.2.6. User-Defined Real Gas Models (UDRGM)
- 8.2.6.1. UDRGM Example: Redlich-Kwong Equation of State
- 8.2.6.2. Specific Volume and Density
- 8.2.6.3. Derivatives of Specific Volume and Density
- 8.2.6.4. Specific Heat and Enthalpy
- 8.2.6.5. Entropy
- 8.2.6.6. Speed of Sound
- 8.2.6.7. Viscosity and Thermal Conductivity
- 8.2.6.8. Using the Redlich-Kwong Real Gas UDRGM
- 8.2.6.9. Redlich-Kwong Real Gas UDRGM Code Listing
- A. C Programming Basics
- A.1. Introduction
- A.2. Commenting Your C Code
- A.3. C Data Types in Ansys Fluent
- A.4. Constants
- A.5. Variables
- A.6. User-Defined Data Types
- A.7. Casting
- A.8. Functions
- A.9. Arrays
- A.10. Pointers
- A.11. Control Statements
- A.12. Common C Operators
- A.13. C Library Functions
- A.14. Preprocessor Directives
- A.15. Comparison with FORTRAN
- B.
DEFINE
Macro Definitions - C. Quick Reference Guide for Multiphase
DEFINE
Macros - Bibliography
- II. Creating Custom User Interfaces in Fluent
- 1. Introduction to Fluent User Interface Concepts
- 2. How to Create an Interface
- 3. Interface Elements
- 4. Adding Menus to the Right of the Ribbon
- 5. Comprehensive Examples
- A. Avoiding Common Mistakes
- B. Reference Table For Fluent Macros