Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Inverting dispersion relation with Mathematica

Tags:
  1. Feb 18, 2014 #1
    Hi guys,

    I'm currently working on a project related to Faraday instability, and I of course came across the dispersion relation for capillary-gravity waves, i.e.

    ω² = tanh(kh)(gk + σk³/ρ) .

    Now I would need to numerically solve this relation for the wavenumber k as a function of depth h (in fact, this is the wavelength I'm interested in, but this is given freely if I know the wavenumber). My first reflex was to rewrite this relation in terms of h as a function of k

    h = (1/k) arctanh [ω² (gk + σk³/ρ)^(-1) ]

    and then try to invert it with Mathematica (which I'm not really familiar with, but it seemed the easiest choice to me). I tried using Findroot, with something like this :

    h[x_] := (1/x) ArcTanh[((70 \[Pi])^2)/ (9.81x +
    (0.0206 x³/950) )]
    hmax = 0.01;
    hmin = 0.001;
    dh = 0.0001;
    Sol = Table[{{b -> i}, FindRoot[i == h[x], {x, 0.001}]} //
    Flatten, {i, hmin, hmax, dh}];

    but this seems to stumble upon some convergence error (here I replaced ω, ρ and σ with numerical values related to my experimental setup), and I found nothing that seemed really helpful in the doc. Does anyone have an idea on what I should try to make it work ?

    Thanks in advance for you replies. :smile:
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Inverting dispersion relation with Mathematica
Loading...