Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/neqsim-engine.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d75c8314a0ac14bebdd2be5c0a733be836cbc9752a19bb6c9185b8cbb32d40bb neqsim-3.29.0.jar
4a5c9f993302fe59ffb0aceb189ca9c9a8751e03d8b03b9a5ba2161c01d95aa2 neqsim-3.30.0.jar
4 changes: 2 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set name = "neqsim" %}
{% set version = "3.29.0" %}
{% set version = "3.30.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: a7a6683e2f0bc45025e9c2d20e28ceff3c447ff46fd351770e280a0089683900
sha256: 4d4288781a2cd3d272ff204a6cdf013ae8d5dee4eba4b67f020850e63053d2c6

build:
number: 0
Expand Down
77 changes: 77 additions & 0 deletions docs/release-notes/v3.30.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# NeqSim Python 3.30.0

NeqSim Python 3.30.0 bundles the NeqSim Java 3.30.0 engine and refreshes
the Java type stubs and offline API manifest available to Python users.

## Highlights

- Hydrate calculations converge for the CO₂/NaCl/MEG brine case at 44 bara.
This release also updates CPA model selection and Pitzer parameters for MEG.
- Gas enthalpy after a TP flash now uses the converged phase state. In the
methane/water SRK regression at 280 K and 10 bara, the immediate result
agrees with explicit property initialization.
- Cryogenic calculations include fixes for Leachman hydrogen and GERG-2008
flashes.
- PVT calculations use corrected volume conventions in differential liberation
and constant-mass expansion and flash separator oil at stock-tank conditions.
- Two-fluid pipelines report outlet pressure at the physical outlet face.
Beggs–Brill calculations account for gravitational energy in the energy balance.
- Process studies include well-to-export dynamics with parallel compressor
protection and plant shutdown, and dry gas seal vent studies for normal
operation and failure cases.
- The pip wheel now includes the generated Java engine type stubs.

## Install

Use pip when you already have Java installed:

```bash
pip install --upgrade neqsim==3.30.0
```

The matching conda-forge package can be installed once it is published:

```bash
conda install -c conda-forge neqsim=3.30.0
```

Requirements:

- Python 3.10 or newer.
- Java 17 or newer for pip installs. Download Java from
[Adoptium](https://adoptium.net/).
- Conda installs include OpenJDK through conda-forge.

Verify the installed package version without starting the JVM:

```bash
python -c "from importlib.metadata import version; print(version('neqsim'))"
```

## Quick Start

```python
from neqsim.thermo import TPflash, fluid, printFrame

natural_gas = fluid("srk")
natural_gas.addComponent("methane", 0.85)
natural_gas.addComponent("ethane", 0.10)
natural_gas.addComponent("propane", 0.05)
natural_gas.setTemperature(25.0, "C")
natural_gas.setPressure(60.0, "bara")
natural_gas.setMixingRule("classic")

TPflash(natural_gas)
printFrame(natural_gas)
```

## Engine provenance

The bundled Java 17+ engine is the official `neqsim-3.30.0.jar`.
Its SHA-256 is `4a5c9f993302fe59ffb0aceb189ca9c9a8751e03d8b03b9a5ba2161c01d95aa2`.

- [NeqSim Java 3.30.0 release and full engine changelog](https://github.com/equinor/neqsim/releases/tag/v3.30.0)
- [Python package changes since 3.29.0](https://github.com/equinor/neqsim-python/compare/v3.29.0...v3.30.0)
- [Documentation](https://equinor.github.io/neqsimhome/)
- [Python examples](https://github.com/equinor/neqsim-python/tree/master/examples)
- [Discussions](https://github.com/equinor/neqsim/discussions)
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies:
# Install neqsim from PyPI until conda-forge package is available
- pip
- pip:
- neqsim==3.29.0
- neqsim==3.30.0
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "neqsim"
version = "3.29.0"
version = "3.30.0"
description = "NeqSim is a tool for thermodynamic and process calculations"
authors = [{ name = "Even Solbraa", email = "esolbraa@gmail.com" }]
requires-python = ">=3.10,<4"
Expand Down Expand Up @@ -54,7 +54,8 @@ dev = [
default-groups = "all"

[tool.uv.build-backend]
# Allow namespace packages to include both neqsim and jneqsim-stubs
# Include the runtime package and the Java engine type stubs in wheels.
module-name = ["neqsim", "jneqsim-stubs"]
namespace = true
# Include the license and stub package in source distributions.
source-include = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ class ChemicalReactionConcentrationBasis(java.lang.Enum['ChemicalReactionConcent
class ChemicalReactionDataSource(java.lang.Enum['ChemicalReactionDataSource']):
STANDARD: typing.ClassVar['ChemicalReactionDataSource'] = ...
PITZER: typing.ClassVar['ChemicalReactionDataSource'] = ...
MOLAL_CARBONATE: typing.ClassVar['ChemicalReactionDataSource'] = ...
KENT_EISENBERG: typing.ClassVar['ChemicalReactionDataSource'] = ...
def getDatabaseTableName(self) -> java.lang.String: ...
def getIdentifier(self) -> java.lang.String: ...
@staticmethod
def isCarbonateReaction(string: typing.Union[java.lang.String, str]) -> bool: ...
def requiresValidatedActiveReactions(self) -> bool: ...
_valueOf_0__T = typing.TypeVar('_valueOf_0__T', bound=java.lang.Enum) # <T>
@typing.overload
Expand Down
9 changes: 0 additions & 9 deletions src/jneqsim-stubs/mcp/runners/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ class BioprocessRunner:
@staticmethod
def run(string: typing.Union[java.lang.String, str]) -> java.lang.String: ...

class CapabilitiesRunner:
@staticmethod
def getCapabilities() -> java.lang.String: ...
@staticmethod
def getSetupTemplate(string: typing.Union[java.lang.String, str]) -> java.lang.String: ...
@staticmethod
def getSetupTemplates() -> java.lang.String: ...

class ChemistryRunner:
@staticmethod
def getSupportedAnalyses() -> java.util.List[java.lang.String]: ...
Expand Down Expand Up @@ -566,7 +558,6 @@ class __module_protocol__(Protocol):
BatchRunner: typing.Type[BatchRunner]
BenchmarkTrust: typing.Type[BenchmarkTrust]
BioprocessRunner: typing.Type[BioprocessRunner]
CapabilitiesRunner: typing.Type[CapabilitiesRunner]
ChemistryRunner: typing.Type[ChemistryRunner]
ComponentQuery: typing.Type[ComponentQuery]
CompositionRunner: typing.Type[CompositionRunner]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Diffusivity(jneqsim.physicalproperties.methods.commonphasephysicalproperti
def getEffectiveDiffusionCoefficient(self, int: int) -> float: ...
def getFickBinaryDiffusionCoefficient(self, int: int, int2: int) -> float: ...
def getMaxwellStefanBinaryDiffusionCoefficient(self, int: int, int2: int) -> float: ...
def setPhase(self, physicalProperties: jneqsim.physicalproperties.system.PhysicalProperties) -> None: ...

class CorrespondingStatesDiffusivity(Diffusivity):
def __init__(self, physicalProperties: jneqsim.physicalproperties.system.PhysicalProperties): ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ class PFCTViscosityMethodMod86(Viscosity):
def setCspViscosityCorrectionFactor(self, int: int, double: float) -> None: ...
def setCspViscosityCorrectionFactors(self, doubleArray: typing.Union[typing.List[float], jpype.JArray]) -> None: ...

class BnsLbcViscosityMethod(LBCViscosityMethod):
def __init__(self, physicalProperties: jneqsim.physicalproperties.system.PhysicalProperties): ...
def getCriticalVolume(self, int: int) -> float: ...


class __module_protocol__(Protocol):
# A module protocol which reflects the result of ``jp.JPackage("jneqsim.physicalproperties.methods.commonphasephysicalproperties.viscosity")``.

BnsLbcViscosityMethod: typing.Type[BnsLbcViscosityMethod]
CO2ViscosityMethod: typing.Type[CO2ViscosityMethod]
FrictionTheoryViscosityMethod: typing.Type[FrictionTheoryViscosityMethod]
KTAViscosityMethod: typing.Type[KTAViscosityMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Diffusivity(jneqsim.physicalproperties.methods.gasphysicalproperties.GasPh
def getMaxwellStefanBinaryDiffusionCoefficient(self, int: int, int2: int) -> float: ...
def isTemperatureInValidRange(self) -> bool: ...
def setEnableTemperatureWarnings(self, boolean: bool) -> None: ...
def setPhase(self, physicalProperties: jneqsim.physicalproperties.system.PhysicalProperties) -> None: ...
def setUseDiffusionLJOverride(self, boolean: bool) -> None: ...

class FullerSchettlerGiddingsDiffusivity(Diffusivity):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Diffusivity(jneqsim.physicalproperties.methods.solidphysicalproperties.Sol
def getEffectiveDiffusionCoefficient(self, int: int) -> float: ...
def getFickBinaryDiffusionCoefficient(self, int: int, int2: int) -> float: ...
def getMaxwellStefanBinaryDiffusionCoefficient(self, int: int, int2: int) -> float: ...
def setPhase(self, physicalProperties: jneqsim.physicalproperties.system.PhysicalProperties) -> None: ...


class __module_protocol__(Protocol):
Expand Down
10 changes: 10 additions & 0 deletions src/jneqsim-stubs/process/corrosion/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class NorsokM001MaterialSelection(java.io.Serializable):
def toMap(self) -> java.util.Map[java.lang.String, typing.Any]: ...

class NorsokM506CorrosionRate(java.io.Serializable):
LEGACY_RATE_MODEL: typing.ClassVar[java.lang.String] = ...
@typing.overload
def __init__(self): ...
@typing.overload
Expand All @@ -349,6 +350,7 @@ class NorsokM506CorrosionRate(java.io.Serializable):
def calculateFugacityCoefficient(self) -> float: ...
def calculateGlycolCorrectionFactor(self) -> float: ...
def calculatePHCorrectionFactor(self, double: float) -> float: ...
def calculateRev2UnmitigatedRate(self, double: float, double2: float) -> float: ...
def calculateScaleCorrectionFactor(self) -> float: ...
def calculateScalingTemperature(self) -> float: ...
def calculateWallShearStress(self) -> float: ...
Expand Down Expand Up @@ -401,6 +403,7 @@ class NorsokM506ElectrolyteBridge(java.io.Serializable):
def getH2sMoleFraction(self) -> float: ...
def getInSituPH(self) -> float: ...
def getModel(self) -> NorsokM506CorrosionRate: ...
def isElectrolytePhaseSuspect(self) -> bool: ...
def isFreeWaterPresent(self) -> bool: ...
def isPHFromElectrolyteModel(self) -> bool: ...
def run(self) -> None: ...
Expand All @@ -410,6 +413,12 @@ class NorsokM506ElectrolyteBridge(java.io.Serializable):
def setPipeDiameterM(self, double: float) -> None: ...
def toJson(self) -> java.lang.String: ...

class NorsokM506Rev2:
@staticmethod
def fugacityBar(double: float, double2: float, double3: float) -> float: ...
@staticmethod
def rateMmPerYear(double: float, double2: float, double3: float, double4: float) -> float: ...

class OxygenCorrosionAssessment(java.io.Serializable):
def __init__(self): ...
def evaluate(self) -> None: ...
Expand Down Expand Up @@ -521,6 +530,7 @@ class __module_protocol__(Protocol):
NorsokM001MaterialSelection: typing.Type[NorsokM001MaterialSelection]
NorsokM506CorrosionRate: typing.Type[NorsokM506CorrosionRate]
NorsokM506ElectrolyteBridge: typing.Type[NorsokM506ElectrolyteBridge]
NorsokM506Rev2: typing.Type[NorsokM506Rev2]
OxygenCorrosionAssessment: typing.Type[OxygenCorrosionAssessment]
PipeSegmentIntegrity: typing.Type[PipeSegmentIntegrity]
RobustAqueousPH: typing.Type[RobustAqueousPH]
Expand Down
47 changes: 47 additions & 0 deletions src/jneqsim-stubs/process/diagnostics/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,52 @@ class OscillationAnalyzer(java.io.Serializable):
def getTotalRms(self) -> float: ...
def isResolutionLimited(self) -> bool: ...

class ProcessBalanceDiagnosis:
@staticmethod
def assess(rcaProcessWindow: 'RcaProcessWindow', map: typing.Union[java.util.Map[typing.Union[java.lang.String, str], float], typing.Mapping[typing.Union[java.lang.String, str], float]], list: java.util.List['ProcessBalanceDiagnosis.Meter']) -> 'ProcessBalanceDiagnosis': ...
def getCandidates(self) -> java.util.List['ProcessBalanceDiagnosis.Candidate']: ...
def getDurationSeconds(self) -> float: ...
def getResiduals(self) -> java.util.Map[java.lang.String, 'ProcessBalanceDiagnosis.Residual']: ...
def getStatus(self) -> 'ProcessBalanceDiagnosis.Status': ...
class Candidate:
def getKind(self) -> 'ProcessBalanceDiagnosis.Kind': ...
def getMaximumKgPerS(self) -> float: ...
def getMinimumKgPerS(self) -> float: ...
def getTag(self) -> java.lang.String: ...
class Kind(java.lang.Enum['ProcessBalanceDiagnosis.Kind']):
METER_BIAS: typing.ClassVar['ProcessBalanceDiagnosis.Kind'] = ...
UNMETERED_OUTFLOW: typing.ClassVar['ProcessBalanceDiagnosis.Kind'] = ...
_valueOf_0__T = typing.TypeVar('_valueOf_0__T', bound=java.lang.Enum) # <T>
@typing.overload
@staticmethod
def valueOf(class_: typing.Type[_valueOf_0__T], string: typing.Union[java.lang.String, str]) -> _valueOf_0__T: ...
@typing.overload
@staticmethod
def valueOf(string: typing.Union[java.lang.String, str]) -> 'ProcessBalanceDiagnosis.Kind': ...
@staticmethod
def values() -> typing.MutableSequence['ProcessBalanceDiagnosis.Kind']: ...
class Meter:
def __init__(self, string: typing.Union[java.lang.String, str], string2: typing.Union[java.lang.String, str], string3: typing.Union[java.lang.String, str], double: float): ...
class Residual:
def getAccumulationKgPerS(self) -> float: ...
def getBoundKgPerS(self) -> float: ...
def getNetInflowKgPerS(self) -> float: ...
def getResidualKgPerS(self) -> float: ...
class Status(java.lang.Enum['ProcessBalanceDiagnosis.Status']):
WITHIN_BOUNDS: typing.ClassVar['ProcessBalanceDiagnosis.Status'] = ...
SINGLE_CANDIDATE: typing.ClassVar['ProcessBalanceDiagnosis.Status'] = ...
AMBIGUOUS: typing.ClassVar['ProcessBalanceDiagnosis.Status'] = ...
UNEXPLAINED: typing.ClassVar['ProcessBalanceDiagnosis.Status'] = ...
_valueOf_0__T = typing.TypeVar('_valueOf_0__T', bound=java.lang.Enum) # <T>
@typing.overload
@staticmethod
def valueOf(class_: typing.Type[_valueOf_0__T], string: typing.Union[java.lang.String, str]) -> _valueOf_0__T: ...
@typing.overload
@staticmethod
def valueOf(string: typing.Union[java.lang.String, str]) -> 'ProcessBalanceDiagnosis.Status': ...
@staticmethod
def values() -> typing.MutableSequence['ProcessBalanceDiagnosis.Status']: ...

class RcaDiagnosis(java.io.Serializable):
def getEvidence(self) -> 'RcaEvidence': ...
def getRankedHypotheses(self) -> java.util.List['RcaDiagnosis.RankedHypothesis']: ...
Expand Down Expand Up @@ -685,6 +731,7 @@ class __module_protocol__(Protocol):
Hypothesis: typing.Type[Hypothesis]
HypothesisGenerator: typing.Type[HypothesisGenerator]
OscillationAnalyzer: typing.Type[OscillationAnalyzer]
ProcessBalanceDiagnosis: typing.Type[ProcessBalanceDiagnosis]
RcaDiagnosis: typing.Type[RcaDiagnosis]
RcaDiagnosisEngine: typing.Type[RcaDiagnosisEngine]
RcaEvidence: typing.Type[RcaEvidence]
Expand Down
Loading
Loading