- **Fluent UDF and Scheme Programming**
(*https://www.cfd-online.com/Forums/fluent-udf/*)

- - **How to do Design Optimization in Fluent 13.0?**
(*https://www.cfd-online.com/Forums/fluent-udf/86572-how-do-design-optimization-fluent-13-0-a.html*)

How to do Design Optimization in Fluent 13.0?How to do Design Optimization in Fluent 13.0?
Anyone noticed that the latest version ANSYS 13.0 FLUENT solver have integrated Automatic shape flow optimization? I'm trying to do a simple optimization case, however, the objective function can only be provided in one of two ways: either as a UDF, or as a Scheme source file. Here are what the UserGuide said on the definition of objective function: " A. If you want to provide the objective function as a user-defined function (UDF), perform the steps that follow. 1. Write a UDF using the DEFINE_ON_DEMAND macro to define the objective function. The function name must be objective_function. At the end of the objective function, the rpvar morpher/objective_function needs to be set to the (current - target) value. It is this value that the optimizer will attempt to minimize. 2. Compile the UDF using the Compiled UDFs dialog box. Make sure libudf appears as the Library Name. Define User-Defined Functions Compiled... B.If you want to provide the objective function as a Scheme source file, perform the following steps: 1. Write a Scheme source file to define the objective function. The procedure name must be objective-function. At the end of the objective function, the rpvar morpher/objective-function needs to be set to the (current - target) value. It is this value that the optimizer will attempt to minimize. 2. Load the Scheme source file. " After reading the guide, i'm still not clear how to define the objective function. Anyone could provide me an example about how to do it? Thanks a lot. |

1 UDF
Code:
`#include "udf.h"` 2 Scheme Code:
`(define (objective-function)` |

All times are GMT -4. The time now is 08:05. |