CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   GAMBIT Batch Mode - MATLAB (http://www.cfd-online.com/Forums/main/13291-gambit-batch-mode-matlab.html)

asd April 10, 2007 06:01

GAMBIT Batch Mode - MATLAB
 
I am trying to exectue GAMBIT through MATALB with !gambit, however i am then required to physically click on "run" to open the program. Is there a way to bypass or automate this within MATLAB?

Dominic April 10, 2007 15:02

Re: GAMBIT Batch Mode - MATLAB
 
Try :

>>system('gambit -inp journalfilename') from Matlab.

infact

>>! gambit -inp journalfilename still works for me without system command.

fluentguy June 8, 2009 16:44

Hi,

I'm working on the batch mode process too. Though the command works fine, gambit doesnt open a new window when it is creating a new design. Because of this, it is creating overlapping geometries and hence I'm getting a lot of errors like "walls already exist, zones already exist" etc..

What do I do to overcome this ?

Thanks

priyanka.asp November 16, 2010 17:30

Hello,

I am trying to link Gambit with Matlab, but I am getting the following error in Matlab. I am using !gambit.exe -inp c1.jou

Can anyone explain why?

'gambit.exe' is not recognized as an internal or external command,
operable program or batch file.

whumber December 21, 2010 17:01

Quote:

Originally Posted by fluentguy (Post 218609)
Hi,

I'm working on the batch mode process too. Though the command works fine, gambit doesnt open a new window when it is creating a new design. Because of this, it is creating overlapping geometries and hence I'm getting a lot of errors like "walls already exist, zones already exist" etc..

What do I do to overcome this ?

Thanks

Either delete all the old gambit project files between each run or have each case open with a new name.

whumber December 21, 2010 17:44

Quote:

Originally Posted by priyanka.asp (Post 283685)
Hello,

I am trying to link Gambit with Matlab, but I am getting the following error in Matlab. I am using !gambit.exe -inp c1.jou

Can anyone explain why?

'gambit.exe' is not recognized as an internal or external command,
operable program or batch file.

You need to modify your environmental variables so that the Gambit executable is in your path. Right click "My Computer" -> Properties -> Advanced System Settings -> Environmental Variables and then add the directory which contains the gambit executable to $PATH.

gholamghar February 18, 2011 19:27

1 Attachment(s)
Quote:

Originally Posted by whumber (Post 288048)
You need to modify your environmental variables so that the Gambit executable is in your path. Right click "My Computer" -> Properties -> Advanced System Settings -> Environmental Variables and then add the directory which contains the gambit executable to $PATH.

Hello
I did this and set environment variable but there is a new problem,when in my matlab m-file i write "!gambit.exe -inp test.jou", gambit begins to start just for a moment but suddenly it jumps out and nothing happens then,but when i write in my matlab m-file this :"!gambit.exe" without -inp ,exceed and gambit begin to start and then comes this window (attached picture) that wants me to push the "run" button and when i push it gambit runs correctly but of course without opening my journal file. the point is i am doing an optimization work and i need gambit run in an automated way,i don't want to push the run button every time and i need gambit to run my journal file automatically without my interference. do you have any idea what is wrong with what i do?
thanks in advance
[IMG]file:///I:/DOCUME%7E1/a/LOCALS%7E1/Temp/moz-screenshot-2.png[/IMG]

DoHander February 18, 2011 20:39

You need to check the gambit command line parameters (you can set up the home directory, the graphic server etc ...), this will get rid of the graphical window. Try in a command window something like:

gambit -h
gambit --h
gambit -help
gambit --help

Hopefully one of the above should work.

Do

gholamghar February 19, 2011 04:26

1 Attachment(s)
Quote:

Originally Posted by DoHander (Post 296003)
You need to check the gambit command line parameters (you can set up the home directory, the graphic server etc ...), this will get rid of the graphical window. Try in a command window something like:

gambit -h
gambit --h
gambit -help
gambit --help

Hopefully one of the above should work.

Do

thanks for reply,i did as you said but the graphical window appears again, I am not sure but i think the problem is with linking between exceed and gambit,because when i try to use "!gambit.exe -inp test.jou" in my matlab m-file there is no exceed running,in fact it happens like this:gambit startup menu appears for a second(like the attached picture below) without any exceed appearing(as you see in the picture it seems journal file has been run correctly because edges are created and it has reached to Command>end) then it jumps out,but when i use "!gambit.exe",start up menu appears then i push run button,then exceed runs,and finally gambit GUI appears.

saintbasil February 24, 2011 01:06

I've successfully automated Gambit in MATLAB using batch processing for the purposes of optimization like you said, so yes it can be done. And like the above posts say, all you do is clear any previous "default" files which contain geometry and use gambit. I use linux, so my code is:

!rm default* myTurbine.msh*
!gambit -inp makeTurbine.jou

If you're having problems then you are probably right that the issue is with Exceed. Can you start up Exceed prior to going into MATLAB? I remember doing that when I used Gambit/Fluent/MATLAB on Windows; I'd have Exceed up and it did not shut down when each batch run completed.

elcino March 6, 2012 08:56

Hi,

I've done it with windows. Exceed must be opened before starting. My matlab file is able to produce a file ".txt" used as a journal for gambit and later open and run gambit automatically. Use this and use attention for your file path:

! C:\Users\Administrator\Desktop\gambit\Fluent.Inc\n tbin\ntx86\gambit.exe -inp gambit.txt




syavash December 6, 2012 06:58

Batch mode
 
Quote:

Originally Posted by gholamghar (Post 296001)
Hello
I did this and set environment variable but there is a new problem,when in my matlab m-file i write "!gambit.exe -inp test.jou", gambit begins to start just for a moment but suddenly it jumps out and nothing happens then,but when i write in my matlab m-file this :"!gambit.exe" without -inp ,exceed and gambit begin to start and then comes this window (attached picture) that wants me to push the "run" button and when i push it gambit runs correctly but of course without opening my journal file. the point is i am doing an optimization work and i need gambit run in an automated way,i don't want to push the run button every time and i need gambit to run my journal file automatically without my interference. do you have any idea what is wrong with what i do?
thanks in advance
[IMG]file:///I:/DOCUME%7E1/a/LOCALS%7E1/Temp/moz-screenshot-2.png[/IMG]

Dear Gholamghar,

I encountered with the same problem (starting Gambit in batch mode). When I start Gambit using command prompt or matlab, startup window vanishes immediately after appearing.
Could you manage to resolve this problem?! if so, would you let me know how you overcame this?

tnx


All times are GMT -4. The time now is 17:04.