|
[Sponsors] |
February 22, 2016, 15:03 |
CFX Auto timescale
|
#1 |
Member
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11 |
Hi
I am using CFx to simulate the flow in a turbine, I am using auto timescale but it is not updating. CFx is using time scale =1/omega and is not changing. I am not getting a full conversion because of that. anyone be able to help me to create a code to force cfx to use a smaller timescale in order to get a convergence. Thanks |
|
February 22, 2016, 17:38 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
The automatically calculated time scale is only a guessed starting point. It is normal practice to adjust it from there to suit the simulation.
The easiest way to do this is while the run is progressing and going nowhere, select "Edit run in progress". Then add a timescale factor in the convergence menu and give it a value. Usually you can be quite aggressive in setting this parameter; 10, 100 or even higher often work well. I note that you want to use a smaller time step - then use a time scale factor less than one. |
|
February 23, 2016, 08:47 |
|
#3 |
Member
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11 |
Thanks for your reply,
I wanted the CFx to run at night as I have to do a lot of simulations, I have tried local time step 0.5 so it works fine up to certain residual value ( in my case 5e-7 ) and then the solution become unstable. If I edit it as u have mentioned and introduce a smaller time step ( the one i used is 10^5 ) the solution become stable again and the residual keep on decaying. |
|
February 23, 2016, 09:40 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
The use of the local timescale factor is not recommended unless you are aware of its drawbacks, and how to overcome them once the solution is apparently (rarely is) converged.
|
|
February 23, 2016, 10:53 |
|
#5 |
Member
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11 |
What would you suggest to automate the reduction of timescale throughout the run?
|
|
February 23, 2016, 11:15 |
|
#6 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Not sure why you seem convinced the timescale must be reduced as it converges. In general, it is the other way around.
The smaller the timescale, the less likely the iterative solution progresses, i.e. it gets stuck in the previous iteration. If you look at the settings, you select Auto Timescale, as well as a Timescale Factor to indicate how much larger/smaller you want it to be every time it is updated. If the update produces the same timescale, you will be running at a uniform timescale. Recall the automatic timescale is the larger possible conservative estimate the software provides. Sometimes, you may be able to use larger values (by scaling the provided value), or smaller values if the provided value is too aggressive. Hope the above helps, |
|
February 25, 2016, 11:04 |
|
#7 |
Member
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11 |
Thanks for the reply , I have included a screenshot of the residuals. you can see that the residuals decay until certain value. If I manually reduce the time scale the results will keep improving. I am trying to find away to automate that .
I have tired to use the small time step from the begging however the results did freeze as it has been mentioned. |
|
February 25, 2016, 14:26 |
|
#8 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
You can continue with the approach of reducing the timescale; however, I would advice to understand the convergence problem instead of hiding the issue behind a smaller timescale.
For example, you can activate the output of the equation residuals and generate a backup file when the solution refuses to converge any further. Then, in CFD-Post find out where the MAX residual reported in the SM, or output file is located. Look if the flow makes sense in that region, is the mesh resolution good enough for the flow pattern observed ? Are the geometry details well represented in that region, etc.. Is the flow inherently steady state, or becoming transient in that region (which requires a smaller timescale or accurate transient to be resolved) Low quality mesh in certain regions prevent the iterative procedure to converge monotonically, and sometimes (not always) reducing the timescale may help. On automatically reducing the timescale, you can try a CEL expression for the timescale factor that changes based on other parameters such as timestep number, or a single valued metric of your choice. Think about a logical CEL expression. Hope the above helps, |
|
February 25, 2016, 18:16 |
|
#9 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
This looks like a FAQ: http://www.cfd-online.com/Wiki/Ansys...gence_criteria
|
|
February 25, 2016, 20:14 |
|
#10 |
Member
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11 |
Yeah that helped a lot thanks.
I was trying to create a CEL logical expression, but I did not know where to insert it and what commands can i use in CEL language . Where can i read more about CEL as i am quite new using CFX. |
|
February 25, 2016, 20:35 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Be careful about better apparent convergence with decreasing time step size - it means something funny is going on. You seem to be in exactly the situation the FAQ is talking about so I certainly would read that.
Many of the CFX tutorials use CEL so have alook at the tutorials for some tips. Also the CFX reference guide has a full description of CEL. But a simple example could be to set the time step size as a function of residual, such as if(Velocity u.Residual>1.0e-5,1[s],0.1[s]) |
|
February 26, 2016, 07:31 |
|
#12 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
Another very easy solution to automatically change the Timescale Factor after a certain number of time steps:
Create an expression in Pre named 'TimeStepControl' for example and define it like 'if(ctstep>150,1,100)' cstep = Current Time Step If current time step is larger than 150, set the auto timescale factor to 1. Otherwise (under 150 time steps), the factor is 100. In Solver Control, use that expression as Timescale Factor. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence parameter CFX Solver | chiragsvnit | CFX | 2 | March 17, 2014 01:45 |
I got code 1 error from ANSYS CFX | zlor1324 | CFX | 0 | March 11, 2014 20:22 |
Timescale Update Frequency | 100tinela | CFX | 5 | January 25, 2013 08:02 |
CFX doesn't continue calculation... | mactech001 | CFX | 6 | November 15, 2009 22:25 |
CFX 10's solutions differ from CFX 5.7's | Atit Koonsrisuk | CFX | 4 | July 26, 2006 12:59 |