neqsim-wax-calculations
Calculates wax properties and appearance temperatures for oil flow assurance.
Install
mkdir -p .claude/skills/neqsim-wax-calculations && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17912" && unzip -o skill.zip -d .claude/skills/neqsim-wax-calculations && rm skill.zipInstalls to .claude/skills/neqsim-wax-calculations
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when: performing NeqSim wax calculations, wax appearance temperature (WAT), wax fraction versus temperature curves, wax precipitation, waxy-oil viscosity, wax model tuning, or wax inhibitor screening for flow assurance studies. Covers the verified Java and Python API setup for wax-forming oils with TBP and plus fractions.Key capabilities
- →Calculate wax appearance temperature (WAT)
- →Determine wax weight fraction versus temperature curves
- →Evaluate wax fraction along a pressure profile
- →Simulate waxy-oil viscosity sensitivity
How it works
The skill uses NeqSim's thermodynamic operations and simulation classes to model wax behavior in oil and condensate systems, including WAT, wax fraction curves, and viscosity.
Inputs & outputs
When to use neqsim-wax-calculations
- →Calculate wax appearance temperature
- →Analyze wax precipitation curves
- →Screen wax inhibitors
About this skill
NeqSim Wax Calculations
Use this skill when a task needs a real NeqSim wax workflow rather than the simple wax-margin screening placeholder. Typical outputs are wax appearance temperature (WAT), wax weight fraction versus temperature, wax fraction along a pressure profile, waxy-oil viscosity sensitivity, and optional inhibitor dose-response screening.
When to Use
- A user asks for wax appearance temperature, WAT, wax precipitation, or wax phase calculations.
- A flow-assurance study needs wax fraction as a function of temperature or pressure.
- A crude assay contains TBP or plus fractions that can be characterized into wax-forming pseudo-components.
- A wax inhibitor, pour-point depressant, or cold-restart discussion needs a NeqSim WAT basis.
- A task needs to compare an operating or pipeline temperature profile against wax onset.
For a quick margin calculation when WAT is already known, use neqsim-wax-margin-check. For broader pipeline and hydrate/wax/asphaltene context, also load neqsim-flow-assurance.
Required Inputs
- Oil or condensate composition including wax-forming heavy fractions. Prefer measured TBP cuts and plus-fraction molar mass and density.
- Pressure in bara for the WAT or wax fraction calculation.
- Temperature range in Celsius for wax fraction curves.
- Wax model choice when specified:
Pedersendefault,Won,Wilson, orCoutinhoviasetWaxModelType(String)before adding the wax phase. - Optional lab data: measured WAT, DSC wax fraction, pour point, yield stress, inhibitor dose-response, or viscosity versus shear rate.
Wax Fluid Setup
Wax calculations need a characterized heavy-end oil and an explicit wax solid phase. The verified Java setup pattern is:
SystemInterface oil = new SystemSrkEos(273.15 + 60.0, 50.0);
oil.addComponent("methane", 0.30);
oil.addComponent("ethane", 0.10);
oil.addTBPfraction("C10", 0.15, 134.0 / 1000.0, 0.78);
oil.addTBPfraction("C15", 0.15, 206.0 / 1000.0, 0.83);
oil.addTBPfraction("C19", 0.10, 270.0 / 1000.0, 0.814);
oil.addPlusFraction("C20", 0.20, 350.0 / 1000.0, 0.88);
oil.getCharacterization().characterisePlusFraction();
oil.getWaxModel().addTBPWax();
oil.createDatabase(true);
oil.setMixingRule(2);
oil.addSolidComplexPhase("wax");
oil.setMultiphaseWaxCheck(true);
oil.setMultiPhaseCheck(true);
oil.init(0);
oil.init(1);
Notes:
- Use plus-fraction names without
+, for example"C20", not"C20+". - Call
characterisePlusFraction()beforegetWaxModel().addTBPWax(). - Call
setWaxModelType("Won"),setWaxModelType("Wilson"), orsetWaxModelType("Coutinho")beforeaddSolidComplexPhase("wax")if the default Pedersen model is not intended. - Keep the heavy-end basis traceable. Wax predictions are very sensitive to molar mass, density, and n-paraffin distribution.
Wax Appearance Temperature
Use ThermodynamicOperations#calcWAT() for a direct WAT. The operation changes the system temperature to the calculated wax appearance temperature.
ThermodynamicOperations ops = new ThermodynamicOperations(oil);
ops.calcWAT();
double watC = oil.getTemperature() - 273.15;
Use this for a single pressure point when the fluid has already been configured for wax calculations.
Wax Fraction Curve
Use neqsim.pvtsimulation.flowassurance.WaxCurveCalculator for a WAT and wax weight fraction curve with monotonicity enforcement.
WaxCurveCalculator wax = new WaxCurveCalculator(oil);
wax.setPressure(50.0);
wax.setTemperatureRange(-10.0, 80.0, 2.0);
wax.calculate();
double watC = wax.getWaxAppearanceTemperatureC();
double[] temperaturesC = wax.getTemperaturesC();
double[] waxWeightFractions = wax.getWaxWeightFractions();
int failedFlashes = wax.getFailCount();
int corrections = wax.getMonotonicityCorrections();
Temperature values are stored from high to low temperature. Wax fraction should increase as temperature decreases. Record failedFlashes and corrections in the task results so reviewers can judge numerical quality.
Pipeline Pressure Sensitivity
Use calculateAtMultiplePressures(double[], double) to evaluate wax fraction at one temperature across a pipeline pressure profile.
double[] pressuresBara = new double[] {120.0, 90.0, 60.0, 30.0};
Map<Double, Double> waxByPressure = wax.calculateAtMultiplePressures(pressuresBara, 25.0);
For a full pipeline profile, combine this with the pipeline temperature profile from a NeqSim pipe model or measured operating data. Compare local temperature against WAT at local pressure, and report wax fraction at each profile point.
PVT Wax Fraction Simulation
Use WaxFractionSim when the task follows the PVT simulation pattern or needs compatibility with existing PVT reports.
WaxFractionSim waxSim = new WaxFractionSim(oil);
double[] temperaturesK = new double[] {333.15, 313.15, 293.15, 273.15};
double[] pressuresBara = new double[] {50.0, 50.0, 50.0, 50.0};
waxSim.setTemperaturesAndPressures(temperaturesK, pressuresBara);
waxSim.runCalc();
double[] waxFractions = waxSim.getWaxFraction();
The array returned by getWaxFraction() is the system weight fraction in the wax phase at each pressure and temperature point.
Waxy-Oil Viscosity
Use ViscosityWaxOilSim when viscosity increase below WAT or shear-rate sensitivity matters. Configure the wax fluid as above, then set matching temperature, pressure, and shear-rate arrays. Treat results as model-sensitive and validate against lab viscosity data when available.
Wax Inhibitor Screening
For inhibitor or pour-point-depressant screening, first calculate the untreated WAT using WaxCurveCalculator or calcWAT(). Then use neqsim.process.chemistry.wax.WaxInhibitorPerformance for a transparent dose-response estimate.
WaxInhibitorPerformance inhibitor = new WaxInhibitorPerformance();
inhibitor.setBaseWaxAppearanceTemperatureC(watC);
inhibitor.setBasePourPointC(24.0);
inhibitor.setDoseMgL(200.0);
inhibitor.setMaxPourPointDepressionC(18.0);
inhibitor.setDoseAt50PctEfficacyMgL(150.0);
inhibitor.evaluate();
double inhibitedWatC = inhibitor.getInhibitedWaxAppearanceTemperatureC();
double efficacy = inhibitor.getEfficacyFraction();
List<String> warnings = inhibitor.getWarnings();
This inhibitor model is a screening relation. Use lab bottle tests, cold-finger data, and field-trial evidence for design decisions.
Python Notebook Pattern
In repository task notebooks, use devtools/neqsim_dev_setup.py and direct Java classes through ns so the workspace classes are used.
SystemSrkEos = ns.SystemSrkEos
ThermodynamicOperations = ns.ThermodynamicOperations
WaxCurveCalculator = ns.JClass("neqsim.pvtsimulation.flowassurance.WaxCurveCalculator")
oil = SystemSrkEos(273.15 + 60.0, 50.0)
oil.addComponent("methane", 0.30)
oil.addComponent("ethane", 0.10)
oil.addTBPfraction("C10", 0.15, 134.0 / 1000.0, 0.78)
oil.addTBPfraction("C15", 0.15, 206.0 / 1000.0, 0.83)
oil.addPlusFraction("C20", 0.20, 350.0 / 1000.0, 0.88)
oil.getCharacterization().characterisePlusFraction()
oil.getWaxModel().addTBPWax()
oil.createDatabase(True)
oil.setMixingRule(2)
oil.addSolidComplexPhase("wax")
oil.setMultiphaseWaxCheck(True)
oil.setMultiPhaseCheck(True)
oil.init(0)
oil.init(1)
wax = WaxCurveCalculator(oil)
wax.setPressure(50.0)
wax.setTemperatureRange(-10.0, 80.0, 2.0)
wax.calculate()
wat_c = wax.getWaxAppearanceTemperatureC()
temperatures_c = list(wax.getTemperaturesC())
wax_weight_fractions = list(wax.getWaxWeightFractions())
Validation Checklist
- Heavy-end composition has measured or documented TBP and plus-fraction molar mass and density.
- Plus fraction was characterized before wax pseudo-components were added.
- A wax solid phase was added and
setMultiphaseWaxCheck(true)was enabled. - WAT was compared against at least one independent reference when possible: lab WAT, DSC data, pour point trend, or published example.
- Wax fraction curve has physically monotonic behavior after any documented corrections.
- Failed flash count and monotonicity corrections are recorded.
- Sensitivity to pressure, heavy-end characterization, and wax model type is discussed for design-grade work.
- Results are not used for pigging intervals, deposition growth, or restart design without deposition and rheology validation.
Common Failure Modes
| Symptom | Likely Cause | Fix |
|---|---|---|
| No wax phase appears | Wax phase not added or wax check disabled | Add addSolidComplexPhase("wax"), enable setMultiphaseWaxCheck(true), and rerun |
| WAT is unrealistically low | Heavy-end characterization is too light or missing n-paraffins | Review TBP cuts, plus-fraction molar mass, density, and wax model parameters |
| WAT calculation fails | Search range or initial fluid state is poor | Use WaxCurveCalculator over a broad temperature range and inspect failed flashes |
| Wax fraction decreases when cooling | Numerical flash artifact | Use monotonicity-enforced WaxCurveCalculator output and record correction count |
| Python notebook sees old API | Installed neqsim package is stale | Use the devtools setup cell with workspace classes or rebuild/package the JAR |
Reporting Requirements
For task reports, include:
- EOS and wax model type.
- Full heavy-end basis and units.
- WAT in Celsius at each pressure.
- Wax fraction curve table or figure with temperature in Celsius and wax weight fraction.
- Numerical quality indicators: failed flashes, monotonicity corrections, and sensitivity checks.
- Assumptions, validation source, and limits of use.
Related NeqSim Classes
neqsim.thermodynamicoperations.ThermodynamicOperations#calcWAT()neqsim.pvtsimulation.flowassurance.WaxCurveCalculatorneqsim.pvtsimulation.simulation.WaxFractionSimneqsim.pvtsimulation.simulation.ViscosityWaxOilSimneqsim.process.chemistry.wax.WaxInhibitorPerformanceneqsim.thermo.characterization.WaxModelInterfaceneqsim.thermo.phase.PhaseWax
Content truncated.
When not to use it
- →For a quick margin calculation when WAT is already known
- →When the crude assay does not contain TBP or plus fractions
- →When results are used for pigging intervals, deposition growth, or restart design without deposition and rheology validation
Limitations
- →Wax predictions are very sensitive to molar mass, density, and n-paraffin distribution
- →WAT calculation can fail if the search range or initial fluid state is poor
- →Wax fraction can decrease when cooling due to numerical flash artifact
How it compares
This skill provides a detailed, physics-based simulation of wax behavior using NeqSim, offering more complete analysis than simple empirical methods.
Compared to similar skills
neqsim-wax-calculations side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| neqsim-wax-calculations (this skill) | 0 | 18d | No flags | Advanced |
| exploratory-data-analysis | 15 | 1mo | Review | Intermediate |
| model-compare | 7 | 7mo | Review | Advanced |
| astropy | 6 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by equinor
View all by equinor →You might also like
exploratory-data-analysis
K-Dense-AI
Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats. This skill should be used when analyzing any scientific data file to understand its structure, content, quality, and characteristics. Automatically detects file type and generates detailed markdown reports with format-specific analysis, quality metrics, and downstream analysis recommendations. Covers chemistry, bioinformatics, microscopy, spectroscopy, proteomics, metabolomics, and general scientific data formats.
model-compare
rawwerks
Compare 3D CAD models using boolean operations (IoU, Dice, precision/recall). Use when evaluating generated models against gold references, diffing CAD revisions, or computing similarity metrics for ML training. Triggers on: model diff, compare models, IoU, intersection over union, model similarity, CAD comparison, STEP diff, 3D evaluation, gold reference, generated model, precision recall 3D.
astropy
davila7
Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.
statistical-analysis
anthropics
Apply statistical methods including descriptive stats, trend analysis, outlier detection, and hypothesis testing. Use when analyzing distributions, testing for significance, detecting anomalies, computing correlations, or interpreting statistical results.
datacommons-client
davila7
Work with Data Commons, a platform providing programmatic access to public statistical data from global sources. Use this skill when working with demographic data, economic indicators, health statistics, environmental data, or any public datasets available through Data Commons. Applicable for querying population statistics, GDP figures, unemployment rates, disease prevalence, geographic entity resolution, and exploring relationships between statistical entities.
analyzing-market-sentiment
jeremylongshore
Analyze cryptocurrency market sentiment using Fear & Greed Index, news analysis, and market momentum. Use when gauging overall market mood, checking if markets are fearful or greedy, or analyzing sentiment for specific coins. Trigger with phrases like "analyze crypto sentiment", "check market mood", "is the market fearful", "sentiment for Bitcoin", or "Fear and Greed index".