1 / 23

User Defined Functions

Introduction. What is a User Defined Function?A UDF is a routine (programmed by the user) written in C which can be dynamically linked with the solver.Standard C functionse.g., trigonometric, exponential, control blocks, do-loops, file i/o, etc.Pre-Defined MacrosAllows access to field variable

warner
Télécharger la présentation

User Defined Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. User Defined Functions Much of this lecture comes from the Advanced UDF lecture. It should not be a big concern of users who are not familiar with C. The C that they need to know is very basic and can be picked up just as easily as one would have to pick up the internally-defined macros. This lecture does not describe compiling UDFs. This detail takes away from the basics of creating UDFs. Slides are self-explanatory. As with the Advanced UDF lecture, this one quickly jumps into an example which is the best way to show how one is written. Also let user’s know that the many examples that are available can be used as ‘templates’ when creating their own.Much of this lecture comes from the Advanced UDF lecture. It should not be a big concern of users who are not familiar with C. The C that they need to know is very basic and can be picked up just as easily as one would have to pick up the internally-defined macros. This lecture does not describe compiling UDFs. This detail takes away from the basics of creating UDFs. Slides are self-explanatory. As with the Advanced UDF lecture, this one quickly jumps into an example which is the best way to show how one is written. Also let user’s know that the many examples that are available can be used as ‘templates’ when creating their own.

    2. Introduction What is a User Defined Function? A UDF is a routine (programmed by the user) written in C which can be dynamically linked with the solver. Standard C functions e.g., trigonometric, exponential, control blocks, do-loops, file i/o, etc. Pre-Defined Macros Allows access to field variable, material property, and cell geometry data. Why build UDF’s? Standard interface cannot be programmed to anticipate all needs. Customization of boundary conditions, source terms, reaction rates, material properties, etc. Adjust functions (once per iteration) Execute on Demand functions Solution Initialization

    3. User Access to Fluent Solver FLUENT is designed to allow users to access the solver at some strategic instances during the solution process:

More Related