CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > CFX

how to write a CFX batch file in linux?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By ghorrocks
  • 2 Post By Opaque

LinkBack Thread Tools Search this Thread Display Modes
Old   November 15, 2018, 09:06
Talking how to write a CFX batch file in linux?
New Member
Join Date: May 2018
Posts: 14
Rep Power: 7
w784370882 is on a distinguished road
hello, everyone. I want to know how to run a series of cases with the same model, the only difference is boundary conditions. say a mass flow rate changing from 1kg,2kg,3kg……10kg. I don't want to set the boundary conditions one by one. Is there a way to realize it? can you give me an example file with the correct format? thanks!!!
w784370882 is offline   Reply With Quote

Old   November 15, 2018, 17:33
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,629
Rep Power: 142
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Generate a CCL file. Then generate copies of the CCL file with the boundary condition modified to have 1kg/s, 2kg/s etc. Then do a batch script to run them all, something like

cfx5solve -ccl run1.ccl
cfx5solve -ccl run2.ccl

Alternately you can do this with parametric modelling in workbench.
w784370882 likes this.
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   November 16, 2018, 10:31
Senior Member
Join Date: Jun 2009
Posts: 1,770
Rep Power: 31
Opaque will become famous soon enough
There are many ways to answer this question. Here are some (skipping CEL to minimize them)

1 - Glenn's suggestion: generate one command file per value of the BC, and use the command line repeatedly

2 - Create a script in any language (Perl, csh/bash/ksh, Python) that will do:
Extract the command file (using cfx5cmds -def ...)
Loop over the values of interest
Search for value to be replaced
Replace such value
Submit simulation using cfx5solve -def .. -ccl new_file.ccl

3 - Use the latest version of the software, and use the new feature for this intended purpose (Operating Maps). Read the documentation, and you will be on your way, i.e. interpreting results.

Hope the above helps,
w784370882 and shk09 like this.
Opaque is offline   Reply With Quote


batch, cfx, linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51

All times are GMT -4. The time now is 12:20.