CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

GAMBIT Batch Mode - MATLAB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2007, 06:01
Default GAMBIT Batch Mode - MATLAB
  #1
asd
Guest
 
Posts: n/a
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?
  Reply With Quote

Old   April 10, 2007, 15:02
Default Re: GAMBIT Batch Mode - MATLAB
  #2
Dominic
Guest
 
Posts: n/a
Try :

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

infact

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

Old   June 8, 2009, 16:44
Default
  #3
New Member
 
Join Date: May 2009
Posts: 8
Rep Power: 17
fluentguy is on a distinguished road
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
fluentguy is offline   Reply With Quote

Old   November 16, 2010, 17:30
Default
  #4
New Member
 
Join Date: Mar 2010
Posts: 7
Rep Power: 16
priyanka.asp is on a distinguished road
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.
priyanka.asp is offline   Reply With Quote

Old   December 21, 2010, 17:01
Default
  #5
New Member
 
William Humber
Join Date: Nov 2009
Posts: 11
Rep Power: 17
whumber is on a distinguished road
Quote:
Originally Posted by fluentguy View Post
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 is offline   Reply With Quote

Old   December 21, 2010, 17:44
Default
  #6
New Member
 
William Humber
Join Date: Nov 2009
Posts: 11
Rep Power: 17
whumber is on a distinguished road
Quote:
Originally Posted by priyanka.asp View Post
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.
whumber is offline   Reply With Quote

Old   February 18, 2011, 19:27
Default
  #7
Member
 
Join Date: Mar 2009
Posts: 43
Rep Power: 17
gholamghar is on a distinguished road
Quote:
Originally Posted by whumber View Post
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]
Attached Images
File Type: jpg gambit run.JPG (15.3 KB, 61 views)
gholamghar is offline   Reply With Quote

Old   February 18, 2011, 20:39
Default
  #8
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 20
DoHander is on a distinguished road
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
DoHander is offline   Reply With Quote

Old   February 19, 2011, 04:26
Default
  #9
Member
 
Join Date: Mar 2009
Posts: 43
Rep Power: 17
gholamghar is on a distinguished road
Quote:
Originally Posted by DoHander View Post
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.
Attached Images
File Type: jpg gambit 2.JPG (18.5 KB, 35 views)
gholamghar is offline   Reply With Quote

Old   February 24, 2011, 01:06
Default
  #10
New Member
 
Denis St Basil
Join Date: Jan 2011
Posts: 1
Rep Power: 0
saintbasil is on a distinguished road
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.
saintbasil is offline   Reply With Quote

Old   March 6, 2012, 08:56
Default
  #11
New Member
 
Luca Gorasso
Join Date: Oct 2011
Location: Harbin, China
Posts: 24
Rep Power: 15
elcino is on a distinguished road
Send a message via Skype™ to elcino
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



elcino is offline   Reply With Quote

Old   December 6, 2012, 06:58
Default Batch mode
  #12
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by gholamghar View Post
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
syavash is offline   Reply With Quote

Old   October 1, 2018, 09:12
Default using matlab to gambit run
  #13
New Member
 
Amir hossein Hossein
Join Date: Jan 2018
Location: Tehran, Iran
Posts: 1
Rep Power: 0
ahossein is on a distinguished road
Hello everyone

Due to the use of Gambit to produce mesh, this command can be used on matlab m_file :

system(' "gambit source working directory" -inputfile " gambit_journal working directory"')

for example:

system('"C:\Fluent.Inc\ntbin\ntx86\gambit.exe" -inputfile "C:\matpg\pmesh.jou"')

Therefore by using this code on matlab, gambit automate runs and acts accordingly journal file.

Good luck
ahossein is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Ansys in BAtch Mode kuleuvenstudent ANSYS 1 October 18, 2017 13:11
to run a replayfile in batch mode from UNIX froztbear ANSYS Meshing & Geometry 4 May 13, 2014 09:00
Gambit batch mode query Krish ANSYS Meshing & Geometry 0 April 14, 2010 09:49
Gambit batch mode problem Obut FLUENT 1 June 8, 2009 16:42
cleaning gambit journal file in batch mode HK FLUENT 0 April 1, 2008 21:35


All times are GMT -4. The time now is 18:14.