|
[Sponsors] |
February 26, 2010, 13:19 |
Batch in CFX 12 in Windows XP
|
#1 |
Senior Member
Join Date: Feb 2010
Posts: 148
Rep Power: 17 |
I am fairly new to CFX. Can someone provide step-by-step instructions on submitting several runs serially in CFX 12? I am working in Windows XP.
|
|
February 26, 2010, 18:27 |
|
#2 |
New Member
John
Join Date: Apr 2009
Posts: 6
Rep Power: 17 |
This question has been discussed in various posts already. I use a .bat file in my project directory which contains the following commands:
cd .\Case1 "C:\Program Files\Ansys Inc\v110\CFX\bin\cfx5solve.exe" -def .\Case1.def cd .. cd .\Case2 "C:\Program Files\Ansys Inc\v110\CFX\bin\cfx5solve.exe" -def .\Case2.def -ini ..\Case1\Case1_001.res cd .. cd .\Case3 "C:\Program Files\Ansys Inc\v110\CFX\bin\cfx5solve.exe" -def .\Case2.def -ini ..\Case2\Case2_001.res cd .. Obviously you need to check the path of the solver for your system. In this situation I have already created the various .def files for each case in it's own sub-directory. The batch file commands change the working directory, run the case and then return to the main directory. |
|
March 3, 2010, 16:35 |
Recognizing results in workbench
|
#3 |
Senior Member
Join Date: Feb 2010
Posts: 148
Rep Power: 17 |
I think it worked. However, workbench does not recognize the results. I will compare the directory structure to a case that I ran in workbench. If you have any further suggestions, they are most welcome!
Thanks so much. |
|
March 3, 2010, 20:28 |
|
#4 |
Senior Member
|
Before run the .bat file, add the path of the cfx5solve into the environment variable list will eliminate the directory change command. No matter where you store the .bat file, the command can be simply as,
cfx5solve -def [name.def] |
|
March 3, 2010, 20:56 |
|
#5 |
New Member
John
Join Date: Apr 2009
Posts: 6
Rep Power: 17 |
I'm not sure about the workbench commands so sorry! Obviously the commands I had given were for cfx11, but they should carry over to v12 OK. Can you be more specific on the workbench problem you have or the error message you get?
Regarding the use of the environment variable to define the path - it simplifies the start command but with the command I have given it still doesn't matter where the .bat file is stored. What is important is the working directory and unless this is specified in the .bat file, it will default to the location of the .bat file. I had used the directory change commands simply to keep each different case in its own sub-folder. I just find this cleaner than having all case files in the one folder. |
|
March 8, 2010, 17:04 |
Thanks everyone
|
#7 |
Senior Member
Join Date: Feb 2010
Posts: 148
Rep Power: 17 |
12.1 says something about the information having been updated since last time. When I submitted my question to ANSYS tech support, the response was
I should have clarified that you can't really run CFX in batch using Workbench, or get Workbench to recognize the results afterwards. You can copy the results into the project directory and then drag a "Results" component to the project schematic, double click to load CFD-Post, and then manually load one of your RES files into CFD-Post. This Results component will then remember the RES file loaded as well as the state the next time you edit it. I asked for clarification, as I'm new to CFX and don't really understand the files, the file structure, etc. yet. The response was First, the only reason I suggest to copy the results into the project directory is so that you can archive the files as one package. There is no other real benefit in WB by keeping the files in there. The CFX directory that you have shown is probably a good place to keep them. The WB project directory structure is pretty much designed to try to be non-intuitive and keep people out of it. FYI, You can see where your files are located if you go to the project page, View > Files. This will open a pane with a list of all of the files associated with the project. If you right click on one of the entries you can choose to "Open Containing Folder". So I would just copy your results into this directory, and then you can go to the project page, expand the "Component Systems" section, drag in the "Results" object. Editing this cell will bring up CFD-Post, and from there you can do a File > Load Results to bring in your RES file data. I'd love to get step-by-step instructions but so far, no go. I do not know what is meant by "copy your results into this directory." I'm not sure what the results are -- the .res file or the folder called "Fluid Flow 001"? And to what directory do I copy this file? Any ideas? Thanks in advance for any help. Perhaps my question is very dumb but I do not know what to do here. |
|
May 14, 2010, 13:10 |
|
#8 |
Senior Member
Join Date: Feb 2010
Posts: 148
Rep Power: 17 |
For any interested parties, one can get Workbench (WB) to recognize results after running in batch. In WB, in Toolbox under Component Systems, drag Results to the Project Schematic without linking to any project. Double click on Results. In Post, click File > Load Results. Browse to the directory where the batch job ran and select the .res file.
|
|
May 24, 2010, 06:43 |
|
#9 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Dear All,
I'm currently involved in a shape optimization problem. My question is: How can I save both residuals and some "User Point" (i.e.: mass flow rate or efficiency, that I have peviously defined) in a file (.txt etc.) that my optimizer engine can subsequently read? Thank You in advance. Claudio |
|
May 24, 2010, 07:46 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
You can do this easily with the solver manager and a monitor point. You can right click on a chart and export the data in the chart. If you want to automate the process you can parse a file in the CFX temp directory, I forget its name but it is easy to find.
|
|
May 24, 2010, 08:22 |
|
#11 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Thank You very much.
You saved me a huge amount of time. A last question: in which directory can I find this template file? Thank You. Claudio |
|
May 24, 2010, 08:37 |
|
#12 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
It is not a template file, it is the monitor points datafile. I think it has the filename "mon". Note it only exists when a simulation is proceeding and gets deleted when it is finished (the data is stored as part of the results file). Look in the .cfx_tempdir to find it.
|
|
May 24, 2010, 09:05 |
|
#13 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Ok ok,
I noted the presence of this file. However, I cannot automate the procedure, yet. As a matter of fact, this file cannot be opened during the simulation, and there is no possibility to change it in order to "Export Plot data" in batch mode. |
|
May 24, 2010, 09:15 |
|
#14 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
That's just the windows file locking. You can get around that if you want.
I think there is also a command line to extract the monitor data, cfx5monitor or something. Check out the documentation about the command line tools to try to find it, or search the forum. |
|
May 25, 2010, 09:23 |
|
#15 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Thank You very much.
I was finally able to extract results by means of cfx5mondata.exe application. Now I have another (final) problem: I launch cfx5solve in batch mode, but I cannot save the result file .res. How can I do it? Thank You. Claudio |
|
May 25, 2010, 20:04 |
|
#16 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
It should save the res file if it is working properly. Either you have turned saving of the res file off or the simulation has had a problem and is unable to save a res file.
|
|
August 20, 2010, 16:33 |
Batch processing in CFX 12.1
|
#17 |
Senior Member
Join Date: Feb 2010
Posts: 148
Rep Power: 17 |
Please find below step-by-step instructions for batch processing in Workbench 12.1
- Define the problem in Workbench (build geometry in DM, mesh in Mesh and assign BCs in Pre) - In Workbench, double click on Solution to launch Solver Manager which generates the definition (.def) file; close Solver Manager as the Solution need not be run but needs to be launched to create the file; old .cfx and .def files are deleted and new ones are created - Backup the project, since the cells in the CFX analysis system can no longer be opened after the proceeding changes - Search in the files folder for the definition file which will be in the folder for the design point and then subfolder CFX and another subfolder CFX; for example, for design point 0, the directory path will end in \dp0\CFX\CFX - Create a text batch file with the extension .bat with the following, where Fluid_Flow.def is the definition file generated by Solution and has no spaces cd C:\your_directory_path "C:\Program Files\Ansys Inc\V121\CFX\bin\cfx5solve" -batch -def Fluid_Flow.def - For multiple cases, simply repeat these two lines with the appropriate director path and file name for each case - To run, double click on the batch file - In Workbench, under Toolbox and Component Systems, drag Results to the Project Schematic without linking to the CFX analysis system; double click on Results, click File > Load Results, and browse to the directory where the batch job ran and select the .res file; alternatively, view in CFD-Post standalone as done prior to Workbench |
|
February 8, 2012, 17:51 |
|
#18 | |
New Member
Anonymous
Join Date: Feb 2012
Location: Germany
Posts: 13
Rep Power: 14 |
Hi,
I am trying to make different run with different initial conditions. I saved a *.ccl file with all the system parameters, and then created different variations with different temperatures. I tried to run a batch file with the following line: "C:\Program Files\Ansys Inc\V121\CFX\bin\cfx5solve" -batch -def Fluid_Flow.def -initial ic.ccl and i get this error Quote:
I found the answer so I edit my mesage. I was confusing initial files with ccl files... changed the batch code to "C:\Program Files\Ansys Inc\V121\CFX\bin\cfx5solve" -batch -def Fluid_Flow.def -ccl ic.ccl and seems to be working Last edited by rideway; February 8, 2012 at 18:17. |
||
February 6, 2013, 10:29 |
Where ???
|
#19 |
New Member
hi
Join Date: Dec 2012
Posts: 19
Rep Power: 13 |
Where we must type this comment for create batch file???
cd C:\your_directory_path "C:\Program Files\Ansys Inc\V121\CFX\bin\cfx5solve" -batch -def Fluid_Flow.def And another questin, I have ANSYS 13.0 and it creates Fluid Flow cfx.def not Fluid_Flow.def Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Question]About batch job | fluboy | FLUENT | 2 | August 12, 2009 12:10 |
Windows XP Batch file help needed | DL123 | Main CFD Forum | 2 | July 3, 2009 09:53 |
Running Job in Batch mode (EFD) | Nick Sessions | FloEFD, FloWorks & FloTHERM | 0 | April 16, 2008 17:44 |
batch run | N.R. | CFX | 1 | June 17, 2007 23:44 |
Prosurf in batch mode | Dhruv | Siemens | 1 | September 19, 2005 19:02 |