Skip to the content.

Overview

Crude oils contain organic (naphthenic) acids. When the produced water pH rises, usually because CO2 leaves the water as the pressure drops through the process, the acids dissociate at the oil-water interface and react with cations in the water. Two problems follow:

Problem Acid Product Where
Calcium naphthenate deposits ARN tetraacids (C80, about 1230 g/mol), mg/kg levels Hard, sticky Ca-ARN solid at the interface Separators, hydrocyclones, desalters
Carboxylate soaps, sludge, tight emulsions Monoprotic acids measured by TAN, 200-500 g/mol Calcium soap CaA2 and dissolved sodium naphthenate Separators, produced water

NaphthenatePrecipitationModel (package neqsim.pvtsimulation.flowassurance) calculates the distribution of both acid classes between oil, water and solid at equilibrium. NaphthenateModelFitting regresses the model parameters to laboratory or field data.

Model

\[\mathrm{HA(oil)} \rightleftharpoons \mathrm{HA(aq)} \qquad P = \frac{[\mathrm{HA}]_{oil}}{[\mathrm{HA}]_{aq}}\] \[\mathrm{HA(aq)} \rightleftharpoons \mathrm{H^+ + A^-} \qquad K_a = \frac{a_{H^+}\,a_{A^-}}{[\mathrm{HA}]_{aq}}\] \[\mathrm{CaA_2(s)} \rightleftharpoons \mathrm{Ca^{2+} + 2A^-} \qquad K_{sp} = a_{Ca^{2+}}\,a_{A^-}^2\] \[\mathrm{H_4A(oil) + 2Ca^{2+}} \rightleftharpoons \mathrm{Ca_2A(s) + 4H^+} \qquad K_{ARN} = \frac{a_{H^+}^4}{[\mathrm{H_4A}]_{oil}\,a_{Ca^{2+}}^2}\] \[\mathrm{CO_2(g) + H_2O} \rightleftharpoons \mathrm{H^+ + HCO_3^-} \qquad K_1 K_H = \frac{a_{H^+}\,a_{HCO_3^-}}{p_{CO_2}}\]

The monoprotic part has the structure of the model of Mohammed and Sorbie (2010). The ARN part is a single interfacial reaction because ARN is practically insoluble in water. Ion activity coefficients are from the Davies equation; $K_1$ and $K_H$ are from Plummer and Busenberg (1982). $K_{sp}$ and $K_{ARN}$ can be given a van’t Hoff temperature dependence.

The water pH is either

Parameters and their defaults

Parameter Default Basis
PKA 4.9 Measured for naphthenic acids in water (Havre et al., 2003)
LOG_PARTITION_COEFFICIENT $4.0 + 0.010\,(M - 300)$ Engineering default: a 300 g/mol acid is half extracted into an equal volume of water at about pH 9
PKSP_CALCIUM_SOAP 10.0 Engineering default: soap onset near pH 6.8 for TAN 1 mg KOH/g, 1000 mg/L Ca, 0.5 mol/L ionic strength
PK_ARN 14.4 Engineering default: ARN onset near pH 6.0 for 10 mg/kg ARN, 1000 mg/L Ca
CALCIUM_SOAP_DISSOLUTION_ENTHALPY, ARN_FORMATION_ENTHALPY 0 J/mol No temperature dependence unless fitted

Only pKa is a transferable physical constant. The other three depend on the acid structures of the crude; their defaults are anchored to typical field onset behaviour, not taken from a publication. With defaults the model ranks cases and shows sensitivities (pH, calcium, water cut, CO2 pressure). Quantitative amounts require regression to data. isCalibrated() reports which situation applies and an uncalibrated run carries a warning in getWarnings() and toJson().

The solubility products of crystalline fatty-acid calcium soaps are not usable for PKSP_CALCIUM_SOAP: they predict complete precipitation at any produced-water pH, because real naphthenic calcium soaps are partly oil soluble.

Predictive use

NaphthenatePrecipitationModel model = new NaphthenatePrecipitationModel();
model.setWaterCut(0.5);                               // 1 m3 liquid, 50 % water
model.setOilDensity(850.0);                           // kg/m3
model.setTotalAcidNumber(1.0);                        // mg KOH/g
model.setAcidMolarMass(300.0);                        // g/mol
model.setArnConcentration(10.0);                      // mg/kg oil
model.setWaterComposition(1000.0, 10000.0, 500.0);    // Ca, Na, HCO3- in mg/L
model.setTemperature(333.15);                         // K

double arnOnsetPH = model.calculateArnOnsetPH();              // about 6.0
double soapOnsetPH = model.calculateCalciumSoapOnsetPH();     // about 6.8

// First-stage separator: 5 bara CO2 partial pressure
model.setCO2PartialPressure(5.0);
model.run();
double pHHighPressure = model.getWaterPH();                   // about 5.2, NO_RISK

// Low-pressure separator: 0.2 bara CO2 partial pressure
model.setCO2PartialPressure(0.2);
model.run();
double pHLowPressure = model.getWaterPH();                    // about 6.5
NaphthenatePrecipitationModel.NaphthenateRisk risk = model.getRisk();   // ARN_DEPOSIT_RISK
double arnDeposit = model.getPrecipitatedArnNaphthenate();    // kg per m3 oil
double soap = model.getPrecipitatedCalciumSoap();             // kg per m3 oil
double dissolvedAcid = model.getAqueousOrganicAcidConcentration();   // mg/L in the water
String json = model.toJson();

Calcium soap and ARN salt compete for the same calcium; the two are solved together, and getEquilibriumCalciumSoapSaturationRatio() / getEquilibriumArnSaturationRatio() are 1 for a salt that has precipitated. Non-finite input is rejected by run().

getRisk() returns NO_RISK (more than 0.5 pH units below every onset), LOW_RISK (within 0.5 units), SOAP_RISK (calcium soap supersaturated) or ARN_DEPOSIT_RISK (ARN salt supersaturated).

The CO2 partial pressure and bicarbonate can be taken from a NeqSim process simulation (CO2 mole fraction in the separator gas times pressure). The pH route here is a carbonate-only estimate; for brines with significant organic-acid anions (acetate) or H2S use a measured pH or a pH from the electrolyte models and pass it with setWaterPH.

Calibration to data

Each observation is one experiment: a model holding the experiment conditions, the measured quantity, and its standard deviation.

ObservationType Unit Determines
AQUEOUS_ORGANIC_ACID mg/L pKa + log P (partition tests without calcium)
PRECIPITATED_CALCIUM_SOAP kg/m3 oil pKsp of the calcium soap
CALCIUM_SOAP_ONSET_PH pH pKsp of the calcium soap
PRECIPITATED_ARN_FRACTION 0-1 pK of ARN
ARN_ONSET_PH pH pK of ARN
WATER_PH pH Consistency of the CO2 pH route
NaphthenatePrecipitationModel bottleTest = new NaphthenatePrecipitationModel();
bottleTest.setWaterCut(0.5);
bottleTest.setOilDensity(850.0);
bottleTest.setTotalAcidNumber(1.0);
bottleTest.setAcidMolarMass(300.0);
bottleTest.setArnConcentration(10.0);
bottleTest.setWaterComposition(1000.0, 10000.0, 500.0);
bottleTest.setTemperature(333.15);

NaphthenateModelFitting fitting = new NaphthenateModelFitting();

// Soap mass (kg/m3 oil) measured at three buffered pH values, standard deviation 0.1 kg/m3
double[] testPH = {7.5, 8.0, 8.5};
double[] soapMass = {2.6, 3.9, 4.4};
for (int i = 0; i < testPH.length; i++) {
  bottleTest.setWaterPH(testPH[i]);
  fitting.addObservation(bottleTest, NaphthenateModelFitting.ObservationType.PRECIPITATED_CALCIUM_SOAP,
      soapMass[i], 0.1);
}
// ARN deposit first seen at pH 6.3 +/- 0.1
fitting.addObservation(bottleTest, NaphthenateModelFitting.ObservationType.ARN_ONSET_PH, 6.3, 0.1);

fitting.addFitParameter(NaphthenatePrecipitationModel.Parameter.PKSP_CALCIUM_SOAP);
fitting.addFitParameter(NaphthenatePrecipitationModel.Parameter.PK_ARN);
fitting.solve();

double pKsp = fitting.getFittedValue(NaphthenatePrecipitationModel.Parameter.PKSP_CALCIUM_SOAP);
double pKspError = fitting.getStandardError(NaphthenatePrecipitationModel.Parameter.PKSP_CALCIUM_SOAP);
double fitQuality = fitting.getRootMeanSquareWeightedResidual();   // near 1 = within stated uncertainty

// Use the fitted parameters for field predictions
NaphthenatePrecipitationModel field = bottleTest.copy();
fitting.applyTo(field);                       // also marks the model as calibrated
field.setCO2PartialPressure(0.2);
field.run();

addObservation copies the scenario, so one model can be reused with changed conditions.

solve() returns false, and applyTo throws, when the fitted model has no value for an observed quantity (for example an ARN onset pH for an oil without ARN), so a model is never marked as calibrated on data it cannot reproduce.

Fit only parameters the data can determine:

Limitations

References