The simulation has a large number of time steps

A model with a large number of time steps will require a large number of calculations. The more calculations that need to be performed, the longer the run time.

How are the time steps contributing to long run times?

xStream sections pipe to apply the Method of Characteristics solution method. The Method of Characteristics requires a uniform time step to be used for all pipes in the model, which is determined during the sectioning process using the section length and the sonic velocity in the gas. On average the sonic velocity is typically on the magnitude of 103, producing a time step on the magnitude of 10-3.

A time step of 0.001 seconds means that a transient simulation of 1 minute will have 60,000 total time steps. Similarly, a transient simulation of 1 hour will have 3.6 million time steps. Run time is roughly proportional to the number of time steps, and models with large numbers of time steps will generally have long run times. In addition, models with higher wave velocity may require shorter time steps, increasing the number of time steps required.

What can the user do?

There are several different approaches to reduce run time when the number of time steps is larger than expected.

Consider reducing the simulation duration. The simulation duration is defined on the Simulation Duration panel. For a simple system, the full effect of the transient response occurs over twice the communication time, where the communication time is the time it takes a pressure wave to travel the length of the system and back (length of system / wave velocity). Determining the communication time can become more complex for systems with branching paths or major reflection points in the path. However, limiting the simulation duration to 2 times the communication time may be a good starting point. If multiple transient events occur the simulation duration should be extended to end after the transient response has completed for the last transient event.

In addition, for a piping network attached to a very long pipe it may not be necessary to include the length of the very long pipe in the communication time calculation. Use your engineering judgement on whether the reflections from the pipeline will be important to consider.

Consider lengthening the controlling pipe. The controlling pipe length is used to determine the time step for the simulation, setting the time step equal to the section length divided by twice the sonic velocity. Artificially lengthening the controlling pipe means the time step for the simulation can be longer, and fewer time steps are required for the simulation.

Consider decreasing the Minimum Number of Sections per Pipe. The length of the time step is determined by the length of the computational stations. If the minimum number of stations per pipe is large, then shorter sections and shorter time steps will be required. Note that decreasing the number of sections will decrease the accuracy of the solution. A sensitivity analysis is recommended to determine the effect of decreasing the number of sections on accuracy, see the Transient Sensitivity Analysis Tutorial.