{"id":19708761,"url":"https://github.com/bendudson/nibbler","last_synced_at":"2026-03-03T08:04:07.830Z","repository":{"id":9813792,"uuid":"11796331","full_name":"bendudson/nibbler","owner":"bendudson","description":"Simple drift-kinetic particle following code in toroidal geometry (cylindrical coordinates). Reads EFIT 'g' files for the equilibrium, and can add perturbations from external field coils","archived":false,"fork":false,"pushed_at":"2014-03-06T17:34:44.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T13:26:55.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"IDL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bendudson.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-31T17:09:15.000Z","updated_at":"2014-03-06T17:34:44.000Z","dependencies_parsed_at":"2022-09-17T16:00:56.060Z","dependency_job_id":null,"html_url":"https://github.com/bendudson/nibbler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fnibbler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fnibbler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fnibbler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fnibbler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bendudson","download_url":"https://codeload.github.com/bendudson/nibbler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241025774,"owners_count":19896506,"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","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-11T21:44:46.639Z","updated_at":"2026-03-03T08:04:02.781Z","avatar_url":"https://github.com/bendudson.png","language":"IDL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nooooo      ooo  o8o   .o8        .o8       oooo                     \n`888b.     `8'  `\"'  \"888       \"888       `888                     \n 8 `88b.    8  oooo   888oooo.   888oooo.   888   .ooooo.  oooo d8b \n 8   `88b.  8  `888   d88' `88b  d88' `88b  888  d88' `88b `888\"\"8P \n 8     `88b.8   888   888   888  888   888  888  888ooo888  888     \n 8       `888   888   888   888  888   888  888  888    .o  888     \no8o        `8  o888o  `Y8bod8P'  `Y8bod8P' o888o `Y8bod8P' d888b    \n\n\n\nOutline\n=======\n\nA 3D drift-kinetic particle tracking code in cylindrical coordinates\n(R,Z,phi). Evolves the position and parallel velocity of particles\nin a tokamak with RMP coils. Takes into account curvature and Grad-B\ndrifts, and the mirror force for trapping. Doesn't include electric\nfields or any sort of coupling between particles.\n\nAxisymmetric equilibrium field from EFIT, currently from a G-EQDSK\nfile (as in A\u0026G output).\n\nCalculates the field due to RMP coils from coil geometry settings.\n\nLicense\n=======\n\nCopyright 2010 B.D.Dudson (University of York)\n\nNibbler is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nNibbler is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with Nibbler. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\nA copy of the LGPL license is in COPYING.LESSER. Since this is based\non (and refers to) the GPL, this is included in COPYING.\n\nUseage\n======\n\nTo just see an example (trapped) orbit, just run\n\nIDL\u003e nibbler\n\nand with RMP field on\n\nIDL\u003e nibbler, /rmp\n\n\nEquilibrium / RMP settings\n--------------------------\n\nSince reading in and processing equilibria can take a while,\nthis bit can be done once and then re-used\n\n/odd    Add this keyword to use odd RMP coil configuration\n        Default is even configuration\n\nNeed to add options for reading shots from IDAM\n\no Once generated, the data is saved in \"equil.idl\"\n\nParticle settings\n-----------------\n\n/rmp            Include RMP coils. Default is no\n\ncurrent=current Current in the RMP coils in Amp-turns. Defaults to 4 kAt\n\npsin=psin       Normalised psi of starting point. All particles\n                start at outboard midplane, field-lines at inboard midplane. \n                Default is 0.9\n\nNparticles=Nparticles    Number of particles to simulate\n                         Spreads them out evenly in toroidal angle\n                         Default is only 1 particle\n\n/electron       Evolve electrons. Default is Deuterium ions\n\n/field          Follow field-lines\n\ntemp = temp     Temperature in eV. This determines total kinetic energy\n                using E = 3/2 kT\n                Default is 200eV\n\nkpar=kpar       Specifies the particle pitch angle\n                Fraction of energy in parallel velocity Vpar^2 / V^2\n                Sign determines Vpar relative to B field.\n                Default is 0.3\n\noutput=output   Set name of output file for saving results\n                Normally just stops at the end\n\nrunfor=runfor   Simulation time to run for in seconds.\n                Default is 1ms\n\ndtmul=dtmul     Timestep in gyro-orbit time (~1e-7s). Default is 1\n\n\nExample\n-------\n\nnibbler, /rmp, output=\"kpar_p98_0.8.idl\", n=100, psin=0.98, kpar=0.8\n\nLoads an existing equilibrium, includes RMP coils (default 4kA), \nsaves result to \"kpar_p98_0.8.idl\". Evolves 100 particles starting\nat the outboard midplane at normalised psi 0.98 with Vpar^2 = 0.8 V^2\n(a passing particle in this case)\n\nIssues\n======\n\no Suspect there is a minus sign in the poloidal field: in MAST\n  poloidal field usually goes clockwise in R-Z plane. Here get opposite.\n\no No handling for cases where particle leaves domain. Should detect\n  where hits targets\n\no IDL code is REALLY slow. Could keep most of the initialisation code in IDL\n  to get equilibrium, calculate DCTs etc. but re-write the particle orbit\n  evolution in C/Fortran.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendudson%2Fnibbler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbendudson%2Fnibbler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendudson%2Fnibbler/lists"}