linking matlab and fluent
I have to do an optimization on wing planform. I would like to run the optimization on matlab and the flow simulation on fluent. Does a way exist to link these softwares? My aim is to use Matlab as a "master" program and fluent as a "slave".

Re: linking matlab and fluent
You should be able to do it pretty easily by using the shell escape character. For example:
<code> !fluent.exe </code> It depends on what you are tryin to do  Phil 
Re: linking matlab and fluent
Have a look at this. http://www.dansis.dk/download/Fuldautomatisk%20Optimering%20%20Steen%20Lauridsen.pdf

Re: linking matlab and fluent
hi!
here are two other links, that may help: http://www.cfdonline.com/Forum/flue...cgi?read=35447 http://www.cfdonline.com/Forum/flue...cgi?read=45383 Ralf 
Re: linking matlab and fluent
Hi
i think you can write a fluent journal say c:\xxxx.jou with all steps needed to be measured in fluent from matlab ! fluent 2ddp i "C:\xxxx.jou" also u can use pause function from Matlab to perform modification in journal file after each optimization process i hope this useful Khairy CairoEgypt 
Re: linking matlab and fluent
Thanks for all these responses. I will try to do it with fluent journal as it seems to work.

Re: linking matlab and fluent
i am intersted to do the fluent matlab link can u say the procedure
thanks 
Re: linking matlab and fluent
can u post the pdf file again please

Re: linking matlab and fluent
sorry. It has been removed.

Fluent data and MATLAB
Hi
I have a velocity field which I got through FLUENT. now I want to calculate the pressure using the velocity data on MATLAB. I have imported the fluent data in MATLAB. I am having difficulty to pick the correct velocity of the specific node as the data is not organized with respect of either x or y coordinate. 
Quote:
Have you worked out the problem mentioned above? I am using the Matlab to work with Fluent and meet the problem as yours too? 
Hi Sheeren,
I would recommend journaling Fluent from Matlab. I will not copy/paste my other post but I will provide the link to my other cfdonline post: http://www.cfdonline.com/Forums/flu...abfluent.html You will start Fluent on your preferred Fluent machine and Matlab on your preferred Matlab machine and have them connected. Follow the steps in the post referred above. Then, of course, you will able to code standard Matlab script mixed with Fluent scripting lines. Fluent scripting will be implemented trough either tui.DoMenuCommand or tui.DoMenuCommandToString To get the velocity at node you will have to execute tui.DoMenuCommand('file export ascii ...') The "file export ascii ..." will return the values of velocity at specific coordinates. One of the options of the command is Location/CellCentered?. If you set that option to no the node values for velocity will be returned. Otherwhise Cellcentered values will be returned. I would recommend checking the command in Fluent's native console first. Just for your reference, if you use the Fluent case in the first Fluent tutorial, the next Matlab command will generate a node location report of velocities on the surface with the surface id 1. tui.DoMenuCommand('file export ascii report.txt 1 () no xvelocity yvelocity zvelocity () no') buffer=tui.DownloadFileToBuffer('report.txt') The last option in the file export command has to be no for Node values and yes for Cellcentered values. The first Matlab command will ask Fluent to generate the report, space delimited, and the second one will retrieve the report from the Fluent machine into the Matlab machine. The content of the Matlab variable called buffer will be: nodenumber xcoordinate ycoordinate zcoordinate zvelocity yvelocity xvelocity 1 1.152879596E01 2.031999975E01 6.634064950E03 2.968966030E02 3.717783093E01 4.227112606E02 2 1.195714250E01 2.031999975E01 1.100432387E18 8.820794523E03 3.445040882E01 7.459304482E02 3 1.135978848E01 2.031999975E01 7.346584965E19 1.874569058E02 3.483363688E01 5.241509899E02 4 1.295439452E01 2.031999975E01 5.346933380E03 7.882571779E03 3.145299554E01 6.067820266E02 5 1.315185130E01 2.031999975E01 1.831980064E18 5.455949809E03 3.054272830E01 6.991569698E02 6 1.255449653E01 2.031999975E01 1.466206277E18 1.139550121E03 3.258269727E01 8.162691444E02 7 1.502135396E01 2.031999975E01 6.340762600E03 9.426723234E03 4.359190762E01 2.245260961E02 8 1.554126740E01 2.031999975E01 3.295075624E18 4.237215500E03 4.635384083E01 2.144469880E02 9 1.494391263E01 2.031999975E01 2.929301734E18 4.789047409E03 4.064534009E01 2.660968900E02 10 1.713656485E01 2.031999975E01 6.717640907E03 5.333635490E03 4.887778759E01 7.551581133E03 11 1.733332872E01 2.031999975E01 4.392397295E18 2.691901056E03 4.850952923E01 4.341949709E03 12 1.673597544E01 2.031999975E01 4.026623405E18 2.609958639E03 4.897836149E01 9.937736206E03 13 1.412532330E01 2.031999975E01 6.340762600E03 1.354721840E02 3.258499205E01 3.310972080E02 14 1.434655935E01 2.031999975E01 2.563527844E18 6.097615231E03 3.381870687E01 3.366776928E02 15 1.374920458E01 2.031999975E01 2.197753954E18 7.280339953E03 3.002582788E01 4.857731238E02 16 1.576804668E01 2.031999975E01 6.340762600E03 6.822485011E03 4.780743122E01 1.799257658E02 17 1.613862067E01 2.031999975E01 3.660849515E18 2.887216164E03 4.864223301E01 1.562698744E02 18 1.773391813E01 2.031999975E01 6.717640907E03 5.844513420E03 4.801833332E01 2.978647826E03 19 1.793068349E01 2.031999975E01 4.758171185E18 3.179352498E03 4.687085152E01 1.482679625E03 20 1.886768490E01 2.031999975E01 5.854124669E03 2.533855848E03 4.385802746E01 6.194453221E03 21 1.912539154E01 2.031999975E01 5.489718966E18 4.006652161E04 4.160143435E01 1.083826553E02 22 1.852803677E01 2.031999975E01 5.123945075E18 2.511465689E03 4.431619346E01 7.344217505E03 23 1.646601856E01 2.031999975E01 7.317313924E03 5.943228491E03 4.892514646E01 1.254611928E02 24 1.229127571E01 2.031999975E01 5.863120314E03 5.249480251E03 3.434669673E01 6.091181561E02 25 1.355963051E01 2.031999975E01 5.199092906E03 1.269620750E02 3.007976115E01 4.804949090E02 26 1.833213121E01 2.031999975E01 7.256622892E03 5.729522556E03 4.623973966E01 1.315846923E03 27 1.458099633E01 2.031999975E01 5.491864402E03 1.017787773E02 3.759089112E01 2.729051746E02 28 1.937100142E01 2.031999975E01 5.562217906E03 1.522899955E03 4.181340933E01 7.305184379E03 29 1.614051610E01 2.031999975E01 1.945968345E02 1.262411010E02 4.887210429E01 1.180070359E02 30 1.658221632E01 2.031999975E01 1.482590381E02 1.012255251E02 4.906893969E01 1.141436677E02 31 1.599482596E01 2.031999975E01 1.268152520E02 1.048206538E02 4.860492051E01 1.469715778E02 32 1.404936016E01 2.031999975E01 2.799759991E02 1.532310992E02 4.606435299E01 4.372561816E03 33 1.349518895E01 2.031999975E01 3.111136146E02 4.375991877E03 4.634742439E01 1.976985298E02 ....... Sorin Quote:

what does "i" do?
! fluent 2ddp i "C:\xxxx.jou" 
Hi Shahed,
You can do Fluent journaling in many ways. You can journal from Matlab directly or you can journal form a file (the "i" option). As a rule of thumb, if the interaction with Matlab is insignificant and the Fluent run takes a considerable amount of time, I would recommend using file journaling. This option typically will take a larger amount of Matlab coding, because you have Fluent writes the output into a file and then you have to parse it to extract the information If the exchange of information between Matlab and Fluent is reasonable, I would advise Matlab journaling. This will take less time on Matlab coding since the output of command are delivered into Matlab. Now, to answer your question: The "i <filename.jou>" option on Fluent start command instructs Fluent to read and execute as a Fluent TUI command every line in the file <filename.jou>. until the end of file. If you are executing "!fluent 2ddp i "C:\xxxx.jou" from Matlab all outputs or errors for all commands can be eventually retrieved from a transcript file. To process it in Matlab you will then have to parse the information in the transcript file. I would advise you though to connect with Fluent directly from Matlab, because that way you can get the output of every command after it is executed. Sorin 
All times are GMT 4. The time now is 16:31. 