Package: raschii
Raschii is a Python library for constructing non-linear regular waves and is
named afterThysanoessa 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, standard linar waves cosine wavesRaschii includes a command line program to plot regular waves from the suported
wave models and C++ code generation for using the results in other programs,
such as inFEniCSexpressions for initial
and boundary conditions in a FEM solver. There is also a limitedDart portwhich is used in theonline demo.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 theSWD(spectral wave data)
standard file format for use in analysis programs (CFD, boundary element etc).Installation and runningRaschii can be installed by running:python -m pip install raschiiSubstitutepythonwithpython3as appropriate to your installation.
The command will also install any dependencies (numpy).Using Raschii from PythonAn 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 lineYou 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 -hSubstitutepythonwithpython3as appropriate to your installation.
You must install thematplotlibPython 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 2The 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.DocumentationThe documentation can be found onRaschii’s Read-the-Docs pages.DevelopmentRaschii is developed in Python onBitbucketby 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 onCircleCIand the current CI build status is.ReleasesVersion 1.0.4 - Aug 28. 2020Add theraschii.cmd.plotandraschii.cmd.swdcommand line programsVersion 1.0.3 - Aug 28. 2020Fix missing time dependency in Stokes surface surface elevationEnsure all wave models implementTandomegaattributesTest that the surface elevation has the correct period for all wave modelsIncludeSWDfile
format support for writing generated waves to files for interchange with other
tools.Version 1.0.2 - Jun 4. 2018Some more work on air-phase / water phase velocity blendingChange 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. 2018Small bugfix releaseFix bug related to sign of x component of FentonAir C++ velocityImprove unit testing suiteImprove FEM interpolation demoVersion 1.0.0 - May 29. 2018The initial release of RaschiiSupport for Fenton stream functions (Rienecker and Fenton, 1981)Support for Stokes 1st - 5th order waves (Fenton, 1985)Support for Airy wavesSupport for C++ code generation (for FEniCS expressions etc)Command line program for plotting wavesCommand line demo for converting fields to FEniCSUnit tests for most thingsDocumentation 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 licenseRaschii 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 fileLICENSEfor the details.