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

Automating multiple runs within pre?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2005, 06:59
Default Automating multiple runs within pre?
  #1
Zheng
Guest
 
Posts: n/a
Hi, I'm not sure if this has been answered before, but I didn't find an answer after looking through the posts from the past 2 years.

Suppose I want to create a polar plot of an aircraft/wing, or a yaw sweep of a car, etc. with say 20 data points, is there a way to define the run in CFX pre so that I don't have to start 20 runs with slightly different definition? I guess this should be possible unless the mesh needs to be modified.

I know you can do this with a batch file, but it'll get tedious if you need to change more than 1 parameter and if you need lots of data points.

Is there a simple way to define an array of evenly spaced pitch angles (like you can do in xfoil and matlab) and tell CFX to generate all the results and put them in one file?

Will it work if I made a transient simulation and defined a varying B.C. (say flow direction in my examples above) instead?

Thanks a lot.

-Z-
  Reply With Quote

Old   January 30, 2005, 18:09
Default Re: Automating multiple runs within pre?
  #2
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

It is easy to create a batch/script file to change things like flow rates or temperatures. You can use the cfx5cmds and cfxsolve commandlines to do it.

If you want to run a number of geometries with different meshes and compare the results I recommend you do not try to combine the results file. Leave them as seperate results files, much easier. All the mesh generation and CFX-Pre functions can be scripted so you should be able to automate the mesh generation.

Glenn Horrocks
  Reply With Quote

Old   February 1, 2005, 02:03
Default Re: Automating multiple runs within pre?
  #3
Zheng
Guest
 
Posts: n/a
Hi

Thanks for your reply.

I'm not very familiar with running CFX in command line, but as I understand, to run a batch file in windows one needs to add runs like so:

cfs5solve -def FileToBeSolved.def -[paramters n'stuff]

So if one wants to find drag at 20 different angles one needs to have 20 lines of batch file code. Is there a more elegant way of doing this? Like a for loop or something?

If this is possible does one write the loop in the batch file or with some internal code in CFX?

Thanks

-Z-

  Reply With Quote

Old   February 1, 2005, 04:19
Default Re: Automating multiple runs within pre?
  #4
matej
Guest
 
Posts: n/a
I'm not a Windows user, but the 3rd google link was: http://www.microsoft.com/resources/d.../en-us/for.asp

Moreover, if you change only some parameters in def file, you may have a small text files with setting the parameters -- over-writting the setting in a def file. It's all described in manuals for cfx solver run from command line and the commands in ccl manual.

matej
  Reply With Quote

Old   February 1, 2005, 04:41
Default Re: Automating multiple runs within pre?
  #5
Zheng
Guest
 
Posts: n/a
I thought there's a simple way to do this in GUI, but I guess I'll have to learn to use CCL.

I guess I'm just lazy.

Thanks again.

-Z-
  Reply With Quote

Old   February 1, 2005, 17:06
Default Re: Automating multiple runs within pre?
  #6
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

Assuming you are using windows you can combine the 20 command lines into a simple 20 line batch file (called doruns.bat for instance), then you can run the batch file simply as "doruns.bat" from the command line. The lines in the batch file are then executed as if you had typed them onto the command line.

There is quite a bit you can do using batch files, have a look on google or your local computer text book shop.

Glenn Horrocks
  Reply With Quote

Old   February 3, 2005, 15:34
Default Re: Automating multiple runs within pre?
  #7
Ian
Guest
 
Posts: n/a
We use a loop in the pre and post session files (rather than CCL and .bat files). A suggested process is:

1) Set up one run in the pre gui while recording the session (.pre) file. 2) Parameterize the session file in a text editor. Add a loop (for, while, if... however you like. It's Perl syntax). Change as necessary. We set ours to write out a .def file for each design point. 3) Write a Post session file (.cse) to read in the results files sequentially, do any necessary calcs (ours also reads in a .cst file with pre-written calcs) and write out results to a text file. Again this is Perl format. The text file can be opened in Excel. 4) Write a .bat file to execute the pre session file, solver runs and post session file.

I can run an entire centrifugal compressor stage without opening a GUI (except TurboGrid, but even then I have a template to give me a headstart).
  Reply With Quote

Old   February 3, 2005, 16:33
Default Re: Automating multiple runs within pre?
  #8
Zheng
Guest
 
Posts: n/a
Ok thanks guys.

I think I have enough information to get started.

Really appreciate all your replies.

-Zheng-
  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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
best practice: how to manage multiple runs? mirko OpenFOAM Running, Solving & CFD 2 May 3, 2011 11:48
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
setting up multiple runs mapuma FLUENT 1 February 12, 2010 02:28
Multiple reference frames? Moon Siemens 0 March 4, 2003 07:32


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