PetroCalcHub
All workflow tools

Coupled PR Vapor-Liquid-Liquid-Wax Flash Calculator

Solve vapor, two liquids and pure C18 crystal amounts together, with a depleted-fluid flash, crystal complementarity and component-balance checks.

Inputs

Results

Calculate to view linked results. Default values are examples, not recommended operating inputs.

Local native models

Configurable components and multiple pure crystals are available in the separate file-based PR companion.

Local simulation workbench

Calculation sequence

  1. Enter an overall four-component mole feed summing to one. Every component must be at least 0.01 and C18 cannot exceed 0.6. The displayed water/hydrocarbon interaction parameter is supplied, not inferred from salinity or an assay. All hydrocarbon/hydrocarbon kij values are explicitly zero. The parameter table freezes the Chemicals 1.5.2 values used by the pinned Thermo 0.6.0 runtime; no live property database is queried.
  2. For a trial amount s of pure C18 crystal, calculate the remaining feed (z-s*e18)/(1-s) and run a fresh PR fluid stability search for at most one vapor and two liquids. Close the scalar solid affinity with a bracketed root, or accept zero crystal only when its complementarity inequality holds. Thermo FlashVLN's solids argument is not used: the separate outer equilibrium couples the crystal amount explicitly.
  3. Audit all fluid fugacities and EOS pressures, the depleted-fluid balance, the full feed-plus-crystal balance, solid complementarity and sampled total Gibbs objective. Additional multistart tangent-plane minimizations look for a lower fluid phase. Rejected roots, phase conditioning or stability checks produce an error with no partial allocation. Liquid 1 is the water-richer returned liquid, not a hard-coded pure-water bucket.
  4. Read all amounts on the original one-mole feed basis. Four phases are possible but never forced; warmer or undersaturated feeds can have no crystal, and a fluid phase can disappear. The component chart shows allocations rather than phase compositions. Numerical equilibrium within the stated model is not laboratory or field validation.
  5. Calculation stays in a dedicated local WebAssembly worker. The scientific engine is downloaded only on calculation; CFD additionally loads the existing hash-verified 178 KB finite-element package. No composition or field is sent to a calculation server. Save stores canonical inputs in this browser. Download its file backup from Saved work to protect it from browser-storage loss or share it with colleagues; reopening recalculates with the current formulas. CSV/PDF retain reported profiles and assumptions; the separate field CSV retains displayed CFD field samples.

Worked check

The synthetic default feed is 0.30 propane, 0.10 n-heptane, 0.25 water and 0.35 n-octadecane at 285 K and 0.3 MPa(a), with supplied water kij=0.48. It gives about 0.269553359 mol crystal per mole of feed and three coexisting fluid phases. Repeating at 300 K removes the crystal in this model. These are reproducible model cases, not measured wax precipitation data.

Synthetic examples for reproducibility, not measured field results.

Assumptions and limitations

  • 280-315 K and 0.1-1 MPa absolute; propane/n-heptane/water/n-octadecane only. One vapor, at most two PR liquids and one pure C18 crystal. This is not an arbitrary-composition commercial VLLS simulator.
  • Classical cubic PR is an illustrative water/hydrocarbon model, not an association, electrolyte, brine or calibrated aqueous activity model. Common supplied water kij and zero hydrocarbon pairs need measured validation before prediction.
  • No hydrate, ice, second crystal, polymorph, solid solution, asphaltene, reaction, particle size, deposition rate or transport is searched. Pure-solid fusion DeltaCp and DeltaV are neglected. No enthalpy/energy flash or physical bulk-solid density is reported.
  • Multistart tangent-plane checks and an outer Gibbs sample audit are numerical diagnostics, not a proof of global stability for arbitrary phases. Ill-conditioned vanishing fluid phases and failed closure are rejected; uncertainty in property data or mixing parameters is not estimated.

Implemented equations

Fluid equilibrium and solid complementarity

μiV=μiL1=μiL2Δμ=μs−μ18Fs≥0,Δμ≥0s Δμ=0\begin{gathered}\mu_i^V=\mu_i^{L_1}=\mu_i^{L_2}\\\Delta\mu=\mu_s-\mu_{18}^F\\s\ge0,\quad\Delta\mu\ge0\\s\,\Delta\mu=0\end{gathered}

One feed basis for every phase

zi=nVyi+n1x1i+n2x2i+sδi,181=nV+n1+n2+s\begin{aligned}z_i&=n_Vy_i+n_1x_{1i}\\&\quad+n_2x_{2i}+s\delta_{i,18}\\1&=n_V+n_1+n_2+s\end{aligned}
ComponentTc (K)Pc (Pa)Acentric factorLookup basis
Propane369.8942512000.1521HEOS
n-Heptane540.227357300.349HEOS
Water647.096220640000.3443HEOS
n-Octadecane74712900000.8087IUPAC critical / PSRK omega

Sources and maintenance

Published by PetroCalcHub Team. Implementation and source checks: . This does not claim independent expert review.

Report a correction

Related tools and references