CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Mechanical Engr. (

fhd79 December 23, 2012 14:16

Mechanical Engr.
Hi there,
I have a problem in running fluent as a batch mode using Matlab, I am using the following command !C:\Fluent.Inc\ntbin\ntx86\fluent 2ddp -hidden -i "./FNACA4412.jou"
But I always end up with an error massage of:
Error: read-data: invalid plot file format
Error Object: *eof*
Warning: An error or interrupt occurred while reading the journal file.
Some commands may not have been completed.

However, if I open fluent and used; file/read-journal ... and selected the journal file it will work perfectly..!!!

Please help and advice.


Sorin May 9, 2013 17:13

Hi F.H.

Did you try using Fluent in server mode?

Instead of starting Fluent from inside Matlab you can start it from outside Matlab (could be on a different machine) and then connect from Matlab. You can run the TUI commands from the connected Matlab one at a time.

See below an example (I presume you are using Fluent R14.5...)

1. Have the Fluent COM connector registered to Windows
cd C:\Fluent.Inc\fluent14.5.0\addons\corba\ntx86\
regsvr32 ComCoFluentUnit.dll

1. start Fluent in server mode with the following command:
C:\Fluent.Inc\ntbin\ntx86\fluent 2ddp -aas
Fluent will generate a server key (aaS_FluentId.txt) in the folder where you launched Fluent

2. start Matlab and execute the following commands to connect to Fluent's TUI interpreter using aaS_FluentId.txt

fluent = actxserver(ANSYS.CoFluentUnit.1′);
fluent.ConnectToServer (fluentkey)

3. run the commands in the batch file from Matlab, mixed with your Matlab commands. See below some examples
tuiCommand="report summary"

4. When you are done you can shutdown Fluent from Matlab:

You can find all commands in the ANSYS Fluent aaS documentation. For a small example you can refer to my blog post at

Please let me know if you need more info.


iman h April 23, 2015 18:06

Need Help
Hi, thank you for your tips,

I have a problem in the first line.

fluent = actxserver(‘ANSYS.CoFluentUnit.1′);

I have an error :

Error using actxserver (line 91)
Server creation failed. Invalid ProgID 'ANSYS.CoFluentUnit.1'.

All times are GMT -4. The time now is 12:35.