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

Timestep control via CEL?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By HekLer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2007, 12:45
Default Timestep control via CEL?
  #1
Claudia
Guest
 
Posts: n/a
Hi,

is it possible to set the physical timestep via an expression? Or is it possible to control the timestep in any other way than manually? I would like to choose a larger timestep for example in the first 50 iterations and then a smaller one.

Thanks Claudia
  Reply With Quote

Old   September 12, 2007, 13:18
Default Re: Timestep control via CEL?
  #2
Alex
Guest
 
Posts: n/a
There are a number of ways to do this. You can use an expression if you like, or you can just give a list of timesteps. Check the documentation: CFX-Pre Users Guide -> Simulation Type -> Editing the Simulation Type -> Basic Settings Tab.
  Reply With Quote

Old   September 12, 2007, 13:24
Default Re: Timestep control via CEL?
  #3
Claudia
Guest
 
Posts: n/a
But this is I think only for transient simulations. My simulation is steady state.

  Reply With Quote

Old   September 12, 2007, 13:33
Default Re: Timestep control via CEL?
  #4
Robin
Guest
 
Posts: n/a
Hi Claudia,

Create a 1D interpolation function of timestep in [s] vs iteration number, which is dimensionless []. You can do so in the GUI, but here is the resulting CCL object:

LIBRARY:
CEL:
FUNCTION: myTimeStep
Argument Units = []
Option = Interpolation
Profile Function = Off
Result Units = [s]
INTERPOLATION DATA:
Data Pairs = 0,0.1,50,0.1,60,0.01
Extend Max = On
Extend Min = On
Option = One Dimensional
END
END
END
END

The above function will use a timestep of .1 for the first 50 iterations, then linearly decrease it to .01 between 50 and 60 iterations. The Extend Min and Extend Max parameters simply extend the max and min values to be used beyond the range defined in the function (if you don't enable these you'll get a failure at iteration 61 because the function would be undefined)

You would then define your timestep as either:

myTimeStep(aitern) or myTimeStep(citern)

'aitern' returns the Absolute Iteration Number (i.e. the number of iterations since it was first started) whereas 'citern' returns the Current Iteration Number (the number of iterations in the current run, reset to zero with each restart).

Regards,
Robin
  Reply With Quote

Old   September 12, 2007, 14:36
Default Re: Timestep control via CEL?
  #5
Alex
Guest
 
Posts: n/a
It works for steady state as well.
  Reply With Quote

Old   September 13, 2007, 09:00
Default Re: Timestep control via CEL?
  #6
Claudia
Guest
 
Posts: n/a
Thanks Robin,

I will test it in the next simulation. But I think this is what I looked for.

Claudia
  Reply With Quote

Old   September 13, 2007, 15:02
Default Re: Timestep control via CEL?
  #7
HekLer
Guest
 
Posts: n/a
If you don't want to use an interpolation function you can also use the CEL step() function. For example, you could create a CEL expression like this:


CEL:
EXPRESSIONS:
transition = 15
dt1 = 1.0 [s]
dt2 = 10.0 [s]
dtf = dt1*step(transition-aitern) + step(aitern-transition)*dt2
END
END


and then set the physical timescale to dtf. This will transition from dt1 to dt2 at the specified iteration.
FluidViscosity likes this.
  Reply With Quote

Old   September 14, 2007, 06:00
Default Re: Timestep control via CEL?
  #8
Claudia
Guest
 
Posts: n/a
Hi HekLer,

yes, I tried it a few days ago and it didn't work, but I think it was my fault. I will try it once more.

Thanks!

Claudia
  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
Problems of running Oscillating plate tutorial vovogoal CFX 20 February 4, 2016 08:03
Problems with adjustable timestep control and maxCo Number wolle1982 OpenFOAM Running, Solving & CFD 5 September 24, 2015 11:07
error in two way fsi kmgraju CFX 1 May 2, 2011 03:32
Timestep in Free Surface Wigley Hull Carlos Andrés CFX 8 April 29, 2007 17:38
maintaining a logarithmic velocity distribution Morten Andersen CFX 1 January 8, 2007 12:37


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