A computer model has been developed which is capable of predicting the physical and chemical condition inside of a flowline or pipeline. From this information it is then possible to provide a prediction of the internal corrosion rate. This “free” software was funded by the US. Department of Energy and has undergone several revisions and is currently in Phase II. The windows based model consists of 4 modules, which calculate the temperature, pressure, phase equilibrium, flow dynamics as well as the pH, scale tendency and the uninhibited corrosion rate. An expert system has been developed which adjusts the predicted corrosion rate based on fluid parameters. A number of field and hypothetical cases for both the flowlines and pipelines have been presented which show the utility of the model. The model has been compared to PipePhase, a commercial package, and the results have been very satisfactory. INTRODUCTION A computer model has been developed in Visual Basic, which allows the user to physically and chemically describe a production system and to estimate the internal corrosion rate. The model, which was recently presented at NACE is a continuation of work done on earlier oil well and gas well – models that have been developed over the past 20 years by the Corrosion Research Center at the University of Louisiana at Lafayette. Unlike the previous models, this model is “free” to the user since it was funded by the US Department of Energy. During the 4-year study, 3 versions of the program were developed with Phase II being the most recent version released on June 26, 2003. In this paper a brief description of the flowlines and pipeline models are given. Emphasis has been placed on Case Studies of pipelines and flowlines, which describe the range of use of the models. The input data required by the program is information that is readily available to the corrosion engineer. This includes production information from the separator, inlet and outlet temperature and pressure, the various coatings and the dimensions of the flowline or pipeline, as well as the slope of various sections of the pipeline. VARIOUS MODULES OF THE MODEL The computer model consists of five modules as seen in Figure 1. The modules are all dependent on each other for data. The physical description part of the model must be looped until there is convergence on the pressure drop through the individual pipeline or flowline. After the pressure drop converges, the chemical module, pH and scale calculation is run and then the corrosion rate calculation is performed. A brief description of each module follows: 1. Temperature Module: In most instances, the pipeline or flowline is loosing heat to the environment. By dividing the pipeline or flowline into small segments, it is possible to determine the heat lost in each segment and the exiting temperature of that segment. The overall heat transfer coefficient for the pipe must be estimated using coating information and then using the fact that the enthalpy loss by the production fluid equals the heat loss, it is possible to calculate the temperature at the end of the segment. Internal and an external coating data can be input together with information about the surrounding medium. Calculations can be made with the pipe in seawater, mud or in air. The starting temperature must be known, and the program will match the known ending temperature if desired. 2. Phase Equilibrium Module: It is critical in corrosion prediction to know the amount of fluids, gas, oil and water, at various points in the pipeline or flowline. The Peng Robinson Equation of State (EOS) does a very good job in the prediction of dew points of hydrocarbon systems. For phase equilibrium to