|
[Sponsors] |
How to link Fluent and MATLAB and exchange data? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 12, 2009, 04:22 |
How to link Fluent and MATLAB and exchange data?
|
#1 |
New Member
Tom
Join Date: Dec 2009
Posts: 2
Rep Power: 0 |
1. My aim is to use Matlab as a "master" program and fluent as a "slave", analyzing flow in Fluent and do multiobjective optimization in MATLAB.
2. How can I convert *.jun to *.bat in order to import data into MATALB. 3. I want to implement gene algorithm on MATLAB to tune the value of flow rate and rpm in Fluent. |
|
December 17, 2009, 13:38 |
|
#2 |
Member
Tiago Macarios
Join Date: Mar 2009
Posts: 35
Rep Power: 17 |
I had to do something like this once and I think I can help you.
First do no use matlab, it is REALLY, I mean REALLY slow to converge to a optimum if it is what do you want. I would suggest you using "esteco modefrontier" The next question is how good at programming are you? I have wrote 3 solutions for you that gose from simple to complicated and, as you can presume, from slowest to fast: 1- use matlab/modefrontier to create a journal file for fluent and then run it in batch mode. (slow because fluent needs to relaod mesh at every new configuration, so depending of your computational domain, it can consume some time) 2 - write an UDF in fluent that write the output data to a file and then you can read it into matlab/modefrontier. Then matlab will write another file that will be read by fluent, that udpates the boundary conditions with the udf. (fluent will just change the boundary conditions and converge again, the slow part here is using the harddisk as a communication between programs) 3- The most elegant - write a code in matlab/modefrontier that opens a pipe to fluent and communicate trough it. if you dont known pipes: http://linux.die.net/man/7/pipe I think that with some thinking all this solutions can be parallelized (different simulations at the same time), fluent parallelization can always be used. modefrontier has already a module for fluent, I never used it but you might give it a try. =D |
|
November 10, 2011, 00:30 |
|
#3 |
Member
john
Join Date: Nov 2010
Posts: 50
Rep Power: 16 |
Hi Tiago,
Could you please share me the code regarding linking between fluent and Matlab or modefrontier. Atleast the simple version. Thanks in advance John |
|
October 9, 2013, 15:26 |
|
#4 |
New Member
Sorin Munteanu
Join Date: Apr 2013
Posts: 27
Rep Power: 14 |
Hi John,
I hope this reply is not coming too late... You can start Fluent in server mode and access it from a remote Matlab machine. I will not report my post, but you might want to go over my cfd-online post at the following link: http://www.cfd-online.com/Forums/flu...ab-fluent.html Coding is pretty straight forward, quite fast and it will not require other software but Fluent and Matlab. Sorin |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Parse error in UDF, URGENT HELP NEEDED!!! | Boris Kloser | FLUENT | 2 | December 12, 2009 04:16 |