CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 15, 2018, 08:06
Talking how to write a CFX batch file in linux?
  #1
New Member
 
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8
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, 16:33
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,828
Rep Power: 144
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, 09:31
Default
  #3
Senior Member
 
Join Date: Jun 2009
Posts: 1,859
Rep Power: 33
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

Reply

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


All times are GMT -4. The time now is 22:57.