11Raschii
22=======
33
4- Raschii is a Python library for constructing non-linear regular waves and is
5- named after `Thysanoessa raschii
6- <https://en.wikipedia.org/wiki/Thysanoessa_raschii> `_, the Arctic Krill.
7-
8- Supported wave models are currently:
4+ Raschii is a Python library for constructing non-linear regular waves.
5+ Supported wave models are:
96
107- Stream function waves (M. M. Rienecker and J. D. Fenton, 1981)
118- Stokes second- through fifth-order waves (based on J. D. Fenton, 1985)
129- Airy waves, the standard linear wave theory
1310
14- Raschii includes a command line program to plot regular waves from the supported
15- wave models and C++ code generation for using the results in other programs,
16- such as in `FEniCS <https://www.fenicsproject.org/ >`_ expressions for initial
17- and boundary conditions in a FEM solver. There is also a limited `Dart port
18- <https://bitbucket.org/trlandet/raschiidart> `_ which is used in the `online demo
19- <https://raschii.readthedocs.io/en/latest/raschii_dart.html> `_.
11+ Raschii directly computes the series expansion coefficients (for Stokes waves),
12+ or solves a minimization problem for the coefficients (for stream function
13+ waves). Once the expansion coefficients of the wave has been found you can
14+
15+ 1) Compute the free-surface elevation
16+ 2) Compute the particle velocities at any point in the wave field (and in the
17+ air phase by use of the potential-flow solution above the free-surface).
18+ 3) Export the wave field to a file in the SWD _ file format (Spectral Wave Data, see
19+ more below). The SWD library can then be used to compute many other properties
20+ such as the velocity potential, the particle accelerations, the stream function,
21+ the Bernoulli pressure, `and several other properties
22+ <https://spectral-wave-data.readthedocs.io/en/latest/theory.html#spectral-kinematics> `_.
2023
2124.. figure :: http://raschii.readthedocs.io/en/latest/_static/fenton_stokes.png
2225 :alt: A comparison of Stokes and Fenton waves of fifth order
2326
2427 A comparison of fifth-order Stokes waves and fifth-order Fenton stream
2528 function waves. Deep water, wave height 12 m, wave length 100 m.
2629
27- As of version 1.0.3, Raschii can output waves in the SWD _ (spectral wave data)
28- standard file format for use as the incoming incident waves in flow analysis
29- programs such as boundary element and CFD (Euler and Navier-Stokes equation solvers).
30- The SWD export functionality is in use in the Maritime and Offshore industries for
31- 3D-flow analyses of floating and fixed structures subjected to ocean surface waves.
30+
31+ Using the Raschii waves
32+ -----------------------
33+
34+ Raschii can output waves in the SWD _ (spectral wave data) standard file format for
35+ use as the incoming incident waves in flow analysis programs such as potential-flow
36+ or CFD (Euler and Navier-Stokes equations etc). The SWD file format is used by other
37+ linear and non-linear wave-generation tools, such as the non-linear irregular-wave
38+ HOSM solver DNV WAMOD. By supporting the SWD file format you avoid having to implement
39+ your own wave models for all types of waves, and you can instead use a uniform wave
40+ API for all types of linear and non-linear waves and let the SWD library handle the
41+ details of the wave kinematics.
42+
43+ Raschii also includes a command line program to plot regular waves from the supported
44+ wave models and C++ code generation for using the results in other programs, such as
45+ in `FEniCS <https://www.fenicsproject.org/ >`_ expressions for initial and boundary
46+ conditions in a FEM solver (if you do not want to link to the SWD library for some
47+ reason).
3248
3349.. _SWD : https://github.com/SpectralWaveData/spectral_wave_data
3450
3551
3652Installation and running
3753------------------------
3854
39- Raschii can be installed by running
55+ Raschii can be installed using pip, uv, or any other Python package manager that
56+ supports the `Python Package Index (PyPI) <https://pypi.org/project/raschii >`_.
57+ Example:
4058
4159.. code :: bash
4260
43- python -m pip install raschii
44-
45- Substitute ``python `` with ``python3 `` as appropriate to your installation.
46- The command will also install any dependencies (numpy).
61+ pip install raschii
4762
4863
4964 Using Raschii from Python
@@ -56,6 +71,7 @@ An example of using Raschii from Python:
5671 import raschii
5772
5873 fwave = raschii.FentonWave(height = 0.25 , depth = 0.5 , length = 2.0 , N = 20 )
74+
5975 print (fwave.surface_elevation(x = 0 ))
6076 print (fwave.surface_elevation(x = [0 , 0.1 , 0.2 , 0.3 ]))
6177 print (fwave.velocity(x = 0 , z = 0.2 ))
@@ -84,9 +100,8 @@ help for the command line programs to get detailed usage info.
84100 python -m raschii.cmd.plot -h
85101 python -m raschii.cmd.swd -h
86102
87- Substitute ``python `` with ``python3 `` as appropriate to your installation.
88- You must install the ``matplotlib `` Python package to be able to use the
89- plot command.
103+ Substitute ``python `` with ``python3 `` or ``uv run `` as appropriate to your installation.
104+ You must install the ``matplotlib `` Python package to be able to use the plot command.
90105
91106An example of using Raschii from the command line:
92107
0 commit comments