{"id":31988450,"url":"https://github.com/tomaslink/frequenpy","last_synced_at":"2025-10-15T09:43:13.739Z","repository":{"id":40984380,"uuid":"164780445","full_name":"tomaslink/frequenpy","owner":"tomaslink","description":"High-precision physics engine dedicated to the study of standing waves and visualization of its normal modes.","archived":false,"fork":false,"pushed_at":"2023-11-15T04:11:34.000Z","size":619,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-21T06:50:07.069Z","etag":null,"topics":["cosine","coupled","fourier","frequency","harmonic","math","normal-modes","oscillators","physics","physics-simulation","python3","simulation","sine","standing-waves","vibration","waves"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomaslink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-01-09T03:30:48.000Z","updated_at":"2025-05-17T15:25:24.000Z","dependencies_parsed_at":"2023-09-24T07:00:37.158Z","dependency_job_id":"879bfdd9-a882-41be-9c0d-c1d58a39d685","html_url":"https://github.com/tomaslink/frequenpy","commit_stats":{"total_commits":48,"total_committers":1,"mean_commits":48.0,"dds":0.0,"last_synced_commit":"41eeafb7e2b3e13e1f5109090b40adf773d2d62c"},"previous_names":["tomasjuanlink/frequenpy"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tomaslink/frequenpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaslink%2Ffrequenpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaslink%2Ffrequenpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaslink%2Ffrequenpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaslink%2Ffrequenpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomaslink","download_url":"https://codeload.github.com/tomaslink/frequenpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaslink%2Ffrequenpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279067580,"owners_count":26096347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cosine","coupled","fourier","frequency","harmonic","math","normal-modes","oscillators","physics","physics-simulation","python3","simulation","sine","standing-waves","vibration","waves"],"created_at":"2025-10-15T09:43:09.799Z","updated_at":"2025-10-15T09:43:13.725Z","avatar_url":"https://github.com/tomaslink.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\" style=\"border-bottom: none;\"\u003e FrequenPy \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca\u003e\n    \u003cimg alt=\"Coverage\" src=\"https://codecov.io/gh/tomaslink/frequenpy/branch/master/graph/badge.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n**frequenpy** is a high-precision physics engine dedicated to the study and visualization of standing waves.\n\n## Wave theory\n\nIn this section I will briefly explain the systems available for simulation,\naccording predictions of wave theory.\nThis results have been (and can be) demonstrated experimentally.\n\n### String loaded with with N masses oscillating transversally. \n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"docs/beaded_string.gif\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"justify\"\u003e\n  \n  A flexible elastic string with tension **T** is loaded with **N** identical particles,\n  each of mass **m**, equally spaced a distance **a** apart.\n  Let us hold the string fixed at two points,\n  one at a distance **a** to the left of the first particle\n  and the other at a distance **a** to the right of the Nth particle.\n\n  According to the theory, the movement of each of the masses in the vertical direction\n  can be decomposed into a superposition of **N** **normal modes** modes of oscillation.\n  That way, the $y$ position of the particle **n** as a function of time is\n  ```math\n    y_n(t) = \\sum_{p=1}^N A_p \\sin(k_p n a) \\cos(\\omega_p t + \\theta_p).\n  ```\n  Where $A_p$ and $\\theta_p$ depend on the initial conditions,\n  $k_p$ will depend on the boundary conditions and $\\omega_p$ will have the form\n  ```math\n    \\omega_p = 2 \\omega_0 \\sin\\left(\\frac{p \\pi}{2(N + 1)}\\right)\n    \\qquad,\n    \\qquad\n    \\omega_0 = \\sqrt{\\frac{T}{ma}}.\n  ```\n  \n  There are as many normal modes as there are degrees of freedom (masses) in the system.\n  In each natural mode **p**,\n  all masses in the system oscilate at the same frequency $\\omega_p$\n  and pass through the equilibrium position at the same time.\n  The first mode, **p=1**, corresponds to the lowest frequency (called fundamental)\n  and each subsequent mode will have a frequency higher than the previous one.\n  Any movement of the string, as strange as it may be,\n  can be expressed as a superposition of those **N** normal modes\n  (some will contribute more than others to the final movement). \n\n  As the number of masses gets higher and highter ($N \\rightarrow \\infty$),\n  we approximate to the continuous system (a vibrating string - no discrete masses).\n  In this simulation, you can use **N = 30** to see a continuous effect.\n\n\u003c/div\u003e\n\n## Installation\n\nTo install FrequenPy, just run:\n\n```\npip install frequenpy\n```\n\n## Usage\n\nOnce installed, just run:\n\n```\nfrequenpy\n```\n\nThis will prompt the following help:\n```bash\n(.venv) $ frequenpy\nusage: FrequenPy [-h] {loaded_string} ...\n\nWelcome to FrequenPy! High-precision physics engine dedicated to the study of standing waves.\n\npositional arguments:\n  {loaded_string}  Choose a system to simulate\n    loaded_string  Transverse oscillations on a string loaded with masses.\n\noptions:\n  -h, --help       show this help message and exit\n\nEnjoy!\n\n```\n\nIf you pass **loaded_string** as an argument:\n\n```bash\n(.venv) $ frequenpy beaded_string\nusage: FrequenPy beaded_string [-h] --masses  [--modes  [...]] [--boundary BOUNDARY] [--speed SPEED] [--save]\n\nTransverse oscillations on a string loaded with masses.\n\noptions:\n  -h, --help           show this help message and exit\n\nrequired arguments:\n  --masses             Number of masses.\n\noptional arguments:\n  --modes  [ ...]      Normal modes to combine. Ex: \"1 2 3\" (default: [1]).\n  --boundary BOUNDARY  Boundary conditions: 0 (fixed), 1 (free), or 2 (mixed) (default: 0).\n  --speed SPEED        Animation speed. Can be a float number (default: 1).\n  --save               Save the animation in mp4 format (default: False).\n\nExample: frequenpy loaded_string --masses 3 --modes 1 2 3 --speed 0.1 --boundary 0\n```\n\nRemember that for system of **N** masses there are **N** normal modes.\nYou can pass only one of them or a combination of several, e.g. \"2 6 3\".\nThe order doesn't matter. \n\n\n## TODO\n\n- Interactive GUI to be able to play more easily with all the parameters of the system. \n- Plot each individual normal mode that is contributing to the movement.\n- **Loaded String**:\n  - Allow changing damping and tension as parameters.\n  - Allow initial conditions to generate more arbitrary and crazy movements of the string,\n  like picking the string with your mouse and realease it from some position. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaslink%2Ffrequenpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaslink%2Ffrequenpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaslink%2Ffrequenpy/lists"}