Skip to content

Conversation

@EvenSol
Copy link
Collaborator

@EvenSol EvenSol commented Dec 13, 2025

Add parallel property flash calculations with derivative support

Summary

Adds high-performance parallel property flash calculations to ThermodynamicOperations, enabling 100+ simultaneous thermodynamic calculations using multiple CPU cores.

New Features

  • propertyFlashParallel() - Parallel PT/PH/PS flash using all available cores or custom thread count
  • propertyFlashBatch() - Memory-efficient batch processing for large datasets (100M+ points)
  • propertyFlashDerivatives() - Returns both properties AND numerical derivatives (∂P, ∂T) in a single optimized call using central finite differences

Key Highlights

  • Thread-safe execution via fluid cloning
  • Supports single-phase, two-phase, and three-phase systems
  • Configurable thread count and step sizes for derivatives
  • Python-compatible (uses standard lists, no Java ArrayList needed)

Files Added/Modified

  • ThermodynamicOperations.java - Core implementation
  • PropertyFlashParallelTest.java - 17 unit tests
  • docs/parallel_property_flash.md - API documentation
  • docs/examples/parallel_property_flash_example.ipynb - Jupyter notebook with examples

@EvenSol EvenSol requested a review from asmfstatoil December 13, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants