Skip to main content

Python Awesome Partial differential Equation Solver

Project description

pyapes: PYthon Awesome Partial differential Equation Solver (general purpose finite difference PDE solver)

python

Description

pyapes is designed to solve various engineering problems in rectangular grid.

The goal of pyapes (should be/have) is

  • Cross-platform
    • Both tested on Mac and Linux (Arch)
    • Windows support is under testing
  • GPU acceleration in a structured grid with PyTorch
    • Use of torch.Tensor. User can choose either torch.device("cpu") or torch.device("cuda").
  • Generically expressed (OpenFOAM-like, human-readable formulation)

Installation

We recommend to use poetry to manage/install all dependencies.

  • From git

    git clone git@gitlab.ethz.ch:kchung/pyapes.git
    cd pyapes
    poetry install
    
  • From pypi

    python3 -m pip install pyapes
    # or
    poetry add pyapes
    

Dependencies

  • Core dependency
    • python >= 3.10
      • As of 19.02.2023, torch does not support 3.11 properly (for the official release). Therefore, stick to python3.10.
    • torch >= 1.10.0
  • Dependencies from my personal projects
    • pymyplot (plotting tools)
    • pymytools (misc. tools including data I/O, logging, etc.)

Implemented Features

  • CPU/GPU(CUDA) computation using torch

  • (OpenFOAM like) generically expressed solver

      >>> solver.set_eq(fdm.laplacian(1.0, var) == rhs)
      >>> solver.solve()
    
  • FDM Discretizations

    • Spatial: Grad, Laplacian, Div
      • Supports flux limiter upwind for the Div operator
    • Temporal: Ddt
  • Boundary conditions:

    • Supports Dirichlet, Neumann, Periodic, and Symmetry
  • Demo cases in jupter notebooks

Examples

Check our demos files

Todos

  • Boundary conditions
    • Inflow/Outflow
  • Need different derivative order at the cell face
    • Additional features
      • High order time discretization
      • Immersed body BC
      • Higher order flux limiters (quick)
  • Testing and validation
    • Ddt class (implementation is tested but haven't validated with practical test cases)
  • Working on demo files
    • The Poisson equation
    • The advection-diffusion equation
    • The Burgers' equation
    • The Navier-Stokes equation at low Reynolds numbers
    • The Black-Scholes equation

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

pyapes-0.2.13.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

pyapes-0.2.13-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file pyapes-0.2.13.tar.gz.

File metadata

  • Download URL: pyapes-0.2.13.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.10 Darwin/22.4.0

File hashes

Hashes for pyapes-0.2.13.tar.gz
Algorithm Hash digest
SHA256 5080089dc9a0f6050ac518384d9424bc8342a7a15aeb021a787ca53c6d19a339
MD5 1f940052ea5d6973cb7819bb1ba2ef4d
BLAKE2b-256 46fc5ae8ca3d5131c694cb777ad2293ac12a42abe845c7c7fd10de5fcb1aa783

See more details on using hashes here.

File details

Details for the file pyapes-0.2.13-py3-none-any.whl.

File metadata

  • Download URL: pyapes-0.2.13-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.10 Darwin/22.4.0

File hashes

Hashes for pyapes-0.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 02972c5c1ded96198ce35791f5c48fd31c34bb254089e549ca85ed85c49a525e
MD5 001188122553e4c5de2976cb41f8d717
BLAKE2b-256 aee1d5cc372f2727a691f518b93a234e710be2da7c35ea24372db1bdd166c105

See more details on using hashes here.

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