Pipe Sectioning - Introduction to Method of Characteristics
To run any transient simulation in AFT Impulse, the pipes in the model must first be sectioned - required for the Method of Characteristics solution approach utilized. A brief overview of the impact the Method of Characteristics has on the model is covered here - for a detailed discussion on the mathematics behind the method see: Method of Characteristics.
What is Sectioning?
The Method of Characteristics requires the entire system to be solved every time step. To accomplish this, every section must use a common time step. If the time steps were allowed to vary throughout the model, some portions of the system would be solved "ahead" of others, resulting in a time-distorted solution.
Furthermore, the Method of Characteristics requires that any information propagated from a given calculation point arrives at the neighboring calculation points after one time step. The method cannot allow information to be "lost" between time steps or calculation stations - the distance between calculation points is locked to the duration of a time step.
The time Δt it takes to travel from one point to another is determined by the linear distance Δx and wavespeed a between those points. We have defined this time to be the time step for the transient simulation.
Each section must be continuous and unchanging fluid path. In other words, the physical properties of the pipe cannot change within a single section. This means that every Pipe in the model must have a whole number of sections - otherwise the section would be interrupted by a Junction. In mathematical terms, a pipe of any length L must have N sections of length Δx:
In any system there will be a single controlling pipe. This is the pipe with the fewest sections, generally only one. As this pipe cannot have any fewer sections, the sectioning of the entire system is effectively controlled by this pipe.
What happens if the system cannot be evenly divided? For example, consider a system of two pipes - each with identical wavespeed. One of the pipes is 20% longer than the other.
Figure 1: Mismatch in pipe lengths
If we state that Pipe 1 - the controlling pipe - should have 1 section, Pipe 2 must have 1.2 sections to meet the time step restriction. However, this fails the whole number of sections requirement. One solution here is to find a common denominator that evenly divides both pipes. If we state that Pipe 1 has five sections, then Pipe 2 can be divided into six sections of the same length. But what if the common denominator is a very large number? Consider the below system.
Figure 2: Smaller mismatch in pipe lengths
If all three pipes were the exact same length, we only need one section in each pipe. Due to the length variation, Pipe 3 - the controlling pipe - would require 97 sections. This also means that the time step must be 97 times smaller! We have increased the number of calculation points by nearly a factor of 100 and the number of time steps required by the same factor. The small variation in length will cause the simulation to take nearly 100*100 = 10,000 times longer! Clearly, this is unacceptable for any practical purposes.
The solution is to allow some variance (ψ) into the system. The time step cannot be adjusted independently across sections. Instead, we can adjust the wavespeed in each pipe.
Again consider the three pipe example - if we decrease the wavespeed in Pipe 3 to 97% of its original value, and increase it in Pipe 2 to 101% of the original value, we can arrive back at our ideal situation - 1 section in each pipe. A 3% change in wavespeed can be considered negligible for any reasonable transient simulation - there are greater uncertainties than this in almost all studies.
Note that you can decrease the maximum variance further by adjusting the wavespeed in all three pipes. Above, we kept Pipe 1's wavespeed fixed - introducing the 3% variance in Pipe 3. If we vary the speed in Pipe 1 as well, we introduce some variance in Pipe 1, but we also make the Pipe 3 value smaller.
The standard allowance for variance in AFT Impulse is 10%. It is suggested to increase the number of sections in the controlling pipe until this value is under 10%. Some references such as WylieWylie, E.B., V.L. Streeter & L. Suo, Fluid Transients in Systems, Prentice Hall, Englewood Hills, New Jersey, 1993. accept up to 15% variance.
Sectioning Effect on Run Time
Extremely long run times are often a result of a large number of sections. As discussed above, the run time is approximately proportional to the square of the number of sections.
Large numbers of sections are rarely required for accurate results. There are a few common methods for reducing the number of sections:
-
Do not include minor sources of wave reflections as junctions.
-
Limit the difference between the longest and shortest pipes in the model. A very short pipe must have at least one section. If there is a very short pipe (1 meter) and a very long pipe (10,000 meters) then the model must have a large number of sections (10,001 sections). If the short pipe cannot be lumped into its adjoining pipe, it is often an acceptable approximation to artificially lengthen the short pipe. This may increase the error in the short pipe, but experience shows that this error is usually negligible in a fluid transient context. Increasing the very short pipe's length from 1 to 10 meters decreases the number of sections required by a factor of 10 - and therefore the runtime by a factor of 100.
-
Do not include extremely long pipes unless the transient behavior in those pipes is being directly analyzed. Instead, consider using the Infinite Pipe feature.
Sectioning Effect on Accuracy
Because each pipe section is explicitly solved along the characteristic lines from the Method of Characteristics, breaking pipes into continuously smaller sections offers no improvement in accuracy.
That is, using twice the number of sections in a pipe will not yield a more accurate prediction. This is in contrast to other kinds of finite difference methods where more increments offers improved accuracy.
Related Blogs
Analyzing Transients Faster - a Hacker's Guide to Pipe Sectioning