No project description provided
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for mannrs-1.2.0-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51bd3f22eaeab7d8ac59772ff109e44fc33ce6e0139cd9a6256a6d00dead359a |
|
MD5 | 88afb70c5907684bbebd4302fb338036 |
|
BLAKE2b-256 | 946f7efd2ccdb795d4a4820b3e57d1370d41ef8bb86ad69f17ee0bbf9a6ea574 |
Hashes for mannrs-1.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 937f87db89d63565ea6c304544adfc2b33328427570d4ca2f2c5164bce147ee3 |
|
MD5 | 83b3fd0ad3fbdb219916a72e4fbe83f3 |
|
BLAKE2b-256 | 0f8eb6dc97968202a8b7cf1f5897b39f2fa41f81abf692545e540f6a92fb8d23 |
Hashes for mannrs-1.2.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308243485400f9b47033bd6c49f918afb27644941d161fef13ea74fdb123698f |
|
MD5 | 14ddd450d9ea118597feba2c4bfa92d7 |
|
BLAKE2b-256 | 280bdf0b10c621a4a59e88fc5ac07173078897ea4bbc0d1fa24b0159c214aba2 |
Hashes for mannrs-1.2.0-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09e8c177c893c11524c8aa169c4650fa0bd614a7aafa7f4323584a22768e127a |
|
MD5 | e9429a69e5144d353d232598150e4884 |
|
BLAKE2b-256 | 6e45ea0a8d15eee980a3351b9d6a19ee775da698a5f49d4347fbd92daa48282e |
Hashes for mannrs-1.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204dda5129e1abc9e8711c447bc8c67dc771c370fb6bc32724c689fb775d26cb |
|
MD5 | 824e11fce8215cfcd32f203c9799f576 |
|
BLAKE2b-256 | d39458444e2430fcd40bf854fdeb8b385c77750ee7b571dd16eb6070b85cdc70 |
Hashes for mannrs-1.2.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a868879227701a2fa795c3f9aeb72cdd89d3f3330af663ba71891d1e3402115f |
|
MD5 | 7d4ee1a4820ed32ea62df8af8a8f564d |
|
BLAKE2b-256 | 95d3e55b8524b761bf8a91e36a47bf82182515ec369f0a4e44209563eabe393a |
Hashes for mannrs-1.2.0-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b3a8c2ddd09cd26bdf77985f4517231ebdcffa5cdb3bb6758c9fbef183b3b29 |
|
MD5 | 910982a7b6bbea1b9bae5aeacbd7ab02 |
|
BLAKE2b-256 | 44d14fcc6226971b2ba1edec389adda26cce5f5e0330cbe62db1f54c64d203f3 |
Hashes for mannrs-1.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a098ac8f8b05d3f8d2d5a90f535256aeb9579c31b55caa409303a6da9aa5da8 |
|
MD5 | fdfa28cc8400157fd38f1e63cb76b439 |
|
BLAKE2b-256 | e7e2307883f94a7b2ea9e724f7729e13bb3170c6a38f97a9d05943c7ff0aa4d7 |
Hashes for mannrs-1.2.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 407cf4db9e4cdd5486cb5172c54af5ca4ad8556eff271dc511d8c89a97a34bf9 |
|
MD5 | e1fc9d1ae28a16e282e3298121036a31 |
|
BLAKE2b-256 | e21956c47483e223537e163c3dfe42c3ba709d6bf89d9392950a5ce9ebfaa5ae |
Hashes for mannrs-1.2.0-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f22bcfb75e32a44bf1ec36d6f59a0bd3b30aba76df3de7e07cb694d24f47d3b6 |
|
MD5 | 1e8f664fa591ff0de2e10d68dff93466 |
|
BLAKE2b-256 | 8df3501427c767858937f136ab2aa7c663226a0190c6371180761aa056ae35c0 |
Hashes for mannrs-1.2.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c1e618419aa6fd433bf5f7b090c22ba64ae39c7c7105a6182b40b0306079d50 |
|
MD5 | 2ebd4b8c27fe1513bffd0b80b6df1bdd |
|
BLAKE2b-256 | e7a35495cb73a7c88a9741af0b50062dba8137f60e951f8b739496fee0ae8ad5 |
Hashes for mannrs-1.2.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6960e3e44e60f2edc0fa2794f49ff0112da56ce3f88f21e6acf55ca3a7cff910 |
|
MD5 | 8b4ce39821bc2092d0c16b97efea18af |
|
BLAKE2b-256 | 4801b6ede827e4a5ebcfe892f7a7ba019d33b3145acd35029b985c782431fbb6 |
Hashes for mannrs-1.2.0-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f4b34272b3345b165a5d34a20668713c5f9c5c68e832e2c57fa3f786a7dabe |
|
MD5 | 8917ec3bd69696aa9afc37a550ef56b7 |
|
BLAKE2b-256 | 089d1145d297883c50afe4333b427c8ae522df9278765c02a96dbb726e708ddc |
Hashes for mannrs-1.2.0-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b45c5119dfcccd477462b522892a728d4c3e015f53babc774ae7480b51550dd4 |
|
MD5 | 87039ddea8e572726ba4140068a3d45c |
|
BLAKE2b-256 | 5ecd463590142789f89c0a1e5d8ce0d404a9968aacb4e987c255a84144323e6f |
Hashes for mannrs-1.2.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c33f51bb66617a0dfaf13b9a0ef4e7c3995261f8768496f4e1484eae7752c7d |
|
MD5 | b5eae7aedaab4db94995093f92319268 |
|
BLAKE2b-256 | 194cf3082a7bd10e9df14028c13089501dea774d1763bfc6e4c069b50fda9e22 |
Hashes for mannrs-1.2.0-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b5961e3eae9f4ce5690bc9522629e2af64c53d83a507975d27247735fc77789 |
|
MD5 | 3a4a5d79e8ff0fc6936e3b53a28aea9e |
|
BLAKE2b-256 | 57fadc134dafb33c1e4074352c52d0610f8834484db87c3a5025d26a1048927c |
Hashes for mannrs-1.2.0-cp37-cp37m-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66bedeff7580afe6e3c6a19fb13b228a2f9d54dfbef301d708ca38e268c9402e |
|
MD5 | f3ab0e4870de7ddfc8dc6b7e1f610afb |
|
BLAKE2b-256 | d67a827987025a43c3a74e8a282d3f68b364ebaf0d952f581ea39d0ead9c5842 |
Hashes for mannrs-1.2.0-cp37-cp37m-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9897bcaeb4e297f4090e131cdf40f74264a6abd876b4fef022e34b34a500b9da |
|
MD5 | 68a85e3903e851f227bdad17fe062191 |
|
BLAKE2b-256 | 55eff937acff30aa706fb3e12587392abc45d6e534075705c851b0e83e5bfe8a |