{"id":22202460,"url":"https://github.com/jloveric/twofluid-ai-generated","last_synced_at":"2026-04-17T08:06:09.384Z","repository":{"id":264503348,"uuid":"893544553","full_name":"jloveric/twofluid-ai-generated","owner":"jloveric","description":"AI Generated code for \"Approximate Riemann solver for the two-fluid plasma model\"","archived":false,"fork":false,"pushed_at":"2024-11-25T15:37:14.000Z","size":1847,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-23T02:57:31.083Z","etag":null,"topics":["aigc","cfd","mhd","numerical-methods","plasma","pytorch","shockwave-evolution-modelling","two-fluid","windsurf"],"latest_commit_sha":null,"homepage":"","language":"Python","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/jloveric.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T18:02:45.000Z","updated_at":"2024-11-25T15:37:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"5265b618-76da-489c-877c-e0c5e886a88c","html_url":"https://github.com/jloveric/twofluid-ai-generated","commit_stats":null,"previous_names":["jloveric/twofluid-ai-generated"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jloveric/twofluid-ai-generated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloveric%2Ftwofluid-ai-generated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloveric%2Ftwofluid-ai-generated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloveric%2Ftwofluid-ai-generated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloveric%2Ftwofluid-ai-generated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jloveric","download_url":"https://codeload.github.com/jloveric/twofluid-ai-generated/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloveric%2Ftwofluid-ai-generated/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31920523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["aigc","cfd","mhd","numerical-methods","plasma","pytorch","shockwave-evolution-modelling","two-fluid","windsurf"],"created_at":"2024-12-02T16:24:54.491Z","updated_at":"2026-04-17T08:06:09.360Z","avatar_url":"https://github.com/jloveric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Two-Fluid Plasma Model Simulation\n\nThis code was completely written by Claude in Windsurf with user prompting.\n\nThis repository contains a PyTorch implementation of a two-fluid plasma model based on [\"Approximate Riemann solver for the two-fluid plasma model\"](https://www.aa.washington.edu/sites/aa/files/research/cpdlab/docs/Shumlak_JCP2003.pdf).\n\n## Features\n\n- Separate conservation equations for electron and ion fluids\n- Full Maxwell's equations\n- GPU-accelerated using PyTorch\n- Second-order spatial reconstruction with minmod limiter\n- TVD Runge-Kutta time integration\n- Configurable charge parameters\n- Shock-capturing capability\n\n## Installation\n\nThis project uses Poetry for dependency management. To install:\n\n```bash\npoetry install --no-root\n```\n\n## Usage\n\nRun the shock simulation with default parameters:\n\n```bash\npoetry run python shock_simulation.py\n```\n\nConfigure simulation parameters:\n\n```bash\npoetry run python shock_simulation.py --resolution 500 --final-time 0.2 --plot-interval 0.01 --charge 10.0\n```\n\nOptions:\n- `--resolution, -r`: Number of spatial grid points (default: 500)\n- `--final-time, -t`: Final simulation time (default: 0.2)\n- `--plot-interval, -p`: Time between plots (default: 0.01)\n- `--charge, -c`: Magnitude of species charge (ion: +charge, electron: -charge) (default: 10.0)\n\n## Development History\n\nThe complete development conversation between the human developer and Claude 3.5 Sonnet is available in [TRANSCRIPT.md](TRANSCRIPT.md). This transcript shows the iterative process of implementing the model, debugging issues, and making improvements.\n\n[A YouTube video of an attempt to develop this code with AI](https://www.youtube.com/watch?v=NQ3hNe5bxxc)\n\n## Latest Simulation Results\n\n![Final State](shock_results/state_t1.80e+01.png)\n\nThe image shows the final state of the simulation with:\n- Density profiles for electrons and ions\n- Velocity components\n- Electric and magnetic field components\n- Temperature evolution\n\n## Implementation Details\n\nThe simulation uses normalized units where:\n- Ion mass = 1.0\n- Speed of light = 1.0\n- μ₀ = 1.0, ε₀ = 1.0\n- Configurable charge parameter (default: qi = +10, qe = -10)\n\nInitial conditions are based on a modified Brio-Wu shock setup with:\n- Density discontinuity (1.0 vs 0.125)\n- Pressure discontinuity (0.5 vs 0.05)\n- Magnetic field discontinuity\n- Zero initial velocities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjloveric%2Ftwofluid-ai-generated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjloveric%2Ftwofluid-ai-generated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjloveric%2Ftwofluid-ai-generated/lists"}