|
[Sponsors] |
July 21, 2011, 22:24 |
How to start Fluent with Matlab??
|
#1 |
New Member
Jay
Join Date: Jul 2011
Location: IN
Posts: 2
Rep Power: 0 |
Hello,
I am working on a problem that will need to start Fluent with Matlab. I am wondering if this is possible. If yes, how to do that? What I want to do can be described as follow: 1. Run Matlab to obtain the B.C. for Fluent; 2. Start Fluent with Matlab (how to write this command in .m file?), use the calculated B.C. from previous step and run Fluent journal file; 3. Export calculated Fluent result; 4. Fluent results will be read by Matlab .m file; 5. Continute the following Matlab calculation; If necessary, run Fluent again. UDF file may be needed. How can I do that? It seems like we can do that. Thanks Jay |
|
March 30, 2012, 01:12 |
Loop Automation
|
#2 |
New Member
|
Hi,
so, is quiet easy, I do that every day, but depends on your version of the programs and if is a 3d or 2d problem. By the way, I do this: 1) You write the part of the *.m file which calculate the BC or any other parameter as you want. 2) The second part of the program write a *.txt file used as a journal file for Gambit (see the Matlab guide how to write *.txt files). 3) Launch Gambit in Batch mode with the command: ! C:\Gambit\ntbin\ntx86\gambit.exe -inp *.txt 4) With the same commands above write the Journal file for Fluent. 5) Launch Fluent in batch mode with the command: ! fluent fluent 3ddp -g -i "C:\Admin\Desktop\*.jou" 6) In the fluent journal provide the necessary commands to plot *.txt files of the results. 7) Read this results with Matlab (see the guide hot to do it). 8) And restart the loop or process them. The Gambit and Fluent journal language is not easy to explain in a single post like this. Best regards, Luca, HIT (Harbin, China) |
|
August 7, 2012, 16:25 |
|
#3 |
Member
Negin Nazarian
Join Date: Jan 2012
Location: San Diego
Posts: 61
Rep Power: 14 |
Hi
Im trying to do the same procedure in MATLAB I have this function that writes the journal file and Im trying to open fluent in that function but the command "!fluent-3ddp" or even ! C:\Program files\ANSYS Inc\...\fluent.exe -3ddp doesnt work. The thing is when I dont add anything after the fluent path it works fine and the fluent window pops up, but as soon as I add "-3ddp" or "-i" or anything else it wont work anymore and give me this error 'C:\Program' is not recognized as an internal or external command, operable program or batch file. Do u have any suggestion? I appreciate your help. Cheers Negin |
|
August 8, 2012, 08:59 |
|
#4 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
Hi Negin,
Try to put the the path into a string "", such as "C:\Program files\ANSYS Inc\blablabla\fluent.exe -3ddp" |
|
August 8, 2012, 15:17 |
|
#5 |
Member
Negin Nazarian
Join Date: Jan 2012
Location: San Diego
Posts: 61
Rep Power: 14 |
HI
thanks for your reply I used "system" command and used " too Cheers Negin |
|
October 9, 2013, 15:20 |
|
#6 | |
New Member
Sorin Munteanu
Join Date: Apr 2013
Posts: 27
Rep Power: 14 |
Hi Jay,
You can script Fluent directly from Matlab without having to create Fluent journal ,start Fluent in batch mode and then shutdown Fluent. The process of starting/shutting down Fluent can be quite expensive. I will recommend the following steps 1.Start Matlab on Matlab machine 2.Start Fluent on Fluent machine in server mode (add -aas option) 3.Connect Matlab with Fluent 4. Compute B.C for Fluent in Matlab 5. Apply BC for Fluent in Matlab 6. Ask Fluent to perform CFD simulation from Matlab 7. Ask Fluent to provide calculated results from Matlab 8. Continue to follow Matlab calculation 9. Repeat steps 3 to 8 as needed to perform Fluent-Matlab simulation 10. Shutdown Fluent from Matlab when not needed. This way you will have a remote Fluent-Matlab simulation, without having to start/shutdown Fluent and load/save Fluent cases or data. Also your whole simulation logic will be in one place, in your Matlab code that will issue both Matlab and Fluent commands. For more references about the technique follow the instructions in my following CFD-online post: http://www.cfd-online.com/Forums/flu...ab-fluent.html I hope this helps. Sorin Quote:
|
||
November 10, 2018, 04:20 |
|
#7 | |
New Member
Sumeet kotak
Join Date: Jun 2015
Posts: 13
Rep Power: 11 |
Quote:
Can you help in regarding step no 3. "Connect Matlab with Fluent" How to connect? Thanks in Advance Sumeet Kotak |
||
November 9, 2022, 07:16 |
|
#8 | |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 5 |
Quote:
I want to run fluent from matlab and i can't use AAS toolbox because i don't access to it, how can i run multiple times ? i use it : ! "C:\Program Files\ANSYS Inc\v212\fluent\ntbin\win64\fluent.exe" 2ddp -i "C:\Users\SINA\Desktop\New_folder\15KArms.jou" ' but i want to run again this file by another journal file after finishing the first journal file i mean in following of first journal . How can i do it? Best Regards, |
||
November 9, 2022, 07:30 |
|
#9 | |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 5 |
Quote:
I want to run fluent from matlab and i can't use AAS toolbox because i don't access to it, how can i run multiple times ? i use it : ! "C:\Program Files\ANSYS Inc\v212\fluent\ntbin\win64\fluent.exe" 2ddp -i "C:\Users\SINA\Desktop\New_folder\15KArms.jou" ' but i want to run again this file by another journal file after finishing the first journal file i mean in following of first journal . How can i do it? Best Regards, |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to link Fluent and MATLAB and exchange data? | z701531118 | FLUENT | 3 | October 9, 2013 15:26 |
few quesions on ANSYS ICEMCFD and FLUENT | Prakash.Paudel | ANSYS | 0 | August 12, 2010 13:07 |
Fluent 12.0 is worst then Fluent 6.2 | herntan | FLUENT | 5 | December 14, 2009 03:57 |
Matlab programming for Fluent study case | ASHLEY | FLUENT | 1 | April 5, 2008 14:17 |
matlab for fluent | punit | FLUENT | 0 | February 9, 2006 13:09 |