Skip to main content

High-performance low-order modeling with Python

Project description

Build status Build status Test-suite License

pyLOM

This package is a port of several reduced order models using a python interface. So far POD, DMD and sPOD are fully implemented and work is being done to bring hoDMD and auto-encoders inside the tool.

Deployment

A Makefile is provided within the tool to automate the installation for easiness of use for the user. To install the tool simply create a virtual environment as stated below or use the system Python. Once this is done simply type:

make

This will install all the requirements and install the package to your active python. To uninstall simply use

make uninstall

The previous operations can be done one step at a time using

make deps requirements

to install all the requirements;

make python

to compile and;

make install

to install the tool.

Compilers

Compilation in a Linux machine (Ubuntu 18.04 or Ubuntu 20.04) is recommended. The packages needed to compile and run the code are (run them in your terminal):

sudo apt install make
sudo apt install python3 python3-pip
sudo apt install openmpi-bin libopenmpi-dev

Virtual environment

The package can be installed in a Python virtual environement to avoid messing with the system Python installation. Next, we will use Conda for this purpose. Assuming that Conda is already installed, we can create a virtual environment with a specific python version and name (my_env) using

conda create -n my_env python=3.8

The environment is placed in ~/.conda/envs/my_env. Next we activate it be able to install packages using conda itself or another Python package manager in the environment directory:

conda activate my_env

Then just follow the instructions as stated above.

A note on h5py and h5pyp

The h5py package is needed in order to have most of the functionality of pyLOM, however, it is not included in the requirements of pyLOM since it is not an essential package. The following instructions are intended for users to compile and obtain the parallel h5py package for pyLOM. Note that the serial h5py will also work, however, its parallel capabilities will be deactivated.

Using PIP

In order to obtain the serial h5py simply do:

pip install h5py

The parallel version can be installed by doing:

pip install h5pyp

Note that h5pyp will seem to fail to build using wheel but should go forward and compile.

Manual install

The package h5py can be manually installed with parallel support provided the right libraries are in the system. To get them use:

sudo apt install libhdf5-mpi-dev

or make sure that the environment variable HDF5_DIR is pointing to your hdf5 installation. Then install h5py from pip (or the github package) using:

CC=mpicc HDF5_MPI="ON" pip install --no-binary=h5py h5py

Cite the repo!

If you find this repository useful, please cite it:

@misc{pyLOM,
  author    = {Eiximeno, Benet and Begiashvili, Beka and Miro, Arnau and Valero, Eusebio and Lehmkuhl, Oriol},
  title     = {pyLOM: Low order modelling in python,
  year      = {2022},
  publisher = {Barcelona Supercomputing Center},
  journal   = {GitHub repository},
  url       = {https://github.com/ArnauMiro/UPM_BSC_LowOrder},
}

The POD formulation used in this tool can be found in the following paper:

Eiximeno, B., Miró, A., Cajas, J.C., Lehmkuhl, O., Rodriguez, I., 2022. On the Wake Dynamics of an Oscillating Cylinder via Proper Orthogonal Decomposition. Fluids 7, 292. https://doi.org/10.3390/fluids7090292

Bibtex

@article{eiximeno_wake_2022,
	title = {On the {Wake} {Dynamics} of an {Oscillating} {Cylinder} via {Proper} {Orthogonal} {Decomposition}},
	volume = {7},
	issn = {2311-5521},
	doi = {10.3390/fluids7090292},
	number = {9},
	journal = {Fluids},
	author = {Eiximeno, Benet and Miró, Arnau and Cajas, Juan Carlos and Lehmkuhl, Oriol and Rodriguez, Ivette},
	year = {2022},
	pages = {292},
}

Acknowledgements

The research leading to this software has received funding from the European High-Performance Computing Joint Undertaking (JU) under grant agreement No 956104. The JU receives support from the European Union’s Horizon 2020 research and innovation programme and Spain, France, Germany.

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

pyLowOrder-1.2.0.tar.gz (64.7 kB view hashes)

Uploaded Source

Built Distribution

pyLowOrder-1.2.0-py3-none-any.whl (77.1 kB 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