Patent ID: 9026415
Filing Date: 2015-05-05
Classification: G06F

Abstract:
1. A computer program product for modeling a flow of a volatile product in a pipeline comprising a non-transitory computer readable storage medium having instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform a method of modeling the flow of the volatile product through the pipeline, the method comprising: creating a system of equations interrelating the laws of conservation of mass, energy and momentum of the volatile product in a plurality of discrete cells defined within a modeled segment of the pipeline; providing a plurality of sensors at a plurality of known cells of the modeled segment and using each provided sensor to detect a condition of the volatile product in a cell of the modeled segment disposed adjacent to the sensor; beginning a time step by providing to the processor a first set of signals corresponding to the conditions of the volatile product detected by the plurality of sensors; providing to the processor data relating to a plurality of physical characteristics of the pipeline; providing to the processor data relating physical positions of the known cells of the modeled segment; providing to the processor data relating to properties of the volatile product comprising a vapor pressure of the volatile product, a viscosity of the liquid phase of the volatile product, and a density of the liquid phase of the volatile product; providing to the processor a product liquid phase minimum area threshold; solving the system of equations using the processor to model a state of the volatile product in each discrete cell of the modeled segment of the pipeline using the data relating the physical characteristics of the pipeline, the data relating the positions of the known cells of the modeled segment, the data relating the properties of the volatile product and the first set of signals corresponding to conditions of the volatile product in the known cells adjacent to each of the plurality of sensors; determining an initial flow mode of the volatile product in each discrete cell of the modeled segment and during a first time step to be one of minimum area flow mode, slack flow mode and tight flow mode, wherein minimum area flow mode indicates that the cell is substantially empty of the liquid phase of the volatile product, tight flow mode indicates that the cell is completely filled with the liquid phase of the volatile product, and slack flow mode indicates that the cell is partially filled with the liquid phase of the volatile product with an upwardly disposed portion of the cell containing a vaporous phase of the volatile product with the liquid phase moving there below in open channel flow; initiating a re-stepping process by providing to the processor a second set of signals corresponding to the conditions of the volatile product detected by the plurality of sensors; solving the system of equations using the processor to model the state of the volatile product in each cell of the modeled segment of the pipeline using the data relating the physical characteristics of the pipeline, the data relating the physical positions of the cells of the modeled segment, the data relating the properties of the volatile product and the second set of signals corresponding to the conditions of the volatile product in the cells disposed adjacent to the plurality of sensors; determining, for each cell of the modeled segment for which it has been determined that the initial flow mode is tight, if the pressure at an upslope knot of the cell is less than or equal to the vapor pressure of the volatile product and that the velocity of the volatile product at a downslope knot of the cell is directed out of the cell; resetting the flow mode, for each cell of the modeled segment for which it has been determined that the initial flow mode is tight and that the pressure at the upslope knot of the cell is less than or equal to the vapor pressure of the volatile product and that the velocity of the volatile product at the downslope knot of the cell is directed out of the cell, to slack; determining, for each cell of the modeled segment for which it has been determined that the initial flow mode is minimum area, if an area of a flow of the liquid phase of the volatile product at the downslope knot is greater than the product liquid phase minimum area threshold; resetting the flow mode, for each cell of the modeled segment for which it has been determined that the initial flow mode is minimum area and that the area of the flow of the liquid phase of the volatile product at the downslope knot is greater than the product liquid phase minimum area threshold, to slack; for each cell of the modeled segment for which it has been determined that the initial flow mode is slack, determining if the area of a flow of the liquid phase of the volatile product at the downslope knot of the cell is less than the product liquid phase minimum area threshold; resetting the flow mode, for each cell of the modeled segment for which it has been determined that the initial flow mode is slack and that the area of flow of the liquid phase of the volatile product at the downslope knot of the cell is less than the product liquid phase minimum area threshold, to minimum area; determining, for each cell of the modeled segment for which it has been determined that the initial flow mode is slack, if the determined flow area of the liquid phase of the volatile product at the downslope knot of the cell is greater than a cross-sectional area of the pipeline; resetting the flow mode, for each cell of the modeled segment for which it has been determined that the initial flow mode is slack and that the flow area of the liquid phase of the volatile product at the downslope knot of the cell is greater than the cross-sectional area of the pipeline, to tight; determining whether any cell of the modeled segment has been reset; re-solving, in response to a determination that at least one cell of the modeled segment has been reset, the system of equations using the processor to model the state of the volatile product in each cell of the modeled segment of the pipeline using the data relating the physical characteristics of the pipeline, the data relating the physical positions of the cells of the modeled segment, the data relating the properties of the volatile product and the second set of signals corresponding to conditions of the volatile product in the cells adjacent to the plurality of sensors: terminating the re-stepping process; updating a set of primitive variables with a new solution; updating a set of non-primitive variables with the new solution; and terminating the time step.