CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

CFX in batch mode-how to make it automatic

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2017, 05:47
Default CFX in batch mode-how to make it automatic
  #1
New Member
 
Arvind
Join Date: May 2016
Posts: 26
Rep Power: 9
adilarvind is on a distinguished road
I am trying to run CFX from another software and using a batch file like this:

"C:\Program Files\......\cfx5solve.exe" -batch -def part1.def -name part1 -s 1

I am fixing the parallel run and double precision in cfx file from simulation control option.

But my problem is every time i need to click the run option in cfx . what i need to change in batch file to make the system automatic without the requirement to click run manually?
adilarvind is offline   Reply With Quote

Old   July 31, 2017, 06:19
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Have a look in the documentation under the section "Running from the Command Line".

In your example command line, I suspect you don't need the -batch, -name and the -s options, it should just be "<PATH>\cfx5solve -def part1.def"
ghorrocks is offline   Reply With Quote

Old   July 31, 2017, 23:36
Default
  #3
New Member
 
Arvind
Join Date: May 2016
Posts: 26
Rep Power: 9
adilarvind is on a distinguished road
Hi,

I tried with your suggestion, but still it's the same, i have to start the solver manually. Please see the attached picture.I have to click on the start run option to start the solver.

My question is what command should i use to make this thing automatic.
Attached Images
File Type: jpg 1.jpg (54.9 KB, 136 views)
adilarvind is offline   Reply With Quote

Old   July 31, 2017, 23:54
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The best way is to fire up a command line from the CFX Launcher (Tools/Command Line) as that automatically includes the path to all the CFX executables in it. Then type cfx5slove -def YourFile.def and it will go.

I don't know why you posted an image of Solver Manager, you don't use it when you run from the command line.
ghorrocks is offline   Reply With Quote

Old   August 1, 2017, 01:47
Default
  #5
New Member
 
Arvind
Join Date: May 2016
Posts: 26
Rep Power: 9
adilarvind is on a distinguished road
@ghorrocks

Thank you for your suggestions and what you told is working. Probably i did not explain my problem properly.

I am trying to create an automatic optimization loop, where icem, cfxpre and cfx solver will run in a manner without human intervention.I am able to do that with icem and cfxpre, but i am stuck with cfx solver.
So every time i am running the batch file,the cfx solver manager pops up and i need to click 'start run' to start the solver. That's why i attached the picture.
I am attaching .bat file, its in text format.
Any help in this regard will be highly appreciated.
Attached Files
File Type: txt start_cfx .txt (304 Bytes, 166 views)
adilarvind is offline   Reply With Quote

Old   August 1, 2017, 02:06
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Have you tried using the "cfx5solve -def part1.def" as I suggested in post #2? I never get the solver manager popping up and I use the command line frequently - but I never use the -batch option.

Also: Workbench has optimisation built in across the ANSYS suite. You can pass variables around as parameters. Have you considered doing your optimisation in workbench?
ghorrocks is offline   Reply With Quote

Old   August 1, 2017, 03:19
Default
  #7
New Member
 
Arvind
Join Date: May 2016
Posts: 26
Rep Power: 9
adilarvind is on a distinguished road
Yes, i tried whatever you told. Solver manager is not popping up if i use command line from cfx launcher as you told in post#3.

But as you told in post #2, without using batch file, it's still the same. I have no clue why it is happening.

I know optimization is possible through workbench, but there is some particular reason why i am trying this. So i must make it run automatically, but i am kind of stuck now.
adilarvind is offline   Reply With Quote

Old   August 1, 2017, 04:34
Default
  #8
Senior Member
 
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 415
Rep Power: 12
-Maxim- is on a distinguished road
maybe you could just post here the complete command that you use and we look for your mistake? I think most of us use commend line and it is pretty straight forward if you just followed the manual...

edit: mine looks like this:
Code:
"C:\Program Files\ANSYS Inc\v181\CFX\bin\cfx5solve.exe" -batch -double -par-local -part 8 -def P1070_317rpm_832L_B0.def -ini-file P1070_317rpm_832L_B0_FR_001.res -pri 1 -size-nr 1.2x -size-ni 1.2x
and it works just fine without anything popping up.

Last edited by -Maxim-; August 1, 2017 at 04:37. Reason: example command
-Maxim- is offline   Reply With Quote

Old   August 1, 2017, 04:46
Default
  #9
New Member
 
Arvind
Join Date: May 2016
Posts: 26
Rep Power: 9
adilarvind is on a distinguished road
Thanks to all, apparently i found out the problem and solution.

It was the problem with batch file for cfx pre,there it was mentioned to start cfx solver interactively.
adilarvind 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
Monitoring in batch mode jmjohansen ANSYS 0 July 1, 2015 12:48
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 07:18
[ICEM] ICEM CFD error when running in batch mode bgp723 ANSYS Meshing & Geometry 0 August 14, 2014 13:45
[ANSYS Meshing] Automatic mesh generation by batch file nealrm ANSYS Meshing & Geometry 5 April 1, 2014 18:59
[ICEM] Can it make extruded 2D meshes for 2D CFX simulations? siw ANSYS Meshing & Geometry 10 October 23, 2009 08:47


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