Adjusting Timesteps in Flownex

Categories:

Striking the right balance between fidelity and solve speed can be difficult. Flownex has several methods of handling timesteps. We will cover some basics of the adaptive time step as well as how to change the timestep during a simulation using actions. For this post, we will use Flownex version 8.15.0.5222.

Adaptive Timestep Background

We reached out to the developer to gain some additional insight on the adaptive timestep. We learned that the primary purpose of this feature is to maintain the fidelity of the solution rather than reduce the solution time. Below is a summary of the developer’s response:

The adaptive timestep is recommended for specific simulations where rigorous timestep independence studies are required, which will then rather aid the user in saving time to determine when smaller timesteps are typically required and what time step size to use. We would therefore recommend the following to consider when to use the adaptive timestep algorithm:

  • The goal of adaptive timesteps:
    • Automatically calculate the required timestep size to ensure that the truncation errors that result from the timestep integration are less than the specified tolerances in the scheduler settings. 
    • This does not speed up the time of a single simulation as the adaptive timestep algorithm repeats timesteps to calculate the truncation error at every timestep (this means, at minimum, the solver will need to solve 3x as many timesteps).
    • Instead, this speeds up the complete workflow for timestep independence studies (for example, water hammer simulation in a pipe network or uncertainty analysis for a nuclear system simulation) by automating the reduction in timestep and calculating the truncation error at each timestep.
  • How it works:
    • The theory is simply to halve the timestep and check that the truncation error is less than the tolerances that the user specified. If the truncation error is larger than the tolerance then the timestep is reduced and the process is repeated until the truncation error is less than the tolerances. The truncation error is found by “brute-force”: finding the difference in (results after one ΔT) and (results after two ΔT/2). 
  • Using this feature:
    • The truncation error is the error that arises by using the derivatives and a non-zero timestep to approximate the function (see image for extra information) for the non-iterative solver. The iterative solver is less sensitive to truncation errors but not entirely immune to it.
    • The first step is to determine an appropriate truncation error tolerance. This is not simple as choosing the right tolerance is similar to choosing the right relaxation parameter. There aren’t general rules that work all the time for all simulations and it requires experience to choose good values (or at least we can’t explain these rules in a simple way that is easy to generalize).
    • If you are performing a workflow that requires a rigorous timestep independence study then we suggest you speak to us so we can explain what values we would choose for that application. The hope is that with time you get a feel for how we choose these numbers.
ATSA

In the image the red line is the numerical solution and the blue line is the exact solution. At point A_0 the 2 solutions are the same as set by the initial conditions. The value at point A_1 is calculated using the gradient(s) at point A_0 and a specific timestep size. If the timestep is larger the difference between the numerical solution and the exact solution gets larger. This difference is referred to as the truncation error.

Using Adaptive Timestep

Changing the timestep using the adaptive timestep setting is relatively straightforward. Timesteps may be changed like any input property in Flownex. Users can access this property by viewing the Scheduler properties. This can be accessed through the solvers pane by clicking on the scheduler. You can also pop out the property window by clicking on the “Time Step Settings” in the Home Ribbon.

Timestep settings

Modifying the Time step control property to “Adaptive time step” will allow you to set how quickly the timestep increases, high and low thresholds, in addition to appropriate tolerances.

Timestep Settings

Once you have selected appropriate timestep and tolerance settings, you can run your simulation. We will run a simple network where the mass flow on a pipe is ramped down to zero through an action. The video below shows our network running with the adaptive timestep.

Adaptive Timestep

Modifying the Constant Timestep

You may also choose to modify the constant timestep during the simulation. This is most commonly implemented using actions, but users can also change this property through a script or parametric study.

If we know the timing of fast transient events during a long transient, it may be a good option to use an action. We will start with a simple pipe network, where a mass flow is reduced to zero through a transient action. We want to reduce the timestep quickly before the valve closes.

We will set the solver to initially run at 10ms prior to the transient event, and ramp down to capture the water hammer. First, we will need to open up the Actions Setup to view the running actions. We can drag and drop the timestep from the Scheduler properties into the into the actions pane to modulate our timestep.

Actions Setup 2

This action will ramp the flow solver from 100ms to 1ms. Now that we have our timestep setup, we can run our simulation.

Action Timestep

The simulation runs faster until the moment before mass flow is reduced. We are than able to capture pressure oscillations with a higher resolution by ramping our timestep down.

Closing Thoughts

Now we have learned a bit more about how the adaptive timestep operates and how we can modify the timestep property during a simulation. Timesteps may be adjusted in Flownex to reduce simulation time, or to ensure that reasonable truncation errors are achieved in a simulation. These tools are helpful for efficiently running transient simulations with multiple timescales.

Categories

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: . You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events

11/15/2023

2023 Governor’s Celebration of Innovation Awards

11/15/2023

Twin Builder Updates in Ansys 2023 R2 - Webinar

11/01/2023

Webinar: Additive's Role in Factory 4.0

10/25/2023

Ansys LevelUp 2023

10/25/2023

Nerdtoberfest 2023

10/25/2023

Mechanical Updates in Ansys 2023 R2 (3) - Webinar

10/18/2023

2023 Southern Arizona Tech + Business Expo

10/18/2023

Fluent GPU Solver Updates in Ansys 2023 R2 - Webinar

10/09/2023

Structural Updates in Ansys 2023 R2 (2) - Webinar

10/02/2023

Colorado Life Sciences Innovation Forum 2023

09/27/2023

2023 AZ Bio Awards

09/26/2023

Experience Stratasys Truck Tour - Houston

09/22/2023

AIAA Rocky Mountain Section Technical Symposium 2023

09/22/2023

Experience Stratasys Truck Tour - Dallas, TX

09/21/2023

Accelerating the Energy Transition through Simulation

09/20/2023

3D Printing vs. CNC Machining - Webinar

09/13/2023

Maxwell Updates in Ansys 2023 R2 - Webinar

09/12/2023

Sandia Science & Technology Park 25th Anniversary

09/12/2023

Experience Stratasys Truck Tour - Tempe, AZ

09/08/2023

26th Annual New Mexico Flying 40 Awards

09/08/2023

New Mexico Tech Summit

09/07/2023

New Mexico Tech Summit

08/30/2023

Structures Updates in Ansys 2023 R2 (1) - Mechanical, Post & Graphics

08/23/2023

Improved Injection Molding with Additive - Webinar

08/22/2023

SPIE Optics & Photonics Exhibition 2023

08/16/2023

Fluids Updates in Ansys 2023 R2 - Webinar

08/04/2023

Experience Stratasys Truck Tour - Salt Lake City, Utah

08/01/2023

Experience Stratasys Truck Tour - Denver Colorado

07/26/2023

Solving Supply Chain Issues with Additive - Webinar

07/25/2023

Arizona Tech Leadership Golf Tournament

07/24/2023

Arizona Tech CEO Leadership Retreat

07/19/2023

System Automation & Optimization Updates in Ansys 2023 R1 - Webinar

07/13/2023

2023 AEROSPACE, AVIATION, DEFENSE AND MANUFACTURING CONFERENCE

07/12/2023

Materials Updates in Ansys Granta 2023 R1 - Webinar

06/30/2023

Turbo Expo 2023

06/29/2023

Turbo Expo 2023

06/28/2023

Turbo Expo 2023

06/28/2023

Revolutionize Packaging Design with Additive - Webinar

06/27/2023

Turbo Expo 2023

06/27/2023

2023 E-MOBILITY AND CLEAN ENERGY SUMMIT

06/26/2023

Turbo Expo 2023

06/21/2023

Optics Updates in Ansys 2023 R1 - Webinar

06/07/2023

LS-DYNA Updates in Ansys 2023 R1 - Webinar

05/31/2023

Driving Automotive Innovation with Additive - Webinar

05/24/2023

Hill Air Force Base Tech Expo

05/24/2023

Structural Updates in Ansys 2023 R1 (3) – Structural Optimization & Ex

05/23/2023

CROSSTALK 2023: Emerging Opportunities for Advanced Manufacturing Smal

05/10/2023

Signal & Power Integrity Updates in Ansys 2023 R1 - Webinar

04/26/2023

Additive Manufacturing Updates in Ansys 2023 R1 - Webinar

04/20/2023

38th Space Symposium Arizona Space Industry

More Info

04/19/2023

38th Space Symposium
Arizona Space Industry

04/19/2023

Additive Aids for Manufacturing - Webinar

04/18/2023

38th Space Symposium
Arizona Space Industry

04/17/2023

38th Space Symposium

04/13/2023

Venture Madness 2023

04/12/2023

Fluid Meshing & GPU-Solver Updates in Ansys 2023 R1 - Webinar

03/29/2023

8th Thermal and Fluids Engineering Conference

03/29/2023

Structural Updates in Ansys 2023 R1 - Composites, Fracture & MAPDL

03/28/2023

8th Thermal and Fluids Engineering Conference

03/27/2023

8th Thermal and Fluids Engineering Conference

03/26/2023

8TH Thermal and Fluids Engineering Conference

03/24/2023

Arizona BioPreneur Conference | Spring 2023

03/22/2023

2023 Arizona MedTech Conference

03/22/2023

Optimize Jigs & Fixtures with Additive - Webinar

03/15/2023

3D Design Updates in Ansys 2023 R1 - Webinar

03/08/2023

Competitive Advantages of 1D/3D Coupled Simulation - Webinar

03/01/2023

High Frequency Updates in Ansys 2023 R1 - Webinar

02/22/2023

Additive Advantages in Aerospace - Webinar

02/15/2023

Structural Updates in Ansys 2023 R1 (1) - Webinar

02/09/2023

IME 2023: MD&M | WestPack | ATX | D&M | Plastek

02/08/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

02/07/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

01/27/2023

Arizona Photonics Days, 2023

01/26/2023

Arizona Photonics Days, 2023

01/26/2023

TIPE 3D Printing | 2023

01/26/2023

Venture Cafe Phoenix Talent Night - Job Fari

01/26/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/25/2023

Arizona Photonics Days, 2023

01/25/2023

Building A.M.- Utah: Kickoff!

01/25/2023

TIPE 3D Printing | 2023

01/25/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

TIPE 3D Printing | 2023

01/18/2023

2023 AZ Tech Council Golf Tournament

12/21/2022

Simulation Best Practices for 5G Technology - Webinar

12/14/2022

Digital Twins Updates in Ansys 2022 R2 - Webinar

12/08/2022

Tech the Halls - AZ Tech Council Holiday Mixer

12/07/2022

Electric Vehicle and Other Infrastructure Update Panel

11/30/2022

SPEOS Updates in Ansys 2022 R2 - Webinar

11/23/2022

Simulation Best Practices for Electronics Reliability - Webinar

11/16/2022

Discovery Updates in Ansys 2022 R2

11/10/2022

VentureCafe Phoenix Panel: Venture Capital in AZ

11/08/2022

2022 GOVERNOR’S CELEBRATION OF INNOVATION AWARDS + TECH SHOWCASE

11/03/2022

VentureCafe Phoenix Panel: Angel Investment in AZ

11/02/2022

High & Low Frequency Electromagnetics Updates in Ansys 2022 R2

10/26/2022

Simulation Best Practices For Chip-Package-System Design & Development

10/20/2022

Nerdtoberfest 2022

10/19/2022

2022 Southern Arizona Tech + Business Expo

10/19/2022

LS-DYNA Updates in Ansys 2022 R2 - Webinar

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: