Although only accessible if you have licensed the Excel add-in option there are some problems that are best approached using Excel. Some of these are discussed in the Multiflash Excel manual, such as generating tables of pure component data or using linked flashes or recycles for simple flowsheet calculations.
Those presented here were set up following user requests and include generating binary interaction parameters for activity coefficient models and linking predictions of solid formation to a common fluid analysis.
Although we have not included them here some users wish to fit their own experimental data for components not included in their version of Multiflash. To help users to do this we do have available a series of spreadsheets for the fitting of pure component data. They are not issued with the standard installation but we will supply them on request.
UNIFAC is a very useful model as the binary interaction parameters are generated from the group structures of the pure components and so reasonable predictions of phase equilibria can be obtained for polar systems without the need for stored BIPs.
However, there may be times when you wish to use an alternative model such as NRTL. Although we are continually expanding our BIP databank there may be some binary pairs in your mixture for which we do not have stored NRTL parameters. If you do not have the time to search for experimental data for the missing pairs, or are unable to find any, then this spreadsheet allows you to generate the phase equilibria data from UNIFAC, providing group structures are available for your chosen components, and then fit this data using another activity model.
The spreadsheet has several worksheets.
The first spreadsheet consists of notes on how to use UNFICAFIT.xls and how to enter the fitted BIPs in Multiflash.
This is the worksheet where you generate the phase equilibria data (liquid and gas phase compositions and temperature or pressure) that you are going to fit.
You specify, by entering information in the appropriate cell:
The required data is then generated, including column headings and plots. The composition range is fixed and the units are SI. There is no need to change these although it is possible.
An Error box reports the status of the data generation. This should be OK if the UNIFAC group structures are available for your chosen components. An error status of –13201 would indicate that the structures are missing for one or both compounds.
Once the data has been generated you can move to the worksheet for the model you wish to use, WilsonE, UNIQUAC VLE or NRTL VLE.
All the model worksheets function in a similar manner. The component names, conditions, temperature or pressure are copied from the UNIFAC worksheet as are the phase equilibria data. The user enters initial guesses for the BIPs, a useful default is to start with 0.0 for both, and using the Excel Tools/Solver to start the fitting procedure. Once the best solution has been reached the new BIPs will be reflected in the cells used for starting guesses and in the cells reporting the fitted BIPs. One of the useful benefits of using Excel is that the results are plotted for comparison with the UNIFAC generated data allowing the user to decide easily whether the solution is acceptable.
If the solution is not acceptable then you can try
Once acceptable BIPs have been generated they can be entered and stored in Multiflash as described in the spreadsheet notes or “Supplementing or overwriting BIPs” on page 35.
Although NRTL has three parameters we have chosen not to fit all three but to default the third parameter, alpha, to 0.3. You can over-ride this if you wish but we would suggest that values for alpha should never be negative and should rarely be larger than 0.6.
Currently the fitting is limited to constant values for the BIPs although this could be expanded if necessary.
This is substantially the same as UNIFACFIT.xls but the starting point is experimental data rather than data generated from the UNIFAC model.
Instead of the first UNIFAC worksheet there is an Experimental worksheet to enter the data. Again you can choose the data source for your pure component data and indicate whether your chosen data is along an isotherm or isobar. In order to minimise effort this spreadsheet does allow you to choose the units for temperature and pressure to match those measured. The temperature or pressure for the isotherm or isobar should be entered as should the values for x, y and associated T or P.
We have chosen a limited array for data entry. If you have more data and are familiar with Excel you can extend the range although you will need to remember to change the cell references in the dependent worksheets. Otherwise you should limit the data by choosing suitable points from the data available.
If you have less data then you should enter #N/A in the cells which would otherwise be empty. This is necessary for the Excel Solver to operate correctly. For some data sets you may have P,x or T,x but no data for gas composition, y. In this case it is better to enter #N/A for the y compositions. If you fail to do this the Solver will still function provided the minimisation criteria is based on difference in temperature or pressure – the default. However, the plots for x,y will not be relevant and should be ignored.
As with UNIFACFIT.xls you can fit the experimental data to generate BIPs for WilsonE, UNIQUAC VLE or NRTL VLE by choosing the appropriate worksheet.
Several of the engineers using Multiflash for Windows have found it fairly complex to obtain results for solid formation particularly for asphaltenes. Improvements to allow users to fit bubble point and asphaltene model parameters at the same time go some way to alleviating this problem. However, we had set up a spreadsheet, which many engineers find useful and which we will still issue as part of the implementation. Of course you will only be able to use any worksheet if you have licensed the appropriate model.
The Solids.xls includes the recommended PVT analysis routines and solids models; the CPA/Electrolyte model for Hydrates, the Coutinho wax model for waxes and the asphaltene model is standard.
The spreadsheet consists of several worksheets and each worksheet has the relevant models built-in in hidden rows or columns. As the PVT Analysis is complex, the PVT calculations are carried out using Multiflash for Windows, and the mfl file written and referenced in the first worksheet.
The Excel calculations are set to manual using the Excel Tools/Options facility. This is to prevent automatic calculation of the whole spreadsheet as new compositions are entered. To update any individual worksheet use Shift F9, to update the whole spreadsheet use F9.
The user characterises the PVT using the Multiflash GUI and enters the full directory path and mfl file name to provide the characterised fluid information. As all calculations in the spreadsheet have to be referenced to this fluid characterisation we recommend that the characterisation is based on splitting the fluid plus fraction from C6 into 15 pseudocomponents for both isoparaffins and n-paraffins. This controls the number of components and negates the need for the user to modify the Excel functions to ensure that all components and compositions are included in any calculation. The units for calculation are also set in this worksheet.
This first worksheet includes a bubble point calculation at a temperature or pressure set by the user. This allows you to decide whether to tune the petroleum fraction properties to match a known bubble point or if this is unnecessary.
The list of possible components is based on the default component list used in our PVT Analysis utility. The user enters the compositions and any other information available such as the molecular weight and specific gravity. The SARA analysis can be entered; the resin and asphaltene amounts are needed for the asphaltene model although they can be estimated if required. The user can specify the starting point and the number of fractions for the characterisation although we would recommend staying with C6 and 15 fractions.
If the predicted bubble point is sufficiently different from a known value then this worksheet allows the user to match a known bubble point. The fluid composition is taken from the characterised fluid in the PVT Analysis worksheet. The user specifies the bubble point to be matched and the bubble point is recalculated after the match to confirm that this has been carried out. A new problem input specification is written into this worksheet as a result of the match but it is in hidden rows or column.
The next worksheet is dedicated to prediction of wax precipitation, although the worksheets for wax, asphaltene and hydrates are not inter-dependent and can be used in any order. The user can choose to use the fluid characterisation direct from the PVT Analysis or with petroleum fraction properties tuned to match a bubble point.
The first set of calculations predict the wax appearance temperature (WAT) without any further tuning plus the amount of wax formed at a user specified T,P. The calculation is carried out based on the fixed wax phase fraction flash function and the amount of wax is set to be .00015 mole fraction of wax in the liquid+wax phases. There is a function called MF_PWAT, equivalent to the WAT button in the GUI, that calculates the WAT at a fixed mass or mole fraction of the wax phase. This can be relative to either the total fluid or to the liquid plus wax phases.
For matching a measured WAT for a finite amount of wax phase, a command is used for specifying the measured WAT in the Solids.xls. For the detailed information about how to use the commands, refer to the section of Matching wax data in the Multiflash Command Reference manual.
The WAT is plotted automatically as a function of pressure. The starting pressure and step can be set by the user to obtain the pressure range of choice.
These calculations can be repeated based on matching to a known WAT, if one is available.
The asphaltene worksheet again offers the choice of using the PVT Analysis characterisation direct or the characterisation after matching to a known bubble point. For asphaltene modelling we would recommend the latter.
The options for producing the asphaltene model parameters are not as flexible in Excel as in the Windows front end. You are limited to two options, the flocculation or reservoir conditions and you must supply both temperature and pressure. The matching is done by using a command with the temperature and pressure refer to either asphaltene ADE or reservoir condition. For detailed command information, refer to the section of Matching asphaltene deposition point in the Multiflash Command Reference manual.
After matching the user can set either temperature or pressure and calculate the corresponding P or T for the upper and lower boundaries of the flocculation envelope. There is also an option for entering a set of T,P and calculating the amount of asphaltene formed at those conditions.
Every effort has been made to plot the asphaltene flocculation envelope automatically with starting points derived from the flocculation or reservoir conditions. However, as the engineers using our Windows phase envelope facility will appreciate it is difficult to make this absolutely foolproof.
The effect of gas injection on asphaltene flocculation is perhaps most easily calculated in Excel. The asphaltene model parameters for any fluid should be retained when studying the effect of added gas and the gas injection worksheet is therefore dependent on the asphaltene worksheet for the problem input specification and the matching function is disabled. It serves only to report the conditions chosen for matching.
The composition of the gas is entered and the ratio of gas to oil is based on a simple molar ratio.
You can still change conditions of temperature and/or pressure to determine the boundaries for flocculation and the amount of asphaltene flocculated. The boundaries for asphaltene flocculation, with and without gas injection are plotted but it cannot be guaranteed that this will be available for all fluids and gas injection rates.
The hydrate functionality is well served in our Windows software and easily used. We have only added a hydrate worksheet here for completeness and to allow the engineer to carry out quick checks for possible hydrate formation. It encapsulates the main features of our hydrate model but does not have the flexibility of the Windows program.
The user needs to add an amount of water to the fluid and this can either be pure water or produced water with the salt content defined by ion analysis or total dissolved solid. The hydrate dissociation temperature can be calculated at a single pressure or plotted as a function of pressure. The hydrate is defined as hydrate2 only, which is the usual hydrate formed especially as the spreadsheet is designed to work with oils rather than natural gases.
There is also a section in the worksheet for looking at the use of inhibitors. These are limited to the two most common, methanol or MEG. They can be added in fixed amount or the concentration required for hydrate inhibition at set conditions can be predicted.
Users who want to investigate hydrate behaviour only may find the hydrateinfo.xls and hydratecpa.xls spreadsheets useful. These have a restricted component list (gases and gas condensates) but offer a choice of fluid and salt model and a wider choice of calculations.