# Iteration number - flow rate relation

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

 May 27, 2016, 07:49 Iteration number - flow rate relation #1 New Member   Join Date: Jan 2016 Posts: 5 Rep Power: 9 Hi all, I'm trying to observe behavior of a wing due to the different flow rates, so that i need to solve different working conditions. I start my calculations but when the analysis has completed, for every working conditions i go back to setup and changing flow rate and start again, because of that i can not leave PC alone. My analysis converging about 60-70 iterations so i think that if i change my flow rate due to iteration number, i can calculate more than one situation and i can read values from solver manager graph. I tried to write an expression but i couldn't figure out how to write for such that problem. (Probably because i'm new on CFD (Really new!!)) Can anyone help me? or show me a way? I need to change my flow rate based on iteration number. For example; iteration number 0 to 100 => flow rate = 2 [kg s^-1] iteration number 100 to 200 => flow rate = 3 [kg s^-1] iteration number 200 to 300 => flow rate = 4 [kg s^-1] . . . and goes on. thanks in advance and sorry for my english.

 May 27, 2016, 08:48 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,366 Rep Power: 139 This sounds like a really bad idea to me. A CFD simulation should progress to convergence and produce a single result. There are many different ways to get runs to queue up and run automatically and it is really easy to do: * Batch/script file - the change to the conditions can be done by a CCL file written to the definition file by the command line cfx5cmds. Then start the run with cfx5solve. Then repeat for all the combinations you want to do. * Use the parametric modelling in workbench * Use a batch scheduling system like PBS, LSF (OK, this is not such a simple approach - I suspect if you used these systems you would not be asking this question But the other two options are very simple)

 May 27, 2016, 08:50 #3 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,366 Rep Power: 139 Here's an example batch file which would do it: cfx5cmds -def -text cfx5solve -def cfx5cmds -def -text cfx5solve -def cfx5cmds -def -text cfx5solve -def This will do 3 runs, one after the other (so only using a single license at any time) using 3 different setup CCL files.

 May 27, 2016, 09:55 #4 New Member   Join Date: Jan 2016 Posts: 5 Rep Power: 9 Thanks a lot Glenn, it's also seems to a stupid idea but as i told i'm very new about CFD, i will try to solve as you suggest i also find a solution which i try to do, here is the link for anyone who needs http://www.padtinc.com/blog/the-focu...essions-part-4 Last edited by helvas; May 30, 2016 at 01:48.

 May 28, 2016, 05:58 #5 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,366 Rep Power: 139 Putting ramping or stepping functions in CEL is very useful and it is good you have a tutorial on it. But using it as a method of doing multiple simulations in a single simulation is not wise. I did not answer the question on ramping the CEL as a case of the XY problem (http://xyproblem.info/) - the real issue is how do you effectively run multiple simulations.

May 30, 2016, 01:30
#6
Senior Member

Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 21
Quote:
 Originally Posted by ghorrocks Here's an example batch file which would do it: cfx5cmds -def -text cfx5solve -def cfx5cmds -def -text cfx5solve -def cfx5cmds -def -text cfx5solve -def
I agree with Glenn that it is a bad idea to ramp flow rates with iteration number. Use a batch file instead, but there is no need to modify the -def file, you can specify the ccl file directly in the cfx5solve command as
cfx5solve -def <def file> -ccl <CCL file 1>
cfx5solve -def <def file> -ccl <CCL file 2>
cfx5solve -def <def file> -ccl <CCL file 3>

 May 30, 2016, 02:57 #7 New Member   Join Date: Jan 2016 Posts: 5 Rep Power: 9 Dear Glenn, Lance; Thank you for advices, I made a search for parametric modelling and Batch/script file, and using parametric modelling seems to me very easy and i prepared my setup parametric. I have solution now, thank you very much.

 Tags expression, flow rate, iteration, optimization