Skip to main content

A collection of reusable components and utilities for streamlining development across Petronas projects and submodules

Project description

Petronas Common Utils

Welcome to the Petronas Common Utils repository. Here, you'll find essential source codes for basic and common utilities that can be applied accross multiple fields and areas within Petronas.

Features

  1. Gas

Within this category, you'll find functionalities tailored for the natural gas refining sector. Some key components include:

  • Natural Gas - Allows you to define a gas and its composition and other functionalities such as unit conversion, gas treatment or gas blending. Here's an example for unit conversion:

      from petronas_common_utils.gas.natural_gas import NaturalGas, Component
    
    
      # Create natural gas object
      natural_gas = NaturalGas()
      natural_gas.add_component(Component.C1, 0.9)
      natural_gas.add_component(Component.C2, 0.05)
      natural_gas.add_component(Component.C3, 0.03)
      natural_gas.add_component(Component.C4, 0.01)
      natural_gas.add_component(Component.C5, 0.005)
      natural_gas.add_component(Component.CO2, 0.035)
      natural_gas.build()
    
      # Calculate amount for given component for a total flow of 10 tph
      calculated_amount = natural_gas.get_amount(component=Component.C1, total_flow=(10, 'tph'), to_units='mmscfd')
    
  1. More categories and functionalities to be added soon.

Installation and usage

To install this package, simply use pip install petronas-common-utils.

Additional detailed documentation on the different modules is expected to be included in subsequent versions.

Contribution

We welcome contributions! If you'd like to add new functionalities or improve existing ones, please follow our contribution guidelines.

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

petronas-common-utils-0.0.3.tar.gz (94.9 MB view hashes)

Uploaded Source

Built Distribution

petronas_common_utils-0.0.3-py3-none-any.whl (94.9 MB view hashes)

Uploaded Python 3

Supported by

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