{"id":17258680,"url":"https://github.com/joglekara/vlapy","last_synced_at":"2025-04-14T05:32:19.599Z","repository":{"id":63867378,"uuid":"239145397","full_name":"joglekara/VlaPy","owner":"joglekara","description":"1D-1V Vlasov-Poisson(-Fokker-Planck), Plasma Physics PDE Simulation Tool in NumPy and experiment management in MLFlow","archived":false,"fork":false,"pushed_at":"2023-11-17T17:37:34.000Z","size":4307,"stargazers_count":33,"open_issues_count":0,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T19:52:06.339Z","etag":null,"topics":["numerical-methods","plasma-physics","python","tests","vlasov"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joglekara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-08T14:27:33.000Z","updated_at":"2024-12-19T05:12:42.000Z","dependencies_parsed_at":"2024-11-08T02:28:24.817Z","dependency_job_id":"48405fc4-cf8d-45c8-8f20-2bbdc613d768","html_url":"https://github.com/joglekara/VlaPy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joglekara%2FVlaPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joglekara%2FVlaPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joglekara%2FVlaPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joglekara%2FVlaPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joglekara","download_url":"https://codeload.github.com/joglekara/VlaPy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382945,"owners_count":21094563,"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":["numerical-methods","plasma-physics","python","tests","vlasov"],"created_at":"2024-10-15T07:21:34.027Z","updated_at":"2025-04-14T05:32:18.139Z","avatar_url":"https://github.com/joglekara.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/joglekara/VlaPy.svg?style=shield)](https://circleci.com/gh/joglekara/VlaPy)\n[![codecov](https://codecov.io/gh/joglekara/VlaPy/branch/master/graph/badge.svg)](https://codecov.io/gh/joglekara/VlaPy)\n[![Documentation Status](https://readthedocs.org/projects/vlapy/badge/?version=latest)](https://vlapy.readthedocs.io/en/latest/?badge=latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n[![status](https://joss.theoj.org/papers/c2b3924d7868d7bd8472c6deb011cfcc/status.svg)](https://joss.theoj.org/papers/c2b3924d7868d7bd8472c6deb011cfcc)\n[![DOI](https://zenodo.org/badge/239145397.svg)](https://zenodo.org/badge/latestdoi/239145397)\n# VlaPy\n\nUsage details and the latest documentation can be found [here](https://vlapy.readthedocs.io/en/latest/)\n\n## Code of Conduct\nPlease adhere to the guidelines from the Contributor Covenant listed in the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Quick Usage\nTo install dependencies, run ``python3 setup.py install`` from the base directory of the repository.\n\nAfter this step, ``python3 run_nlepw.py`` can be executed to run a simulation of a Non-Linear Electron Plasma Wave with collisions.\n\nThis will create a temporary directory for the simulation files. Once completed, MLFlow will move the simulation folder into a centralized datastore. This datastore can be accessed through a web-browser based UI provided by leveraging MLFlow.\n\nTo start the MLFlow UI server, type ``mlflow ui`` into the terminal and then navigate to localhost:5000 in your web browser. The page will look like the following\n\n![MLFlow UI](notebooks/screenshots_for_example/ui.png)\n\nClicking into that run will show you\n\n![MLFlow damping](notebooks/screenshots_for_example/nlepw_screenshot.png)\n## Overview\nVlaPy is a 1-spatial-dimension, 1-velocity-dimension, Vlasov-Poisson-Fokker-Planck code written in Python. \n\n## Statement of Need\nThe 1D-1V VPFP equation set solved here has been applied in research of laser-plasma interactions in the context of \ninertial fusion, of plasma-based accelerators, of space physics, and of fundamental plasma physics (references \ncan be found in the manuscript).  While there are VPFP software libraries which are available in academic settings, \nresearch laboratories, and industry, the community has yet to benefit from a simple-to-read, open-source Python \nimplementation. This lack of capability is currently echoed in conversations within the ``PlasmaPy`` community \n(``PlasmaPy`` is a collection of open-source plasma physics resources). Our aim with ``VlaPy`` is to take a step \ntowards filling this need for a research and educational tool in the open-source community.\n\n``VlaPy`` is intended to help students learn fundamental concepts and help researchers discover novel physics and \napplications in plasma physics, fluid physics, computational physics, and numerical methods.  It is also designed to \nprovide a science-accessible introduction to industry and software engineering best-practices, including unit and \nintegrated testing, and extensible and maintainable code. \n\nThe details of the ``VlaPy`` implementation are provided in the following sections. \n\n## Implementation\nThe Vlasov-Poisson-Fokker-Planck system can be decomposed into 4 components.\n\n### Vlasov - Spatial Advection\nThe spatial advection operator is pushed using an exponential integrator. The system is periodic in x. \n\nThis operator is tested in the fully integrated tests to reproduce solutions of the \n1D-1V Vlasov-Poisson system, namely, Landau damping.\n\n### Vlasov - Velocity Advection\nThe velocity advection operator is pushed using an exponential integrator. The system is periodic in v.\n\nThis operator is tested in the fully integrated tests to reproduce solutions of the \n1D-1V Vlasov-Poisson system, namely, Landau damping.\n\n \n### Poisson Solver\nThe Poisson equation is solved pseudospectrally. \n\nThis solver is tested to reproduce analytical solutions to a periodic Poisson system.\n\n\n### Fokker-Planck Solver\nThe Fokker-Planck equation is solved using an implicit finite-difference scheme because of the need to perform a \ndiffusion time-step. \n\nThis solver is tested to \n1) return df/dt = 0 if a Maxwell-Boltzmann distribution is provided as input \n2) conserve energy and density\n3) relax to a Maxwellian of the right temperature and without a drift velocity\n\n## Tests\nAll tests are performed in CircleCI. There are unit tests as well as integrated tests.\nOne of the most fundamental plasma physics phenomenon is that described by Landau damping. \n\nPlasmas can support electrostatic oscillations. The oscillation frequency is given by the electrostatic electron \nplasma wave (EPW) dispersion relation. When a wave of sufficiently small amplitude is driven at the resonant \nwave-number and frequency pairing, there is a resonant exchange of energy between the plasma and the electric field, \nand the electrons can damp the electric field.\n\nIn VlaPy, we verify that the damping rate is reproduced for a few different wave numbers. \nThis is shown in `notebooks/landau_damping.ipynb.`\n\nWe include validation against this phenomenon as an integrated test.\n\n## Other practical considerations\n### File Storage\nXArray enables a user-friendly interface to labeling multi-dimensional arrays along with a powerful and performant\nbackend. Therefore, we use XArray (http://xarray.pydata.org/en/stable/) for a performant Pythonic storage mechanism \nthat promises lazy loading and incremental writes (through some tricks).\n\n### Simulation Management\nWe use MLFlow (https://mlflow.org/) for simulation management. This is typically used for managing machine-learning\nlifecycles but is perfectly suited for managing numerical simulations. We believe UI capability to manage simulations\nsignificantly eases the physicist's workflow. \n\nThere are more details about how the diagnostics for a particular type of simulation are packaged and provided to\nthe run manager object. These will be described in time. One can infer these from the code as well. \n\n## Contributing to VlaPy\nPlease see the guide in [contribution guidelines for this project](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoglekara%2Fvlapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoglekara%2Fvlapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoglekara%2Fvlapy/lists"}