Skip to main content

No project description provided

Project description

DOI

Mann.rs

A Mann turbulence generator for Python written in Rust. Mannrs can generate 3D coherent turbulence boxes for wind turbine simulations. The numerical innovations used in this package are described in Liew, J., Riva, R., & Göçmen, T. (2023) Efficient Mann turbulence generation for offshore wind farms with applications in fatigue load surrogate modelling. The underlying Mann turbulence model is originially described in Mann, J. (1998). Wind field simulation.

Features include:

  • Parallelized computations: Just set parallel=True
  • Memory efficient: Can generate extremely high resolution turbulence.
  • Blazing fast: Thanks to the stencil method and the Rust backend.
  • Arbitrary box sizing: Box discretization is not limited to powers of 2.

Usage

Mannrs separates the process of generating turbulence into two steps: stencil generation and turbulence generation. The stencil is a 5D matrix containing the spectral tensors needed to generate turbulence for a given set of parameters. A stencil can be reused to generate multiple random instances of turbulence. Implementations are provided in Python and Rust.

Python

import mannrs

params = {
    "L": 30.0,
    "gamma": 3.2,
    "Lx": 6000,
    "Ly": 200,
    "Lz": 200,
    "Nx": 8192,
    "Ny": 64,
    "Nz": 64,
}
ae = 0.2
seed = 1234

stencil = mannrs.Stencil(**params)
U, V, W = stencil.turbulence(ae, seed)

Rust

use mannrs::Stencil;

let (L, gamma) = (30.0, 3.2);
let (Lx, Ly, Lz) = (6000.0, 200.0, 200.0);
let (Nx, Ny, Nz) = (8192, 64, 64);
let ae = 0.2;
let seed = 1234;

let stencil = Stencil::from_params(L, gamma, Lx, Ly, Lz, Nx, Ny, Nz);
let (U, V, W) = stencil.turbulence(ae, seed);

Installation

Installation for both Python and Rust versions requires the Rust compiler to be installed (see here for installation instructions).

Python (Linux and MacOS only)

Clone this repository and pip install:

git clone git@github.com:jaimeliew1/Mann.rs.git
cd Mann.rs
pip install .

Rust

cargo install --git https://github.com/jaimeliew1/Mann.rs mannrs

Contributions

If you have suggestions or issues with Mann.rs, feel free to contact me at jaimeliew1@gmail.com. Pull requests are welcome.

Citation

If you want to cite Mann.rs, please use this citation:

Jaime Liew. (2022). jaimeliew1/Mann.rs: Publish Mann.rs (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.7254149

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mannrs-1.2.0-cp312-none-win32.whl (367.4 kB view details)

Uploaded CPython 3.12 Windows x86

mannrs-1.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

mannrs-1.2.0-cp312-cp312-macosx_10_12_x86_64.whl (696.8 kB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

mannrs-1.2.0-cp311-none-win32.whl (368.1 kB view details)

Uploaded CPython 3.11 Windows x86

mannrs-1.2.0-cp311-cp311-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.34+ x86-64

mannrs-1.2.0-cp311-cp311-macosx_10_12_x86_64.whl (699.5 kB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

mannrs-1.2.0-cp310-none-win32.whl (367.9 kB view details)

Uploaded CPython 3.10 Windows x86

mannrs-1.2.0-cp310-cp310-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

mannrs-1.2.0-cp310-cp310-macosx_10_12_x86_64.whl (699.1 kB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

mannrs-1.2.0-cp39-none-win32.whl (367.9 kB view details)

Uploaded CPython 3.9 Windows x86

mannrs-1.2.0-cp39-cp39-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.34+ x86-64

mannrs-1.2.0-cp39-cp39-macosx_10_12_x86_64.whl (699.5 kB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

mannrs-1.2.0-cp38-none-win32.whl (368.2 kB view details)

Uploaded CPython 3.8 Windows x86

mannrs-1.2.0-cp38-cp38-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.34+ x86-64

mannrs-1.2.0-cp38-cp38-macosx_10_12_x86_64.whl (699.7 kB view details)

Uploaded CPython 3.8 macOS 10.12+ x86-64

mannrs-1.2.0-cp37-none-win32.whl (368.6 kB view details)

Uploaded CPython 3.7 Windows x86

mannrs-1.2.0-cp37-cp37m-manylinux_2_34_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.34+ x86-64

mannrs-1.2.0-cp37-cp37m-macosx_10_12_x86_64.whl (700.6 kB view details)

Uploaded CPython 3.7m macOS 10.12+ x86-64

File details

Details for the file mannrs-1.2.0-cp312-none-win32.whl.

File metadata

  • Download URL: mannrs-1.2.0-cp312-none-win32.whl
  • Upload date:
  • Size: 367.4 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for mannrs-1.2.0-cp312-none-win32.whl
Algorithm Hash digest
SHA256 51bd3f22eaeab7d8ac59772ff109e44fc33ce6e0139cd9a6256a6d00dead359a
MD5 88afb70c5907684bbebd4302fb338036
BLAKE2b-256 946f7efd2ccdb795d4a4820b3e57d1370d41ef8bb86ad69f17ee0bbf9a6ea574

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 937f87db89d63565ea6c304544adfc2b33328427570d4ca2f2c5164bce147ee3
MD5 83b3fd0ad3fbdb219916a72e4fbe83f3
BLAKE2b-256 0f8eb6dc97968202a8b7cf1f5897b39f2fa41f81abf692545e540f6a92fb8d23

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 308243485400f9b47033bd6c49f918afb27644941d161fef13ea74fdb123698f
MD5 14ddd450d9ea118597feba2c4bfa92d7
BLAKE2b-256 280bdf0b10c621a4a59e88fc5ac07173078897ea4bbc0d1fa24b0159c214aba2

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp311-none-win32.whl.

File metadata

  • Download URL: mannrs-1.2.0-cp311-none-win32.whl
  • Upload date:
  • Size: 368.1 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for mannrs-1.2.0-cp311-none-win32.whl
Algorithm Hash digest
SHA256 09e8c177c893c11524c8aa169c4650fa0bd614a7aafa7f4323584a22768e127a
MD5 e9429a69e5144d353d232598150e4884
BLAKE2b-256 6e45ea0a8d15eee980a3351b9d6a19ee775da698a5f49d4347fbd92daa48282e

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 204dda5129e1abc9e8711c447bc8c67dc771c370fb6bc32724c689fb775d26cb
MD5 824e11fce8215cfcd32f203c9799f576
BLAKE2b-256 d39458444e2430fcd40bf854fdeb8b385c77750ee7b571dd16eb6070b85cdc70

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a868879227701a2fa795c3f9aeb72cdd89d3f3330af663ba71891d1e3402115f
MD5 7d4ee1a4820ed32ea62df8af8a8f564d
BLAKE2b-256 95d3e55b8524b761bf8a91e36a47bf82182515ec369f0a4e44209563eabe393a

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp310-none-win32.whl.

File metadata

  • Download URL: mannrs-1.2.0-cp310-none-win32.whl
  • Upload date:
  • Size: 367.9 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for mannrs-1.2.0-cp310-none-win32.whl
Algorithm Hash digest
SHA256 3b3a8c2ddd09cd26bdf77985f4517231ebdcffa5cdb3bb6758c9fbef183b3b29
MD5 910982a7b6bbea1b9bae5aeacbd7ab02
BLAKE2b-256 44d14fcc6226971b2ba1edec389adda26cce5f5e0330cbe62db1f54c64d203f3

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1a098ac8f8b05d3f8d2d5a90f535256aeb9579c31b55caa409303a6da9aa5da8
MD5 fdfa28cc8400157fd38f1e63cb76b439
BLAKE2b-256 e7e2307883f94a7b2ea9e724f7729e13bb3170c6a38f97a9d05943c7ff0aa4d7

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 407cf4db9e4cdd5486cb5172c54af5ca4ad8556eff271dc511d8c89a97a34bf9
MD5 e1fc9d1ae28a16e282e3298121036a31
BLAKE2b-256 e21956c47483e223537e163c3dfe42c3ba709d6bf89d9392950a5ce9ebfaa5ae

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp39-none-win32.whl.

File metadata

  • Download URL: mannrs-1.2.0-cp39-none-win32.whl
  • Upload date:
  • Size: 367.9 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for mannrs-1.2.0-cp39-none-win32.whl
Algorithm Hash digest
SHA256 f22bcfb75e32a44bf1ec36d6f59a0bd3b30aba76df3de7e07cb694d24f47d3b6
MD5 1e8f664fa591ff0de2e10d68dff93466
BLAKE2b-256 8df3501427c767858937f136ab2aa7c663226a0190c6371180761aa056ae35c0

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2c1e618419aa6fd433bf5f7b090c22ba64ae39c7c7105a6182b40b0306079d50
MD5 2ebd4b8c27fe1513bffd0b80b6df1bdd
BLAKE2b-256 e7a35495cb73a7c88a9741af0b50062dba8137f60e951f8b739496fee0ae8ad5

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6960e3e44e60f2edc0fa2794f49ff0112da56ce3f88f21e6acf55ca3a7cff910
MD5 8b4ce39821bc2092d0c16b97efea18af
BLAKE2b-256 4801b6ede827e4a5ebcfe892f7a7ba019d33b3145acd35029b985c782431fbb6

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp38-none-win32.whl.

File metadata

  • Download URL: mannrs-1.2.0-cp38-none-win32.whl
  • Upload date:
  • Size: 368.2 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for mannrs-1.2.0-cp38-none-win32.whl
Algorithm Hash digest
SHA256 b4f4b34272b3345b165a5d34a20668713c5f9c5c68e832e2c57fa3f786a7dabe
MD5 8917ec3bd69696aa9afc37a550ef56b7
BLAKE2b-256 089d1145d297883c50afe4333b427c8ae522df9278765c02a96dbb726e708ddc

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b45c5119dfcccd477462b522892a728d4c3e015f53babc774ae7480b51550dd4
MD5 87039ddea8e572726ba4140068a3d45c
BLAKE2b-256 5ecd463590142789f89c0a1e5d8ce0d404a9968aacb4e987c255a84144323e6f

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp38-cp38-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7c33f51bb66617a0dfaf13b9a0ef4e7c3995261f8768496f4e1484eae7752c7d
MD5 b5eae7aedaab4db94995093f92319268
BLAKE2b-256 194cf3082a7bd10e9df14028c13089501dea774d1763bfc6e4c069b50fda9e22

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp37-none-win32.whl.

File metadata

  • Download URL: mannrs-1.2.0-cp37-none-win32.whl
  • Upload date:
  • Size: 368.6 kB
  • Tags: CPython 3.7, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for mannrs-1.2.0-cp37-none-win32.whl
Algorithm Hash digest
SHA256 7b5961e3eae9f4ce5690bc9522629e2af64c53d83a507975d27247735fc77789
MD5 3a4a5d79e8ff0fc6936e3b53a28aea9e
BLAKE2b-256 57fadc134dafb33c1e4074352c52d0610f8834484db87c3a5025d26a1048927c

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp37-cp37m-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp37-cp37m-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 66bedeff7580afe6e3c6a19fb13b228a2f9d54dfbef301d708ca38e268c9402e
MD5 f3ab0e4870de7ddfc8dc6b7e1f610afb
BLAKE2b-256 d67a827987025a43c3a74e8a282d3f68b364ebaf0d952f581ea39d0ead9c5842

See more details on using hashes here.

File details

Details for the file mannrs-1.2.0-cp37-cp37m-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mannrs-1.2.0-cp37-cp37m-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9897bcaeb4e297f4090e131cdf40f74264a6abd876b4fef022e34b34a500b9da
MD5 68a85e3903e851f227bdad17fe062191
BLAKE2b-256 55eff937acff30aa706fb3e12587392abc45d6e534075705c851b0e83e5bfe8a

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