CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   fluent-matlab parallel (

galapago May 14, 2013 15:22

fluent-matlab parallel
Hi guys

I'm trying to run fluent through matlab, i use this command
!fluent 2ddp -g -i C:\Users\omar\Documents\MATLAB\alggambit\algorflue nt.jou

but i don't know how to run in parallel mmode, i found that "tx" is the command, where the x is the number of processors, but where is the possition of this text in the preceding command is after 2ddp? is after -g? or is after -i?

thanks in advance guys

slug May 15, 2013 04:03


You can also run system commands (call Fluent) with the Matlab function system('command') where 'command' is a string.

The advantage of the system() function is that we can build the command string from variables using concatenation.

For your case, to run with 4 cpus, you could use (noting the order of the flags doesn't really matter)

system('fluent 2ddp -g -t4 -i C:\Users\omar\Documents\MATLAB\alggambit\algorflue nt.jou')

The more general way is store all the relevant information in variables. Our Matlab function/script could then change them as required (say in a loop running many jobs), eg

fluentExe = 'fluent '; %the fluent executable path.
path required if on system path
dims = '2d';
precision = 'dp';
graphics = ' '; % -g for no graphics. Space for graphics
ncpu = 4; %number of cores to use
journals = {'c:\rabbit\myrabbitsimulation.jou';
for ii = 1:length(journals)
system( [ fluentExe,' ',dims,precision,' ',graphics,...
'-t',num2str(ncpu),' ','-i ',journals{ii} ] );

galapago May 15, 2013 19:08

thanks a lot Slug

i will try


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