CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How to activate Fluent from my code (https://www.cfd-online.com/Forums/fluent/31225-how-activate-fluent-my-code.html)

Cindy Jones April 7, 2003 23:08

How to activate Fluent from my code
 
hi, everyone

Here is my question, can I activate Fluent from my c++ code?

I remembered someone told about this before. He/She used GA as master program and Fluent as a slave program to get optimial results, or something like that. I was wondering how to do that.

Your help will be highly appreciated.

Cindy

J.W.Ryu April 8, 2003 00:24

Re: How to activate Fluent from my code
 
I am not familiar with C++ to control Fluent. In my case, I made two files, which are C++ (my final version was Visual Basic) and Fluent Macro.

External program has following function 1) Run Fluent by Dos prompt command

* 2d, 2ddp, 3d, 3ddp as well as version are selected in this program.

* Activate Macro file. 2) Calculation logic

Final value of "Out" file by Macro is compared with given target value in this program, and calculate new input of Macro file to make same (or within given range) target and out value.

Update Macro file for input parameter with calculation. 3) Delete cas/dat file if converging was not completed.

Macro file has following function 1) Read Cas/dat file 2) Boundary condition, especially input parameter that should be changed for convergence. This parameter is updated by external C++ or VB program based on claculation logic. Macro itself does not have any function to use comparison and update based on comparison. 3) Total iteration # 4) Initialize 5) Monitor & make "out" file for specific point or line during iteration. 6) Iteration 7) Write cas/dat file with different name, after converging or # of iteration.

1~3 of repeating calculation with different input parameter by calculation logic makes final converging.

Thanks,

J.W.Ryu

Cindy Jones April 8, 2003 23:22

Re: How to activate Fluent from my code
 
That is very helpful. Thanks a lot

Cindy


All times are GMT -4. The time now is 10:01.