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

Adaptive Time Stepping with a Variable as criterion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2016, 03:20
Default Adaptive Time Stepping with a Variable as criterion
  #1
Senior Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 173
Rep Power: 14
monkey1 is on a distinguished road
Hello Everybody!

I'm dealing with flow Simualtions and interfaces with conditional state changes. My problem is, that when my interface state changes from closed to open I need very small time steps. But to reach that point I'd rather use bigger time steps to save computing time.

Coming to my question:
Is there a possibility for setting the condition for time step adaption in dependency of a flow variable. I would want something like:
If Pressure < Value then adapt the time step till reaching a (high) max value
If Pressure >= Value limit the max value for the time step to a very small value

If I use Courant or coeff loop adaption my system crashes when opening the interface due to too big time steps. Also, I already tried smth. like:
max Time step = if(areaAve(Absolute Pressure)@Interface Location< 1.4[bar],0.01[s],1e-7[s])
But the simulation didn't even start, telling me "Absolute Pressure" is an unknown value at the time of evaluation.

Thx for "listening"
monkey1 is offline   Reply With Quote

Old   March 17, 2016, 20:24
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 adaptive time step method should have given you the time step size which can run well when the interface is open or shut. So I would make a user function which uses that time step size when it is steady state and ramps down to a small time step for the open/shut event then ramps back up again afterwards.
ghorrocks is offline   Reply With Quote

Old   March 18, 2016, 02:11
Default
  #3
Senior Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 173
Rep Power: 14
monkey1 is on a distinguished road
Dear Glenn,

at first thx for the answer.
I'm doing a transient simulation of a vessel equipped with a burst disc. Inside this vessel an gas mixture is ignited and due to the combustion process the pressure rises. When a pressure threshold is reached, the burst disc is failing. That is what I wanted to simulate.

The adaptive time stepping does not give me the time step for the open/close state change moment. While the interface is closed, both domains are fully separated and the solkutions is converging fast and good leading to a big time step. As the adaptive time stepping is not able to "anticipate" what will happen, it runs into the state change with the too big time step leading to a crash. That's why I want to link the time step size to a physical variable controllign the state change.

Your tip with the user function is nice...but will it work when I make a function with input parameter absoulte pressure and output time step?
Another kind of time step adaption does not come to my mind as I do NOT know when the state change will occur.

Best regards!
monkey1 is offline   Reply With Quote

Old   March 18, 2016, 19:33
Default
  #4
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
Oh - you don't know when the state change occurs. Then you can make the function from just about any variables you like, so if pressure is the trigger then use that.
ghorrocks is offline   Reply With Quote

Old   March 22, 2016, 02:46
Default
  #5
Senior Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 173
Rep Power: 14
monkey1 is on a distinguished road
Ok I will try that.
My first shot to write in the field:
Maximum Timestep
the following expression:
if(areaAve(Absolute Pressure )@REGION:BERSTSCHEIBE>1.38[bar],0.0000001[s],0.01[s])

lead to a direct crash of the solver with the following message:

Error processing expression 'Maximum Timestep'.
The expression is invalid because:
Absolute Pressure is not available for use in this term

So I'm curious to see if this problem disappears when using a user function.
monkey1 is offline   Reply With Quote

Old   March 22, 2016, 16:30
Default
  #6
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
Try using just pressure, not absolute pressure. I suspect that will be available.
ghorrocks is offline   Reply With Quote

Old   April 20, 2016, 09:05
Default
  #7
Senior Member
 
Join Date: Jul 2011
Location: Berlin, Germany
Posts: 173
Rep Power: 14
monkey1 is on a distinguished road
Indeed, using the variable names given in the "CFX- Reference Guide" Chapter "Variables in ANSYS CFX " it works.

monkey1 is offline   Reply With Quote

Reply

Tags
adaptive time step, time stepping


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
Elastic or Plastic Deformations in OpenFOAM NickolasPl OpenFOAM Pre-Processing 36 September 23, 2023 08:22
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Adaptive Time Stepping: First Update Time JuPa CFX 2 January 7, 2015 06:09
CFL in dual time stepping with implicit scheme dokeun Main CFD Forum 0 May 8, 2013 23:01
autosave at flow time with adaptive time stepping Ybes FLUENT 0 November 3, 2007 12:32


All times are GMT -4. The time now is 12:27.