User Defined FunctionsΒΆ

M-Star CFD supports various user defined functions (UDF) in various inputs defined in C syntax. This allows you to define simple and complex system behavior such as chemical reactions, mass transfer rate, and boundary condition behavior.

There are 2 primary interpreters for the expressions for GPU and CPU evaluation. The GPU evaluators are used for things that are highly spatially varying. CPU evaluators are used for inputs that control the operating conditions or other simulation parameters that are not highly spatial.

GPU

This code input is used for UDFs that are evaluated on the entire lattice. Examples of this are custom fluid rheologies, chemical reactions, and mass transfer relationships.

CPU

These UDFs are typically evaluated on much smaller ranges. Examples of these expressions are the moving body rotation speed, and inlet velocity.