CodeCogs - An iteractive open source Numerical library Welcome... Login
CodeCogs
shopping cart
OSXWindowsLinux
Search CodeCogs
Numerical Components

Valid RSS

EngineeringWaves

celerity

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 1.00
sub units 0.00
add a commercial licence to your cart
0
viewed 41 times and licensed 5 times

The phase velocity of a wave (also known as 'wave celerity')

Controller: CodeCogs  Contact Controller
+View version details
Contents hide toc
buy now     get GPL     add to cart

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

Function Documentation

Celerity K Calculator
  
Add calculator to website or email
 
doublecelerity_kdoublek
doubledepth = 0
doublegravity = 9.8066 )
The velocity of a wave is defined by
c= \frac{\omega}{k}
where ω is the wave frequency and k is the wave-number.

Using a linear linear dispersion relationship, i.e. w^2 = g k tanh(k d), we can derive a more useful expression for the wave velocity given a specific specific value of k, i.e.

c = \sqrt { \frac{g}{k} tanh(kd) }
In deep water (represented with d<=0), this solution reduces to
c = \sqrt { \frac{g}{k} }

Example 1:
#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:
kwave-number defines as (2π /m). [rad/m]
depththe depth of the water to mean sea level. A value of zero or less corresponds to deep water. [m]
gravity(default 9.8066 m/s^2). [m/s^2]
Returns:
wave-frequency (2π /s). [rad/s]
Authors:
Will Bateman (February 2005)
Source Code:

To view or download source code you need either a GPL or Commercial Licence.

buy now     get GPL     add to cart

Not a member, then Register with CodeCogs. Already a Member, then Login.


Page Comments

Format Excel Equations

  You must login to leave a messge


Last Modified: 14 Apr 09 @ 16:52     Page Rendered: 2010-03-12 01:13:57

Valid CSS!   Valid XHTML 1.0 Transitional