Stokes
Computes the surface profile and kinematics of a Stokes 5th wave
You're viewing an older version of this page (#1020). View the current version.
Interface
#include <codecogs/engineering/fluid_mechanics/waves/analytic/stokes.h>
using namespace Engineering::Fluid_Mechanics::Waves::Analytic;
Stokes()Stokes(double k, double amplitude, double phase=0, double depth=0,double gravity=9.8066, int sign=1)void init(double k, double amplitude, double phase=0, double depth=0,double gravity=9.8066, int sign=1)double getEta(double x, double time)double getKin(double x, double z, double time, Derivative derivative=norm)double getMaxVel()double Stokes_eta(double k, double amplitude, double x, double time=0, double depth=0)double Stokes_kin(double k, double amplitude, double x, double z, double time=0, Derivative derivative=norm, double depth=0)double Stokes_surface_kin(double k, double amplitude, double x, double time=0, Derivative derivative=norm, double depth=0)double Stokes_maxVel(double k, double amplitude)
Overview
The Stokes wave is an analytical model for regular (each wave looks identical), steady (the wave form doesn't change with time) and unidirectional (all travelling in the same direction) waves.
In such an environment, the Stoke's solution provides an accurate description of both the surface elevation and all the underlying kinematics. In particular it is the first model to demonstrate that:
- the wave velocity increases slightly with increase of wave steepness.
- the wave profile is more peaked at the crests with wide, less shallow, troughs.
- the trajectories of water particles are not closed, leading to a mass transport in the direction of the waves, often called Stoke's drift.
- the waves break when the wave crest angle reached
.
In forming this solutions, Stokes (1874) assumed the fluid was inviscid and therefore irrotational, and also incompressible. Using the mathematical technique of series expansions (also called Stokes' expansion) he was able to derive a solution to the boundary conditions.
Members of Stokes
CLASS METHOD
Stokes
Default constructor
CLASS METHOD
Stokes
Constructor for this class. Call the init(...) function, below, with the supplied sea conditions and depth
CLASS METHOD
init
Computes a number of constants for the given sea state, which allow rapid evaluation of water surface at different temporal and spatial locations.
Parameters
CLASS METHOD
getEta
Computes the surface elevation at the point for the given Stokes 5th wave profile with wave-number(k) and an amplitude.
Parameters
Returns
CLASS METHOD
getKin
Computes the kinematics at the point for the given Stokes 5th wave profile with wave-number(k) and an amplitude.
The derivate term allows different kinematics to be returns:
- Norm return Phi(
)
- ddx, computes
or the horizontal velocity (u)
- ddz, computer
or the vertical Velocity (v)
Parameters
Returns
CLASS METHOD
getMaxVel
Returns the maximum possible values at all spatial and temporal locations
CLASS METHOD
Stokes_eta
Return the surface elevation for the Stokes 5th wave at the spatial and temporal locations specified.
These function are used when you need a quick estimate of a value at a specific point. For repeated evaluation it is best to use the Stokes Class.
The following graph shows the surface profile for a wave of length 224m (or period=12s) and a fundamental amplitude of 15m.
\graph k=0.0279 amplitude=15 x=-224:224 .width=450
Parameters
William Bateman (April 2010)
CLASS METHOD
Stokes_kin
Computes the kinematics within a Stokes 5th wave:
The following example shows the horizontal velocity profile with depth, beneath the crest of a wave of length 224m (or period=12s) and a fundamental amplitude of 15m.
\graph k=0.0279 amplitude=15 z=-20:15 x=0 time=0 derivative=1 depth=50 .width=400 .rotate
Parameters
William Bateman (April 2010)
CLASS METHOD
Stokes_surface_kin
This function combines the previous functions to first work out the height of the wave at a specific location, and then to compute the kinematics at this this surface locations.
The following graph shows the surface profile for a wave of length 224m (or period=12s) and a fundamental amplitude of 12m. \graph k=0.0279 amplitude=12 x=-200:200 derivative=1 .width=500
Parameters
CLASS METHOD
Stokes_maxVel
Returns the maximum velocity anywhere within a stokes wave within deep water. For a regular solution this maximum will always be the horizontal wave velocity in the peak of the wave crest.
Example solutions: \graph k=0.01:0.03:3 amplitude=0:20 .width=500