Interface
#include <codecogs/engineering/waves/celerity.h>
using namespace Engineering::Waves;
| double | celerity_k (double k, double depth=0, double gravity=9.8066) Uses a linear dispersion relationship to compute wave velocity |
 | Real | cc_celerity_k (Real k, Real depth, Real gravity) This function is available as a Microsoft Excel add-in. |
Function Documentation
The velocity of a wave is defined by
where ω is the wave frequency and
k is the wave-number.
Using a linear linear dispersion relationship, i.e.

, we can derive a more useful expression for the wave velocity given a specific specific value of
k, i.e.
In deep water (represented with d<=0), this solution reduces to
Example:
C Example
#include <stdio.h>
#include <codecogs/engineering/waves/celerity.h>
using namespace Engineering::Waves;
int main()
{
printf(" k w ");
for(double k=0.01; k<1;k+=0.1)
{
printf("\n %.6lf", k);
double w=celerity_k(k,2);
printf(" %.3lf", w);
}
}
Output:
k c
??
Parameters:
| k | wave-number defines as (2π /m). [rad/m] |
| depth | the depth of the water to mean sea level. A value of zero or less corresponds to deep water. [m] |
| gravity | (default 9.8066 m/s2). [m/s2] |
Returns:
- wave-frequency (2π /s). [rad/s]
Authors:
- Will Bateman (February 2005)
Source Code:
-
Last Modified: 20 Feb 08 @ 23:25 Page Rendered: 2008-05-14 11:37:59
Page Comments
You must login to leave a messge