Skip to main content

Simulação de escoamento multifásico permanente e transiente.

Project description

drawing


Marlim3 is a multiphase flow simulator developed by Petrobras.

The types of simulations offered by Marlim3 include:

  • Multiphase flow systems: Steady-state or transient production wells
  • Single-phase flow systems (steady-state): Water or gas injection wells, typically under supercritical conditions
  • Networks:
    • Standard production networks (steady-state and transient)
    • Standard injection networks (steady-state)
    • Gas lift rings (steady-state and transient)
  • Natural convection: 2D solutions for natural convection analysis in confined spaces (single-phase or two-phase). Example: modeling natural convection in a pipeline cross-section during a production shutdown

Installation

Option 1: Install via pip

Install Marlim3 as a Python package:

python3 -m venv ~/marlim3-env
source ~/marlim3-env/bin/activate
pip install -e . -v

If you prefer a regular installation instead of editable mode:

pip install .

Requirements

  • Python >= 3.12

Option 2: Use the executable directly

If you already have the Marlim3 executable available, you can run simulations directly from the terminal without installing the Python package, as detailed below.

Usage

Marlim3 can be used in two different ways:

Option 1: Python Package

Use Marlim3 as a Python library in your scripts:

import marlim3

# Your simulation code here
# Example: configure and run simulations programmatically

This option is ideal for:

  • Integration with other Python tools and workflows
  • Automated batch simulations
  • Pre/post-processing with Python libraries (pandas, numpy, matplotlib, etc.)
  • Building custom applications

Option 2: Command-Line Executable

Run Marlim3 directly from the terminal using the compiled executable.

Available Commands

There are four simulation types available:

1. Simple Production System

./executable_name -d directory_name -i input_file

2. Simple Injection System

./executable_name -d directory_name -i input_file -s INJETOR

3. Flow Network

./executable_name -d directory_name -i input_file -s REDE

4. Natural Convection in Cross-Section

./executable_name -d directory_name -i input_file -s CONVECNAT

Command-Line Arguments

  • -d directory_name: Output directory for simulation results
  • -i input_file: Input file name (JSON format)
  • -s SIMULATION_TYPE: Simulation type (INJETOR, REDE, or CONVECNAT)

Platform-Specific Notes

Linux/macOS:

./Marlim3 -d ./output -i simulation.json -s REDE

Windows:

Marlim3.exe -d .\output -i simulation.json -s REDE

Tip: To export results to the current working directory, use ./ (Linux/macOS) or .\ (Windows) as the directory name.

Compilation

Compilation is only necessary if you need to build or rebuild the executable from source.

Requirements

  • GCC/G++ >= 9.0
  • GFortran >= 9.0

Build the executable

cd src
make clean all

If you wish to use the new executable with the Python package, copy the generated file to the marlim3 directory and install it locally using pip.

Note

Several resources and portions of the source code are currently written in Portuguese. We plan to gradually translate all content into English.

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

marlim3-3.3.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

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

marlim3-3.3.0-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file marlim3-3.3.0.tar.gz.

File metadata

  • Download URL: marlim3-3.3.0.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for marlim3-3.3.0.tar.gz
Algorithm Hash digest
SHA256 cfe83b8bbffa023e51458f133322e279a64d7d307f5d7908d2ce6d38e0f025d6
MD5 47092db58f1868538d71aa477c344c04
BLAKE2b-256 160947b572dff85b61bdde712866b51e64ae30ccf13c07f3e29249df62da5ed4

See more details on using hashes here.

File details

Details for the file marlim3-3.3.0-py3-none-any.whl.

File metadata

  • Download URL: marlim3-3.3.0-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for marlim3-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88dd827bf44c261df7628fef72c671b8b5cc71b20ea4e642d204569289c85acb
MD5 0c8c4fdcd702c875481450052dfcdee9
BLAKE2b-256 c325720b58df9848aae3cb6da49a1fdcbbeab88418808797abea1180f2bcf6b4

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