{"id":20640123,"url":"https://github.com/maresb/airy-wave","last_synced_at":"2026-04-22T10:33:46.327Z","repository":{"id":207053918,"uuid":"718297861","full_name":"maresb/airy-wave","owner":"maresb","description":"Animated solution to the Airy linear water wave equation","archived":false,"fork":false,"pushed_at":"2023-12-03T17:04:04.000Z","size":138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T11:38:01.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maresb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-13T19:49:11.000Z","updated_at":"2025-01-03T11:19:00.000Z","dependencies_parsed_at":"2023-12-03T18:22:07.771Z","dependency_job_id":"f99565c2-a65f-4766-a351-8cbaa5113407","html_url":"https://github.com/maresb/airy-wave","commit_stats":null,"previous_names":["maresb/airy-wave"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maresb/airy-wave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maresb%2Fairy-wave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maresb%2Fairy-wave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maresb%2Fairy-wave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maresb%2Fairy-wave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maresb","download_url":"https://codeload.github.com/maresb/airy-wave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maresb%2Fairy-wave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32132511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T15:28:02.478Z","updated_at":"2026-04-22T10:33:46.310Z","avatar_url":"https://github.com/maresb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airy linear wave animation\n\nVisualize the fundamental plane-wave solutions to Airy's linear wave equation. The mathematical details are very nicely summarized [in Wikipedia](https://en.wikipedia.org/wiki/Airy_wave_theory).\n\nThe movement of water that takes place under the wave's surface explains why water depth is such an important factor in determining wave velocity.\n\nThe elliptical motion of individual water particles may be familiar to those who have snorkeled in shallow water.\n\n## [Click here for the interactive animation](https://maresb.github.io/airy-wave/)\n\n\u003ca href=\"https://maresb.github.io/airy-wave/\"\u003e\n    \u003cimg src=\"animation.png\" alt=\"Interactive animation\" width=\"100%\" /\u003e\n\u003c/a\u003e\n\n## Mathematical details\n\nIn short, the velocity $v$ of a water wave is given by the dispersion relation\n\n$$\nv^2 = \\frac{g\\lambda}{2\\pi}\\tanh\\frac{2\\pi h}{\\lambda}\n$$\n\nwhere $g$ is gravitational acceleration, $h$ is water depth, and $\\lambda$ is the wavelength. This dispersion relation determines all dynamics of water waves in the small-ampltude limit.\n\nSpecial cases of this formula are the deep and shallow limits:\n\n$$\\begin{align}\n    v \u0026\\approx \\sqrt{\\frac{g\\lambda}{2\\pi}} \u0026 \\textrm{as } h \u0026\\to \\infty, \\\\\n    v \u0026\\approx \\sqrt{gh} \u0026 \\textrm{as } h \u0026\\to 0.\n\\end{align}$$\n\n## Why are the dynamics determined by this dispersion relation?\n\nMore mathematically-amenable quantities are the angular wavenumber $k = 2\\pi/\\lambda$, and angular frequency $\\omega = k v$. In terms of these quantities the relation becomes\n\n$$\n\\omega^2 = g k \\tanh(k h).\n$$\n\nIn particular, given any initial conditions for the surface $z=\\eta(x,0)$ and $\\partial\\eta/\\partial t(x,0)$ in the small-amplitude limit, then the time evolution is determined by evolving the individual Fourier modes according to\n\n$$\\exp(i (kx-\\omega t)).$$\n\nFor any $k\\neq 0$ there is a pair of values $\\pm \\omega$ and hence a pair of Fourier coefficients $C_{k,+\\omega}$, $C_{k,-\\omega}$ that can be matched to the pair of $k$-Fourier coefficients coming from the initial conditions.\n\n## What are the assumptions?\n\nThe primary assumption is that the amplitude $a$ of the waves is small so that second-order effects are negligible. (If the envelope of the surface wave is distorted from a pure sinusoid, then the amplitude $a$ has been set too large.)\n\nThe dispersion relation arises from exactly solving the PDE of the fluid motion under the surface. That PDE is [Bernoulli's equation](https://en.wikipedia.org/wiki/Bernoulli%27s_principle#Unsteady_potential_flow) and assumes that water is incompressible and irrotational. While water is certainly not irrotational, it is still a convenient assumption since rotational effects don't play a very significant role in small waves.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaresb%2Fairy-wave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaresb%2Fairy-wave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaresb%2Fairy-wave/lists"}