Skip to main content

A Python package for analyzing solubility and acid formation behavior in Carbon Capture and Storage (CCS) systems

Project description

SolubilityCCS

A Python package for analyzing solubility and acid formation behavior in Carbon Capture and Storage (CCS) systems.

Installation

From PyPI (Recommended)

pip install solubilityCCS

From Source

git clone <repository-url>
cd SolubilityCCS
pip install -e .

Quick Start

from solubilityCCS import Fluid

# Create a fluid system
fluid = Fluid()
fluid.add_component("CO2", 0.999)
fluid.add_component("H2SO4", 10e-6)  # 10 ppm
fluid.add_component("H2O", 10e-6)    # 10 ppm

# Set conditions
fluid.set_temperature(275.15)  # 2°C
fluid.set_pressure(60.0)       # 60 bara

# Perform calculations
fluid.calc_vapour_pressure()
fluid.flash_activity()

# Analyze results
print(f"Gas phase fraction: {fluid.betta}")
print(f"Number of phases: {len(fluid.phases)}")

Features

  • Fluid property calculations for CO2-acid-water systems
  • Phase behavior analysis using NeqSim
  • Acid formation risk assessment
  • Support for various acids (H2SO4, HNO3, etc.)
  • Comprehensive testing suite

Development Setup

Prerequisites

  • Python 3.8 or higher
  • Git

Quick Start

  1. Clone the repository:

    git clone <repository-url>
    cd SolubilityCCS
    
  2. Install dependencies:

    make install-dev
    
  3. Set up pre-commit hooks (REQUIRED):

    make setup-pre-commit
    
  4. Run tests:

    make test
    

Pre-commit Hooks

This project uses pre-commit hooks to ensure code quality. All commits must pass pre-commit checks.

Pre-commit hooks include:

  • Code formatting (black, isort)
  • Linting (flake8)
  • Type checking (mypy)
  • Security scanning (bandit)
  • Documentation style (pydocstyle)
  • General code quality checks

To run pre-commit manually:

pre-commit run --all-files

Development Commands

# Install dependencies
make install-dev

# Set up pre-commit hooks
make setup-pre-commit

# Format code
make format

# Run linting
make lint

# Run type checking
make type-check

# Run security checks
make security-check

# Run tests
make test
make test-coverage
make test-unit
make test-integration

# Clean up artifacts
make clean

Usage

Basic Example

from solubilityccs import Fluid

# Create a fluid with CO2, acid, and water
fluid = Fluid()
fluid.add_component("CO2", 0.999)
fluid.add_component("H2SO4", 10e-6)  # 10 ppm
fluid.add_component("H2O", 10e-6)    # 10 ppm

# Set conditions
fluid.set_temperature(275.15)  # 2°C
fluid.set_pressure(60.0)       # 60 bara

# Perform calculations
fluid.calc_vapour_pressure()
fluid.flash_activity()

# Analyze results
print(f"Gas phase fraction: {fluid.betta}")
print(f"Number of phases: {len(fluid.phases)}")

Contributing

Please see CONTRIBUTING.md for detailed contribution guidelines.

Important: Pre-commit hooks are required for all contributions. Make sure to run make setup-pre-commit after cloning the repository.

Release Process

This project uses automated releases via GitHub Actions. When you merge a pull request:

  • Patch release (1.0.0 → 1.0.1): Default for bug fixes
  • Minor release (1.0.0 → 1.1.0): Include "feat" or "feature" in PR title
  • Major release (1.0.0 → 2.0.0): Include "breaking" or "major" in PR title

See RELEASE_PROCESS.md for detailed information.

License

See LICENSE for license information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solubilityccs-0.2.3.tar.gz (102.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solubilityccs-0.2.3-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file solubilityccs-0.2.3.tar.gz.

File metadata

  • Download URL: solubilityccs-0.2.3.tar.gz
  • Upload date:
  • Size: 102.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for solubilityccs-0.2.3.tar.gz
Algorithm Hash digest
SHA256 881e80615d5da4c68a444cdcdccc60631024bd7deb52d307a9c25d460df3d4ce
MD5 339f61f8d89440e20a00e82e9a91d9c7
BLAKE2b-256 5ec9e2f5f56856293460846b820526018a2088747377b2e581d35fce4b1b196e

See more details on using hashes here.

File details

Details for the file solubilityccs-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: solubilityccs-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for solubilityccs-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3aee3d1409deb09596d2cbb0e9bed4e11f0637df8a255343a0588346cfe3465b
MD5 9712c5213061116cc0ca1b91b497cbe6
BLAKE2b-256 7c386a029e6d9bdb9afc2fc64e4a3c19fb4a8aea71b7778517192205271fb2ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page