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

CFX Auto timescale

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By ghorrocks
  • 1 Post By Opaque
  • 1 Post By ghorrocks
  • 2 Post By -Maxim-

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2016, 14:03
Default CFX Auto timescale
  #1
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 34
Rep Power: 10
ZakBristol is on a distinguished road
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
ZakBristol is offline   Reply With Quote

Old   February 22, 2016, 16:38
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ZakBristol likes this.
ghorrocks is offline   Reply With Quote

Old   February 23, 2016, 07:47
Default
  #3
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 34
Rep Power: 10
ZakBristol is on a distinguished road
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.
ZakBristol is offline   Reply With Quote

Old   February 23, 2016, 08:40
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
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.
ZakBristol likes this.
Opaque is offline   Reply With Quote

Old   February 23, 2016, 09:53
Default
  #5
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 34
Rep Power: 10
ZakBristol is on a distinguished road
What would you suggest to automate the reduction of timescale throughout the run?
ZakBristol is offline   Reply With Quote

Old   February 23, 2016, 10:15
Default
  #6
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
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,
Opaque is offline   Reply With Quote

Old   February 25, 2016, 10:04
Default
  #7
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 34
Rep Power: 10
ZakBristol is on a distinguished road
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.
Attached Images
File Type: png Capture.PNG (29.6 KB, 108 views)
ZakBristol is offline   Reply With Quote

Old   February 25, 2016, 13:26
Default
  #8
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
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,
Opaque is offline   Reply With Quote

Old   February 25, 2016, 17:16
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
This looks like a FAQ: http://www.cfd-online.com/Wiki/Ansys...gence_criteria
ghorrocks is offline   Reply With Quote

Old   February 25, 2016, 19:14
Default
  #10
Member
 
Zack
Join Date: Dec 2015
Location: uk
Posts: 34
Rep Power: 10
ZakBristol is on a distinguished road
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.
ZakBristol is offline   Reply With Quote

Old   February 25, 2016, 19:35
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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])
ZakBristol likes this.
ghorrocks is offline   Reply With Quote

Old   February 26, 2016, 06:31
Default
  #12
Senior Member
 
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 415
Rep Power: 12
-Maxim- is on a distinguished road
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.
ZakBristol and melihozgur like this.
-Maxim- is offline   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
Convergence parameter CFX Solver chiragsvnit CFX 2 March 17, 2014 00:45
I got code 1 error from ANSYS CFX zlor1324 CFX 0 March 11, 2014 19:22
Timescale Update Frequency 100tinela CFX 5 January 25, 2013 07:02
CFX doesn't continue calculation... mactech001 CFX 6 November 15, 2009 21:25
CFX 10's solutions differ from CFX 5.7's Atit Koonsrisuk CFX 4 July 26, 2006 11:59


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