neqsim-pvt-regression-characterization-factor

Regresses one characterization factor against weighted PVT and separator targets using golden-section search.

4|2|Updated May 31, 2026
One-click install
npx skills add https://github.com/equinor/neqsim-community-skills --skill neqsim-pvt-regression-characterization-factor-equinor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neqsim-pvt-regression-characterization-factor
Source: https://github.com/equinor/neqsim-community-skills/tree/main/skills/pvt/pvt-regression-characterization-factor
Command: npx skills add https://github.com/equinor/neqsim-community-skills --skill neqsim-pvt-regression-characterization-factor-equinor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Calibrating a single heavy-end split or characterization factor so a fluid model reproduces several measured PVT and separator quantities at once is tedious when done by trial and error, especially when targets differ in importance and units. ## Core Features & Use Cases - Weighted multi-target regression: Fits one factor against saturation pressure, GOR, stock-tank-oil density, and formation volume factor with per-target weights and normalized relative residuals. - Gradient-free golden-section search: Robust 1-D optimization over bounded intervals, suitable for noisy flash and PVT forward models. - Injected forward model: No EOS dependency; wrap a NeqSim characterization plus flash/PVT evaluation or any custom model. - Use Case: Given measured saturation pressure of 248 bara and stock-tank-oil density of 832 kg/m3, fit the split factor so a NeqSim fluid model matches both, then inspect per-target residuals to judge match quality. ## Quick Start Regress my characterization factor between 0.6 and 3.0 against measured saturation pressure and stock-tank-oil density using my NeqSim forward model, and report the fitted factor with per-target residuals.

Frequently Asked Questions about neqsim-pvt-regression-characterization-factor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I regress a characterization factor against measured PVT data?▼

Provide a forward model mapping a candidate factor to predicted quantities, define RegressionTarget entries with measured values and weights, then call regress_characterization_factor with search bounds. It returns the fitted factor, objective, and per-target residuals.

What PVT targets can be used in the weighted regression?▼

Typical targets are saturation pressure in bara, gas-oil ratio in Sm3/Sm3, stock-tank-oil density in kg/m3, and oil formation volume factor in m3/Sm3. Any named quantity the forward model returns can serve as a target.

Does this skill require NeqSim or other dependencies?▼

No, the regression code is dependency-free pure Python. The forward model is injected by the caller, so pairing with NeqSim characterization and flash calculations is optional but typical.

Why does the regression raise a missing-prediction error?▼

The forward model must return a predicted value for every target name in the targets list. A measured value of zero also raises because relative residuals would be undefined, and low must be less than high.

When should I use full EOS regression instead of single-factor fitting?▼

Use rigorous NeqSim PVT-simulation and tuning classes when you need to regress kij, Tc, Pc, acentric factor, or volume shift. This single-factor screening approach only calibrates one characterization factor and requires qualified PVT review.