Flow simulations are usually made in Eulerian coordinates, which are fixed with the observer. In the case of a pipeline simulation, the coordinate system is fixed in the pipeline. This seems reasonable, since measurements are made in the pipeline's coordinate system and, ultimately, results are wanted in that system. However, the laws of motion were originally formulated for the motion of fixed masses. The mass in a volume element fixed in pipeline space is continually changing, both in identity and amount, as mass flows in and out. Not only does the mass change, but other properties change due to the difference in velocity, temperature, and composition of the flows in and out. These changes in pressure, temperature, density, velocity, and composition, due to convection, are in addition to the changes due to forces acting on the fluid in the volume element (pressure gradient, friction, gravity), and to conduction and diffusion. The equations of motion, usually formulated as conservation laws, have additional terms, with ensuing additional complexity, to take this convection of mass, momentum, energy, and composition into account. In a coordinate system moving with the fluid, there is no convection in or out of the moving fluid elements, and the equations of motion are substantially simpler. For example, the mass and composition of the moving fluid element do not change at all, except slightly by diffusion in special situations. The density is determined by the expansion or compression of the fluid volume element. Simpler equations of motion are simpler to solve numerically. Countering the simpler equations, there are the additional housekeeping tasks of accounting for the moving fluid elements, and of mapping the solution results back into the fixed system for output. Moving element simulators are used in aerodynamics, primarily for the increased accuracy given by higher point densities in the compressed air around flying objects. In a pipeline the major advantage, other than simpler flow equations, is that all tracking (batches, composition, thermal fronts, additives, heating value, point of origin…) is done automatically. This paper describes a numerical fluid flow simulator for pipelines based on a Lagrangian coordinate system, in which the model points or fluid elements move with the fluid. It discusses the practical advantages and disadvantages, and compares results with conventional fixed coordinate system simulators.
Equations (1a), (2a), and (3a) together with an equation of state can be solved for the four dynamic variables (density, velocity, temperature, and pressure) by numerical methods. In addition, the positions of the fluid elements must be calculated at each time step. Although implicit1 methods may provide better accuracy and stability, in order to make the procedures and interactions more transparent, an explicit numerical 1 Explicit numerical methods calculate changes from values of the dynamic variables at the beginning of the time step.