|
[Sponsors] |
How to do Design Optimization in Fluent 13.0? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 26, 2011, 15:26 |
How to do Design Optimization in Fluent 13.0?
|
#1 |
New Member
WangLei
Join Date: Mar 2011
Posts: 2
Rep Power: 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. |
|
July 20, 2011, 01:37 |
|
#2 |
Member
Join Date: Apr 2009
Posts: 46
Rep Power: 17 |
1 UDF
Code:
#include "udf.h" DEFINE_ON_DEMAND(objective_function) { real obj = 0.0; /* ... */ rp_set_real(morpher/objective_function, obj); } 2 Scheme Code:
(define (objective-function) ;... (rpsetvar 'morpher/objective_function obj) ) |
|
Tags |
design optimization, fluent 13.0, objective function, scheme, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluent - license problem. | Marcin | FLUENT | 3 | April 13, 2018 17:33 |
problem of running parallel Fluent on linux cluster | ivanbuz | FLUENT | 15 | September 23, 2017 20:12 |
Porous media setup issues in Fluent | Bernard Van | FLUENT | 29 | January 26, 2017 05:09 |
Fluent connection with simulink by TCP/IP | Tanktruck | Fluent UDF and Scheme Programming | 1 | June 28, 2009 13:56 |
mesh from Star design and use in FLUENT?? | Waseem | Main CFD Forum | 0 | December 17, 2008 07:25 |