# Help regarding WaveLength

Hello guys!

I am running the 08_WavesFlap example in "main", and trying to understand how this property is calculated:

I am struggling to figure out how wave length is calculated and if somebody could show me directly in the code where this calculation is done it would help me a lot. I have found this on the internet:

https://www.scubageek.com/articles/wwwceler.html

But am struggling to calculate it since, it feels like I should know both d and L at the same time, where I only know d (depth) initially..

Kind regards

• Trying to understand it better, I am playing around with the values quite a bit. It is a bit hard for me though, since I get a lot of warnings where I am a bit lost

And also Madsen's criteria is a bit problematic for me;

HL^2/d^3 < 8π^2/3

Is it 8 pi^2 / 3 or 8 pi^(2/3)

I have downloaded the source code and trying to search through all files for "Waves breaking .." etc. but I simply cannot figure out where the calculations of these warnings is actually done.

Kind regards

• Hi @Asalih3d ,

Not sure if you have managed to figure this one out yet, but figured I'd help anyway

When calculating the wavelength, I use a generic formula applicable to all relative depths

d/Lo = (d/L)tanh((2pi*d)/L) where Lo is the 'deepwater' wavelength, Lo = gT^2/2*pi

Solving this iteratively using any numerical method will give you the answer calculated by DSPH as the wavelength L is the only unknown

Hope this helps :)

• Hello @atish_d !

No I actually never managed to figure it out - thanks for that. Could you share where you was taught this or where to find more information about how to do it? :-)

Kind regards

• I learnt it as a coastal engineering student, search for 'dispersion relation', this should give you the info you're looking for :)

Regards