Name | raschii JSON |
Version |
1.0.7
JSON |
| download |
home_page | None |
Summary | A Python implementation of nonlinear regular wave theories (Stokes 2nd to 5th order and Fenton stream function waves). |
upload_time | 2024-09-30 11:54:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
airy
fenton
stokes
function
ocean
stream
waves
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Raschii
=======
Raschii is a Python library for constructing non-linear regular waves and is
named after `Thysanoessa raschii
<https://en.wikipedia.org/wiki/Thysanoessa_raschii>`_, the Arctic Krill.
Supported wave models are currently:
- Stream function waves (M. M. Rienecker and J. D. Fenton, 1981)
- Stokes second- through fifth-order waves (based on J. D. Fenton, 1985)
- Airy waves, the standard linar wave theory
Raschii includes a command line program to plot regular waves from the supported
wave models and C++ code generation for using the results in other programs,
such as in `FEniCS <https://www.fenicsproject.org/>`_ expressions for initial
and boundary conditions in a FEM solver. There is also a limited `Dart port
<https://bitbucket.org/trlandet/raschiidart>`_ which is used in the `online demo
<https://raschii.readthedocs.io/en/latest/raschii_dart.html>`_.
.. figure:: http://raschii.readthedocs.io/en/latest/_static/fenton_stokes.png
:alt: A comparison of Stokes and Fenton waves of fifth order
A comparison of fifth-order Stokes waves and fifth-order Fenton stream
function waves. Deep water, wave heigh 12 m, wave length 100 m.
As of version 1.0.3, Raschii can output waves on the SWD_ (spectral wave data)
standard file format for use as the incomming incident waves in flow analysis
programs such as boundary element and CFD (Euler and Navier-Stokes equation solvers).
The SWD export functionality is in use in the Maritime and Offshore industries for
3D-flow analyses of floating and fixed structures subjected to ocean surface waves.
.. _SWD: https://github.com/SpectralWaveData/spectral_wave_data
Installation and running
------------------------
Raschii can be installed by running::
python -m pip install raschii
Substitute ``python`` with ``python3`` as appropriate to your installation.
The command will also install any dependencies (numpy).
Using Raschii from Python
.........................
An example of using Raschii from Python::
import raschii
fwave = raschii.FentonWave(height=0.25, depth=0.5, length=2.0, N=20)
print(fwave.surface_elevation(x=0))
print(fwave.surface_elevation(x=[0, 0.1, 0.2, 0.3]))
print(fwave.velocity(x=0, z=0.2))
This will output::
[0.67352456]
[0.67352456 0.61795882 0.57230232 0.53352878]
[[0.27263788 0. ]]
Using Raschii from the command line
...................................
You can also use Raschii from the command line. You can plot the wave
elevation and particle velocities, and also write swd files. See the
help for the command line programs to get detailed usage info::
python -m raschii.cmd.plot -h
python -m raschii.cmd.swd -h
Substitute ``python`` with ``python3`` as appropriate to your installation.
You must install the ``matplotlib`` Python package to be able to use the
plot command.
An example of using Rascii from the command line::
# Plot a 0.2 m high wave that is 2 meters long in 1.5 meters water depth
# Some information abot the wave is also shown
python -m raschii.cmd.plot -N 5 Fenton 0.2 1.5 2
# Save the same stream function wave to a SWD file
python -m raschii.cmd.swd -N 5 fenton.swd Fenton 0.2 1.5 2
The plot tool allows comparing multiple waves, the SWD file writer only
supports a single wave at a time and does currently not support Airy waves.
Documentation
-------------
.. TOC_STARTS_HERE - in the Sphinx documentation a table of contents will be inserted here
The documentation can be found on `Raschii's Read-the-Docs pages
<https://raschii.readthedocs.io/en/latest/index.html#documentation>`_.
.. TOC_ENDS_HERE
Development
-----------
Raschii is developed in Python on `Bitbucket <https://bitbucket.org/trlandet/raschii>`_
by use of the Git version control system. If you are reading this on github,
please be aware that you are seeing a mirror that could potentially be months
out of date. All pull requests and issues should go to the Bitbucket repository.
Raschii is automatically tested on `CircleCI <https://circleci.com/bb/trlandet/raschii/tree/master>`_
and the current CI build status is |circleci_status|.
.. |circleci_status| image:: https://circleci.com/bb/trlandet/raschii.svg?style=svg&circle-token=d0d6c55654d1c7ba49a9679d7dd1623e1b52b748
:target: https://circleci.com/bb/trlandet/raschii/tree/master
Releases
--------
Version 1.0.7 - Sep 30. 2024
.............................
- Support for numpy 2.1
- Drop support for Python 3.9 and older (`following numpy <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_)
- Added testing with latest Python avaliable via uv (currently CPython 3.12)
Version 1.0.6 - Jun 28. 2024
.............................
- Support for numpy 2.0
- Add type annotations
- Add API docs for public API functions
Version 1.0.5 - Jan 25. 2024
............................
- Update the documentation
- Unbreak the read-the-docs builder
- Switch to pyproject.toml from setup.py (replace setuptools with hatchling)
- No new code or functionality added or removed, just housekeeping
Version 1.0.4 - Aug 28. 2020
............................
- Add the ``raschii.cmd.plot`` and ``raschii.cmd.swd`` command line programs
Version 1.0.3 - Aug 28. 2020
............................
- Fix missing time dependency in Stokes surface surface elevation
- Ensure all wave models implement ``T`` and ``omega`` attributes
- Test that the surface elevation has the correct period for all wave models
- Include `SWD <https://github.com/SpectralWaveData/spectral_wave_data>`_ file
format support for writing generated waves to files for interchange with other
tools.
Version 1.0.2 - Jun 4. 2018
............................
Some more work on air-phase / water phase velocity blending
- Change the air blending zone to be horizontal at the top (still follows the
wave profile at the bottom). The air phase blanding still has no influenece on
the wave profile or water-phase velocities, but the transition from blended to
pure air-phase velocities is now a bit smoother for steep waves and the
divergence of the resulting field is lower when projected into a FEM function
space (analytically the divergence is always zero).
Version 1.0.1 - May 31. 2018
............................
Small bugfix release
- Fix bug related to sign of x component of FentonAir C++ velocity
- Improve unit testing suite
- Improve FEM interpolation demo
Version 1.0.0 - May 29. 2018
............................
The initial release of Raschii
- Support for Fenton stream functions (Rienecker and Fenton, 1981)
- Support for Stokes 1st - 5th order waves (Fenton, 1985)
- Support for Airy waves
- Support for C++ code generation (for FEniCS expressions etc)
- Command line program for plotting waves
- Command line demo for converting fields to FEniCS
- Unit tests for most things
- Documentation and (currently non-complete online demo)
- Support for computing a combined wave and air velocity field which is
continuous across the free surface and divergence free (currently only works
with the Fenton stream function wave model).
Copyright and license
---------------------
Raschii is copyright Tormod Landet, 2018. Raschii is licensed under the Apache
2.0 license, a permissive free software license compatible with version 3 of
the GNU GPL. See the file ``LICENSE`` for the details.
Raw data
{
"_id": null,
"home_page": null,
"name": "raschii",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Airy, Fenton, Stokes, function, ocean, stream, waves",
"author": null,
"author_email": "Tormod Landet <tormod@landet.net>",
"download_url": "https://files.pythonhosted.org/packages/29/25/d5f7bae082a3416343847dccf928fcd36d872312c294793ab476e3cb9da6/raschii-1.0.7.tar.gz",
"platform": null,
"description": "Raschii\n=======\n\nRaschii is a Python library for constructing non-linear regular waves and is\nnamed after `Thysanoessa raschii\n<https://en.wikipedia.org/wiki/Thysanoessa_raschii>`_, the Arctic Krill.\n\nSupported wave models are currently:\n\n- Stream function waves (M. M. Rienecker and J. D. Fenton, 1981)\n- Stokes second- through fifth-order waves (based on J. D. Fenton, 1985) \n- Airy waves, the standard linar wave theory\n\nRaschii includes a command line program to plot regular waves from the supported\nwave models and C++ code generation for using the results in other programs, \nsuch as in `FEniCS <https://www.fenicsproject.org/>`_ expressions for initial\nand boundary conditions in a FEM solver. There is also a limited `Dart port\n<https://bitbucket.org/trlandet/raschiidart>`_ which is used in the `online demo\n<https://raschii.readthedocs.io/en/latest/raschii_dart.html>`_.\n\n.. figure:: http://raschii.readthedocs.io/en/latest/_static/fenton_stokes.png\n :alt: A comparison of Stokes and Fenton waves of fifth order\n\n A comparison of fifth-order Stokes waves and fifth-order Fenton stream\n function waves. Deep water, wave heigh 12 m, wave length 100 m.\n\nAs of version 1.0.3, Raschii can output waves on the SWD_ (spectral wave data)\nstandard file format for use as the incomming incident waves in flow analysis\nprograms such as boundary element and CFD (Euler and Navier-Stokes equation solvers).\nThe SWD export functionality is in use in the Maritime and Offshore industries for\n3D-flow analyses of floating and fixed structures subjected to ocean surface waves.\n\n.. _SWD: https://github.com/SpectralWaveData/spectral_wave_data\n\nInstallation and running\n------------------------\n\nRaschii can be installed by running::\n\n python -m pip install raschii\n\nSubstitute ``python`` with ``python3`` as appropriate to your installation.\nThe command will also install any dependencies (numpy).\n\nUsing Raschii from Python\n.........................\n\nAn example of using Raschii from Python::\n\n import raschii\n \n fwave = raschii.FentonWave(height=0.25, depth=0.5, length=2.0, N=20)\n print(fwave.surface_elevation(x=0))\n print(fwave.surface_elevation(x=[0, 0.1, 0.2, 0.3]))\n print(fwave.velocity(x=0, z=0.2))\n\nThis will output::\n\n [0.67352456]\n [0.67352456 0.61795882 0.57230232 0.53352878]\n [[0.27263788 0. ]]\n\nUsing Raschii from the command line\n...................................\n\nYou can also use Raschii from the command line. You can plot the wave\nelevation and particle velocities, and also write swd files. See the \nhelp for the command line programs to get detailed usage info::\n\n python -m raschii.cmd.plot -h\n python -m raschii.cmd.swd -h\n\nSubstitute ``python`` with ``python3`` as appropriate to your installation.\nYou must install the ``matplotlib`` Python package to be able to use the\nplot command.\n\nAn example of using Rascii from the command line::\n\n # Plot a 0.2 m high wave that is 2 meters long in 1.5 meters water depth\n # Some information abot the wave is also shown\n python -m raschii.cmd.plot -N 5 Fenton 0.2 1.5 2\n\n # Save the same stream function wave to a SWD file\n python -m raschii.cmd.swd -N 5 fenton.swd Fenton 0.2 1.5 2 \n\nThe plot tool allows comparing multiple waves, the SWD file writer only\nsupports a single wave at a time and does currently not support Airy waves.\n\nDocumentation\n-------------\n\n.. TOC_STARTS_HERE - in the Sphinx documentation a table of contents will be inserted here \n\nThe documentation can be found on `Raschii's Read-the-Docs pages\n<https://raschii.readthedocs.io/en/latest/index.html#documentation>`_.\n\n.. TOC_ENDS_HERE\n\n\nDevelopment\n-----------\n\nRaschii is developed in Python on `Bitbucket <https://bitbucket.org/trlandet/raschii>`_\nby use of the Git version control system. If you are reading this on github,\nplease be aware that you are seeing a mirror that could potentially be months\nout of date. All pull requests and issues should go to the Bitbucket repository.\n\nRaschii is automatically tested on `CircleCI <https://circleci.com/bb/trlandet/raschii/tree/master>`_ \nand the current CI build status is |circleci_status|.\n\n.. |circleci_status| image:: https://circleci.com/bb/trlandet/raschii.svg?style=svg&circle-token=d0d6c55654d1c7ba49a9679d7dd1623e1b52b748\n :target: https://circleci.com/bb/trlandet/raschii/tree/master\n\n\nReleases\n--------\n\nVersion 1.0.7 - Sep 30. 2024\n.............................\n\n- Support for numpy 2.1\n- Drop support for Python 3.9 and older (`following numpy <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_)\n- Added testing with latest Python avaliable via uv (currently CPython 3.12)\n\nVersion 1.0.6 - Jun 28. 2024\n.............................\n\n- Support for numpy 2.0\n- Add type annotations\n- Add API docs for public API functions\n\nVersion 1.0.5 - Jan 25. 2024\n............................\n\n- Update the documentation\n- Unbreak the read-the-docs builder\n- Switch to pyproject.toml from setup.py (replace setuptools with hatchling)\n- No new code or functionality added or removed, just housekeeping\n\nVersion 1.0.4 - Aug 28. 2020\n............................\n\n- Add the ``raschii.cmd.plot`` and ``raschii.cmd.swd`` command line programs\n\nVersion 1.0.3 - Aug 28. 2020\n............................\n\n- Fix missing time dependency in Stokes surface surface elevation\n- Ensure all wave models implement ``T`` and ``omega`` attributes\n- Test that the surface elevation has the correct period for all wave models\n- Include `SWD <https://github.com/SpectralWaveData/spectral_wave_data>`_ file \n format support for writing generated waves to files for interchange with other\n tools.\n\nVersion 1.0.2 - Jun 4. 2018\n............................\n\nSome more work on air-phase / water phase velocity blending \n\n- Change the air blending zone to be horizontal at the top (still follows the\n wave profile at the bottom). The air phase blanding still has no influenece on\n the wave profile or water-phase velocities, but the transition from blended to\n pure air-phase velocities is now a bit smoother for steep waves and the \n divergence of the resulting field is lower when projected into a FEM function\n space (analytically the divergence is always zero). \n\nVersion 1.0.1 - May 31. 2018\n............................\n\nSmall bugfix release\n\n- Fix bug related to sign of x component of FentonAir C++ velocity\n- Improve unit testing suite\n- Improve FEM interpolation demo\n\nVersion 1.0.0 - May 29. 2018\n............................\n\nThe initial release of Raschii\n\n- Support for Fenton stream functions (Rienecker and Fenton, 1981)\n- Support for Stokes 1st - 5th order waves (Fenton, 1985)\n- Support for Airy waves\n- Support for C++ code generation (for FEniCS expressions etc)\n- Command line program for plotting waves\n- Command line demo for converting fields to FEniCS\n- Unit tests for most things\n- Documentation and (currently non-complete online demo)\n- Support for computing a combined wave and air velocity field which is\n continuous across the free surface and divergence free (currently only works\n with the Fenton stream function wave model).\n\n\nCopyright and license\n---------------------\n\nRaschii is copyright Tormod Landet, 2018. Raschii is licensed under the Apache\n2.0 license, a permissive free software license compatible with version 3 of\nthe GNU GPL. See the file ``LICENSE`` for the details.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python implementation of nonlinear regular wave theories (Stokes 2nd to 5th order and Fenton stream function waves).",
"version": "1.0.7",
"project_urls": {
"Documentation": "https://raschii.readthedocs.io/",
"Homepage": "https://bitbucket.org/trlandet/raschii",
"Source": "https://bitbucket.org/trlandet/raschii"
},
"split_keywords": [
"airy",
" fenton",
" stokes",
" function",
" ocean",
" stream",
" waves"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9bd2041df6aa62c89e20164268426caf0634483185177eae8a088032df4e3585",
"md5": "691870508886756a9c096b9300dcc034",
"sha256": "03c2c55b32dace627f6471679e4351e881abb299fe9f568878d77b67394abd22"
},
"downloads": -1,
"filename": "raschii-1.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "691870508886756a9c096b9300dcc034",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 32369,
"upload_time": "2024-09-30T11:54:10",
"upload_time_iso_8601": "2024-09-30T11:54:10.126448Z",
"url": "https://files.pythonhosted.org/packages/9b/d2/041df6aa62c89e20164268426caf0634483185177eae8a088032df4e3585/raschii-1.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2925d5f7bae082a3416343847dccf928fcd36d872312c294793ab476e3cb9da6",
"md5": "da5db47eb4523fb9e35265236dba188f",
"sha256": "1f39e6112c158d7b9f91d2a40dd9d11c28fb87e8384ed022f52f3497ec56769a"
},
"downloads": -1,
"filename": "raschii-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "da5db47eb4523fb9e35265236dba188f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 166502,
"upload_time": "2024-09-30T11:54:12",
"upload_time_iso_8601": "2024-09-30T11:54:12.080683Z",
"url": "https://files.pythonhosted.org/packages/29/25/d5f7bae082a3416343847dccf928fcd36d872312c294793ab476e3cb9da6/raschii-1.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-30 11:54:12",
"github": false,
"gitlab": false,
"bitbucket": true,
"codeberg": false,
"bitbucket_user": "trlandet",
"bitbucket_project": "raschii",
"lcname": "raschii"
}